{"version":3,"file":"forum.js.map","sourceRoot":"","sources":["webpack://@flarum/core/../../../node_modules/punycode/punycode.es6-exposed.js","webpack://@flarum/core/../../../node_modules/expose-loader/dist/runtime/getGlobalThis.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/inherits.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/affix.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/compileTemplate.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://@flarum/core/../../../node_modules/mithril/render/trust.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://@flarum/core/../../../node_modules/color-thief-browser/dist/color-thief.min-exposed.js","webpack://@flarum/core/../../../node_modules/dayjs/plugin/relativeTime.js","webpack://@flarum/core/../../../node_modules/mithril/render/hyperscriptVnode.js","webpack://@flarum/core/../../../node_modules/mithril/render.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/toPrimitive.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/typeof.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/transition.js","webpack://@flarum/core/../../../node_modules/mithril/querystring/build.js","webpack://@flarum/core/../../../node_modules/mithril/promise/promise.js","webpack://@flarum/core/../../../node_modules/mithril/stream/stream.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/core/../../../node_modules/mithril/request/request.js","webpack://@flarum/core/../../../node_modules/mithril/index-exposed.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@flarum/core/../../../node_modules/jquery/dist/jquery-exposed.js","webpack://@flarum/core/../../../node_modules/dayjs/dayjs.min.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/tooltip.js","webpack://@flarum/core/../../../node_modules/mithril/stream.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/dropdown.js","webpack://@flarum/core/../../../node_modules/mithril/hyperscript.js","webpack://@flarum/core/../../../node_modules/mithril/mount-redraw.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/assign.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/parse.js","webpack://@flarum/core/../../../node_modules/mithril/route.js","webpack://@flarum/core/../../../node_modules/dayjs/dayjs.min-exposed.js","webpack://@flarum/core/../../../node_modules/mithril/render/vnode.js","webpack://@flarum/core/../../../node_modules/color-thief-browser/dist/color-thief.min.js","webpack://@flarum/core/../../../node_modules/textarea-caret/index.js","webpack://@flarum/core/../../../node_modules/mithril/render/render.js","webpack://@flarum/core/../../../node_modules/mithril/querystring/parse.js","webpack://@flarum/core/../../../node_modules/mithril/api/mount-redraw.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://@flarum/core/../../../node_modules/jquery/dist/jquery.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/build.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://@flarum/core/../../../node_modules/jquery.hotkeys/jquery.hotkeys.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/createClass.js","webpack://@flarum/core/../../../node_modules/mithril/api/router.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/defineProperty.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://@flarum/core/../../../node_modules/punycode/punycode.es6.js","webpack://@flarum/core/../../../node_modules/mithril/request.js","webpack://@flarum/core/../../../node_modules/mithril/index.js","webpack://@flarum/core/../../../node_modules/mithril/render/fragment.js","webpack://@flarum/core/../../../node_modules/dayjs/plugin/localizedFormat.js","webpack://@flarum/core/./src/common/utils/arrayFlatPolyfill.ts","webpack://@flarum/core/../../../node_modules/mithril/promise/polyfill.js","webpack://@flarum/core/../../../node_modules/mithril/render/hyperscript.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/toPropertyKey.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://@flarum/core/webpack/bootstrap","webpack://@flarum/core/webpack/runtime/compat get default export","webpack://@flarum/core/webpack/runtime/define property getters","webpack://@flarum/core/webpack/runtime/global","webpack://@flarum/core/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/core/webpack/runtime/make namespace object","webpack://@flarum/core/./src/common/utils/bidi.js","webpack://@flarum/core/./src/common/utils/patchMithril.js","webpack://@flarum/core/./src/common/app.ts","webpack://@flarum/core/./src/common/index.ts","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/core/./src/common/utils/setRouteWithForcedRefresh.ts","webpack://@flarum/core/./src/forum/utils/History.ts","webpack://@flarum/core/./src/forum/utils/Pane.js","webpack://@flarum/core/./src/common/Component.ts","webpack://@flarum/core/./src/common/utils/subclassOf.js","webpack://@flarum/core/./src/common/states/PageState.js","webpack://@flarum/core/./src/common/components/Page.tsx","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/core/./src/common/utils/isObject.ts","webpack://@flarum/core/./src/common/utils/ItemList.ts","webpack://@flarum/core/./src/common/components/Separator.js","webpack://@flarum/core/../../../node_modules/clsx/dist/clsx.m.js","webpack://@flarum/core/./src/common/utils/classList.ts","webpack://@flarum/core/./src/common/helpers/listItems.tsx","webpack://@flarum/core/./src/forum/components/DiscussionHero.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/core/./src/common/utils/extract.ts","webpack://@flarum/core/./src/common/components/Link.js","webpack://@flarum/core/./src/common/helpers/avatar.tsx","webpack://@flarum/core/./src/common/utils/string.ts","webpack://@flarum/core/./src/common/helpers/highlight.tsx","webpack://@flarum/core/./src/common/helpers/icon.tsx","webpack://@flarum/core/./src/common/utils/extractText.ts","webpack://@flarum/core/./src/common/utils/humanTime.ts","webpack://@flarum/core/./src/common/utils/abbreviateNumber.ts","webpack://@flarum/core/./src/common/components/Dropdown.tsx","webpack://@flarum/core/./src/common/helpers/humanTime.tsx","webpack://@flarum/core/./src/forum/components/TerminalPost.js","webpack://@flarum/core/./src/common/utils/SubtreeRetainer.ts","webpack://@flarum/core/./src/common/components/LoadingIndicator.tsx","webpack://@flarum/core/./src/common/components/ConfirmDocumentUnload.js","webpack://@flarum/core/./src/common/helpers/fireDebugWarning.ts","webpack://@flarum/core/./src/common/components/Button.tsx","webpack://@flarum/core/./src/common/utils/insertText.ts","webpack://@flarum/core/./src/common/utils/BasicEditorDriver.ts","webpack://@flarum/core/./src/common/components/Tooltip.tsx","webpack://@flarum/core/./src/common/components/TextEditor.js","webpack://@flarum/core/./src/forum/components/ComposerBody.js","webpack://@flarum/core/./src/forum/components/ReplyComposer.js","webpack://@flarum/core/./src/common/components/Alert.tsx","webpack://@flarum/core/./src/common/components/Modal.tsx","webpack://@flarum/core/./src/common/utils/Stream.ts","webpack://@flarum/core/./src/forum/components/ForgotPasswordModal.tsx","webpack://@flarum/core/./src/forum/components/LogInButtons.js","webpack://@flarum/core/./src/forum/components/SignUpModal.tsx","webpack://@flarum/core/./src/forum/components/LogInModal.tsx","webpack://@flarum/core/./src/forum/components/RenameDiscussionModal.tsx","webpack://@flarum/core/./src/forum/utils/DiscussionControls.js","webpack://@flarum/core/./src/forum/utils/slidable.js","webpack://@flarum/core/./src/common/utils/escapeRegExp.ts","webpack://@flarum/core/./src/forum/components/DiscussionListItem.tsx","webpack://@flarum/core/./src/common/components/Placeholder.js","webpack://@flarum/core/./src/forum/components/DiscussionList.js","webpack://@flarum/core/./src/forum/components/DiscussionListPane.js","webpack://@flarum/core/./src/common/utils/ScrollListener.js","webpack://@flarum/core/./src/forum/components/LoadingPost.js","webpack://@flarum/core/./src/common/helpers/username.tsx","webpack://@flarum/core/./src/forum/components/ComposerPostPreview.js","webpack://@flarum/core/./src/forum/components/ReplyPlaceholder.js","webpack://@flarum/core/./src/forum/components/PostStream.js","webpack://@flarum/core/./src/common/utils/formatNumber.ts","webpack://@flarum/core/./src/forum/components/PostStreamScrubber.js","webpack://@flarum/core/./src/common/components/SplitDropdown.tsx","webpack://@flarum/core/../throttle.js","webpack://@flarum/core/../debounce.js","webpack://@flarum/core/./src/common/utils/anchorScroll.js","webpack://@flarum/core/./src/forum/states/PostStreamState.ts","webpack://@flarum/core/./src/forum/components/DiscussionPage.tsx","webpack://@flarum/core/./src/forum/components/HeaderPrimary.js","webpack://@flarum/core/./src/common/components/LinkButton.js","webpack://@flarum/core/./src/forum/components/SessionDropdown.tsx","webpack://@flarum/core/./src/common/components/SelectDropdown.tsx","webpack://@flarum/core/./src/common/Model.ts","webpack://@flarum/core/./src/common/utils/computed.ts","webpack://@flarum/core/./src/common/utils/isDark.ts","webpack://@flarum/core/./src/common/helpers/textContrastClass.ts","webpack://@flarum/core/./src/common/components/Badge.tsx","webpack://@flarum/core/./src/common/models/Discussion.tsx","webpack://@flarum/core/./src/forum/components/NotificationList.js","webpack://@flarum/core/./src/forum/components/NotificationsDropdown.tsx","webpack://@flarum/core/./src/common/utils/KeyboardNavigatable.ts","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/core/./src/forum/components/DiscussionsSearchItem.tsx","webpack://@flarum/core/./src/forum/components/DiscussionsSearchSource.tsx","webpack://@flarum/core/./src/forum/components/UsersSearchSource.tsx","webpack://@flarum/core/./src/forum/components/Search.tsx","webpack://@flarum/core/./src/forum/components/HeaderSecondary.js","webpack://@flarum/core/./src/forum/components/ComposerButton.js","webpack://@flarum/core/./src/forum/states/ComposerState.js","webpack://@flarum/core/./src/forum/components/Composer.js","webpack://@flarum/core/./src/forum/components/Notification.tsx","webpack://@flarum/core/./src/forum/components/DiscussionRenamedNotification.tsx","webpack://@flarum/core/./src/forum/components/EditPostComposer.js","webpack://@flarum/core/./src/forum/utils/PostControls.js","webpack://@flarum/core/./src/forum/components/Post.tsx","webpack://@flarum/core/./src/common/components/GroupBadge.tsx","webpack://@flarum/core/./src/common/models/Group.ts","webpack://@flarum/core/./src/common/components/EditUserModal.tsx","webpack://@flarum/core/./src/forum/components/AffixedSidebar.js","webpack://@flarum/core/./src/forum/components/UserPage.tsx","webpack://@flarum/core/./src/forum/utils/UserControls.js","webpack://@flarum/core/./src/forum/components/AvatarEditor.js","webpack://@flarum/core/./src/forum/components/UserCard.js","webpack://@flarum/core/./src/common/helpers/userOnline.tsx","webpack://@flarum/core/./src/forum/components/PostUser.js","webpack://@flarum/core/./src/common/helpers/fullTime.tsx","webpack://@flarum/core/./src/common/components/IPAddress.tsx","webpack://@flarum/core/./src/forum/components/PostMeta.js","webpack://@flarum/core/./src/forum/components/PostEdited.js","webpack://@flarum/core/./src/forum/components/CommentPost.js","webpack://@flarum/core/./src/forum/components/EventPost.js","webpack://@flarum/core/./src/forum/components/DiscussionRenamedPost.js","webpack://@flarum/core/./src/forum/components/WelcomeHero.tsx","webpack://@flarum/core/./src/forum/components/DiscussionComposer.js","webpack://@flarum/core/./src/forum/components/IndexPage.tsx","webpack://@flarum/core/./src/forum/components/PostsUserPage.tsx","webpack://@flarum/core/./src/common/states/PaginatedListState.ts","webpack://@flarum/core/./src/common/utils/EventEmitter.ts","webpack://@flarum/core/./src/forum/states/DiscussionListState.ts","webpack://@flarum/core/./src/forum/components/DiscussionsUserPage.tsx","webpack://@flarum/core/./src/common/utils/withAttr.ts","webpack://@flarum/core/./src/common/components/Checkbox.tsx","webpack://@flarum/core/./src/common/components/Switch.tsx","webpack://@flarum/core/./src/common/components/FieldSet.js","webpack://@flarum/core/./src/forum/components/NotificationGrid.js","webpack://@flarum/core/./src/forum/components/ChangePasswordModal.tsx","webpack://@flarum/core/./src/forum/components/ChangeEmailModal.tsx","webpack://@flarum/core/./src/forum/components/SettingsPage.tsx","webpack://@flarum/core/./src/forum/components/NotificationsPage.tsx","webpack://@flarum/core/./src/common/resolvers/DefaultResolver.ts","webpack://@flarum/core/./src/forum/resolvers/DiscussionPageResolver.ts","webpack://@flarum/core/./src/common/components/LabelValue.tsx","webpack://@flarum/core/./src/forum/components/AccessTokensList.tsx","webpack://@flarum/core/./src/forum/components/NewAccessTokenModal.tsx","webpack://@flarum/core/./src/forum/states/UserSecurityPageState.ts","webpack://@flarum/core/./src/forum/components/UserSecurityPage.tsx","webpack://@flarum/core/./src/forum/routes.ts","webpack://@flarum/core/./src/forum/utils/alertEmailConfirmation.js","webpack://@flarum/core/../src/index.js","webpack://@flarum/core/../index.js","webpack://@flarum/core/./src/common/utils/focusTrap.ts","webpack://@flarum/core/../../../node_modules/body-scroll-lock/lib/bodyScrollLock.esm.js","webpack://@flarum/core/../source/pluralTypeHandler.js","webpack://@flarum/core/./src/common/components/ModalManager.tsx","webpack://@flarum/core/./src/common/components/AlertManager.tsx","webpack://@flarum/core/./src/common/components/RequestErrorModal.tsx","webpack://@flarum/core/array-utils.js","webpack://@flarum/core/../source/utilities.js","webpack://@flarum/core/../source/selectTypeHandler.js","webpack://@flarum/core/../source/defaultRichHandler.js","webpack://@flarum/core/../source/RichMessageFormatter.js","webpack://@flarum/core/../source/MessageFormatter.js","webpack://@flarum/core/function-utils.js","webpack://@flarum/core/../source/mithrilRichHandler.js","webpack://@flarum/core/./src/common/Translator.tsx","webpack://@flarum/core/./src/common/Store.ts","webpack://@flarum/core/./src/common/Session.ts","webpack://@flarum/core/./src/common/utils/Drawer.js","webpack://@flarum/core/./src/common/utils/mapRoutes.ts","webpack://@flarum/core/./src/common/utils/RequestError.ts","webpack://@flarum/core/./src/common/utils/liveHumanTimes.ts","webpack://@flarum/core/./src/common/extend.ts","webpack://@flarum/core/./src/common/models/Forum.ts","webpack://@flarum/core/./src/common/utils/stringToColor.ts","webpack://@flarum/core/./src/common/models/User.tsx","webpack://@flarum/core/./src/common/models/Post.ts","webpack://@flarum/core/./src/common/models/Notification.ts","webpack://@flarum/core/./src/common/states/ModalManagerState.ts","webpack://@flarum/core/./src/common/states/AlertManagerState.ts","webpack://@flarum/core/./src/common/helpers/fireApplicationError.ts","webpack://@flarum/core/./src/common/models/AccessToken.ts","webpack://@flarum/core/./src/common/Application.tsx","webpack://@flarum/core/./src/common/components/Navigation.tsx","webpack://@flarum/core/./src/forum/states/NotificationListState.ts","webpack://@flarum/core/./src/forum/states/SearchState.ts","webpack://@flarum/core/./src/forum/states/GlobalSearchState.ts","webpack://@flarum/core/./src/forum/utils/isSafariMobile.ts","webpack://@flarum/core/./src/forum/ForumApplication.tsx","webpack://@flarum/core/./src/forum/app.ts","webpack://@flarum/core/./src/common/extenders/Model.ts","webpack://@flarum/core/./src/common/extenders/PostTypes.ts","webpack://@flarum/core/./src/common/extenders/Routes.ts","webpack://@flarum/core/./src/common/extenders/Store.ts","webpack://@flarum/core/./src/common/extenders/index.ts","webpack://@flarum/core/./src/common/utils/evented.js","webpack://@flarum/core/./src/common/utils/styleSelectedText.ts","webpack://@flarum/core/./src/common/utils/proxifyCompat.ts","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js","webpack://@flarum/core/./src/common/components/Select.js","webpack://@flarum/core/./src/common/components/ColorPreviewInput.tsx","webpack://@flarum/core/./src/common/components/TextEditorButton.js","webpack://@flarum/core/./src/common/compat.ts","webpack://@flarum/core/./src/common/utils/mixin.js","webpack://@flarum/core/./src/common/Fragment.ts","webpack://@flarum/core/./src/common/helpers/punctuateSeries.js","webpack://@flarum/core/./src/forum/components/LogInButton.js","webpack://@flarum/core/./src/forum/components/PostPreview.js","webpack://@flarum/core/./src/forum/compat.ts","webpack://@flarum/core/./src/forum/index.ts","webpack://@flarum/flags/webpack/bootstrap","webpack://@flarum/flags/webpack/runtime/compat get default export","webpack://@flarum/flags/webpack/runtime/define property getters","webpack://@flarum/flags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/flags/webpack/runtime/make namespace object","webpack://@flarum/flags/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/flags/./src/forum/states/FlagListState.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/flags/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/flags/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/flags/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/withAttr']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/flags/./src/forum/components/FlagPostModal.js","webpack://@flarum/flags/./src/forum/addFlagControl.js","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/HeaderSecondary']\"","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/NotificationsDropdown']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/flags/./src/forum/components/FlagList.js","webpack://@flarum/flags/./src/forum/components/FlagsDropdown.js","webpack://@flarum/flags/./src/forum/addFlagsDropdown.js","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/Post']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/humanTime']\"","webpack://@flarum/flags/./src/forum/addFlagsToPosts.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/flags/external root \"flarum.core.compat['components/Page']\"","webpack://@flarum/flags/./src/forum/components/FlagsPage.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/flags/./src/forum/models/Flag.ts","webpack://@flarum/flags/./src/forum/extend.ts","webpack://@flarum/flags/./src/forum/compat.js","webpack://@flarum/flags/external assign \"flarum.core\"","webpack://@flarum/flags/./src/forum/index.ts","webpack://@flarum/tags/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/typeof.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/tags/external root \"flarum.core.compat['common/app']\"","webpack://@flarum/tags/./src/common/states/TagListState.ts","webpack://@flarum/tags/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Separator']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/forum/components/TagLinkButton.js","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Page']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/textContrastClass']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/extract']\"","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/utils/sortTags.tsx","webpack://@flarum/tags/./src/forum/components/TagsPage.js","webpack://@flarum/tags/./src/forum/addTagList.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/states/GlobalSearchState']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/tags/./src/forum/components/TagHero.js","webpack://@flarum/tags/./src/forum/addTagFilter.tsx","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionHero']\"","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/./src/forum/addTagLabels.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/tags/./src/forum/utils/getSelectableTags.js","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/KeyboardNavigatable']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/tags/./src/forum/components/ToggleButton.js","webpack://@flarum/tags/./src/common/components/TagSelectionModal.tsx","webpack://@flarum/tags/./src/forum/components/TagDiscussionModal.tsx","webpack://@flarum/tags/./src/forum/addTagControl.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@flarum/tags/./src/forum/addTagComposer.js","webpack://@flarum/tags/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/EventPost']\"","webpack://@flarum/tags/./src/forum/components/DiscussionTaggedPost.js","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/computed']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/tags/./src/common/models/Tag.ts","webpack://@flarum/tags/./src/common/extend.ts","webpack://@flarum/tags/./src/forum/extend.ts","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/./src/forum/compat.js","webpack://@flarum/tags/external assign \"flarum.core\"","webpack://@flarum/tags/./src/forum/index.ts","webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/webpack/runtime/compat get default export","webpack://@flarum/tags/webpack/runtime/define property getters","webpack://@flarum/tags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/tags/webpack/runtime/make namespace object","webpack://@flarum/approval/webpack/bootstrap","webpack://@flarum/approval/webpack/runtime/compat get default export","webpack://@flarum/approval/webpack/runtime/define property getters","webpack://@flarum/approval/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/approval/webpack/runtime/make namespace object","webpack://@flarum/approval/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/approval/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/approval/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/approval/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/approval/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/approval/external root \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@flarum/approval/external root \"flarum.core.compat['forum/components/Post']\"","webpack://@flarum/approval/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@flarum/approval/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/approval/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/approval/./src/forum/index.js","webpack://@flarum/suspend/../../../node_modules/dayjs/dayjs.min.js","webpack://@flarum/suspend/../../../node_modules/dayjs/plugin/utc.js","webpack://@flarum/suspend/webpack/bootstrap","webpack://@flarum/suspend/webpack/runtime/compat get default export","webpack://@flarum/suspend/webpack/runtime/define property getters","webpack://@flarum/suspend/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/suspend/webpack/runtime/make namespace object","webpack://@flarum/suspend/external root \"flarum.core.compat['extend']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['app']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['utils/UserControls']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['components/Button']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['components/Badge']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['models/User']\"","webpack://@flarum/suspend/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/suspend/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/suspend/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['components/Modal']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['utils/Stream']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['utils/withAttr']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/suspend/./src/forum/helpers/suspensionHelper.ts","webpack://@flarum/suspend/./src/forum/components/SuspendUserModal.js","webpack://@flarum/suspend/external root \"flarum.core.compat['components/Notification']\"","webpack://@flarum/suspend/./src/forum/components/UserSuspendedNotification.js","webpack://@flarum/suspend/./src/forum/components/UserUnsuspendedNotification.js","webpack://@flarum/suspend/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['common/helpers/fullTime']\"","webpack://@flarum/suspend/./src/forum/components/SuspensionInfoModal.js","webpack://@flarum/suspend/./src/forum/checkForSuspension.js","webpack://@flarum/suspend/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['common/models/User']\"","webpack://@flarum/suspend/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/suspend/./src/forum/extend.ts","webpack://@flarum/suspend/./src/forum/compat.js","webpack://@flarum/suspend/external assign \"flarum.core\"","webpack://@flarum/suspend/./src/forum/index.js","webpack://@justoverclock/edit-posts/webpack/bootstrap","webpack://@justoverclock/edit-posts/external \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@justoverclock/edit-posts/external \"flarum.core.compat['forum/app']\"","webpack://@justoverclock/edit-posts/external \"flarum.core.compat['common/extend']\"","webpack://@justoverclock/edit-posts/external \"flarum.core.compat['common/components/Button']\"","webpack://@justoverclock/edit-posts/external \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@justoverclock/edit-posts/./src/forum/index.js","webpack://@ianm/syndication/webpack/bootstrap","webpack://@ianm/syndication/webpack/runtime/compat get default export","webpack://@ianm/syndication/webpack/runtime/define property getters","webpack://@ianm/syndication/webpack/runtime/hasOwnProperty shorthand","webpack://@ianm/syndication/webpack/runtime/make namespace object","webpack://@ianm/syndication/external root \"flarum.core.compat['forum/app']\"","webpack://@ianm/syndication/external root \"flarum.core.compat['common/extend']\"","webpack://@ianm/syndication/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@ianm/syndication/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@ianm/syndication/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@ianm/syndication/external root \"flarum.core.compat['forum/components/UserPage']\"","webpack://@ianm/syndication/./src/forum/index.ts","webpack://@ianm/syndication/./src/forum/addFeedIcons.tsx","webpack://@fof/pages/webpack/bootstrap","webpack://@fof/pages/webpack/runtime/compat get default export","webpack://@fof/pages/webpack/runtime/define property getters","webpack://@fof/pages/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/pages/webpack/runtime/make namespace object","webpack://@fof/pages/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/pages/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/pages/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/components/Page']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/app']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/components/Link']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@fof/pages/./src/forum/components/PageHero.js","webpack://@fof/pages/./src/forum/components/PagePage.js","webpack://@fof/pages/./src/forum/components/HomePage.js","webpack://@fof/pages/external root \"flarum.core.compat['app']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/utils/computed']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/utils/string']\"","webpack://@fof/pages/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/pages/./src/common/models/Page.js","webpack://@fof/pages/./src/forum/index.js","webpack://@fof/links/webpack/bootstrap","webpack://@fof/links/webpack/runtime/compat get default export","webpack://@fof/links/webpack/runtime/define property getters","webpack://@fof/links/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/links/webpack/runtime/make namespace object","webpack://@fof/links/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/links/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/links/external root \"flarum.core.compat['forum/components/HeaderPrimary']\"","webpack://@fof/links/./src/common/utils/sortLinks.js","webpack://@fof/links/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@fof/links/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@fof/links/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@fof/links/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@fof/links/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/links/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/links/external root \"flarum.core.compat['common/components/Link']\"","webpack://@fof/links/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@fof/links/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/links/external root \"flarum.core.compat['common/components/Separator']\"","webpack://@fof/links/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/links/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/links/./src/forum/components/LinkItem.tsx","webpack://@fof/links/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/links/external root \"flarum.core.compat['common/components/SplitDropdown']\"","webpack://@fof/links/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/links/./src/forum/components/LinkDropdown.js","webpack://@fof/links/./src/forum/components/index.ts","webpack://@fof/links/./src/common/utils/index.ts","webpack://@fof/links/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/links/./src/common/models/Link.ts","webpack://@fof/links/./src/common/models/index.ts","webpack://@fof/links/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/links/./src/common/extend.ts","webpack://@fof/links/./src/forum/extend.ts","webpack://@fof/links/./src/forum/index.ts","webpack://@fof/links/./src/forum/extendHeader.tsx","webpack://@fof/anti-spam/webpack/bootstrap","webpack://@fof/anti-spam/webpack/runtime/compat get default export","webpack://@fof/anti-spam/webpack/runtime/define property getters","webpack://@fof/anti-spam/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/anti-spam/webpack/runtime/make namespace object","webpack://@fof/anti-spam/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/anti-spam/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/anti-spam/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/anti-spam/external root \"flarum.core.compat['forum/utils/UserControls']\"","webpack://@fof/anti-spam/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/anti-spam/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/anti-spam/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/anti-spam/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@fof/anti-spam/./src/forum/components/HandleSpammerModal.tsx","webpack://@fof/anti-spam/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/anti-spam/external root \"flarum.core.compat['common/models/User']\"","webpack://@fof/anti-spam/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/anti-spam/./src/common/models/BlockedRegistration.tsx","webpack://@fof/anti-spam/./src/common/extend.ts","webpack://@fof/anti-spam/./src/forum/extend.ts","webpack://@fof/anti-spam/./src/forum/index.ts","webpack://@fof/anti-spam/./src/forum/extenders/addSpamblockControls.tsx","webpack://@flarum/subscriptions/webpack/bootstrap","webpack://@flarum/subscriptions/webpack/runtime/compat get default export","webpack://@flarum/subscriptions/webpack/runtime/define property getters","webpack://@flarum/subscriptions/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/subscriptions/webpack/runtime/make namespace object","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/subscriptions/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/subscriptions/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/subscriptions/./src/forum/components/SubscriptionMenuItem.js","webpack://@flarum/subscriptions/./src/forum/components/SubscriptionMenu.js","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/states/GlobalSearchState']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/SettingsPage']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@flarum/subscriptions/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@flarum/subscriptions/./src/forum/components/NewPostNotification.js","webpack://@flarum/subscriptions/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/subscriptions/./src/forum/extend.ts","webpack://@flarum/subscriptions/./src/forum/compat.ts","webpack://@flarum/subscriptions/external assign \"flarum.core\"","webpack://@flarum/subscriptions/./src/forum/index.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionBadge.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionControls.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionFilter.js","webpack://@flarum/subscriptions/./src/forum/addSubscriptionSettings.tsx","webpack://@flarum/sticky/webpack/bootstrap","webpack://@flarum/sticky/webpack/runtime/compat get default export","webpack://@flarum/sticky/webpack/runtime/define property getters","webpack://@flarum/sticky/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/sticky/webpack/runtime/make namespace object","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/utils/string']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/sticky/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/sticky/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/sticky/external root \"flarum.core.compat['forum/components/EventPost']\"","webpack://@flarum/sticky/./src/forum/components/DiscussionStickiedPost.js","webpack://@flarum/sticky/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/sticky/./src/forum/extend.ts","webpack://@flarum/sticky/./src/forum/compat.ts","webpack://@flarum/sticky/external assign \"flarum.core\"","webpack://@flarum/sticky/./src/forum/index.js","webpack://@flarum/sticky/./src/forum/addStickyBadge.js","webpack://@flarum/sticky/./src/forum/addStickyControl.js","webpack://@flarum/sticky/./src/forum/addStickyExcerpt.js","webpack://@flarum/sticky/./src/forum/addStickyClass.js","webpack://@flarum/markdown/webpack/bootstrap","webpack://@flarum/markdown/webpack/runtime/compat get default export","webpack://@flarum/markdown/webpack/runtime/define property getters","webpack://@flarum/markdown/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/markdown/webpack/runtime/make namespace object","webpack://@flarum/markdown/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/app']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/BasicEditorDriver']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/styleSelectedText']\"","webpack://@flarum/markdown/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/markdown/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/markdown/./src/common/components/MarkdownToolbar.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/markdown/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@flarum/markdown/./src/common/components/MarkdownButton.js","webpack://@flarum/markdown/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/markdown/./src/common/index.js","webpack://@flarum/markdown/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/markdown/./src/common/compat.ts","webpack://@flarum/markdown/./src/forum/compat.ts","webpack://@flarum/markdown/external assign \"flarum.core\"","webpack://@flarum/markdown/./src/forum/index.js","webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@flarum/lock/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/lock/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedNotification.js","webpack://@flarum/lock/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/lock/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/lock/external root \"flarum.core.compat['forum/components/EventPost']\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedPost.js","webpack://@flarum/lock/./src/forum/extend.ts","webpack://@flarum/lock/./src/forum/compat.ts","webpack://@flarum/lock/external assign \"flarum.core\"","webpack://@flarum/lock/./src/forum/index.js","webpack://@flarum/lock/./src/forum/addLockBadge.js","webpack://@flarum/lock/./src/forum/addLockControl.js","webpack://@flarum/akismet/webpack/bootstrap","webpack://@flarum/akismet/webpack/runtime/compat get default export","webpack://@flarum/akismet/webpack/runtime/define property getters","webpack://@flarum/akismet/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/akismet/webpack/runtime/make namespace object","webpack://@flarum/akismet/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/components/Post']\"","webpack://@flarum/akismet/./src/forum/index.ts","webpack://@clarkwinkelmann/shadow-ban/webpack/bootstrap","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['forum/app']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['common/components/Button']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['common/extend']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['common/components/Badge']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['common/models/Discussion']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['common/models/User']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['forum/utils/UserControls']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['common/components/Modal']\"","webpack://@clarkwinkelmann/shadow-ban/external \"flarum.core.compat['common/utils/withAttr']\"","webpack://@clarkwinkelmann/shadow-ban/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@clarkwinkelmann/shadow-ban/./src/forum/components/BanUserModal.ts","webpack://@clarkwinkelmann/shadow-ban/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@clarkwinkelmann/shadow-ban/./src/forum/index.ts","webpack://@clarkwinkelmann/composer-page/webpack/bootstrap","webpack://@clarkwinkelmann/composer-page/webpack/runtime/compat get default export","webpack://@clarkwinkelmann/composer-page/webpack/runtime/define property getters","webpack://@clarkwinkelmann/composer-page/webpack/runtime/hasOwnProperty shorthand","webpack://@clarkwinkelmann/composer-page/webpack/runtime/make namespace object","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['common/extend']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['forum/app']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['common/components/Button']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['forum/components/Composer']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['forum/states/ComposerState']\"","webpack://@clarkwinkelmann/composer-page/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@clarkwinkelmann/composer-page/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['common/components/Page']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@clarkwinkelmann/composer-page/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@clarkwinkelmann/composer-page/./src/forum/components/ComposerPage.ts","webpack://@clarkwinkelmann/composer-page/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@clarkwinkelmann/composer-page/./src/forum/index.ts","webpack://@askvortsov/flarum-categories/webpack/bootstrap","webpack://@askvortsov/flarum-categories/webpack/runtime/compat get default export","webpack://@askvortsov/flarum-categories/webpack/runtime/define property getters","webpack://@askvortsov/flarum-categories/webpack/runtime/hasOwnProperty shorthand","webpack://@askvortsov/flarum-categories/webpack/runtime/make namespace object","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/extend']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/Model']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/models/Tag']\"","webpack://@askvortsov/flarum-categories/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@askvortsov/flarum-categories/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['forum/app']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/Page']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/utils/sortTags']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/helpers/tagLabel']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/Component']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/Link']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@askvortsov/flarum-categories/./src/forum/components/StatWidget.tsx","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/string']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['forum/components/UserCard']\"","webpack://@askvortsov/flarum-categories/./src/forum/components/LastDiscussionWidget.tsx","webpack://@askvortsov/flarum-categories/./src/forum/components/Category.tsx","webpack://@askvortsov/flarum-categories/./src/forum/components/CategoriesPage.tsx","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/forum/components/TagsPage']\"","webpack://@askvortsov/flarum-categories/./src/forum/index.js"],"names":["___EXPOSE_LOADER_IMPORT___","___EXPOSE_LOADER_GLOBAL_THIS___","module","exports","globalThis","g","this","Function","e","window","self","global","setPrototypeOf","require","t","TypeError","prototype","Object","create","constructor","value","writable","configurable","defineProperty","__esModule","$","Affix","element","options","extend","DEFAULTS","target","document","find","$target","on","proxy","checkPosition","checkPositionWithEventLoop","$element","affixed","unpin","pinnedOffset","Plugin","option","each","$this","data","VERSION","RESET","offset","getState","scrollHeight","height","offsetTop","offsetBottom","scrollTop","position","targetHeight","top","initializing","colliderTop","getPinnedOffset","removeClass","addClass","setTimeout","is","bottom","Math","max","body","affix","css","affixType","Event","trigger","isDefaultPrevented","replace","old","fn","Constructor","noConflict","$spy","call","jQuery","parsePathname","template","templateData","templateKeys","keys","params","regexp","RegExp","path","m","key","extra","push","k","r","i","length","test","values","exec","decodeURIComponent","_setPrototypeOf","bind","__proto__","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","Vnode","html","undefined","a","n","o","future","past","s","mm","h","hh","d","dd","M","MM","y","yy","fromToBase","en","relativeTime","u","f","l","$locale","thresholds","c","diff","p","rounding","round","abs","v","to","from","$u","utc","toNow","fromNow","children","attrs","arguments","start","tag","Array","isArray","_typeof","Symbol","toPrimitive","String","Number","iterator","next","done","emulateTransitionEnd","duration","called","$el","one","support","transition","end","el","createElement","transEndEventNames","WebkitTransition","MozTransition","OTransition","name","style","transitionEnd","event","special","bsTransitionEnd","bindType","delegateType","handle","handleObj","handler","apply","object","toString","args","destructure","join","encodeURIComponent","PromisePolyfill","Promise","Stream","SKIP","lift","merge","slice","map","streams","scan","acc","origin","stream","combine","scanMerge","tuples","seed","tuple","changed","forEach","indexOf","warnedHalt","dependentStreams","dependentFns","open","_changing","_state","_parents","_map","ignoreInitial","toJSON","x","s1","s2","_unregisterChild","child","childIndex","splice","get","ready","every","Error","concat","mappers","endStream","mapper","console","log","runtime","regeneratorRuntime","accidentalStrictMode","buildPathname","$window","oncompletion","callbackCount","PromiseProxy","executor","makeRequest","factory","url","promise","resolve","reject","type","background","count","complete","wrap","then","hasHeader","headers","hasOwnProperty","request","replacedAbort","method","toUpperCase","assumeJSON","serialize","JSON","FormData","responseType","extract","xhr","XMLHttpRequest","aborted","original","abort","async","user","password","setRequestHeader","deserialize","withCredentials","timeout","onreadystatechange","ev","readyState","message","success","status","response","parse","responseText","error","code","config","send","stringify","jsonp","callbackName","random","script","parentNode","removeChild","onerror","src","callbackKey","documentElement","appendChild","_regeneratorRuntime","asyncIterator","toStringTag","define","enumerable","Generator","Context","makeInvokeMethod","tryCatch","arg","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","mark","awrap","reverse","pop","prev","charAt","stop","rval","finish","delegateYield","weekdays","split","months","ordinal","z","utcOffset","floor","date","year","month","clone","add","ceil","w","D","ms","Q","toLowerCase","S","_","O","b","locale","$L","$x","$offset","$d","Date","NaN","match","substring","UTC","init","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","weekStart","$set","min","daysInMonth","subtract","format","invalidDate","meridiem","monthsShort","weekdaysMin","weekdaysShort","getTimezoneOffset","toISOString","toUTCString","$i","isDayjs","Ls","DISALLOWED_ATTRIBUTES","uriAttrs","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","attr","allowedAttributeList","attrName","nodeName","inArray","Boolean","nodeValue","regExp","filter","index","sanitizeHtml","unsafeHtml","whiteList","sanitizeFn","implementation","createHTMLDocument","createdDocument","innerHTML","whitelistKeys","elements","len","elName","attributeList","attributes","whitelistedAttributes","j","len2","removeAttribute","Tooltip","enabled","hoverState","inState","TRANSITION_DURATION","animation","placement","selector","title","delay","container","viewport","padding","sanitize","area","br","col","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","pre","small","span","sub","sup","strong","ul","getOptions","$viewport","isFunction","click","hover","focus","triggers","toggle","eventIn","eventOut","enter","leave","_options","fixTitle","getDefaults","dataAttributes","dataAttr","show","hide","getDelegateOptions","defaults","obj","currentTarget","tip","hasClass","clearTimeout","isInStateTrue","hasContent","inDom","contains","ownerDocument","that","$tip","tipId","getUID","setContent","autoToken","autoPlace","detach","left","display","appendTo","insertAfter","pos","getPosition","actualWidth","offsetWidth","actualHeight","offsetHeight","orgPlacement","viewportDim","right","width","calculatedOffset","getCalculatedOffset","applyPlacement","prevHoverState","marginTop","parseInt","marginLeft","setOffset","using","props","delta","getViewportAdjustedDelta","isVertical","arrowDelta","arrowOffsetPosition","replaceArrow","dimension","arrow","getTitle","text","callback","removeAttr","$e","isBody","tagName","elRect","getBoundingClientRect","isSvg","SVGElement","elOffset","scroll","outerDims","viewportPadding","viewportDimensions","topEdgeOffset","bottomEdgeOffset","leftEdgeOffset","rightEdgeOffset","prefix","getElementById","$arrow","enable","disable","toggleEnabled","destroy","off","removeData","tooltip","Dropdown","getParent","$parent","parent","clearMenus","which","remove","relatedTarget","isActive","closest","toggleClass","keydown","preventDefault","stopPropagation","$items","eq","dropdown","hyperscript","trust","fragment","render","requestAnimationFrame","assign","source","parseQueryString","queryIndex","hashIndex","queryEnd","pathEnd","mountRedraw","dom","domSize","state","events","instance","normalize","node","normalizeChildren","input","isKeyed","CanvasImage","canvas","context","getContext","drawImage","clear","clearRect","update","putImageData","getPixelCount","getImageData","removeCanvas","ColorThief","getColor","getPalette","MMCQ","quantize","palette","pv","naturalOrder","sum","reduce","sort","peek","size","debug","r1","r2","g1","g2","b1","b2","histo","vboxes","vbox","volume","copy","_volume","_count_set","_count","avg","_avg","gval","bval","color","nearest","sqrt","pow","forcebw","properties","isBrowser","isFirefox","mozInnerScreenX","getCaretCoordinates","querySelector","id","computed","getComputedStyle","currentStyle","isInput","whiteSpace","wordWrap","visibility","prop","lineHeight","overflowY","overflow","textContent","coordinates","offsetLeft","backgroundColor","currentRedraw","$doc","nameSpace","svg","math","getNameSpace","vnode","xmlns","checkState","callHook","activeElement","createNodes","vnodes","hooks","nextSibling","ns","createNode","initLifecycle","createTextNode","insertNode","createText","createHTML","createDocumentFragment","firstChild","childNodes","createFragment","createElementNS","setAttr","setAttrs","maybeSetContentEditable","selectedIndex","normalized","setLateSelectAttrs","sentinel","view","$$reentrantLock$$","initComponent","createComponent","possibleParents","caption","thead","tbody","tfoot","tr","th","td","colgroup","temp","updateNodes","removeNodes","isOldKeyed","oldStart","oe","ve","topSibling","oldEnd","updateNode","getNextSibling","moveNodes","lisIndices","originalNextSibling","vnodesLength","oldIndices","matched","getKeyMap","oldIndex","result","il","lisTemp","makeLisIndices","commonLength","removeNode","oldTag","force","onbeforeupdate","shouldNotUpdate","updateLifecycle","updateText","removeHTML","updateHTML","updateFragment","val","updateAttrs","updateElement","updateComponent","frag","moveChildToFrag","insertBefore","contenteditable","contentEditable","content","stateResult","attrsResult","mask","onbeforeremove","reallyRemove","onremove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","setAttribute","nsLastIndex","uppercaseRegex","capital","normalizeKey","cssText","setProperty","removeProperty","EventDict","removeEventListener","addEventListener","oninit","oncreate","onupdate","handleEvent","redraw","active","namespace","namespaceURI","prevRedraw","string","entries","counters","entry","levels","cursor","level","nextLevel","isNumber","desc","getOwnPropertyDescriptor","schedule","subscriptions","rendering","pending","sync","mount","root","component","ReferenceError","noGlobal","arr","getProto","flat","array","class2type","hasOwn","fnToString","ObjectFunctionString","nodeType","item","isWindow","preservedScriptAttributes","nonce","noModule","DOMEval","doc","getAttribute","head","toType","version","rhtmlSuffix","isArrayLike","elem","jquery","toArray","num","pushStack","elems","ret","prevObject","first","last","even","grep","_elem","odd","copyIsArray","deep","isPlainObject","expando","isReady","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","isXMLDoc","docElem","second","invert","matches","callbackExpect","guid","_i","whitespace","rtrimCSS","bup","compareDocumentPosition","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","escapeSelector","sel","preferredDoc","pushNative","Expr","outermostContext","sortInput","hasDuplicate","documentIsHTML","rbuggyQSA","dirruns","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","booleans","identifier","pseudos","rwhitespace","rcomma","rleadingCombinator","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","fromCharCode","unloadHandler","setDocument","inDisabledFieldset","addCombinator","disabled","dir","els","nid","groups","newSelector","newContext","getElementsByTagName","getElementsByClassName","testContext","scope","tokenize","toSelector","querySelectorAll","qsaError","select","cache","cacheLength","shift","markFunction","assert","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","subWindow","webkitMatchesSelector","msMatchesSelector","defaultView","getById","getElementsByName","disconnectedMatch","cssHas","attrId","getAttributeNode","className","compare","sortDetached","expr","matchesSelector","attrHandle","uniqueSort","duplicates","sortStable","createPseudo","relative","preFilter","excess","unquoted","nodeNameSelector","expectedNodeName","pattern","operator","check","what","_argument","simple","forward","ofType","_context","xml","outerCache","nodeIndex","useCache","lastChild","pseudo","setFilters","idx","not","matcher","compile","unmatched","has","lang","elemLang","hash","location","err","safeActiveElement","hasFocus","href","tabIndex","checked","selected","empty","header","button","_matchIndexes","lt","gt","nth","radio","checkbox","file","image","submit","parseOnly","tokens","soFar","preFilters","cached","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","matcherOut","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","setMatchers","elementMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","matcherFromGroupMatchers","token","compiled","filters","unique","getText","isXML","selectors","until","truncate","siblings","rneedsContext","rsingleTag","winnow","qualifier","rootjQuery","parseHTML","rparentsprev","guaranteedUnique","contents","sibling","cur","targets","prevAll","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","rnothtmlwhite","Identity","Thrower","ex","adoptValue","noValue","fail","Callbacks","flag","createOptions","firing","memory","fired","locked","list","queue","firingIndex","fire","once","stopOnFalse","lock","fireWith","Deferred","func","always","deferred","pipe","fns","newDefer","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","mightThrow","notifyWith","resolveWith","process","exceptionHook","rejectWith","getErrorHook","getStackHook","stateString","when","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","asyncError","warn","stack","readyException","readyList","completed","readyWait","wait","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","acceptData","owner","Data","uid","hasData","dataPriv","dataUser","rbrace","rmultiDash","getData","_data","_removeData","dequeue","startLength","_queueHooks","unshift","setter","clearQueue","tmp","defer","pnum","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","getDefaultDisplay","showHide","rcheckableType","rtagName","rscriptType","checkClone","cloneNode","noCloneChecked","defaultValue","wrapMap","_default","getAll","setGlobalEval","refElements","optgroup","rhtml","buildFragment","scripts","selection","ignored","attached","nodes","htmlPrefilter","rtypenamespace","returnTrue","returnFalse","types","origFn","leverageNative","isSetup","saved","isTrigger","stopImmediatePropagation","isImmediatePropagationStopped","handleObjIn","eventHandle","handlers","namespaces","origType","elemData","triggered","dispatch","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","originalEvent","load","noBubble","beforeunload","returnValue","defaultPrevented","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","blur","focusMappedHandler","documentMode","simulate","attaches","dataHolder","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","fixInput","domManip","collection","hasScripts","iNoClone","valueIsFunction","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","append","prepend","before","after","replaceWith","replaceChild","prependTo","replaceAll","insert","rnumnonpx","rcustomProp","getStyles","opener","swap","rboxStyle","curCSS","minWidth","maxWidth","isCustomProp","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","pixelBoxStylesVal","boxSizingReliableVal","scrollboxSizeVal","measure","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","borderTopWidth","borderBottomWidth","cssPrefixes","emptyStyle","vendorProps","finalPropName","cssProps","capName","vendorPropName","rdisplayswap","cssShow","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","boxModelAdjustment","box","isBorderBox","styles","computedVal","marginDelta","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","aspectRatio","borderImageSlice","columnCount","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","order","orphans","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeMiterlimit","strokeOpacity","origName","isFinite","scrollboxSizeBuggy","margin","border","suffix","expand","expanded","parts","propHooks","run","percent","eased","step","fx","scrollLeft","linear","swing","cos","PI","fxNow","inProgress","rfxtypes","rrun","hidden","interval","tick","createFxNow","genFx","includeWidth","createTween","Animation","tweeners","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","timer","anim","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflowX","prefilter","speed","opt","speeds","fadeTo","animate","optall","doAnimation","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","time","checkOn","optSelected","radioValue","boolHook","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","classNames","curValue","finalValue","stateVal","isValidValue","rreturn","valHooks","optionSet","rquery","parseXML","parserErrorElem","DOMParser","parseFromString","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","triggerHandler","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","valueOrFunction","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","lastModified","etag","isLocal","protocol","processData","contentType","accepts","json","responseFields","converters","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","overrideMimeType","mimeType","statusText","finalText","crossDomain","host","ifModified","beforeSend","nativeStatusText","responses","isSuccess","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","ajaxConvert","getJSON","getScript","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","xhrSuccessStatus","xhrSupported","cors","errorCallback","username","xhrFields","onload","onabort","ontimeout","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonpCallback","originalSettings","overwritten","responseContainer","jsonProp","keepScripts","parsed","animated","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","unbind","undelegate","fnOver","fnOut","rtrim","holdReady","hold","parseJSON","isNumeric","trim","_jQuery","_$","buildQueryString","SyntaxError","query","resolved","variadic","newQueryIndex","newHashIndex","newQueryEnd","newPathEnd","querystring","arrayLikeToArray","keyHandler","origHandler","hotkeys","filterInputAcceptingElements","textInputTypes","filterContentEditable","filterTextInputs","textAcceptingInputTypes","specialKeys","character","modif","possible","specialKey","shiftNums","toPropertyKey","_defineProperties","compileTemplate","fireAsync","setPath","history","replaceState","route","pushState","currentPath","lastUpdate","currentResolver","defaultRoute","routes","callAsync","setImmediate","scheduled","defaultData","some","resolveRoute","search","pathname","loop","payload","matchedRoute","localComp","comp","onmatch","Link","onclick","assertThisInitialized","_createForOfIteratorHelperLoose","_arrayLikeToArray","_unsupportedIterableToArray","maxInt","regexPunycode","regexNonASCII","regexSeparators","errors","stringFromCharCode","RangeError","mapDomain","domain","encoded","ucs2decode","output","counter","ucs2encode","codePoints","fromCodePoint","digitToBasic","digit","adapt","numPoints","firstTime","baseMinusTMin","decode","codePoint","inputLength","bias","basic","lastIndexOf","oldi","baseMinusT","out","encode","_step","_iterator","basicLength","handledCPCount","_step2","_iterator2","handledCPCountPlusOne","_step3","_iterator3","q","qMinusT","toUnicode","toASCII","hyperscriptVnode","LTS","LT","L","LL","LLL","LLLL","formats","resolvers","rejectors","resolveCurrent","rejectCurrent","_instance","shouldAbsorb","execute","retry","executeOnce","runs","onRejection","resolveNext","rejectNext","reason","all","total","consume","race","selectorParser","selectorCache","isEmpty","newAttrs","execSelector","classes","attrValue","compileSelector","_getPrototypeOf","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","bidi","multi","onchange","selectedOptions","oninput","ctrl","patchMithril","defaultMithril","modifiedMithril","_len","Proxy","Reflect","app","dayjs","localizedFormat","tooltipGen","_inheritsLoose","_extends","setRouteWithForcedRefresh","newOptions","caller","includes","History","_proto","getCurrent","getPrevious","secondTop","canGoBack","back","home","backUrl","Pane","pinnedKey","pinned","localStorage","getItem","showing","hideTimeout","onmouseleave","togglePinned","setItem","Component","componentAttrs","initAttrs","subclassOf","A","B","PageState","_this","Page","_Component","bodyClass","scrollTopOnCreate","useBrowserScrollRestoration","previous","routeName","drawer","modal","close","scrollRestoration","_createClass","isObject","Item","priority","ItemList","_items","getPriority","setPriority","otherList","keepPrimitives","_this2","createItemContentProxy","toObject","_this3","itemName","property","receiver","Separator","isListItem","isVnode","isSeparator","listItems","rawItems","customTag","items","prevItem","newItems","Tag","_item$attrs2","_item$attrs","itemClassName","classList","DiscussionHero","discussion","badges","_objectWithoutPropertiesLoose","_vnode$attrs","_vnode$attrs$options","_excluded","external","avatar","_attrs","loading","hasTitle","avatarUrl","alt","slug","mode","SluggingMode","ALPHANUMERIC","UTF8","getPlainContent","removeSelectors","innerText","ucfirst","substr","camelCaseToSnakeCase","str","generateRandomString","Uint8Array","crypto","getRandomValues","dec","padStart","highlight","phrase","highlighted","icon","fontClass","extractText","vdom","humanTime","translator","trans","abbreviateNumber","number","toFixed","buttonClassName","menuClassName","label","caretIcon","accessibleToggleLabel","renderItems","lazyDraw","getButton","getMenu","_$menu$offset$top","_$menu$offset","_$menu$height","_$$scrollTop","_$$height","_$menu$offset2","_$menu$offset$left","_$menu$offset3","_$menu$width","_$$scrollLeft","_$$width","_this2$attrs","onshow","$menu","isRight","windowSrollTop","windowHeight","windowScrollLeft","windowWidth","onhide","getButtonContent","datetime","full","ago","humanTimeUtil","pubdate","TerminalPost","lastPost","replyCount","SubtreeRetainer","callbacks","needsRebuild","_len2","_key2","invalidate","LoadingIndicator","_this$attrs","_this$attrs$display","_this$attrs$size","containerClassName","completeClassName","completeContainerClassName","role","containerAttrs","ConfirmDocumentUnload","boundHandler","'['","fireDebugWarning","_console","forum","attribute","fireDeprecationWarning","githubId","removedFrom","repo","Button","ariaLabel","iconName","_class","buttonAttrs","hasIcon","_this$element","canInsertText","insertText","textarea","_ref","selectionStart","selectionEnd","originalSelectionStart","execCommand","endsWith","dispatchEvent","CustomEvent","setSelectionRange","BasicEditorDriver","build","placeholder","callInputListeners","inputListeners","listener","onkeyup","keyHandlers","onsubmit","moveCursorTo","getSelectionRange","getLastNChars","insertAtCursor","insertAt","insertBetween","cursorPos","replaceBeforeCursor","relCoords","childDomNode","oldText","oldVisibility","shouldRecreateTooltip","shouldChangeTooltipVisibility","tooltipVisible","_this$attrs$ignoreTit","showOnFocus","ignoreTitleWarning","realText","getRealText","checkDomNodeChanged","recreateTooltip","createTooltip","updateVisibility","_this$attrs2","_this$attrs2$showOnFo","_this$attrs2$position","_this$attrs2$html","domNode","isSameNode","TextEditor","controlItems","toolbarItems","composer","editor","buildEditor","newDisabled","buildEditorParams","submitLabel","preview","ComposerBody","confirmExit","preventClosingWhen","hasChanges","fields","originalContent","_this$jumpToPreview","headerItems","jumpToPreview","loaded","minimizeComposerIfFullScreen","isFullScreen","minimize","ReplyComposer","_ComposerBody","relationships","store","createRecord","save","post","viewingDiscussion","goToNumber","alert","viewButton","alerts","dismiss","controls","Alert","dismissible","ondismiss","dismissControl","iconHelper","Modal","alertAttrs","missingMethods","animateShow","onready","_this4","dismissibleOptions","viaCloseButton","animateHide","_error$response","pointer","isDismissible","isDismissibleViaCloseButton","viaEscKey","isDismissibleViaEscKey","viaBackdropClick","isDismissibleViaBackdropClick","ForgotPasswordModal","_Modal","email","emailLabel","requestParams","errorHandler","LogInButtons","SignUpModal","footer","isProvided","field","_this$attrs$provided$","_this$attrs$provided","provided","usernameLabel","passwordLabel","autocomplete","logIn","identification","LogInModal","submitData","reload","authData","remember","identificationLabel","forgotPassword","signUp","session","login","loginParams","RenameDiscussionModal","currentTitle","newTitle","section","userControls","DiscussionPage","canReply","replyAction","moderationControls","canRename","renameAction","destructiveControls","isHidden","canHide","restoreAction","canDelete","deleteAction","hideAction","goToLast","forceRefresh","composingReplyTo","pushData","hiddenAt","hiddenUser","confirm","discussions","removeDiscussion","slidable","$underneathLeft","$underneathRight","startX","startY","couldBeSliding","isSliding","animatePos","newPos","newX","newY","$underneath","side","activate","specialChars","escapeRegExp","DiscussionListItem","subtree","highlightRegExp","freshness","markedAllAsReadAt","elementAttrs","Slidable","viewItems","DiscussionControls","controlsView","slidableUnderneathView","contentView","isUnread","markAsRead","isRead","unread","read","contentItems","authorAvatarView","badgesView","mainView","replyCountItem","createdAt","jumpTo","getJumpTo","mainItems","infoItems","mostRelevantPost","_discussion$lastPostN","lastPostNumber","lastReadPostNumber","slidableInstance","showFirstPost","_this$attrs$params$so","showRepliesCount","firstPost","_post$contentPlain","excerpt","contentPlain","unreadCount","Placeholder","DiscussionList","getParams","isLoading","isInitialLoading","isLoadingNext","hasNext","loadNext","pageSize","isSearchResults","getPages","pg","pageNum","itemNum","hotEdge","pane","DiscussionListPane","hasItems","enoughSpace","$list","discussionListPaneScrollTop","$discussion","listTop","listBottom","outerHeight","discussionTop","discussionBottom","ScrollListener","ticking","passive","LoadingPost","ComposerPostPreview","surround","updatePreview","isVisible","s9e","TextFormatter","updateInterval","setInterval","clearInterval","ReplyPlaceholder","anchorPreview","anchorToBottom","PostStream","scrollListener","onscroll","lastTime","viewingEnd","posts","postIds","postFadeIn","visibleStart","PostComponent","postComponents","dt","period","PostLoading","postStreamElement","afterFirstPostItems","visibleEnd","endItems","pagesLoading","triggerScroll","calculatePositionTimeout","needsScroll","targetPost","scrollToNumber","animateScroll","scrollToIndex","reply","paused","updateScrubber","loadPostsIfNeeded","calculatePosition","getMarginTop","viewportHeight","viewportTop","$item","loadPrevious","indexFromViewPort","visibleTop","visiblePost","description","startNumber","endNumber","onPositionChange","headerId","screen","scrollToItem","flashItem","$container","itemTop","itemBottom","scrollBottom","computedHeight","updateScrubberHeight","forceUpdateScrubber","loadPromise","itemOffset","$placeholder","formatNumber","Intl","NumberFormat","PostStreamScrubber","updateScrubberValues","fromScroll","forceHeightChange","viewing","formattedCount","unreadPercent","styleUnread","newStyle","oldStyle","goToFirst","firstPostLabel","unreadLabel","lastPostLabel","onresize","resize","dragging","mouseStart","indexStart","onmousedown","onmousemove","onmouseup","percentPerPost","$scrubber","sanitizeIndex","heights","adjustingHeight","animationPromises","part","$part","scrubber","scrollbar","deltaIndex","newIndex","intIndex","goToIndex","$scrollbar","offsetPercent","offsetIndex","minPercentVisible","percentPerVisiblePost","SplitDropdown","_Dropdown","getFirstChild","throttle","noTrailing","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","wrapper","arguments_","elapsed","cancel","debounce","atBegin","anchorScroll","relativeScroll","PostStreamState","includedPosts","loadPageTimeouts","_loadNext","_loadPrevious","loadRange","noAnimation","resultPromise","loadNearNumber","loadNearIndex","page","near","loadCount","twoPagesAway","loadPage","backwards","loadIds","canEdit","newPosts","_posts$0$id","_Page","_app$pane","_app$pane2","_app$pane3","_app$composer","pageContent","loadingItems","sidebar","sidebarItems","hero","mainContent","positionChanged","preloadedDiscussion","preloadedApiDocument","bySlug","_includedPosts$0$numb","_includedPosts$","setTitle","setTitleCount","included","discussionId","record","rawNearParam","nearParam","HeaderPrimary","LinkButton","_Button","_m$route$get","_attrs$href","SessionDropdown","logout","SelectDropdown","activeChild","defaultLabel","Model","exists","_this$data","_this$data2","getIdentifier","_this$data$relationsh","relationship","pushAttributes","model","oldData","copyData","meta","apiEndpoint","pushPayload","rawRelationship","_this$data$relationsh2","transform","hasOne","_this$data$relationsh3","relationshipData","hasMany","_this$data$relationsh4","transformDate","computedValue","compute","dependentValues","recompute","isDark","hexcolor","hexnumbers","textContrastClass","Badge","_this$attrs$style","iconChild","badgeAttrs","badgeNode","Discussion","_Model","lastPostedAt","lastPostedUser","commentCount","lastReadAt","removePost","_user$markedAllAsRead","_user$markedAllAsRead2","_this$lastPostedAt","_this$lastPostNumber","_this$commentCount","_this$rawRelationship","_this$rawRelationship2","link","NotificationList","markAllAsRead","deleteAll","notification","subject","notifications","group","NotificationComponent","notificationComponents","$notifications","$scrollParent","inPanel","boundScrollHandler","scrollHandler","scrollParent","atBottom","clientHeight","NotificationsDropdown","newNotifications","getNewCount","getUnreadCount","menuClick","isOpen","goToRoute","unreadNotificationCount","newNotificationCount","Keys","KeyboardNavigatable","Map","whenCallback","onUp","ArrowUp","onDown","ArrowDown","onSelect","ignoreTabPress","Tab","Enter","onTab","onCancel","Escape","onRemove","Backspace","KeyboardEvent","HTMLInputElement","bindTo","navigate","keyCallback","asyncGeneratorStep","_asyncToGenerator","_next","_throw","DiscussionsSearchItem","discussionTitle","mostRelevantPostContent","_this$mostRelevantPos","_this$mostRelevantPos2","DiscussionsSearchSource","queryString","_search","_callee","setQueryString","limit","include","_x","queryMutators","UsersSearchResults","localeCompare","Search","searchState","sources","loadingSources","navigator","searchTimeout","updateMaxHeightHandler","currentSearch","getInitialSearch","sourceItems","searchLabel","shouldShowResults","getValue","shouldShowClearButton","focused","_e$target","setValue","onfocus","onblur","updateMaxHeight","_this$element$querySe","maxHeight","innerHeight","_this$sources","setIndex","getCurrentNumericIndex","_this$sources2","selectableItems","$input","selectResult","_search$sources","isCached","MIN_SEARCH_LEN","SEARCH_DEBOUNCE_TIME_MS","selectedUrl","UsersSearchSource","$dropdown","fixedIndex","dropdownScroll","dropdownTop","dropdownBottom","HeaderSecondary","locales","_loop","savePreferences","cookie","ComposerButton","ComposerState","Position","HIDDEN","componentClass","preventExit","onExit","NORMAL","FULLSCREEN","MINIMIZED","fullScreen","exitFullScreen","bodyMatches","minimumHeight","maximumHeight","Composer","prevPosition","normal","minimized","showIfMinimized","configHandle","updateHeight","animatePositionChange","initializeHeight","mousedown","heightStart","deltaPixels","changeHeight","updateBodyPadding","$flexible","headerHeight","paddingBottom","footerHeight","animateHeightChange","$composer","oldHeight","newHeight","showBackdrop","$backdrop","hideBackdrop","scrollElement","topOfViewport","defaultHeight","Notification","_this$href","_this$href2","_this$icon","_this$content","_this$excerpt","fromUser","_app$session$user","_app$session$user$unr","DiscussionRenamedNotification","_Notification","postNumber","EditPostComposer","editedContent","editAction","Post","PostControls","footerItems","actionItems","$actions","$controls","existing","GroupBadge","_Badge","nameSingular","Group","namePlural","ADMINISTRATOR_ID","GUEST_ID","MEMBER_ID","EditUserModal","isEmailConfirmed","setPassword","userGroups","canEditCredentials","nonAdminEditingAdmin","userIsAdmin","canEditGroups","_this5","_this6","AffixedSidebar","boundOnresize","$sidebar","$header","$footer","$affixElement","UserPage","UserCard","editable","controlsButtonClassName","loadUser","lowercaseUsername","joinTime","navItems","isActor","discussionCount","showDeletionAlert","AvatarEditor","isDraggedOver","quickUpload","ondragover","enableDragover","ondragenter","ondragleave","disableDragover","ondragend","ondrop","dropUpload","openPicker","upload","dataTransfer","files","failure","avatarColor","UserControls","lastSeenAt","online","isOnline","userOnline","PostUser","cardVisible","showCard","hideCard","oncardshow","oncardhide","fullTime","IPAddress","ip","PostMeta","getPermalink","selectPermalink","metaItems","touch","permalink","ipAddress","PostEdited","editedUser","editedInfo","editedAt","CommentPost","_Post","revealContent","isEditing","bodyItems","contentHtml","refreshContent","renderFailed","isEdited","editing","toggleContent","EventPost","usernameHelper","descriptionData","descriptionKey","DiscussionRenamedPost","_EventPost","renamed","oldTitle","new","LOCAL_STORAGE_KEY","WelcomeHero","_app$forum$attribute","DiscussionComposer","titlePlaceholder","onkeydown","refresh","IndexPage","lastDiscussion","refreshParams","oldHeroHeight","heroHeight","indexTop","indexBottom","discussionOffset","canStartDiscussion","newDiscussionAction","stickyParams","sortMap","sortOptions","sortId","changeSort","providesInitialSearch","PostsUserPage","_UserPage","moreResults","loadLimit","loadMore","loadResults","parseResults","author","_this$posts","PaginatedListState","pages","initialLoading","loadingPrev","loadingNext","loadPrev","getLocation","getPrevPageNumber","getNextPageNumber","_results$payload","links","hasPrev","reqParams","newParams","paramsChanged","isLoadingPrev","getAllItems","_this$pages$","_this$pages","_this$pages2","_this$pages$2","EventEmitter","emit","globalEventEmitter","DiscussionListState","_PaginatedListState","extraDiscussions","eventEmitter","deleteDiscussion","_this$params$sort","preloadedDiscussions","relevance","latest","newest","oldest","addDiscussion","DiscussionsUserPage","cb","Checkbox","withAttr","getDisplay","Switch","_Checkbox","FieldSet","NotificationGrid","methods","notificationMethods","notificationTypes","preferences","toggleMethod","toggleType","preferenceKey","ChangePasswordModal","requestBody","ChangeEmailModal","requestAttributes","SettingsPage","discloseOnlineLoading","settingsItems","sectionItems","accountItems","notificationsItems","privacyItems","_preferences","discloseOnline","NotificationsPage","DefaultResolver","makeKey","makeAttrs","requestedPath","DiscussionPageResolver","_DefaultResolver","canonicalizeDiscussionSlug","scrollToPostNumber","LabelValue","AccessTokensList","showingTokens","tokenView","isCurrent","tokenViewItems","tokenInfoItems","tokenActionItems","device","generateTokenTitle","lastActivityAt","lastIpAddress","deleteKey","developer_token","displayKey","revokeButton","revoke","_revoke","_this$attrs$ondelete","ondelete","tokenValueDisplay","obfuscatedName","fill","NewAccessTokenModal","titleInput","titleLabel","onsuccess","UserSecurityPageState","loadingTerminateSessions","loadingGlobalLogout","hasLoadedTokens","getTokens","setTokens","pushToken","_this$tokens","removeToken","getSessionTokens","_this$tokens2","isSessionToken","getDeveloperTokens","_this$tokens3","getOtherSessionTokens","_this$tokens4","hasOtherActiveSessions","removeOtherSessionTokens","UserSecurityPage","routeUsername","loadTokens","_this$state$getDevelo","developerTokensItems","sessionsItems","globalLogout","hideTokens","terminateAllOthersButton","terminateAllOtherSessions","resolverClass","alertEmailConfirmation","ResendButton","ContainedAlert","_Alert","candidateSelectors","candidateSelector","NoElement","Element","getCandidates","includeContainer","candidates","getCandidatesIteratively","elementsToCheck","assigned","assignedElements","nestedCandidates","flatten","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","getTabindex","isScope","isContentEditable","sortOrderedTabbables","documentOrder","isZeroArea","_node$getBoundingClie","isNodeMatchingSelectorFocusable","isHiddenInput","displayCheck","nodeUnderDetails","parentElement","nodeRootHost","nodeIsAttached","originalNode","rootNode","assignedSlot","isDetailsWithSummary","isDisabledFromFieldset","isNodeMatchingSelectorTabbable","isRadio","radioSet","radioScope","form","queryRadios","CSS","getCheckedRadio","isTabbableRadio","isNonTabbableRadio","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","sortable","tabbable","isTabbable","focusableCandidateSelector","isFocusable","trapQueue","activeFocusTraps","activateTrap","trap","activeTrap","pause","trapIndex","deactivateTrap","unpause","findIndex","valueOrHandler","getActualTarget","composedPath","createFocusTrap","userOptions","_objectSpread2","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","containers","containerGroups","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","delayInitialFocusTimer","getOption","configOverrideOptions","optionName","configOptionName","findContainerIndex","tabbableNodes","getNodeForOption","optionValue","getInitialFocusNode","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","tabbableOptions","focusableNodes","lastTabbableNode","nextTabbableNode","nodeIdx","tryFocus","preventScroll","isSelectableInput","getReturnFocusNode","previousActiveElement","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","checkFocusIn","targetContained","Document","checkKey","isEscapeEvent","isTabEvent","destinationNode","containerIndex","containerGroup","startOfGroupIndex","_ref2","destinationGroupIndex","lastOfGroupIndex","_ref3","_destinationGroupIndex","checkTab","checkClick","addListeners","capture","removeListeners","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","finishDeactivation","updateContainerElements","containerElements","elementsAsArray","_createFocusTrap","hasPassiveEvents","passiveTestOptions","pluralFormatter","isIosDevice","platform","maxTouchPoints","locks","documentListenerAdded","initialClientY","previousBodyOverflowSetting","previousBodyPosition","previousBodyPaddingRight","allowTouchMove","rawEvent","clearAllBodyScrollLocks","targetElement","ontouchstart","ontouchmove","restorePositionSetting","paddingRight","ModalManager","focusTrap","lastSetFocusTrap","modalClosing","keyUpListener","modalList","handlePossibleBackdropClick","backdropShown","ontransitionend","onBackdropTransitionEnd","handleEscPress","_document$getElementB2","_document$getElementB","isModalOpen","dialogKey","activeDialogElement","arr2","_toConsumableArray","_window","scrollY","scrollX","bottomBarHeight","_reserveScrollBarGap","reserveScrollBarGap","scrollBarGap","innerWidth","clientWidth","computedBodyPaddingRight","setOverflowHidden","isTargetElementTotallyScrolled","handleScroll","disableBodyScroll","activeDialogManagerElement","_unused","readyCallback","closedCallback","dismissibleState","propertyName","_this$attrs$state$mod","_this$attrs$state$mod2","AlertManager","activeAlerts","getActiveAlerts","urgent","RequestErrorModal","formattedError","accumulator","parseCases","isWhitespace","cases","currTermStart","latestTerm","inTerm","caseBody","branchEndIndex","findClosingBracket","fromIndex","char","splitFormattedArgument","block","separator","indexOfDelimiter","tail","keyCounter","OTHER$1","replaceNumberSign","numBraces","numberValues","keyParam","pluralTypeHandler","_parseCases","intValue","startsWith","keywordPossibilities","resolvedOptions","PluralRules","pluralKeyword","keyword","_replaceNumberSign","_objectSpread","OTHER","selectTypeHandler","replaceRichTags","dontUnescapeIndices","traverseMessageTags","segment","currTagIsClosing","currTag","currTagStart","endingLocation","startIndex","startSegmentIndex","segmentIndex","segmentStart","segmentEnd","exit","findClosingTag","entireTagInSegment","segmentContainingClosingTag","tagContents","processedSegment","newSegmentIndex","unEscapeHtml","startI","startJ","onTagClose","inTag","instructions","recSanitizeArr","defaultRichHandler","RichMessageFormatter","_MessageFormatter","typeHandlers","richHandler","_classCallCheck","_super","cleanedValues","sanitizeValues","formatted","sym","fakeValues","fromEntries","_slicedToArray","originalTemplateSegmentIndices","MessageFormatter","_defineProperty","blockStartIndex","blockEndIndex","_splitFormattedArgume","_splitFormattedArgume2","typeHandler","mithrilRichHandler","Translator","translations","formatter","formatterTypeHandlers","setLocale","getLocale","addTranslations","plural","preprocessParameters","parameters","translation","rich","payloadIsPlural","Store","models","pushObject","allowUnregistered","curr","_find","idOrParams","_x2","_x3","_x4","getBy","records","Session","csrfToken","Drawer","appElement","resizeHandler","drawerAvailableMediaQuery","matchMedia","_this$$backdrop","removeListener","$drawer","addListener","mapRoutes","basePath","resolver","RequestError","updateHumanTimes","liveHumanTimes","override","newMethod","Forum","stringToColor","rgb","hsvToRgb","User","isAdmin","calculateAvatarColor","_this$avatarUrl","Image","colorThief","crossOrigin","newPreferences","ModalManagerState","stackModal","invalidModalWarning","AlertManagerState","alertId","arg1","arg2","arg3","fireApplicationError","userTitle","consoleTitle","_app$session","groupEnd","AccessToken","userId","Application","initializers","forums","users","booted","refs","fontawesome","_title","_titleCount","requestErrorAlert","initialRoute","boot","_this$store$getById","caughtInitializationErrors","initializer","extension","resources","bootExtensions","extensions","Infinity","appEl","appHeaderEl","apiDocument","updateTitle","titleCount","onHomepage","pageTitle","forumName","pageNumber","parser","transformRequestOptions","flarumOptions","_flarumOptions","modifyText","tmpOptions","originalExtract","requestErrorCatch","customErrorHandler","_error$response$error","formattedErrors","_e$detail","decodeURI","requestWasCrossOrigin","isDebug","showDebug","requestErrorDefaultHandler","URL","baseURI","_e$options","_e$xhr$status","Navigation","onmouseenter","getBackButton","getPaneButton","getDrawerButton","NotificationListState","_app$session$user2","_app$session$user3","_app$session$user4","SearchState","cachedSearches","Set","GlobalSearchState","_SearchState","initialValueSet","currPageProvidesSearch","intializeValue","clearInitialSearch","_this$params","isSafariMobile","vendor","userAgent","ForumApplication","_Application","discussionRenamed","comment","makeRouteHelpers","defaultAction","authenticationComplete","loggedIn","ActualModel","PostTypes","Routes","helpers","helper","deprecatedNotice","deprecationIssueId","getHandlers","blockPrefix","blockSuffix","multiline","replaceNext","prefixSpace","scanFor","surroundWithNewlines","orderedList","unorderedList","trimFirst","isMultipleLines","repeat","newlinesToSurroundSelectedText","newlinesToAppend","newlinesToPrepend","beforeSelection","afterSelection","breaksBefore","breaksAfter","newlinesBeforeSelection","newlinesAfterSelection","undoOrderedListStyle","lines","orderedListRegex","shouldUndoOrderedList","line","processed","undoUnorderedListStyle","shouldUndoUnorderedList","unorderedListPrefix","makePrefix","proxifyCompat","compat","regex","_templateObject","fileExt","Select","_this$attrs$wrapperAt","wrapperAttrs","_this$attrs$wrapperAt2","wrapperClassName","wrapperClass","domAttrs","_excluded2","ColorPreviewInput","TextEditorButton","originalView","tooltipText","extenders","evented","Parent","Mixed","_Parent","mixins","styleArgs","noInitialSelection","lineLength","expandSelectionToLine","selectedText","_clearExistingListSty","undoResultOpositeList","undoResult","pristineText","clearExistingListStyle","prefixedLines","totalPrefixLength","previousValue","_currentValue","currentIndex","totalPrefixLengthOpositeList","_newlinesToSurroundSe2","listStyle","prefixToUse","suffixToUse","_newlinesToSurroundSe","multilineStyle","originalSelectionEnd","wordSelectionStart","breakpoint","wordSelectionEnd","expandedSelectionStart","expandedSelectionEnd","beginsWithPrefix","endsWithSuffix","expandSelectedText","hasReplaceNext","ref","replacementText","whitespaceEdges","leadingWhitespace","trailingWhitespace","blockStyle","EditorDriverInterface","ThrottleDebounce","FocusTrap","Fragment","originalOnCreate","humanTimeHelper","third","LogInButton","PostPreview","compatObj","flarum","core","FlagListState","flags","newFlagCount","subClass","superClass","FlagPostModal","reasonDetail","flagReasons","guidelinesUrl","canFlag","FlagList","FlagsDropdown","nextPost","dismissFlag","flagReason","flagActionItems","FlagsPage","Flag","Extend","addFlagsToPosts","addFlagControl","addFlagsDropdown","flagsCompat","TagListState","loadedIncludes","_load","unloadedIncludes","_query","_callee2","_context2","tagIcon","_settings$useColor","useColor","TagLinkButton","_LinkButton","isChild","tags","tagLabel","tagText","sortTags","aPos","bPos","aParent","bParent","TagsPage","preloaded","tagList","cloud","tagTileListView","cloudView","tagTileView","lastPostedDiscussion","colored","currentTag","addTag","more","TagHero","_classList","findTag","sensitivity","currentActiveTag","currentTagLoading","newDiscussion","_params$include","_params$filter","tagsLabel","otherAttrs","getSelectableTags","canAddToDiscussion","ToggleButton","isToggled","TagSelectionModal","bypassReqs","indexTag","_attrs$limits$min$tot","_attrs$limits","_attrs$limits$min$pri","_attrs$limits2","_attrs$limits$min$sec","_attrs$limits3","_attrs$limits$max$tot","_attrs$limits4","_attrs$limits$max$pri","_attrs$limits5","_attrs$limits$max$sec","_attrs$limits6","canSelect","allowResetting","limits","secondary","catchInvalidLimits","selectableTags","selectedTags","primaryCount","secondaryCount","getFilteredTags","inputWidth","getInstruction","removeTag","meetsRequirements","onmouseover","toggleTag","allowBypassing","requireParentTag","isPrimary","onDeselect","selectedTag","TagDiscussionModal","_TagSelectionModal","_attrs$discussion","suppliedOnsubmit","canTag","chooseTags","chosenTags","chosenPrimaryTags","chosenSecondaryTags","minPrimaryTags","minSecondaryTags","maxPrimaryTags","maxSecondaryTags","DiscussionTaggedPost","oldTags","newTags","diffTags","tags1","tags2","tagsAdded","tagsRemoved","backgroundUrl","backgroundMode","defaultSort","isRestricted","commonExtend","addTagFilter","addTagControl","addTagList","addTagLabels","addTagComposer","tagsCompat","isApproved","canApprove","YY","YYYY","MMM","MMMM","DD","ddd","dddd","H","HH","ss","SSS","Z","T","local","getUTCFullYear","getUTCMonth","getUTCDate","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","$localOffset","isUTC","getPermanentSuspensionDate","isPermanentSuspensionDate","localStorageKey","SuspendUserModal","suspendedUntil","suspendReason","suspendMessage","daysRemaining","formItems","radioItems","rows","UserSuspendedNotification","timeReadable","UserUnsuspendedNotification","SuspensionInfoModal","timespan","isSuspended","alreadyDisplayed","removeItem","suspensionHelper","checkForSuspension","canSuspend","suspendCompat","installedModules","modules","PageHero","PagePage","isHtml","HomePage","_PagePage","editTime","homePage","sortLinks","LinkItem","isLabel","labelView","linkView","LinkLabelNode","inDropdown","class","isDropdownButton","linkAttrs","rel","linkTarget","isNewtab","isInternal","linkHref","iconClass","useRelMe","isLinkCurrentPage","linkPath","LinkDropdown","_SplitDropdown","components","utils","guestOnly","allLinks","hasChildren","HandleSpammerModal","hardDeleteUser","hardDeleteDiscussions","hardDeletePosts","moveDiscussionsToQuarantine","reportToSfs","defaultActions","tagsEnabled","sfsEnabled","deletePosts","deleteDiscussions","deleteUser","BlockedRegistration","sfsData","provider","providerData","attemptedAt","canSpamblock","SubscriptionMenuItem","SubscriptionMenu","subscription","buttonLabel","buttonIcon","buttonClass","notifyEmail","notifyAlert","shouldShowTooltip","saveSubscription","NewPostNotification","badge","states","none","follow","ignore","onFollowing","followAfterReply","followAfterReplyLoading","subscriptionsCompat","DiscussionStickiedPost","sticky","isSticky","canSticky","stickyAction","stickyCompat","MarkdownToolbar","MarkdownButton","hotkey","modifierKey","bold","italic","strikethrough","quote","unordered_list","ordered_list","spoiler","applyStyle","editorDriver","styleSelectedText","makeShortcut","markdownToolbarItems","oldFunc","makeApplyStyle","for","textareaId","setShortcutHandler","shortcutHandler","markdownCompat","DiscussionLockedNotification","DiscussionLockedPost","isLocked","canLock","lockAction","lockCompat","approveItem","BanUserModal","days","untilDayjs","shadowBannedUntil","isShadowHidden","isPrivateDiscussion","_flarum$extensions$fo","PrivateDiscussionComposer","ComposerPage","_m$route$param2","isPrivate","observer","ResizeObserver","observe","disconnect","isComposerPage","currentRouteName","shouldUsePage","tagSlugs","pageTags","compose","composeTag","lastTagSelectionHash","selectedTagSlugs","newHash","_this$fields","_newDiscussion$attrs$","StatWidget","LastDiscussionWidget","card","Category","collapsed","compactMobileMode","tagLocked","isUnlocked","isGroupProtected","isPasswordProtected","isProtectedTagDisplayedForTagsPage","SubCategory","ParentCategory","compactMobile","categoryItems","alignStartItems","alignEndItems","iconItems","toggleArrow","lockedItems","statItems","lastDiscussionItems","iconClasses","postCount","CategoriesPage","pageItems","containerItems","pruneIndexNav","isTagsPageVisible","isCustomTagsHidden","categories"],"mappings":";2BAAA,IAAIA,EAA6B,EAAQ,MAErCC,EADsC,EAAQ,UAES,IAAhDA,EAA0C,WAAmBA,EAA0C,SAAID,GACtHE,EAAOC,QAAUH,8BCDjBE,EAAOC,QAAU,WACf,GAA0B,iBAAfC,WACT,OAAOA,WAGT,IAAIC,EAEJ,IAGEA,EAAIC,MAAQ,IAAIC,SAAS,cAAb,EACd,CAAE,MAAOC,GAEP,GAAsB,iBAAXC,OACT,OAAOA,OAIT,GAAoB,iBAATC,KACT,OAAOA,KAIT,QAAsB,IAAXC,EAAAA,EACT,OAAOA,EAAAA,CAEX,CAEA,OAAON,CACT,CA7BiB,kBCHjB,IAAIO,EAAiBC,EAAQ,KAa7BX,EAAOC,QAZP,SAAmBW,EAAGN,GACpB,GAAI,mBAAqBA,GAAK,OAASA,EAAG,MAAM,IAAIO,UAAU,sDAC9DD,EAAEE,UAAYC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MAAMC,UAAU,0BAExCg0D,EAAsBx/D,IAAI/N,QAAQpwB,QAAQs9F,IAAmBn/D,IAAI/N,QAAQpwB,QAAQsqF,KACvF,IAAK,IAAMltF,KAAQulC,EAAMA,MACnBxyB,EAAK/S,KACI,QAARA,EAKIsgG,GACH/6D,EAAMz1C,OAAOkQ,GAMXugG,GACFh7D,EAAMz1C,OAAOkQ,GAKvB,CAEA+gC,IAAIw9C,aAAa79F,IAAI,gCAAgC,WACnDqgD,IAAIvH,OAAOgnE,WAAa,CACtB3xH,KAAM,cACNuwB,UAAW8gG,GAGbx6D,IAAAA,UAAAA,UAA0BgjB,IAAAA,UAAgB,cAE1C79E,EAAAA,EAAAA,QAAO2yF,IAAAA,UAAqB,YAAY,SAAUj4B,GAehD,OAdAA,EAAM7kD,IACJ,aACA5R,EAACm5E,IAAU,CAAC/f,KAAK,iBAAiBr8B,KAAMk1B,IAAI7H,MAAM,eAC/C6H,IAAIwH,WAAWC,MAAM,uDAEvB,KAGCjD,EAAMl6B,IAAI,aACZk6B,EAAM13D,QAAQ,WAAYiB,EAACm5E,IAAU,CAACp8C,KAAMk1B,IAAI7H,MAAM,eAAgB6H,IAAIwH,WAAWC,MAAM,uCAG7F63D,GAAc96D,GAAO,SAACvlC,GAAI,OAAKA,EAAKm2E,WAAW,MAAM,IAE9C5wC,CACT,KAEA16D,EAAAA,EAAAA,QAAO2yF,IAAAA,UAAqB,gBAAgB,SAAUj4B,GAEpD,OADA86D,GAAc96D,GAAO,SAACvlC,GAAI,MAAc,kBAATA,GAAqC,QAATA,CAAc,IAClEulC,CACT,GACF,IAEA,UACE,4BAA6B26D,EAC7B,sBAAuBrB,EACvB,kCAAmCF,EACnC,wBAAyBD,E","sourcesContent":["var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./punycode.es6.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"punycode\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"punycode\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","\"use strict\";\n\n// eslint-disable-next-line func-names\nmodule.exports = function () {\n  if (typeof globalThis === \"object\") {\n    return globalThis;\n  }\n\n  var g;\n\n  try {\n    // This works if eval is allowed (see CSP)\n    // eslint-disable-next-line no-new-func\n    g = this || new Function(\"return this\")();\n  } catch (e) {\n    // This works if the window reference is available\n    if (typeof window === \"object\") {\n      return window;\n    } // This works if the self reference is available\n\n\n    if (typeof self === \"object\") {\n      return self;\n    } // This works if the global reference is available\n\n\n    if (typeof global !== \"undefined\") {\n      return global;\n    }\n  }\n\n  return g;\n}();","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(t, e) {\n  if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n  t.prototype = Object.create(e && e.prototype, {\n    constructor: {\n      value: t,\n      writable: !0,\n      configurable: !0\n    }\n  }), Object.defineProperty(t, \"prototype\", {\n    writable: !1\n  }), e && setPrototypeOf(t, e);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/* ========================================================================\n * Bootstrap: affix.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#affix\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // AFFIX CLASS DEFINITION\n  // ======================\n\n  var Affix = function (element, options) {\n    this.options = $.extend({}, Affix.DEFAULTS, options)\n\n    var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)\n\n    this.$target = target\n      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))\n\n    this.$element     = $(element)\n    this.affixed      = null\n    this.unpin        = null\n    this.pinnedOffset = null\n\n    this.checkPosition()\n  }\n\n  Affix.VERSION  = '3.4.1'\n\n  Affix.RESET    = 'affix affix-top affix-bottom'\n\n  Affix.DEFAULTS = {\n    offset: 0,\n    target: window\n  }\n\n  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {\n    var scrollTop    = this.$target.scrollTop()\n    var position     = this.$element.offset()\n    var targetHeight = this.$target.height()\n\n    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false\n\n    if (this.affixed == 'bottom') {\n      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'\n      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'\n    }\n\n    var initializing   = this.affixed == null\n    var colliderTop    = initializing ? scrollTop : position.top\n    var colliderHeight = initializing ? targetHeight : height\n\n    if (offsetTop != null && scrollTop <= offsetTop) return 'top'\n    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'\n\n    return false\n  }\n\n  Affix.prototype.getPinnedOffset = function () {\n    if (this.pinnedOffset) return this.pinnedOffset\n    this.$element.removeClass(Affix.RESET).addClass('affix')\n    var scrollTop = this.$target.scrollTop()\n    var position  = this.$element.offset()\n    return (this.pinnedOffset = position.top - scrollTop)\n  }\n\n  Affix.prototype.checkPositionWithEventLoop = function () {\n    setTimeout($.proxy(this.checkPosition, this), 1)\n  }\n\n  Affix.prototype.checkPosition = function () {\n    if (!this.$element.is(':visible')) return\n\n    var height       = this.$element.height()\n    var offset       = this.options.offset\n    var offsetTop    = offset.top\n    var offsetBottom = offset.bottom\n    var scrollHeight = Math.max($(document).height(), $(document.body).height())\n\n    if (typeof offset != 'object')         offsetBottom = offsetTop = offset\n    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)\n    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\n\n    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)\n\n    if (this.affixed != affix) {\n      if (this.unpin != null) this.$element.css('top', '')\n\n      var affixType = 'affix' + (affix ? '-' + affix : '')\n      var e         = $.Event(affixType + '.bs.affix')\n\n      this.$element.trigger(e)\n\n      if (e.isDefaultPrevented()) return\n\n      this.affixed = affix\n      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\n\n      this.$element\n        .removeClass(Affix.RESET)\n        .addClass(affixType)\n        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')\n    }\n\n    if (affix == 'bottom') {\n      this.$element.offset({\n        top: scrollHeight - height - offsetBottom\n      })\n    }\n  }\n\n\n  // AFFIX PLUGIN DEFINITION\n  // =======================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.affix')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.affix\n\n  $.fn.affix             = Plugin\n  $.fn.affix.Constructor = Affix\n\n\n  // AFFIX NO CONFLICT\n  // =================\n\n  $.fn.affix.noConflict = function () {\n    $.fn.affix = old\n    return this\n  }\n\n\n  // AFFIX DATA-API\n  // ==============\n\n  $(window).on('load', function () {\n    $('[data-spy=\"affix\"]').each(function () {\n      var $spy = $(this)\n      var data = $spy.data()\n\n      data.offset = data.offset || {}\n\n      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom\n      if (data.offsetTop    != null) data.offset.top    = data.offsetTop\n\n      Plugin.call($spy, data)\n    })\n  })\n\n}(jQuery);\n","\"use strict\"\n\nvar parsePathname = require(\"./parse\")\n\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n\tvar templateData = parsePathname(template)\n\tvar templateKeys = Object.keys(templateData.params)\n\tvar keys = []\n\tvar regexp = new RegExp(\"^\" + templateData.path.replace(\n\t\t// I escape literal text so people can use things like `:file.:ext` or\n\t\t// `:lang-:locale` in routes. This is all merged into one pass so I\n\t\t// don't also accidentally escape `-` and make it harder to detect it to\n\t\t// ban it from template parameters.\n\t\t/:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g,\n\t\tfunction(m, key, extra) {\n\t\t\tif (key == null) return \"\\\\\" + m\n\t\t\tkeys.push({k: key, r: extra === \"...\"})\n\t\t\tif (extra === \"...\") return \"(.*)\"\n\t\t\tif (extra === \".\") return \"([^/]+)\\\\.\"\n\t\t\treturn \"([^/]+)\" + (extra || \"\")\n\t\t}\n\t) + \"$\")\n\treturn function(data) {\n\t\t// First, check the params. Usually, there isn't any, and it's just\n\t\t// checking a static set.\n\t\tfor (var i = 0; i < templateKeys.length; i++) {\n\t\t\tif (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false\n\t\t}\n\t\t// If no interpolations exist, let's skip all the ceremony\n\t\tif (!keys.length) return regexp.test(data.path)\n\t\tvar values = regexp.exec(data.path)\n\t\tif (values == null) return false\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tdata.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1])\n\t\t}\n\t\treturn true\n\t}\n}\n","function _setPrototypeOf(t, e) {\n  return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n    return t.__proto__ = e, t;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _setPrototypeOf(t, e);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(r, e) {\n  return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(html) {\n\tif (html == null) html = \"\"\n\treturn Vnode(\"<\", undefined, undefined, html, undefined, undefined)\n}\n","function _classCallCheck(a, n) {\n  if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../babel-loader/lib/index.js??ruleSet[1].rules[0]!./color-thief.min.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"ColorThief\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"ColorThief\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n//    another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n//    than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n//     if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n//         if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n//     } else {\n//         children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n//         attrs = undefined\n//     }\n//\n//     if (attrs == null) attrs = {}\n//     return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n\tvar attrs = arguments[this], start = this + 1, children\n\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = this\n\t}\n\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\n\treturn Vnode(\"\", attrs.key, attrs, children)\n}\n","\"use strict\"\n\nmodule.exports = require(\"./render/render\")(window)\n","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n  if (\"object\" != _typeof(t) || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != _typeof(i)) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(r, l) {\n  var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n  if (null != t) {\n    var e,\n      n,\n      i,\n      u,\n      a = [],\n      f = !0,\n      o = !1;\n    try {\n      if (i = (t = t.call(r)).next, 0 === l) {\n        if (Object(t) !== t) return;\n        f = !1;\n      } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n    } catch (r) {\n      o = !0, n = r;\n    } finally {\n      try {\n        if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n      } finally {\n        if (o) throw n;\n      }\n    }\n    return a;\n  }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/* ========================================================================\n * Bootstrap: transition.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)\n  // ============================================================\n\n  function transitionEnd() {\n    var el = document.createElement('bootstrap')\n\n    var transEndEventNames = {\n      WebkitTransition : 'webkitTransitionEnd',\n      MozTransition    : 'transitionend',\n      OTransition      : 'oTransitionEnd otransitionend',\n      transition       : 'transitionend'\n    }\n\n    for (var name in transEndEventNames) {\n      if (el.style[name] !== undefined) {\n        return { end: transEndEventNames[name] }\n      }\n    }\n\n    return false // explicit for ie8 (  ._.)\n  }\n\n  // https://blog.alexmaccaw.com/css-transitions\n  $.fn.emulateTransitionEnd = function (duration) {\n    var called = false\n    var $el = this\n    $(this).one('bsTransitionEnd', function () { called = true })\n    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n    setTimeout(callback, duration)\n    return this\n  }\n\n  $(function () {\n    $.support.transition = transitionEnd()\n\n    if (!$.support.transition) return\n\n    $.event.special.bsTransitionEnd = {\n      bindType: $.support.transition.end,\n      delegateType: $.support.transition.end,\n      handle: function (e) {\n        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n      }\n    }\n  })\n\n}(jQuery);\n","\"use strict\"\n\nmodule.exports = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\n\tvar args = []\n\tfor (var key in object) {\n\t\tdestructure(key, object[key])\n\t}\n\n\treturn args.join(\"&\")\n\n\tfunction destructure(key, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./polyfill\")\n\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") {\n\t\twindow.Promise = PromisePolyfill\n\t} else if (!window.Promise.prototype.finally) {\n\t\twindow.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") {\n\t\tglobal.Promise = PromisePolyfill\n\t} else if (!global.Promise.prototype.finally) {\n\t\tglobal.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = global.Promise\n} else {\n\tmodule.exports = PromisePolyfill\n}\n","/* eslint-disable */\n;(function() {\n\"use strict\"\n/* eslint-enable */\nStream.SKIP = {}\nStream.lift = lift\nStream.scan = scan\nStream.merge = merge\nStream.combine = combine\nStream.scanMerge = scanMerge\nStream[\"fantasy-land/of\"] = Stream\n\nvar warnedHalt = false\nObject.defineProperty(Stream, \"HALT\", {\n\tget: function() {\n\t\twarnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n\t\twarnedHalt = true\n\t\treturn Stream.SKIP\n\t}\n})\n\nfunction Stream(value) {\n\tvar dependentStreams = []\n\tvar dependentFns = []\n\n\tfunction stream(v) {\n\t\tif (arguments.length && v !== Stream.SKIP) {\n\t\t\tvalue = v\n\t\t\tif (open(stream)) {\n\t\t\t\tstream._changing()\n\t\t\t\tstream._state = \"active\"\n\t\t\t\tdependentStreams.forEach(function(s, i) { s(dependentFns[i](value)) })\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\tstream.constructor = Stream\n\tstream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\"\n\tstream._parents = []\n\n\tstream._changing = function() {\n\t\tif (open(stream)) stream._state = \"changing\"\n\t\tdependentStreams.forEach(function(s) {\n\t\t\ts._changing()\n\t\t})\n\t}\n\n\tstream._map = function(fn, ignoreInitial) {\n\t\tvar target = ignoreInitial ? Stream() : Stream(fn(value))\n\t\ttarget._parents.push(stream)\n\t\tdependentStreams.push(target)\n\t\tdependentFns.push(fn)\n\t\treturn target\n\t}\n\n\tstream.map = function(fn) {\n\t\treturn stream._map(fn, stream._state !== \"active\")\n\t}\n\n\tvar end\n\tfunction createEnd() {\n\t\tend = Stream()\n\t\tend.map(function(value) {\n\t\t\tif (value === true) {\n\t\t\t\tstream._parents.forEach(function (p) {p._unregisterChild(stream)})\n\t\t\t\tstream._state = \"ended\"\n\t\t\t\tstream._parents.length = dependentStreams.length = dependentFns.length = 0\n\t\t\t}\n\t\t\treturn value\n\t\t})\n\t\treturn end\n\t}\n\n\tstream.toJSON = function() { return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value }\n\n\tstream[\"fantasy-land/map\"] = stream.map\n\tstream[\"fantasy-land/ap\"] = function(x) { return combine(function(s1, s2) { return s1()(s2()) }, [x, stream]) }\n\n\tstream._unregisterChild = function(child) {\n\t\tvar childIndex = dependentStreams.indexOf(child)\n\t\tif (childIndex !== -1) {\n\t\t\tdependentStreams.splice(childIndex, 1)\n\t\t\tdependentFns.splice(childIndex, 1)\n\t\t}\n\t}\n\n\tObject.defineProperty(stream, \"end\", {\n\t\tget: function() { return end || createEnd() }\n\t})\n\n\treturn stream\n}\n\nfunction combine(fn, streams) {\n\tvar ready = streams.every(function(s) {\n\t\tif (s.constructor !== Stream)\n\t\t\tthrow new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream\")\n\t\treturn s._state === \"active\"\n\t})\n\tvar stream = ready\n\t\t? Stream(fn.apply(null, streams.concat([streams])))\n\t\t: Stream()\n\n\tvar changed = []\n\n\tvar mappers = streams.map(function(s) {\n\t\treturn s._map(function(value) {\n\t\t\tchanged.push(s)\n\t\t\tif (ready || streams.every(function(s) { return s._state !== \"pending\" })) {\n\t\t\t\tready = true\n\t\t\t\tstream(fn.apply(null, streams.concat([changed])))\n\t\t\t\tchanged = []\n\t\t\t}\n\t\t\treturn value\n\t\t}, true)\n\t})\n\n\tvar endStream = stream.end.map(function(value) {\n\t\tif (value === true) {\n\t\t\tmappers.forEach(function(mapper) { mapper.end(true) })\n\t\t\tendStream.end(true)\n\t\t}\n\t\treturn undefined\n\t})\n\n\treturn stream\n}\n\nfunction merge(streams) {\n\treturn combine(function() { return streams.map(function(s) { return s() }) }, streams)\n}\n\nfunction scan(fn, acc, origin) {\n\tvar stream = origin.map(function(v) {\n\t\tvar next = fn(acc, v)\n\t\tif (next !== Stream.SKIP) acc = next\n\t\treturn next\n\t})\n\tstream(acc)\n\treturn stream\n}\n\nfunction scanMerge(tuples, seed) {\n\tvar streams = tuples.map(function(tuple) { return tuple[0] })\n\n\tvar stream = combine(function() {\n\t\tvar changed = arguments[arguments.length - 1]\n\t\tstreams.forEach(function(stream, i) {\n\t\t\tif (changed.indexOf(stream) > -1)\n\t\t\t\tseed = tuples[i][1](seed, stream())\n\t\t})\n\n\t\treturn seed\n\t}, streams)\n\n\tstream(seed)\n\n\treturn stream\n}\n\nfunction lift() {\n\tvar fn = arguments[0]\n\tvar streams = Array.prototype.slice.call(arguments, 1)\n\treturn merge(streams).map(function(streams) {\n\t\treturn fn.apply(undefined, streams)\n\t})\n}\n\nfunction open(s) {\n\treturn s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\"\n}\n\nif (typeof module !== \"undefined\") module[\"exports\"] = Stream\nelse if (typeof window.m === \"function\" && !(\"stream\" in window.m)) window.m.stream = Stream\nelse window.m = {stream : Stream}\n\n}());\n","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\n\nmodule.exports = function($window, Promise, oncompletion) {\n\tvar callbackCount = 0\n\n\tfunction PromiseProxy(executor) {\n\t\treturn new Promise(executor)\n\t}\n\n\t// In case the global Promise is some userland library's where they rely on\n\t// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n\t// similar. Let's *not* break them.\n\tPromiseProxy.prototype = Promise.prototype\n\tPromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n\n\tfunction makeRequest(factory) {\n\t\treturn function(url, args) {\n\t\t\tif (typeof url !== \"string\") { args = url; url = url.url }\n\t\t\telse if (args == null) args = {}\n\t\t\tvar promise = new Promise(function(resolve, reject) {\n\t\t\t\tfactory(buildPathname(url, args.params), args, function (data) {\n\t\t\t\t\tif (typeof args.type === \"function\") {\n\t\t\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tdata[i] = new args.type(data[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse data = new args.type(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(data)\n\t\t\t\t}, reject)\n\t\t\t})\n\t\t\tif (args.background === true) return promise\n\t\t\tvar count = 0\n\t\t\tfunction complete() {\n\t\t\t\tif (--count === 0 && typeof oncompletion === \"function\") oncompletion()\n\t\t\t}\n\n\t\t\treturn wrap(promise)\n\n\t\t\tfunction wrap(promise) {\n\t\t\t\tvar then = promise.then\n\t\t\t\t// Set the constructor, so engines know to not await or resolve\n\t\t\t\t// this as a native promise. At the time of writing, this is\n\t\t\t\t// only necessary for V8, but their behavior is the correct\n\t\t\t\t// behavior per spec. See this spec issue for more details:\n\t\t\t\t// https://github.com/tc39/ecma262/issues/1577. Also, see the\n\t\t\t\t// corresponding comment in `request/tests/test-request.js` for\n\t\t\t\t// a bit more background on the issue at hand.\n\t\t\t\tpromise.constructor = PromiseProxy\n\t\t\t\tpromise.then = function() {\n\t\t\t\t\tcount++\n\t\t\t\t\tvar next = then.apply(promise, arguments)\n\t\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\t\tcomplete()\n\t\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t\t})\n\t\t\t\t\treturn wrap(next)\n\t\t\t\t}\n\t\t\t\treturn promise\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction hasHeader(args, name) {\n\t\tfor (var key in args.headers) {\n\t\t\tif ({}.hasOwnProperty.call(args.headers, key) && name.test(key)) return true\n\t\t}\n\t\treturn false\n\t}\n\n\treturn {\n\t\trequest: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar method = args.method != null ? args.method.toUpperCase() : \"GET\"\n\t\t\tvar body = args.body\n\t\t\tvar assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false\n\t\t\tvar original = xhr, replacedAbort\n\t\t\tvar abort = xhr.abort\n\n\t\t\txhr.abort = function() {\n\t\t\t\taborted = true\n\t\t\t\tabort.call(this)\n\t\t\t}\n\n\t\t\txhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\n\t\t\tif (assumeJSON && body != null && !hasHeader(args, /^content-type$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (typeof args.deserialize !== \"function\" && !hasHeader(args, /^accept$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tif (args.timeout) xhr.timeout = args.timeout\n\t\t\txhr.responseType = responseType\n\n\t\t\tfor (var key in args.headers) {\n\t\t\t\tif ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.onreadystatechange = function(ev) {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif (aborted) return\n\n\t\t\t\tif (ev.target.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\\/\\//i).test(url)\n\t\t\t\t\t\t// When the response type isn't \"\" or \"text\",\n\t\t\t\t\t\t// `xhr.responseText` is the wrong thing to use.\n\t\t\t\t\t\t// Browsers do the right thing and throw here, and we\n\t\t\t\t\t\t// should honor that and do the right thing by\n\t\t\t\t\t\t// preferring `xhr.response` where possible/practical.\n\t\t\t\t\t\tvar response = ev.target.response, message\n\n\t\t\t\t\t\tif (responseType === \"json\") {\n\t\t\t\t\t\t\t// For IE and Edge, which don't implement\n\t\t\t\t\t\t\t// `responseType: \"json\"`.\n\t\t\t\t\t\t\tif (!ev.target.responseType && typeof args.extract !== \"function\") response = JSON.parse(ev.target.responseText)\n\t\t\t\t\t\t} else if (!responseType || responseType === \"text\") {\n\t\t\t\t\t\t\t// Only use this default if it's text. If a parsed\n\t\t\t\t\t\t\t// document is needed on old IE and friends (all\n\t\t\t\t\t\t\t// unsupported), the user should use a custom\n\t\t\t\t\t\t\t// `config` instead. They're already using this at\n\t\t\t\t\t\t\t// their own risk.\n\t\t\t\t\t\t\tif (response == null) response = ev.target.responseText\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof args.extract === \"function\") {\n\t\t\t\t\t\t\tresponse = args.extract(ev.target, args)\n\t\t\t\t\t\t\tsuccess = true\n\t\t\t\t\t\t} else if (typeof args.deserialize === \"function\") {\n\t\t\t\t\t\t\tresponse = args.deserialize(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) resolve(response)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof args.config === \"function\") {\n\t\t\t\txhr = args.config(xhr, args, url) || xhr\n\n\t\t\t\t// Propagate the `abort` to any replacement XHR as well.\n\t\t\t\tif (xhr !== original) {\n\t\t\t\t\treplacedAbort = xhr.abort\n\t\t\t\t\txhr.abort = function() {\n\t\t\t\t\t\taborted = true\n\t\t\t\t\t\treplacedAbort.call(this)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (body == null) xhr.send()\n\t\t\telse if (typeof args.serialize === \"function\") xhr.send(args.serialize(body))\n\t\t\telse if (body instanceof $window.FormData) xhr.send(body)\n\t\t\telse xhr.send(JSON.stringify(body))\n\t\t}),\n\t\tjsonp: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(data)\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t}\n\t\t\tscript.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") +\n\t\t\t\tencodeURIComponent(args.callbackKey || \"callback\") + \"=\" +\n\t\t\t\tencodeURIComponent(callbackName)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t}),\n\t}\n}\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./index.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"m\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"m\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n  \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n  module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n    return e;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  var t,\n    e = {},\n    r = Object.prototype,\n    n = r.hasOwnProperty,\n    o = Object.defineProperty || function (t, e, r) {\n      t[e] = r.value;\n    },\n    i = \"function\" == typeof Symbol ? Symbol : {},\n    a = i.iterator || \"@@iterator\",\n    c = i.asyncIterator || \"@@asyncIterator\",\n    u = i.toStringTag || \"@@toStringTag\";\n  function define(t, e, r) {\n    return Object.defineProperty(t, e, {\n      value: r,\n      enumerable: !0,\n      configurable: !0,\n      writable: !0\n    }), t[e];\n  }\n  try {\n    define({}, \"\");\n  } catch (t) {\n    define = function define(t, e, r) {\n      return t[e] = r;\n    };\n  }\n  function wrap(t, e, r, n) {\n    var i = e && e.prototype instanceof Generator ? e : Generator,\n      a = Object.create(i.prototype),\n      c = new Context(n || []);\n    return o(a, \"_invoke\", {\n      value: makeInvokeMethod(t, r, c)\n    }), a;\n  }\n  function tryCatch(t, e, r) {\n    try {\n      return {\n        type: \"normal\",\n        arg: t.call(e, r)\n      };\n    } catch (t) {\n      return {\n        type: \"throw\",\n        arg: t\n      };\n    }\n  }\n  e.wrap = wrap;\n  var h = \"suspendedStart\",\n    l = \"suspendedYield\",\n    f = \"executing\",\n    s = \"completed\",\n    y = {};\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n  var p = {};\n  define(p, a, function () {\n    return this;\n  });\n  var d = Object.getPrototypeOf,\n    v = d && d(d(values([])));\n  v && v !== r && n.call(v, a) && (p = v);\n  var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n  function defineIteratorMethods(t) {\n    [\"next\", \"throw\", \"return\"].forEach(function (e) {\n      define(t, e, function (t) {\n        return this._invoke(e, t);\n      });\n    });\n  }\n  function AsyncIterator(t, e) {\n    function invoke(r, o, i, a) {\n      var c = tryCatch(t[r], t, o);\n      if (\"throw\" !== c.type) {\n        var u = c.arg,\n          h = u.value;\n        return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n          invoke(\"next\", t, i, a);\n        }, function (t) {\n          invoke(\"throw\", t, i, a);\n        }) : e.resolve(h).then(function (t) {\n          u.value = t, i(u);\n        }, function (t) {\n          return invoke(\"throw\", t, i, a);\n        });\n      }\n      a(c.arg);\n    }\n    var r;\n    o(this, \"_invoke\", {\n      value: function value(t, n) {\n        function callInvokeWithMethodAndArg() {\n          return new e(function (e, r) {\n            invoke(t, n, e, r);\n          });\n        }\n        return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n      }\n    });\n  }\n  function makeInvokeMethod(e, r, n) {\n    var o = h;\n    return function (i, a) {\n      if (o === f) throw Error(\"Generator is already running\");\n      if (o === s) {\n        if (\"throw\" === i) throw a;\n        return {\n          value: t,\n          done: !0\n        };\n      }\n      for (n.method = i, n.arg = a;;) {\n        var c = n.delegate;\n        if (c) {\n          var u = maybeInvokeDelegate(c, n);\n          if (u) {\n            if (u === y) continue;\n            return u;\n          }\n        }\n        if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n          if (o === h) throw o = s, n.arg;\n          n.dispatchException(n.arg);\n        } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n        o = f;\n        var p = tryCatch(e, r, n);\n        if (\"normal\" === p.type) {\n          if (o = n.done ? s : l, p.arg === y) continue;\n          return {\n            value: p.arg,\n            done: n.done\n          };\n        }\n        \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n      }\n    };\n  }\n  function maybeInvokeDelegate(e, r) {\n    var n = r.method,\n      o = e.iterator[n];\n    if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n    var i = tryCatch(o, e.iterator, r.arg);\n    if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n    var a = i.arg;\n    return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n  }\n  function pushTryEntry(t) {\n    var e = {\n      tryLoc: t[0]\n    };\n    1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n  }\n  function resetTryEntry(t) {\n    var e = t.completion || {};\n    e.type = \"normal\", delete e.arg, t.completion = e;\n  }\n  function Context(t) {\n    this.tryEntries = [{\n      tryLoc: \"root\"\n    }], t.forEach(pushTryEntry, this), this.reset(!0);\n  }\n  function values(e) {\n    if (e || \"\" === e) {\n      var r = e[a];\n      if (r) return r.call(e);\n      if (\"function\" == typeof e.next) return e;\n      if (!isNaN(e.length)) {\n        var o = -1,\n          i = function next() {\n            for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n            return next.value = t, next.done = !0, next;\n          };\n        return i.next = i;\n      }\n    }\n    throw new TypeError(_typeof(e) + \" is not iterable\");\n  }\n  return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n    value: GeneratorFunctionPrototype,\n    configurable: !0\n  }), o(GeneratorFunctionPrototype, \"constructor\", {\n    value: GeneratorFunction,\n    configurable: !0\n  }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n    var e = \"function\" == typeof t && t.constructor;\n    return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n  }, e.mark = function (t) {\n    return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n  }, e.awrap = function (t) {\n    return {\n      __await: t\n    };\n  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n    return this;\n  }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n    void 0 === i && (i = Promise);\n    var a = new AsyncIterator(wrap(t, r, n, o), i);\n    return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n      return t.done ? t.value : a.next();\n    });\n  }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n    return this;\n  }), define(g, \"toString\", function () {\n    return \"[object Generator]\";\n  }), e.keys = function (t) {\n    var e = Object(t),\n      r = [];\n    for (var n in e) r.push(n);\n    return r.reverse(), function next() {\n      for (; r.length;) {\n        var t = r.pop();\n        if (t in e) return next.value = t, next.done = !1, next;\n      }\n      return next.done = !0, next;\n    };\n  }, e.values = values, Context.prototype = {\n    constructor: Context,\n    reset: function reset(e) {\n      if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n    },\n    stop: function stop() {\n      this.done = !0;\n      var t = this.tryEntries[0].completion;\n      if (\"throw\" === t.type) throw t.arg;\n      return this.rval;\n    },\n    dispatchException: function dispatchException(e) {\n      if (this.done) throw e;\n      var r = this;\n      function handle(n, o) {\n        return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n      }\n      for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n        var i = this.tryEntries[o],\n          a = i.completion;\n        if (\"root\" === i.tryLoc) return handle(\"end\");\n        if (i.tryLoc <= this.prev) {\n          var c = n.call(i, \"catchLoc\"),\n            u = n.call(i, \"finallyLoc\");\n          if (c && u) {\n            if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n            if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n          } else if (c) {\n            if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n          } else {\n            if (!u) throw Error(\"try statement without catch or finally\");\n            if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n          }\n        }\n      }\n    },\n    abrupt: function abrupt(t, e) {\n      for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n        var o = this.tryEntries[r];\n        if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n          var i = o;\n          break;\n        }\n      }\n      i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n      var a = i ? i.completion : {};\n      return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n    },\n    complete: function complete(t, e) {\n      if (\"throw\" === t.type) throw t.arg;\n      return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n    },\n    finish: function finish(t) {\n      for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n        var r = this.tryEntries[e];\n        if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n      }\n    },\n    \"catch\": function _catch(t) {\n      for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n        var r = this.tryEntries[e];\n        if (r.tryLoc === t) {\n          var n = r.completion;\n          if (\"throw\" === n.type) {\n            var o = n.arg;\n            resetTryEntry(r);\n          }\n          return o;\n        }\n      }\n      throw Error(\"illegal catch attempt\");\n    },\n    delegateYield: function delegateYield(e, r, n) {\n      return this.delegate = {\n        iterator: values(e),\n        resultName: r,\n        nextLoc: n\n      }, \"next\" === this.method && (this.arg = t), y;\n    }\n  }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../babel-loader/lib/index.js??ruleSet[1].rules[0]!./jquery.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] = ___EXPOSE_LOADER_IMPORT___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));","/* ========================================================================\n * Bootstrap: tooltip.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n+function ($) {\n  'use strict';\n\n  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']\n\n  var uriAttrs = [\n    'background',\n    'cite',\n    'href',\n    'itemtype',\n    'longdesc',\n    'poster',\n    'src',\n    'xlink:href'\n  ]\n\n  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\n  var DefaultWhitelist = {\n    // Global attributes allowed on any supplied element below.\n    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n    a: ['target', 'href', 'title', 'rel'],\n    area: [],\n    b: [],\n    br: [],\n    col: [],\n    code: [],\n    div: [],\n    em: [],\n    hr: [],\n    h1: [],\n    h2: [],\n    h3: [],\n    h4: [],\n    h5: [],\n    h6: [],\n    i: [],\n    img: ['src', 'alt', 'title', 'width', 'height'],\n    li: [],\n    ol: [],\n    p: [],\n    pre: [],\n    s: [],\n    small: [],\n    span: [],\n    sub: [],\n    sup: [],\n    strong: [],\n    u: [],\n    ul: []\n  }\n\n  /**\n   * A pattern that recognizes a commonly useful subset of URLs that are safe.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi\n\n  /**\n   * A pattern that matches safe data URLs. Only matches image, video and audio types.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n  var DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i\n\n  function allowedAttribute(attr, allowedAttributeList) {\n    var attrName = attr.nodeName.toLowerCase()\n\n    if ($.inArray(attrName, allowedAttributeList) !== -1) {\n      if ($.inArray(attrName, uriAttrs) !== -1) {\n        return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))\n      }\n\n      return true\n    }\n\n    var regExp = $(allowedAttributeList).filter(function (index, value) {\n      return value instanceof RegExp\n    })\n\n    // Check if a regular expression validates the attribute.\n    for (var i = 0, l = regExp.length; i < l; i++) {\n      if (attrName.match(regExp[i])) {\n        return true\n      }\n    }\n\n    return false\n  }\n\n  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {\n    if (unsafeHtml.length === 0) {\n      return unsafeHtml\n    }\n\n    if (sanitizeFn && typeof sanitizeFn === 'function') {\n      return sanitizeFn(unsafeHtml)\n    }\n\n    // IE 8 and below don't support createHTMLDocument\n    if (!document.implementation || !document.implementation.createHTMLDocument) {\n      return unsafeHtml\n    }\n\n    var createdDocument = document.implementation.createHTMLDocument('sanitization')\n    createdDocument.body.innerHTML = unsafeHtml\n\n    var whitelistKeys = $.map(whiteList, function (el, i) { return i })\n    var elements = $(createdDocument.body).find('*')\n\n    for (var i = 0, len = elements.length; i < len; i++) {\n      var el = elements[i]\n      var elName = el.nodeName.toLowerCase()\n\n      if ($.inArray(elName, whitelistKeys) === -1) {\n        el.parentNode.removeChild(el)\n\n        continue\n      }\n\n      var attributeList = $.map(el.attributes, function (el) { return el })\n      var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])\n\n      for (var j = 0, len2 = attributeList.length; j < len2; j++) {\n        if (!allowedAttribute(attributeList[j], whitelistedAttributes)) {\n          el.removeAttribute(attributeList[j].nodeName)\n        }\n      }\n    }\n\n    return createdDocument.body.innerHTML\n  }\n\n  // TOOLTIP PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Tooltip = function (element, options) {\n    this.type       = null\n    this.options    = null\n    this.enabled    = null\n    this.timeout    = null\n    this.hoverState = null\n    this.$element   = null\n    this.inState    = null\n\n    this.init('tooltip', element, options)\n  }\n\n  Tooltip.VERSION  = '3.4.1'\n\n  Tooltip.TRANSITION_DURATION = 150\n\n  Tooltip.DEFAULTS = {\n    animation: true,\n    placement: 'top',\n    selector: false,\n    template: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',\n    trigger: 'hover focus',\n    title: '',\n    delay: 0,\n    html: false,\n    container: false,\n    viewport: {\n      selector: 'body',\n      padding: 0\n    },\n    sanitize : true,\n    sanitizeFn : null,\n    whiteList : DefaultWhitelist\n  }\n\n  Tooltip.prototype.init = function (type, element, options) {\n    this.enabled   = true\n    this.type      = type\n    this.$element  = $(element)\n    this.options   = this.getOptions(options)\n    this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))\n    this.inState   = { click: false, hover: false, focus: false }\n\n    if (this.$element[0] instanceof document.constructor && !this.options.selector) {\n      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')\n    }\n\n    var triggers = this.options.trigger.split(' ')\n\n    for (var i = triggers.length; i--;) {\n      var trigger = triggers[i]\n\n      if (trigger == 'click') {\n        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n      } else if (trigger != 'manual') {\n        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'\n        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'\n\n        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n      }\n    }\n\n    this.options.selector ?\n      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n      this.fixTitle()\n  }\n\n  Tooltip.prototype.getDefaults = function () {\n    return Tooltip.DEFAULTS\n  }\n\n  Tooltip.prototype.getOptions = function (options) {\n    var dataAttributes = this.$element.data()\n\n    for (var dataAttr in dataAttributes) {\n      if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {\n        delete dataAttributes[dataAttr]\n      }\n    }\n\n    options = $.extend({}, this.getDefaults(), dataAttributes, options)\n\n    if (options.delay && typeof options.delay == 'number') {\n      options.delay = {\n        show: options.delay,\n        hide: options.delay\n      }\n    }\n\n    if (options.sanitize) {\n      options.template = sanitizeHtml(options.template, options.whiteList, options.sanitizeFn)\n    }\n\n    return options\n  }\n\n  Tooltip.prototype.getDelegateOptions = function () {\n    var options  = {}\n    var defaults = this.getDefaults()\n\n    this._options && $.each(this._options, function (key, value) {\n      if (defaults[key] != value) options[key] = value\n    })\n\n    return options\n  }\n\n  Tooltip.prototype.enter = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true\n    }\n\n    if (self.tip().hasClass('in') || self.hoverState == 'in') {\n      self.hoverState = 'in'\n      return\n    }\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'in'\n\n    if (!self.options.delay || !self.options.delay.show) return self.show()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'in') self.show()\n    }, self.options.delay.show)\n  }\n\n  Tooltip.prototype.isInStateTrue = function () {\n    for (var key in this.inState) {\n      if (this.inState[key]) return true\n    }\n\n    return false\n  }\n\n  Tooltip.prototype.leave = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false\n    }\n\n    if (self.isInStateTrue()) return\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'out'\n\n    if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'out') self.hide()\n    }, self.options.delay.hide)\n  }\n\n  Tooltip.prototype.show = function () {\n    var e = $.Event('show.bs.' + this.type)\n\n    if (this.hasContent() && this.enabled) {\n      this.$element.trigger(e)\n\n      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])\n      if (e.isDefaultPrevented() || !inDom) return\n      var that = this\n\n      var $tip = this.tip()\n\n      var tipId = this.getUID(this.type)\n\n      this.setContent()\n      $tip.attr('id', tipId)\n      this.$element.attr('aria-describedby', tipId)\n\n      if (this.options.animation) $tip.addClass('fade')\n\n      var placement = typeof this.options.placement == 'function' ?\n        this.options.placement.call(this, $tip[0], this.$element[0]) :\n        this.options.placement\n\n      var autoToken = /\\s?auto?\\s?/i\n      var autoPlace = autoToken.test(placement)\n      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n      $tip\n        .detach()\n        .css({ top: 0, left: 0, display: 'block' })\n        .addClass(placement)\n        .data('bs.' + this.type, this)\n\n      this.options.container ? $tip.appendTo($(document).find(this.options.container)) : $tip.insertAfter(this.$element)\n      this.$element.trigger('inserted.bs.' + this.type)\n\n      var pos          = this.getPosition()\n      var actualWidth  = $tip[0].offsetWidth\n      var actualHeight = $tip[0].offsetHeight\n\n      if (autoPlace) {\n        var orgPlacement = placement\n        var viewportDim = this.getPosition(this.$viewport)\n\n        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :\n                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :\n                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :\n                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :\n                    placement\n\n        $tip\n          .removeClass(orgPlacement)\n          .addClass(placement)\n      }\n\n      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n      this.applyPlacement(calculatedOffset, placement)\n\n      var complete = function () {\n        var prevHoverState = that.hoverState\n        that.$element.trigger('shown.bs.' + that.type)\n        that.hoverState = null\n\n        if (prevHoverState == 'out') that.leave(that)\n      }\n\n      $.support.transition && this.$tip.hasClass('fade') ?\n        $tip\n          .one('bsTransitionEnd', complete)\n          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n        complete()\n    }\n  }\n\n  Tooltip.prototype.applyPlacement = function (offset, placement) {\n    var $tip   = this.tip()\n    var width  = $tip[0].offsetWidth\n    var height = $tip[0].offsetHeight\n\n    // manually read margins because getBoundingClientRect includes difference\n    var marginTop = parseInt($tip.css('margin-top'), 10)\n    var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n    // we must check for NaN for ie 8/9\n    if (isNaN(marginTop))  marginTop  = 0\n    if (isNaN(marginLeft)) marginLeft = 0\n\n    offset.top  += marginTop\n    offset.left += marginLeft\n\n    // $.fn.offset doesn't round pixel values\n    // so we use setOffset directly with our own function B-0\n    $.offset.setOffset($tip[0], $.extend({\n      using: function (props) {\n        $tip.css({\n          top: Math.round(props.top),\n          left: Math.round(props.left)\n        })\n      }\n    }, offset), 0)\n\n    $tip.addClass('in')\n\n    // check to see if placing tip in new offset caused the tip to resize itself\n    var actualWidth  = $tip[0].offsetWidth\n    var actualHeight = $tip[0].offsetHeight\n\n    if (placement == 'top' && actualHeight != height) {\n      offset.top = offset.top + height - actualHeight\n    }\n\n    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)\n\n    if (delta.left) offset.left += delta.left\n    else offset.top += delta.top\n\n    var isVertical          = /top|bottom/.test(placement)\n    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight\n    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'\n\n    $tip.offset(offset)\n    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)\n  }\n\n  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {\n    this.arrow()\n      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')\n      .css(isVertical ? 'top' : 'left', '')\n  }\n\n  Tooltip.prototype.setContent = function () {\n    var $tip  = this.tip()\n    var title = this.getTitle()\n\n    if (this.options.html) {\n      if (this.options.sanitize) {\n        title = sanitizeHtml(title, this.options.whiteList, this.options.sanitizeFn)\n      }\n\n      $tip.find('.tooltip-inner').html(title)\n    } else {\n      $tip.find('.tooltip-inner').text(title)\n    }\n\n    $tip.removeClass('fade in top bottom left right')\n  }\n\n  Tooltip.prototype.hide = function (callback) {\n    var that = this\n    var $tip = $(this.$tip)\n    var e    = $.Event('hide.bs.' + this.type)\n\n    function complete() {\n      if (that.hoverState != 'in') $tip.detach()\n      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.\n        that.$element\n          .removeAttr('aria-describedby')\n          .trigger('hidden.bs.' + that.type)\n      }\n      callback && callback()\n    }\n\n    this.$element.trigger(e)\n\n    if (e.isDefaultPrevented()) return\n\n    $tip.removeClass('in')\n\n    $.support.transition && $tip.hasClass('fade') ?\n      $tip\n        .one('bsTransitionEnd', complete)\n        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n      complete()\n\n    this.hoverState = null\n\n    return this\n  }\n\n  Tooltip.prototype.fixTitle = function () {\n    var $e = this.$element\n    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {\n      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n    }\n  }\n\n  Tooltip.prototype.hasContent = function () {\n    return this.getTitle()\n  }\n\n  Tooltip.prototype.getPosition = function ($element) {\n    $element   = $element || this.$element\n\n    var el     = $element[0]\n    var isBody = el.tagName == 'BODY'\n\n    var elRect    = el.getBoundingClientRect()\n    if (elRect.width == null) {\n      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\n      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\n    }\n    var isSvg = window.SVGElement && el instanceof window.SVGElement\n    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.\n    // See https://github.com/twbs/bootstrap/issues/20280\n    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())\n    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }\n    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null\n\n    return $.extend({}, elRect, scroll, outerDims, elOffset)\n  }\n\n  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }\n\n  }\n\n  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {\n    var delta = { top: 0, left: 0 }\n    if (!this.$viewport) return delta\n\n    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0\n    var viewportDimensions = this.getPosition(this.$viewport)\n\n    if (/right|left/.test(placement)) {\n      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll\n      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight\n      if (topEdgeOffset < viewportDimensions.top) { // top overflow\n        delta.top = viewportDimensions.top - topEdgeOffset\n      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow\n        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset\n      }\n    } else {\n      var leftEdgeOffset  = pos.left - viewportPadding\n      var rightEdgeOffset = pos.left + viewportPadding + actualWidth\n      if (leftEdgeOffset < viewportDimensions.left) { // left overflow\n        delta.left = viewportDimensions.left - leftEdgeOffset\n      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow\n        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset\n      }\n    }\n\n    return delta\n  }\n\n  Tooltip.prototype.getTitle = function () {\n    var title\n    var $e = this.$element\n    var o  = this.options\n\n    title = $e.attr('data-original-title')\n      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)\n\n    return title\n  }\n\n  Tooltip.prototype.getUID = function (prefix) {\n    do prefix += ~~(Math.random() * 1000000)\n    while (document.getElementById(prefix))\n    return prefix\n  }\n\n  Tooltip.prototype.tip = function () {\n    if (!this.$tip) {\n      this.$tip = $(this.options.template)\n      if (this.$tip.length != 1) {\n        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')\n      }\n    }\n    return this.$tip\n  }\n\n  Tooltip.prototype.arrow = function () {\n    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))\n  }\n\n  Tooltip.prototype.enable = function () {\n    this.enabled = true\n  }\n\n  Tooltip.prototype.disable = function () {\n    this.enabled = false\n  }\n\n  Tooltip.prototype.toggleEnabled = function () {\n    this.enabled = !this.enabled\n  }\n\n  Tooltip.prototype.toggle = function (e) {\n    var self = this\n    if (e) {\n      self = $(e.currentTarget).data('bs.' + this.type)\n      if (!self) {\n        self = new this.constructor(e.currentTarget, this.getDelegateOptions())\n        $(e.currentTarget).data('bs.' + this.type, self)\n      }\n    }\n\n    if (e) {\n      self.inState.click = !self.inState.click\n      if (self.isInStateTrue()) self.enter(self)\n      else self.leave(self)\n    } else {\n      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n    }\n  }\n\n  Tooltip.prototype.destroy = function () {\n    var that = this\n    clearTimeout(this.timeout)\n    this.hide(function () {\n      that.$element.off('.' + that.type).removeData('bs.' + that.type)\n      if (that.$tip) {\n        that.$tip.detach()\n      }\n      that.$tip = null\n      that.$arrow = null\n      that.$viewport = null\n      that.$element = null\n    })\n  }\n\n  Tooltip.prototype.sanitizeHtml = function (unsafeHtml) {\n    return sanitizeHtml(unsafeHtml, this.options.whiteList, this.options.sanitizeFn)\n  }\n\n  // TOOLTIP PLUGIN DEFINITION\n  // =========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.tooltip')\n      var options = typeof option == 'object' && option\n\n      if (!data && /destroy|hide/.test(option)) return\n      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.tooltip\n\n  $.fn.tooltip             = Plugin\n  $.fn.tooltip.Constructor = Tooltip\n\n\n  // TOOLTIP NO CONFLICT\n  // ===================\n\n  $.fn.tooltip.noConflict = function () {\n    $.fn.tooltip = old\n    return this\n  }\n\n}(jQuery);\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\n","/* ========================================================================\n * Bootstrap: dropdown.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // DROPDOWN CLASS DEFINITION\n  // =========================\n\n  var backdrop = '.dropdown-backdrop'\n  var toggle   = '[data-toggle=\"dropdown\"]'\n  var Dropdown = function (element) {\n    $(element).on('click.bs.dropdown', this.toggle)\n  }\n\n  Dropdown.VERSION = '3.4.1'\n\n  function getParent($this) {\n    var selector = $this.attr('data-target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    var $parent = selector !== '#' ? $(document).find(selector) : null\n\n    return $parent && $parent.length ? $parent : $this.parent()\n  }\n\n  function clearMenus(e) {\n    if (e && e.which === 3) return\n    $(backdrop).remove()\n    $(toggle).each(function () {\n      var $this         = $(this)\n      var $parent       = getParent($this)\n      var relatedTarget = { relatedTarget: this }\n\n      if (!$parent.hasClass('open')) return\n\n      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\n\n      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this.attr('aria-expanded', 'false')\n      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))\n    })\n  }\n\n  Dropdown.prototype.toggle = function (e) {\n    var $this = $(this)\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    clearMenus()\n\n    if (!isActive) {\n      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n        // if mobile we use a backdrop because click events don't delegate\n        $(document.createElement('div'))\n          .addClass('dropdown-backdrop')\n          .insertAfter($(this))\n          .on('click', clearMenus)\n      }\n\n      var relatedTarget = { relatedTarget: this }\n      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this\n        .trigger('focus')\n        .attr('aria-expanded', 'true')\n\n      $parent\n        .toggleClass('open')\n        .trigger($.Event('shown.bs.dropdown', relatedTarget))\n    }\n\n    return false\n  }\n\n  Dropdown.prototype.keydown = function (e) {\n    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n    var $this = $(this)\n\n    e.preventDefault()\n    e.stopPropagation()\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    if (!isActive && e.which != 27 || isActive && e.which == 27) {\n      if (e.which == 27) $parent.find(toggle).trigger('focus')\n      return $this.trigger('click')\n    }\n\n    var desc = ' li:not(.disabled):visible a'\n    var $items = $parent.find('.dropdown-menu' + desc)\n\n    if (!$items.length) return\n\n    var index = $items.index(e.target)\n\n    if (e.which == 38 && index > 0)                 index--         // up\n    if (e.which == 40 && index < $items.length - 1) index++         // down\n    if (!~index)                                    index = 0\n\n    $items.eq(index).trigger('focus')\n  }\n\n\n  // DROPDOWN PLUGIN DEFINITION\n  // ==========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.dropdown')\n\n      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  var old = $.fn.dropdown\n\n  $.fn.dropdown             = Plugin\n  $.fn.dropdown.Constructor = Dropdown\n\n\n  // DROPDOWN NO CONFLICT\n  // ====================\n\n  $.fn.dropdown.noConflict = function () {\n    $.fn.dropdown = old\n    return this\n  }\n\n\n  // APPLY TO STANDARD DROPDOWN ELEMENTS\n  // ===================================\n\n  $(document)\n    .on('click.bs.dropdown.data-api', clearMenus)\n    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n","\"use strict\"\n\nvar hyperscript = require(\"./render/hyperscript\")\n\nhyperscript.trust = require(\"./render/trust\")\nhyperscript.fragment = require(\"./render/fragment\")\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, requestAnimationFrame, console)\n","function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\"\n\nmodule.exports = Object.assign || function(target, source) {\n\tif(source) Object.keys(source).forEach(function(key) { target[key] = source[key] })\n}\n","\"use strict\"\n\nvar parseQueryString = require(\"../querystring/parse\")\n\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n\tvar queryIndex = url.indexOf(\"?\")\n\tvar hashIndex = url.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? url.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\")\n\n\tif (!path) path = \"/\"\n\telse {\n\t\tif (path[0] !== \"/\") path = \"/\" + path\n\t\tif (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1)\n\t}\n\treturn {\n\t\tpath: path,\n\t\tparams: queryIndex < 0\n\t\t\t? {}\n\t\t\t: parseQueryString(url.slice(queryIndex + 1, queryEnd)),\n\t}\n}\n","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(window, mountRedraw)\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./dayjs.min.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"dayjs\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"dayjs\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","\"use strict\"\n\nfunction Vnode(tag, key, attrs, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node == null || typeof node === \"boolean\") return null\n\tif (typeof node === \"object\") return node\n\treturn Vnode(\"#\", undefined, undefined, String(node), undefined, undefined)\n}\nVnode.normalizeChildren = function(input) {\n\tvar children = []\n\tif (input.length) {\n\t\tvar isKeyed = input[0] != null && input[0].key != null\n\t\t// Note: this is a *very* perf-sensitive check.\n\t\t// Fun fact: merging the loop like this is somehow faster than splitting\n\t\t// it, noticeably so.\n\t\tfor (var i = 1; i < input.length; i++) {\n\t\t\tif ((input[i] != null && input[i].key != null) !== isKeyed) {\n\t\t\t\tthrow new TypeError(\"Vnodes must either always have keys or never have keys!\")\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < input.length; i++) {\n\t\t\tchildren[i] = Vnode.normalize(input[i])\n\t\t}\n\t}\n\treturn children\n}\n\nmodule.exports = Vnode\n","/*!\r\n * Color Thief v2.0\r\n * by Lokesh Dhakar - http://www.lokeshdhakar.com\r\n *\r\n * Thanks\r\n * ------\r\n * Nick Rabinowitz - For creating quantize.js.\r\n * John Schulz - For clean up and optimization. @JFSIII\r\n * Nathan Spady - For adding drag and drop support to the demo page.\r\n *\r\n * License\r\n * -------\r\n * Copyright 2011, 2015 Lokesh Dhakar\r\n * Released under the MIT license\r\n * https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE\r\n *\r\n */\r\nvar CanvasImage=function(a){this.canvas=document.createElement(\"canvas\"),this.context=this.canvas.getContext(\"2d\"),document.body.appendChild(this.canvas),this.width=this.canvas.width=a.width,this.height=this.canvas.height=a.height,this.context.drawImage(a,0,0,this.width,this.height)};CanvasImage.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},CanvasImage.prototype.update=function(a){this.context.putImageData(a,0,0)},CanvasImage.prototype.getPixelCount=function(){return this.width*this.height},CanvasImage.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},CanvasImage.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var ColorThief=function(){};/*!\r\n * quantize.js Copyright 2008 Nick Rabinowitz.\r\n * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php\r\n */\r\n/*!\r\n * Block below copied from Protovis: http://mbostock.github.com/protovis/\r\n * Copyright 2010 Stanford Visualization Group\r\n * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php\r\n */\r\nif(ColorThief.prototype.getColor=function(a,b){var c=this.getPalette(a,5,b),d=c[0];return d},ColorThief.prototype.getPalette=function(a,b,c){\"undefined\"==typeof b&&(b=10),(\"undefined\"==typeof c||1>c)&&(c=10);for(var d,e,f,g,h,i=new CanvasImage(a),j=i.getImageData(),k=j.data,l=i.getPixelCount(),m=[],n=0;l>n;n+=c)d=4*n,e=k[d+0],f=k[d+1],g=k[d+2],h=k[d+3],h>=125&&(e>250&&f>250&&g>250||m.push([e,f,g]));var o=MMCQ.quantize(m,b),p=o?o.palette():null;return i.removeCanvas(),p},!pv)var pv={map:function(a,b){var c={};return b?a.map(function(a,d){return c.index=d,b.call(c,a)}):a.slice()},naturalOrder:function(a,b){return b>a?-1:a>b?1:0},sum:function(a,b){var c={};return a.reduce(b?function(a,d,e){return c.index=e,a+b.call(c,d)}:function(a,b){return a+b},0)},max:function(a,b){return Math.max.apply(null,b?pv.map(a,b):a)}};var MMCQ=function(){function a(a,b,c){return(a<<2*i)+(b<<i)+c}function b(a){function b(){c.sort(a),d=!0}var c=[],d=!1;return{push:function(a){c.push(a),d=!1},peek:function(a){return d||b(),void 0===a&&(a=c.length-1),c[a]},pop:function(){return d||b(),c.pop()},size:function(){return c.length},map:function(a){return c.map(a)},debug:function(){return d||b(),c}}}function c(a,b,c,d,e,f,g){var h=this;h.r1=a,h.r2=b,h.g1=c,h.g2=d,h.b1=e,h.b2=f,h.histo=g}function d(){this.vboxes=new b(function(a,b){return pv.naturalOrder(a.vbox.count()*a.vbox.volume(),b.vbox.count()*b.vbox.volume())})}function e(b){var c,d,e,f,g=1<<3*i,h=new Array(g);return b.forEach(function(b){d=b[0]>>j,e=b[1]>>j,f=b[2]>>j,c=a(d,e,f),h[c]=(h[c]||0)+1}),h}function f(a,b){var d,e,f,g=1e6,h=0,i=1e6,k=0,l=1e6,m=0;return a.forEach(function(a){d=a[0]>>j,e=a[1]>>j,f=a[2]>>j,g>d?g=d:d>h&&(h=d),i>e?i=e:e>k&&(k=e),l>f?l=f:f>m&&(m=f)}),new c(g,h,i,k,l,m,b)}function g(b,c){function d(a){var b,d,e,f,g,h=a+\"1\",j=a+\"2\",k=0;for(i=c[h];i<=c[j];i++)if(o[i]>n/2){for(e=c.copy(),f=c.copy(),b=i-c[h],d=c[j]-i,g=d>=b?Math.min(c[j]-1,~~(i+d/2)):Math.max(c[h],~~(i-1-b/2));!o[g];)g++;for(k=p[g];!k&&o[g-1];)k=p[--g];return e[j]=g,f[h]=e[j]+1,[e,f]}}if(c.count()){var e=c.r2-c.r1+1,f=c.g2-c.g1+1,g=c.b2-c.b1+1,h=pv.max([e,f,g]);if(1==c.count())return[c.copy()];var i,j,k,l,m,n=0,o=[],p=[];if(h==e)for(i=c.r1;i<=c.r2;i++){for(l=0,j=c.g1;j<=c.g2;j++)for(k=c.b1;k<=c.b2;k++)m=a(i,j,k),l+=b[m]||0;n+=l,o[i]=n}else if(h==f)for(i=c.g1;i<=c.g2;i++){for(l=0,j=c.r1;j<=c.r2;j++)for(k=c.b1;k<=c.b2;k++)m=a(j,i,k),l+=b[m]||0;n+=l,o[i]=n}else for(i=c.b1;i<=c.b2;i++){for(l=0,j=c.r1;j<=c.r2;j++)for(k=c.g1;k<=c.g2;k++)m=a(j,k,i),l+=b[m]||0;n+=l,o[i]=n}return o.forEach(function(a,b){p[b]=n-a}),d(h==e?\"r\":h==f?\"g\":\"b\")}}function h(a,c){function h(a,b){for(var c,d=1,e=0;k>e;)if(c=a.pop(),c.count()){var f=g(i,c),h=f[0],j=f[1];if(!h)return;if(a.push(h),j&&(a.push(j),d++),d>=b)return;if(e++>k)return}else a.push(c),e++}if(!a.length||2>c||c>256)return!1;var i=e(a),j=0;i.forEach(function(){j++});var m=f(a,i),n=new b(function(a,b){return pv.naturalOrder(a.count(),b.count())});n.push(m),h(n,l*c);for(var o=new b(function(a,b){return pv.naturalOrder(a.count()*a.volume(),b.count()*b.volume())});n.size();)o.push(n.pop());h(o,c-o.size());for(var p=new d;o.size();)p.push(o.pop());return p}var i=5,j=8-i,k=1e3,l=.75;return c.prototype={volume:function(a){var b=this;return(!b._volume||a)&&(b._volume=(b.r2-b.r1+1)*(b.g2-b.g1+1)*(b.b2-b.b1+1)),b._volume},count:function(b){var c=this,d=c.histo;if(!c._count_set||b){var e,f,g,h=0;for(e=c.r1;e<=c.r2;e++)for(f=c.g1;f<=c.g2;f++)for(g=c.b1;g<=c.b2;g++)index=a(e,f,g),h+=d[index]||0;c._count=h,c._count_set=!0}return c._count},copy:function(){var a=this;return new c(a.r1,a.r2,a.g1,a.g2,a.b1,a.b2,a.histo)},avg:function(b){var c=this,d=c.histo;if(!c._avg||b){var e,f,g,h,j,k=0,l=1<<8-i,m=0,n=0,o=0;for(f=c.r1;f<=c.r2;f++)for(g=c.g1;g<=c.g2;g++)for(h=c.b1;h<=c.b2;h++)j=a(f,g,h),e=d[j]||0,k+=e,m+=e*(f+.5)*l,n+=e*(g+.5)*l,o+=e*(h+.5)*l;k?c._avg=[~~(m/k),~~(n/k),~~(o/k)]:c._avg=[~~(l*(c.r1+c.r2+1)/2),~~(l*(c.g1+c.g2+1)/2),~~(l*(c.b1+c.b2+1)/2)]}return c._avg},contains:function(a){var b=this,c=a[0]>>j;return gval=a[1]>>j,bval=a[2]>>j,c>=b.r1&&c<=b.r2&&gval>=b.g1&&gval<=b.g2&&bval>=b.b1&&bval<=b.b2}},d.prototype={push:function(a){this.vboxes.push({vbox:a,color:a.avg()})},palette:function(){return this.vboxes.map(function(a){return a.color})},size:function(){return this.vboxes.size()},map:function(a){for(var b=this.vboxes,c=0;c<b.size();c++)if(b.peek(c).vbox.contains(a))return b.peek(c).color;return this.nearest(a)},nearest:function(a){for(var b,c,d,e=this.vboxes,f=0;f<e.size();f++)c=Math.sqrt(Math.pow(a[0]-e.peek(f).color[0],2)+Math.pow(a[1]-e.peek(f).color[1],2)+Math.pow(a[2]-e.peek(f).color[2],2)),(b>c||void 0===b)&&(b=c,d=e.peek(f).color);return d},forcebw:function(){var a=this.vboxes;a.sort(function(a,b){return pv.naturalOrder(pv.sum(a.color),pv.sum(b.color))});var b=a[0].color;b[0]<5&&b[1]<5&&b[2]<5&&(a[0].color=[0,0,0]);var c=a.length-1,d=a[c].color;d[0]>251&&d[1]>251&&d[2]>251&&(a[c].color=[255,255,255])}},{quantize:h}}();\r\nmodule.exports = ColorThief;\r\n","/* jshint browser: true */\n\n(function () {\n\n// We'll copy the properties below into the mirror div.\n// Note that some browsers, such as Firefox, do not concatenate properties\n// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),\n// so we have to list every single property explicitly.\nvar properties = [\n  'direction',  // RTL support\n  'boxSizing',\n  'width',  // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does\n  'height',\n  'overflowX',\n  'overflowY',  // copy the scrollbar for IE\n\n  'borderTopWidth',\n  'borderRightWidth',\n  'borderBottomWidth',\n  'borderLeftWidth',\n  'borderStyle',\n\n  'paddingTop',\n  'paddingRight',\n  'paddingBottom',\n  'paddingLeft',\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/font\n  'fontStyle',\n  'fontVariant',\n  'fontWeight',\n  'fontStretch',\n  'fontSize',\n  'fontSizeAdjust',\n  'lineHeight',\n  'fontFamily',\n\n  'textAlign',\n  'textTransform',\n  'textIndent',\n  'textDecoration',  // might not make a difference, but better be safe\n\n  'letterSpacing',\n  'wordSpacing',\n\n  'tabSize',\n  'MozTabSize'\n\n];\n\nvar isBrowser = (typeof window !== 'undefined');\nvar isFirefox = (isBrowser && window.mozInnerScreenX != null);\n\nfunction getCaretCoordinates(element, position, options) {\n  if (!isBrowser) {\n    throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser');\n  }\n\n  var debug = options && options.debug || false;\n  if (debug) {\n    var el = document.querySelector('#input-textarea-caret-position-mirror-div');\n    if (el) el.parentNode.removeChild(el);\n  }\n\n  // The mirror div will replicate the textarea's style\n  var div = document.createElement('div');\n  div.id = 'input-textarea-caret-position-mirror-div';\n  document.body.appendChild(div);\n\n  var style = div.style;\n  var computed = window.getComputedStyle ? window.getComputedStyle(element) : element.currentStyle;  // currentStyle for IE < 9\n  var isInput = element.nodeName === 'INPUT';\n\n  // Default textarea styles\n  style.whiteSpace = 'pre-wrap';\n  if (!isInput)\n    style.wordWrap = 'break-word';  // only for textarea-s\n\n  // Position off-screen\n  style.position = 'absolute';  // required to return coordinates properly\n  if (!debug)\n    style.visibility = 'hidden';  // not 'display: none' because we want rendering\n\n  // Transfer the element's properties to the div\n  properties.forEach(function (prop) {\n    if (isInput && prop === 'lineHeight') {\n      // Special case for <input>s because text is rendered centered and line height may be != height\n      style.lineHeight = computed.height;\n    } else {\n      style[prop] = computed[prop];\n    }\n  });\n\n  if (isFirefox) {\n    // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\n    if (element.scrollHeight > parseInt(computed.height))\n      style.overflowY = 'scroll';\n  } else {\n    style.overflow = 'hidden';  // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\n  }\n\n  div.textContent = element.value.substring(0, position);\n  // The second special handling for input type=\"text\" vs textarea:\n  // spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037\n  if (isInput)\n    div.textContent = div.textContent.replace(/\\s/g, '\\u00a0');\n\n  var span = document.createElement('span');\n  // Wrapping must be replicated *exactly*, including when a long word gets\n  // onto the next line, with whitespace at the end of the line before (#7).\n  // The  *only* reliable way to do that is to copy the *entire* rest of the\n  // textarea's content into the <span> created at the caret position.\n  // For inputs, just '.' would be enough, but no need to bother.\n  span.textContent = element.value.substring(position) || '.';  // || because a completely empty faux span doesn't render at all\n  div.appendChild(span);\n\n  var coordinates = {\n    top: span.offsetTop + parseInt(computed['borderTopWidth']),\n    left: span.offsetLeft + parseInt(computed['borderLeftWidth']),\n    height: parseInt(computed['lineHeight'])\n  };\n\n  if (debug) {\n    span.style.backgroundColor = '#aaa';\n  } else {\n    document.body.removeChild(div);\n  }\n\n  return coordinates;\n}\n\nif (typeof module != 'undefined' && typeof module.exports != 'undefined') {\n  module.exports = getCaretCoordinates;\n} else if(isBrowser) {\n  window.getCaretCoordinates = getCaretCoordinates;\n}\n\n}());\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function($window) {\n\tvar $doc = $window && $window.document\n\tvar currentRedraw\n\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\n\t//sanity check to discourage people from doing `vnode.state = ...`\n\tfunction checkState(vnode, original) {\n\t\tif (vnode.state !== original) throw new Error(\"`vnode.state` must not be modified\")\n\t}\n\n\t//Note: the hook is passed as the `this` argument to allow proxying the\n\t//arguments without requiring a full array allocation to do so. It also\n\t//takes advantage of the fact the current `vnode` is the first argument in\n\t//all lifecycle methods.\n\tfunction callHook(vnode) {\n\t\tvar original = vnode.state\n\t\ttry {\n\t\t\treturn this.apply(original, arguments)\n\t\t} finally {\n\t\t\tcheckState(vnode, original)\n\t\t}\n\t}\n\n\t// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n\t// inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n\tfunction activeElement() {\n\t\ttry {\n\t\t\treturn $doc.activeElement\n\t\t} catch (e) {\n\t\t\treturn null\n\t\t}\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": createText(parent, vnode, nextSibling); break\n\t\t\t\tcase \"<\": createHTML(parent, vnode, ns, nextSibling); break\n\t\t\t\tcase \"[\": createFragment(parent, vnode, hooks, ns, nextSibling); break\n\t\t\t\tdefault: createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t}\n\tvar possibleParents = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}\n\tfunction createHTML(parent, vnode, ns, nextSibling) {\n\t\tvar match = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\t// not using the proper parent makes the child element(s) vanish.\n\t\t//     var div = document.createElement(\"div\")\n\t\t//     div.innerHTML = \"<td>i</td><td>j</td>\"\n\t\t//     console.log(div.innerHTML)\n\t\t// --> \"ij\", no <td> in sight.\n\t\tvar temp = $doc.createElement(possibleParents[match[1]] || \"div\")\n\t\tif (ns === \"http://www.w3.org/2000/svg\") {\n\t\t\ttemp.innerHTML = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\" + vnode.children + \"</svg>\"\n\t\t\ttemp = temp.firstChild\n\t\t} else {\n\t\t\ttemp.innerHTML = vnode.children\n\t\t}\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\t// Capture nodes to remove, so we don't confuse them.\n\t\tvnode.instance = []\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tvnode.instance.push(child)\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs = vnode.attrs\n\t\tvar is = attrs && attrs.is\n\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\n\t\tif (attrs != null) {\n\t\t\tsetAttrs(vnode, attrs, ns)\n\t\t}\n\n\t\tinsertNode(parent, element, nextSibling)\n\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tif (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs)\n\t\t\t}\n\t\t}\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tinitLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tcreateNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t}\n\t}\n\n\t//update\n\t/**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t *                               this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t *                                       fragment that is not the last item in its\n\t *                                       parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */\n\t// This function diffs and patches lists of vnodes, both keyed and unkeyed.\n\t//\n\t// We will:\n\t//\n\t// 1. describe its general structure\n\t// 2. focus on the diff algorithm optimizations\n\t// 3. discuss DOM node operations.\n\n\t// ## Overview:\n\t//\n\t// The updateNodes() function:\n\t// - deals with trivial cases\n\t// - determines whether the lists are keyed or unkeyed based on the first non-null node\n\t//   of each list.\n\t// - diffs them and patches the DOM if needed (that's the brunt of the code)\n\t// - manages the leftovers: after diffing, are there:\n\t//   - old nodes left to remove?\n\t// \t - new nodes to insert?\n\t// \t deal with them!\n\t//\n\t// The lists are only iterated over once, with an exception for the nodes in `old` that\n\t// are visited in the fourth part of the diff and in the `removeNodes` loop.\n\n\t// ## Diffing\n\t//\n\t// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n\t// may be good for context on longest increasing subsequence-based logic for moving nodes.\n\t//\n\t// In order to diff keyed lists, one has to\n\t//\n\t// 1) match nodes in both lists, per key, and update them accordingly\n\t// 2) create the nodes present in the new list, but absent in the old one\n\t// 3) remove the nodes present in the old list, but absent in the new one\n\t// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n\t//\n\t// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n\t// over the new list and for each new vnode, find the corresponding vnode in the old list using\n\t// the map.\n\t// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n\t// and must be created.\n\t// For the removals, we actually remove the nodes that have been updated from the old list.\n\t// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n\t// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n\t// algorithm.\n\t//\n\t// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n\t// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n\t// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n\t//  match the above lists, for example).\n\t//\n\t// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n\t// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n\t//\n\t// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n\t// the longest increasing subsequence *of old nodes still present in the new list*).\n\t//\n\t// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n\t// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n\t// the `LIS` and a temporary one to create the LIS).\n\t//\n\t// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n\t// the LIS and can be updated without moving them.\n\t//\n\t// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n\t// the exception of the last node if the list is fully reversed).\n\t//\n\t// ## Finding the next sibling.\n\t//\n\t// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n\t// When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n\t// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n\t// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n\t//\n\t// In the other scenarios (swaps, upwards traversal, map-based diff),\n\t// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n\t// bottom part of the new vnodes list, and we can use the `v.dom`  value of the previous node\n\t// as the next sibling (cached in the `nextSibling` variable).\n\n\n\t// ## DOM node moves\n\t//\n\t// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n\t// this is not the case if the node moved (second and fourth part of the diff algo). We move\n\t// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n\t// variable rather than fetching it using `getNextSibling()`.\n\t//\n\t// The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n\t// like #1791 and #1999. We need to be smarter about those situations where adjascent old\n\t// nodes remain together in the new list in a way that isn't covered by parts one and\n\t// three of the diff algo.\n\n\tfunction updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length)\n\t\telse {\n\t\t\tvar isOldKeyed = old[0] != null && old[0].key != null\n\t\t\tvar isKeyed = vnodes[0] != null && vnodes[0].key != null\n\t\t\tvar start = 0, oldStart = 0\n\t\t\tif (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++\n\t\t\tif (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++\n\t\t\tif (isKeyed === null && isOldKeyed == null) return // both lists are full of nulls\n\t\t\tif (isOldKeyed !== isKeyed) {\n\t\t\t\tremoveNodes(parent, old, oldStart, old.length)\n\t\t\t\tcreateNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else if (!isKeyed) {\n\t\t\t\t// Don't index past the end of either list (causes deopts).\n\t\t\t\tvar commonLength = old.length < vnodes.length ? old.length : vnodes.length\n\t\t\t\t// Rewind if necessary to the first non-null index on either side.\n\t\t\t\t// We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n\t\t\t\t// but that would be optimizing for sparse lists which are more rare than dense ones.\n\t\t\t\tstart = start < oldStart ? start : oldStart\n\t\t\t\tfor (; start < commonLength; start++) {\n\t\t\t\t\to = old[start]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o === v || o == null && v == null) continue\n\t\t\t\t\telse if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling))\n\t\t\t\t\telse if (v == null) removeNode(parent, o)\n\t\t\t\t\telse updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\tif (old.length > commonLength) removeNodes(parent, old, start, old.length)\n\t\t\t\tif (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else {\n\t\t\t\t// keyed diff\n\t\t\t\tvar oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling\n\n\t\t\t\t// bottom-up\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\t// top-down\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o.key !== v.key) break\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tif (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\t// swaps and list reversals\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (start === end) break\n\t\t\t\t\tif (o.key !== ve.key || oe.key !== v.key) break\n\t\t\t\t\ttopSibling = getNextSibling(old, oldStart, nextSibling)\n\t\t\t\t\tmoveNodes(parent, oe, topSibling)\n\t\t\t\t\tif (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns)\n\t\t\t\t\tif (++start <= --end) moveNodes(parent, o, nextSibling)\n\t\t\t\t\tif (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldStart++; oldEnd--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t}\n\t\t\t\t// bottom up once again\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t}\n\t\t\t\tif (start > end) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\telse if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\telse {\n\t\t\t\t\t// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n\t\t\t\t\tvar originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices\n\t\t\t\t\tfor (i = 0; i < vnodesLength; i++) oldIndices[i] = -1\n\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\tif (map == null) map = getKeyMap(old, oldStart, oldEnd + 1)\n\t\t\t\t\t\tve = vnodes[i]\n\t\t\t\t\t\tvar oldIndex = map[ve.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tpos = (oldIndex < pos) ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n\t\t\t\t\t\t\toldIndices[i-start] = oldIndex\n\t\t\t\t\t\t\toe = old[oldIndex]\n\t\t\t\t\t\t\told[oldIndex] = null\n\t\t\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\t\t\tmatched++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnextSibling = originalNextSibling\n\t\t\t\t\tif (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\t\tif (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (pos === -1) {\n\t\t\t\t\t\t\t// the indices of the indices of the items that are part of the\n\t\t\t\t\t\t\t// longest increasing subsequence in the oldIndices list\n\t\t\t\t\t\t\tlisIndices = makeLisIndices(oldIndices)\n\t\t\t\t\t\t\tli = lisIndices.length - 1\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (lisIndices[li] === i - start) li--\n\t\t\t\t\t\t\t\t\telse moveNodes(parent, v, nextSibling)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode.events = old.events\n\t\t\tif (shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tupdateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, ns, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(parent, old)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, ns, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\tremoveHTML(parent, old)\n\t\t\tcreateHTML(parent, vnode, ns, nextSibling)\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t}\n\t}\n\tfunction updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tupdateLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(parent, old.instance)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction getKeyMap(vnodes, start, end) {\n\t\tvar map = Object.create(null)\n\t\tfor (; start < end; start++) {\n\t\t\tvar vnode = vnodes[start]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key = vnode.key\n\t\t\t\tif (key != null) map[key] = start\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\t// Lifted from ivi https://github.com/ivijs/ivi/\n\t// takes a list of unique numbers (-1 is special and can\n\t// occur multiple times) and returns an array with the indices\n\t// of the items that are part of the longest increasing\n\t// subsequece\n\tvar lisTemp = []\n\tfunction makeLisIndices(a) {\n\t\tvar result = [0]\n\t\tvar u = 0, v = 0, i = 0\n\t\tvar il = lisTemp.length = a.length\n\t\tfor (var i = 0; i < il; i++) lisTemp[i] = a[i]\n\t\tfor (var i = 0; i < il; ++i) {\n\t\t\tif (a[i] === -1) continue\n\t\t\tvar j = result[result.length - 1]\n\t\t\tif (a[j] < a[i]) {\n\t\t\t\tlisTemp[i] = j\n\t\t\t\tresult.push(i)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tu = 0\n\t\t\tv = result.length - 1\n\t\t\twhile (u < v) {\n\t\t\t\t// Fast integer average without overflow.\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tvar c = (u >>> 1) + (v >>> 1) + (u & v & 1)\n\t\t\t\tif (a[result[c]] < a[i]) {\n\t\t\t\t\tu = c + 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tv = c\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a[i] < a[result[u]]) {\n\t\t\t\tif (u > 0) lisTemp[i] = result[u - 1]\n\t\t\t\tresult[u] = i\n\t\t\t}\n\t\t}\n\t\tu = result.length\n\t\tv = result[u - 1]\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v\n\t\t\tv = lisTemp[v]\n\t\t}\n\t\tlisTemp.length = 0\n\t\treturn result\n\t}\n\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\n\t// This covers a really specific edge case:\n\t// - Parent node is keyed and contains child\n\t// - Child is removed, returns unresolved promise in `onbeforeremove`\n\t// - Parent node is moved in keyed diff\n\t// - Remaining children still need moved appropriately\n\t//\n\t// Ideally, I'd track removed nodes as well, but that introduces a lot more\n\t// complexity and I'm not exactly interested in doing that.\n\tfunction moveNodes(parent, vnode, nextSibling) {\n\t\tvar frag = $doc.createDocumentFragment()\n\t\tmoveChildToFrag(parent, frag, vnode)\n\t\tinsertNode(parent, frag, nextSibling)\n\t}\n\tfunction moveChildToFrag(parent, frag, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\t\t\tfrag.appendChild(vnode.instance[i])\n\t\t\t\t}\n\t\t\t} else if (vnode.tag !== \"[\") {\n\t\t\t\t// Don't recurse for text nodes *or* elements, just fragments\n\t\t\t\tfrag.appendChild(vnode.dom)\n\t\t\t} else if (vnode.children.length === 1) {\n\t\t\t\tvnode = vnode.children[0]\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\tif (child != null) moveChildToFrag(parent, frag, child)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling != null) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\n\tfunction maybeSetContentEditable(vnode) {\n\t\tif (vnode.attrs == null || (\n\t\t\tvnode.attrs.contenteditable == null && // attribute\n\t\t\tvnode.attrs.contentEditable == null // property\n\t\t)) return false\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t\treturn true\n\t}\n\n\t//remove\n\tfunction removeNodes(parent, vnodes, start, end) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) removeNode(parent, vnode)\n\t\t}\n\t}\n\tfunction removeNode(parent, vnode) {\n\t\tvar mask = 0\n\t\tvar original = vnode.state\n\t\tvar stateResult, attrsResult\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.state.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\tmask = 1\n\t\t\t\tstateResult = result\n\t\t\t}\n\t\t}\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.attrs.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tmask |= 2\n\t\t\t\tattrsResult = result\n\t\t\t}\n\t\t}\n\t\tcheckState(vnode, original)\n\n\t\t// If we can, try to fast-path it and avoid all the overhead of awaiting\n\t\tif (!mask) {\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t} else {\n\t\t\tif (stateResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 1) { mask &= 2; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tstateResult.then(next, next)\n\t\t\t}\n\t\t\tif (attrsResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 2) { mask &= 1; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tattrsResult.then(next, next)\n\t\t\t}\n\t\t}\n\n\t\tfunction reallyRemove() {\n\t\t\tcheckState(vnode, original)\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t}\n\t}\n\tfunction removeHTML(parent, vnode) {\n\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\tparent.removeChild(vnode.instance[i])\n\t\t}\n\t}\n\tfunction removeChild(parent, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tremoveHTML(parent, vnode)\n\t\t\t} else {\n\t\t\t\tif (vnode.tag !== \"[\") {\n\t\t\t\t\tparent.removeChild(vnode.dom)\n\t\t\t\t\tif (!Array.isArray(vnode.children)) break\n\t\t\t\t}\n\t\t\t\tif (vnode.children.length === 1) {\n\t\t\t\t\tvnode = vnode.children[0]\n\t\t\t\t\tif (vnode != null) continue\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\t\tif (child != null) removeChild(parent, child)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tfunction onremove(vnode) {\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode)\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode)\n\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//attrs\n\tfunction setAttrs(vnode, attrs, ns) {\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\") return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value)\n\t\tif (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, value)\n\t\telse if (hasPropertyKey(vnode, key, ns)) {\n\t\t\tif (key === \"value\") {\n\t\t\t\t// Only do the coercion if we're actually going to check the value.\n\t\t\t\t/* eslint-disable no-implicit-coercion */\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && vnode.dom === activeElement()) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t\tif (vnode.tag === \"input\" && key === \"type\") vnode.dom.setAttribute(key, value)\n\t\t\telse vnode.dom[key] = value\n\t\t} else {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) vnode.dom.setAttribute(key, \"\")\n\t\t\t\telse vnode.dom.removeAttribute(key)\n\t\t\t}\n\t\t\telse vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value)\n\t\t}\n\t}\n\tfunction removeAttr(vnode, key, old, ns) {\n\t\tif (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return\n\t\tif (key[0] === \"o\" && key[1] === \"n\" && !isLifecycleMethod(key)) updateEvent(vnode, key, undefined)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, null)\n\t\telse if (\n\t\t\thasPropertyKey(vnode, key, ns)\n\t\t\t&& key !== \"className\"\n\t\t\t&& !(key === \"value\" && (\n\t\t\t\tvnode.tag === \"option\"\n\t\t\t\t|| vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()\n\t\t\t))\n\t\t\t&& !(vnode.tag === \"input\" && key === \"type\")\n\t\t) {\n\t\t\tvnode.dom[key] = null\n\t\t} else {\n\t\t\tvar nsLastIndex = key.indexOf(\":\")\n\t\t\tif (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1)\n\t\t\tif (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key)\n\t\t}\n\t}\n\tfunction setLateSelectAttrs(vnode, attrs) {\n\t\tif (\"value\" in attrs) {\n\t\t\tif(attrs.value === null) {\n\t\t\t\tif (vnode.dom.selectedIndex !== -1) vnode.dom.value = null\n\t\t\t} else {\n\t\t\t\tvar normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n\t\t\t\tif (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {\n\t\t\t\t\tvnode.dom.value = normalized\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined)\n\t}\n\tfunction updateAttrs(vnode, old, attrs, ns) {\n\t\tif (attrs != null) {\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns)\n\t\t\t}\n\t\t}\n\t\tvar val\n\t\tif (old != null) {\n\t\t\tfor (var key in old) {\n\t\t\t\tif (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {\n\t\t\t\t\tremoveAttr(vnode, key, val, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction hasPropertyKey(vnode, key, ns) {\n\t\t// Filter out namespaced keys\n\t\treturn ns === undefined && (\n\t\t\t// If it's a custom element, just keep it.\n\t\t\tvnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is ||\n\t\t\t// If it's a normal element, let's try to avoid a few browser bugs.\n\t\t\tkey !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\"// && key !== \"type\"\n\t\t\t// Defer the property check until *after* we check everything.\n\t\t) && key in vnode.dom\n\t}\n\n\t//style\n\tvar uppercaseRegex = /[A-Z]/g\n\tfunction toLowerCase(capital) { return \"-\" + capital.toLowerCase() }\n\tfunction normalizeKey(key) {\n\t\treturn key[0] === \"-\" && key[1] === \"-\" ? key :\n\t\t\tkey === \"cssFloat\" ? \"float\" :\n\t\t\t\tkey.replace(uppercaseRegex, toLowerCase)\n\t}\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) {\n\t\t\t// Styles are equivalent, do nothing.\n\t\t} else if (style == null) {\n\t\t\t// New style is missing, just clear it.\n\t\t\telement.style.cssText = \"\"\n\t\t} else if (typeof style !== \"object\") {\n\t\t\t// New style is a string, let engine deal with patching.\n\t\t\telement.style.cssText = style\n\t\t} else if (old == null || typeof old !== \"object\") {\n\t\t\t// `old` is missing or a string, `style` is an object.\n\t\t\telement.style.cssText = \"\"\n\t\t\t// Add new style properties\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null) element.style.setProperty(normalizeKey(key), String(value))\n\t\t\t}\n\t\t} else {\n\t\t\t// Both old & new are (different) objects.\n\t\t\t// Update style properties that have changed\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null && (value = String(value)) !== String(old[key])) {\n\t\t\t\t\telement.style.setProperty(normalizeKey(key), value)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove style properties that no longer exist\n\t\t\tfor (var key in old) {\n\t\t\t\tif (old[key] != null && style[key] == null) {\n\t\t\t\t\telement.style.removeProperty(normalizeKey(key))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Here's an explanation of how this works:\n\t// 1. The event names are always (by design) prefixed by `on`.\n\t// 2. The EventListener interface accepts either a function or an object\n\t//    with a `handleEvent` method.\n\t// 3. The object does not inherit from `Object.prototype`, to avoid\n\t//    any potential interference with that (e.g. setters).\n\t// 4. The event name is remapped to the handler before calling it.\n\t// 5. In function-based event handlers, `ev.target === this`. We replicate\n\t//    that below.\n\t// 6. In function-based event handlers, `return false` prevents the default\n\t//    action and stops event propagation. We replicate that below.\n\tfunction EventDict() {\n\t\t// Save this, so the current redraw is correctly tracked.\n\t\tthis._ = currentRedraw\n\t}\n\tEventDict.prototype = Object.create(null)\n\tEventDict.prototype.handleEvent = function (ev) {\n\t\tvar handler = this[\"on\" + ev.type]\n\t\tvar result\n\t\tif (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev)\n\t\telse if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev)\n\t\tif (this._ && ev.redraw !== false) (0, this._)()\n\t\tif (result === false) {\n\t\t\tev.preventDefault()\n\t\t\tev.stopPropagation()\n\t\t}\n\t}\n\n\t//event\n\tfunction updateEvent(vnode, key, value) {\n\t\tif (vnode.events != null) {\n\t\t\tif (vnode.events[key] === value) return\n\t\t\tif (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\t\tif (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = value\n\t\t\t} else {\n\t\t\t\tif (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = undefined\n\t\t\t}\n\t\t} else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\tvnode.events = new EventDict()\n\t\t\tvnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\tvnode.events[key] = value\n\t\t}\n\t}\n\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tdo {\n\t\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.state.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\treturn false\n\t\t} while (false); // eslint-disable-line no-constant-condition\n\t\tvnode.dom = old.dom\n\t\tvnode.domSize = old.domSize\n\t\tvnode.instance = old.instance\n\t\t// One would think having the actual latest attributes would be ideal,\n\t\t// but it doesn't let us properly diff based on our current internal\n\t\t// representation. We have to save not only the old DOM info, but also\n\t\t// the attributes used to create it, as we diff *that*, not against the\n\t\t// DOM directly (with a few exceptions in `setAttr`). And, of course, we\n\t\t// need to save the children and text as they are conceptually not\n\t\t// unlike special \"attributes\" internally.\n\t\tvnode.attrs = old.attrs\n\t\tvnode.children = old.children\n\t\tvnode.text = old.text\n\t\treturn true\n\t}\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\t// First time rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\n\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\tvar prevRedraw = currentRedraw\n\t\ttry {\n\t\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t}\n\t\tdom.vnodes = vnodes\n\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t}\n}\n","\"use strict\"\n\nmodule.exports = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\n\tvar entries = string.split(\"&\"), counters = {}, data = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\n\t\tvar levels = key.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data\n\t\tif (key.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key = levels.slice(0, j).join()\n\t\t\t\tif (counters[key] == null) {\n\t\t\t\t\tcounters[key] = Array.isArray(cursor) ? cursor.length : 0\n\t\t\t\t}\n\t\t\t\tlevel = counters[key]++\n\t\t\t}\n\t\t\t// Disallow direct prototype pollution\n\t\t\telse if (level === \"__proto__\") break\n\t\t\tif (j === levels.length - 1) cursor[level] = value\n\t\t\telse {\n\t\t\t\t// Read own properties exclusively to disallow indirect\n\t\t\t\t// prototype pollution\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(cursor, level)\n\t\t\t\tif (desc != null) desc = desc.value\n\t\t\t\tif (desc == null) cursor[level] = desc = isNumber ? [] : {}\n\t\t\t\tcursor = desc\n\t\t\t}\n\t\t}\n\t}\n\treturn data\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar rendering = false\n\tvar pending = false\n\n\tfunction sync() {\n\t\tif (rendering) throw new Error(\"Nested m.redraw.sync() call\")\n\t\trendering = true\n\t\tfor (var i = 0; i < subscriptions.length; i += 2) {\n\t\t\ttry { render(subscriptions[i], Vnode(subscriptions[i + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\trendering = false\n\t}\n\n\tfunction redraw() {\n\t\tif (!pending) {\n\t\t\tpending = true\n\t\t\tschedule(function() {\n\t\t\t\tpending = false\n\t\t\t\tsync()\n\t\t\t})\n\t\t}\n\t}\n\n\tredraw.sync = sync\n\n\tfunction mount(root, component) {\n\t\tif (component != null && component.view == null && typeof component !== \"function\") {\n\t\t\tthrow new TypeError(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t}\n\n\t\tvar index = subscriptions.indexOf(root)\n\t\tif (index >= 0) {\n\t\t\tsubscriptions.splice(index, 2)\n\t\t\trender(root, [], redraw)\n\t\t}\n\n\t\tif (component != null) {\n\t\t\tsubscriptions.push(root, component)\n\t\t\trender(root, Vnode(component), redraw)\n\t\t}\n\t}\n\n\treturn {mount: mount, redraw: redraw}\n}\n","function _assertThisInitialized(e) {\n  if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  return e;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/*!\n * jQuery JavaScript Library v3.7.1\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-08-28T13:37Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar version = \"3.7.1\",\n\n\trhtmlSuffix = /HTML$/i,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\n\t// Retrieve the text value of an array of DOM nodes\n\ttext: function( elem ) {\n\t\tvar node,\n\t\t\tret = \"\",\n\t\t\ti = 0,\n\t\t\tnodeType = elem.nodeType;\n\n\t\tif ( !nodeType ) {\n\n\t\t\t// If no nodeType, this is expected to be an array\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t\t// Do not traverse comment nodes\n\t\t\t\tret += jQuery.text( node );\n\t\t\t}\n\t\t}\n\t\tif ( nodeType === 1 || nodeType === 11 ) {\n\t\t\treturn elem.textContent;\n\t\t}\n\t\tif ( nodeType === 9 ) {\n\t\t\treturn elem.documentElement.textContent;\n\t\t}\n\t\tif ( nodeType === 3 || nodeType === 4 ) {\n\t\t\treturn elem.nodeValue;\n\t\t}\n\n\t\t// Do not include comment or processing instruction nodes\n\n\t\treturn ret;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tisXMLDoc: function( elem ) {\n\t\tvar namespace = elem && elem.namespaceURI,\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\n\t\t// document fragments.\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar pop = arr.pop;\n\n\nvar sort = arr.sort;\n\n\nvar splice = arr.splice;\n\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n// Note: an element does not contain itself\njQuery.contains = function( a, b ) {\n\tvar bup = b && b.parentNode;\n\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE doesn't have `contains` on SVG.\n\t\ta.contains ?\n\t\t\ta.contains( bup ) :\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t) );\n};\n\n\n\n\n// CSS string/identifier serialization\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\nfunction fcssescape( ch, asCodePoint ) {\n\tif ( asCodePoint ) {\n\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\tif ( ch === \"\\0\" ) {\n\t\t\treturn \"\\uFFFD\";\n\t\t}\n\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t}\n\n\t// Other potentially-special ASCII characters get backslash-escaped\n\treturn \"\\\\\" + ch;\n}\n\njQuery.escapeSelector = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\n\n\n\nvar preferredDoc = document,\n\tpushNative = push;\n\n( function() {\n\nvar i,\n\tExpr,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\tpush = pushNative,\n\n\t// Local document vars\n\tdocument,\n\tdocumentElement,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\tmatches,\n\n\t// Instance-specific data\n\texpando = jQuery.expando,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\n\t\t\"loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\n\t\twhitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\tATTR: new RegExp( \"^\" + attributes ),\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\n\t\tCHILD: new RegExp(\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\tneedsContext: new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\tif ( nonHex ) {\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\treturn nonHex;\n\t\t}\n\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t// Support: IE <=11+\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t// surrogate pair\n\t\treturn high < 0 ?\n\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes; see `setDocument`.\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE/Edge.\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android <=4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = {\n\t\tapply: function( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t},\n\t\tcall: function( target ) {\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\n\t\t}\n\t};\n}\n\nfunction find( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tfind.contains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( !nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrimCSS, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by jQuery selector module\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn nodeName( elem, \"input\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\n\t\t\telem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11+\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a jQuery selector context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [node] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nfunction setDocument( node ) {\n\tvar subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocumentElement = document.documentElement;\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\n\n\t// Support: iOS 7 only, IE 9 - 11+\n\t// Older browsers didn't support unprefixed `matches`.\n\tmatches = documentElement.matches ||\n\t\tdocumentElement.webkitMatchesSelector ||\n\t\tdocumentElement.msMatchesSelector;\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors\n\t// (see trac-13936).\n\t// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,\n\t// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.\n\tif ( documentElement.msMatchesSelector &&\n\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tpreferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\n\t}\n\n\t// Support: IE <10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\n\t\treturn !document.getElementsByName ||\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\n\t} );\n\n\t// Support: IE 9 only\n\t// Check to see if it's possible to do matchesSelector\n\t// on a disconnected node.\n\tsupport.disconnectedMatch = assert( function( el ) {\n\t\treturn matches.call( el, \"*\" );\n\t} );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// IE/Edge don't support the :scope pseudo-class.\n\tsupport.scope = assert( function() {\n\t\treturn document.querySelectorAll( \":scope\" );\n\t} );\n\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\n\t// Make sure the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter.ID =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find.TAG = function( tag, context ) {\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t// DocumentFragment nodes don't have gEBTN\n\t\t} else {\n\t\t\treturn context.querySelectorAll( tag );\n\t\t}\n\t};\n\n\t// Class\n\tExpr.find.CLASS = function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\trbuggyQSA = [];\n\n\t// Build QSA regex\n\t// Regex strategy adopted from Diego Perini\n\tassert( function( el ) {\n\n\t\tvar input;\n\n\t\tdocumentElement.appendChild( el ).innerHTML =\n\t\t\t\"<a id='\" + expando + \"' href='' disabled='disabled'></a>\" +\n\t\t\t\"<select id='\" + expando + \"-\\r\\\\' disabled='disabled'>\" +\n\t\t\t\"<option selected=''></option></select>\";\n\n\t\t// Support: iOS <=7 - 8 only\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t}\n\n\t\t// Support: iOS <=7 - 8 only\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\trbuggyQSA.push( \"~=\" );\n\t\t}\n\n\t\t// Support: iOS 8 only\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t}\n\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\trbuggyQSA.push( \":checked\" );\n\t\t}\n\n\t\t// Support: Windows 8 Native Apps\n\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tdocumentElement.appendChild( el ).disabled = true;\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t}\n\n\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t// Adding a temporary attribute to the document before the selection works\n\t\t// around the issue.\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"name\", \"\" );\n\t\tel.appendChild( input );\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t}\n\t} );\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = function( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t};\n\n\treturn document;\n}\n\nfind.matches = function( expr, elements ) {\n\treturn find( expr, null, null, elements );\n};\n\nfind.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn find( expr, document, null, [ elem ] ).length > 0;\n};\n\nfind.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn jQuery.contains( context, elem );\n};\n\n\nfind.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (see trac-13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\tif ( val !== undefined ) {\n\t\treturn val;\n\t}\n\n\treturn elem.getAttribute( name );\n};\n\nfind.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\njQuery.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\t//\n\t// Support: Android <=4.0+\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\n\t// depend on duplicate detection in all browsers without a stable sort.\n\thasDuplicate = !support.sortStable;\n\tsortInput = !support.sortStable && slice.call( results, 0 );\n\tsort.call( results, sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tsplice.call( results, duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\njQuery.fn.uniqueSort = function() {\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\n};\n\nExpr = jQuery.expr = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\tATTR: function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || \"\" )\n\t\t\t\t.replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\tCHILD: function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\n\t\t\t\t);\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr.CHILD.test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\tTAG: function( nodeNameSelector ) {\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\n\t\t\t\t};\n\t\t},\n\n\t\tCLASS: function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace + \")\" + className +\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\tATTR: function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = find.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\tif ( operator === \"=\" ) {\n\t\t\t\t\treturn result === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"!=\" ) {\n\t\t\t\t\treturn result !== check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"^=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"*=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"$=\" ) {\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"~=\" ) {\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\n\t\t\t\t\t\t.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"|=\" ) {\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t},\n\n\t\tCHILD: function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\t\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\t\t\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\tPSEUDO: function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// https://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tfind.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as jQuery does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\tnot: markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrimCSS, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\thas: markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn find( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\tcontains: markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// https://www.w3.org/TR/selectors/#lang-pseudo\n\t\tlang: markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tfind.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\ttarget: function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\troot: function( elem ) {\n\t\t\treturn elem === documentElement;\n\t\t},\n\n\t\tfocus: function( elem ) {\n\t\t\treturn elem === safeActiveElement() &&\n\t\t\t\tdocument.hasFocus() &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\tenabled: createDisabledPseudo( false ),\n\t\tdisabled: createDisabledPseudo( true ),\n\n\t\tchecked: function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\n\t\t},\n\n\t\tselected: function( elem ) {\n\n\t\t\t// Support: IE <=11+\n\t\t\t// Accessing the selectedIndex property\n\t\t\t// forces the browser to treat the default option as\n\t\t\t// selected when in an optgroup.\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\tempty: function( elem ) {\n\n\t\t\t// https://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !Expr.pseudos.empty( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\theader: function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\n\t\t\t\tnodeName( elem, \"button\" );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\n\n\t\t\t\t// Support: IE <10 only\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\n\t\t\t\t// with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\tfirst: createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\teven: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\todd: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i;\n\n\t\t\tif ( argument < 0 ) {\n\t\t\t\ti = argument + length;\n\t\t\t} else if ( argument > length ) {\n\t\t\t\ti = length;\n\t\t\t} else {\n\t\t\t\ti = argument;\n\t\t\t}\n\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tgt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos.nth = Expr.pseudos.eq;\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rleadingCombinator.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\tif ( parseOnly ) {\n\t\treturn soFar.length;\n\t}\n\n\treturn soFar ?\n\t\tfind.error( selector ) :\n\n\t\t// Cache the tokens\n\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\tif ( skip && nodeName( elem, skip ) ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tfind( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem, matcherOut,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed ||\n\t\t\t\tmultipleContexts( selector || \"*\",\n\t\t\t\t\tcontext.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems;\n\n\t\tif ( matcher ) {\n\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\n\t\t\t// or preexisting results,\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t[] :\n\n\t\t\t\t// ...otherwise use results directly\n\t\t\t\tresults;\n\n\t\t\t// Find primary matches\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t} else {\n\t\t\tmatcherOut = matcherIn;\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tvar ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element\n\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 )\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrimCSS, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find.TAG( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: iOS <=7 - 9 only\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching\n\t\t\t// elements by id. (see trac-14142)\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tjQuery.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\nfunction compile( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n}\n\n/**\n * A low-level selection function that works with jQuery's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with jQuery selector compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find.ID(\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\tcontext\n\t\t\t) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) &&\n\t\t\t\t\t\ttestContext( context.parentNode ) || context\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Support: Android <=4.0 - 4.1+\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Android <=4.0 - 4.1+\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\njQuery.find = find;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.unique = jQuery.uniqueSort;\n\n// These have always been private, but they used to be documented as part of\n// Sizzle so let's maintain them for now for backwards compatibility purposes.\nfind.compile = compile;\nfind.select = select;\nfind.setDocument = setDocument;\nfind.tokenize = tokenize;\n\nfind.escape = jQuery.escapeSelector;\nfind.getText = jQuery.text;\nfind.isXML = jQuery.isXMLDoc;\nfind.selectors = jQuery.expr;\nfind.support = jQuery.support;\nfind.uniqueSort = jQuery.uniqueSort;\n\n\t/* eslint-enable */\n\n} )();\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\n\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\n// captured before the async barrier to get the original error cause\n// which may otherwise be hidden.\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\n\t\t\terror.stack, asyncError );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", true );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, isSetup ) {\n\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !isSetup ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\tif ( !saved ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tdataPriv.set( this, type, false );\n\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\n\t\t\t\t// the native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\n\t\t\t\t\tsaved[ 0 ],\n\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\tthis\n\t\t\t\t) );\n\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\n\t\t\t\t// and radios. We accept this limitation.\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\n\tfunction focusMappedHandler( nativeEvent ) {\n\t\tif ( document.documentMode ) {\n\n\t\t\t// Support: IE 11+\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\n\n\t\t\t// `handle` from private data would already wrap the event, but we need\n\t\t\t// to change the `type` here.\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\n\t\t\tevent.isSimulated = true;\n\n\t\t\t// First, handle focusin/focusout\n\t\t\thandle( nativeEvent );\n\n\t\t\t// ...then, handle focus/blur\n\t\t\t//\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\n\t\t\t// invoking the handler at the lower level.\n\t\t\tif ( event.target === event.currentTarget ) {\n\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\n\t\t\t\t// by this point.\n\t\t\t\thandle( event );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\n\t\t\t// while someone wants focusin/focusout.\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\n\t\t}\n\t}\n\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\tvar attaches;\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, true );\n\n\t\t\tif ( document.documentMode ) {\n\n\t\t\t\t// Support: IE 9 - 11+\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t}\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\n\t\t\t} else {\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tvar attaches;\n\n\t\t\tif ( document.documentMode ) {\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t\tdataPriv.remove( this, delegateType );\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Return false to indicate standard teardown should be applied\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n\n\t// Support: Firefox <=44\n\t// Firefox doesn't have focus(in | out) events\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n\t//\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n\t// focus(in | out) events fire after focus & blur events,\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\n\t//\n\t// Support: IE 9 - 11+\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\n\t// attach a single handler for both events in IE.\n\tjQuery.event.special[ delegateType ] = {\n\t\tsetup: function() {\n\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\n\n\t\t\t// Support: IE 9 - 11+\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\n\t\t},\n\t\tteardown: function() {\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\n\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\n\t\t\t} else {\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\n\t\t\t}\n\t\t}\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Re-enable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew jQuery#find here for performance reasons:\n\t\t\t// https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"box-sizing:content-box;border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is `display: block`\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, trac-12537)\n\t//   .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\n\t\t// Support: IE <=9 - 11+\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\n\t\t// Normally, this would create difference in behavior: if\n\t\t// `getPropertyValue` returns an empty string, the value returned\n\t\t// by `.css()` would be `undefined`. This is usually the case for\n\t\t// disconnected elements. However, in IE even disconnected elements\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( isCustomProp && ret ) {\n\n\t\t\t// Support: Firefox 105+, Chrome <=105+\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\n\t\t\t// both leading & trailing whitespace to a single space.\n\t\t\t//\n\t\t\t// Fall back to `undefined` if empty string returned.\n\t\t\t// This collapses a missing definition with property defined\n\t\t\t// and set to an empty string but there's no standard API\n\t\t\t// allowing us to differentiate them without a performance penalty\n\t\t\t// and returning `undefined` aligns with older jQuery.\n\t\t\t//\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0,\n\t\tmarginDelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\n\t\tif ( box === \"margin\" ) {\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta + marginDelta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\tanimationIterationCount: true,\n\t\taspectRatio: true,\n\t\tborderImageSlice: true,\n\t\tcolumnCount: true,\n\t\tflexGrow: true,\n\t\tflexShrink: true,\n\t\tfontWeight: true,\n\t\tgridArea: true,\n\t\tgridColumn: true,\n\t\tgridColumnEnd: true,\n\t\tgridColumnStart: true,\n\t\tgridRow: true,\n\t\tgridRowEnd: true,\n\t\tgridRowStart: true,\n\t\tlineHeight: true,\n\t\topacity: true,\n\t\torder: true,\n\t\torphans: true,\n\t\tscale: true,\n\t\twidows: true,\n\t\tzIndex: true,\n\t\tzoom: true,\n\n\t\t// SVG-related\n\t\tfillOpacity: true,\n\t\tfloodOpacity: true,\n\t\tstopOpacity: true,\n\t\tstrokeMiterlimit: true,\n\t\tstrokeOpacity: true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this\n\t\t\t.on( \"mouseenter\", fnOver )\n\t\t\t.on( \"mouseleave\", fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n","\"use strict\"\n\nvar buildQueryString = require(\"../querystring/build\")\nvar assign = require(\"./assign\")\n\n// Returns `path` from `template` + `params`\nmodule.exports = function(template, params) {\n\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(template)) {\n\t\tthrow new SyntaxError(\"Template parameter names *must* be separated\")\n\t}\n\tif (params == null) return template\n\tvar queryIndex = template.indexOf(\"?\")\n\tvar hashIndex = template.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? template.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = template.slice(0, pathEnd)\n\tvar query = {}\n\n\tassign(query, params)\n\n\tvar resolved = path.replace(/:([^\\/\\.-]+)(\\.{3})?/g, function(m, key, variadic) {\n\t\tdelete query[key]\n\t\t// If no such parameter exists, don't interpolate it.\n\t\tif (params[key] == null) return m\n\t\t// Escape normal parameters, but not variadic ones.\n\t\treturn variadic ? params[key] : encodeURIComponent(String(params[key]))\n\t})\n\n\t// In case the template substitution adds new query/hash parameters.\n\tvar newQueryIndex = resolved.indexOf(\"?\")\n\tvar newHashIndex = resolved.indexOf(\"#\")\n\tvar newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex\n\tvar newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex\n\tvar result = resolved.slice(0, newPathEnd)\n\n\tif (queryIndex >= 0) result += template.slice(queryIndex, queryEnd)\n\tif (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd)\n\tvar querystring = buildQueryString(query)\n\tif (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring\n\tif (hashIndex >= 0) result += template.slice(hashIndex)\n\tif (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex)\n\treturn result\n}\n","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(r, a) {\n  if (r) {\n    if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n    var t = {}.toString.call(r).slice(8, -1);\n    return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n  }\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/*jslint browser: true*/\r\n/*jslint jquery: true*/\r\n\r\n/*\r\n * jQuery Hotkeys Plugin\r\n * Copyright 2010, John Resig\r\n * Dual licensed under the MIT or GPL Version 2 licenses.\r\n *\r\n * Based upon the plugin by Tzury Bar Yochay:\r\n * https://github.com/tzuryby/jquery.hotkeys\r\n *\r\n * Original idea by:\r\n * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/\r\n */\r\n\r\n/*\r\n * One small change is: now keys are passed by object { keys: '...' }\r\n * Might be useful, when you want to pass some other data to your handler\r\n */\r\n\r\n(function(jQuery) {\r\n\r\n  jQuery.hotkeys = {\r\n    version: \"0.2.0\",\r\n\r\n    specialKeys: {\r\n      8: \"backspace\",\r\n      9: \"tab\",\r\n      10: \"return\",\r\n      13: \"return\",\r\n      16: \"shift\",\r\n      17: \"ctrl\",\r\n      18: \"alt\",\r\n      19: \"pause\",\r\n      20: \"capslock\",\r\n      27: \"esc\",\r\n      32: \"space\",\r\n      33: \"pageup\",\r\n      34: \"pagedown\",\r\n      35: \"end\",\r\n      36: \"home\",\r\n      37: \"left\",\r\n      38: \"up\",\r\n      39: \"right\",\r\n      40: \"down\",\r\n      45: \"insert\",\r\n      46: \"del\",\r\n      59: \";\",\r\n      61: \"=\",\r\n      96: \"0\",\r\n      97: \"1\",\r\n      98: \"2\",\r\n      99: \"3\",\r\n      100: \"4\",\r\n      101: \"5\",\r\n      102: \"6\",\r\n      103: \"7\",\r\n      104: \"8\",\r\n      105: \"9\",\r\n      106: \"*\",\r\n      107: \"+\",\r\n      109: \"-\",\r\n      110: \".\",\r\n      111: \"/\",\r\n      112: \"f1\",\r\n      113: \"f2\",\r\n      114: \"f3\",\r\n      115: \"f4\",\r\n      116: \"f5\",\r\n      117: \"f6\",\r\n      118: \"f7\",\r\n      119: \"f8\",\r\n      120: \"f9\",\r\n      121: \"f10\",\r\n      122: \"f11\",\r\n      123: \"f12\",\r\n      144: \"numlock\",\r\n      145: \"scroll\",\r\n      173: \"-\",\r\n      186: \";\",\r\n      187: \"=\",\r\n      188: \",\",\r\n      189: \"-\",\r\n      190: \".\",\r\n      191: \"/\",\r\n      192: \"`\",\r\n      219: \"[\",\r\n      220: \"\\\\\",\r\n      221: \"]\",\r\n      222: \"'\"\r\n    },\r\n\r\n    shiftNums: {\r\n      \"`\": \"~\",\r\n      \"1\": \"!\",\r\n      \"2\": \"@\",\r\n      \"3\": \"#\",\r\n      \"4\": \"$\",\r\n      \"5\": \"%\",\r\n      \"6\": \"^\",\r\n      \"7\": \"&\",\r\n      \"8\": \"*\",\r\n      \"9\": \"(\",\r\n      \"0\": \")\",\r\n      \"-\": \"_\",\r\n      \"=\": \"+\",\r\n      \";\": \": \",\r\n      \"'\": \"\\\"\",\r\n      \",\": \"<\",\r\n      \".\": \">\",\r\n      \"/\": \"?\",\r\n      \"\\\\\": \"|\"\r\n    },\r\n\r\n    // excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url\r\n    textAcceptingInputTypes: [\r\n      \"text\", \"password\", \"number\", \"email\", \"url\", \"range\", \"date\", \"month\", \"week\", \"time\", \"datetime\",\r\n      \"datetime-local\", \"search\", \"color\", \"tel\"],\r\n\r\n    // default input types not to bind to unless bound directly\r\n    textInputTypes: /textarea|input|select/i,\r\n\r\n    options: {\r\n      filterInputAcceptingElements: true,\r\n      filterTextInputs: true,\r\n      filterContentEditable: true\r\n    }\r\n  };\r\n\r\n  function keyHandler(handleObj) {\r\n    if (typeof handleObj.data === \"string\") {\r\n      handleObj.data = {\r\n        keys: handleObj.data\r\n      };\r\n    }\r\n\r\n    // Only care when a possible input has been specified\r\n    if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== \"string\") {\r\n      return;\r\n    }\r\n\r\n    var origHandler = handleObj.handler,\r\n      keys = handleObj.data.keys.toLowerCase().split(\" \");\r\n\r\n    handleObj.handler = function(event) {\r\n      //      Don't fire in text-accepting inputs that we didn't directly bind to\r\n      if (this !== event.target &&\r\n        (jQuery.hotkeys.options.filterInputAcceptingElements &&\r\n          jQuery.hotkeys.textInputTypes.test(event.target.nodeName) ||\r\n          (jQuery.hotkeys.options.filterContentEditable && jQuery(event.target).attr('contenteditable')) ||\r\n          (jQuery.hotkeys.options.filterTextInputs &&\r\n            jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) {\r\n        return;\r\n      }\r\n\r\n      var special = event.type !== \"keypress\" && jQuery.hotkeys.specialKeys[event.which],\r\n        character = String.fromCharCode(event.which).toLowerCase(),\r\n        modif = \"\",\r\n        possible = {};\r\n\r\n      jQuery.each([\"alt\", \"ctrl\", \"shift\"], function(index, specialKey) {\r\n\r\n        if (event[specialKey + 'Key'] && special !== specialKey) {\r\n          modif += specialKey + '+';\r\n        }\r\n      });\r\n\r\n      // metaKey is triggered off ctrlKey erronously\r\n      if (event.metaKey && !event.ctrlKey && special !== \"meta\") {\r\n        modif += \"meta+\";\r\n      }\r\n\r\n      if (event.metaKey && special !== \"meta\" && modif.indexOf(\"alt+ctrl+shift+\") > -1) {\r\n        modif = modif.replace(\"alt+ctrl+shift+\", \"hyper+\");\r\n      }\r\n\r\n      if (special) {\r\n        possible[modif + special] = true;\r\n      }\r\n      else {\r\n        possible[modif + character] = true;\r\n        possible[modif + jQuery.hotkeys.shiftNums[character]] = true;\r\n\r\n        // \"$\" can be triggered as \"Shift+4\" or \"Shift+$\" or just \"$\"\r\n        if (modif === \"shift+\") {\r\n          possible[jQuery.hotkeys.shiftNums[character]] = true;\r\n        }\r\n      }\r\n\r\n      for (var i = 0, l = keys.length; i < l; i++) {\r\n        if (possible[keys[i]]) {\r\n          return origHandler.apply(this, arguments);\r\n        }\r\n      }\r\n    };\r\n  }\r\n\r\n  jQuery.each([\"keydown\", \"keyup\", \"keypress\"], function() {\r\n    jQuery.event.special[this] = {\r\n      add: keyHandler\r\n    };\r\n  });\r\n\r\n})(jQuery || this.jQuery || window.jQuery);\r\n","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperties(e, r) {\n  for (var t = 0; t < r.length; t++) {\n    var o = r[t];\n    o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n  }\n}\nfunction _createClass(e, r, t) {\n  return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n    writable: !1\n  }), e;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar m = require(\"../render/hyperscript\")\nvar Promise = require(\"../promise/promise\")\n\nvar buildPathname = require(\"../pathname/build\")\nvar parsePathname = require(\"../pathname/parse\")\nvar compileTemplate = require(\"../pathname/compileTemplate\")\nvar assign = require(\"../pathname/assign\")\n\nvar sentinel = {}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar fireAsync\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (fireAsync != null) {\n\t\t\tfireAsync()\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, route.prefix + path)\n\t\t\telse $window.history.pushState(state, title, route.prefix + path)\n\t\t}\n\t\telse {\n\t\t\t$window.location.href = route.prefix + path\n\t\t}\n\t}\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction route(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\t// 0 = start\n\t\t// 1 = init\n\t\t// 2 = ready\n\t\tvar state = 0\n\n\t\tvar compiled = Object.keys(routes).map(function(route) {\n\t\t\tif (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a `/`\")\n\t\t\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(route)) {\n\t\t\t\tthrow new SyntaxError(\"Route parameter names must be separated with either `/`, `.`, or `-`\")\n\t\t\t}\n\t\t\treturn {\n\t\t\t\troute: route,\n\t\t\t\tcomponent: routes[route],\n\t\t\t\tcheck: compileTemplate(route),\n\t\t\t}\n\t\t})\n\t\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\t\tvar p = Promise.resolve()\n\t\tvar scheduled = false\n\t\tvar onremove\n\n\t\tfireAsync = null\n\n\t\tif (defaultRoute != null) {\n\t\t\tvar defaultData = parsePathname(defaultRoute)\n\n\t\t\tif (!compiled.some(function (i) { return i.check(defaultData) })) {\n\t\t\t\tthrow new ReferenceError(\"Default route doesn't match any known routes\")\n\t\t\t}\n\t\t}\n\n\t\tfunction resolveRoute() {\n\t\t\tscheduled = false\n\t\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t\t// but that's not our problem.\n\t\t\tvar prefix = $window.location.hash\n\t\t\tif (route.prefix[0] !== \"#\") {\n\t\t\t\tprefix = $window.location.search + prefix\n\t\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t\t// since the representation is consistently a relatively poorly\n\t\t\t// optimized cons string.\n\t\t\tvar path = prefix.concat()\n\t\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\t\t\t.slice(route.prefix.length)\n\t\t\tvar data = parsePathname(path)\n\n\t\t\tassign(data.params, $window.history.state)\n\n\t\t\tfunction fail() {\n\t\t\t\tif (path === defaultRoute) throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t\t\tsetPath(defaultRoute, null, {replace: true})\n\t\t\t}\n\n\t\t\tloop(0)\n\t\t\tfunction loop(i) {\n\t\t\t\t// 0 = init\n\t\t\t\t// 1 = scheduled\n\t\t\t\t// 2 = done\n\t\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\t\tvar localComp = payload\n\t\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t\t}).then(update, fail)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse update(\"div\")\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfail()\n\t\t\t}\n\t\t}\n\n\t\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t\t// cleared if `hashchange` is used, since that makes it automatically\n\t\t// async.\n\t\tfireAsync = function() {\n\t\t\tif (!scheduled) {\n\t\t\t\tscheduled = true\n\t\t\t\tcallAsync(resolveRoute)\n\t\t\t}\n\t\t}\n\n\t\tif (typeof $window.history.pushState === \"function\") {\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\tfireAsync = null\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\treturn mountRedraw.mount(root, {\n\t\t\tonbeforeupdate: function() {\n\t\t\t\tstate = state ? 2 : 1\n\t\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t\t},\n\t\t\toncreate: resolveRoute,\n\t\t\tonremove: onremove,\n\t\t\tview: function() {\n\t\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\t\treturn vnode\n\t\t\t},\n\t\t})\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\tsetPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = \"#!\"\n\troute.Link = {\n\t\tview: function(vnode) {\n\t\t\tvar options = vnode.attrs.options\n\t\t\t// Remove these so they don't get overwritten\n\t\t\tvar attrs = {}, onclick, href\n\t\t\tassign(attrs, vnode.attrs)\n\t\t\t// The first two are internal, but the rest are magic attributes\n\t\t\t// that need censored to not screw up rendering.\n\t\t\tattrs.selector = attrs.options = attrs.key = attrs.oninit =\n\t\t\tattrs.oncreate = attrs.onbeforeupdate = attrs.onupdate =\n\t\t\tattrs.onbeforeremove = attrs.onremove = null\n\n\t\t\t// Do this now so we can get the most current `href` and `disabled`.\n\t\t\t// Those attributes may also be specified in the selector, and we\n\t\t\t// should honor that.\n\t\t\tvar child = m(vnode.attrs.selector || \"a\", attrs, vnode.children)\n\n\t\t\t// Let's provide a *right* way to disable a route link, rather than\n\t\t\t// letting people screw up accessibility on accident.\n\t\t\t//\n\t\t\t// The attribute is coerced so users don't get surprised over\n\t\t\t// `disabled: 0` resulting in a button that's somehow routable\n\t\t\t// despite being visibly disabled.\n\t\t\tif (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n\t\t\t\tchild.attrs.href = null\n\t\t\t\tchild.attrs[\"aria-disabled\"] = \"true\"\n\t\t\t\t// If you *really* do want to do this on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t\tchild.attrs.onclick = null\n\t\t\t} else {\n\t\t\t\tonclick = child.attrs.onclick\n\t\t\t\thref = child.attrs.href\n\t\t\t\tchild.attrs.href = route.prefix + href\n\t\t\t\tchild.attrs.onclick = function(e) {\n\t\t\t\t\tvar result\n\t\t\t\t\tif (typeof onclick === \"function\") {\n\t\t\t\t\t\tresult = onclick.call(e.currentTarget, e)\n\t\t\t\t\t} else if (onclick == null || typeof onclick !== \"object\") {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t} else if (typeof onclick.handleEvent === \"function\") {\n\t\t\t\t\t\tonclick.handleEvent(e)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adapted from React Router's implementation:\n\t\t\t\t\t// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n\t\t\t\t\t//\n\t\t\t\t\t// Try to be flexible and intuitive in how we handle links.\n\t\t\t\t\t// Fun fact: links aren't as obvious to get right as you\n\t\t\t\t\t// would expect. There's a lot more valid ways to click a\n\t\t\t\t\t// link than this, and one might want to not simply click a\n\t\t\t\t\t// link, but right click or command-click it to copy the\n\t\t\t\t\t// link target, etc. Nope, this isn't just for blind people.\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip if `onclick` prevented default\n\t\t\t\t\t\tresult !== false && !e.defaultPrevented &&\n\t\t\t\t\t\t// Ignore everything but left clicks\n\t\t\t\t\t\t(e.button === 0 || e.which === 0 || e.which === 1) &&\n\t\t\t\t\t\t// Let the browser handle `target=_blank`, etc.\n\t\t\t\t\t\t(!e.currentTarget.target || e.currentTarget.target === \"_self\") &&\n\t\t\t\t\t\t// No modifier keys\n\t\t\t\t\t\t!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey\n\t\t\t\t\t) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.redraw = false\n\t\t\t\t\t\troute.set(href, null, options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn child\n\t\t},\n\t}\n\troute.param = function(key) {\n\t\treturn attrs && key != null ? attrs[key] : attrs\n\t}\n\n\treturn route\n}\n","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(t, e) {\n  if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e;\n  if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n  return assertThisInitialized(t);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n    value: t,\n    enumerable: !0,\n    configurable: !0,\n    writable: !0\n  }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayLikeToArray(r, a) {\n  (null == a || a > r.length) && (a = r.length);\n  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n  return n;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(r) {\n  if (Array.isArray(r)) return r;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t//  0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./promise/promise\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./request/request\")(window, PromisePolyfill, mountRedraw.redraw)\n","\"use strict\"\n\nvar hyperscript = require(\"./hyperscript\")\nvar request = require(\"./request\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nvar m = function m() { return hyperscript.apply(this, arguments) }\nm.m = hyperscript\nm.trust = hyperscript.trust\nm.fragment = hyperscript.fragment\nm.mount = mountRedraw.mount\nm.route = require(\"./route\")\nm.render = require(\"./render\")\nm.redraw = mountRedraw.redraw\nm.request = request.request\nm.jsonp = request.jsonp\nm.parseQueryString = require(\"./querystring/parse\")\nm.buildQueryString = require(\"./querystring/build\")\nm.parsePathname = require(\"./pathname/parse\")\nm.buildPathname = require(\"./pathname/build\")\nm.vnode = require(\"./render/vnode\")\nm.PromisePolyfill = require(\"./promise/polyfill\")\n\nmodule.exports = m\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nmodule.exports = function() {\n\tvar vnode = hyperscriptVnode.apply(0, arguments)\n\n\tvnode.tag = \"[\"\n\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\treturn vnode\n}\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));","// Based off of the polyfill on MDN\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat#reduce_concat_isarray_recursivity\n//\n// Needed to provide support for Safari on iOS < 12\n\n// ts-ignored because we can afford to encapsulate some messy logic behind the clean typings.\n\nif (!Array.prototype['flat']) {\n  Array.prototype['flat'] = function flat<A, D extends number = 1>(this: A, depth?: D | unknown): any[] {\n    // @ts-ignore\n    return (depth ?? 1) > 0\n      ? // @ts-ignore\n        Array.prototype.reduce.call(this, (acc, val): any[] => acc.concat(Array.isArray(val) ? flat.call(val, depth - 1) : val), [])\n      : // If no depth is provided, or depth is 0, just return a copy of\n        // the array. Spread is supported in all major browsers (iOS 8+)\n        // @ts-ignore\n        [...this];\n  };\n}\n","\"use strict\"\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.prototype.finally = function(callback) {\n\treturn this.then(\n\t\tfunction(value) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn value\n\t\t\t})\n\t\t},\n\t\tfunction(reason) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn PromisePolyfill.reject(reason);\n\t\t\t})\n\t\t}\n\t)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\n\nmodule.exports = PromisePolyfill\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\n\nfunction isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\n\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\n\nfunction execSelector(state, vnode) {\n\tvar attrs = vnode.attrs\n\tvar children = Vnode.normalizeChildren(vnode.children)\n\tvar hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = null\n\tvnode.children = undefined\n\n\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]\n\t\t}\n\n\t\tattrs = newAttrs\n\t}\n\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key) && key !== \"className\" && !hasOwn.call(attrs, key)){\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className != null || state.attrs.className != null) attrs.className =\n\t\tclassName != null\n\t\t\t? state.attrs.className != null\n\t\t\t\t? String(state.attrs.className) + \" \" + String(className)\n\t\t\t\t: className\n\t\t\t: state.attrs.className != null\n\t\t\t\t? state.attrs.className\n\t\t\t\t: null\n\n\tif (hasClass) attrs.class = null\n\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\tvnode.attrs = attrs\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\tvnode.text = children[0].children\n\t} else {\n\t\tvnode.children = children\n\t}\n\n\treturn vnode\n}\n\nfunction hyperscript(selector) {\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\n\tvar vnode = hyperscriptVnode.apply(1, arguments)\n\n\tif (typeof selector === \"string\") {\n\t\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\t\tif (selector !== \"[\") return execSelector(selectorCache[selector] || compileSelector(selector), vnode)\n\t}\n\n\tvnode.tag = selector\n\treturn vnode\n}\n\nmodule.exports = hyperscript\n","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n  var i = toPrimitive(t, \"string\");\n  return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(t) {\n  return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n    return t.__proto__ || Object.getPrototypeOf(t);\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _getPrototypeOf(t);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","function bidi(node, prop) {\n  var type = node.tag === 'select' ? (node.attrs.multi ? 'multi' : 'select') : node.attrs.type;\n\n  // Setup: bind listeners\n  if (type === 'multi') {\n    node.attrs.onchange = function () {\n      prop(\n        [].slice.call(this.selectedOptions, function (x) {\n          return x.value;\n        })\n      );\n    };\n  } else if (type === 'select') {\n    node.attrs.onchange = function (e) {\n      prop(this.selectedOptions[0].value);\n    };\n  } else if (type === 'checkbox') {\n    node.attrs.onchange = function (e) {\n      prop(this.checked);\n    };\n  } else {\n    node.attrs.onchange = node.attrs.oninput = function (e) {\n      prop(this.value);\n    };\n  }\n\n  if (node.tag === 'select') {\n    node.children.forEach(function (option) {\n      if (option.attrs.value === prop() || option.children[0] === prop()) {\n        option.attrs.selected = true;\n      }\n    });\n  } else if (type === 'checkbox') {\n    node.attrs.checked = prop();\n  } else if (type === 'radio') {\n    node.attrs.checked = prop() === node.attrs.value;\n  } else {\n    node.attrs.value = prop();\n  }\n\n  node.attrs.bidi = null;\n\n  return node;\n}\n\nbidi.view = function (ctrl, node, prop) {\n  return bidi(node, node.attrs.bidi);\n};\n\nexport default bidi;\n","import bidi from './bidi';\n\nexport default function patchMithril(global) {\n  const defaultMithril = global.m;\n\n  const modifiedMithril = function (comp, ...args) {\n    const node = defaultMithril.apply(this, arguments);\n\n    if (!node.attrs) node.attrs = {};\n\n    // Allows the use of the bidi attr.\n    if (node.attrs.bidi) {\n      bidi(node, node.attrs.bidi);\n    }\n\n    return node;\n  };\n\n  Object.keys(defaultMithril).forEach((key) => (modifiedMithril[key] = defaultMithril[key]));\n\n  global.m = modifiedMithril;\n}\n","import type Application from './Application';\n\n// Used to fix typings\nconst w = window as any;\n\n/**\n * Proxy app. Common JS is run first, at which point `window.app` is not\n * set as this is done by the namespaced JS.\n *\n * When the corrent value is set, this code would retain the reference to\n * the original invalid value.\n *\n * By using a proxy, we can ensure that our `window.app` value is always\n * up-to-date with the latest reference.\n */\nconst appProxy = new Proxy(\n  {},\n  {\n    get(_, properties) {\n      return Reflect.get(w.app, properties, w.app);\n    },\n    set(_, properties, value) {\n      return Reflect.set(w.app, properties, value, w.app);\n    },\n  }\n);\n\n/**\n * The instance of Application within the common namespace.\n */\nexport default appProxy as Application;\n","// Expose jQuery, mithril and dayjs to the window browser object\nimport 'expose-loader?exposes=$,jQuery!jquery';\nimport 'expose-loader?exposes=m!mithril';\nimport 'expose-loader?exposes=dayjs!dayjs';\n\nimport 'bootstrap/js/affix';\nimport 'bootstrap/js/dropdown';\nimport 'bootstrap/js/tooltip';\nimport 'bootstrap/js/transition';\nimport 'jquery.hotkeys/jquery.hotkeys';\n\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\n\ndayjs.extend(relativeTime);\ndayjs.extend(localizedFormat);\n\nimport patchMithril from './utils/patchMithril';\n\npatchMithril(window);\n\nimport app from './app';\n\nexport { app };\n\nimport './utils/arrayFlatPolyfill';\n\nconst tooltipGen = $.fn.tooltip;\n\n// Remove in a future version of Flarum.\n// @ts-ignore\n$.fn.tooltip = function (options, caller) {\n  // Show a warning when `$.tooltip` is used outside of the Tooltip component.\n  // This functionality is deprecated and should not be used.\n  if (!['DANGEROUS_tooltip_jquery_fn_deprecation_exempt'].includes(caller)) {\n    console.warn(\n      \"Calling `$.tooltip` is now deprecated. Please use the `<Tooltip>` component exposed by flarum/core instead. `$.tooltip` may be removed in a future version of Flarum.\\n\\nIf this component doesn't meet your requirements, please open an issue: https://github.com/flarum/core/issues/new?assignees=davwheat&labels=type/bug,needs-verification&template=bug-report.md&title=Tooltip%20component%20unsuitable%20for%20use%20case\"\n    );\n  }\n\n  tooltipGen.bind(this)(options);\n};\n","function _setPrototypeOf(t, e) {\n  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n    return t.__proto__ = e, t;\n  }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n  t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","function _extends() {\n  return _extends = Object.assign ? Object.assign.bind() : function (n) {\n    for (var e = 1; e < arguments.length; e++) {\n      var t = arguments[e];\n      for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n    }\n    return n;\n  }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","import type Mithril from 'mithril';\n\n/**\n * Mithril 2 does not completely rerender the page if a route change leads to the same route\n * (or the same component handling a different route). This util calls m.route.set, forcing a reonit.\n *\n * @see https://mithril.js.org/route.html#key-parameter\n */\nexport default function setRouteWithForcedRefresh(route: string, params = null, options: Mithril.RouteOptions = {}) {\n  const newOptions = { ...options };\n  newOptions.state = newOptions.state || {};\n  newOptions.state.key = Date.now();\n\n  m.route.set(route, params, newOptions);\n}\n","import setRouteWithForcedRefresh from '../../common/utils/setRouteWithForcedRefresh';\nimport IHistory, { HistoryEntry } from '../../common/IHistory';\n\n/**\n * The `History` class keeps track and manages a stack of routes that the user\n * has navigated to in their session.\n *\n * An item can be pushed to the top of the stack using the `push` method. An\n * item in the stack has a name and a URL. The name need not be unique; if it is\n * the same as the item before it, that will be overwritten with the new URL. In\n * this way, if a user visits a discussion, and then visits another discussion,\n * popping the history stack will still take them back to the discussion list\n * rather than the previous discussion.\n */\nexport default class History implements IHistory {\n  /**\n   * The stack of routes that have been navigated to.\n   */\n  protected stack: HistoryEntry[] = [];\n\n  /**\n   * Get the item on the top of the stack.\n   */\n  getCurrent(): HistoryEntry {\n    return this.stack[this.stack.length - 1];\n  }\n\n  /**\n   * Get the previous item on the stack.\n   */\n  getPrevious(): HistoryEntry {\n    return this.stack[this.stack.length - 2];\n  }\n\n  /**\n   * Push an item to the top of the stack.\n   *\n   * @param {string} name The name of the route.\n   * @param {string} title The title of the route.\n   * @param {string} [url] The URL of the route. The current URL will be used if\n   *     not provided.\n   */\n  push(name: string, title: string, url = m.route.get()) {\n    // If we're pushing an item with the same name as second-to-top item in the\n    // stack, we will assume that the user has clicked the 'back' button in\n    // their browser. In this case, we don't want to push a new item, so we will\n    // pop off the top item, and then the second-to-top item will be overwritten\n    // below.\n    const secondTop = this.stack[this.stack.length - 2];\n    if (secondTop && secondTop.name === name) {\n      this.stack.pop();\n    }\n\n    // If we're pushing an item with the same name as the top item in the stack,\n    // then we'll overwrite it with the new URL.\n    const top = this.getCurrent();\n    if (top && top.name === name) {\n      Object.assign(top, { url, title });\n    } else {\n      this.stack.push({ name, url, title });\n    }\n  }\n\n  /**\n   * Check whether or not the history stack is able to be popped.\n   */\n  canGoBack(): boolean {\n    return this.stack.length > 1;\n  }\n\n  /**\n   * Go back to the previous route in the history stack.\n   */\n  back() {\n    if (!this.canGoBack()) {\n      return this.home();\n    }\n\n    this.stack.pop();\n\n    m.route.set(this.getCurrent().url);\n  }\n\n  /**\n   * Get the URL of the previous page.\n   */\n  backUrl(): string {\n    const secondTop = this.stack[this.stack.length - 2];\n\n    return secondTop.url;\n  }\n\n  /**\n   * Go to the first route in the history stack.\n   */\n  home() {\n    this.stack.splice(0);\n\n    setRouteWithForcedRefresh('/');\n  }\n}\n","/**\n * The `Pane` class manages the page's discussion list sidepane. The pane is a\n * part of the content view (DiscussionPage component), but its visibility is\n * determined by CSS classes applied to the outer page element. This class\n * manages the application of those CSS classes.\n */\nexport default class Pane {\n  constructor(element) {\n    /**\n     * The localStorage key to store the pane's pinned state with.\n     *\n     * @type {String}\n     * @protected\n     */\n    this.pinnedKey = 'panePinned';\n\n    /**\n     * The page element.\n     *\n     * @type {jQuery}\n     * @protected\n     */\n    this.$element = $(element);\n\n    /**\n     * Whether or not the pane is currently pinned.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.pinned = localStorage.getItem(this.pinnedKey) === 'true';\n\n    /**\n     * Whether or not the pane is currently exists.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.active = false;\n\n    /**\n     * Whether or not the pane is currently showing, or is hidden off the edge\n     * of the screen.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.showing = false;\n\n    this.render();\n  }\n\n  /**\n   * Enable the pane.\n   */\n  enable() {\n    this.active = true;\n    this.render();\n  }\n\n  /**\n   * Disable the pane.\n   */\n  disable() {\n    this.active = false;\n    this.showing = false;\n    this.render();\n  }\n\n  /**\n   * Show the pane.\n   */\n  show() {\n    clearTimeout(this.hideTimeout);\n    this.showing = true;\n    this.render();\n  }\n\n  /**\n   * Hide the pane.\n   */\n  hide() {\n    this.showing = false;\n    this.render();\n  }\n\n  /**\n   * Begin a timeout to hide the pane, which can be cancelled by showing the\n   * pane.\n   */\n  onmouseleave() {\n    this.hideTimeout = setTimeout(this.hide.bind(this), 250);\n  }\n\n  /**\n   * Toggle whether or not the pane is pinned.\n   */\n  togglePinned() {\n    this.pinned = !this.pinned;\n\n    localStorage.setItem(this.pinnedKey, this.pinned ? 'true' : 'false');\n\n    this.render();\n  }\n\n  /**\n   * Apply the appropriate CSS classes to the page element.\n   *\n   * @protected\n   */\n  render() {\n    this.$element.toggleClass('panePinned', this.pinned).toggleClass('hasPane', this.active).toggleClass('paneShowing', this.showing);\n  }\n}\n","import type Mithril from 'mithril';\n\nexport interface ComponentAttrs extends Mithril.Attributes {}\n\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n *  - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n *    This allows us to use attrs across components without having to pass the vnode to every single\n *    method.\n *  - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n *    the attrs that have been passed into a component.\n *  - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n *    us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n *  - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div', <MyComponent foo=\"bar\"><p>Hello World</p></MyComponent>);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default abstract class Component<Attrs extends ComponentAttrs = ComponentAttrs, State = undefined> implements Mithril.ClassComponent<Attrs> {\n  /**\n   * The root DOM element for the component.\n   */\n  element!: Element;\n\n  /**\n   * The attributes passed into the component.\n   *\n   * @see https://mithril.js.org/components.html#passing-data-to-components\n   */\n  attrs!: Attrs;\n\n  /**\n   * Class component state that is persisted between redraws.\n   *\n   * Updating this will **not** automatically trigger a redraw, unlike\n   * other frameworks.\n   *\n   * This is different to Vnode state, which is always an instance of your\n   * class component.\n   *\n   * This is `undefined` by default.\n   */\n  state!: State;\n\n  /**\n   * @inheritdoc\n   */\n  abstract view(vnode: Mithril.Vnode<Attrs, this>): Mithril.Children;\n\n  /**\n   * @inheritdoc\n   */\n  oninit(vnode: Mithril.Vnode<Attrs, this>) {\n    this.setAttrs(vnode.attrs);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  oncreate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n    this.element = vnode.dom;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  onbeforeupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n    this.setAttrs(vnode.attrs);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  onupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * @inheritdoc\n   */\n  onbeforeremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * @inheritdoc\n   */\n  onremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * Returns a jQuery object for this component's element. If you pass in a\n   * selector string, this method will return a jQuery object, using the current\n   * element as its buffer.\n   *\n   * For example, calling `component.$('li')` will return a jQuery object\n   * containing all of the `li` elements inside the DOM element of this\n   * component.\n   *\n   * @param [selector] a jQuery-compatible selector string\n   * @returns the jQuery object for the DOM node\n   * @final\n   */\n  $(selector?: string): JQuery {\n    const $element = $(this.element) as JQuery<HTMLElement>;\n\n    return selector ? $element.find(selector) : $element;\n  }\n\n  /**\n   * Convenience method to attach a component without JSX.\n   * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n   *\n   * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n   */\n  static component<SAttrs extends ComponentAttrs = ComponentAttrs>(attrs: SAttrs = {} as SAttrs, children: Mithril.Children = null): Mithril.Vnode {\n    const componentAttrs = { ...attrs };\n\n    return m(this as any, componentAttrs, children);\n  }\n\n  /**\n   * Saves a reference to the vnode attrs after running them through initAttrs,\n   * and checking for common issues.\n   */\n  private setAttrs(attrs: Attrs = {} as Attrs): void {\n    (this.constructor as typeof Component).initAttrs(attrs);\n\n    if (attrs) {\n      if ('children' in attrs) {\n        throw new Error(\n          `[${\n            (this.constructor as typeof Component).name\n          }] The \"children\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute`\n        );\n      }\n\n      if ('tag' in attrs) {\n        throw new Error(`[${(this.constructor as typeof Component).name}] You cannot use the \"tag\" attribute name with Mithril 2.`);\n      }\n    }\n\n    this.attrs = attrs;\n  }\n\n  /**\n   * Initialize the component's attrs.\n   *\n   * This can be used to assign default values for missing, optional attrs.\n   */\n  static initAttrs(attrs: unknown): void {}\n}\n","/**\n * Check if class A is the same as or a subclass of class B.\n */\nexport default function subclassOf(A, B) {\n  return A && (A === B || A.prototype instanceof B);\n}\n","import subclassOf from '../../common/utils/subclassOf';\n\nexport default class PageState {\n  constructor(type, data = {}) {\n    this.type = type;\n    this.data = data;\n  }\n\n  /**\n   * Determine whether the page matches the given class and data.\n   *\n   * @param {object} type The page class to check against. Subclasses are accepted as well.\n   * @param {Record<string, unknown>} data\n   * @return {boolean}\n   */\n  matches(type, data = {}) {\n    // Fail early when the page is of a different type\n    if (!subclassOf(this.type, type)) return false;\n\n    // Now that the type is known to be correct, we loop through the provided\n    // data to see whether it matches the data in our state.\n    return Object.keys(data).every((key) => this.data[key] === data[key]);\n  }\n\n  get(key) {\n    return this.data[key];\n  }\n\n  set(key, value) {\n    this.data[key] = value;\n  }\n}\n","import type Mithril from 'mithril';\nimport app from '../app';\nimport Component from '../Component';\nimport PageState from '../states/PageState';\n\nexport interface IPageAttrs {\n  key?: number;\n  routeName: string;\n}\n\n/**\n * The `Page` component\n *\n * @abstract\n */\nexport default abstract class Page<CustomAttrs extends IPageAttrs = IPageAttrs, CustomState = undefined> extends Component<CustomAttrs, CustomState> {\n  /**\n   * A class name to apply to the body while the route is active.\n   */\n  protected bodyClass = '';\n\n  /**\n   * Whether we should scroll to the top of the page when its rendered.\n   */\n  protected scrollTopOnCreate = true;\n\n  /**\n   * Whether the browser should restore scroll state on refreshes.\n   */\n  protected useBrowserScrollRestoration = true;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    app.previous = app.current;\n    app.current = new PageState(this.constructor, { routeName: this.attrs.routeName });\n\n    app.drawer.hide();\n    app.modal.close();\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    if (this.bodyClass) {\n      $('#app').addClass(this.bodyClass);\n    }\n\n    if (this.scrollTopOnCreate) {\n      $(window).scrollTop(0);\n    }\n\n    if ('scrollRestoration' in history) {\n      history.scrollRestoration = this.useBrowserScrollRestoration ? 'auto' : 'manual';\n    }\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    if (this.bodyClass) {\n      $('#app').removeClass(this.bodyClass);\n    }\n  }\n}\n","function _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n  var i = toPrimitive(t, \"string\");\n  return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n  if (\"object\" != _typeof(t) || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != _typeof(i)) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(e, r) {\n  for (var t = 0; t < r.length; t++) {\n    var o = r[t];\n    o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n  }\n}\nfunction _createClass(e, r, t) {\n  return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n    writable: !1\n  }), e;\n}\nexport { _createClass as default };","/**\n * Returns if the passed value is an object.\n *\n * In this context, \"object\" refers to **any non-primitive value**, including\n * arrays, function, maps, dates, and more.\n *\n * @example\n * isObject({}); // true\n * @example\n * isObject([]); // true\n * @example\n * isObject(function () {}); // true\n * @example\n * isObject(Object(1)); // true\n * @example\n * isObject(null); // false\n * @example\n * isObject(1); // false\n * @example\n * isObject(\"hello world\"); // false\n *\n * @see https://github.com/jashkenas/underscore/blob/943977e34e2279503528a71ddcc2dd5f96483945/underscore.js#L87-L91\n */\nexport default function isObject(obj: unknown): obj is object {\n  const type = typeof obj;\n  return type === 'function' || (type === 'object' && !!obj);\n}\n","import isObject from './isObject';\n\nexport interface IItemObject<T> {\n  content: T;\n  itemName: string;\n  priority: number;\n}\n\nclass Item<T> {\n  content: T;\n  priority: number;\n\n  constructor(content: T, priority: number) {\n    this.content = content;\n    this.priority = priority;\n  }\n}\n\n/**\n * The `ItemList` class collects items and then arranges them into an array\n * by priority.\n */\nexport default class ItemList<T> {\n  /**\n   * The items in the list.\n   */\n  protected _items: Record<string, Item<T>> = {};\n\n  // TODO: [Flarum 2.0] Remove `.items` getter.\n  /**\n   * A **read-only copy** of items in the list.\n   *\n   * We don't allow adding new items to the ItemList via setting new properties,\n   * nor do we allow modifying existing items directly.\n   *\n   * @deprecated Use {@link ItemList.toObject} instead.\n   */\n  get items(): DeepReadonly<Record<string, Item<T>>> {\n    return new Proxy(this._items, {\n      set() {\n        console.warn('Modifying `ItemList.items` is not allowed.');\n        return false;\n      },\n    });\n  }\n\n  /**\n   * Check whether the list is empty.\n   */\n  isEmpty(): boolean {\n    return Object.keys(this._items).length === 0;\n  }\n\n  /**\n   * Check whether an item is present in the list.\n   */\n  has(key: string): boolean {\n    return Object.keys(this._items).includes(key);\n  }\n\n  /**\n   * Get the content of an item.\n   */\n  get(key: string): T {\n    return this._items[key].content;\n  }\n\n  /**\n   * Get the priority of an item.\n   */\n  getPriority(key: string): number {\n    return this._items[key].priority;\n  }\n\n  /**\n   * Add an item to the list.\n   *\n   * @param key A unique key for the item.\n   * @param content The item's content.\n   * @param priority The priority of the item. Items with a higher priority\n   * will be positioned before items with a lower priority.\n   */\n  add(key: string, content: T, priority: number = 0): this {\n    this._items[key] = new Item(content, priority);\n\n    return this;\n  }\n\n  // TODO: [Flarum 2.0] Remove deprecated `.replace()` method.\n  /**\n   * Replace an item and/or priority in the list, only if it is already present.\n   *\n   * If `content` or `priority` are `null`, these values will not be replaced.\n   *\n   * If the provided `key` is not present, nothing will happen.\n   *\n   * @deprecated Please use the {@link ItemList.setContent} and {@link ItemList.setPriority}\n   * methods to replace items and their priorities. This method will be removed in Flarum 2.0.\n   *\n   * @param key The key of the item in the list\n   * @param content The item's new content\n   * @param priority The item's new priority\n   *\n   * @example <caption>Replace priority and not content.</caption>\n   * items.replace('myItem', null, 10);\n   *\n   * @example <caption>Replace content and not priority.</caption>\n   * items.replace('myItem', <p>My new value.</p>);\n   *\n   * @example <caption>Replace content and priority.</caption>\n   * items.replace('myItem', <p>My new value.</p>, 10);\n   */\n  replace(key: string, content: T | null = null, priority: number | null = null): this {\n    if (!this.has(key)) return this;\n\n    if (content !== null) {\n      this._items[key].content = content;\n    }\n\n    if (priority !== null) {\n      this._items[key].priority = priority;\n    }\n\n    return this;\n  }\n\n  /**\n   * Replaces an item's content, if the provided item key exists.\n   *\n   * If the provided `key` is not present, an error will be thrown.\n   *\n   * @param key The key of the item in the list\n   * @param content The item's new content\n   *\n   * @example <caption>Replace item content.</caption>\n   * items.setContent('myItem', <p>My new value.</p>);\n   *\n   * @example <caption>Replace item content and priority.</caption>\n   *          items\n   *            .setContent('myItem', <p>My new value.</p>)\n   *            .setPriority('myItem', 10);\n   *\n   * @throws If the provided `key` is not present in the ItemList.\n   */\n  setContent(key: string, content: T): this {\n    if (!this.has(key)) {\n      throw new Error(`[ItemList] Cannot set content of Item. Key \\`${key}\\` is not present.`);\n    }\n\n    // Saves on bundle size to call the deprecated method internally\n    return this.replace(key, content);\n  }\n\n  /**\n   * Replaces an item's priority, if the provided item key exists.\n   *\n   * If the provided `key` is not present, an error will be thrown.\n   *\n   * @param key The key of the item in the list\n   * @param priority The item's new priority\n   *\n   * @example <caption>Replace item priority.</caption>\n   * items.setPriority('myItem', 10);\n   *\n   * @example <caption>Replace item priority and content.</caption>\n   *          items\n   *            .setPriority('myItem', 10)\n   *            .setContent('myItem', <p>My new value.</p>);\n   *\n   * @throws If the provided `key` is not present in the ItemList.\n   */\n  setPriority(key: string, priority: number): this {\n    if (!this.has(key)) {\n      throw new Error(`[ItemList] Cannot set priority of Item. Key \\`${key}\\` is not present.`);\n    }\n\n    this._items[key].priority = priority;\n\n    return this;\n  }\n\n  /**\n   * Remove an item from the list.\n   *\n   * If the provided `key` is not present, nothing will happen.\n   */\n  remove(key: string): this {\n    delete this._items[key];\n\n    return this;\n  }\n\n  /**\n   * Merge another list's items into this one.\n   *\n   * The list passed to this function will overwrite items which already exist\n   * with the same key.\n   */\n  merge(otherList: ItemList<T>): ItemList<T> {\n    Object.keys(otherList._items).forEach((key) => {\n      const val = otherList._items[key];\n\n      if (val instanceof Item) {\n        this._items[key] = val;\n      }\n    });\n\n    return this;\n  }\n\n  /**\n   * Convert the list into an array of item content arranged by priority.\n   *\n   * This **does not** preserve the original types of primitives and proxies\n   * all content values to make `itemName` accessible on them.\n   *\n   * **NOTE:** If your ItemList holds primitive types (such as numbers, booleans\n   * or strings), these will be converted to their object counterparts if you do\n   * not provide `true` to this function.\n   *\n   * **NOTE:** Modifying any objects in the final array may also update the\n   * content of the original ItemList.\n   *\n   * @param keepPrimitives Converts item content to objects and sets the\n   * `itemName` property on them.\n   *\n   * @see https://github.com/flarum/core/issues/3030\n   */\n  toArray(keepPrimitives?: false): (T & { itemName: string })[];\n  /**\n   * Convert the list into an array of item content arranged by priority.\n   *\n   * Content values that are already objects will be proxied and have\n   * `itemName` accessible on them. Primitive values will not have the\n   * `itemName` property accessible.\n   *\n   * **NOTE:** Modifying any objects in the final array may also update the\n   * content of the original ItemList.\n   *\n   * @param keepPrimitives Converts item content to objects and sets the\n   * `itemName` property on them.\n   */\n  toArray(keepPrimitives: true): (T extends object ? T & Readonly<{ itemName: string }> : T)[];\n\n  toArray(keepPrimitives: boolean = false): T[] | (T & Readonly<{ itemName: string }>)[] {\n    const items: Item<T>[] = Object.keys(this._items).map((key, i) => {\n      const item = this._items[key];\n\n      if (!keepPrimitives || isObject(item.content)) {\n        // Convert content to object, then proxy it\n        return {\n          ...item,\n          content: this.createItemContentProxy(isObject(item.content) ? item.content : Object(item.content), key),\n        };\n      } else {\n        // ...otherwise just return a clone of the item.\n        return { ...item };\n      }\n    });\n\n    return items.sort((a, b) => b.priority - a.priority).map((item) => item.content);\n  }\n\n  /**\n   * A read-only map of all keys to their respective items in no particular order.\n   *\n   * We don't allow adding new items to the ItemList via setting new properties,\n   * nor do we allow modifying existing items directly. You should use the\n   * {@link ItemList.add}, {@link ItemList.setContent} and\n   * {@link ItemList.setPriority} methods instead.\n   *\n   * To match the old behaviour of the `ItemList.items` property, call\n   * `Object.values(ItemList.toObject())`.\n   *\n   * @example\n   * const items = new ItemList();\n   * items.add('b', 'My cool value', 20);\n   * items.add('a', 'My value', 10);\n   * items.toObject();\n   * // {\n   * //   a: { content: 'My value', priority: 10, itemName: 'a' },\n   * //   b: { content: 'My cool value', priority: 20, itemName: 'b' },\n   * // }\n   */\n  toObject(): DeepReadonly<Record<string, IItemObject<T>>> {\n    return Object.keys(this._items).reduce((map, key) => {\n      const obj = {\n        content: this.get(key),\n        itemName: key,\n        priority: this.getPriority(key),\n      };\n\n      map[key] = obj;\n\n      return map;\n    }, {} as Record<string, IItemObject<T>>);\n  }\n\n  /**\n   * Proxies an item's content, adding the `itemName` readonly property to it.\n   *\n   * @example\n   * createItemContentProxy({ foo: 'bar' }, 'myItem');\n   * // { foo: 'bar', itemName: 'myItem' }\n   *\n   * @param content The item's content (objects only)\n   * @param key The item's key\n   * @return Proxied content\n   *\n   * @internal\n   */\n  private createItemContentProxy<C extends object>(content: C, key: string): Readonly<C & { itemName: string }> {\n    return new Proxy(content, {\n      get(target, property, receiver) {\n        if (property === 'itemName') return key;\n\n        return Reflect.get(target, property, receiver);\n      },\n      set(target, property, value, receiver) {\n        if (key !== null && property === 'itemName') {\n          throw new Error('`itemName` property is read-only');\n        }\n\n        return Reflect.set(target, property, value, receiver);\n      },\n    }) as C & { itemName: string };\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `Separator` component defines a menu separator item.\n */\nclass Separator extends Component {\n  view() {\n    return <li className=\"Dropdown-separator\" />;\n  }\n}\n\nSeparator.isListItem = true;\n\nexport default Separator;\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f);else for(t in e)e[t]&&(n&&(n+=\" \"),n+=t);return n}export function clsx(){for(var e,t,f=0,n=\"\";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import clsx from 'clsx';\n\n/**\n * This util exposes `clsx` to core and extensions as a re-usable utility.\n *\n * For full documentation, see `clsx` on GitHub.\n *\n * @see https://github.com/lukeed/clsx\n */\nconst classList = clsx;\n\nexport default classList;\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport Separator from '../components/Separator';\nimport classList from '../utils/classList';\n\ntype ModdedVnodeAttrs = {\n  itemClassName?: string;\n  key?: string;\n};\n\ntype ModdedTag = Mithril.Vnode['tag'] & {\n  isListItem?: boolean;\n  isActive?: (attrs: ComponentAttrs) => boolean;\n};\n\ntype ModdedVnode = Mithril.Vnode<ModdedVnodeAttrs> & { itemName?: string; itemClassName?: string; tag: ModdedTag };\n\ntype ModdedChild = ModdedVnode | string | number | boolean | null | undefined;\ntype ModdedChildArray = ModdedChildren[];\ntype ModdedChildren = ModdedChild | ModdedChildArray;\n\n/**\n * This type represents an element of a list returned by `ItemList.toArray()`,\n * coupled with some static properties used on various components.\n */\nexport type ModdedChildrenWithItemName = ModdedChildren & { itemName?: string };\n\nfunction isVnode(item: ModdedChildren): item is Mithril.Vnode {\n  return typeof item === 'object' && item !== null && 'tag' in item;\n}\n\nfunction isSeparator(item: ModdedChildren): boolean {\n  return isVnode(item) && item.tag === Separator;\n}\n\nfunction withoutUnnecessarySeparators(items: ModdedChildrenWithItemName[]): ModdedChildrenWithItemName[] {\n  const newItems: ModdedChildrenWithItemName[] = [];\n  let prevItem: ModdedChildren;\n\n  items.filter(Boolean).forEach((item, i: number) => {\n    if (!isSeparator(item) || (prevItem && !isSeparator(prevItem) && i !== items.length - 1)) {\n      prevItem = item;\n      newItems.push(item);\n    }\n  });\n\n  return newItems;\n}\n\n/**\n * The `listItems` helper wraps an array of components in the provided tag,\n * stripping out any unnecessary `Separator` components.\n *\n * By default, this tag is an `<li>` tag, but this is customisable through the\n * second function parameter, `customTag`.\n */\nexport default function listItems<Attrs extends ComponentAttrs>(\n  rawItems: ModdedChildrenWithItemName[],\n  customTag: VnodeElementTag<Attrs> = 'li',\n  attributes: Attrs = {} as Attrs\n): Mithril.Vnode[] {\n  const items = rawItems instanceof Array ? rawItems : [rawItems];\n  const Tag = customTag;\n\n  return withoutUnnecessarySeparators(items).map((item) => {\n    const classes = [item.itemName && `item-${item.itemName}`];\n\n    if (isVnode(item) && item.tag.isListItem) {\n      item.attrs = item.attrs || {};\n      item.attrs.key = item.attrs.key || item.itemName;\n      item.key = item.attrs.key;\n\n      return item;\n    }\n\n    if (isVnode(item)) {\n      classes.push(item.attrs?.itemClassName || item.itemClassName);\n\n      if (item.tag.isActive?.(item.attrs)) {\n        classes.push('active');\n      }\n    }\n\n    const key = (isVnode(item) && item?.attrs?.key) || item.itemName;\n\n    return (\n      <Tag className={classList(classes)} key={key} {...attributes}>\n        {item}\n      </Tag>\n    );\n  });\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `DiscussionHero` component displays the hero on a discussion page.\n *\n * ### attrs\n *\n * - `discussion`\n */\nexport default class DiscussionHero extends Component {\n  view() {\n    return (\n      <header className=\"Hero DiscussionHero\">\n        <div className=\"container\">\n          <ul className=\"DiscussionHero-items\">{listItems(this.items().toArray())}</ul>\n        </div>\n      </header>\n    );\n  }\n\n  /**\n   * Build an item list for the contents of the discussion hero.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    const items = new ItemList();\n    const discussion = this.attrs.discussion;\n    const badges = discussion.badges().toArray();\n\n    if (badges.length) {\n      items.add('badges', <ul className=\"DiscussionHero-badges badges\">{listItems(badges)}</ul>, 10);\n    }\n\n    items.add('title', <h1 className=\"DiscussionHero-title\">{discussion.title()}</h1>);\n\n    return items;\n  }\n}\n","function _objectWithoutPropertiesLoose(r, e) {\n  if (null == r) return {};\n  var t = {};\n  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n    if (-1 !== e.indexOf(n)) continue;\n    t[n] = r[n];\n  }\n  return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","/**\n * The `extract` utility deletes a property from an object and returns its\n * value.\n *\n * @param object The object that owns the property\n * @param property The name of the property to extract\n * @return The value of the property\n */\nexport default function extract<T, K extends keyof T>(object: T, property: K): T[K] {\n  const value = object[property];\n\n  delete object[property];\n\n  return value;\n}\n","import Component from '../Component';\nimport extract from '../utils/extract';\n\n/**\n * The link component enables both internal and external links.\n * It will return a regular HTML link for any links to external sites,\n * and it will use Mithril's m.route.Link for any internal links.\n *\n * Links will default to internal; the 'external' attr must be set to\n * `true` for the link to be external.\n */\nexport default class Link extends Component {\n  view(vnode) {\n    let { options = {}, ...attrs } = vnode.attrs;\n\n    attrs.href ||= '';\n\n    // For some reason, m.route.Link does not like vnode.text, so if present, we\n    // need to convert it to text vnodes and store it in children.\n    const children = vnode.children || { tag: '#', children: vnode.text };\n\n    if (attrs.external) {\n      return <a {...attrs}>{children}</a>;\n    }\n\n    // If the href URL of the link is the same as the current page path\n    // we will not add a new entry to the browser history.\n    // This allows us to still refresh the Page component\n    // without adding endless history entries.\n    if (attrs.href === m.route.get()) {\n      if (!('replace' in options)) options.replace = true;\n    }\n\n    // Mithril 2 does not completely rerender the page if a route change leads to the same route\n    // (or the same component handling a different route).\n    // Here, the `force` parameter will use Mithril's key system to force a full rerender\n    // see https://mithril.js.org/route.html#key-parameter\n    if (extract(attrs, 'force')) {\n      if (!('state' in options)) options.state = {};\n      if (!('key' in options.state)) options.state.key = Date.now();\n    }\n\n    attrs.options = options;\n\n    return <m.route.Link {...attrs}>{children}</m.route.Link>;\n  }\n}\n","import type Mithril from 'mithril';\nimport type { ComponentAttrs } from '../Component';\nimport User from '../models/User';\nimport classList from '../utils/classList';\n\nexport interface AvatarAttrs extends ComponentAttrs {}\n\n/**\n * The `avatar` helper displays a user's avatar.\n *\n * @param user\n * @param attrs Attributes to apply to the avatar element\n */\nexport default function avatar(user: User | null, attrs: ComponentAttrs = {}): Mithril.Vnode {\n  attrs.className = classList('Avatar', attrs.className);\n  attrs.loading ??= 'lazy';\n  let content: string = '';\n\n  // If the `title` attribute is set to null or false, we don't want to give the\n  // avatar a title. On the other hand, if it hasn't been given at all, we can\n  // safely default it to the user's username.\n  const hasTitle: boolean | string = attrs.title === 'undefined' || attrs.title;\n  if (!hasTitle) delete attrs.title;\n\n  // If a user has been passed, then we will set up an avatar using their\n  // uploaded image, or the first letter of their username if they haven't\n  // uploaded one.\n  if (user) {\n    const username = user.displayName() || '?';\n    const avatarUrl = user.avatarUrl();\n\n    if (hasTitle) attrs.title = attrs.title || username;\n\n    if (avatarUrl) {\n      return <img {...attrs} src={avatarUrl} alt=\"\" />;\n    }\n\n    content = username.charAt(0).toUpperCase();\n    attrs.style = { '--avatar-bg': user.color() };\n  }\n\n  return <span {...attrs}>{content}</span>;\n}\n","/**\n * Truncate a string to the given length, appending ellipses if necessary.\n */\nexport function truncate(string: string, length: number, start: number = 0): string {\n  return (start > 0 ? '...' : '') + string.substring(start, start + length) + (string.length > start + length ? '...' : '');\n}\n\n/**\n * Create a slug out of the given string depending on the selected mode.\n * Invalid characters are converted to hyphens.\n *\n * NOTE: This method does not use the comparably sophisticated transliteration\n * mechanism that is employed in the backend. Therefore, it should only be used\n * to *suggest* slugs that can be overridden by the user.\n */\nexport function slug(string: string, mode: SluggingMode = SluggingMode.ALPHANUMERIC): string {\n  switch (mode) {\n    case SluggingMode.UTF8:\n      return (\n        string\n          .toLowerCase()\n          // Match non-word characters (take UTF8 into consideration) and replace with a dash.\n          .replace(/[^\\p{L}\\p{N}\\p{M}]/giu, '-')\n          .replace(/-+/g, '-')\n          .replace(/-$|^-/g, '')\n      );\n\n    case SluggingMode.ALPHANUMERIC:\n    default:\n      return string\n        .toLowerCase()\n        .replace(/[^a-z0-9]/gi, '-')\n        .replace(/-+/g, '-')\n        .replace(/-$|^-/g, '');\n  }\n}\n\nenum SluggingMode {\n  ALPHANUMERIC = 'alphanum',\n  UTF8 = 'utf8',\n}\n\n/**\n * Strip HTML tags and quotes out of the given string, replacing them with\n * meaningful punctuation.\n */\nexport function getPlainContent(string: string): string {\n  const html = string.replace(/(<\\/p>|<br>)/g, '$1 &nbsp;').replace(/<img\\b[^>]*>/gi, ' ');\n\n  const element = new DOMParser().parseFromString(html, 'text/html').documentElement;\n\n  getPlainContent.removeSelectors.forEach((selector) => {\n    const el = element.querySelectorAll(selector);\n    el.forEach((e) => {\n      e.remove();\n    });\n  });\n\n  return element.innerText.replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * An array of DOM selectors to remove when getting plain content.\n *\n * @type {Array}\n */\ngetPlainContent.removeSelectors = ['blockquote', 'script'];\n\n/**\n * Make a string's first character uppercase.\n */\nexport function ucfirst(string: string): string {\n  return string.substr(0, 1).toUpperCase() + string.substr(1);\n}\n\n/**\n * Transform a camel case string to snake case.\n */\nexport function camelCaseToSnakeCase(str: string): string {\n  return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);\n}\n\n/**\n * Generate a random string (a-z, 0-9) of a given length.\n *\n * Providing a length of less than 0 will result in an error.\n *\n * @param length Length of the random string to generate\n * @returns A random string of provided length\n */\nexport function generateRandomString(length: number): string {\n  if (length < 0) throw new Error('Cannot generate a random string with length less than 0.');\n  if (length === 0) return '';\n\n  const arr = new Uint8Array(length / 2);\n  window.crypto.getRandomValues(arr);\n\n  return Array.from(arr, (dec) => {\n    return dec.toString(16).padStart(2, '0');\n  }).join('');\n}\n","import type Mithril from 'mithril';\nimport { truncate } from '../utils/string';\n\n/**\n * The `highlight` helper searches for a word phrase in a string, and wraps\n * matches with the <mark> tag.\n *\n * @param string The string to highlight.\n * @param phrase The word or words to highlight.\n * @param [length] The number of characters to truncate the string to.\n *     The string will be truncated surrounding the first match.\n */\nexport default function highlight(string: string, phrase?: string | RegExp, length?: number): Mithril.Vnode<any, any> | string {\n  if (!phrase && !length) return string;\n\n  // Convert the word phrase into a global regular expression (if it isn't\n  // already) so we can search the string for matched.\n  const regexp = phrase instanceof RegExp ? phrase : new RegExp(phrase ?? '', 'gi');\n\n  let highlighted = string;\n  let start = 0;\n\n  // If a length was given, the truncate the string surrounding the first match.\n  if (length) {\n    if (phrase) start = Math.max(0, string.search(regexp) - length / 2);\n\n    highlighted = truncate(highlighted, length, start);\n  }\n\n  // Convert the string into HTML entities, then highlight all matches with\n  // <mark> tags. Then we will return the result as a trusted HTML string.\n  highlighted = $('<div/>').text(highlighted).html();\n\n  if (phrase) highlighted = highlighted.replace(regexp, '<mark>$&</mark>');\n\n  return m.trust(highlighted);\n}\n","import type Mithril from 'mithril';\nimport classList from '../utils/classList';\n\n/**\n * The `icon` helper displays an icon.\n *\n * @param fontClass The full icon class, prefix and the icon\u2019s name.\n * @param attrs Any other attributes to apply.\n */\nexport default function icon(fontClass: string, attrs: Mithril.Attributes = {}): Mithril.Vnode {\n  attrs.className = classList('icon', fontClass, attrs.className);\n\n  return <i aria-hidden=\"true\" {...attrs} />;\n}\n","import type Mithril from 'mithril';\n\n/**\n * Extract the text nodes from a virtual element.\n */\nexport default function extractText(vdom: Mithril.Children): string {\n  if (vdom instanceof Array) {\n    return vdom.map((element) => extractText(element)).join('');\n  } else if (typeof vdom === 'object' && vdom !== null) {\n    return vdom.children ? extractText(vdom.children) : String(vdom.text);\n  } else {\n    return String(vdom);\n  }\n}\n","import app from '../../common/app';\nimport dayjs from 'dayjs';\nimport extractText from './extractText';\n\n/**\n * The `humanTime` utility converts a date to a localized, human-readable time-\n * ago string.\n */\nexport default function humanTime(time: dayjs.ConfigType): string {\n  let d = dayjs(time);\n  const now = dayjs();\n\n  // To prevent showing things like \"in a few seconds\" due to small offsets\n  // between client and server time, we always reset future dates to the\n  // current time. This will result in \"just now\" being shown instead.\n  if (d.isAfter(now)) {\n    d = now;\n  }\n\n  const day = 864e5;\n  const diff = d.diff(dayjs());\n  let ago: string;\n\n  // If this date was more than a month ago, we'll show the name of the month\n  // in the string. If it wasn't this year, we'll show the year as well.\n  if (diff < -30 * day) {\n    if (d.year() === dayjs().year()) {\n      ago = d.format(extractText(app.translator.trans('core.lib.datetime_formats.humanTimeShort')));\n    } else {\n      ago = d.format(extractText(app.translator.trans('core.lib.datetime_formats.humanTimeLong')));\n    }\n  } else {\n    ago = d.fromNow();\n  }\n\n  return ago;\n}\n","import app from '../../common/app';\nimport extractText from './extractText';\n\n/**\n * The `abbreviateNumber` utility converts a number to a shorter localized form.\n *\n * @example\n * abbreviateNumber(1234);\n * // \"1.2K\"\n */\nexport default function abbreviateNumber(number: number): string {\n  // TODO: translation\n  if (number >= 1000000) {\n    return Math.floor(number / 1000000) + extractText(app.translator.trans('core.lib.number_suffix.mega_text'));\n  } else if (number >= 1000) {\n    return (number / 1000).toFixed(1) + extractText(app.translator.trans('core.lib.number_suffix.kilo_text'));\n  } else {\n    return number.toString();\n  }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport icon from '../helpers/icon';\nimport listItems, { ModdedChildrenWithItemName } from '../helpers/listItems';\nimport extractText from '../utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface IDropdownAttrs extends ComponentAttrs {\n  /** A class name to apply to the dropdown toggle button. */\n  buttonClassName?: string;\n  /** A class name to apply to the dropdown menu. */\n  menuClassName?: string;\n  /** The name of an icon to show in the dropdown toggle button. */\n  icon?: string;\n  /** The name of an icon to show on the right of the button. */\n  caretIcon?: string;\n  /** The label of the dropdown toggle button. Defaults to 'Controls'. */\n  label: Mithril.Children;\n  /** The label used to describe the dropdown toggle button to assistive readers. Defaults to 'Toggle dropdown menu'. */\n  accessibleToggleLabel?: string;\n  /** An action to take when the dropdown is collapsed. */\n  onhide?: () => void;\n  /** An action to take when the dropdown is opened. */\n  onshow?: () => void;\n\n  lazyDraw?: boolean;\n}\n\n/**\n * The `Dropdown` component displays a button which, when clicked, shows a\n * dropdown menu beneath it.\n *\n * The children will be displayed as a list inside the dropdown menu.\n */\nexport default class Dropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Component<CustomAttrs> {\n  protected showing = false;\n\n  static initAttrs(attrs: IDropdownAttrs) {\n    attrs.className ||= '';\n    attrs.buttonClassName ||= '';\n    attrs.menuClassName ||= '';\n    attrs.label ||= '';\n    attrs.caretIcon ??= 'fas fa-caret-down';\n    attrs.accessibleToggleLabel ||= extractText(app.translator.trans('core.lib.dropdown.toggle_dropdown_accessible_label'));\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const items = vnode.children ? listItems(vnode.children as ModdedChildrenWithItemName[]) : [];\n    const renderItems = this.attrs.lazyDraw ? this.showing : true;\n\n    return (\n      <div className={'ButtonGroup Dropdown dropdown ' + this.attrs.className + ' itemCount' + items.length + (this.showing ? ' open' : '')}>\n        {this.getButton(vnode.children as Mithril.ChildArray)}\n        {renderItems && this.getMenu(items)}\n      </div>\n    );\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    // When opening the dropdown menu, work out if the menu goes beyond the\n    // bottom of the viewport. If it does, we will apply class to make it show\n    // above the toggle button instead of below it.\n    this.$().on('shown.bs.dropdown', () => {\n      const { lazyDraw, onshow } = this.attrs;\n\n      this.showing = true;\n\n      // If using lazy drawing, redraw before calling `onshow` function\n      // to make sure the menu DOM exists in case the callback tries to use it.\n      if (lazyDraw) {\n        m.redraw.sync();\n      }\n\n      if (typeof onshow === 'function') {\n        onshow();\n      }\n\n      // If not using lazy drawing, keep previous functionality\n      // of redrawing after calling onshow()\n      if (!lazyDraw) {\n        m.redraw();\n      }\n\n      const $menu = this.$('.Dropdown-menu');\n      const isRight = $menu.hasClass('Dropdown-menu--right');\n\n      const top = $menu.offset()?.top ?? 0;\n      const height = $menu.height() ?? 0;\n      const windowSrollTop = $(window).scrollTop() ?? 0;\n      const windowHeight = $(window).height() ?? 0;\n\n      $menu.removeClass('Dropdown-menu--top Dropdown-menu--right');\n\n      $menu.toggleClass('Dropdown-menu--top', top + height > windowSrollTop + windowHeight);\n\n      if (($menu.offset()?.top || 0) < 0) {\n        $menu.removeClass('Dropdown-menu--top');\n      }\n\n      const left = $menu.offset()?.left ?? 0;\n      const width = $menu.width() ?? 0;\n      const windowScrollLeft = $(window).scrollLeft() ?? 0;\n      const windowWidth = $(window).width() ?? 0;\n\n      $menu.toggleClass('Dropdown-menu--right', isRight || left + width > windowScrollLeft + windowWidth);\n    });\n\n    this.$().on('hidden.bs.dropdown', () => {\n      this.showing = false;\n\n      if (this.attrs.onhide) {\n        this.attrs.onhide();\n      }\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Get the template for the button.\n   */\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    return (\n      <button\n        className={'Dropdown-toggle ' + this.attrs.buttonClassName}\n        aria-haspopup=\"menu\"\n        aria-label={this.attrs.accessibleToggleLabel}\n        data-toggle=\"dropdown\"\n        onclick={this.attrs.onclick}\n      >\n        {this.getButtonContent(children)}\n      </button>\n    );\n  }\n\n  /**\n   * Get the template for the button's content.\n   */\n  getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n    return [\n      this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : '',\n      <span className=\"Button-label\">{this.attrs.label}</span>,\n      this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : '',\n    ];\n  }\n\n  getMenu(items: Mithril.Vnode<any, any>[]): Mithril.Vnode<any, any> {\n    return <ul className={'Dropdown-menu dropdown-menu ' + this.attrs.menuClassName}>{items}</ul>;\n  }\n}\n","import dayjs from 'dayjs';\nimport type Mithril from 'mithril';\nimport humanTimeUtil from '../utils/humanTime';\n\n/**\n * The `humanTime` helper displays a time in a human-friendly time-ago format\n * (e.g. '12 days ago'), wrapped in a <time> tag with other information about\n * the time.\n */\nexport default function humanTime(time: Date): Mithril.Vnode {\n  const d = dayjs(time);\n\n  const datetime = d.format();\n  const full = d.format('LLLL');\n  const ago = humanTimeUtil(time);\n\n  return (\n    <time pubdate datetime={datetime} title={full} data-humantime>\n      {ago}\n    </time>\n  );\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/helpers/humanTime';\nimport icon from '../../common/helpers/icon';\n\n/**\n * Displays information about a the first or last post in a discussion.\n *\n * ### Attrs\n *\n * - `discussion`\n * - `lastPost`\n */\nexport default class TerminalPost extends Component {\n  view() {\n    const discussion = this.attrs.discussion;\n    const lastPost = this.attrs.lastPost && discussion.replyCount();\n\n    const user = discussion[lastPost ? 'lastPostedUser' : 'user']();\n    const time = discussion[lastPost ? 'lastPostedAt' : 'createdAt']();\n\n    return (\n      <span>\n        {!!lastPost && icon('fas fa-reply')}{' '}\n        {app.translator.trans('core.forum.discussion_list.' + (lastPost ? 'replied' : 'started') + '_text', {\n          user,\n          ago: humanTime(time),\n        })}\n      </span>\n    );\n  }\n}\n","/**\n * The `SubtreeRetainer` class keeps track of a number of pieces of data,\n * comparing the values of these pieces at every iteration.\n *\n * This is useful for preventing redraws to relatively static (or huge)\n * components whose VDOM only depends on very few values, when none of them\n * have changed.\n *\n * @example\n * // Check two callbacks for changes on each update\n * this.subtree = new SubtreeRetainer(\n *   () => this.attrs.post.freshness,\n *   () => this.showing\n * );\n *\n * // Add more callbacks to be checked for updates\n * this.subtree.check(() => this.attrs.user.freshness);\n *\n * // In a component's onbeforeupdate() method:\n * return this.subtree.needsRebuild()\n *\n * @see https://mithril.js.org/lifecycle-methods.html#onbeforeupdate\n */\nexport default class SubtreeRetainer {\n  protected callbacks: (() => any)[];\n  protected data: Record<string, any>;\n\n  /**\n   * @param callbacks Functions returning data to keep track of.\n   */\n  constructor(...callbacks: (() => any)[]) {\n    this.callbacks = callbacks;\n    this.data = {};\n\n    // Build the initial data, so it is available when calling\n    // needsRebuild from the onbeforeupdate hook.\n    this.needsRebuild();\n  }\n\n  /**\n   * Return whether any data has changed since the last check.\n   * If so, Mithril needs to re-diff the vnode and its children.\n   */\n  needsRebuild(): boolean {\n    let needsRebuild = false;\n\n    this.callbacks.forEach((callback, i) => {\n      const result = callback();\n\n      if (result !== this.data[i]) {\n        this.data[i] = result;\n        needsRebuild = true;\n      }\n    });\n\n    return needsRebuild;\n  }\n\n  /**\n   * Add another callback to be checked.\n   */\n  check(...callbacks: (() => any)[]): void {\n    this.callbacks = this.callbacks.concat(callbacks);\n    // Update the data cache when new checks are added.\n    this.needsRebuild();\n  }\n\n  /**\n   * Invalidate the subtree, forcing it to be redrawn.\n   */\n  invalidate(): void {\n    this.data = {};\n  }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\n\nexport interface LoadingIndicatorAttrs extends ComponentAttrs {\n  /**\n   * Custom classes for the loading indicator's container.\n   */\n  className?: string;\n  /**\n   * Custom classes for the loading indicator's container.\n   */\n  containerClassName?: string;\n  /**\n   * Optional size for the loading indicator.\n   */\n  size?: 'large' | 'medium' | 'small';\n  /**\n   * Optional attributes to apply to the loading indicator's container.\n   */\n  containerAttrs?: Partial<ComponentAttrs>;\n  /**\n   * Display type of the spinner.\n   *\n   * @default 'block'\n   */\n  display?: 'block' | 'inline' | 'unset';\n}\n\n/**\n * The `LoadingIndicator` component displays a simple CSS-based loading spinner.\n *\n * To set a custom color, use the CSS `color` property.\n *\n * To increase spacing around the spinner, use the CSS `height` property on the\n * spinner's **container**. Setting the `display` attribute to `block` will set\n * a height of `100px` by default.\n *\n * To apply a custom size to the loading indicator, set the `--size` and\n * `--thickness` CSS custom properties on the loading indicator container.\n *\n * If you *really* want to change how this looks as part of your custom theme,\n * you can override the `border-radius` and `border` then set either a\n * background image, or use `content: \"\\<glyph>\"` (e.g. `content: \"\\f1ce\"`)\n * and `font-family: 'Font Awesome 5 Free'` to set an FA icon if you'd rather.\n *\n * ### Attrs\n *\n * - `containerClassName` Class name(s) to apply to the indicator's parent\n * - `className` Class name(s) to apply to the indicator itself\n * - `display` Determines how the spinner should be displayed (`inline`, `block` (default) or `unset`)\n * - `size` Size of the loading indicator (`small`, `medium` or `large`)\n * - `containerAttrs` Optional attrs to be applied to the container DOM element\n *\n * All other attrs will be assigned as attributes on the DOM element.\n */\nexport default class LoadingIndicator extends Component<LoadingIndicatorAttrs> {\n  view() {\n    const { display = 'block', size = 'medium', containerClassName, className, ...attrs } = this.attrs;\n\n    const completeClassName = classList('LoadingIndicator', className);\n    const completeContainerClassName = classList(\n      'LoadingIndicator-container',\n      display !== 'unset' && `LoadingIndicator-container--${display}`,\n      size && `LoadingIndicator-container--${size}`,\n      containerClassName\n    );\n\n    return (\n      <div\n        aria-label={app.translator.trans('core.lib.loading_indicator.accessible_label')}\n        role=\"status\"\n        {...attrs.containerAttrs}\n        data-size={size}\n        className={completeContainerClassName}\n      >\n        <div aria-hidden=\"true\" className={completeClassName} {...attrs} />\n      </div>\n    );\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `ConfirmDocumentUnload` component can be used to register a global\n * event handler that prevents closing the browser window/tab based on the\n * return value of a given callback prop.\n *\n * ### Attrs\n *\n * - `when` - a callback returning true when the browser should prompt for\n *            confirmation before closing the window/tab\n */\nexport default class ConfirmDocumentUnload extends Component {\n  handler() {\n    return this.attrs.when() || undefined;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.boundHandler = this.handler.bind(this);\n    $(window).on('beforeunload', this.boundHandler);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('beforeunload', this.boundHandler);\n  }\n\n  view(vnode) {\n    return <>{vnode.children}</>;\n  }\n}\n","import app from '../app';\n\n/**\n * Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.\n *\n * This function is intended to provide warnings to extension developers about issues with\n * their extensions that may not be easily noticed when testing, such as accessibility\n * issues.\n *\n * These warnings should be hidden on production forums to ensure webmasters are not\n * inundated with do-gooders telling them they have an issue when it isn't something they\n * can fix.\n */\nexport default function fireDebugWarning(...args: Parameters<typeof console.warn>): void {\n  if (!app.forum.attribute('debug')) return;\n\n  console.warn(...args);\n}\n\n/**\n * Fire a Flarum deprecation warning which is shown in the JS console.\n *\n * These warnings are only shown when the forum is in debug mode, and the function exists to\n * reduce bundle size caused by multiple warnings across our JavaScript.\n *\n * @param message The message to display. (Short, but sweet, please!)\n * @param githubId The PR or Issue ID with more info in relation to this change.\n * @param [removedFrom] The version in which this feature will be completely removed. (default: 2.0)\n * @param [repo] The repo which the issue or PR is located in. (default: flarum/core)\n *\n * @see {@link fireDebugWarning}\n */\nexport function fireDeprecationWarning(message: string, githubId: string, removedFrom: string = '2.0', repo: string = 'flarum/core'): void {\n  // GitHub auto-redirects between `/pull` and `/issues` for us, so using `/pull` saves 2 bytes!\n  fireDebugWarning(`[Flarum ${removedFrom} Deprecation] ${message}\\n\\nSee: https://github.com/${repo}/pull/${githubId}`);\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport interface IButtonAttrs extends ComponentAttrs {\n  /**\n   * Class(es) of an optional icon to be rendered within the button.\n   *\n   * If provided, the button will gain a `has-icon` class.\n   */\n  icon?: string;\n  /**\n   * Disables button from user input.\n   *\n   * Default: `false`\n   */\n  disabled?: boolean;\n  /**\n   * Show a loading spinner within the button.\n   *\n   * If `true`, also disables the button.\n   *\n   * Default: `false`\n   */\n  loading?: boolean;\n  /**\n   * **DEPRECATED:** Please use the `aria-label` attribute instead. For tooltips, use\n   * the `<Tooltip>` component.\n   *\n   * Accessible text for the button. This should always be present if the button only\n   * contains an icon.\n   *\n   * The textual content of this attribute is passed to the DOM element as `aria-label`.\n   *\n   * @deprecated\n   */\n  title?: string | Mithril.ChildArray;\n  /**\n   * Accessible text for the button. This should always be present if the button only\n   * contains an icon.\n   *\n   * The textual content of this attribute is passed to the DOM element as `aria-label`.\n   */\n  'aria-label'?: string | Mithril.ChildArray;\n  /**\n   * Button type.\n   *\n   * Default: `\"button\"`\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n   */\n  type?: string;\n}\n\n/**\n * The `Button` component defines an element which, when clicked, performs an\n * action.\n *\n * Other attrs will be assigned as attributes on the `<button>` element.\n *\n * Note that a Button has no default class names. This is because a Button can\n * be used to represent any generic clickable control, like a menu item. Common\n * styles can be applied by providing `className=\"Button\"` to the Button component.\n */\nexport default class Button<CustomAttrs extends IButtonAttrs = IButtonAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    let { type, title, 'aria-label': ariaLabel, icon: iconName, disabled, loading, className, class: _class, ...attrs } = this.attrs;\n\n    // If no `type` attr provided, set to \"button\"\n    type ||= 'button';\n\n    // Use `title` attribute as `aria-label` if none provided\n    ariaLabel ||= title;\n\n    // If given a translation object, extract the text.\n    if (typeof ariaLabel === 'object') {\n      ariaLabel = extractText(ariaLabel);\n    }\n\n    if (disabled || loading) {\n      delete attrs.onclick;\n    }\n\n    className = classList(_class, className, {\n      hasIcon: iconName,\n      disabled: disabled || loading,\n      loading: loading,\n    });\n\n    const buttonAttrs = {\n      disabled,\n      className,\n      type,\n      'aria-label': ariaLabel,\n      ...attrs,\n    };\n\n    return <button {...buttonAttrs}>{this.getButtonContent(vnode.children)}</button>;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    const { 'aria-label': ariaLabel } = this.attrs;\n\n    if (this.view === Button.prototype.view && !ariaLabel && !extractText(vnode.children) && !this.element?.getAttribute?.('aria-label')) {\n      fireDebugWarning(\n        '[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read \"Button\". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',\n        this.element\n      );\n    }\n  }\n\n  /**\n   * Get the template for the button's content.\n   */\n  protected getButtonContent(children: Mithril.Children): Mithril.ChildArray {\n    const iconName = this.attrs.icon;\n\n    return [\n      iconName && icon(iconName, { className: 'Button-icon' }),\n      children && <span className=\"Button-label\">{children}</span>,\n      this.attrs.loading && <LoadingIndicator size=\"small\" display=\"inline\" />,\n    ];\n  }\n}\n","/*\n * Original Copyright GitHub, Inc. Licensed under the MIT License.\n * See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.\n */\n\nexport interface SelectionRange {\n  text: string;\n  selectionStart: number | undefined;\n  selectionEnd: number | undefined;\n}\n\nlet canInsertText: boolean | null = null;\n\nexport default function insertText(textarea: HTMLTextAreaElement, { text, selectionStart, selectionEnd }: SelectionRange) {\n  const originalSelectionStart = textarea.selectionStart;\n  const before = textarea.value.slice(0, originalSelectionStart);\n  const after = textarea.value.slice(textarea.selectionEnd);\n\n  if (canInsertText === null || canInsertText === true) {\n    textarea.contentEditable = 'true';\n    try {\n      canInsertText = document.execCommand('insertText', false, text);\n    } catch (error) {\n      canInsertText = false;\n    }\n    textarea.contentEditable = 'false';\n  }\n\n  if (canInsertText && !textarea.value.slice(0, textarea.selectionStart).endsWith(text)) {\n    canInsertText = false;\n  }\n\n  if (!canInsertText) {\n    textarea.value = before + text + after;\n    textarea.dispatchEvent(new CustomEvent('input', { bubbles: true, cancelable: true }));\n  }\n\n  if (selectionStart != null && selectionEnd != null) {\n    textarea.setSelectionRange(selectionStart, selectionEnd);\n  } else {\n    textarea.setSelectionRange(originalSelectionStart, textarea.selectionEnd);\n  }\n}\n","import getCaretCoordinates from 'textarea-caret';\nimport insertText from './insertText';\nimport ItemList from './ItemList';\nimport type EditorDriverInterface from './EditorDriverInterface';\nimport { type EditorDriverParams } from './EditorDriverInterface';\n\nexport default class BasicEditorDriver implements EditorDriverInterface {\n  el: HTMLTextAreaElement;\n\n  constructor(dom: HTMLElement, params: EditorDriverParams) {\n    this.el = document.createElement('textarea');\n\n    this.build(dom, params);\n  }\n\n  protected build(dom: HTMLElement, params: EditorDriverParams) {\n    this.el.className = params.classNames.join(' ');\n    this.el.disabled = params.disabled;\n    this.el.placeholder = params.placeholder;\n    this.el.value = params.value;\n\n    const callInputListeners = (e: Event) => {\n      params.inputListeners.forEach((listener) => {\n        listener();\n      });\n\n      e.redraw = false;\n    };\n\n    this.el.oninput = (e) => {\n      params.oninput(this.el.value);\n      callInputListeners(e);\n    };\n\n    this.el.onclick = callInputListeners;\n    this.el.onkeyup = callInputListeners;\n\n    this.el.addEventListener('keydown', (e) => {\n      this.keyHandlers(params)\n        .toArray()\n        .forEach((handler) => handler(e));\n    });\n\n    dom.append(this.el);\n  }\n\n  protected keyHandlers(params: EditorDriverParams) {\n    const items = new ItemList<(e: KeyboardEvent) => void>();\n\n    items.add('submit', function (e: KeyboardEvent) {\n      if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {\n        params.onsubmit();\n      }\n    });\n\n    return items;\n  }\n\n  moveCursorTo(position: number) {\n    this.setSelectionRange(position, position);\n  }\n\n  getSelectionRange(): Array<number> {\n    return [this.el.selectionStart, this.el.selectionEnd];\n  }\n\n  getLastNChars(n: number): string {\n    const value = this.el.value;\n\n    return value.slice(Math.max(0, this.el.selectionStart - n), this.el.selectionStart);\n  }\n\n  insertAtCursor(text: string) {\n    this.insertAt(this.el.selectionStart, text);\n  }\n\n  insertAt(pos: number, text: string) {\n    this.insertBetween(pos, pos, text);\n  }\n\n  insertBetween(selectionStart: number, selectionEnd: number, text: string) {\n    this.setSelectionRange(selectionStart, selectionEnd);\n\n    const cursorPos = selectionStart + text.length;\n    insertText(this.el, { text, selectionStart: cursorPos, selectionEnd: cursorPos });\n  }\n\n  replaceBeforeCursor(start: number, text: string) {\n    this.insertBetween(start, this.el.selectionStart, text);\n  }\n\n  protected setSelectionRange(start: number, end: number) {\n    this.el.setSelectionRange(start, end);\n    this.focus();\n  }\n\n  getCaretCoordinates(position: number) {\n    const relCoords = getCaretCoordinates(this.el, position);\n\n    return {\n      top: relCoords.top - this.el.scrollTop,\n      left: relCoords.left,\n    };\n  }\n\n  // DOM Interactions\n\n  /**\n   * Set the disabled status of the editor.\n   */\n  disabled(disabled: boolean) {\n    this.el.disabled = disabled;\n  }\n\n  /**\n   * Focus on the editor.\n   */\n  focus() {\n    this.el.focus();\n  }\n\n  /**\n   * Destroy the editor\n   */\n  destroy() {\n    this.el.remove();\n  }\n}\n","import Component from '../Component';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\n\nexport interface TooltipAttrs extends Mithril.CommonAttributes<TooltipAttrs, Tooltip> {\n  /**\n   * Tooltip textual content.\n   *\n   * String arrays, like those provided by the translator, will be flattened\n   * into strings.\n   */\n  text: string | string[];\n  /**\n   * Use to manually show or hide the tooltip. `undefined` will show based on cursor events.\n   *\n   * Default: `undefined`.\n   */\n  tooltipVisible?: boolean;\n  /**\n   * Whether to show on focus.\n   *\n   * Default: `true`.\n   */\n  showOnFocus?: boolean;\n  /**\n   * Tooltip position around element.\n   *\n   * Default: `'top'`.\n   */\n  position?: 'top' | 'bottom' | 'left' | 'right';\n  /**\n   * Whether HTML content is allowed in the tooltip.\n   *\n   * **Warning:** this is a possible XSS attack vector. This option shouldn't\n   * be used wherever possible, and may not work when we migrate to another\n   * tooltip library. Be prepared for this to break in Flarum stable.\n   *\n   * Default: `false`.\n   *\n   * @deprecated\n   */\n  html?: boolean;\n  /**\n   * Sets the delay between a trigger state occurring and the tooltip appearing\n   * on-screen.\n   *\n   * **Warning:** this option may be removed when switching to another tooltip\n   * library. Be prepared for this to break in Flarum stable.\n   *\n   * Default: `0`.\n   *\n   * @deprecated\n   */\n  delay?: number;\n  /**\n   * Used to disable the warning for passing text to the `title` attribute.\n   *\n   * Tooltip text should be passed to the `text` attribute.\n   */\n  ignoreTitleWarning?: boolean;\n}\n\n/**\n * The `Tooltip` component is used to create a tooltip for an element. It\n * requires a single child element to be passed to it. Passing multiple\n * children or fragments will throw an error.\n *\n * You should use this for any tooltips you create to allow for backwards\n * compatibility when we switch to another tooltip library instead of\n * Bootstrap tooltips.\n *\n * If you need to pass multiple children, surround them with another element,\n * such as a `<span>` or `<div>`.\n *\n * **Note:** this component will overwrite the `title` attribute of the first\n * child you pass to it, as this is how the current tooltip system works in\n * Flarum. This shouldn't be an issue if you're using this component correctly.\n *\n * @example <caption>Basic usage</caption>\n *          <Tooltip text=\"You wish!\">\n *            <Button>\n *              Click for free money!\n *            </Button>\n *          </Tooltip>\n *\n * @example <caption>Use of `position` and `showOnFocus` attrs</caption>\n *          <Tooltip text=\"Woah! That's cool!\" position=\"bottom\" showOnFocus>\n *            <span>3 replies</span>\n *          </Tooltip>\n *\n * @example <caption>Incorrect usage</caption>\n *          // This is wrong! Surround the children with a <span> or similar.\n *          <Tooltip text=\"This won't work\">\n *            Click\n *            <a href=\"/\">here</a>\n *          </Tooltip>\n */\nexport default class Tooltip extends Component<TooltipAttrs> {\n  private firstChild: Mithril.Vnode<any, any> | null = null;\n  private childDomNode: HTMLElement | null = null;\n\n  private oldText: string = '';\n  private oldVisibility: boolean | undefined;\n\n  private shouldRecreateTooltip: boolean = false;\n  private shouldChangeTooltipVisibility: boolean = false;\n\n  view(vnode: Mithril.Vnode<TooltipAttrs, this>) {\n    /**\n     * We know this will be a ChildArray and not a primitive as this\n     * vnode is a component, not a text or trusted HTML vnode.\n     */\n    const children = vnode.children as Mithril.ChildArray | undefined;\n\n    // We remove these to get the remaining attrs to pass to the DOM element\n    const { text, tooltipVisible, showOnFocus = true, position = 'top', ignoreTitleWarning = false, html = false, delay = 0, ...attrs } = this.attrs;\n\n    if ((this.attrs as any).title && !ignoreTitleWarning) {\n      console.warn(\n        '`title` attribute was passed to Tooltip component. Was this intentional? Tooltip content should be passed to the `text` attr instead.'\n      );\n    }\n\n    const realText = this.getRealText();\n\n    // We need to recreate the tooltip if the text has changed\n    if (realText !== this.oldText) {\n      this.oldText = realText;\n      this.shouldRecreateTooltip = true;\n    }\n\n    if (tooltipVisible !== this.oldVisibility) {\n      this.oldVisibility = this.attrs.tooltipVisible;\n      this.shouldChangeTooltipVisibility = true;\n    }\n\n    // We'll try our best to detect any issues created by devs before they cause any weird effects.\n    // Throwing an error will prevent the forum rendering, but will be better at alerting devs to\n    // an issue.\n\n    if (typeof children === 'undefined') {\n      throw new Error(\n        `Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.`\n      );\n    }\n\n    if (children.length !== 1) {\n      throw new Error(\n        `Tooltip component was either passed more than one or no child node.\\n\\nPlease wrap multiple children in another element, such as a <div> or <span>.`\n      );\n    }\n\n    const firstChild = children[0];\n\n    if (typeof firstChild !== 'object' || Array.isArray(firstChild) || firstChild === null) {\n      throw new Error(\n        `Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.`\n      );\n    }\n\n    if (typeof firstChild.tag === 'string' && ['#', '[', '<'].includes(firstChild.tag)) {\n      throw new Error(\n        `Tooltip component with provided with a vnode with tag \"${firstChild.tag}\". This is not a DOM element, so is not a valid child element. Please wrap this vnode in another element, such as a <div> or <span>.`\n      );\n    }\n\n    this.firstChild = firstChild;\n\n    return children;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<TooltipAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.checkDomNodeChanged();\n    this.recreateTooltip();\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<TooltipAttrs, this>) {\n    super.onupdate(vnode);\n\n    this.checkDomNodeChanged();\n    this.recreateTooltip();\n  }\n\n  private recreateTooltip() {\n    if (this.shouldRecreateTooltip && this.childDomNode !== null) {\n      $(this.childDomNode).tooltip(\n        'destroy',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n      this.createTooltip();\n      this.shouldRecreateTooltip = false;\n    }\n\n    if (this.shouldChangeTooltipVisibility) {\n      this.shouldChangeTooltipVisibility = false;\n      this.updateVisibility();\n    }\n  }\n\n  private updateVisibility() {\n    if (this.childDomNode === null) return;\n\n    if (this.attrs.tooltipVisible === true) {\n      $(this.childDomNode).tooltip(\n        'show',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n    } else if (this.attrs.tooltipVisible === false) {\n      $(this.childDomNode).tooltip(\n        'hide',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n    }\n  }\n\n  private createTooltip() {\n    if (this.childDomNode === null) return;\n\n    const {\n      showOnFocus = true,\n      position = 'top',\n      delay,\n      // This will have no effect when switching to CSS tooltips\n      html = false,\n      tooltipVisible,\n      text,\n    } = this.attrs;\n\n    // Fancy \"hack\" to assemble the trigger string\n    const trigger = typeof tooltipVisible === 'boolean' ? 'manual' : classList('hover', [showOnFocus && 'focus']);\n\n    const realText = this.getRealText();\n    this.childDomNode.setAttribute('title', realText);\n    this.childDomNode.setAttribute('aria-label', realText);\n\n    // https://getbootstrap.com/docs/3.3/javascript/#tooltips-options\n    $(this.childDomNode).tooltip(\n      {\n        html,\n        delay,\n        placement: position,\n        trigger,\n      },\n      // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n      'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n    );\n  }\n\n  private getRealText(): string {\n    const { text } = this.attrs;\n\n    return Array.isArray(text) ? extractText(text) : text;\n  }\n\n  /**\n   * Checks if the tooltip DOM node has changed.\n   *\n   * If it has, it updates `this.childDomNode` to the new node, and sets\n   * `shouldRecreateTooltip` to `true`.\n   */\n  private checkDomNodeChanged() {\n    const domNode = (this.firstChild as Mithril.VnodeDOM<any, any>).dom as HTMLElement;\n\n    if (domNode && !domNode.isSameNode(this.childDomNode)) {\n      this.childDomNode = domNode;\n      this.shouldRecreateTooltip = true;\n    }\n  }\n}\n","import app from '../../common/app';\n\nimport Component from '../Component';\nimport ItemList from '../utils/ItemList';\nimport listItems from '../helpers/listItems';\nimport Button from './Button';\n\nimport BasicEditorDriver from '../utils/BasicEditorDriver';\nimport Tooltip from './Tooltip';\n\n/**\n * The `TextEditor` component displays a textarea with controls, including a\n * submit button.\n *\n * ### Attrs\n *\n * - `composer`\n * - `submitLabel`\n * - `value`\n * - `placeholder`\n * - `disabled`\n * - `preview`\n */\nexport default class TextEditor extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * The value of the editor.\n     *\n     * @type {String}\n     */\n    this.value = this.attrs.value || '';\n\n    /**\n     * Whether the editor is disabled.\n     */\n    this.disabled = !!this.attrs.disabled;\n  }\n\n  view() {\n    return (\n      <div className=\"TextEditor\">\n        <div className=\"TextEditor-editorContainer\"></div>\n\n        <ul className=\"TextEditor-controls Composer-footer\">\n          {listItems(this.controlItems().toArray())}\n          <li className=\"TextEditor-toolbar\">{this.toolbarItems().toArray()}</li>\n        </ul>\n      </div>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.attrs.composer.editor = this.buildEditor(this.$('.TextEditor-editorContainer')[0]);\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    const newDisabled = !!this.attrs.disabled;\n\n    if (this.disabled !== newDisabled) {\n      this.disabled = newDisabled;\n      this.attrs.composer.editor.disabled(newDisabled);\n    }\n  }\n\n  buildEditorParams() {\n    return {\n      classNames: ['FormControl', 'Composer-flexible', 'TextEditor-editor'],\n      disabled: this.disabled,\n      placeholder: this.attrs.placeholder || '',\n      value: this.value,\n      oninput: this.oninput.bind(this),\n      inputListeners: [],\n      onsubmit: () => {\n        this.onsubmit();\n        m.redraw();\n      },\n    };\n  }\n\n  buildEditor(dom) {\n    return new BasicEditorDriver(dom, this.buildEditorParams());\n  }\n\n  /**\n   * Build an item list for the text editor controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    items.add(\n      'submit',\n      <Button icon=\"fas fa-paper-plane\" className=\"Button Button--primary\" itemClassName=\"App-primaryControl\" onclick={this.onsubmit.bind(this)}>\n        {this.attrs.submitLabel}\n      </Button>\n    );\n\n    if (this.attrs.preview) {\n      items.add(\n        'preview',\n        <Tooltip text={app.translator.trans('core.forum.composer.preview_tooltip')}>\n          <Button icon=\"far fa-eye\" className=\"Button Button--icon\" onclick={this.attrs.preview} />\n        </Tooltip>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the toolbar controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  toolbarItems() {\n    return new ItemList();\n  }\n\n  /**\n   * Handle input into the textarea.\n   *\n   * @param {string} value\n   */\n  oninput(value) {\n    this.value = value;\n\n    this.attrs.onchange(this.value);\n  }\n\n  /**\n   * Handle the submit button being clicked.\n   */\n  onsubmit() {\n    this.attrs.onsubmit(this.value);\n  }\n}\n","import Component from '../../common/Component';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport ConfirmDocumentUnload from '../../common/components/ConfirmDocumentUnload';\nimport TextEditor from '../../common/components/TextEditor';\nimport avatar from '../../common/helpers/avatar';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `ComposerBody` component handles the body, or the content, of the\n * composer. Subclasses should implement the `onsubmit` method and override\n * `headerTimes`.\n *\n * ### Attrs\n *\n * - `composer`\n * - `originalContent`\n * - `submitLabel`\n * - `placeholder`\n * - `user`\n * - `confirmExit`\n * - `disabled`\n *\n * @abstract\n */\nexport default class ComposerBody extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.composer = this.attrs.composer;\n\n    /**\n     * Whether or not the component is loading.\n     *\n     * @type {Boolean}\n     */\n    this.loading = false;\n\n    // Let the composer state know to ask for confirmation under certain\n    // circumstances, if the body supports / requires it and has a corresponding\n    // confirmation question to ask.\n    if (this.attrs.confirmExit) {\n      this.composer.preventClosingWhen(() => this.hasChanges(), this.attrs.confirmExit);\n    }\n\n    this.composer.fields.content(this.attrs.originalContent || '');\n  }\n\n  view() {\n    return (\n      <ConfirmDocumentUnload when={this.hasChanges.bind(this)}>\n        <div className={classList('ComposerBody', this.attrs.className)}>\n          {avatar(this.attrs.user, { className: 'ComposerBody-avatar' })}\n          <div className=\"ComposerBody-content\">\n            <ul className=\"ComposerBody-header\">{listItems(this.headerItems().toArray())}</ul>\n            <div className=\"ComposerBody-editor\">\n              <TextEditor\n                submitLabel={this.attrs.submitLabel}\n                placeholder={this.attrs.placeholder}\n                disabled={this.loading || this.attrs.disabled}\n                composer={this.composer}\n                preview={this.jumpToPreview?.bind(this)}\n                onchange={this.composer.fields.content}\n                onsubmit={this.onsubmit.bind(this)}\n                value={this.composer.fields.content()}\n              />\n            </div>\n          </div>\n          <LoadingIndicator display=\"unset\" containerClassName={classList('ComposerBody-loading', this.loading && 'active')} size=\"large\" />\n        </div>\n      </ConfirmDocumentUnload>\n    );\n  }\n\n  /**\n   * Check if there is any unsaved data.\n   *\n   * @return {boolean}\n   */\n  hasChanges() {\n    const content = this.composer.fields.content();\n\n    return content && content !== this.attrs.originalContent;\n  }\n\n  /**\n   * Build an item list for the composer's header.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  headerItems() {\n    return new ItemList();\n  }\n\n  /**\n   * Handle the submit event of the text editor.\n   *\n   * @abstract\n   */\n  onsubmit() {}\n\n  /**\n   * Stop loading.\n   */\n  loaded() {\n    this.loading = false;\n    m.redraw();\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport icon from '../../common/helpers/icon';\nimport extractText from '../../common/utils/extractText';\n\nfunction minimizeComposerIfFullScreen(e) {\n  if (app.composer.isFullScreen()) {\n    app.composer.minimize();\n    e.stopPropagation();\n  }\n}\n\n/**\n * The `ReplyComposer` component displays the composer content for replying to a\n * discussion.\n *\n * ### Attrs\n *\n * - All of the attrs of ComposerBody\n * - `discussion`\n */\nexport default class ReplyComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.placeholder = attrs.placeholder || extractText(app.translator.trans('core.forum.composer_reply.body_placeholder'));\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_reply.submit_button');\n    attrs.confirmExit = attrs.confirmExit || extractText(app.translator.trans('core.forum.composer_reply.discard_confirmation'));\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n    const discussion = this.attrs.discussion;\n\n    items.add(\n      'title',\n      <h3>\n        {icon('fas fa-reply')}{' '}\n        <Link href={app.route.discussion(discussion)} onclick={minimizeComposerIfFullScreen}>\n          {discussion.title()}\n        </Link>\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Jump to the preview when triggered by the text editor.\n   */\n  jumpToPreview(e) {\n    minimizeComposerIfFullScreen(e);\n\n    m.route.set(app.route.discussion(this.attrs.discussion, 'reply'));\n  }\n\n  /**\n   * Get the data to submit to the server when the reply is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      content: this.composer.fields.content(),\n      relationships: { discussion: this.attrs.discussion },\n    };\n  }\n\n  onsubmit() {\n    const discussion = this.attrs.discussion;\n\n    this.loading = true;\n    m.redraw();\n\n    const data = this.data();\n\n    app.store\n      .createRecord('posts')\n      .save(data)\n      .then((post) => {\n        // If we're currently viewing the discussion which this reply was made\n        // in, then we can update the post stream and scroll to the post.\n        if (app.viewingDiscussion(discussion)) {\n          const stream = app.current.get('stream');\n          stream.update().then(() => stream.goToNumber(post.number()));\n        } else {\n          // Otherwise, we'll create an alert message to inform the user that\n          // their reply has been posted, containing a button which will\n          // transition to their new post when clicked.\n          let alert;\n          const viewButton = (\n            <Button\n              className=\"Button Button--link\"\n              onclick={() => {\n                m.route.set(app.route.post(post));\n                app.alerts.dismiss(alert);\n              }}\n            >\n              {app.translator.trans('core.forum.composer_reply.view_button')}\n            </Button>\n          );\n          alert = app.alerts.show(\n            {\n              type: 'success',\n              controls: [viewButton],\n            },\n            app.translator.trans('core.forum.composer_reply.posted_message')\n          );\n        }\n\n        this.composer.hide();\n      }, this.loaded.bind(this));\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport Button from './Button';\nimport listItems from '../helpers/listItems';\nimport extract from '../utils/extract';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\nimport app from '../app';\nimport iconHelper from '../helpers/icon';\n\nexport interface AlertAttrs extends ComponentAttrs {\n  /** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */\n  type?: string;\n  /** Title of the alert. Optional. */\n  title?: Mithril.Children;\n  /** Icon used next to the title. Optional. */\n  icon?: string;\n  /** An array of controls to show in the alert. */\n  controls?: Mithril.Children;\n  /** Whether or not the alert can be dismissed. */\n  dismissible?: boolean;\n  /** A callback to run when the alert is dismissed */\n  ondismiss?: Function;\n}\n\n/**\n * The `Alert` component represents an alert box, which contains a message,\n * some controls, and may be dismissible.\n */\nexport default class Alert<T extends AlertAttrs = AlertAttrs> extends Component<T> {\n  view(vnode: Mithril.VnodeDOM<T, this>) {\n    const attrs = Object.assign({}, this.attrs);\n\n    const type = extract(attrs, 'type');\n    attrs.className = classList('Alert', `Alert--${type}`, attrs.className);\n\n    const title = extract(attrs, 'title');\n    const icon = extract(attrs, 'icon');\n    const content = extract(attrs, 'content') || vnode.children;\n    const controls = (extract(attrs, 'controls') || []) as Mithril.Vnode[];\n\n    // If the alert is meant to be dismissible (which is the case by default),\n    // then we will create a dismiss button to append as the final control in\n    // the alert.\n    const dismissible = extract(attrs, 'dismissible');\n    const ondismiss = extract(attrs, 'ondismiss');\n    const dismissControl: Mithril.Vnode[] = [];\n\n    if (dismissible || dismissible === undefined) {\n      dismissControl.push(\n        <Button\n          aria-label={app.translator.trans('core.lib.alert.dismiss_a11y_label')}\n          icon=\"fas fa-times\"\n          className=\"Button Button--link Button--icon Alert-dismiss\"\n          onclick={ondismiss}\n        />\n      );\n    }\n\n    return (\n      <div {...attrs}>\n        {!!title && (\n          <div className=\"Alert-title\">\n            {!!icon && <span className=\"Alert-title-icon\">{iconHelper(icon)}</span>}\n            <span className=\"Alert-title-text\">{title}</span>\n          </div>\n        )}\n        <span className=\"Alert-body\">{content}</span>\n        <ul className=\"Alert-controls\">{listItems(controls.concat(dismissControl))}</ul>\n      </div>\n    );\n  }\n}\n","import app from '../../common/app';\nimport Component from '../Component';\nimport Alert, { AlertAttrs } from './Alert';\nimport Button from './Button';\n\nimport type Mithril from 'mithril';\nimport type ModalManagerState from '../states/ModalManagerState';\nimport type RequestError from '../utils/RequestError';\nimport type ModalManager from './ModalManager';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport classList from '../utils/classList';\n\nexport interface IInternalModalAttrs {\n  state: ModalManagerState;\n  animateShow: ModalManager['animateShow'];\n  animateHide: ModalManager['animateHide'];\n}\n\nexport interface IDismissibleOptions {\n  /**\n   * @deprecated Check specific individual attributes instead. Will be removed in Flarum 2.0.\n   */\n  isDismissible: boolean;\n  viaCloseButton: boolean;\n  viaEscKey: boolean;\n  viaBackdropClick: boolean;\n}\n\n/**\n * The `Modal` component displays a modal dialog, wrapped in a form. Subclasses\n * should implement the `className`, `title`, and `content` methods.\n */\nexport default abstract class Modal<ModalAttrs extends IInternalModalAttrs = IInternalModalAttrs, CustomState = undefined> extends Component<\n  ModalAttrs,\n  CustomState\n> {\n  // TODO: [Flarum 2.0] remove `isDismissible` static attribute\n  /**\n   * Determine whether or not the modal should be dismissible via an 'x' button.\n   *\n   * @deprecated Use the individual `isDismissibleVia...` attributes instead and remove references to this.\n   */\n  static readonly isDismissible: boolean = true;\n\n  /**\n   * Can the model be dismissed with a close button (X)?\n   *\n   * If `false`, no close button is shown.\n   */\n  protected static readonly isDismissibleViaCloseButton: boolean = true;\n  /**\n   * Can the modal be dismissed by pressing the Esc key on a keyboard?\n   */\n  protected static readonly isDismissibleViaEscKey: boolean = true;\n  /**\n   * Can the modal be dismissed via a click on the backdrop.\n   */\n  protected static readonly isDismissibleViaBackdropClick: boolean = true;\n\n  static get dismissibleOptions(): IDismissibleOptions {\n    // If someone sets this to `false`, provide the same behaviour as previous versions of Flarum.\n    if (!this.isDismissible) {\n      return {\n        isDismissible: false,\n        viaCloseButton: false,\n        viaEscKey: false,\n        viaBackdropClick: false,\n      };\n    }\n\n    return {\n      isDismissible: true,\n      viaCloseButton: this.isDismissibleViaCloseButton,\n      viaEscKey: this.isDismissibleViaEscKey,\n      viaBackdropClick: this.isDismissibleViaBackdropClick,\n    };\n  }\n\n  protected loading: boolean = false;\n\n  /**\n   * Attributes for an alert component to show below the header.\n   */\n  alertAttrs: AlertAttrs | null = null;\n\n  oninit(vnode: Mithril.Vnode<ModalAttrs, this>) {\n    super.oninit(vnode);\n\n    // TODO: [Flarum 2.0] Remove the code below.\n    // This code prevents extensions which do not implement all abstract methods of this class from breaking\n    // the forum frontend. Without it, function calls would would error rather than returning `undefined.`\n\n    const missingMethods: string[] = [];\n\n    ['className', 'title', 'content', 'onsubmit'].forEach((method) => {\n      if (!(this as any)[method]) {\n        (this as any)[method] = function (): void {};\n        missingMethods.push(method);\n      }\n    });\n\n    if (missingMethods.length > 0) {\n      fireDebugWarning(\n        `Modal \\`${this.constructor.name}\\` does not implement all abstract methods of the Modal super class. Missing methods: ${missingMethods.join(\n          ', '\n        )}.`\n      );\n    }\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<ModalAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.attrs.animateShow(() => this.onready());\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<ModalAttrs, this>): Promise<void> | void {\n    super.onbeforeremove(vnode);\n\n    // If the global modal state currently contains a modal,\n    // we've just opened up a new one, and accordingly,\n    // we don't need to show a hide animation.\n    if (!this.attrs.state.modal) {\n      // Here, we ensure that the animation has time to complete.\n      // See https://mithril.js.org/lifecycle-methods.html#onbeforeremove\n      // Bootstrap's Modal.TRANSITION_DURATION is 300 ms.\n      return new Promise((resolve) => setTimeout(resolve, 300));\n    }\n  }\n\n  /**\n   * @todo split into FormModal and Modal in 2.0\n   */\n  view() {\n    if (this.alertAttrs) {\n      this.alertAttrs.dismissible = false;\n    }\n\n    return (\n      <div className={classList('Modal modal-dialog fade', this.className())}>\n        <div className=\"Modal-content\">\n          {this.dismissibleOptions.viaCloseButton && (\n            <div className=\"Modal-close App-backControl\">\n              <Button\n                icon=\"fas fa-times\"\n                onclick={() => this.hide()}\n                className=\"Button Button--icon Button--link\"\n                aria-label={app.translator.trans('core.lib.modal.close')}\n              />\n            </div>\n          )}\n\n          <form onsubmit={this.onsubmit.bind(this)}>\n            <div className=\"Modal-header\">\n              <h3 className=\"App-titleControl App-titleControl--text\">{this.title()}</h3>\n            </div>\n\n            {!!this.alertAttrs && (\n              <div className=\"Modal-alert\">\n                <Alert {...this.alertAttrs} />\n              </div>\n            )}\n\n            {this.content()}\n          </form>\n        </div>\n      </div>\n    );\n  }\n\n  /**\n   * Get the class name to apply to the modal.\n   */\n  abstract className(): string;\n\n  /**\n   * Get the title of the modal dialog.\n   */\n  abstract title(): Mithril.Children;\n\n  /**\n   * Get the content of the modal.\n   */\n  abstract content(): Mithril.Children;\n\n  /**\n   * Handle the modal form's submit event.\n   */\n  onsubmit(e: SubmitEvent): void {\n    // ...\n  }\n\n  /**\n   * Callback executed when the modal is shown and ready to be interacted with.\n   *\n   * @remark Focuses the first input in the modal.\n   */\n  onready(): void {\n    this.$().find('input, select, textarea').first().trigger('focus').trigger('select');\n  }\n\n  /**\n   * Hides the modal.\n   */\n  hide(): void {\n    this.attrs.animateHide();\n  }\n\n  /**\n   * Sets `loading` to false and triggers a redraw.\n   */\n  loaded(): void {\n    this.loading = false;\n    m.redraw();\n  }\n\n  /**\n   * Shows an alert describing an error returned from the API, and gives focus to\n   * the first relevant field involved in the error.\n   */\n  onerror(error: RequestError): void {\n    this.alertAttrs = error.alert;\n\n    m.redraw();\n\n    if (error.status === 422 && error.response?.errors) {\n      this.$('form [name=' + (error.response.errors as any[])[0].source.pointer.replace('/data/attributes/', '') + ']').trigger('select');\n    } else {\n      this.onready();\n    }\n  }\n\n  private get dismissibleOptions(): IDismissibleOptions {\n    return (this.constructor as typeof Modal).dismissibleOptions;\n  }\n}\n","import Stream from 'mithril/stream';\n\nexport default Stream;\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport extractText from '../../common/utils/extractText';\nimport Stream from '../../common/utils/Stream';\nimport Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface IForgotPasswordModalAttrs extends IInternalModalAttrs {\n  email?: string;\n}\n\n/**\n * The `ForgotPasswordModal` component displays a modal which allows the user to\n * enter their email address and request a link to reset their password.\n */\nexport default class ForgotPasswordModal<CustomAttrs extends IForgotPasswordModalAttrs = IForgotPasswordModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  success: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.email = Stream(this.attrs.email || '');\n  }\n\n  className() {\n    return 'ForgotPasswordModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.forgot_password.title');\n  }\n\n  content() {\n    if (this.success) {\n      return (\n        <div className=\"Modal-body\">\n          <div className=\"Form Form--centered\">\n            <p className=\"helpText\">{app.translator.trans('core.forum.forgot_password.email_sent_message')}</p>\n            <div className=\"Form-group\">\n              <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n                {app.translator.trans('core.forum.forgot_password.dismiss_button')}\n              </Button>\n            </div>\n          </div>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <p className=\"helpText\">{app.translator.trans('core.forum.forgot_password.text')}</p>\n          {this.fields().toArray()}\n        </div>\n      </div>\n    );\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const emailLabel = extractText(app.translator.trans('core.forum.forgot_password.email_placeholder'));\n\n    items.add(\n      'email',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"email\"\n          type=\"email\"\n          placeholder={emailLabel}\n          aria-label={emailLabel}\n          bidi={this.email}\n          disabled={this.loading}\n        />\n      </div>,\n      50\n    );\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.forgot_password.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute('apiUrl') + '/forgot',\n        body: this.requestParams(),\n        errorHandler: this.onerror.bind(this),\n      })\n      .then(() => {\n        this.success = true;\n        this.alertAttrs = null;\n      })\n      .catch(() => {})\n      .then(this.loaded.bind(this));\n  }\n\n  requestParams(): Record<string, unknown> {\n    const data = {\n      email: this.email(),\n    };\n\n    return data;\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 404 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.forgot_password.not_found_message');\n    }\n\n    super.onerror(error);\n  }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `LogInButtons` component displays a collection of social login buttons.\n */\nexport default class LogInButtons extends Component {\n  view() {\n    return <div className=\"LogInButtons\">{this.items().toArray()}</div>;\n  }\n\n  /**\n   * Build a list of LogInButton components.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    return new ItemList();\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport LogInModal from './LogInModal';\nimport Button from '../../common/components/Button';\nimport LogInButtons from './LogInButtons';\nimport extractText from '../../common/utils/extractText';\nimport ItemList from '../../common/utils/ItemList';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\n\nexport interface ISignupModalAttrs extends IInternalModalAttrs {\n  username?: string;\n  email?: string;\n  password?: string;\n  token?: string;\n  provided?: string[];\n}\n\nexport type SignupBody = {\n  username: string;\n  email: string;\n} & ({ token: string } | { password: string });\n\nexport default class SignUpModal<CustomAttrs extends ISignupModalAttrs = ISignupModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the username input.\n   */\n  username!: Stream<string>;\n\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.username = Stream(this.attrs.username || '');\n    this.email = Stream(this.attrs.email || '');\n    this.password = Stream(this.attrs.password || '');\n  }\n\n  className() {\n    return 'Modal--small SignUpModal';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.sign_up.title');\n  }\n\n  content() {\n    return [<div className=\"Modal-body\">{this.body()}</div>, <div className=\"Modal-footer\">{this.footer()}</div>];\n  }\n\n  isProvided(field: string): boolean {\n    return this.attrs.provided?.includes(field) ?? false;\n  }\n\n  body() {\n    return [!this.attrs.token && <LogInButtons />, <div className=\"Form Form--centered\">{this.fields().toArray()}</div>];\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const usernameLabel = extractText(app.translator.trans('core.forum.sign_up.username_placeholder'));\n    const emailLabel = extractText(app.translator.trans('core.forum.sign_up.email_placeholder'));\n    const passwordLabel = extractText(app.translator.trans('core.forum.sign_up.password_placeholder'));\n\n    items.add(\n      'username',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"username\"\n          type=\"text\"\n          placeholder={usernameLabel}\n          aria-label={usernameLabel}\n          bidi={this.username}\n          disabled={this.loading || this.isProvided('username')}\n        />\n      </div>,\n      30\n    );\n\n    items.add(\n      'email',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"email\"\n          type=\"email\"\n          placeholder={emailLabel}\n          aria-label={emailLabel}\n          bidi={this.email}\n          disabled={this.loading || this.isProvided('email')}\n        />\n      </div>,\n      20\n    );\n\n    if (!this.attrs.token) {\n      items.add(\n        'password',\n        <div className=\"Form-group\">\n          <input\n            className=\"FormControl\"\n            name=\"password\"\n            type=\"password\"\n            autocomplete=\"new-password\"\n            placeholder={passwordLabel}\n            aria-label={passwordLabel}\n            bidi={this.password}\n            disabled={this.loading}\n          />\n        </div>,\n        10\n      );\n    }\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.sign_up.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  footer() {\n    return [\n      <p className=\"SignUpModal-logIn\">{app.translator.trans('core.forum.sign_up.log_in_text', { a: <a onclick={this.logIn.bind(this)} /> })}</p>,\n    ];\n  }\n\n  /**\n   * Open the log in modal, prefilling it with an email/username/password if\n   * the user has entered one.\n   */\n  logIn() {\n    const attrs = {\n      identification: this.email() || this.username(),\n    };\n\n    app.modal.show(LogInModal, attrs);\n  }\n\n  onready() {\n    if (this.attrs.username && !this.attrs.email) {\n      this.$('[name=email]').select();\n    } else {\n      this.$('[name=username]').select();\n    }\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    const body = this.submitData();\n\n    app\n      .request({\n        url: app.forum.attribute('baseUrl') + '/register',\n        method: 'POST',\n        body,\n        errorHandler: this.onerror.bind(this),\n      })\n      .then(() => window.location.reload(), this.loaded.bind(this));\n  }\n\n  /**\n   * Get the data that should be submitted in the sign-up request.\n   */\n  submitData(): SignupBody {\n    const authData = this.attrs.token ? { token: this.attrs.token } : { password: this.password() };\n\n    const data = {\n      username: this.username(),\n      email: this.email(),\n      ...authData,\n    };\n\n    return data;\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport ForgotPasswordModal from './ForgotPasswordModal';\nimport SignUpModal from './SignUpModal';\nimport Button from '../../common/components/Button';\nimport LogInButtons from './LogInButtons';\nimport extractText from '../../common/utils/extractText';\nimport ItemList from '../../common/utils/ItemList';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport type { LoginParams } from '../../common/Session';\n\nexport interface ILoginModalAttrs extends IInternalModalAttrs {\n  identification?: string;\n  password?: string;\n  remember?: boolean;\n}\n\nexport default class LogInModal<CustomAttrs extends ILoginModalAttrs = ILoginModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the identification input.\n   */\n  identification!: Stream<string>;\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n  /**\n   * The value of the remember me input.\n   */\n  remember!: Stream<boolean>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.identification = Stream(this.attrs.identification || '');\n    this.password = Stream(this.attrs.password || '');\n    this.remember = Stream(!!this.attrs.remember);\n  }\n\n  className() {\n    return 'LogInModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.log_in.title');\n  }\n\n  content() {\n    return [<div className=\"Modal-body\">{this.body()}</div>, <div className=\"Modal-footer\">{this.footer()}</div>];\n  }\n\n  body() {\n    return [<LogInButtons />, <div className=\"Form Form--centered\">{this.fields().toArray()}</div>];\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const identificationLabel = extractText(app.translator.trans('core.forum.log_in.username_or_email_placeholder'));\n    const passwordLabel = extractText(app.translator.trans('core.forum.log_in.password_placeholder'));\n\n    items.add(\n      'identification',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"identification\"\n          type=\"text\"\n          placeholder={identificationLabel}\n          aria-label={identificationLabel}\n          bidi={this.identification}\n          disabled={this.loading}\n        />\n      </div>,\n      30\n    );\n\n    items.add(\n      'password',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"password\"\n          type=\"password\"\n          autocomplete=\"current-password\"\n          placeholder={passwordLabel}\n          aria-label={passwordLabel}\n          bidi={this.password}\n          disabled={this.loading}\n        />\n      </div>,\n      20\n    );\n\n    items.add(\n      'remember',\n      <div className=\"Form-group\">\n        <div>\n          <label className=\"checkbox\">\n            <input type=\"checkbox\" bidi={this.remember} disabled={this.loading} />\n            {app.translator.trans('core.forum.log_in.remember_me_label')}\n          </label>\n        </div>\n      </div>,\n      10\n    );\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.log_in.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  footer() {\n    return (\n      <>\n        <p className=\"LogInModal-forgotPassword\">\n          <a onclick={this.forgotPassword.bind(this)}>{app.translator.trans('core.forum.log_in.forgot_password_link')}</a>\n        </p>\n        {app.forum.attribute<boolean>('allowSignUp') && (\n          <p className=\"LogInModal-signUp\">{app.translator.trans('core.forum.log_in.sign_up_text', { a: <a onclick={this.signUp.bind(this)} /> })}</p>\n        )}\n      </>\n    );\n  }\n\n  /**\n   * Open the forgot password modal, prefilling it with an email if the user has\n   * entered one.\n   */\n  forgotPassword() {\n    const email = this.identification();\n    const attrs = email.includes('@') ? { email } : undefined;\n\n    app.modal.show(ForgotPasswordModal, attrs);\n  }\n\n  /**\n   * Open the sign up modal, prefilling it with an email/username/password if\n   * the user has entered one.\n   */\n  signUp() {\n    const identification = this.identification();\n\n    const attrs = {\n      [identification.includes('@') ? 'email' : 'username']: identification,\n    };\n\n    app.modal.show(SignUpModal, attrs);\n  }\n\n  onready() {\n    this.$('[name=' + (this.identification() ? 'password' : 'identification') + ']').trigger('select');\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app.session.login(this.loginParams(), { errorHandler: this.onerror.bind(this) }).then(() => window.location.reload(), this.loaded.bind(this));\n  }\n\n  loginParams(): LoginParams {\n    const data = {\n      identification: this.identification(),\n      password: this.password(),\n      remember: this.remember(),\n    };\n\n    return data;\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 401 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');\n      this.password('');\n    }\n\n    super.onerror(error);\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport Mithril from 'mithril';\nimport Discussion from '../../common/models/Discussion';\n\nexport interface IRenameDiscussionModalAttrs extends IInternalModalAttrs {\n  discussion: Discussion;\n  currentTitle: string;\n}\n\n/**\n * The 'RenameDiscussionModal' displays a modal dialog with an input to rename a discussion\n */\nexport default class RenameDiscussionModal<CustomAttrs extends IRenameDiscussionModalAttrs = IRenameDiscussionModalAttrs> extends Modal<CustomAttrs> {\n  discussion!: Discussion;\n  currentTitle!: string;\n  newTitle!: Stream<string>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.discussion = this.attrs.discussion;\n    this.currentTitle = this.attrs.currentTitle;\n    this.newTitle = Stream(this.currentTitle);\n  }\n\n  className() {\n    return 'RenameDiscussionModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.rename_discussion.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <div className=\"Form-group\">\n            <input className=\"FormControl\" bidi={this.newTitle} type=\"text\" />\n          </div>\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n              {app.translator.trans('core.forum.rename_discussion.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  onsubmit(e: SubmitEvent): Promise<void> | void {\n    e.preventDefault();\n\n    this.loading = true;\n\n    const title = this.newTitle();\n    const currentTitle = this.currentTitle;\n\n    // If the title is different to what it was before, then save it. After the\n    // save has completed, update the post stream as there will be a new post\n    // indicating that the discussion was renamed.\n    if (title && title !== currentTitle) {\n      return this.discussion\n        .save({ title })\n        .then(() => {\n          if (app.viewingDiscussion(this.discussion)) {\n            app.current.get('stream').update();\n          }\n          m.redraw();\n          this.hide();\n        })\n        .catch(() => {\n          this.loading = false;\n          m.redraw();\n        });\n    } else {\n      this.hide();\n    }\n  }\n}\n","import app from '../../forum/app';\nimport DiscussionPage from '../components/DiscussionPage';\nimport ReplyComposer from '../components/ReplyComposer';\nimport LogInModal from '../components/LogInModal';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport RenameDiscussionModal from '../components/RenameDiscussionModal';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `DiscussionControls` utility constructs a list of buttons for a\n * discussion which perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a discussion.\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controls(discussion, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](discussion, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion pertaining to the current user (e.g. reply,\n   * follow).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  userControls(discussion, context) {\n    const items = new ItemList();\n\n    // Only add a reply control if this is the discussion's controls dropdown\n    // for the discussion page itself. We don't want it to show up for\n    // discussions in the discussion list, etc.\n    if (context instanceof DiscussionPage) {\n      items.add(\n        'reply',\n        !app.session.user || discussion.canReply() ? (\n          <Button\n            icon=\"fas fa-reply\"\n            onclick={() => {\n              // If the user is not logged in, the promise rejects, and a login modal shows up.\n              // Since that's already handled, we dont need to show an error message in the console.\n              return this.replyAction\n                .bind(discussion)(true, false)\n                .catch(() => {});\n            }}\n          >\n            {app.translator.trans(\n              app.session.user ? 'core.forum.discussion_controls.reply_button' : 'core.forum.discussion_controls.log_in_to_reply_button'\n            )}\n          </Button>\n        ) : (\n          <Button\n            icon=\"fas fa-reply\"\n            className=\"disabled\"\n            title={extractText(app.translator.trans('core.forum.discussion_controls.cannot_reply_text'))}\n          >\n            {app.translator.trans('core.forum.discussion_controls.cannot_reply_button')}\n          </Button>\n        )\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion pertaining to moderation (e.g. rename, lock).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  moderationControls(discussion) {\n    const items = new ItemList();\n\n    if (discussion.canRename()) {\n      items.add(\n        'rename',\n        <Button icon=\"fas fa-pencil-alt\" onclick={this.renameAction.bind(discussion)}>\n          {app.translator.trans('core.forum.discussion_controls.rename_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion which are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  destructiveControls(discussion) {\n    const items = new ItemList();\n\n    if (!discussion.isHidden()) {\n      if (discussion.canHide()) {\n        items.add(\n          'hide',\n          <Button icon=\"far fa-trash-alt\" onclick={this.hideAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.delete_button')}\n          </Button>\n        );\n      }\n    } else {\n      if (discussion.canHide()) {\n        items.add(\n          'restore',\n          <Button icon=\"fas fa-reply\" onclick={this.restoreAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.restore_button')}\n          </Button>\n        );\n      }\n\n      if (discussion.canDelete()) {\n        items.add(\n          'delete',\n          <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.delete_forever_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Open the reply composer for the discussion. A promise will be returned,\n   * which resolves when the composer opens successfully. If the user is not\n   * logged in, they will be prompted. If they don't have permission to\n   * reply, the promise will be rejected.\n   *\n   * @param {boolean} goToLast Whether or not to scroll down to the last post if the discussion is being viewed.\n   * @param {boolean} forceRefresh Whether or not to force a reload of the composer component, even if it is already open for this discussion.\n   *\n   * @return {Promise<void>}\n   */\n  replyAction(goToLast, forceRefresh) {\n    return new Promise((resolve, reject) => {\n      if (app.session.user) {\n        if (this.canReply()) {\n          if (!app.composer.composingReplyTo(this) || forceRefresh) {\n            app.composer.load(ReplyComposer, {\n              user: app.session.user,\n              discussion: this,\n            });\n          }\n          app.composer.show();\n\n          if (goToLast && app.viewingDiscussion(this) && !app.composer.isFullScreen()) {\n            app.current.get('stream').goToNumber('reply');\n          }\n\n          return resolve(app.composer);\n        } else {\n          return reject();\n        }\n      }\n\n      app.modal.show(LogInModal);\n\n      return reject();\n    });\n  },\n\n  /**\n   * Hide a discussion.\n   *\n   * @return {Promise<void>}\n   */\n  hideAction() {\n    this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });\n\n    return this.save({ isHidden: true });\n  },\n\n  /**\n   * Restore a discussion.\n   *\n   * @return {Promise<void>}\n   */\n  restoreAction() {\n    this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });\n\n    return this.save({ isHidden: false });\n  },\n\n  /**\n   * Delete the discussion after confirming with the user.\n   *\n   * @return {Promise<void>}\n   */\n  deleteAction() {\n    if (confirm(extractText(app.translator.trans('core.forum.discussion_controls.delete_confirmation')))) {\n      // If we're currently viewing the discussion that was deleted, go back\n      // to the previous page.\n      if (app.viewingDiscussion(this)) {\n        app.history.back();\n      }\n\n      return this.delete().then(() => app.discussions.removeDiscussion(this));\n    }\n  },\n\n  /**\n   * Rename the discussion.\n   */\n  renameAction() {\n    return app.modal.show(RenameDiscussionModal, {\n      currentTitle: this.title(),\n      discussion: this,\n    });\n  },\n};\n","/**\n * The `slidable` utility adds touch gestures to an element so that it can be\n * slid away to reveal controls underneath, and then released to activate those\n * controls.\n *\n * It relies on the element having children with particular CSS classes.\n *\n * The function returns a record with a `reset` proeprty. This is a function\n * which reverts the slider to its original position. This should be called,\n * for example, when a controls dropdown is closed.\n *\n * @param {HTMLElement | SVGElement | Element} element\n * @return {{ reset : () => void }}\n */\nexport default function slidable(element) {\n  const $element = $(element);\n  const threshold = 50;\n\n  let $underneathLeft;\n  let $underneathRight;\n\n  let startX;\n  let startY;\n  let couldBeSliding = false;\n  let isSliding = false;\n  let pos = 0;\n\n  /**\n   * Animate the slider to a new position.\n   *\n   * @param {number} newPos\n   * @param {Partial<JQueryAnimationOptions>} [options]\n   */\n  const animatePos = (newPos, options = {}) => {\n    // Since we can't animate the transform property with jQuery, we'll use a\n    // bit of a workaround. We set up the animation with a step function that\n    // will set the transform property, but then we animate an unused property\n    // (background-position-x) with jQuery.\n    options.duration ||= 'fast';\n    options.step = function (x) {\n      $(this).css('transform', 'translate(' + x + 'px, 0)');\n    };\n\n    $element.find('.Slidable-content').animate({ 'background-position-x': newPos }, options);\n  };\n\n  /**\n   * Revert the slider to its original position.\n   */\n  const reset = () => {\n    animatePos(0, {\n      complete: function () {\n        $element.removeClass('sliding');\n        $underneathLeft.hide();\n        $underneathRight.hide();\n        isSliding = false;\n      },\n    });\n  };\n\n  $element\n    .find('.Slidable-content')\n    .on('touchstart', function (e) {\n      // Update the references to the elements underneath the slider, provided\n      // they're not disabled.\n      $underneathLeft = $element.find('.Slidable-underneath--left:not(.disabled)');\n      $underneathRight = $element.find('.Slidable-underneath--right:not(.disabled)');\n\n      startX = e.originalEvent.targetTouches[0].clientX;\n      startY = e.originalEvent.targetTouches[0].clientY;\n\n      couldBeSliding = true;\n      pos = 0;\n    })\n\n    .on('touchmove', function (e) {\n      const newX = e.originalEvent.targetTouches[0].clientX;\n      const newY = e.originalEvent.targetTouches[0].clientY;\n\n      // Once the user moves their touch in a direction that's more up/down than\n      // left/right, we'll assume they're scrolling the page. But if they do\n      // move in a horizontal direction at first, then we'll lock their touch\n      // into the slider.\n      if (couldBeSliding && Math.abs(newX - startX) > Math.abs(newY - startY)) {\n        isSliding = true;\n      }\n      couldBeSliding = false;\n\n      if (isSliding) {\n        pos = newX - startX;\n\n        // If there are controls underneath the either side, then we'll show/hide\n        // them depending on the slider's position. We also make the controls\n        // icon get a bit bigger the further they slide.\n        const toggle = ($underneath, side) => {\n          if ($underneath.length) {\n            const active = side === 'left' ? pos > 0 : pos < 0;\n\n            if (active && $underneath.hasClass('Slidable-underneath--elastic')) {\n              pos -= pos * 0.5;\n            }\n            $underneath.toggle(active);\n\n            const scale = Math.max(0, Math.min(1, (Math.abs(pos) - 25) / threshold));\n            $underneath.find('.icon').css('transform', 'scale(' + scale + ')');\n          } else {\n            pos = Math[side === 'left' ? 'min' : 'max'](0, pos);\n          }\n        };\n\n        toggle($underneathLeft, 'left');\n        toggle($underneathRight, 'right');\n\n        $(this).css('transform', 'translate(' + pos + 'px, 0)');\n        $(this).css('background-position-x', pos + 'px');\n\n        $element.toggleClass('sliding', !!pos);\n\n        e.preventDefault();\n      }\n    })\n\n    .on('touchend', function () {\n      // If the user releases the touch and the slider is past the threshold\n      // position on either side, then we will activate the control for that\n      // side. We will also animate the slider's position all the way to the\n      // other side, or back to its original position, depending on whether or\n      // not the side is 'elastic'.\n      const activate = ($underneath) => {\n        $underneath.click();\n\n        if ($underneath.hasClass('Slidable-underneath--elastic')) {\n          reset();\n        } else {\n          animatePos((pos > 0 ? 1 : -1) * $element.width());\n        }\n      };\n\n      if ($underneathRight.length && pos < -threshold) {\n        activate($underneathRight);\n      } else if ($underneathLeft.length && pos > threshold) {\n        activate($underneathLeft);\n      } else {\n        reset();\n      }\n\n      couldBeSliding = false;\n      isSliding = false;\n    });\n\n  return { reset };\n}\n","const specialChars = /[.*+?^${}()|[\\]\\\\]/g;\n\n/**\n * Escapes the `RegExp` special characters in `input`.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n */\nexport default function escapeRegExp(input: string): string {\n  return input.replace(specialChars, '\\\\$&');\n}\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport avatar from '../../common/helpers/avatar';\nimport listItems from '../../common/helpers/listItems';\nimport highlight from '../../common/helpers/highlight';\nimport icon from '../../common/helpers/icon';\nimport humanTime from '../../common/utils/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport abbreviateNumber from '../../common/utils/abbreviateNumber';\nimport Dropdown from '../../common/components/Dropdown';\nimport TerminalPost from './TerminalPost';\nimport SubtreeRetainer from '../../common/utils/SubtreeRetainer';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport slidable from '../utils/slidable';\nimport classList from '../../common/utils/classList';\nimport DiscussionPage from './DiscussionPage';\nimport escapeRegExp from '../../common/utils/escapeRegExp';\nimport Tooltip from '../../common/components/Tooltip';\nimport type Discussion from '../../common/models/Discussion';\nimport type Mithril from 'mithril';\nimport type { DiscussionListParams } from '../states/DiscussionListState';\n\nexport interface IDiscussionListItemAttrs extends ComponentAttrs {\n  discussion: Discussion;\n  params: DiscussionListParams;\n}\n\n/**\n * The `DiscussionListItem` component shows a single discussion in the\n * discussion list.\n */\nexport default class DiscussionListItem<CustomAttrs extends IDiscussionListItemAttrs = IDiscussionListItemAttrs> extends Component<CustomAttrs> {\n  /**\n   * Ensures that the discussion will not be redrawn\n   * unless new data comes in.\n   */\n  subtree!: SubtreeRetainer;\n\n  highlightRegExp?: RegExp;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.subtree = new SubtreeRetainer(\n      () => this.attrs.discussion.freshness,\n      () => {\n        const time = app.session.user && app.session.user.markedAllAsReadAt();\n        return time && time.getTime();\n      },\n      () => this.active()\n    );\n  }\n\n  elementAttrs() {\n    return {\n      className: classList('DiscussionListItem', {\n        active: this.active(),\n        'DiscussionListItem--hidden': this.attrs.discussion.isHidden(),\n        Slidable: 'ontouchstart' in window,\n      }),\n    };\n  }\n\n  view() {\n    const attrs = this.elementAttrs();\n\n    return <div {...attrs}>{this.viewItems().toArray()}</div>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const discussion = this.attrs.discussion;\n    const controls = DiscussionControls.controls(discussion, this).toArray();\n\n    items.add('controls', this.controlsView(controls), 100);\n    items.add('slidableUnderneath', this.slidableUnderneathView(), 90);\n    items.add('content', this.contentView(), 80);\n\n    return items;\n  }\n\n  controlsView(controls: Mithril.ChildArray): Mithril.Children {\n    return (\n      <>\n        {!!controls.length && (\n          <Dropdown\n            icon=\"fas fa-ellipsis-v\"\n            className=\"DiscussionListItem-controls\"\n            buttonClassName=\"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right\"\n            accessibleToggleLabel={app.translator.trans('core.forum.discussion_controls.toggle_dropdown_accessible_label')}\n          >\n            {controls}\n          </Dropdown>\n        )}\n      </>\n    );\n  }\n\n  slidableUnderneathView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const isUnread = discussion.isUnread();\n\n    return (\n      <span\n        className={classList('Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic', { disabled: !isUnread })}\n        onclick={this.markAsRead.bind(this)}\n      >\n        {icon('fas fa-check')}\n      </span>\n    );\n  }\n\n  contentView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const isUnread = discussion.isUnread();\n    const isRead = discussion.isRead();\n\n    return (\n      <div className={classList('DiscussionListItem-content', 'Slidable-content', { unread: isUnread, read: isRead })}>\n        {this.contentItems().toArray()}\n      </div>\n    );\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('authorAvatar', this.authorAvatarView(), 100);\n    items.add('badges', this.badgesView(), 90);\n    items.add('main', this.mainView(), 80);\n    items.add('replyCount', this.replyCountItem(), 70);\n\n    return items;\n  }\n\n  authorAvatarView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const user = discussion.user();\n\n    return (\n      <Tooltip\n        text={app.translator.trans('core.forum.discussion_list.started_text', { user, ago: humanTime(discussion.createdAt()) })}\n        position=\"right\"\n      >\n        <Link className=\"DiscussionListItem-author\" href={user ? app.route.user(user) : '#'}>\n          {avatar(user || null, { title: '' })}\n        </Link>\n      </Tooltip>\n    );\n  }\n\n  badgesView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n\n    return <ul className=\"DiscussionListItem-badges badges\">{listItems(discussion.badges().toArray())}</ul>;\n  }\n\n  mainView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const jumpTo = this.getJumpTo();\n\n    return (\n      <Link href={app.route.discussion(discussion, jumpTo)} className=\"DiscussionListItem-main\">\n        {this.mainItems().toArray()}\n      </Link>\n    );\n  }\n\n  mainItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const discussion = this.attrs.discussion;\n\n    items.add('title', <h2 className=\"DiscussionListItem-title\">{highlight(discussion.title(), this.highlightRegExp)}</h2>, 100);\n    items.add('info', <ul className=\"DiscussionListItem-info\">{listItems(this.infoItems().toArray())}</ul>, 90);\n\n    return items;\n  }\n\n  getJumpTo() {\n    const discussion = this.attrs.discussion;\n    let jumpTo = 0;\n\n    if (this.attrs.params.q) {\n      const post = discussion.mostRelevantPost();\n      if (post) {\n        jumpTo = post.number();\n      }\n\n      const phrase = escapeRegExp(this.attrs.params.q);\n      this.highlightRegExp = new RegExp(phrase + '|' + phrase.trim().replace(/\\s+/g, '|'), 'gi');\n    } else {\n      jumpTo = Math.min(discussion.lastPostNumber() ?? 0, (discussion.lastReadPostNumber() || 0) + 1);\n    }\n\n    return jumpTo;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    // If we're on a touch device, set up the discussion row to be slidable.\n    // This allows the user to drag the row to either side of the screen to\n    // reveal controls.\n    if ('ontouchstart' in window) {\n      const slidableInstance = slidable(this.element);\n\n      this.$('.DiscussionListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n    }\n  }\n\n  onbeforeupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeupdate(vnode);\n\n    return this.subtree.needsRebuild();\n  }\n\n  /**\n   * Determine whether or not the discussion is currently being viewed.\n   */\n  active() {\n    return app.current.matches(DiscussionPage, { discussion: this.attrs.discussion });\n  }\n\n  /**\n   * Determine whether or not information about who started the discussion\n   * should be displayed instead of information about the most recent reply to\n   * the discussion.\n   */\n  showFirstPost() {\n    return ['newest', 'oldest'].includes(this.attrs.params.sort ?? '');\n  }\n\n  /**\n   * Determine whether or not the number of replies should be shown instead of\n   * the number of unread posts.\n   *\n   * @return {boolean}\n   */\n  showRepliesCount() {\n    return this.attrs.params.sort === 'replies';\n  }\n\n  /**\n   * Mark the discussion as read.\n   */\n  markAsRead() {\n    const discussion = this.attrs.discussion;\n\n    if (discussion.isUnread()) {\n      discussion.save({ lastReadPostNumber: discussion.lastPostNumber() });\n      m.redraw();\n    }\n  }\n\n  /**\n   * Build an item list of info for a discussion listing. By default this is\n   * just the first/last post indicator.\n   */\n  infoItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.attrs.params.q) {\n      const post = this.attrs.discussion.mostRelevantPost() || this.attrs.discussion.firstPost();\n\n      if (post && post.contentType() === 'comment') {\n        const excerpt = highlight(post.contentPlain() ?? '', this.highlightRegExp, 175);\n        items.add('excerpt', excerpt, -100);\n      }\n    } else {\n      items.add('terminalPost', <TerminalPost discussion={this.attrs.discussion} lastPost={!this.showFirstPost()} />);\n    }\n\n    return items;\n  }\n\n  replyCountItem() {\n    const discussion = this.attrs.discussion;\n    const showUnread = !this.showRepliesCount() && discussion.isUnread();\n\n    if (showUnread) {\n      return (\n        <button className=\"Button--ua-reset DiscussionListItem-count\" onclick={this.markAsRead.bind(this)}>\n          <span aria-hidden=\"true\">{abbreviateNumber(discussion.unreadCount())}</span>\n\n          <span className=\"visually-hidden\">\n            {app.translator.trans('core.forum.discussion_list.unread_replies_a11y_label', { count: discussion.replyCount() })}\n          </span>\n        </button>\n      );\n    }\n\n    return (\n      <span className=\"DiscussionListItem-count\">\n        <span aria-hidden=\"true\">{abbreviateNumber(discussion.replyCount())}</span>\n\n        <span className=\"visually-hidden\">\n          {app.translator.trans('core.forum.discussion_list.total_replies_a11y_label', { count: discussion.replyCount() })}\n        </span>\n      </span>\n    );\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `Placeholder` component displays a muted text with some call to action,\n * usually used as an empty state.\n *\n * ### Attrs\n *\n * - `text`\n */\nexport default class Placeholder extends Component {\n  view() {\n    return (\n      <div className=\"Placeholder\">\n        <p>{this.attrs.text}</p>\n      </div>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport DiscussionListItem from './DiscussionListItem';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Placeholder from '../../common/components/Placeholder';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `DiscussionList` component displays a list of discussions.\n *\n * ### Attrs\n *\n * - `state` A DiscussionListState object that represents the discussion lists's state.\n */\nexport default class DiscussionList extends Component {\n  view() {\n    /**\n     * @type {import('../states/DiscussionListState').default}\n     */\n    const state = this.attrs.state;\n\n    const params = state.getParams();\n    const isLoading = state.isInitialLoading() || state.isLoadingNext();\n\n    let loading;\n\n    if (isLoading) {\n      loading = <LoadingIndicator />;\n    } else if (state.hasNext()) {\n      loading = (\n        <Button className=\"Button\" onclick={state.loadNext.bind(state)}>\n          {app.translator.trans('core.forum.discussion_list.load_more_button')}\n        </Button>\n      );\n    }\n\n    if (state.isEmpty()) {\n      const text = app.translator.trans('core.forum.discussion_list.empty_text');\n      return (\n        <div className=\"DiscussionList\">\n          <Placeholder text={text} />\n        </div>\n      );\n    }\n\n    const pageSize = state.pageSize;\n\n    return (\n      <div className={classList('DiscussionList', { 'DiscussionList--searchResults': state.isSearchResults() })}>\n        <ul role=\"feed\" aria-busy={isLoading} className=\"DiscussionList-discussions\">\n          {state.getPages().map((pg, pageNum) => {\n            return pg.items.map((discussion, itemNum) => (\n              <li key={discussion.id()} data-id={discussion.id()} role=\"article\" aria-setsize=\"-1\" aria-posinset={pageNum * pageSize + itemNum + 1}>\n                <DiscussionListItem discussion={discussion} params={params} />\n              </li>\n            ));\n          })}\n        </ul>\n        <div className=\"DiscussionList-loadMore\">{loading}</div>\n      </div>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport DiscussionList from './DiscussionList';\nimport Component from '../../common/Component';\nimport DiscussionPage from './DiscussionPage';\n\nconst hotEdge = (e) => {\n  if (e.pageX < 10) app.pane.show();\n};\n\n/**\n * The `DiscussionListPane` component displays the list of previously viewed\n * discussions in a panel that can be displayed by moving the mouse to the left\n * edge of the screen, where it can also be pinned in place.\n *\n * ### Attrs\n *\n * - `state` A DiscussionListState object that represents the discussion lists's state.\n */\nexport default class DiscussionListPane extends Component {\n  view() {\n    if (!this.attrs.state.hasItems()) {\n      return;\n    }\n\n    return <aside className=\"DiscussionPage-list\">{this.enoughSpace() && <DiscussionList state={this.attrs.state} />}</aside>;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    const $list = $(vnode.dom);\n\n    // When the mouse enters and leaves the discussions pane, we want to show\n    // and hide the pane respectively. We also create a 10px 'hot edge' on the\n    // left of the screen to activate the pane.\n    const pane = app.pane;\n    $list.hover(pane.show.bind(pane), pane.onmouseleave.bind(pane));\n\n    $(document).on('mousemove', hotEdge);\n\n    // When coming from another discussion, scroll to the previous postition\n    // to prevent the discussion list jumping around.\n    if (app.previous.matches(DiscussionPage)) {\n      const top = app.cache.discussionListPaneScrollTop || 0;\n      $list.scrollTop(top);\n    } else {\n      // If the discussion we are viewing is listed in the discussion list, then\n      // we will make sure it is visible in the viewport \u2013 if it is not we will\n      // scroll the list down to it.\n      const $discussion = $list.find('.DiscussionListItem.active');\n      if ($discussion.length) {\n        const listTop = $list.offset().top;\n        const listBottom = listTop + $list.outerHeight();\n        const discussionTop = $discussion.offset().top;\n        const discussionBottom = discussionTop + $discussion.outerHeight();\n\n        if (discussionTop < listTop || discussionBottom > listBottom) {\n          $list.scrollTop($list.scrollTop() - listTop + discussionTop);\n        }\n      }\n    }\n  }\n\n  onremove(vnode) {\n    app.cache.discussionListPaneScrollTop = $(vnode.dom).scrollTop();\n    $(document).off('mousemove', hotEdge);\n  }\n\n  /**\n   * Are we on a device that's larger than we consider \"mobile\"?\n   *\n   * @returns {boolean}\n   */\n  enoughSpace() {\n    return !$('.App-navigation').is(':visible');\n  }\n}\n","/**\n * The `ScrollListener` class sets up a listener that handles window scroll\n * events.\n */\nexport default class ScrollListener {\n  /**\n   * @param {(top: number) => void} callback The callback to run when the scroll position\n   *     changes.\n   */\n  constructor(callback) {\n    this.callback = callback;\n    this.ticking = false;\n  }\n\n  /**\n   * On each animation frame, as long as the listener is active, run the\n   * `update` method.\n   *\n   * @protected\n   */\n  loop() {\n    // THROTTLE: If the callback is still running (or hasn't yet run), we ignore\n    // further scroll events.\n    if (this.ticking) return;\n\n    // Schedule the callback to be executed soon (TM), and stop throttling once\n    // the callback is done.\n    requestAnimationFrame(() => {\n      this.update();\n      this.ticking = false;\n    });\n\n    this.ticking = true;\n  }\n\n  /**\n   * Run the callback, whether there was a scroll event or not.\n   */\n  update() {\n    this.callback(window.pageYOffset);\n  }\n\n  /**\n   * Start listening to and handling the window's scroll position.\n   */\n  start() {\n    if (!this.active) {\n      window.addEventListener('scroll', (this.active = this.loop.bind(this)), { passive: true });\n    }\n  }\n\n  /**\n   * Stop listening to and handling the window's scroll position.\n   */\n  stop() {\n    window.removeEventListener('scroll', this.active);\n\n    this.active = null;\n  }\n}\n","import Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\n\n/**\n * The `LoadingPost` component shows a placeholder that looks like a post,\n * indicating that the post is loading.\n */\nexport default class LoadingPost extends Component {\n  view() {\n    return (\n      <div className=\"Post CommentPost LoadingPost\">\n        <header className=\"Post-header\">\n          {avatar(null, { className: 'PostUser-avatar' })}\n          <div className=\"fakeText\" />\n        </header>\n\n        <div className=\"Post-body\">\n          <div className=\"fakeText\" />\n          <div className=\"fakeText\" />\n          <div className=\"fakeText\" />\n        </div>\n      </div>\n    );\n  }\n}\n","import app from '../../common/app';\nimport type Mithril from 'mithril';\nimport User from '../models/User';\n\n/**\n * The `username` helper displays a user's username in a <span className=\"username\">\n * tag. If the user doesn't exist, the username will be displayed as [deleted].\n */\nexport default function username(user: User | null | undefined | false): Mithril.Vnode {\n  const name = (user && user.displayName()) || app.translator.trans('core.lib.username.deleted_text');\n\n  return <span className=\"username\">{name}</span>;\n}\n","/*global s9e*/\n\nimport Component from '../../common/Component';\n\n/**\n * The `ComposerPostPreview` component renders Markdown as HTML using the\n * TextFormatter library, polling a data source for changes every 50ms. This is\n * done to prevent expensive redraws on e.g. every single keystroke, while\n * still retaining the perception of live updates for the user.\n *\n * ### Attrs\n *\n * - `composer` The state of the composer controlling this preview.\n * - `className` A CSS class for the element surrounding the preview.\n * - `surround` A callback that can execute code before and after re-render, e.g. for scroll anchoring.\n */\nexport default class ComposerPostPreview extends Component {\n  static initAttrs(attrs) {\n    attrs.className = attrs.className || '';\n    attrs.surround = attrs.surround || ((preview) => preview());\n  }\n\n  view() {\n    return <div className={this.attrs.className} />;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Every 50ms, if the composer content has changed, then update the post's\n    // body with a preview.\n    let preview;\n    const updatePreview = () => {\n      // Since we're polling, the composer may have been closed in the meantime,\n      // so we bail in that case.\n      if (!this.attrs.composer.isVisible()) return;\n\n      const content = this.attrs.composer.fields.content();\n\n      if (preview === content) return;\n\n      preview = content;\n\n      this.attrs.surround(() => s9e.TextFormatter.preview(preview || '', vnode.dom));\n    };\n    updatePreview();\n\n    this.updateInterval = setInterval(updatePreview, 50);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    clearInterval(this.updateInterval);\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport ComposerPostPreview from './ComposerPostPreview';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `ReplyPlaceholder` component displays a placeholder for a reply, which,\n * when clicked, opens the reply composer.\n *\n * ### Attrs\n *\n * - `discussion`\n */\nexport default class ReplyPlaceholder extends Component {\n  view() {\n    if (app.composer.composingReplyTo(this.attrs.discussion)) {\n      return (\n        <article className=\"Post CommentPost editing\" aria-busy=\"true\">\n          <header className=\"Post-header\">\n            <div className=\"PostUser\">\n              <h3 className=\"PostUser-name\">\n                {avatar(app.session.user, { className: 'PostUser-avatar' })}\n                {username(app.session.user)}\n              </h3>\n              <ul className=\"PostUser-badges badges\">{listItems(app.session.user.badges().toArray())}</ul>\n            </div>\n          </header>\n          <ComposerPostPreview className=\"Post-body\" composer={app.composer} surround={this.anchorPreview.bind(this)} />\n        </article>\n      );\n    }\n\n    const reply = () => {\n      DiscussionControls.replyAction.call(this.attrs.discussion, true).catch(() => {});\n    };\n\n    return (\n      <button className=\"Post ReplyPlaceholder\" onclick={reply}>\n        <span className=\"Post-header\">\n          {avatar(app.session.user, { className: 'PostUser-avatar' })} {app.translator.trans('core.forum.post_stream.reply_placeholder')}\n        </span>\n      </button>\n    );\n  }\n\n  anchorPreview(preview) {\n    const anchorToBottom = $(window).scrollTop() + $(window).height() >= $(document).height();\n\n    preview();\n\n    if (anchorToBottom) {\n      $(window).scrollTop($(document).height());\n    }\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport ScrollListener from '../../common/utils/ScrollListener';\nimport PostLoading from './LoadingPost';\nimport ReplyPlaceholder from './ReplyPlaceholder';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `PostStream` component displays an infinitely-scrollable wall of posts in\n * a discussion. Posts that have not loaded will be displayed as placeholders.\n *\n * ### Attrs\n *\n * - `discussion`\n * - `stream`\n * - `targetPost`\n * - `onPositionChange`\n */\nexport default class PostStream extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.discussion = this.attrs.discussion;\n    this.stream = this.attrs.stream;\n\n    this.scrollListener = new ScrollListener(this.onscroll.bind(this));\n  }\n\n  view() {\n    let lastTime;\n\n    const viewingEnd = this.stream.viewingEnd();\n    const posts = this.stream.posts();\n    const postIds = this.discussion.postIds();\n\n    const postFadeIn = (vnode) => {\n      $(vnode.dom).addClass('fadeIn');\n      // 500 is the duration of the fadeIn CSS animation + 100ms,\n      // so the animation has time to complete\n      setTimeout(() => $(vnode.dom).removeClass('fadeIn'), 500);\n    };\n\n    const items = posts.map((post, i) => {\n      let content;\n      const attrs = { 'data-index': this.stream.visibleStart + i };\n\n      if (post) {\n        const time = post.createdAt();\n        const PostComponent = app.postComponents[post.contentType()];\n        content = !!PostComponent && <PostComponent post={post} />;\n\n        attrs.key = 'post' + post.id();\n        attrs.oncreate = postFadeIn;\n        attrs['data-time'] = time.toISOString();\n        attrs['data-number'] = post.number();\n        attrs['data-id'] = post.id();\n        attrs['data-type'] = post.contentType();\n\n        // If the post before this one was more than 4 days ago, we will\n        // display a 'time gap' indicating how long it has been in between\n        // the posts.\n        const dt = time - lastTime;\n\n        if (dt > 1000 * 60 * 60 * 24 * 4) {\n          content = [\n            <div className=\"PostStream-timeGap\">\n              <span>{app.translator.trans('core.forum.post_stream.time_lapsed_text', { period: dayjs().add(dt, 'ms').fromNow(true) })}</span>\n            </div>,\n            content,\n          ];\n        }\n\n        lastTime = time;\n      } else {\n        attrs.key = 'post' + postIds[this.stream.visibleStart + i];\n\n        content = <PostLoading />;\n      }\n\n      const postStreamElement = (\n        <div className=\"PostStream-item\" {...attrs}>\n          {content}\n        </div>\n      );\n\n      // If we're on the first post, call the afterFirstPostItems method and add any additional elements.\n      if (i === 0 && this.afterFirstPostItems().toArray().length > 0) {\n        // Using m.fragment to return multiple elements without an enclosing container\n        return m.fragment({ ...attrs }, [\n          postStreamElement,\n          <div className=\"PostStream-item PostStream-afterFirstPost\" key=\"afterFirstPost\">\n            {this.afterFirstPostItems().toArray()}\n          </div>,\n        ]);\n      }\n\n      return postStreamElement;\n    });\n\n    if (!viewingEnd && posts[this.stream.visibleEnd - this.stream.visibleStart - 1]) {\n      items.push(\n        <div className=\"PostStream-loadMore\" key=\"loadMore\">\n          <Button className=\"Button\" onclick={this.stream.loadNext.bind(this.stream)}>\n            {app.translator.trans('core.forum.post_stream.load_more_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    // Allow extensions to add items to the end of the post stream.\n    if (viewingEnd) {\n      items.push(...this.endItems().toArray());\n    }\n\n    // If we're viewing the end of the discussion, the user can reply, and\n    // is not already doing so, then show a 'write a reply' placeholder.\n    if (viewingEnd && (!app.session.user || this.discussion.canReply())) {\n      items.push(\n        <div className=\"PostStream-item\" key=\"reply\" data-index={this.stream.count()} oncreate={postFadeIn}>\n          <ReplyPlaceholder discussion={this.discussion} />\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostStream\" role=\"feed\" aria-live=\"off\" aria-busy={this.stream.pagesLoading ? 'true' : 'false'}>\n        {items}\n      </div>\n    );\n  }\n\n  /**\n   * @returns {ItemList<import('mithril').Children>}\n   */\n  afterFirstPostItems() {\n    const items = new ItemList();\n\n    return items;\n  }\n\n  /**\n   * @returns {ItemList<import('mithril').Children>}\n   */\n  endItems() {\n    const items = new ItemList();\n\n    return items;\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    this.triggerScroll();\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.triggerScroll();\n\n    // This is wrapped in setTimeout due to the following Mithril issue:\n    // https://github.com/lhorie/mithril.js/issues/637\n    setTimeout(() => this.scrollListener.start());\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.scrollListener.stop();\n    clearTimeout(this.calculatePositionTimeout);\n  }\n\n  /**\n   * Start scrolling, if appropriate, to a newly-targeted post.\n   */\n  triggerScroll() {\n    if (!this.stream.needsScroll) return;\n\n    const target = this.stream.targetPost;\n    this.stream.needsScroll = false;\n\n    if ('number' in target) {\n      this.scrollToNumber(target.number, this.stream.animateScroll);\n    } else if ('index' in target) {\n      this.scrollToIndex(target.index, this.stream.animateScroll, target.reply);\n    }\n  }\n\n  /**\n   *\n   * @param {number} top\n   */\n  onscroll(top = window.pageYOffset) {\n    if (this.stream.paused || this.stream.pagesLoading) return;\n\n    this.updateScrubber(top);\n\n    this.loadPostsIfNeeded(top);\n\n    // Throttle calculation of our position (start/end numbers of posts in the\n    // viewport) to 100ms.\n    clearTimeout(this.calculatePositionTimeout);\n    this.calculatePositionTimeout = setTimeout(this.calculatePosition.bind(this, top), 100);\n  }\n\n  /**\n   * Check if either extreme of the post stream is in the viewport,\n   * and if so, trigger loading the next/previous page.\n   *\n   * @param {number} top\n   */\n  loadPostsIfNeeded(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const viewportHeight = $(window).height() - marginTop;\n    const viewportTop = top + marginTop;\n    const loadAheadDistance = 300;\n\n    if (this.stream.visibleStart > 0) {\n      const $item = this.$('.PostStream-item[data-index=' + this.stream.visibleStart + ']');\n\n      if ($item.length && $item.offset().top > viewportTop - loadAheadDistance) {\n        this.stream.loadPrevious();\n      }\n    }\n\n    if (this.stream.visibleEnd < this.stream.count()) {\n      const $item = this.$('.PostStream-item[data-index=' + (this.stream.visibleEnd - 1) + ']');\n\n      if ($item.length && $item.offset().top + $item.outerHeight(true) < viewportTop + viewportHeight + loadAheadDistance) {\n        this.stream.loadNext();\n      }\n    }\n  }\n\n  updateScrubber(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const viewportHeight = $(window).height() - marginTop;\n    const viewportTop = top + marginTop;\n\n    // Before looping through all of the posts, we reset the scrollbar\n    // properties to a 'default' state. These values reflect what would be\n    // seen if the browser were scrolled right up to the top of the page,\n    // and the viewport had a height of 0.\n    const $items = this.$('.PostStream-item[data-index]');\n    let visible = 0;\n    let period = '';\n    let indexFromViewPort = null;\n\n    // Now loop through each of the items in the discussion. An 'item' is\n    // either a single post or a 'gap' of one or more posts that haven't\n    // been loaded yet.\n    $items.each(function () {\n      const $this = $(this);\n      const top = $this.offset().top;\n      const height = $this.outerHeight(true);\n\n      // If this item is above the top of the viewport, skip to the next\n      // one. If it's below the bottom of the viewport, break out of the\n      // loop.\n      if (top + height < viewportTop) {\n        return true;\n      }\n      if (top > viewportTop + viewportHeight) {\n        return false;\n      }\n\n      // Work out how many pixels of this item are visible inside the viewport.\n      // Then add the proportion of this item's total height to the index.\n      const visibleTop = Math.max(0, viewportTop - top);\n      const visibleBottom = Math.min(height, viewportTop + viewportHeight - top);\n      const visiblePost = visibleBottom - visibleTop;\n\n      // We take the index of the first item that passed the previous checks.\n      // It is the item that is first visible in the viewport.\n      if (indexFromViewPort === null) {\n        indexFromViewPort = parseFloat($this.data('index')) + visibleTop / height;\n      }\n\n      if (visiblePost > 0) {\n        visible += visiblePost / height;\n      }\n\n      // If this item has a time associated with it, then set the\n      // scrollbar's current period to a formatted version of this time.\n      const time = $this.data('time');\n      if (time) period = time;\n    });\n\n    // If indexFromViewPort is null, it means no posts are visible in the\n    // viewport. This can happen, when drafting a long reply post. In that case\n    // set the index to the last post.\n    this.stream.index = indexFromViewPort !== null ? indexFromViewPort + 1 : this.stream.count();\n    this.stream.visible = visible;\n    if (period) this.stream.description = dayjs(period).format(extractText(app.translator.trans('core.lib.datetime_formats.scrubber')));\n  }\n\n  /**\n   * Work out which posts (by number) are currently visible in the viewport, and\n   * fire an event with the information.\n   */\n  calculatePosition(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const $window = $(window);\n    const viewportHeight = $window.height() - marginTop;\n    const scrollTop = $window.scrollTop() + marginTop;\n    const viewportTop = top + marginTop;\n\n    let startNumber;\n    let endNumber;\n\n    this.$('.PostStream-item').each(function () {\n      const $item = $(this);\n      const top = $item.offset().top;\n      const height = $item.outerHeight(true);\n      const visibleTop = Math.max(0, viewportTop - top);\n\n      const threeQuartersVisible = visibleTop / height < 0.75;\n      const coversQuarterOfViewport = (height - visibleTop) / viewportHeight > 0.25;\n      if (startNumber === undefined && (threeQuartersVisible || coversQuarterOfViewport)) {\n        startNumber = $item.data('number');\n      }\n\n      if (top + height > scrollTop) {\n        if (top + height < scrollTop + viewportHeight) {\n          if ($item.data('number')) {\n            endNumber = $item.data('number');\n          }\n        } else return false;\n      }\n    });\n\n    if (startNumber) {\n      this.attrs.onPositionChange(startNumber || 1, endNumber, startNumber);\n    }\n  }\n\n  /**\n   * Get the distance from the top of the viewport to the point at which we\n   * would consider a post to be the first one visible.\n   *\n   * @return {number}\n   */\n  getMarginTop() {\n    const headerId = app.screen() === 'phone' ? '#app-navigation' : '#header';\n\n    return this.$() && $(headerId).outerHeight() + parseInt(this.$().css('margin-top'), 10);\n  }\n\n  /**\n   * Scroll down to a certain post by number and 'flash' it.\n   *\n   * @param {number} number\n   * @param {boolean} animate\n   * @return {JQueryDeferred}\n   */\n  scrollToNumber(number, animate) {\n    const $item = this.$(`.PostStream-item[data-number=${number}]`);\n\n    return this.scrollToItem($item, animate).then(this.flashItem.bind(this, $item));\n  }\n\n  /**\n   * Scroll down to a certain post by index.\n   *\n   * @param {number} index\n   * @param {boolean} animate\n   * @param {boolean} reply Whether or not to scroll to the reply placeholder.\n   * @return {JQueryDeferred}\n   */\n  scrollToIndex(index, animate, reply) {\n    const $item = reply ? $('.PostStream-item:last-child') : this.$(`.PostStream-item[data-index=${index}]`);\n\n    this.scrollToItem($item, animate, true, reply);\n\n    if (reply) {\n      this.flashItem($item);\n    }\n  }\n\n  /**\n   * Scroll down to the given post.\n   *\n   * @param {JQuery} $item\n   * @param {boolean} animate\n   * @param {boolean} force Whether or not to force scrolling to the item, even\n   *     if it is already in the viewport.\n   * @param {boolean} reply Whether or not to scroll to the reply placeholder.\n   * @return {JQueryDeferred}\n   */\n  scrollToItem($item, animate, force, reply) {\n    const $container = $('html, body').stop(true);\n    const index = $item.data('index');\n\n    if ($item.length) {\n      const itemTop = $item.offset().top - this.getMarginTop();\n      const itemBottom = $item.offset().top + $item.height();\n      const scrollTop = $(document).scrollTop();\n      const scrollBottom = scrollTop + $(window).height();\n\n      // If the item is already in the viewport, we may not need to scroll.\n      // If we're scrolling to the reply placeholder, we'll make sure its\n      // bottom will line up with the top of the composer.\n      if (force || itemTop < scrollTop || itemBottom > scrollBottom) {\n        const top = reply ? itemBottom - $(window).height() + app.composer.computedHeight() : $item.is(':first-child') ? 0 : itemTop;\n\n        if (!animate) {\n          $container.scrollTop(top);\n        } else if (top !== scrollTop) {\n          $container.animate({ scrollTop: top }, 'fast');\n        }\n      }\n    }\n\n    const updateScrubberHeight = () => {\n      // We manually set the index because we want to display the index of the\n      // exact post we've scrolled to, not just that of the first post within viewport.\n      this.updateScrubber();\n      if (index !== undefined) this.stream.index = index + 1;\n    };\n\n    // If we don't update this before the scroll, the scrubber will start\n    // at the top, and animate down, which can be confusing\n    updateScrubberHeight();\n    this.stream.forceUpdateScrubber = true;\n\n    return Promise.all([$container.promise(), this.stream.loadPromise]).then(() => {\n      m.redraw.sync();\n\n      // Rendering post contents will probably throw off our position.\n      // To counter this, we'll scroll either:\n      //   - To the reply placeholder (aligned with composer top)\n      //   - To the top of the page if we're on the first post\n      //   - To the top of a post (if that post exists)\n      // If the post does not currently exist, it's probably\n      // outside of the range we loaded in, so we won't adjust anything,\n      // as it will soon be rendered by the \"load more\" system.\n      let itemOffset;\n      if (reply) {\n        const $placeholder = $('.PostStream-item:last-child');\n        $(window).scrollTop($placeholder.offset().top + $placeholder.height() - $(window).height() + app.composer.computedHeight());\n      } else if (index === 0) {\n        $(window).scrollTop(0);\n      } else if ((itemOffset = $(`.PostStream-item[data-index=${index}]`).offset())) {\n        $(window).scrollTop(itemOffset.top - this.getMarginTop());\n      }\n\n      // We want to adjust this again after posts have been loaded in\n      // and position adjusted so that the scrubber's height is accurate.\n      updateScrubberHeight();\n\n      this.calculatePosition();\n      this.stream.paused = false;\n      // Check if we need to load more posts after scrolling.\n      this.loadPostsIfNeeded();\n    });\n  }\n\n  /**\n   * 'Flash' the given post, drawing the user's attention to it.\n   *\n   * @param {JQuery} $item\n   */\n  flashItem($item) {\n    // This might execute before the fadeIn class has been removed in PostStreamItem's\n    // oncreate, so we remove it just to be safe and avoid a double animation.\n    $item.removeClass('fadeIn');\n    $item.addClass('flash').on('animationend webkitAnimationEnd', (e) => {\n      $item.removeClass('flash');\n    });\n  }\n}\n","import app from '../../common/app';\n\n/**\n * The `formatNumber` utility localizes a number into a string with the\n * appropriate punctuation based on the provided locale otherwise will default to the users locale.\n *\n * @example\n * formatNumber(1234);\n * // 1,234\n */\nexport default function formatNumber(number: number, locale: string = app.data.locale): string {\n  return new Intl.NumberFormat(locale).format(number);\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport icon from '../../common/helpers/icon';\nimport formatNumber from '../../common/utils/formatNumber';\nimport ScrollListener from '../../common/utils/ScrollListener';\n\n/**\n * The `PostStreamScrubber` component displays a scrubber which can be used to\n * navigate/scrub through a post stream.\n *\n * ### Attrs\n *\n * - `stream`\n * - `className`\n */\nexport default class PostStreamScrubber extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.stream = this.attrs.stream;\n    this.handlers = {};\n\n    this.scrollListener = new ScrollListener(this.updateScrubberValues.bind(this, { fromScroll: true, forceHeightChange: true }));\n  }\n\n  view() {\n    const count = this.stream.count();\n\n    // Index is left blank for performance reasons, it is filled in in updateScubberValues\n    const viewing = app.translator.trans('core.forum.post_scrubber.viewing_text', {\n      count,\n      index: <span className=\"Scrubber-index\"></span>,\n      formattedCount: <span className=\"Scrubber-count\">{formatNumber(count)}</span>,\n    });\n\n    const unreadCount = this.stream.discussion.unreadCount();\n    const unreadPercent = count ? Math.min(count - this.stream.index, unreadCount) / count : 0;\n\n    function styleUnread(vnode) {\n      const $element = $(vnode.dom);\n      const newStyle = {\n        top: 100 - unreadPercent * 100 + '%',\n        height: unreadPercent * 100 + '%',\n        opacity: unreadPercent > 0 ? 1 : 0,\n      };\n\n      if (vnode.state.oldStyle) {\n        $element.stop(true).css(vnode.state.oldStyle).animate(newStyle);\n      } else {\n        $element.css(newStyle);\n      }\n\n      vnode.state.oldStyle = newStyle;\n    }\n    const classNames = ['PostStreamScrubber', 'Dropdown'];\n    if (this.attrs.className) classNames.push(this.attrs.className);\n\n    return (\n      <div className={classNames.join(' ')}>\n        <button className=\"Button Dropdown-toggle\" data-toggle=\"dropdown\">\n          {viewing} {icon('fas fa-sort')}\n        </button>\n\n        <div className=\"Dropdown-menu dropdown-menu\">\n          <div className=\"Scrubber\">\n            <a className=\"Scrubber-first\" onclick={this.goToFirst.bind(this)}>\n              {icon('fas fa-angle-double-up')} {this.firstPostLabel()}\n            </a>\n\n            <div className=\"Scrubber-scrollbar\">\n              <div className=\"Scrubber-before\" />\n              <div className=\"Scrubber-handle\">\n                <div className=\"Scrubber-bar\" />\n                <div className=\"Scrubber-info\">\n                  <strong>{viewing}</strong>\n                  <span className=\"Scrubber-description\"></span>\n                </div>\n              </div>\n              <div className=\"Scrubber-after\" />\n\n              <div className=\"Scrubber-unread\" oncreate={styleUnread} onupdate={styleUnread}>\n                {this.unreadLabel(unreadCount)}\n              </div>\n            </div>\n\n            <a className=\"Scrubber-last\" onclick={this.goToLast.bind(this)}>\n              {icon('fas fa-angle-double-down')} {this.lastPostLabel()}\n            </a>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  firstPostLabel() {\n    return app.translator.trans('core.forum.post_scrubber.original_post_link');\n  }\n\n  unreadLabel(unreadCount) {\n    return app.translator.trans('core.forum.post_scrubber.unread_text', { count: unreadCount });\n  }\n\n  lastPostLabel() {\n    return app.translator.trans('core.forum.post_scrubber.now_link');\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    if (this.stream.forceUpdateScrubber) {\n      this.stream.forceUpdateScrubber = false;\n      this.stream.loadPromise.then(() => this.updateScrubberValues({ animate: true, forceHeightChange: true }));\n    }\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Whenever the window is resized, adjust the height of the scrollbar\n    // so that it fills the height of the sidebar.\n    $(window)\n      .on('resize', (this.handlers.onresize = this.onresize.bind(this)))\n      .resize();\n\n    // When any part of the whole scrollbar is clicked, we want to jump to\n    // that position.\n    this.$('.Scrubber-scrollbar')\n      .bind('click', this.onclick.bind(this))\n\n      // Now we want to make the scrollbar handle draggable. Let's start by\n      // preventing default browser events from messing things up.\n      .bind('dragstart mousedown touchstart', (e) => e.preventDefault());\n\n    // When the mouse is pressed on the scrollbar handle, we capture some\n    // information about its current position. We will store this\n    // information in an object and pass it on to the document's\n    // mousemove/mouseup events later.\n    this.dragging = false;\n    this.mouseStart = 0;\n    this.indexStart = 0;\n\n    this.$('.Scrubber-handle')\n      .bind('mousedown touchstart', this.onmousedown.bind(this))\n\n      // Exempt the scrollbar handle from the 'jump to' click event.\n      .click((e) => e.stopPropagation());\n\n    // When the mouse moves and when it is released, we pass the\n    // information that we captured when the mouse was first pressed onto\n    // some event handlers. These handlers will move the scrollbar/stream-\n    // content as appropriate.\n    $(document)\n      .on('mousemove touchmove', (this.handlers.onmousemove = this.onmousemove.bind(this)))\n      .on('mouseup touchend', (this.handlers.onmouseup = this.onmouseup.bind(this)));\n\n    setTimeout(() => this.scrollListener.start());\n\n    this.stream.loadPromise.then(() => this.updateScrubberValues({ animate: false, forceHeightChange: true }));\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.scrollListener.stop();\n    $(window).off('resize', this.handlers.onresize);\n\n    $(document).off('mousemove touchmove', this.handlers.onmousemove).off('mouseup touchend', this.handlers.onmouseup);\n  }\n\n  /**\n   * Update the scrollbar's position to reflect the current values of the\n   * index/visible properties.\n   *\n   * @param {Partial<{fromScroll: boolean, forceHeightChange: boolean, animate: boolean}>} options\n   */\n  updateScrubberValues(options = {}) {\n    const index = this.stream.index;\n    const count = this.stream.count();\n    const visible = this.stream.visible || 1;\n    const percentPerPost = this.percentPerPost();\n\n    const $scrubber = this.$();\n    $scrubber.find('.Scrubber-index').text(formatNumber(this.stream.sanitizeIndex(Math.max(1, index))));\n    $scrubber.find('.Scrubber-description').text(this.stream.description);\n    $scrubber.toggleClass('disabled', this.stream.disabled());\n\n    const heights = {};\n    heights.before = Math.max(0, percentPerPost.index * Math.min(index - 1, count - visible));\n    heights.handle = Math.min(100 - heights.before, percentPerPost.visible * visible);\n    heights.after = 100 - heights.before - heights.handle;\n\n    // If the stream is paused, don't change height on scroll, as the viewport is being scrolled by the JS\n    // If a height change animation is already in progress, don't adjust height unless overriden\n    if ((options.fromScroll && this.stream.paused) || (this.adjustingHeight && !options.forceHeightChange)) return;\n\n    const func = options.animate ? 'animate' : 'css';\n    this.adjustingHeight = true;\n    const animationPromises = [];\n    for (const part in heights) {\n      const $part = $scrubber.find(`.Scrubber-${part}`);\n      animationPromises.push(\n        $part\n          .stop(true, true)\n          [func]({ height: heights[part] + '%' }, 'fast')\n          .promise()\n      );\n\n      // jQuery likes to put overflow:hidden, but because the scrollbar handle\n      // has a negative margin-left, we need to override.\n      if (func === 'animate') $part.css('overflow', 'visible');\n    }\n    Promise.all(animationPromises).then(() => (this.adjustingHeight = false));\n  }\n\n  /**\n   * Go to the first post in the discussion.\n   */\n  goToFirst() {\n    this.stream.goToFirst();\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n  }\n\n  /**\n   * Go to the last post in the discussion.\n   */\n  goToLast() {\n    this.stream.goToLast();\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n  }\n\n  onresize() {\n    // Adjust the height of the scrollbar so that it fills the height of\n    // the sidebar and doesn't overlap the footer.\n    const scrubber = this.$();\n    const scrollbar = this.$('.Scrubber-scrollbar');\n\n    scrollbar.css(\n      'max-height',\n      $(window).height() -\n        scrubber.offset().top +\n        $(window).scrollTop() -\n        parseInt($('#app').css('padding-bottom'), 10) -\n        (scrubber.outerHeight() - scrollbar.outerHeight())\n    );\n  }\n\n  onmousedown(e) {\n    e.redraw = false;\n    this.mouseStart = e.clientY || e.originalEvent.touches[0].clientY;\n    this.indexStart = this.stream.index;\n    this.dragging = true;\n    $('body').css('cursor', 'move');\n    this.$().toggleClass('dragging', this.dragging);\n  }\n\n  onmousemove(e) {\n    if (!this.dragging) return;\n\n    // Work out how much the mouse has moved by - first in pixels, then\n    // convert it to a percentage of the scrollbar's height, and then\n    // finally convert it into an index. Add this delta index onto\n    // the index at which the drag was started, and then scroll there.\n    const deltaPixels = (e.clientY || e.originalEvent.touches[0].clientY) - this.mouseStart;\n    const deltaPercent = (deltaPixels / this.$('.Scrubber-scrollbar').outerHeight()) * 100;\n    const deltaIndex = deltaPercent / this.percentPerPost().index || 0;\n    const newIndex = Math.min(this.indexStart + deltaIndex, this.stream.count() - 1);\n\n    this.stream.index = Math.max(0, newIndex);\n    this.updateScrubberValues();\n  }\n\n  onmouseup() {\n    this.$().toggleClass('dragging', this.dragging);\n    if (!this.dragging) return;\n\n    this.mouseStart = 0;\n    this.indexStart = 0;\n    this.dragging = false;\n    $('body').css('cursor', '');\n\n    this.$().removeClass('open');\n\n    // If the index we've landed on is in a gap, then tell the stream-\n    // content that we want to load those posts.\n    const intIndex = Math.floor(this.stream.index);\n    this.stream.goToIndex(intIndex);\n  }\n\n  onclick(e) {\n    // Calculate the index which we want to jump to based on the click position.\n\n    // 1. Get the offset of the click from the top of the scrollbar, as a\n    //    percentage of the scrollbar's height.\n    const $scrollbar = this.$('.Scrubber-scrollbar');\n    const offsetPixels = (e.pageY || e.originalEvent.touches[0].pageY) - $scrollbar.offset().top + $('body').scrollTop();\n    let offsetPercent = (offsetPixels / $scrollbar.outerHeight()) * 100;\n\n    // 2. We want the handle of the scrollbar to end up centered on the click\n    //    position. Thus, we calculate the height of the handle in percent and\n    //    use that to find a new offset percentage.\n    offsetPercent = offsetPercent - parseFloat($scrollbar.find('.Scrubber-handle')[0].style.height) / 2;\n\n    // 3. Now we can convert the percentage into an index, and tell the stream-\n    //    content component to jump to that index.\n    let offsetIndex = offsetPercent / this.percentPerPost().index;\n    offsetIndex = Math.max(0, Math.min(this.stream.count() - 1, offsetIndex));\n    this.stream.goToIndex(Math.floor(offsetIndex));\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n\n    this.$().removeClass('open');\n  }\n\n  /**\n   * Get the percentage of the height of the scrubber that should be allocated\n   * to each post.\n   *\n   * @return {{ index: number, visible: number }}\n   * @property {Number} index The percent per post for posts on either side of\n   *     the visible part of the scrubber.\n   * @property {Number} visible The percent per post for the visible part of the\n   *     scrubber.\n   */\n  percentPerPost() {\n    const count = this.stream.count() || 1;\n    const visible = this.stream.visible || 1;\n\n    // To stop the handle of the scrollbar from getting too small when there\n    // are many posts, we define a minimum percentage height for the handle\n    // calculated from a 50 pixel limit. From this, we can calculate the\n    // minimum percentage per visible post. If this is greater than the actual\n    // percentage per post, then we need to adjust the 'before' percentage to\n    // account for it.\n    const minPercentVisible = (50 / this.$('.Scrubber-scrollbar').outerHeight()) * 100;\n    const percentPerVisiblePost = Math.max(100 / count, minPercentVisible / visible);\n    const percentPerPost = count === visible ? 0 : (100 - percentPerVisiblePost * visible) / (count - visible);\n\n    return {\n      index: percentPerPost,\n      visible: percentPerVisiblePost,\n    };\n  }\n}\n","import Dropdown, { IDropdownAttrs } from './Dropdown';\nimport Button from './Button';\nimport icon from '../helpers/icon';\nimport Mithril from 'mithril';\nimport classList from '../utils/classList';\n\nexport interface ISplitDropdownAttrs extends IDropdownAttrs {}\n\n/**\n * The `SplitDropdown` component is similar to `Dropdown`, but the first child\n * is displayed as its own button prior to the toggle button.\n */\nexport default class SplitDropdown extends Dropdown {\n  static initAttrs(attrs: ISplitDropdownAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Dropdown--split');\n    attrs.menuClassName = classList(attrs.menuClassName, 'Dropdown-menu--right');\n  }\n\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    // Make a copy of the attrs of the first child component. We will assign\n    // these attrs to a new button, so that it has exactly the same behaviour as\n    // the first child.\n    const firstChild = this.getFirstChild(children);\n    const buttonAttrs = Object.assign({}, firstChild?.attrs);\n    buttonAttrs.className = classList(buttonAttrs.className, 'SplitDropdown-button Button', this.attrs.buttonClassName);\n\n    return (\n      <>\n        <Button {...buttonAttrs}>{firstChild.children}</Button>\n        <button\n          className={'Dropdown-toggle Button Button--icon ' + this.attrs.buttonClassName}\n          aria-haspopup=\"menu\"\n          aria-label={this.attrs.accessibleToggleLabel}\n          data-toggle=\"dropdown\"\n        >\n          {this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : null}\n          {icon('fas fa-caret-down', { className: 'Button-caret' })}\n        </button>\n      </>\n    );\n  }\n\n  /**\n   * Get the first child. If the first child is an array, the first item in that\n   * array will be returned.\n   */\n  protected getFirstChild(children: Mithril.Children): Mithril.Vnode<any, any> {\n    let firstChild = children;\n\n    while (firstChild instanceof Array) firstChild = firstChild[0];\n\n    return firstChild as Mithril.Vnode<any, any>;\n  }\n}\n","/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param  {number}    delay -          A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}   [noTrailing] -   Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n *                                    throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n *                                    after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n *                                    the internal counter is reset).\n * @param  {Function}  callback -       A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                    to `callback` when the throttled-function is executed.\n * @param  {boolean}   [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n *                                    schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function}  A new, throttled, function.\n */\nexport default function (delay, noTrailing, callback, debounceMode) {\n\t/*\n\t * After wrapper has stopped being called, this timeout ensures that\n\t * `callback` is executed at the proper times in `throttle` and `end`\n\t * debounce modes.\n\t */\n\tlet timeoutID;\n\tlet cancelled = false;\n\n\t// Keep track of the last time `callback` was executed.\n\tlet lastExec = 0;\n\n\t// Function to clear existing timeout\n\tfunction clearExistingTimeout() {\n\t\tif (timeoutID) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\t}\n\n\t// Function to cancel next exec\n\tfunction cancel() {\n\t\tclearExistingTimeout();\n\t\tcancelled = true;\n\t}\n\n\t// `noTrailing` defaults to falsy.\n\tif (typeof noTrailing !== 'boolean') {\n\t\tdebounceMode = callback;\n\t\tcallback = noTrailing;\n\t\tnoTrailing = undefined;\n\t}\n\n\t/*\n\t * The `wrapper` function encapsulates all of the throttling / debouncing\n\t * functionality and when executed will limit the rate at which `callback`\n\t * is executed.\n\t */\n\tfunction wrapper(...arguments_) {\n\t\tlet self = this;\n\t\tlet elapsed = Date.now() - lastExec;\n\n\t\tif (cancelled) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec() {\n\t\t\tlastExec = Date.now();\n\t\t\tcallback.apply(self, arguments_);\n\t\t}\n\n\t\t/*\n\t\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t * to allow future `callback` executions.\n\t\t */\n\t\tfunction clear() {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif (debounceMode && !timeoutID) {\n\t\t\t/*\n\t\t\t * Since `wrapper` is being called for the first time and\n\t\t\t * `debounceMode` is true (at begin), execute `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t}\n\n\t\tclearExistingTimeout();\n\n\t\tif (debounceMode === undefined && elapsed > delay) {\n\t\t\t/*\n\t\t\t * In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t * `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t} else if (noTrailing !== true) {\n\t\t\t/*\n\t\t\t * In trailing throttle mode, since `delay` time has not been\n\t\t\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t * recent execution.\n\t\t\t *\n\t\t\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t * after `delay` ms.\n\t\t\t *\n\t\t\t * If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t * execute after `delay` ms.\n\t\t\t */\n\t\t\ttimeoutID = setTimeout(\n\t\t\t\tdebounceMode ? clear : exec,\n\t\t\t\tdebounceMode === undefined ? delay - elapsed : delay\n\t\t\t);\n\t\t}\n\t}\n\n\twrapper.cancel = cancel;\n\n\t// Return the wrapper function.\n\treturn wrapper;\n}\n","/* eslint-disable no-undefined */\n\nimport throttle from './throttle';\n\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param  {number}   delay -         A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}  [atBegin] -     Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n *                                  after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n *                                  (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param  {Function} callback -      A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                  to `callback` when the debounced-function is executed.\n *\n * @returns {Function} A new, debounced function.\n */\nexport default function (delay, atBegin, callback) {\n\treturn callback === undefined\n\t\t? throttle(delay, atBegin, false)\n\t\t: throttle(delay, callback, atBegin !== false);\n}\n","/**\n * The `anchorScroll` utility saves the scroll position relative to an element,\n * and then restores it after a callback has been run.\n *\n * This is useful if a redraw will change the page's content above the viewport.\n * Normally doing this will result in the content in the viewport being pushed\n * down or pulled up. By wrapping the redraw with this utility, the scroll\n * position can be anchor to an element that is in or below the viewport, so\n * the content in the viewport will stay the same.\n *\n * @param {string | HTMLElement | SVGElement | Element} element The element to anchor the scroll position to.\n * @param {() => void} callback The callback to run that will change page content.\n */\nexport default function anchorScroll(element, callback) {\n  const $window = $(window);\n  const relativeScroll = $(element).offset().top - $window.scrollTop();\n\n  callback();\n\n  $window.scrollTop($(element).offset().top - relativeScroll);\n}\n","import app from '../../forum/app';\nimport { throttle } from 'throttle-debounce';\nimport anchorScroll from '../../common/utils/anchorScroll';\nimport type Discussion from '../../common/models/Discussion';\nimport type Post from '../../common/models/Post';\n\nexport default class PostStreamState {\n  /**\n   * The number of posts to load per page.\n   */\n  static loadCount = 20;\n\n  /**\n   * The discussion to display the post stream for.\n   */\n  discussion: Discussion;\n\n  /**\n   * Whether or not the infinite-scrolling auto-load functionality is\n   * disabled.\n   */\n  paused = false;\n\n  loadPageTimeouts: Record<number, NodeJS.Timeout> = {};\n  pagesLoading = 0;\n\n  index = 0;\n  number = 1;\n\n  /**\n   * The number of posts that are currently visible in the viewport.\n   */\n  visible = 1;\n  visibleStart = 0;\n  visibleEnd = 0;\n\n  animateScroll = false;\n  needsScroll = false;\n  targetPost: { number: number } | { index: number; reply?: boolean } | null = null;\n\n  /**\n   * The description to render on the scrubber.\n   */\n  description = '';\n\n  /**\n   * When the page is scrolled, goToIndex is called, or the page is loaded,\n   * various listeners result in the scrubber being updated with a new\n   * position and values. However, if goToNumber is called, the scrubber\n   * will not be updated. Accordingly, we add logic to the scrubber's\n   * onupdate to update itself, but only when needed, as indicated by this\n   * property.\n   *\n   */\n  forceUpdateScrubber = false;\n\n  loadPromise: Promise<void> | null = null;\n\n  loadNext: () => void;\n  loadPrevious: () => void;\n\n  constructor(discussion: Discussion, includedPosts: Post[] = []) {\n    this.discussion = discussion;\n\n    this.loadNext = throttle(300, this._loadNext);\n    this.loadPrevious = throttle(300, this._loadPrevious);\n\n    this.show(includedPosts);\n  }\n\n  /**\n   * Update the stream so that it loads and includes the latest posts in the\n   * discussion, if the end is being viewed.\n   */\n  update() {\n    if (!this.viewingEnd()) return Promise.resolve();\n\n    this.visibleEnd = this.count();\n\n    return this.loadRange(this.visibleStart, this.visibleEnd);\n  }\n\n  /**\n   * Load and scroll up to the first post in the discussion.\n   */\n  goToFirst(): Promise<void> {\n    return this.goToIndex(0);\n  }\n\n  /**\n   * Load and scroll down to the last post in the discussion.\n   */\n  goToLast(): Promise<void> {\n    return this.goToIndex(this.count() - 1, true);\n  }\n\n  /**\n   * Load and scroll to a post with a certain number.\n   *\n   * @param number The post number to go to. If 'reply', go to the last post and scroll the reply preview into view.\n   */\n  goToNumber(number: number | 'reply', noAnimation = false): Promise<void> {\n    // If we want to go to the reply preview, then we will go to the end of the\n    // discussion and then scroll to the very bottom of the page.\n    if (number === 'reply') {\n      const resultPromise = this.goToLast();\n      this.targetPost = { ...(this.targetPost as { index: number }), reply: true };\n      return resultPromise;\n    }\n\n    this.paused = true;\n\n    this.loadPromise = this.loadNearNumber(number);\n\n    this.needsScroll = true;\n    this.targetPost = { number };\n    this.animateScroll = !noAnimation;\n    this.number = number;\n\n    // In this case, the redraw is only called after the response has been loaded\n    // because we need to know the indices of the post range before we can\n    // start scrolling to items. Calling redraw early causes issues.\n    // Since this is only used for external navigation to the post stream, the delay\n    // before the stream is moved is not an issue.\n    return this.loadPromise.then(() => m.redraw());\n  }\n\n  /**\n   * Load and scroll to a certain index within the discussion.\n   */\n  goToIndex(index: number, noAnimation = false): Promise<void> {\n    this.paused = true;\n\n    this.loadPromise = this.loadNearIndex(index);\n\n    this.needsScroll = true;\n    this.targetPost = { index };\n    this.animateScroll = !noAnimation;\n    this.index = index;\n\n    m.redraw();\n\n    return this.loadPromise;\n  }\n\n  /**\n   * Clear the stream and load posts near a certain number. Returns a promise.\n   * If the post with the given number is already loaded, the promise will be\n   * resolved immediately.\n   */\n  loadNearNumber(number: number): Promise<void> {\n    if (this.posts().some((post) => post && Number(post.number()) === Number(number))) {\n      return Promise.resolve();\n    }\n\n    this.reset();\n\n    return app.store\n      .find<Post[]>('posts', {\n        filter: { discussion: this.discussion.id() as string },\n        page: { near: number },\n      })\n      .then(this.show.bind(this));\n  }\n\n  /**\n   * Clear the stream and load posts near a certain index. A page of posts\n   * surrounding the given index will be loaded. Returns a promise. If the given\n   * index is already loaded, the promise will be resolved immediately.\n   */\n  loadNearIndex(index: number): Promise<void> {\n    if (index >= this.visibleStart && index < this.visibleEnd) {\n      return Promise.resolve();\n    }\n\n    const start = this.sanitizeIndex(index - PostStreamState.loadCount / 2);\n    const end = start + PostStreamState.loadCount;\n\n    this.reset(start, end);\n\n    return this.loadRange(start, end).then(this.show.bind(this));\n  }\n\n  /**\n   * Load the next page of posts.\n   */\n  _loadNext() {\n    const start = this.visibleEnd;\n    const end = (this.visibleEnd = this.sanitizeIndex(this.visibleEnd + PostStreamState.loadCount));\n\n    // Unload the posts which are two pages back from the page we're currently\n    // loading.\n    const twoPagesAway = start - PostStreamState.loadCount * 2;\n    if (twoPagesAway > this.visibleStart && twoPagesAway >= 0) {\n      this.visibleStart = twoPagesAway + PostStreamState.loadCount + 1;\n\n      if (this.loadPageTimeouts[twoPagesAway]) {\n        clearTimeout(this.loadPageTimeouts[twoPagesAway]);\n        delete this.loadPageTimeouts[twoPagesAway];\n        this.pagesLoading--;\n      }\n    }\n\n    this.loadPage(start, end);\n  }\n\n  /**\n   * Load the previous page of posts.\n   */\n  _loadPrevious() {\n    const end = this.visibleStart;\n    const start = (this.visibleStart = this.sanitizeIndex(this.visibleStart - PostStreamState.loadCount));\n\n    // Unload the posts which are two pages back from the page we're currently\n    // loading.\n    const twoPagesAway = start + PostStreamState.loadCount * 2;\n    if (twoPagesAway < this.visibleEnd && twoPagesAway <= this.count()) {\n      this.visibleEnd = twoPagesAway;\n\n      if (this.loadPageTimeouts[twoPagesAway]) {\n        clearTimeout(this.loadPageTimeouts[twoPagesAway]);\n        delete this.loadPageTimeouts[twoPagesAway];\n        this.pagesLoading--;\n      }\n    }\n\n    this.loadPage(start, end, true);\n  }\n\n  /**\n   * Load a page of posts into the stream and redraw.\n   */\n  loadPage(start: number, end: number, backwards = false) {\n    this.pagesLoading++;\n\n    const redraw = () => {\n      if (start < this.visibleStart || end > this.visibleEnd) return;\n\n      const anchorIndex = backwards ? this.visibleEnd - 1 : this.visibleStart;\n      anchorScroll(`.PostStream-item[data-index=\"${anchorIndex}\"]`, m.redraw.sync);\n    };\n    redraw();\n\n    this.loadPageTimeouts[start] = setTimeout(\n      () => {\n        this.loadRange(start, end).then(() => {\n          redraw();\n          this.pagesLoading--;\n        });\n        delete this.loadPageTimeouts[start];\n      },\n      this.pagesLoading - 1 ? 1000 : 0\n    );\n  }\n\n  /**\n   * Load and inject the specified range of posts into the stream, without\n   * clearing it.\n   */\n  loadRange(start: number, end: number): Promise<Post[]> {\n    const loadIds: string[] = [];\n    const loaded: Post[] = [];\n\n    this.discussion\n      .postIds()\n      .slice(start, end)\n      .forEach((id) => {\n        const post = app.store.getById<Post>('posts', id);\n\n        if (post && post.discussion() && typeof post.canEdit() !== 'undefined') {\n          loaded.push(post);\n        } else {\n          loadIds.push(id);\n        }\n      });\n\n    if (loadIds.length) {\n      return app.store.find<Post[]>('posts', loadIds).then((newPosts) => {\n        return loaded.concat(newPosts).sort((a, b) => a.number() - b.number());\n      });\n    }\n\n    return Promise.resolve(loaded);\n  }\n\n  /**\n   * Set up the stream with the given array of posts.\n   */\n  show(posts: Post[]) {\n    this.visibleStart = posts.length ? this.discussion.postIds().indexOf(posts[0].id() ?? '0') : 0;\n    this.visibleEnd = this.sanitizeIndex(this.visibleStart + posts.length);\n  }\n\n  /**\n   * Reset the stream so that a specific range of posts is displayed. If a range\n   * is not specified, the first page of posts will be displayed.\n   */\n  reset(start?: number, end?: number) {\n    this.visibleStart = start || 0;\n    this.visibleEnd = this.sanitizeIndex(end || PostStreamState.loadCount);\n  }\n\n  /**\n   * Get the visible page of posts.\n   */\n  posts(): (Post | null)[] {\n    return this.discussion\n      .postIds()\n      .slice(this.visibleStart, this.visibleEnd)\n      .map((id) => {\n        const post = app.store.getById<Post>('posts', id);\n\n        return post && post.discussion() && typeof post.canEdit() !== 'undefined' ? post : null;\n      });\n  }\n\n  /**\n   * Get the total number of posts in the discussion.\n   */\n  count(): number {\n    return this.discussion.postIds().length;\n  }\n\n  /**\n   * Check whether or not the scrubber should be disabled, i.e. if all of the\n   * posts are visible in the viewport.\n   */\n  disabled(): boolean {\n    return this.visible >= this.count();\n  }\n\n  /**\n   * Are we currently viewing the end of the discussion?\n   */\n  viewingEnd(): boolean {\n    // In some cases, such as if we've stickied a post, an event post\n    // may have been added / removed. This means that `this.visibleEnd`\n    // and`this.count()` will be out of sync by 1 post, but we are still\n    // \"viewing the end\" of the post stream, so we should still reload\n    // all posts up until the last one.\n    return Math.abs(this.count() - this.visibleEnd) <= 1;\n  }\n\n  /**\n   * Make sure that the given index is not outside of the possible range of\n   * indexes in the discussion.\n   */\n  sanitizeIndex(index: number) {\n    return Math.max(0, Math.min(this.count(), Math.floor(index)));\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport DiscussionHero from './DiscussionHero';\nimport DiscussionListPane from './DiscussionListPane';\nimport PostStream from './PostStream';\nimport PostStreamScrubber from './PostStreamScrubber';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SplitDropdown from '../../common/components/SplitDropdown';\nimport listItems from '../../common/helpers/listItems';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport PostStreamState from '../states/PostStreamState';\nimport Discussion from '../../common/models/Discussion';\nimport Post from '../../common/models/Post';\nimport { ApiResponseSingle } from '../../common/Store';\n\nexport interface IDiscussionPageAttrs extends IPageAttrs {\n  id: string;\n  near?: number;\n}\n\n/**\n * The `DiscussionPage` component displays a whole discussion page, including\n * the discussion list pane, the hero, the posts, and the sidebar.\n */\nexport default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = IDiscussionPageAttrs> extends Page<CustomAttrs> {\n  /**\n   * The discussion that is being viewed.\n   */\n  protected discussion: Discussion | null = null;\n\n  /**\n   * A public API for interacting with the post stream.\n   */\n  protected stream: PostStreamState | null = null;\n\n  /**\n   * The number of the first post that is currently visible in the viewport.\n   */\n  protected near: number = 0;\n\n  protected useBrowserScrollRestoration = true;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.load();\n\n    // If the discussion list has been loaded, then we'll enable the pane (and\n    // hide it by default). Also, if we've just come from another discussion\n    // page, then we don't want Mithril to redraw the whole page \u2013 if it did,\n    // then the pane would redraw which would be slow and would cause problems with\n    // event handlers.\n    // We will also enable the pane if the discussion list is empty but loading,\n    // because the DiscussionComposer refreshes the list and redirects to the new discussion at the same time.\n    if (app.discussions.hasItems() || app.discussions.isLoading()) {\n      app.pane?.enable();\n      app.pane?.hide();\n    }\n\n    this.bodyClass = 'App--discussion';\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    // If we are indeed navigating away from this discussion, then disable the\n    // discussion list pane. Also, if we're composing a reply to this\n    // discussion, minimize the composer \u2013 unless it's empty, in which case\n    // we'll just close it.\n    app.pane?.disable();\n\n    if (this.discussion && app.composer.composingReplyTo(this.discussion) && !app.composer?.fields?.content()) {\n      app.composer.hide();\n    } else {\n      app.composer.minimize();\n    }\n  }\n\n  view(): Mithril.Children {\n    return <div className=\"DiscussionPage\">{this.viewItems().toArray()}</div>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('pane', <DiscussionListPane state={app.discussions} />, 100);\n    items.add(\n      'discussions',\n      <div className=\"DiscussionPage-discussion\">{this.discussion ? this.pageContent().toArray() : this.loadingItems().toArray()}</div>,\n      90\n    );\n\n    return items;\n  }\n\n  /**\n   * List of components shown while the discussion is loading.\n   */\n  loadingItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('spinner', <LoadingIndicator />, 100);\n\n    return items;\n  }\n\n  /**\n   * Function that renders the `sidebarItems` ItemList.\n   */\n  sidebar(): Mithril.Children {\n    return (\n      <nav className=\"DiscussionPage-nav\">\n        <ul>{listItems(this.sidebarItems().toArray())}</ul>\n      </nav>\n    );\n  }\n\n  /**\n   * Renders the discussion's hero.\n   */\n  hero(): Mithril.Children {\n    return <DiscussionHero discussion={this.discussion} />;\n  }\n\n  /**\n   * List of items rendered as the main page content.\n   */\n  pageContent(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('hero', this.hero(), 100);\n    items.add('main', <div className=\"container\">{this.mainContent().toArray()}</div>, 10);\n\n    return items;\n  }\n\n  /**\n   * List of items rendered inside the main page content container.\n   */\n  mainContent(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('sidebar', this.sidebar(), 100);\n\n    items.add(\n      'poststream',\n      <div className=\"DiscussionPage-stream\">\n        <PostStream discussion={this.discussion} stream={this.stream} onPositionChange={this.positionChanged.bind(this)} />\n      </div>,\n      10\n    );\n\n    return items;\n  }\n\n  /**\n   * Load the discussion from the API or use the preloaded one.\n   */\n  load(): void {\n    const preloadedDiscussion = app.preloadedApiDocument<Discussion>();\n    if (preloadedDiscussion) {\n      // We must wrap this in a setTimeout because if we are mounting this\n      // component for the first time on page load, then any calls to m.redraw\n      // will be ineffective and thus any configs (scroll code) will be run\n      // before stuff is drawn to the page.\n      setTimeout(this.show.bind(this, preloadedDiscussion), 0);\n    } else {\n      const params = this.requestParams();\n\n      app.store.find<Discussion>('discussions', m.route.param('id'), params).then(this.show.bind(this));\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Get the parameters that should be passed in the API request to get the\n   * discussion.\n   */\n  requestParams(): Record<string, unknown> {\n    return {\n      bySlug: true,\n      page: { near: this.near },\n    };\n  }\n\n  /**\n   * Initialize the component to display the given discussion.\n   */\n  show(discussion: ApiResponseSingle<Discussion>): void {\n    app.history.push('discussion', discussion.title());\n    app.setTitle(discussion.title());\n    app.setTitleCount(0);\n\n    // When the API responds with a discussion, it will also include a number of\n    // posts. Some of these posts are included because they are on the first\n    // page of posts we want to display (determined by the `near` parameter) \u2013\n    // others may be included because due to other relationships introduced by\n    // extensions. We need to distinguish the two so we don't end up displaying\n    // the wrong posts. We do so by filtering out the posts that don't have\n    // the 'discussion' relationship linked, then sorting and splicing.\n    let includedPosts: Post[] = [];\n    if (discussion.payload && discussion.payload.included) {\n      const discussionId = discussion.id();\n\n      includedPosts = discussion.payload.included\n        .filter(\n          (record) =>\n            record.type === 'posts' &&\n            record.relationships &&\n            record.relationships.discussion &&\n            !Array.isArray(record.relationships.discussion.data) &&\n            record.relationships.discussion.data.id === discussionId\n        )\n        // We can make this assertion because posts should be in the store,\n        // since they were in the discussion's payload.\n        .map((record) => app.store.getById<Post>('posts', record.id) as Post)\n        .sort((a: Post, b: Post) => a.number() - b.number())\n        .slice(0, 20);\n    }\n\n    // Set up the post stream for this discussion, along with the first page of\n    // posts we want to display. Tell the stream to scroll down and highlight\n    // the specific post that was routed to.\n    this.stream = new PostStreamState(discussion, includedPosts);\n    const rawNearParam = m.route.param('near');\n    const nearParam = rawNearParam === 'reply' ? 'reply' : parseInt(rawNearParam);\n    this.stream.goToNumber(nearParam || (includedPosts[0]?.number() ?? 0), true).then(() => {\n      this.discussion = discussion;\n\n      app.current.set('discussion', discussion);\n      app.current.set('stream', this.stream);\n    });\n  }\n\n  /**\n   * Build an item list for the contents of the sidebar.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.discussion) {\n      items.add(\n        'controls',\n        <SplitDropdown\n          icon=\"fas fa-ellipsis-v\"\n          className=\"App-primaryControl\"\n          buttonClassName=\"Button--primary\"\n          accessibleToggleLabel={app.translator.trans('core.forum.discussion_controls.toggle_dropdown_accessible_label')}\n        >\n          {DiscussionControls.controls(this.discussion, this).toArray()}\n        </SplitDropdown>,\n        100\n      );\n    }\n\n    items.add('scrubber', <PostStreamScrubber stream={this.stream} className=\"App-titleControl\" />, -100);\n\n    return items;\n  }\n\n  /**\n   * When the posts that are visible in the post stream change (i.e. the user\n   * scrolls up or down), then we update the URL and mark the posts as read.\n   */\n  positionChanged(startNumber: number, endNumber: number): void {\n    const discussion = this.discussion;\n\n    if (!discussion) return;\n\n    // Construct a URL to this discussion with the updated position, then\n    // replace it into the window's history and our own history stack.\n    const url = app.route.discussion(discussion, (this.near = startNumber));\n\n    window.history.replaceState(null, document.title, url);\n    app.history.push('discussion', discussion.title());\n\n    // If the user hasn't read past here before, then we'll update their read\n    // state and redraw.\n    if (app.session.user && endNumber > (discussion.lastReadPostNumber() || 0)) {\n      discussion.save({ lastReadPostNumber: endNumber });\n      m.redraw();\n    }\n  }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `HeaderPrimary` component displays primary header controls. On the\n * default skin, these are shown just to the right of the forum title.\n */\nexport default class HeaderPrimary extends Component {\n  view() {\n    return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n  }\n\n  /**\n   * Build an item list for the controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    return new ItemList();\n  }\n}\n","import Button from './Button';\nimport Link from './Link';\n\n/**\n * The `LinkButton` component defines a `Button` which links to a route.\n *\n * ### Attrs\n *\n * All of the attrs accepted by `Button`, plus:\n *\n * - `active` Whether or not the page that this button links to is currently\n *   active.\n * - `href` The URL to link to. If the current URL `m.route()` matches this,\n *   the `active` prop will automatically be set to true.\n * - `force` Whether the page should be fully rerendered. Defaults to `true`.\n */\nexport default class LinkButton extends Button {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.active = this.isActive(attrs);\n    if (attrs.force === undefined) attrs.force = true;\n  }\n\n  view(vnode) {\n    const vdom = super.view(vnode);\n\n    vdom.tag = Link;\n    vdom.attrs.active = String(vdom.attrs.active);\n    delete vdom.attrs.type;\n\n    return vdom;\n  }\n\n  /**\n   * Determine whether a component with the given attrs is 'active'.\n   *\n   * @param {object} attrs\n   * @return {boolean}\n   */\n  static isActive(attrs) {\n    return typeof attrs.active !== 'undefined' ? attrs.active : m.route.get()?.split('?')[0] === attrs.href?.split('?')[0];\n  }\n}\n","import app from '../../forum/app';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport Separator from '../../common/components/Separator';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface ISessionDropdownAttrs extends IDropdownAttrs {}\n\n/**\n * The `SessionDropdown` component shows a button with the current user's\n * avatar/name, with a dropdown of session controls.\n */\nexport default class SessionDropdown<CustomAttrs extends ISessionDropdownAttrs = ISessionDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: ISessionDropdownAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = 'SessionDropdown';\n    attrs.buttonClassName = 'Button Button--user Button--flat';\n    attrs.menuClassName = 'Dropdown-menu--right';\n\n    attrs.accessibleToggleLabel = extractText(app.translator.trans('core.forum.header.session_dropdown_accessible_label'));\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    return super.view({ ...vnode, children: this.items().toArray() });\n  }\n\n  getButtonContent() {\n    const user = app.session.user;\n\n    return [avatar(user), ' ', <span className=\"Button-label\">{username(user)}</span>];\n  }\n\n  /**\n   * Build an item list for the contents of the dropdown menu.\n   */\n  items(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n    const user = app.session.user!;\n\n    items.add(\n      'profile',\n      <LinkButton icon=\"fas fa-user\" href={app.route.user(user)}>\n        {app.translator.trans('core.forum.header.profile_button')}\n      </LinkButton>,\n      100\n    );\n\n    items.add(\n      'settings',\n      <LinkButton icon=\"fas fa-cog\" href={app.route('settings')}>\n        {app.translator.trans('core.forum.header.settings_button')}\n      </LinkButton>,\n      50\n    );\n\n    if (app.forum.attribute('adminUrl')) {\n      items.add(\n        'administration',\n        <LinkButton icon=\"fas fa-wrench\" href={app.forum.attribute('adminUrl')} target=\"_blank\">\n          {app.translator.trans('core.forum.header.admin_button')}\n        </LinkButton>,\n        0\n      );\n    }\n\n    items.add('separator', <Separator />, -90);\n\n    items.add(\n      'logOut',\n      <Button icon=\"fas fa-sign-out-alt\" onclick={app.session.logout.bind(app.session)}>\n        {app.translator.trans('core.forum.header.log_out_button')}\n      </Button>,\n      -100\n    );\n\n    return items;\n  }\n}\n","import Dropdown, { IDropdownAttrs } from './Dropdown';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport type Component from '../Component';\nimport type Mithril from 'mithril';\n\n/**\n * Determines via a vnode is currently \"active\".\n * Due to changes in Mithril 2, attrs will not be instantiated until AFTER view()\n * is initially called on the parent component, so we can not always depend on the\n * active attr to determine which element should be displayed as the \"active child\".\n *\n * This is a temporary patch, and as so, is not exported / placed in utils.\n */\nfunction isActive(vnode: Mithril.Children): boolean {\n  if (!vnode || typeof vnode !== 'object' || vnode instanceof Array) return false;\n\n  const tag = vnode.tag;\n\n  // Allow non-selectable dividers/headers to be added.\n  if (typeof tag === 'string' && tag !== 'a' && tag !== 'button') return false;\n\n  if ((typeof tag === 'object' || typeof tag === 'function') && 'initAttrs' in tag) {\n    (tag as unknown as typeof Component).initAttrs(vnode.attrs);\n  }\n\n  return (typeof tag === 'object' || typeof tag === 'function') && 'isActive' in tag ? (tag as any).isActive(vnode.attrs) : vnode.attrs.active;\n}\n\nexport interface ISelectDropdownAttrs extends IDropdownAttrs {\n  defaultLabel: string;\n}\n\n/**\n * The `SelectDropdown` component is the same as a `Dropdown`, except the toggle\n * button's label is set as the label of the first child which has a truthy\n * `active` prop.\n */\nexport default class SelectDropdown<CustomAttrs extends ISelectDropdownAttrs = ISelectDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: ISelectDropdownAttrs) {\n    attrs.caretIcon ??= 'fas fa-sort';\n\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Dropdown--select');\n  }\n\n  getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n    const activeChild = children.find(isActive);\n    let label = (activeChild && typeof activeChild === 'object' && 'children' in activeChild && activeChild.children) || this.attrs.defaultLabel;\n\n    // @ts-ignore\n    if (Array.isArray(label)) label = label[0];\n\n    return [<span className=\"Button-label\">{label}</span>, this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : null];\n  }\n}\n","import app from '../common/app';\nimport { FlarumRequestOptions } from './Application';\nimport { fireDeprecationWarning } from './helpers/fireDebugWarning';\nimport Store, { ApiPayloadSingle, ApiResponseSingle, MetaInformation } from './Store';\n\nexport interface ModelIdentifier {\n  type: string;\n  id: string;\n}\n\nexport interface ModelAttributes {\n  [key: string]: unknown;\n}\n\nexport interface ModelRelationships {\n  [relationship: string]: {\n    data: ModelIdentifier | ModelIdentifier[];\n  };\n}\n\nexport interface UnsavedModelData {\n  type?: string;\n  attributes?: ModelAttributes;\n  relationships?: ModelRelationships;\n}\n\nexport interface SavedModelData {\n  type: string;\n  id: string;\n  attributes?: ModelAttributes;\n  relationships?: ModelRelationships;\n}\n\nexport type ModelData = UnsavedModelData | SavedModelData;\n\nexport interface SaveRelationships {\n  [relationship: string]: null | Model | Model[];\n}\n\nexport interface SaveAttributes {\n  [key: string]: unknown;\n  relationships?: SaveRelationships;\n}\n\n/**\n * The `Model` class represents a local data resource. It provides methods to\n * persist changes via the API.\n */\nexport default abstract class Model {\n  /**\n   * The resource object from the API.\n   */\n  data: ModelData = {};\n\n  /**\n   * The time at which the model's data was last updated. Watching the value\n   * of this property is a fast way to retain/cache a subtree if data hasn't\n   * changed.\n   */\n  freshness: Date = new Date();\n\n  /**\n   * Whether or not the resource exists on the server.\n   */\n  exists: boolean = false;\n\n  /**\n   * The data store that this resource should be persisted to.\n   */\n  protected store: Store;\n\n  /**\n   * @param data A resource object from the API.\n   * @param store The data store that this model should be persisted to.\n   */\n  constructor(data: ModelData = {}, store = app.store) {\n    this.data = data;\n    this.store = store;\n  }\n\n  /**\n   * Get the model's ID.\n   *\n   * @final\n   */\n  id(): string | undefined {\n    return 'id' in this.data ? this.data.id : undefined;\n  }\n\n  /**\n   * Get one of the model's attributes.\n   *\n   * @final\n   */\n  attribute<T = unknown>(attribute: string): T {\n    return this.data?.attributes?.[attribute] as T;\n  }\n\n  /**\n   * Merge new data into this model locally.\n   *\n   * @param data A resource object to merge into this model\n   */\n  pushData(data: ModelData | { relationships?: SaveRelationships }): this {\n    if ('id' in data) {\n      (this.data as SavedModelData).id = data.id;\n    }\n\n    if ('type' in data) {\n      this.data.type = data.type;\n    }\n\n    if ('attributes' in data) {\n      this.data.attributes ||= {};\n\n      // @deprecated\n      // Filter out relationships that got in by accident.\n      for (const key in data.attributes) {\n        const val = data.attributes[key];\n        if (val && val instanceof Model) {\n          fireDeprecationWarning('Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.', '3249');\n          delete data.attributes[key];\n          data.relationships ||= {};\n          data.relationships[key] = { data: Model.getIdentifier(val) };\n        }\n      }\n\n      Object.assign(this.data.attributes, data.attributes);\n    }\n\n    if ('relationships' in data) {\n      const relationships = this.data.relationships ?? {};\n\n      // For every relationship field, we need to check if we've\n      // been handed a Model instance. If so, we will convert it to a\n      // relationship data object.\n      for (const r in data.relationships) {\n        const relationship = data.relationships[r];\n\n        if (relationship === null) {\n          delete relationships[r];\n          delete data.relationships[r];\n          continue;\n        }\n\n        let identifier: ModelRelationships[string];\n        if (relationship instanceof Model) {\n          identifier = { data: Model.getIdentifier(relationship) };\n        } else if (relationship instanceof Array) {\n          identifier = { data: relationship.map(Model.getIdentifier) };\n        } else {\n          identifier = relationship;\n        }\n\n        data.relationships[r] = identifier;\n        relationships[r] = identifier;\n      }\n\n      this.data.relationships = relationships;\n    }\n\n    // Now that we've updated the data, we can say that the model is fresh.\n    // This is an easy way to invalidate retained subtrees etc.\n    this.freshness = new Date();\n\n    return this;\n  }\n\n  /**\n   * Merge new attributes into this model locally.\n   *\n   * @param attributes The attributes to merge.\n   */\n  pushAttributes(attributes: ModelAttributes) {\n    this.pushData({ attributes });\n  }\n\n  /**\n   * Merge new attributes into this model, both locally and with persistence.\n   *\n   * @param attributes The attributes to save. If a 'relationships' key\n   *     exists, it will be extracted and relationships will also be saved.\n   */\n  save(\n    attributes: SaveAttributes,\n    options: Omit<FlarumRequestOptions<ApiPayloadSingle>, 'url'> & { meta?: MetaInformation } = {}\n  ): Promise<ApiResponseSingle<this>> {\n    const data: ModelData & { id?: string } = {\n      type: this.data.type,\n      attributes,\n    };\n\n    if ('id' in this.data) {\n      data.id = this.data.id;\n    }\n\n    // If a 'relationships' key exists, extract it from the attributes hash and\n    // set it on the top-level data object instead. We will be sending this data\n    // object to the API for persistence.\n    if (attributes.relationships) {\n      data.relationships = {};\n\n      for (const key in attributes.relationships) {\n        const model = attributes.relationships[key];\n\n        if (model === null) continue;\n\n        data.relationships[key] = {\n          data: model instanceof Array ? model.map(Model.getIdentifier) : Model.getIdentifier(model),\n        };\n      }\n\n      delete attributes.relationships;\n    }\n\n    // Before we update the model's data, we should make a copy of the model's\n    // old data so that we can revert back to it if something goes awry during\n    // persistence.\n    const oldData = this.copyData();\n\n    this.pushData(data);\n\n    const request = {\n      data,\n      meta: options.meta || undefined,\n    };\n\n    return app\n      .request<ApiPayloadSingle>({\n        method: this.exists ? 'PATCH' : 'POST',\n        url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n        body: request,\n        ...options,\n      })\n      .then(\n        // If everything went well, we'll make sure the store knows that this\n        // model exists now (if it didn't already), and we'll push the data that\n        // the API returned into the store.\n        (payload) => {\n          return this.store.pushPayload<this>(payload);\n        },\n\n        // If something went wrong, though... good thing we backed up our model's\n        // old data! We'll revert to that and let others handle the error.\n        (err: Error) => {\n          this.pushData(oldData);\n          m.redraw();\n          throw err;\n        }\n      );\n  }\n\n  /**\n   * Send a request to delete the resource.\n   *\n   * @param body Data to send along with the DELETE request.\n   */\n  delete(body: FlarumRequestOptions<void>['body'] = {}, options: Omit<FlarumRequestOptions<void>, 'url'> = {}): Promise<void> {\n    if (!this.exists) return Promise.resolve();\n\n    return app\n      .request({\n        method: 'DELETE',\n        url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n        body,\n        ...options,\n      })\n      .then(() => {\n        this.exists = false;\n\n        this.store.remove(this);\n      });\n  }\n\n  /**\n   * Construct a path to the API endpoint for this resource.\n   */\n  protected apiEndpoint(): string {\n    return '/' + this.data.type + ('id' in this.data ? '/' + this.data.id : '');\n  }\n\n  protected copyData(): ModelData {\n    return JSON.parse(JSON.stringify(this.data));\n  }\n\n  protected rawRelationship<M extends Model>(relationship: string): undefined | ModelIdentifier;\n  protected rawRelationship<M extends Model[]>(relationship: string): undefined | ModelIdentifier[];\n  protected rawRelationship<_M extends Model | Model[]>(relationship: string): undefined | ModelIdentifier | ModelIdentifier[] {\n    return this.data.relationships?.[relationship]?.data;\n  }\n\n  /**\n   * Generate a function which returns the value of the given attribute.\n   *\n   * @param transform A function to transform the attribute value\n   */\n  static attribute<T>(name: string): () => T;\n  static attribute<T, O = unknown>(name: string, transform: (attr: O) => T): () => T;\n  static attribute<T, O = unknown>(name: string, transform?: (attr: O) => T): () => T {\n    return function (this: Model) {\n      if (transform) {\n        return transform(this.attribute(name));\n      }\n\n      return this.attribute(name);\n    };\n  }\n\n  /**\n   * Generate a function which returns the value of the given has-one\n   * relationship.\n   *\n   * @return false if no information about the\n   *     relationship exists; undefined if the relationship exists but the model\n   *     has not been loaded; or the model if it has been loaded.\n   */\n  static hasOne<M extends Model>(name: string): () => M | false;\n  static hasOne<M extends Model | null>(name: string): () => M | null | false;\n  static hasOne<M extends Model>(name: string): () => M | false {\n    return function (this: Model) {\n      const relationshipData = this.data.relationships?.[name]?.data;\n\n      if (relationshipData && relationshipData instanceof Array) {\n        throw new Error(`Relationship ${name} on model ${this.data.type} is plural, so the hasOne method cannot be used to access it.`);\n      }\n\n      if (relationshipData) {\n        return this.store.getById<M>(relationshipData.type, relationshipData.id) as M;\n      }\n\n      return false;\n    };\n  }\n\n  /**\n   * Generate a function which returns the value of the given has-many\n   * relationship.\n   *\n   * @return false if no information about the relationship\n   *     exists; an array if it does, containing models if they have been\n   *     loaded, and undefined for those that have not.\n   */\n  static hasMany<M extends Model>(name: string): () => (M | undefined)[] | false {\n    return function (this: Model) {\n      const relationshipData = this.data.relationships?.[name]?.data;\n\n      if (relationshipData && !(relationshipData instanceof Array)) {\n        throw new Error(`Relationship ${name} on model ${this.data.type} is singular, so the hasMany method cannot be used to access it.`);\n      }\n\n      if (relationshipData) {\n        return relationshipData.map((data) => this.store.getById<M>(data.type, data.id));\n      }\n\n      return false;\n    };\n  }\n\n  /**\n   * Transform the given value into a Date object.\n   */\n  static transformDate(value: string): Date;\n  static transformDate(value: string | null): Date | null;\n  static transformDate(value: string | undefined): Date | undefined;\n  static transformDate(value: string | null | undefined): Date | null | undefined;\n  static transformDate(value: string | null | undefined): Date | null | undefined {\n    return value != null ? new Date(value) : value;\n  }\n\n  /**\n   * Get a resource identifier object for the given model.\n   */\n  protected static getIdentifier(model: Model): ModelIdentifier;\n  protected static getIdentifier(model?: Model): ModelIdentifier | null {\n    if (!model || !('id' in model.data)) return null;\n\n    return {\n      type: model.data.type,\n      id: model.data.id,\n    };\n  }\n}\n","import Model from '../Model';\n\n/**\n * The `computed` utility creates a function that will cache its output until\n * any of the dependent values are dirty.\n *\n * @param dependentKeys The keys of the dependent values.\n * @param compute The function which computes the value using the\n *     dependent values.\n */\nexport default function computed<T, M = Model>(...args: [...string[], (this: M, ...args: unknown[]) => T]): () => T {\n  const keys = args.slice(0, -1) as string[];\n  const compute = args.slice(-1)[0] as (this: M, ...args: unknown[]) => T;\n\n  const dependentValues: Record<string, unknown> = {};\n  let computedValue: T;\n\n  return function (this: M) {\n    let recompute = false;\n\n    // Read all of the dependent values. If any of them have changed since last\n    // time, then we'll want to recompute our output.\n    keys.forEach((key) => {\n      const attr = (this as Record<string, unknown | (() => unknown)>)[key];\n      const value = typeof attr === 'function' ? attr.call(this) : attr;\n\n      if (dependentValues[key] !== value) {\n        recompute = true;\n        dependentValues[key] = value;\n      }\n    });\n\n    if (recompute) {\n      computedValue = compute.apply(\n        this,\n        keys.map((key) => dependentValues[key])\n      );\n    }\n\n    return computedValue;\n  };\n}\n","/**\n * The `isDark` utility converts a hex color to rgb, and then calculates a YIQ\n * value in order to get the appropriate brightness value. See\n * https://www.w3.org/TR/AERT/#color-contrast for references.\n *\n * A YIQ value >= 128 corresponds to a light color according to the W3C\n * standards, but we use a custom threshold for each light and dark modes\n * to preserve design consistency.\n */\nexport default function isDark(hexcolor: string | null): boolean {\n  // return if hexcolor is undefined or shorter than 4 characters, shortest hex form is #333;\n  // decided against regex hex color validation for performance considerations\n  if (!hexcolor || hexcolor.length < 4) {\n    return false;\n  }\n\n  let hexnumbers = hexcolor.replace('#', '');\n\n  if (hexnumbers.length === 3) {\n    hexnumbers += hexnumbers;\n  }\n\n  const r = parseInt(hexnumbers.slice(0, 2), 16);\n  const g = parseInt(hexnumbers.slice(2, 4), 16);\n  const b = parseInt(hexnumbers.slice(4, 6), 16);\n  const yiq = (r * 299 + g * 587 + b * 114) / 1000;\n\n  const threshold = parseInt(getComputedStyle(document.body).getPropertyValue('--yiq-threshold').trim()) || 128;\n\n  return yiq < threshold;\n}\n","import isDark from '../utils/isDark';\n\nexport default function textContrastClass(hexcolor: string | null | undefined): string {\n  if (!hexcolor) return 'text-contrast--unchanged';\n\n  return isDark(hexcolor) ? 'text-contrast--light' : 'text-contrast--dark';\n}\n","import Tooltip from './Tooltip';\nimport Component, { ComponentAttrs } from '../Component';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport textContrastClass from '../helpers/textContrastClass';\n\nexport interface IBadgeAttrs extends ComponentAttrs {\n  icon: string;\n  type?: string;\n  label?: string;\n  color?: string;\n}\n\n/**\n * The `Badge` component represents a user/discussion badge, indicating some\n * status (e.g. a discussion is stickied, a user is an admin).\n *\n * A badge may have the following special attrs:\n *\n * - `type` The type of badge this is. This will be used to give the badge a\n *   class name of `Badge--{type}`.\n * - `icon` The name of an icon to show inside the badge.\n * - `label`\n *\n * All other attrs will be assigned as attributes on the badge element.\n */\nexport default class Badge<CustomAttrs extends IBadgeAttrs = IBadgeAttrs> extends Component<CustomAttrs> {\n  view() {\n    const { type, icon: iconName, label, color, style = {}, ...attrs } = this.attrs;\n\n    const className = classList('Badge', [type && `Badge--${type}`], attrs.className, textContrastClass(color));\n\n    const iconChild = iconName ? icon(iconName, { className: 'Badge-icon' }) : m.trust('&nbsp;');\n\n    const newStyle = { ...style, '--badge-bg': color };\n\n    const badgeAttrs = {\n      ...attrs,\n      className,\n      style: newStyle,\n    };\n\n    const badgeNode = <div {...badgeAttrs}>{iconChild}</div>;\n\n    // If we don't have a tooltip label, don't render the tooltip component.\n    if (!label) return badgeNode;\n\n    return <Tooltip text={label}>{badgeNode}</Tooltip>;\n  }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\nimport computed from '../utils/computed';\nimport ItemList from '../utils/ItemList';\nimport Badge from '../components/Badge';\nimport Mithril from 'mithril';\nimport Post from './Post';\nimport User from './User';\n\nexport default class Discussion extends Model {\n  title() {\n    return Model.attribute<string>('title').call(this);\n  }\n  slug() {\n    return Model.attribute<string>('slug').call(this);\n  }\n\n  createdAt() {\n    return Model.attribute<Date | undefined, string | undefined>('createdAt', Model.transformDate).call(this);\n  }\n  user() {\n    return Model.hasOne<User | null>('user').call(this);\n  }\n  firstPost() {\n    return Model.hasOne<Post | null>('firstPost').call(this);\n  }\n\n  lastPostedAt() {\n    return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n  }\n  lastPostedUser() {\n    return Model.hasOne<User | null>('lastPostedUser').call(this);\n  }\n  lastPost() {\n    return Model.hasOne<Post | null>('lastPost').call(this);\n  }\n  lastPostNumber() {\n    return Model.attribute<number | null | undefined>('lastPostNumber').call(this);\n  }\n\n  commentCount() {\n    return Model.attribute<number | undefined>('commentCount').call(this);\n  }\n  replyCount() {\n    return computed<number, this>('commentCount', (commentCount) => Math.max(0, ((commentCount as number) ?? 0) - 1)).call(this);\n  }\n  posts() {\n    return Model.hasMany<Post>('posts').call(this);\n  }\n  mostRelevantPost() {\n    return Model.hasOne<Post | null>('mostRelevantPost').call(this);\n  }\n\n  lastReadAt() {\n    return Model.attribute('lastReadAt', Model.transformDate).call(this);\n  }\n  lastReadPostNumber() {\n    return Model.attribute<number | null | undefined>('lastReadPostNumber').call(this);\n  }\n  isUnread() {\n    return computed<boolean, this>('unreadCount', (unreadCount) => !!unreadCount).call(this);\n  }\n  isRead() {\n    return computed<boolean, this>('unreadCount', (unreadCount) => !!(app.session.user && !unreadCount)).call(this);\n  }\n\n  hiddenAt() {\n    return Model.attribute('hiddenAt', Model.transformDate).call(this);\n  }\n  hiddenUser() {\n    return Model.hasOne<User | null>('hiddenUser').call(this);\n  }\n  isHidden() {\n    return computed<boolean, this>('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n  }\n\n  canReply() {\n    return Model.attribute<boolean | undefined>('canReply').call(this);\n  }\n  canRename() {\n    return Model.attribute<boolean | undefined>('canRename').call(this);\n  }\n  canHide() {\n    return Model.attribute<boolean | undefined>('canHide').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n\n  /**\n   * Remove a post from the discussion's posts relationship.\n   */\n  removePost(id: string): void {\n    const posts = this.rawRelationship<Post[]>('posts');\n\n    if (!posts) {\n      return;\n    }\n\n    posts.some((data, i) => {\n      if (id === data.id) {\n        posts.splice(i, 1);\n        return true;\n      }\n\n      return false;\n    });\n  }\n\n  /**\n   * Get the estimated number of unread posts in this discussion for the current\n   * user.\n   */\n  unreadCount(): number {\n    const user = app.session.user;\n\n    if (user && (user.markedAllAsReadAt()?.getTime() ?? 0) < this.lastPostedAt()?.getTime()!) {\n      const unreadCount = Math.max(0, (this.lastPostNumber() ?? 0) - (this.lastReadPostNumber() || 0));\n      // If posts have been deleted, it's possible that the unread count could exceed the\n      // actual post count. As such, we take the min of the two to ensure this isn't an issue.\n      return Math.min(unreadCount, this.commentCount() ?? 0);\n    }\n\n    return 0;\n  }\n\n  /**\n   * Get the Badge components that apply to this discussion.\n   */\n  badges(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.isHidden()) {\n      items.add('hidden', <Badge type=\"hidden\" icon=\"fas fa-trash\" label={app.translator.trans('core.lib.badge.hidden_tooltip')} />);\n    }\n\n    return items;\n  }\n\n  /**\n   * Get a list of all of the post IDs in this discussion.\n   */\n  postIds(): string[] {\n    return this.rawRelationship<Post[]>('posts')?.map((link) => link.id) ?? [];\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Discussion from '../../common/models/Discussion';\nimport ItemList from '../../common/utils/ItemList';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `NotificationList` component displays a list of the logged-in user's\n * notifications, grouped by discussion.\n */\nexport default class NotificationList extends Component {\n  view() {\n    const state = this.attrs.state;\n\n    return (\n      <div className=\"NotificationList\">\n        <div className=\"NotificationList-header\">\n          <h4 className=\"App-titleControl App-titleControl--text\">{app.translator.trans('core.forum.notifications.title')}</h4>\n\n          <div className=\"App-primaryControl\">{this.controlItems().toArray()}</div>\n        </div>\n\n        <div className=\"NotificationList-content\">{this.content(state)}</div>\n      </div>\n    );\n  }\n\n  controlItems() {\n    const items = new ItemList();\n    const state = this.attrs.state;\n\n    items.add(\n      'mark_all_as_read',\n      <Tooltip text={app.translator.trans('core.forum.notifications.mark_all_as_read_tooltip')}>\n        <Button\n          className=\"Button Button--link\"\n          data-container=\".NotificationList\"\n          icon=\"fas fa-check\"\n          title={app.translator.trans('core.forum.notifications.mark_all_as_read_tooltip')}\n          onclick={state.markAllAsRead.bind(state)}\n        />\n      </Tooltip>,\n      70\n    );\n\n    items.add(\n      'delete_all',\n      <Tooltip text={app.translator.trans('core.forum.notifications.delete_all_tooltip')}>\n        <Button\n          className=\"Button Button--link\"\n          data-container=\".NotificationList\"\n          icon=\"fas fa-trash-alt\"\n          title={app.translator.trans('core.forum.notifications.delete_all_tooltip')}\n          onclick={() => {\n            if (confirm(app.translator.trans('core.forum.notifications.delete_all_confirm'))) {\n              state.deleteAll.call(state);\n            }\n          }}\n        />\n      </Tooltip>,\n      50\n    );\n\n    return items;\n  }\n\n  content(state) {\n    if (state.isLoading()) {\n      return <LoadingIndicator className=\"LoadingIndicator--block\" />;\n    }\n\n    if (state.hasItems()) {\n      return state.getPages().map((page) => {\n        const groups = [];\n        const discussions = {};\n\n        page.items.forEach((notification) => {\n          const subject = notification.subject();\n\n          if (typeof subject === 'undefined') return;\n\n          // Get the discussion that this notification is related to. If it's not\n          // directly related to a discussion, it may be related to a post or\n          // other entity which is related to a discussion.\n          let discussion = null;\n          if (subject instanceof Discussion) discussion = subject;\n          else if (subject && subject.discussion) discussion = subject.discussion();\n\n          // If the notification is not related to a discussion directly or\n          // indirectly, then we will assign it to a neutral group.\n          const key = discussion ? discussion.id() : 0;\n          discussions[key] = discussions[key] || { discussion: discussion, notifications: [] };\n          discussions[key].notifications.push(notification);\n\n          if (groups.indexOf(discussions[key]) === -1) {\n            groups.push(discussions[key]);\n          }\n        });\n\n        return groups.map((group) => {\n          const badges = group.discussion && group.discussion.badges().toArray();\n\n          return (\n            <div className=\"NotificationGroup\">\n              {group.discussion ? (\n                <Link className=\"NotificationGroup-header\" href={app.route.discussion(group.discussion)}>\n                  {badges && !!badges.length && <ul className=\"NotificationGroup-badges badges\">{listItems(badges)}</ul>}\n                  <span>{group.discussion.title()}</span>\n                </Link>\n              ) : (\n                <div className=\"NotificationGroup-header\">{app.forum.attribute('title')}</div>\n              )}\n\n              <ul className=\"NotificationGroup-content\">\n                {group.notifications.map((notification) => {\n                  const NotificationComponent = app.notificationComponents[notification.contentType()];\n                  return (\n                    !!NotificationComponent && (\n                      <li>\n                        <NotificationComponent notification={notification} />\n                      </li>\n                    )\n                  );\n                })}\n              </ul>\n            </div>\n          );\n        });\n      });\n    }\n\n    return <div className=\"NotificationList-empty\">{app.translator.trans('core.forum.notifications.empty_text')}</div>;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.$notifications = this.$('.NotificationList-content');\n\n    // If we are on the notifications page, the window will be scrolling and not the $notifications element.\n    this.$scrollParent = this.inPanel() ? this.$notifications : $(window);\n\n    this.boundScrollHandler = this.scrollHandler.bind(this);\n    this.$scrollParent.on('scroll', this.boundScrollHandler);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.$scrollParent.off('scroll', this.boundScrollHandler);\n  }\n\n  scrollHandler() {\n    const state = this.attrs.state;\n\n    // Whole-page scroll events are listened to on `window`, but we need to get the actual\n    // scrollHeight, scrollTop, and clientHeight from the document element.\n    const scrollParent = this.inPanel() ? this.$scrollParent[0] : document.documentElement;\n\n    // On very short screens, the scrollHeight + scrollTop might not reach the clientHeight\n    // by a fraction of a pixel, so we compensate for that.\n    const atBottom = Math.abs(scrollParent.scrollHeight - scrollParent.scrollTop - scrollParent.clientHeight) <= 1;\n\n    if (state.hasNext() && !state.isLoadingNext() && atBottom) {\n      state.loadNext();\n    }\n  }\n\n  /**\n   * If the NotificationList component isn't in a panel (e.g. on NotificationPage when mobile),\n   * we need to listen to scroll events on the window, and get scroll state from the body.\n   */\n  inPanel() {\n    return this.$notifications.css('overflow') === 'auto';\n  }\n}\n","import app from '../../forum/app';\nimport Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';\nimport icon from '../../common/helpers/icon';\nimport classList from '../../common/utils/classList';\nimport NotificationList from './NotificationList';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface INotificationsDropdown extends IDropdownAttrs {}\n\nexport default class NotificationsDropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: INotificationsDropdown) {\n    attrs.className ||= 'NotificationsDropdown';\n    attrs.buttonClassName ||= 'Button Button--flat';\n    attrs.menuClassName ||= 'Dropdown-menu--right';\n    attrs.label ||= extractText(app.translator.trans('core.forum.notifications.tooltip'));\n    attrs.icon ||= 'fas fa-bell';\n\n    // For best a11y support, both `title` and `aria-label` should be used\n    attrs.accessibleToggleLabel ||= extractText(app.translator.trans('core.forum.notifications.toggle_dropdown_accessible_label'));\n\n    super.initAttrs(attrs);\n  }\n\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    const newNotifications = this.getNewCount();\n\n    const vdom = super.getButton(children);\n\n    vdom.attrs.title = this.attrs.label;\n\n    vdom.attrs.className = classList(vdom.attrs.className, [newNotifications && 'new']);\n    vdom.attrs.onclick = this.onclick.bind(this);\n\n    return vdom;\n  }\n\n  getButtonContent(): Mithril.ChildArray {\n    const unread = this.getUnreadCount();\n\n    return [\n      this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : null,\n      unread !== 0 && <span className=\"NotificationsDropdown-unread\">{unread}</span>,\n      <span className=\"Button-label\">{this.attrs.label}</span>,\n    ];\n  }\n\n  getMenu() {\n    return (\n      <div className={classList('Dropdown-menu', this.attrs.menuClassName)} onclick={this.menuClick.bind(this)}>\n        {this.showing && <NotificationList state={this.attrs.state} />}\n      </div>\n    );\n  }\n\n  onclick() {\n    if (app.drawer.isOpen()) {\n      this.goToRoute();\n    } else {\n      this.attrs.state.load();\n    }\n  }\n\n  goToRoute() {\n    m.route.set(app.route('notifications'));\n  }\n\n  getUnreadCount() {\n    return app.session.user!.unreadNotificationCount();\n  }\n\n  getNewCount() {\n    return app.session.user!.newNotificationCount();\n  }\n\n  menuClick(e: MouseEvent) {\n    // Don't close the notifications dropdown if the user is opening a link in a\n    // new tab or window.\n    if (e.shiftKey || e.metaKey || e.ctrlKey || e.button === 1) e.stopPropagation();\n  }\n}\n","type KeyboardEventHandler = (event: KeyboardEvent) => void;\ntype ShouldHandle = (event: KeyboardEvent) => boolean;\n\nenum Keys {\n  Enter = 13,\n  Escape = 27,\n  Space = 32,\n  ArrowUp = 38,\n  ArrowDown = 40,\n  ArrowLeft = 37,\n  ArrowRight = 39,\n  Tab = 9,\n  Backspace = 8,\n}\n\n/**\n * The `KeyboardNavigatable` class manages lists that can be navigated with the\n * keyboard, calling callbacks for each actions.\n *\n * This helper encapsulates the key binding logic, providing a simple fluent\n * API for use.\n */\nexport default class KeyboardNavigatable {\n  /**\n   * Callback to be executed for a specified input.\n   */\n  protected callbacks = new Map<number, KeyboardEventHandler>();\n\n  /**\n   * Callback that determines whether keyboard input should be handled.\n   * By default, always handle keyboard navigation.\n   */\n  protected whenCallback: ShouldHandle = (event: KeyboardEvent) => true;\n\n  /**\n   * Provide a callback to be executed when navigating upwards.\n   *\n   * This will be triggered by the Up key.\n   */\n  onUp(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.ArrowUp, (e) => {\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when navigating downwards.\n   *\n   * This will be triggered by the Down key.\n   */\n  onDown(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.ArrowDown, (e) => {\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the current item is selected..\n   *\n   * This will be triggered by the Return key (and Tab key, if not disabled).\n   */\n  onSelect(callback: KeyboardEventHandler, ignoreTabPress: boolean = false): KeyboardNavigatable {\n    const handler: KeyboardEventHandler = (e) => {\n      e.preventDefault();\n      callback(e);\n    };\n\n    if (!ignoreTabPress) this.callbacks.set(Keys.Tab, handler);\n    this.callbacks.set(Keys.Enter, handler);\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the current item is tabbed into.\n   *\n   * This will be triggered by the Tab key.\n   */\n  onTab(callback: KeyboardEventHandler): KeyboardNavigatable {\n    const handler: KeyboardEventHandler = (e) => {\n      e.preventDefault();\n      callback(e);\n    };\n\n    this.callbacks.set(9, handler);\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the navigation is canceled.\n   *\n   * This will be triggered by the Escape key.\n   */\n  onCancel(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.Escape, (e) => {\n      e.stopPropagation();\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when previous input is removed.\n   *\n   * This will be triggered by the Backspace key.\n   */\n  onRemove(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.Backspace, (e) => {\n      if (e instanceof KeyboardEvent && e.target instanceof HTMLInputElement && e.target.selectionStart === 0 && e.target.selectionEnd === 0) {\n        callback(e);\n        e.preventDefault();\n      }\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback that determines whether keyboard input should be handled.\n   */\n  when(callback: ShouldHandle): KeyboardNavigatable {\n    this.whenCallback = callback;\n\n    return this;\n  }\n\n  /**\n   * Set up the navigation key bindings on the given jQuery element.\n   */\n  bindTo($element: JQuery<HTMLElement>) {\n    // Handle navigation key events on the navigatable element.\n    $element[0].addEventListener('keydown', this.navigate.bind(this));\n  }\n\n  /**\n   * Interpret the given keyboard event as navigation commands.\n   */\n  navigate(event: KeyboardEvent) {\n    // This callback determines whether keyboard should be handled or ignored.\n    if (!this.whenCallback(event)) return;\n\n    const keyCallback = this.callbacks.get(event.which);\n    if (keyCallback) {\n      keyCallback(event);\n    }\n  }\n}\n","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n  try {\n    var i = n[a](c),\n      u = i.value;\n  } catch (n) {\n    return void e(n);\n  }\n  i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n  return function () {\n    var t = this,\n      e = arguments;\n    return new Promise(function (r, o) {\n      var a = n.apply(t, e);\n      function _next(n) {\n        asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n      }\n      function _throw(n) {\n        asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n      }\n      _next(void 0);\n    });\n  };\n}\nexport { _asyncToGenerator as default };","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport highlight from '../../common/helpers/highlight';\nimport Discussion from '../../common/models/Discussion';\nimport Post from '../../common/models/Post';\nimport type Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface DiscussionsSearchItemAttrs extends ComponentAttrs {\n  query: string;\n  discussion: Discussion;\n  mostRelevantPost: Post;\n}\n\nexport default class DiscussionsSearchItem extends Component<DiscussionsSearchItemAttrs> {\n  query!: string;\n  discussion!: Discussion;\n  mostRelevantPost!: Post | null | undefined;\n\n  oninit(vnode: Mithril.Vnode<DiscussionsSearchItemAttrs, this>) {\n    super.oninit(vnode);\n\n    this.query = this.attrs.query;\n    this.discussion = this.attrs.discussion;\n    this.mostRelevantPost = this.attrs.mostRelevantPost;\n  }\n\n  view() {\n    return (\n      <li className=\"DiscussionSearchResult\" data-index={'discussions' + this.discussion.id()}>\n        <Link href={app.route.discussion(this.discussion, (this.mostRelevantPost && this.mostRelevantPost.number()) || 0)}>\n          {this.viewItems().toArray()}\n        </Link>\n      </li>\n    );\n  }\n\n  discussionTitle() {\n    return this.discussion.title();\n  }\n\n  mostRelevantPostContent() {\n    return this.mostRelevantPost?.contentPlain();\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('discussion-title', <div className=\"DiscussionSearchResult-title\">{highlight(this.discussionTitle(), this.query)}</div>, 90);\n\n    !!this.mostRelevantPost &&\n      items.add(\n        'most-relevant',\n        <div className=\"DiscussionSearchResult-excerpt\">{highlight(this.mostRelevantPostContent() ?? '', this.query, 100)}</div>,\n        80\n      );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport LinkButton from '../../common/components/LinkButton';\nimport { SearchSource } from './Search';\nimport type Mithril from 'mithril';\nimport Discussion from '../../common/models/Discussion';\nimport DiscussionsSearchItem from './DiscussionsSearchItem';\n\n/**\n * The `DiscussionsSearchSource` finds and displays discussion search results in\n * the search dropdown.\n */\nexport default class DiscussionsSearchSource implements SearchSource {\n  protected results = new Map<string, Discussion[]>();\n  queryString: string | null = null;\n\n  async search(query: string): Promise<void> {\n    query = query.toLowerCase();\n\n    this.results.set(query, []);\n\n    this.setQueryString(query);\n\n    const params = {\n      filter: { q: this.queryString || query },\n      page: { limit: this.limit() },\n      include: this.includes().join(','),\n    };\n\n    return app.store.find<Discussion[]>('discussions', params).then((results) => {\n      this.results.set(query, results);\n      m.redraw();\n    });\n  }\n\n  view(query: string): Array<Mithril.Vnode> {\n    query = query.toLowerCase();\n\n    this.setQueryString(query);\n\n    const results = (this.results.get(query) || []).map((discussion) => {\n      const mostRelevantPost = discussion.mostRelevantPost();\n\n      return <DiscussionsSearchItem query={query} discussion={discussion} mostRelevantPost={mostRelevantPost} />;\n    }) as Array<Mithril.Vnode>;\n\n    return [\n      <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.discussions_heading')}</li>,\n      <li>\n        <LinkButton icon=\"fas fa-search\" href={app.route('index', { q: this.queryString })}>\n          {app.translator.trans('core.forum.search.all_discussions_button', { query })}\n        </LinkButton>\n      </li>,\n      ...results,\n    ];\n  }\n\n  includes(): string[] {\n    return ['mostRelevantPost'];\n  }\n\n  limit(): number {\n    return 3;\n  }\n\n  queryMutators(): string[] {\n    return [];\n  }\n\n  setQueryString(query: string): void {\n    this.queryString = query + ' ' + this.queryMutators().join(' ');\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport highlight from '../../common/helpers/highlight';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Link from '../../common/components/Link';\nimport { SearchSource } from './Search';\nimport User from '../../common/models/User';\n\n/**\n * The `UsersSearchSource` finds and displays user search results in the search\n * dropdown.\n */\nexport default class UsersSearchResults implements SearchSource {\n  protected results = new Map<string, User[]>();\n\n  async search(query: string): Promise<void> {\n    return app.store\n      .find<User[]>('users', {\n        filter: { q: query },\n        page: { limit: 5 },\n      })\n      .then((results) => {\n        this.results.set(query, results);\n        m.redraw();\n      });\n  }\n\n  view(query: string): Array<Mithril.Vnode> {\n    query = query.toLowerCase();\n\n    const results = (this.results.get(query) || [])\n      .concat(\n        app.store\n          .all<User>('users')\n          .filter((user) => [user.username(), user.displayName()].some((value) => value.toLowerCase().substr(0, query.length) === query))\n      )\n      .filter((e, i, arr) => arr.lastIndexOf(e) === i)\n      .sort((a, b) => a.displayName().localeCompare(b.displayName()));\n\n    if (!results.length) return [];\n\n    return [\n      <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.users_heading')}</li>,\n      ...results.map((user) => {\n        const name = username(user);\n\n        const children = [highlight(name.text as string, query)];\n\n        return (\n          <li className=\"UserSearchResult\" data-index={'users' + user.id()}>\n            <Link href={app.route.user(user)}>\n              {avatar(user)}\n              {{ ...name, text: undefined, children }}\n            </Link>\n          </li>\n        );\n      }),\n    ];\n  }\n}\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\nimport extractText from '../../common/utils/extractText';\nimport KeyboardNavigatable from '../../common/utils/KeyboardNavigatable';\nimport icon from '../../common/helpers/icon';\nimport SearchState from '../states/SearchState';\nimport DiscussionsSearchSource from './DiscussionsSearchSource';\nimport UsersSearchSource from './UsersSearchSource';\nimport { fireDeprecationWarning } from '../../common/helpers/fireDebugWarning';\nimport type Mithril from 'mithril';\n\n/**\n * The `SearchSource` interface defines a section of search results in the\n * search dropdown.\n *\n * Search sources should be registered with the `Search` component class\n * by extending the `sourceItems` method. When the user types a\n * query, each search source will be prompted to load search results via the\n * `search` method. When the dropdown is redrawn, it will be constructed by\n * putting together the output from the `view` method of each source.\n */\nexport interface SearchSource {\n  /**\n   * Make a request to get results for the given query.\n   * The results will be updated internally in the search source, not exposed.\n   */\n  search(query: string): Promise<void>;\n\n  /**\n   * Get an array of virtual <li>s that list the search results for the given\n   * query.\n   */\n  view(query: string): Array<Mithril.Vnode>;\n}\n\nexport interface SearchAttrs extends ComponentAttrs {\n  /** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */\n  state: SearchState;\n}\n\n/**\n * The `Search` component displays a menu of as-you-type results from a variety\n * of sources.\n *\n * The search box will be 'activated' if the app's search state's\n * getInitialSearch() value is a truthy value. If this is the case, an 'x'\n * button will be shown next to the search field, and clicking it will clear the search.\n *\n * ATTRS:\n *\n * - state: SearchState instance.\n */\nexport default class Search<T extends SearchAttrs = SearchAttrs> extends Component<T, SearchState> {\n  /**\n   * The minimum query length before sources are searched.\n   */\n  protected static MIN_SEARCH_LEN = 3;\n\n  /**\n   * Time to wait (in milliseconds) after the user stops typing before triggering a search.\n   */\n  protected static SEARCH_DEBOUNCE_TIME_MS = 250;\n\n  /**\n   * The instance of `SearchState` for this component.\n   */\n  protected searchState!: SearchState;\n\n  /**\n   * The instance of `SearchState` for this component.\n   *\n   * @deprecated Replace with`this.searchState` instead.\n   */\n  // TODO: [Flarum 2.0] Remove this.\n  // @ts-expect-error This is a get accessor, while superclass defines this as a property. This is needed to prevent breaking changes, however.\n  get state() {\n    fireDeprecationWarning('`state` property of the Search component is deprecated', '3212');\n    return this.searchState;\n  }\n  set state(state: SearchState) {\n    // Workaround to prevent triggering deprecation warnings due to Mithril\n    // setting state to undefined when creating components\n    state !== undefined && fireDeprecationWarning('`state` property of the Search component is deprecated', '3212');\n    this.searchState = state;\n  }\n\n  /**\n   * Whether or not the search input has focus.\n   */\n  protected hasFocus = false;\n\n  /**\n   * An array of SearchSources.\n   */\n  protected sources?: SearchSource[];\n\n  /**\n   * The number of sources that are still loading results.\n   */\n  protected loadingSources = 0;\n\n  /**\n   * The index of the currently-selected <li> in the results list. This can be\n   * a unique string (to account for the fact that an item's position may jump\n   * around as new results load), but otherwise it will be numeric (the\n   * sequential position within the list).\n   */\n  protected index: number = 0;\n\n  protected navigator!: KeyboardNavigatable;\n\n  protected searchTimeout?: number;\n\n  private updateMaxHeightHandler?: () => void;\n\n  oninit(vnode: Mithril.Vnode<T, this>) {\n    super.oninit(vnode);\n\n    this.searchState = this.attrs.state;\n  }\n\n  view() {\n    const currentSearch = this.searchState.getInitialSearch();\n\n    // Initialize search sources in the view rather than the constructor so\n    // that we have access to app.forum.\n    if (!this.sources) this.sources = this.sourceItems().toArray();\n\n    // Hide the search view if no sources were loaded\n    if (!this.sources.length) return <div></div>;\n\n    const searchLabel = extractText(app.translator.trans('core.forum.header.search_placeholder'));\n\n    const isActive = !!currentSearch;\n    const shouldShowResults = !!(this.searchState.getValue() && this.hasFocus);\n    const shouldShowClearButton = !!(!this.loadingSources && this.searchState.getValue());\n\n    return (\n      <div\n        role=\"search\"\n        aria-label={app.translator.trans('core.forum.header.search_role_label')}\n        className={classList('Search', {\n          open: this.searchState.getValue() && this.hasFocus,\n          focused: this.hasFocus,\n          active: isActive,\n          loading: !!this.loadingSources,\n        })}\n      >\n        <div className=\"Search-input\">\n          <input\n            aria-label={searchLabel}\n            className=\"FormControl\"\n            type=\"search\"\n            placeholder={searchLabel}\n            value={this.searchState.getValue()}\n            oninput={(e: InputEvent) => this.searchState.setValue((e?.target as HTMLInputElement)?.value)}\n            onfocus={() => (this.hasFocus = true)}\n            onblur={() => (this.hasFocus = false)}\n          />\n          {!!this.loadingSources && <LoadingIndicator size=\"small\" display=\"inline\" containerClassName=\"Button Button--icon Button--link\" />}\n          {shouldShowClearButton && (\n            <button\n              className=\"Search-clear Button Button--icon Button--link\"\n              onclick={this.clear.bind(this)}\n              aria-label={app.translator.trans('core.forum.header.search_clear_button_accessible_label')}\n              type=\"button\"\n            >\n              {icon('fas fa-times-circle')}\n            </button>\n          )}\n        </div>\n        <ul\n          className=\"Dropdown-menu Search-results\"\n          aria-hidden={!shouldShowResults || undefined}\n          aria-live={shouldShowResults ? 'polite' : undefined}\n        >\n          {shouldShowResults && this.sources.map((source) => source.view(this.searchState.getValue()))}\n        </ul>\n      </div>\n    );\n  }\n\n  updateMaxHeight() {\n    // Since extensions might add elements above the search box on mobile,\n    // we need to calculate and set the max height dynamically.\n    const resultsElementMargin = 14;\n    const maxHeight =\n      window.innerHeight - this.element.querySelector('.Search-input>.FormControl')!.getBoundingClientRect().bottom - resultsElementMargin;\n\n    this.element.querySelector<HTMLElement>('.Search-results')?.style?.setProperty('max-height', `${maxHeight}px`);\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<T, this>) {\n    super.onupdate(vnode);\n\n    // Highlight the item that is currently selected.\n    this.setIndex(this.getCurrentNumericIndex());\n\n    // If there are no sources, the search view is not shown.\n    if (!this.sources?.length) return;\n\n    this.updateMaxHeight();\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<T, this>) {\n    super.oncreate(vnode);\n\n    // If there are no sources, we shouldn't initialize logic for\n    // search elements, as they will not be shown.\n    if (!this.sources?.length) return;\n\n    const search = this;\n    const state = this.searchState;\n\n    // Highlight the item that is currently selected.\n    this.setIndex(this.getCurrentNumericIndex());\n\n    this.$('.Search-results')\n      .on('mousedown', (e) => e.preventDefault())\n      .on('click', () => this.$('input').trigger('blur'))\n\n      // Whenever the mouse is hovered over a search result, highlight it.\n      .on('mouseenter', '> li:not(.Dropdown-header)', function () {\n        search.setIndex(search.selectableItems().index(this));\n      });\n\n    const $input = this.$('input') as JQuery<HTMLInputElement>;\n\n    this.navigator = new KeyboardNavigatable();\n    this.navigator\n      .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n      .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n      .onSelect(this.selectResult.bind(this), true)\n      .onCancel(this.clear.bind(this))\n      .bindTo($input);\n\n    // Handle input key events on the search input, triggering results to load.\n    $input\n      .on('input focus', function () {\n        const query = this.value.toLowerCase();\n\n        if (!query) return;\n\n        if (search.searchTimeout) clearTimeout(search.searchTimeout);\n        search.searchTimeout = window.setTimeout(() => {\n          if (state.isCached(query)) return;\n\n          if (query.length >= (search.constructor as typeof Search).MIN_SEARCH_LEN) {\n            search.sources?.map((source) => {\n              if (!source.search) return;\n\n              search.loadingSources++;\n\n              source.search(query).then(() => {\n                search.loadingSources = Math.max(0, search.loadingSources - 1);\n                m.redraw();\n              });\n            });\n          }\n\n          state.cache(query);\n          m.redraw();\n        }, (search.constructor as typeof Search).SEARCH_DEBOUNCE_TIME_MS);\n      })\n\n      .on('focus', function () {\n        $(this)\n          .one('mouseup', (e) => e.preventDefault())\n          .trigger('select');\n      });\n\n    this.updateMaxHeightHandler = this.updateMaxHeight.bind(this);\n    window.addEventListener('resize', this.updateMaxHeightHandler);\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<T, this>) {\n    super.onremove(vnode);\n\n    if (this.updateMaxHeightHandler) {\n      window.removeEventListener('resize', this.updateMaxHeightHandler);\n    }\n  }\n\n  /**\n   * Navigate to the currently selected search result and close the list.\n   */\n  selectResult() {\n    if (this.searchTimeout) clearTimeout(this.searchTimeout);\n\n    this.loadingSources = 0;\n\n    const selectedUrl = this.getItem(this.index).find('a').attr('href');\n    if (this.searchState.getValue() && selectedUrl) {\n      m.route.set(selectedUrl);\n    } else {\n      this.clear();\n    }\n\n    this.$('input').blur();\n  }\n\n  /**\n   * Clear the search\n   */\n  clear() {\n    this.searchState.clear();\n  }\n\n  /**\n   * Build an item list of SearchSources.\n   */\n  sourceItems(): ItemList<SearchSource> {\n    const items = new ItemList<SearchSource>();\n\n    if (app.forum.attribute('canViewForum')) items.add('discussions', new DiscussionsSearchSource());\n    if (app.forum.attribute('canSearchUsers')) items.add('users', new UsersSearchSource());\n\n    return items;\n  }\n\n  /**\n   * Get all of the search result items that are selectable.\n   */\n  selectableItems(): JQuery {\n    return this.$('.Search-results > li:not(.Dropdown-header)');\n  }\n\n  /**\n   * Get the position of the currently selected search result item.\n   * Returns zero if not found.\n   */\n  getCurrentNumericIndex(): number {\n    return Math.max(0, this.selectableItems().index(this.getItem(this.index)));\n  }\n\n  /**\n   * Get the <li> in the search results with the given index (numeric or named).\n   */\n  getItem(index: number): JQuery {\n    const $items = this.selectableItems();\n    let $item = $items.filter(`[data-index=\"${index}\"]`);\n\n    if (!$item.length) {\n      $item = $items.eq(index);\n    }\n\n    return $item;\n  }\n\n  /**\n   * Set the currently-selected search result item to the one with the given\n   * index.\n   */\n  setIndex(index: number, scrollToItem: boolean = false) {\n    const $items = this.selectableItems();\n    const $dropdown = $items.parent();\n\n    let fixedIndex = index;\n    if (index < 0) {\n      fixedIndex = $items.length - 1;\n    } else if (index >= $items.length) {\n      fixedIndex = 0;\n    }\n\n    const $item = $items.removeClass('active').eq(fixedIndex).addClass('active');\n\n    this.index = parseInt($item.attr('data-index') as string) || fixedIndex;\n\n    if (scrollToItem) {\n      const dropdownScroll = $dropdown.scrollTop()!;\n      const dropdownTop = $dropdown.offset()!.top;\n      const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;\n      const itemTop = $item.offset()!.top;\n      const itemBottom = itemTop + $item.outerHeight()!;\n\n      let scrollTop;\n      if (itemTop < dropdownTop) {\n        scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n      } else if (itemBottom > dropdownBottom) {\n        scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n      }\n\n      if (typeof scrollTop !== 'undefined') {\n        $dropdown.stop(true).animate({ scrollTop }, 100);\n      }\n    }\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Button from '../../common/components/Button';\nimport LogInModal from './LogInModal';\nimport SignUpModal from './SignUpModal';\nimport SessionDropdown from './SessionDropdown';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport NotificationsDropdown from './NotificationsDropdown';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport Search from '../components/Search';\n\n/**\n * The `HeaderSecondary` component displays secondary header controls, such as\n * the search box and the user menu. On the default skin, these are shown on the\n * right side of the header.\n */\nexport default class HeaderSecondary extends Component {\n  view() {\n    return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n  }\n\n  /**\n   * Build an item list for the controls.\n   *\n   * @return {ItemList}\n   */\n  items() {\n    const items = new ItemList();\n\n    items.add('search', <Search state={app.search} />, 30);\n\n    if (app.forum.attribute('showLanguageSelector') && Object.keys(app.data.locales).length > 1) {\n      const locales = [];\n\n      for (const locale in app.data.locales) {\n        locales.push(\n          <Button\n            active={app.data.locale === locale}\n            icon={app.data.locale === locale ? 'fas fa-check' : true}\n            onclick={() => {\n              if (app.session.user) {\n                app.session.user.savePreferences({ locale }).then(() => window.location.reload());\n              } else {\n                document.cookie = `locale=${locale}; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT`;\n                window.location.reload();\n              }\n            }}\n          >\n            {app.data.locales[locale]}\n          </Button>\n        );\n      }\n\n      items.add(\n        'locale',\n        <SelectDropdown\n          buttonClassName=\"Button Button--link\"\n          accessibleToggleLabel={app.translator.trans('core.forum.header.locale_dropdown_accessible_label')}\n        >\n          {locales}\n        </SelectDropdown>,\n        20\n      );\n    }\n\n    if (app.session.user) {\n      items.add('notifications', <NotificationsDropdown state={app.notifications} />, 10);\n      items.add('session', <SessionDropdown />, 0);\n    } else {\n      if (app.forum.attribute('allowSignUp')) {\n        items.add(\n          'signUp',\n          <Button className=\"Button Button--link\" onclick={() => app.modal.show(SignUpModal)}>\n            {app.translator.trans('core.forum.header.sign_up_link')}\n          </Button>,\n          10\n        );\n      }\n\n      items.add(\n        'logIn',\n        <Button className=\"Button Button--link\" onclick={() => app.modal.show(LogInModal)}>\n          {app.translator.trans('core.forum.header.log_in_link')}\n        </Button>,\n        0\n      );\n    }\n\n    return items;\n  }\n}\n","import Button from '../../common/components/Button';\n\n/**\n * The `ComposerButton` component displays a button suitable for the composer\n * controls.\n */\nexport default class ComposerButton extends Button {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = attrs.className || 'Button Button--icon Button--link';\n  }\n}\n","import app from '../../forum/app';\nimport subclassOf from '../../common/utils/subclassOf';\nimport Stream from '../../common/utils/Stream';\nimport ReplyComposer from '../components/ReplyComposer';\n\nclass ComposerState {\n  constructor() {\n    /**\n     * The composer's current position.\n     *\n     * @type {ComposerState.Position}\n     */\n    this.position = ComposerState.Position.HIDDEN;\n\n    /**\n     * The composer's intended height, which can be modified by the user\n     * (by dragging the composer handle).\n     *\n     * @type {number}\n     */\n    this.height = null;\n\n    /**\n     * The dynamic component being shown inside the composer.\n     *\n     * @type {Object}\n     */\n    this.body = { attrs: {} };\n\n    /**\n     * A reference to the text editor that allows text manipulation.\n     *\n     * @type {import('../../common/utils/EditorDriverInterface')|null}\n     */\n    this.editor = null;\n\n    this.clear();\n  }\n\n  /**\n   * Load a content component into the composer.\n   *\n   * @param {typeof import('../components/ComposerBody').default} componentClass\n   */\n  load(componentClass, attrs) {\n    const body = { componentClass, attrs };\n\n    if (this.preventExit()) return;\n\n    // If we load a similar component into the composer, then Mithril will be\n    // able to diff the old/new contents and some DOM-related state from the\n    // old composer will remain. To prevent this from happening, we clear the\n    // component and force a redraw, so that the new component will be working\n    // on a blank slate.\n    if (this.isVisible()) {\n      this.clear();\n      m.redraw.sync();\n    }\n\n    this.body = body;\n  }\n\n  /**\n   * Clear the composer's content component.\n   */\n  clear() {\n    this.position = ComposerState.Position.HIDDEN;\n    this.body = { attrs: {} };\n    this.onExit = null;\n\n    this.fields = {\n      content: Stream(''),\n    };\n\n    if (this.editor) {\n      this.editor.destroy();\n    }\n    this.editor = null;\n  }\n\n  /**\n   * Show the composer.\n   */\n  show() {\n    if (this.position === ComposerState.Position.NORMAL || this.position === ComposerState.Position.FULLSCREEN) return;\n\n    this.position = ComposerState.Position.NORMAL;\n    m.redraw.sync();\n  }\n\n  /**\n   * Close the composer.\n   */\n  hide() {\n    this.clear();\n    m.redraw();\n  }\n\n  /**\n   * Confirm with the user so they don't lose their content, then close the\n   * composer.\n   */\n  close() {\n    if (this.preventExit()) return;\n\n    this.hide();\n  }\n\n  /**\n   * Minimize the composer. Has no effect if the composer is hidden.\n   */\n  minimize() {\n    if (!this.isVisible()) return;\n\n    this.position = ComposerState.Position.MINIMIZED;\n    m.redraw();\n  }\n\n  /**\n   * Take the composer into fullscreen mode. Has no effect if the composer is\n   * hidden.\n   */\n  fullScreen() {\n    if (!this.isVisible()) return;\n\n    this.position = ComposerState.Position.FULLSCREEN;\n    m.redraw();\n  }\n\n  /**\n   * Exit fullscreen mode.\n   */\n  exitFullScreen() {\n    if (this.position !== ComposerState.Position.FULLSCREEN) return;\n\n    this.position = ComposerState.Position.NORMAL;\n    m.redraw();\n  }\n\n  /**\n   * Determine whether the body matches the given component class and data.\n   *\n   * @param {object} type The component class to check against. Subclasses are accepted as well.\n   * @param {object} data\n   * @return {boolean}\n   */\n  bodyMatches(type, data = {}) {\n    // Fail early when the body is of a different type\n    if (!subclassOf(this.body.componentClass, type)) return false;\n\n    // Now that the type is known to be correct, we loop through the provided\n    // data to see whether it matches the data in the attributes for the body.\n    return Object.keys(data).every((key) => this.body.attrs[key] === data[key]);\n  }\n\n  /**\n   * Determine whether or not the Composer is visible.\n   *\n   * True when the composer is displayed on the screen and has a body component.\n   * It could be open in \"normal\" or full-screen mode, or even minimized.\n   *\n   * @returns {boolean}\n   */\n  isVisible() {\n    return this.position !== ComposerState.Position.HIDDEN;\n  }\n\n  /**\n   * Determine whether or not the Composer is covering the screen.\n   *\n   * This will be true if the Composer is in full-screen mode on desktop,\n   * or if we are on a mobile device, where we always consider the composer as full-screen..\n   *\n   * @return {boolean}\n   */\n  isFullScreen() {\n    return this.position === ComposerState.Position.FULLSCREEN || app.screen() === 'phone';\n  }\n\n  /**\n   * Check whether or not the user is currently composing a reply to a\n   * discussion.\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @return {boolean}\n   */\n  composingReplyTo(discussion) {\n    return this.isVisible() && this.bodyMatches(ReplyComposer, { discussion });\n  }\n\n  /**\n   * Confirm with the user that they want to close the composer and lose their\n   * content.\n   *\n   * @return {boolean} Whether or not the exit was cancelled.\n   */\n  preventExit() {\n    if (!this.isVisible()) return;\n    if (!this.onExit) return;\n\n    if (this.onExit.callback()) {\n      return !confirm(this.onExit.message);\n    }\n  }\n\n  /**\n   * Configure when / what to ask the user before closing the composer.\n   *\n   * The provided callback will be used to determine whether asking for\n   * confirmation is necessary. If the callback returns true at the time of\n   * closing, the provided text will be shown in a standard confirmation dialog.\n   *\n   * @param {() => boolean} callback\n   * @param {string} message\n   */\n  preventClosingWhen(callback, message) {\n    this.onExit = { callback, message };\n  }\n\n  /**\n   * Minimum height of the Composer.\n   * @returns {number}\n   */\n  minimumHeight() {\n    return 200;\n  }\n\n  /**\n   * Maxmimum height of the Composer.\n   * @returns {number}\n   */\n  maximumHeight() {\n    return $(window).height() - $('#header').outerHeight();\n  }\n\n  /**\n   * Computed the composer's current height, based on the intended height, and\n   * the composer's current state. This will be applied to the composer\n   * content's DOM element.\n   * @returns {number | string}\n   */\n  computedHeight() {\n    // If the composer is minimized, then we don't want to set a height; we'll\n    // let the CSS decide how high it is. If it's fullscreen, then we need to\n    // make it as high as the window.\n    if (this.position === ComposerState.Position.MINIMIZED) {\n      return '';\n    } else if (this.position === ComposerState.Position.FULLSCREEN) {\n      return $(window).height();\n    }\n\n    // Otherwise, if it's normal or hidden, then we use the intended height.\n    // We don't let the composer get too small or too big, though.\n    return Math.max(this.minimumHeight(), Math.min(this.height, this.maximumHeight()));\n  }\n}\n\nComposerState.Position = {\n  HIDDEN: 'hidden',\n  NORMAL: 'normal',\n  MINIMIZED: 'minimized',\n  FULLSCREEN: 'fullScreen',\n};\n\nexport default ComposerState;\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport ComposerButton from './ComposerButton';\nimport listItems from '../../common/helpers/listItems';\nimport classList from '../../common/utils/classList';\nimport ComposerState from '../states/ComposerState';\n\n/**\n * The `Composer` component displays the composer. It can be loaded with a\n * content component with `load` and then its position/state can be altered with\n * `show`, `hide`, `close`, `minimize`, `fullScreen`, and `exitFullScreen`.\n */\nexport default class Composer extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * The composer's \"state\".\n     *\n     * @type {ComposerState}\n     */\n    this.state = this.attrs.state;\n\n    /**\n     * Whether or not the composer currently has focus.\n     *\n     * @type {Boolean}\n     */\n    this.active = false;\n\n    // Store the initial position so that we can trigger animations correctly.\n    this.prevPosition = this.state.position;\n  }\n\n  view() {\n    const body = this.state.body;\n    const classes = {\n      normal: this.state.position === ComposerState.Position.NORMAL,\n      minimized: this.state.position === ComposerState.Position.MINIMIZED,\n      fullScreen: this.state.position === ComposerState.Position.FULLSCREEN,\n      active: this.active,\n      visible: this.state.isVisible(),\n    };\n\n    // Set up a handler so that clicks on the content will show the composer.\n    const showIfMinimized = this.state.position === ComposerState.Position.MINIMIZED ? this.state.show.bind(this.state) : undefined;\n\n    const ComposerBody = body.componentClass;\n\n    return (\n      <div className={'Composer ' + classList(classes)}>\n        <div className=\"Composer-handle\" oncreate={this.configHandle.bind(this)} />\n        <ul className=\"Composer-controls\">{listItems(this.controlItems().toArray())}</ul>\n        <div className=\"Composer-content\" onclick={showIfMinimized}>\n          {ComposerBody && <ComposerBody {...body.attrs} composer={this.state} disabled={classes.minimized} />}\n        </div>\n      </div>\n    );\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    if (this.state.position === this.prevPosition) {\n      // Set the height of the Composer element and its contents on each redraw,\n      // so that they do not lose it if their DOM elements are recreated.\n      this.updateHeight();\n    } else {\n      this.animatePositionChange();\n\n      this.prevPosition = this.state.position;\n    }\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.initializeHeight();\n    this.$().hide().css('bottom', -this.state.computedHeight());\n\n    // Whenever any of the inputs inside the composer are have focus, we want to\n    // add a class to the composer to draw attention to it.\n    this.$().on('focus blur', ':input,.TextEditor-editorContainer', (e) => {\n      this.active = e.type === 'focusin';\n      m.redraw();\n    });\n\n    // When the escape key is pressed on any inputs, close the composer.\n    this.$().on('keydown', ':input,.TextEditor-editorContainer', 'esc', () => this.state.close());\n\n    this.handlers = {};\n\n    $(window)\n      .on('resize', (this.handlers.onresize = this.updateHeight.bind(this)))\n      .resize();\n\n    $(document)\n      .on('mousemove', (this.handlers.onmousemove = this.onmousemove.bind(this)))\n      .on('mouseup', (this.handlers.onmouseup = this.onmouseup.bind(this)));\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('resize', this.handlers.onresize);\n\n    $(document).off('mousemove', this.handlers.onmousemove).off('mouseup', this.handlers.onmouseup);\n  }\n\n  /**\n   * Add the necessary event handlers to the composer's handle so that it can\n   * be used to resize the composer.\n   */\n  configHandle(vnode) {\n    const composer = this;\n\n    $(vnode.dom)\n      .css('cursor', 'row-resize')\n      .bind('dragstart mousedown', (e) => e.preventDefault())\n      .mousedown(function (e) {\n        composer.mouseStart = e.clientY;\n        composer.heightStart = composer.$().height();\n        composer.handle = $(this);\n        $('body').css('cursor', 'row-resize');\n      });\n  }\n\n  /**\n   * Resize the composer according to mouse movement.\n   *\n   * @param {MouseEvent} e\n   */\n  onmousemove(e) {\n    if (!this.handle) return;\n\n    // Work out how much the mouse has been moved, and set the height\n    // relative to the old one based on that. Then update the content's\n    // height so that it fills the height of the composer, and update the\n    // body's padding.\n    const deltaPixels = this.mouseStart - e.clientY;\n    this.changeHeight(this.heightStart + deltaPixels);\n\n    // Update the body's padding-bottom so that no content on the page will ever\n    // get permanently hidden behind the composer. If the user is already\n    // scrolled to the bottom of the page, then we will keep them scrolled to\n    // the bottom after the padding has been updated.\n    const scrollTop = $(window).scrollTop();\n    const anchorToBottom = scrollTop > 0 && scrollTop + $(window).height() >= $(document).height();\n    this.updateBodyPadding(anchorToBottom);\n  }\n\n  /**\n   * Finish resizing the composer when the mouse is released.\n   */\n  onmouseup() {\n    if (!this.handle) return;\n\n    this.handle = null;\n    $('body').css('cursor', '');\n  }\n\n  /**\n   * Draw focus to the first focusable content element (the text editor).\n   */\n  focus() {\n    this.$('.Composer-content :input:enabled:visible, .TextEditor-editor').first().focus();\n  }\n\n  /**\n   * Update the DOM to reflect the composer's current height. This involves\n   * setting the height of the composer's root element, and adjusting the height\n   * of any flexible elements inside the composer's body.\n   */\n  updateHeight() {\n    const height = this.state.computedHeight();\n    const $flexible = this.$('.Composer-flexible');\n\n    this.$().height(height);\n\n    if ($flexible.length) {\n      const headerHeight = $flexible.offset().top - this.$().offset().top;\n      const paddingBottom = parseInt($flexible.css('padding-bottom'), 10);\n      const footerHeight = this.$('.Composer-footer').outerHeight(true);\n\n      $flexible.height(this.$().outerHeight() - headerHeight - paddingBottom - footerHeight);\n    }\n  }\n\n  /**\n   * Update the amount of padding-bottom on the body so that the page's\n   * content will still be visible above the composer when the page is\n   * scrolled right to the bottom.\n   */\n  updateBodyPadding() {\n    const visible =\n      this.state.position !== ComposerState.Position.HIDDEN && this.state.position !== ComposerState.Position.MINIMIZED && app.screen() !== 'phone';\n\n    const paddingBottom = visible ? this.state.computedHeight() - parseInt($('#app').css('padding-bottom'), 10) : 0;\n\n    $('#content').css({ paddingBottom });\n  }\n\n  /**\n   * Trigger the right animation depending on the desired new position.\n   */\n  animatePositionChange() {\n    // When exiting full-screen mode: focus content\n    if (this.prevPosition === ComposerState.Position.FULLSCREEN && this.state.position === ComposerState.Position.NORMAL) {\n      this.focus();\n      return;\n    }\n\n    switch (this.state.position) {\n      case ComposerState.Position.HIDDEN:\n        return this.hide();\n      case ComposerState.Position.MINIMIZED:\n        return this.minimize();\n      case ComposerState.Position.FULLSCREEN:\n        return this.focus();\n      case ComposerState.Position.NORMAL:\n        return this.show();\n    }\n  }\n\n  /**\n   * Animate the Composer into the new position by changing the height.\n   */\n  animateHeightChange() {\n    const $composer = this.$().stop(true);\n    const oldHeight = $composer.outerHeight();\n    const scrollTop = $(window).scrollTop();\n\n    $composer.show();\n    this.updateHeight();\n\n    const newHeight = $composer.outerHeight();\n\n    if (this.prevPosition === ComposerState.Position.HIDDEN) {\n      $composer.css({ bottom: -newHeight, height: newHeight });\n    } else {\n      $composer.css({ height: oldHeight });\n    }\n\n    const animation = $composer.animate({ bottom: 0, height: newHeight }, 'fast').promise();\n\n    this.updateBodyPadding();\n    $(window).scrollTop(scrollTop);\n    return animation;\n  }\n\n  /**\n   * Show the Composer backdrop.\n   */\n  showBackdrop() {\n    this.$backdrop = $('<div/>').addClass('composer-backdrop').appendTo('body');\n  }\n\n  /**\n   * Hide the Composer backdrop.\n   */\n  hideBackdrop() {\n    if (this.$backdrop) this.$backdrop.remove();\n  }\n\n  /**\n   * Animate the composer sliding up from the bottom to take its normal height.\n   *\n   * @private\n   */\n  show() {\n    this.animateHeightChange().then(() => this.focus());\n\n    if (app.screen() === 'phone') {\n      // On safari fixed position doesn't properly work on mobile,\n      // So we use absolute and set the top value.\n      // https://github.com/flarum/core/issues/2652\n\n      // Due to another safari bug, `scrollTop` is unreliable when\n      // at the very bottom of the page AND opening the composer.\n      // So we fallback to a calculated version of scrollTop.\n      // https://github.com/flarum/core/issues/2683\n      const scrollElement = document.documentElement;\n      const topOfViewport = Math.min(scrollElement.scrollTop, scrollElement.scrollHeight - scrollElement.clientHeight);\n      this.$().css('top', $('.App').is('.mobile-safari') ? topOfViewport : 0);\n      this.showBackdrop();\n    }\n  }\n\n  /**\n   * Animate closing the composer.\n   *\n   * @private\n   */\n  hide() {\n    const $composer = this.$();\n\n    // Animate the composer sliding down off the bottom edge of the viewport.\n    // Only when the animation is completed, update other elements on the page.\n    $composer.stop(true).animate({ bottom: -$composer.height() }, 'fast', () => {\n      $composer.hide();\n      this.hideBackdrop();\n      this.updateBodyPadding();\n    });\n  }\n\n  /**\n   * Shrink the composer until only its title is visible.\n   *\n   * @private\n   */\n  minimize() {\n    this.animateHeightChange();\n\n    this.$().css('top', 'auto');\n    this.hideBackdrop();\n  }\n\n  /**\n   * Build an item list for the composer's controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    if (this.state.position === ComposerState.Position.FULLSCREEN) {\n      items.add(\n        'exitFullScreen',\n        <ComposerButton\n          icon=\"fas fa-compress\"\n          title={app.translator.trans('core.forum.composer.exit_full_screen_tooltip')}\n          onclick={this.state.exitFullScreen.bind(this.state)}\n        />\n      );\n    } else {\n      if (this.state.position !== ComposerState.Position.MINIMIZED) {\n        items.add(\n          'minimize',\n          <ComposerButton\n            icon=\"fas fa-minus minimize\"\n            title={app.translator.trans('core.forum.composer.minimize_tooltip')}\n            onclick={this.state.minimize.bind(this.state)}\n            itemClassName=\"App-backControl\"\n          />\n        );\n\n        items.add(\n          'fullScreen',\n          <ComposerButton\n            icon=\"fas fa-expand\"\n            title={app.translator.trans('core.forum.composer.full_screen_tooltip')}\n            onclick={this.state.fullScreen.bind(this.state)}\n          />\n        );\n      }\n\n      items.add(\n        'close',\n        <ComposerButton\n          icon=\"fas fa-times\"\n          title={app.translator.trans('core.forum.composer.close_tooltip')}\n          onclick={this.state.close.bind(this.state)}\n        />\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Initialize default Composer height.\n   */\n  initializeHeight() {\n    this.state.height = localStorage.getItem('composerHeight');\n\n    if (!this.state.height) {\n      this.state.height = this.defaultHeight();\n    }\n  }\n\n  /**\n   * Default height of the Composer in case none is saved.\n   * @returns {number}\n   */\n  defaultHeight() {\n    return this.$().height();\n  }\n\n  /**\n   * Save a new Composer height and update the DOM.\n   * @param {number} height\n   */\n  changeHeight(height) {\n    this.state.height = height;\n    this.updateHeight();\n\n    localStorage.setItem('composerHeight', this.state.height);\n  }\n}\n","import app from '../../forum/app';\nimport type NotificationModel from '../../common/models/Notification';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport icon from '../../common/helpers/icon';\nimport humanTime from '../../common/helpers/humanTime';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport classList from '../../common/utils/classList';\nimport type Mithril from 'mithril';\n\nexport interface INotificationAttrs extends ComponentAttrs {\n  notification: NotificationModel;\n}\n\n// TODO [Flarum 2.0]: Remove `?.` from abstract function calls.\n\n/**\n * The `Notification` component abstract displays a single notification.\n * Subclasses should implement the `icon`, `href`, and `content` methods.\n */\nexport default abstract class Notification<CustomAttrs extends INotificationAttrs = INotificationAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const notification = this.attrs.notification;\n    const href = this.href?.() ?? '';\n\n    const fromUser = notification.fromUser();\n\n    return (\n      <Link\n        className={classList('Notification', `Notification--${notification.contentType()}`, [!notification.isRead() && 'unread'])}\n        href={href}\n        external={href.includes('://')}\n        onclick={this.markAsRead.bind(this)}\n      >\n        {avatar(fromUser || null)}\n        {icon(this.icon?.(), { className: 'Notification-icon' })}\n        <span className=\"Notification-title\">\n          <span className=\"Notification-content\">{this.content?.()}</span>\n          <span className=\"Notification-title-spring\" />\n          {humanTime(notification.createdAt())}\n        </span>\n        {!notification.isRead() && (\n          <Button\n            className=\"Notification-action Button Button--link\"\n            icon=\"fas fa-check\"\n            title={app.translator.trans('core.forum.notifications.mark_as_read_tooltip')}\n            onclick={(e: Event) => {\n              e.preventDefault();\n              e.stopPropagation();\n\n              this.markAsRead();\n            }}\n          />\n        )}\n        <div className=\"Notification-excerpt\">{this.excerpt?.()}</div>\n      </Link>\n    );\n  }\n\n  /**\n   * Get the name of the icon that should be displayed in the notification.\n   */\n  abstract icon(): string;\n\n  /**\n   * Get the URL that the notification should link to.\n   */\n  abstract href(): string;\n\n  /**\n   * Get the content of the notification.\n   */\n  abstract content(): Mithril.Children;\n\n  /**\n   * Get the excerpt of the notification.\n   */\n  abstract excerpt(): Mithril.Children;\n\n  /**\n   * Mark the notification as read.\n   */\n  markAsRead() {\n    if (this.attrs.notification.isRead()) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: (app.session.user.unreadNotificationCount() ?? 1) - 1 });\n\n    this.attrs.notification.save({ isRead: true });\n  }\n}\n","import type Discussion from '../../common/models/Discussion';\nimport app from '../../forum/app';\nimport Notification from './Notification';\n\ninterface DiscussionRenamedContent {\n  postNumber: number;\n}\n\n/**\n * The `DiscussionRenamedNotification` component displays a notification which\n * indicates that a discussion has had its title changed.\n */\nexport default class DiscussionRenamedNotification extends Notification {\n  icon() {\n    return 'fas fa-pencil-alt';\n  }\n\n  href() {\n    const notification = this.attrs.notification;\n    const discussion = notification.subject();\n\n    if (!discussion) {\n      return '#';\n    }\n\n    return app.route.discussion(discussion as Discussion, notification.content<DiscussionRenamedContent>().postNumber);\n  }\n\n  content() {\n    return app.translator.trans('core.forum.notifications.discussion_renamed_text', { user: this.attrs.notification.fromUser() });\n  }\n\n  excerpt() {\n    return null;\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport icon from '../../common/helpers/icon';\n\nfunction minimizeComposerIfFullScreen(e) {\n  if (app.composer.isFullScreen()) {\n    app.composer.minimize();\n    e.stopPropagation();\n  }\n}\n\n/**\n * The `EditPostComposer` component displays the composer content for editing a\n * post. It sets the initial content to the content of the post that is being\n * edited, and adds a header control to indicate which post is being edited.\n *\n * ### Attrs\n *\n * - All of the attrs for ComposerBody\n * - `post`\n */\nexport default class EditPostComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_edit.submit_button');\n    attrs.confirmExit = attrs.confirmExit || app.translator.trans('core.forum.composer_edit.discard_confirmation');\n    attrs.originalContent = attrs.originalContent || attrs.post.content();\n    attrs.user = attrs.user || attrs.post.user();\n\n    attrs.post.editedContent = attrs.originalContent;\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n    const post = this.attrs.post;\n\n    items.add(\n      'title',\n      <h3>\n        {icon('fas fa-pencil-alt')}{' '}\n        <Link href={app.route.discussion(post.discussion(), post.number())} onclick={minimizeComposerIfFullScreen}>\n          {app.translator.trans('core.forum.composer_edit.post_link', { number: post.number(), discussion: post.discussion().title() })}\n        </Link>\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Jump to the preview when triggered by the text editor.\n   */\n  jumpToPreview(e) {\n    minimizeComposerIfFullScreen(e);\n\n    m.route.set(app.route.post(this.attrs.post));\n  }\n\n  /**\n   * Get the data to submit to the server when the post is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      content: this.composer.fields.content(),\n    };\n  }\n\n  onsubmit() {\n    const discussion = this.attrs.post.discussion();\n\n    this.loading = true;\n\n    const data = this.data();\n\n    this.attrs.post.save(data).then((post) => {\n      // If we're currently viewing the discussion which this edit was made\n      // in, then we can scroll to the post.\n      if (app.viewingDiscussion(discussion)) {\n        app.current.get('stream').goToNumber(post.number());\n      } else {\n        // Otherwise, we'll create an alert message to inform the user that\n        // their edit has been made, containing a button which will\n        // transition to their edited post when clicked.\n        const alert = app.alerts.show(\n          {\n            type: 'success',\n            controls: [\n              <Button\n                className=\"Button Button--link\"\n                onclick={() => {\n                  m.route.set(app.route.post(post));\n                  app.alerts.dismiss(alert);\n                }}\n              >\n                {app.translator.trans('core.forum.composer_edit.view_button')}\n              </Button>,\n            ],\n          },\n          app.translator.trans('core.forum.composer_edit.edited_message')\n        );\n      }\n\n      this.composer.hide();\n    }, this.loaded.bind(this));\n  }\n}\n","import app from '../../forum/app';\nimport EditPostComposer from '../components/EditPostComposer';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `PostControls` utility constructs a list of buttons for a post which\n * perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a post.\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   */\n  controls(post, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](post, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a post pertaining to the current user (e.g. report).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  userControls(post, context) {\n    return new ItemList();\n  },\n\n  /**\n   * Get controls for a post pertaining to moderation (e.g. edit).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  moderationControls(post, context) {\n    const items = new ItemList();\n\n    if (post.contentType() === 'comment' && post.canEdit()) {\n      if (!post.isHidden()) {\n        items.add(\n          'edit',\n          <Button icon=\"fas fa-pencil-alt\" onclick={this.editAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.edit_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a post that are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  destructiveControls(post, context) {\n    const items = new ItemList();\n\n    if (post.contentType() === 'comment' && !post.isHidden()) {\n      if (post.canHide()) {\n        items.add(\n          'hide',\n          <Button icon=\"far fa-trash-alt\" onclick={this.hideAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.delete_button')}\n          </Button>\n        );\n      }\n    } else {\n      if (post.contentType() === 'comment' && post.canHide()) {\n        items.add(\n          'restore',\n          <Button icon=\"fas fa-reply\" onclick={this.restoreAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.restore_button')}\n          </Button>\n        );\n      }\n      if (post.canDelete()) {\n        items.add(\n          'delete',\n          <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(post, context)}>\n            {app.translator.trans('core.forum.post_controls.delete_forever_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Open the composer to edit a post.\n   *\n   * @return {Promise<void>}\n   */\n  editAction() {\n    return new Promise((resolve) => {\n      app.composer.load(EditPostComposer, { post: this });\n      app.composer.show();\n\n      return resolve();\n    });\n  },\n\n  /**\n   * Hide a post.\n   *\n   * @return {Promise<void>}\n   */\n  hideAction() {\n    if (!confirm(extractText(app.translator.trans('core.forum.post_controls.hide_confirmation')))) return;\n    this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });\n\n    return this.save({ isHidden: true }).then(() => m.redraw());\n  },\n\n  /**\n   * Restore a post.\n   *\n   * @return {Promise<void>}\n   */\n  restoreAction() {\n    this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });\n\n    return this.save({ isHidden: false }).then(() => m.redraw());\n  },\n\n  /**\n   * Delete a post.\n   *\n   * @return {Promise<void>}\n   */\n  deleteAction(context) {\n    if (!confirm(extractText(app.translator.trans('core.forum.post_controls.delete_confirmation')))) return;\n    if (context) context.loading = true;\n\n    return this.delete()\n      .then(() => {\n        const discussion = this.discussion();\n\n        discussion.removePost(this.id());\n\n        // If this was the last post in the discussion, then we will assume that\n        // the whole discussion was deleted too.\n        if (!discussion.postIds().length) {\n          app.discussions.removeDiscussion(discussion);\n\n          if (app.viewingDiscussion(discussion)) {\n            app.history.back();\n          }\n        }\n      })\n      .catch(() => {})\n      .then(() => {\n        if (context) context.loading = false;\n        m.redraw();\n      });\n  },\n};\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport SubtreeRetainer from '../../common/utils/SubtreeRetainer';\nimport Dropdown from '../../common/components/Dropdown';\nimport PostControls from '../utils/PostControls';\nimport listItems, { ModdedChildrenWithItemName } from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport type PostModel from '../../common/models/Post';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport type Mithril from 'mithril';\n\nexport interface IPostAttrs extends ComponentAttrs {\n  post: PostModel;\n}\n\n/**\n * The `Post` component displays a single post. The basic post template just\n * includes a controls dropdown; subclasses must implement `content` and `attrs`\n * methods.\n */\nexport default abstract class Post<CustomAttrs extends IPostAttrs = IPostAttrs> extends Component<CustomAttrs> {\n  /**\n   * May be set by subclasses.\n   */\n  loading = false;\n\n  /**\n   * Ensures that the post will not be redrawn\n   * unless new data comes in.\n   */\n  subtree!: SubtreeRetainer;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loading = false;\n\n    this.subtree = new SubtreeRetainer(\n      () => this.loading,\n      () => this.attrs.post.freshness,\n      () => {\n        const user = this.attrs.post.user();\n        return user && user.freshness;\n      }\n    );\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const attrs = this.elementAttrs();\n\n    attrs.className = this.classes(attrs.className as string | undefined).join(' ');\n\n    const controls = PostControls.controls(this.attrs.post, this).toArray();\n    const footerItems = this.footerItems().toArray();\n\n    return (\n      <article {...attrs}>\n        <div>{this.viewItems(controls, footerItems).toArray()}</div>\n      </article>\n    );\n  }\n\n  viewItems(controls: Mithril.Children[], footerItems: ModdedChildrenWithItemName[]): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('content', this.loading ? <LoadingIndicator /> : this.content(), 100);\n\n    items.add(\n      'actions',\n      <aside className=\"Post-actions\">\n        <ul>\n          {listItems(this.actionItems().toArray())}\n          {!!controls.length && (\n            <li>\n              <Dropdown\n                className=\"Post-controls\"\n                buttonClassName=\"Button Button--icon Button--flat\"\n                menuClassName=\"Dropdown-menu--right\"\n                icon=\"fas fa-ellipsis-h\"\n                onshow={() => this.$('.Post-controls').addClass('open')}\n                onhide={() => this.$('.Post-controls').removeClass('open')}\n                accessibleToggleLabel={app.translator.trans('core.forum.post_controls.toggle_dropdown_accessible_label')}\n              >\n                {controls}\n              </Dropdown>\n            </li>\n          )}\n        </ul>\n      </aside>,\n      90\n    );\n\n    items.add('footer', <footer className=\"Post-footer\">{footerItems.length > 0 ? <ul>{listItems(footerItems)}</ul> : null}</footer>, 80);\n\n    return items;\n  }\n\n  onbeforeupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeupdate(vnode);\n\n    return this.subtree.needsRebuild();\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onupdate(vnode);\n\n    const $actions = this.$('.Post-actions');\n    const $controls = this.$('.Post-controls');\n\n    $actions.toggleClass('openWithin', $controls.hasClass('open'));\n  }\n\n  /**\n   * Get attributes for the post element.\n   */\n  elementAttrs(): Record<string, unknown> {\n    return {};\n  }\n\n  /**\n   * Get the post's content.\n   */\n  content(): Mithril.Children {\n    // TODO: [Flarum 2.0] return `null`\n    return [];\n  }\n\n  /**\n   * Get the post's classes.\n   */\n  classes(existing?: string): string[] {\n    let classes = (existing || '').split(' ').concat(['Post']);\n\n    const user = this.attrs.post.user();\n    const discussion = this.attrs.post.discussion();\n\n    if (this.loading) {\n      classes.push('Post--loading');\n    }\n\n    if (user && user === app.session.user) {\n      classes.push('Post--by-actor');\n    }\n\n    if (user && user === discussion.user()) {\n      classes.push('Post--by-start-user');\n    }\n\n    return classes;\n  }\n\n  /**\n   * Build an item list for the post's actions.\n   */\n  actionItems(): ItemList<Mithril.Children> {\n    return new ItemList();\n  }\n\n  /**\n   * Build an item list for the post's footer.\n   */\n  footerItems(): ItemList<ModdedChildrenWithItemName> {\n    return new ItemList<ModdedChildrenWithItemName>();\n  }\n}\n","import Badge, { IBadgeAttrs } from './Badge';\nimport Group from '../models/Group';\n\nexport interface IGroupAttrs extends IBadgeAttrs {\n  group?: Group;\n}\n\nexport default class GroupBadge<CustomAttrs extends IGroupAttrs = IGroupAttrs> extends Badge<CustomAttrs> {\n  static initAttrs(attrs: IGroupAttrs): void {\n    super.initAttrs(attrs);\n\n    if (attrs.group) {\n      attrs.icon = attrs.group.icon() || '';\n      attrs.color = attrs.group.color() || '';\n      attrs.label = typeof attrs.label === 'undefined' ? attrs.group.nameSingular() : attrs.label;\n      attrs.type = 'group--' + attrs.group.id();\n\n      delete attrs.group;\n    }\n  }\n}\n","import Model from '../Model';\n\nexport default class Group extends Model {\n  static ADMINISTRATOR_ID = '1';\n  static GUEST_ID = '2';\n  static MEMBER_ID = '3';\n\n  nameSingular() {\n    return Model.attribute<string>('nameSingular').call(this);\n  }\n  namePlural() {\n    return Model.attribute<string>('namePlural').call(this);\n  }\n\n  color() {\n    return Model.attribute<string | null>('color').call(this);\n  }\n  icon() {\n    return Model.attribute<string | null>('icon').call(this);\n  }\n\n  isHidden() {\n    return Model.attribute<boolean>('isHidden').call(this);\n  }\n}\n","import app from '../../common/app';\nimport Modal, { IInternalModalAttrs } from './Modal';\nimport Button from './Button';\nimport GroupBadge from './GroupBadge';\nimport Group from '../models/Group';\nimport extractText from '../utils/extractText';\nimport ItemList from '../utils/ItemList';\nimport Stream from '../utils/Stream';\nimport type Mithril from 'mithril';\nimport type User from '../models/User';\nimport type { SaveAttributes, SaveRelationships } from '../Model';\n\nexport interface IEditUserModalAttrs extends IInternalModalAttrs {\n  user: User;\n}\n\nexport default class EditUserModal<CustomAttrs extends IEditUserModalAttrs = IEditUserModalAttrs> extends Modal<CustomAttrs> {\n  protected username!: Stream<string>;\n  protected email!: Stream<string>;\n  protected isEmailConfirmed!: Stream<boolean>;\n  protected setPassword!: Stream<boolean>;\n  protected password!: Stream<string>;\n  protected groups: Record<string, Stream<boolean>> = {};\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    const user = this.attrs.user;\n\n    this.username = Stream(user.username() || '');\n    this.email = Stream(user.email() || '');\n    this.isEmailConfirmed = Stream(user.isEmailConfirmed() || false);\n    this.setPassword = Stream(false as boolean);\n    this.password = Stream(user.password() || '');\n\n    const userGroups = user.groups() || [];\n\n    app.store\n      .all<Group>('groups')\n      .filter((group) => ![Group.GUEST_ID, Group.MEMBER_ID].includes(group.id()!))\n      .forEach((group) => (this.groups[group.id()!] = Stream(userGroups.includes(group))));\n  }\n\n  className() {\n    return 'EditUserModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.lib.edit_user.title');\n  }\n\n  content() {\n    const fields = this.fields().toArray();\n    return (\n      <div className=\"Modal-body\">\n        {fields.length > 1 ? <div className=\"Form\">{this.fields().toArray()}</div> : app.translator.trans('core.lib.edit_user.nothing_available')}\n      </div>\n    );\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    if (this.attrs.user.canEditCredentials()) {\n      items.add(\n        'username',\n        <div className=\"Form-group\">\n          <label>{app.translator.trans('core.lib.edit_user.username_heading')}</label>\n          <input\n            className=\"FormControl\"\n            placeholder={extractText(app.translator.trans('core.lib.edit_user.username_label'))}\n            bidi={this.username}\n            disabled={this.nonAdminEditingAdmin()}\n          />\n        </div>,\n        40\n      );\n\n      if (app.session.user !== this.attrs.user) {\n        items.add(\n          'email',\n          <div className=\"Form-group\">\n            <label>{app.translator.trans('core.lib.edit_user.email_heading')}</label>\n            <div>\n              <input\n                className=\"FormControl\"\n                placeholder={extractText(app.translator.trans('core.lib.edit_user.email_label'))}\n                bidi={this.email}\n                disabled={this.nonAdminEditingAdmin()}\n              />\n            </div>\n            {!this.isEmailConfirmed() && this.userIsAdmin(app.session.user) && (\n              <div>\n                <Button className=\"Button Button--block\" loading={this.loading} onclick={this.activate.bind(this)}>\n                  {app.translator.trans('core.lib.edit_user.activate_button')}\n                </Button>\n              </div>\n            )}\n          </div>,\n          30\n        );\n\n        items.add(\n          'password',\n          <div className=\"Form-group\">\n            <label>{app.translator.trans('core.lib.edit_user.password_heading')}</label>\n            <div>\n              <label className=\"checkbox\">\n                <input\n                  type=\"checkbox\"\n                  onchange={(e: KeyboardEvent) => {\n                    const target = e.target as HTMLInputElement;\n                    this.setPassword(target.checked);\n                    m.redraw.sync();\n                    if (target.checked) this.$('[name=password]').select();\n                    e.redraw = false;\n                  }}\n                  disabled={this.nonAdminEditingAdmin()}\n                />\n                {app.translator.trans('core.lib.edit_user.set_password_label')}\n              </label>\n              {this.setPassword() && (\n                <input\n                  className=\"FormControl\"\n                  type=\"password\"\n                  name=\"password\"\n                  placeholder={extractText(app.translator.trans('core.lib.edit_user.password_label'))}\n                  bidi={this.password}\n                  disabled={this.nonAdminEditingAdmin()}\n                />\n              )}\n            </div>\n          </div>,\n          20\n        );\n      }\n    }\n\n    if (this.attrs.user.canEditGroups()) {\n      items.add(\n        'groups',\n        <div className=\"Form-group EditUserModal-groups\">\n          <label>{app.translator.trans('core.lib.edit_user.groups_heading')}</label>\n          <div>\n            {Object.keys(this.groups)\n              .map((id) => app.store.getById<Group>('groups', id))\n              .filter(Boolean)\n              .map(\n                (group) =>\n                  // Necessary because filter(Boolean) doesn't narrow out falsy values.\n                  group && (\n                    <label className=\"checkbox\">\n                      <input\n                        type=\"checkbox\"\n                        bidi={this.groups[group.id()!]}\n                        disabled={\n                          group.id() === Group.ADMINISTRATOR_ID && (this.attrs.user === app.session.user || !this.userIsAdmin(app.session.user))\n                        }\n                      />\n                      <GroupBadge group={group} label={null} /> {group.nameSingular()}\n                    </label>\n                  )\n              )}\n          </div>\n        </div>,\n        10\n      );\n    }\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.lib.edit_user.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  activate() {\n    this.loading = true;\n    const data = {\n      username: this.username(),\n      isEmailConfirmed: true,\n    };\n    this.attrs.user\n      .save(data, { errorHandler: this.onerror.bind(this) })\n      .then(() => {\n        this.isEmailConfirmed(true);\n        this.loading = false;\n        m.redraw();\n      })\n      .catch(() => {\n        this.loading = false;\n        m.redraw();\n      });\n  }\n\n  data() {\n    const data: SaveAttributes = {};\n    const relationships: SaveRelationships = {};\n\n    if (this.attrs.user.canEditCredentials() && !this.nonAdminEditingAdmin()) {\n      data.username = this.username();\n\n      if (app.session.user !== this.attrs.user) {\n        data.email = this.email();\n      }\n\n      if (this.setPassword()) {\n        data.password = this.password();\n      }\n    }\n\n    if (this.attrs.user.canEditGroups()) {\n      relationships.groups = Object.keys(this.groups)\n        .filter((id) => this.groups[id]())\n        .map((id) => app.store.getById<Group>('groups', id))\n        .filter((g): g is Group => g instanceof Group);\n    }\n\n    data.relationships = relationships;\n\n    return data;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    this.attrs.user\n      .save(this.data(), { errorHandler: this.onerror.bind(this) })\n      .then(this.hide.bind(this))\n      .catch(() => {\n        this.loading = false;\n        m.redraw();\n      });\n  }\n\n  nonAdminEditingAdmin(): boolean {\n    return this.userIsAdmin(this.attrs.user) && !this.userIsAdmin(app.session.user);\n  }\n\n  /**\n   * @internal\n   */\n  protected userIsAdmin(user: User | null): boolean {\n    return !!(user?.groups() || []).some((g) => g?.id() === Group.ADMINISTRATOR_ID);\n  }\n}\n","import Component from '../../common/Component';\n\n/**\n * The `AffixedSidebar` component uses Bootstrap's \"affix\" plugin to keep a\n * sidebar navigation at the top of the viewport when scrolling.\n *\n * ### Children\n *\n * The component must wrap an element that itself wraps an <ul> element, which\n * will be \"affixed\".\n *\n * @see https://getbootstrap.com/docs/3.4/javascript/#affix\n */\nexport default class AffixedSidebar extends Component {\n  view(vnode) {\n    return vnode.children[0];\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Register the affix plugin to execute on every window resize (and trigger)\n    this.boundOnresize = this.onresize.bind(this);\n    $(window).on('resize', this.boundOnresize).resize();\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('resize', this.boundOnresize);\n  }\n\n  onresize() {\n    const $sidebar = this.$();\n    const $header = $('#header');\n    const $footer = $('#footer');\n    const $affixElement = $sidebar.find('> ul');\n\n    $(window).off('.affix');\n    $affixElement.removeClass('affix affix-top affix-bottom').removeData('bs.affix');\n\n    // Don't affix the sidebar if it is taller than the viewport (otherwise\n    // there would be no way to scroll through its content).\n    if ($sidebar.outerHeight(true) > $(window).height() - $header.outerHeight(true)) return;\n\n    $affixElement.affix({\n      offset: {\n        top: () => $sidebar.offset().top - $header.outerHeight(true) - parseInt($sidebar.css('margin-top'), 10),\n        bottom: () => (this.bottom = $footer.outerHeight(true)),\n      },\n    });\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport UserCard from './UserCard';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Separator from '../../common/components/Separator';\nimport listItems from '../../common/helpers/listItems';\nimport AffixedSidebar from './AffixedSidebar';\nimport type User from '../../common/models/User';\nimport type Mithril from 'mithril';\n\nexport interface IUserPageAttrs extends IPageAttrs {}\n\n/**\n * The `UserPage` component shows a user's profile. It can be extended to show\n * content inside of the content area. See `ActivityPage` and `SettingsPage` for\n * examples.\n *\n * @abstract\n */\nexport default class UserPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs, CustomState = undefined> extends Page<CustomAttrs, CustomState> {\n  /**\n   * The user this page is for.\n   */\n  user: User | null = null;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.bodyClass = 'App--user';\n  }\n\n  /**\n   * Base view template for the user page.\n   */\n  view() {\n    return (\n      <div className=\"UserPage\">\n        {this.user\n          ? [\n              <UserCard\n                user={this.user}\n                className=\"Hero UserHero\"\n                editable={this.user.canEdit() || this.user === app.session.user}\n                controlsButtonClassName=\"Button\"\n              />,\n              <div className=\"container\">\n                <div className=\"sideNavContainer\">\n                  <AffixedSidebar>\n                    <nav className=\"sideNav UserPage-nav\">\n                      <ul>{listItems(this.sidebarItems().toArray())}</ul>\n                    </nav>\n                  </AffixedSidebar>\n                  <div className=\"sideNavOffset UserPage-content\">{this.content()}</div>\n                </div>\n              </div>,\n            ]\n          : [<LoadingIndicator display=\"block\" />]}\n      </div>\n    );\n  }\n\n  /**\n   * Get the content to display in the user page.\n   */\n  content(): Mithril.Children | void {}\n\n  /**\n   * Initialize the component with a user, and trigger the loading of their\n   * activity feed.\n   *\n   * @protected\n   */\n  show(user: User): void {\n    this.user = user;\n\n    app.current.set('user', user);\n\n    app.setTitle(user.displayName());\n\n    m.redraw();\n  }\n\n  /**\n   * Given a username, load the user's profile from the store, or make a request\n   * if we don't have it yet. Then initialize the profile page with that user.\n   */\n  loadUser(username: string) {\n    const lowercaseUsername = username.toLowerCase();\n\n    // Load the preloaded user object, if any, into the global app store\n    // We don't use the output of the method because it returns raw JSON\n    // instead of the parsed models\n    app.preloadedApiDocument();\n\n    app.store.all<User>('users').some((user) => {\n      if ((user.username().toLowerCase() === lowercaseUsername || user.id() === username) && user.joinTime()) {\n        this.show(user);\n        return true;\n      }\n\n      return false;\n    });\n\n    if (!this.user) {\n      app.store.find<User>('users', username, { bySlug: true }).then(this.show.bind(this));\n    }\n  }\n\n  /**\n   * Build an item list for the content of the sidebar.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'nav',\n      <SelectDropdown className=\"App-titleControl\" buttonClassName=\"Button\">\n        {this.navItems().toArray()}\n      </SelectDropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the navigation in the sidebar.\n   */\n  navItems() {\n    const items = new ItemList<Mithril.Children>();\n    const user = this.user!;\n    const isActor = app.session.user === user;\n\n    items.add(\n      'posts',\n      <LinkButton href={app.route('user.posts', { username: user.slug() })} icon=\"far fa-comment\">\n        {app.translator.trans('core.forum.user.posts_link')} <span className=\"Button-badge\">{user.commentCount()}</span>\n      </LinkButton>,\n      100\n    );\n\n    items.add(\n      'discussions',\n      <LinkButton href={app.route('user.discussions', { username: user.slug() })} icon=\"fas fa-bars\">\n        {app.translator.trans('core.forum.user.discussions_link')} <span className=\"Button-badge\">{user.discussionCount()}</span>\n      </LinkButton>,\n      90\n    );\n\n    if (isActor) {\n      items.add('separator', <Separator />, -90);\n      items.add(\n        'settings',\n        <LinkButton href={app.route('settings')} icon=\"fas fa-cog\">\n          {app.translator.trans('core.forum.user.settings_link')}\n        </LinkButton>,\n        -100\n      );\n    }\n\n    if (isActor || app.forum.attribute<boolean>('canModerateAccessTokens')) {\n      if (!isActor) {\n        items.add('security-separator', <Separator />, -90);\n      }\n\n      items.add(\n        'security',\n        <LinkButton href={app.route('user.security', { username: user.slug() })} icon=\"fas fa-shield-alt\">\n          {app.translator.trans('core.forum.user.security_link')}\n        </LinkButton>,\n        -100\n      );\n    }\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport EditUserModal from '../../common/components/EditUserModal';\nimport UserPage from '../components/UserPage';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a user.\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controls(user, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](user, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a user pertaining to the current user (e.g. poke, follow).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  userControls() {\n    return new ItemList();\n  },\n\n  /**\n   * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  moderationControls(user) {\n    const items = new ItemList();\n\n    if (user.canEdit() || user.canEditCredentials() || user.canEditGroups()) {\n      items.add(\n        'edit',\n        <Button icon=\"fas fa-pencil-alt\" onclick={this.editAction.bind(this, user)}>\n          {app.translator.trans('core.forum.user_controls.edit_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a user which are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  destructiveControls(user) {\n    const items = new ItemList();\n\n    if (user.id() !== '1' && user.canDelete()) {\n      items.add(\n        'delete',\n        <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(this, user)}>\n          {app.translator.trans('core.forum.user_controls.delete_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Delete the user.\n   *\n   * @param {import('../../common/models/User').default} user\n   */\n  deleteAction(user) {\n    if (!confirm(app.translator.trans('core.forum.user_controls.delete_confirmation'))) {\n      return;\n    }\n\n    user\n      .delete()\n      .then(() => {\n        this.showDeletionAlert(user, 'success');\n        if (app.current.matches(UserPage, { user })) {\n          app.history.back();\n        } else {\n          window.location.reload();\n        }\n      })\n      .catch(() => this.showDeletionAlert(user, 'error'));\n  },\n\n  /**\n   * Show deletion alert of user.\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {string} type\n   */\n  showDeletionAlert(user, type) {\n    const message = {\n      success: 'core.forum.user_controls.delete_success_message',\n      error: 'core.forum.user_controls.delete_error_message',\n    }[type];\n\n    app.alerts.show(\n      { type },\n      app.translator.trans(message, {\n        user,\n        email: user.email(),\n      })\n    );\n  },\n\n  /**\n   * Edit the user.\n   *\n   * @param {import('../../common/models/User').default} user\n   */\n  editAction(user) {\n    app.modal.show(EditUserModal, { user });\n  },\n};\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport icon from '../../common/helpers/icon';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\n\n/**\n * The `AvatarEditor` component displays a user's avatar along with a dropdown\n * menu which allows the user to upload/remove the avatar.\n *\n * ### Attrs\n *\n * - `className`\n * - `user`\n */\nexport default class AvatarEditor extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * Whether or not an avatar upload is in progress.\n     *\n     * @type {Boolean}\n     */\n    this.loading = false;\n\n    /**\n     * Whether or not an image has been dragged over the dropzone.\n     *\n     * @type {Boolean}\n     */\n    this.isDraggedOver = false;\n  }\n\n  view() {\n    const user = this.attrs.user;\n\n    return (\n      <div className={classList(['AvatarEditor', 'Dropdown', this.attrs.className, this.loading && 'loading', this.isDraggedOver && 'dragover'])}>\n        {avatar(user, { loading: 'eager' })}\n        <a\n          className={user.avatarUrl() ? 'Dropdown-toggle' : 'Dropdown-toggle AvatarEditor--noAvatar'}\n          title={app.translator.trans('core.forum.user.avatar_upload_tooltip')}\n          data-toggle=\"dropdown\"\n          onclick={this.quickUpload.bind(this)}\n          ondragover={this.enableDragover.bind(this)}\n          ondragenter={this.enableDragover.bind(this)}\n          ondragleave={this.disableDragover.bind(this)}\n          ondragend={this.disableDragover.bind(this)}\n          ondrop={this.dropUpload.bind(this)}\n        >\n          {this.loading ? (\n            <LoadingIndicator display=\"unset\" size=\"large\" />\n          ) : user.avatarUrl() ? (\n            icon('fas fa-pencil-alt')\n          ) : (\n            icon('fas fa-plus-circle')\n          )}\n        </a>\n        <ul className=\"Dropdown-menu Menu\">{listItems(this.controlItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Get the items in the edit avatar dropdown menu.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    items.add(\n      'upload',\n      <Button icon=\"fas fa-upload\" onclick={this.openPicker.bind(this)}>\n        {app.translator.trans('core.forum.user.avatar_upload_button')}\n      </Button>\n    );\n\n    items.add(\n      'remove',\n      <Button icon=\"fas fa-times\" onclick={this.remove.bind(this)}>\n        {app.translator.trans('core.forum.user.avatar_remove_button')}\n      </Button>\n    );\n\n    return items;\n  }\n\n  /**\n   * Enable dragover style\n   *\n   * @param {DragEvent} e\n   */\n  enableDragover(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = true;\n  }\n\n  /**\n   * Disable dragover style\n   *\n   * @param {DragEvent} e\n   */\n  disableDragover(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = false;\n  }\n\n  /**\n   * Upload avatar when file is dropped into dropzone.\n   *\n   * @param {DragEvent} e\n   */\n  dropUpload(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = false;\n    this.upload(e.dataTransfer.files[0]);\n  }\n\n  /**\n   * If the user doesn't have an avatar, there's no point in showing the\n   * controls dropdown, because only one option would be viable: uploading.\n   * Thus, when the avatar editor's dropdown toggle button is clicked, we prompt\n   * the user to upload an avatar immediately.\n   *\n   * @param {MouseEvent} e\n   */\n  quickUpload(e) {\n    if (!this.attrs.user.avatarUrl()) {\n      e.preventDefault();\n      e.stopPropagation();\n      this.openPicker();\n    }\n  }\n\n  /**\n   * Upload avatar using file picker\n   */\n  openPicker() {\n    if (this.loading) return;\n\n    // Create a hidden HTML input element and click on it so the user can select\n    // an avatar file. Once they have, we will upload it via the API.\n    const $input = $('<input type=\"file\" accept=\".jpg, .jpeg, .png, .bmp, .gif\">');\n\n    $input\n      .appendTo('body')\n      .hide()\n      .click()\n      .on('input', (e) => {\n        this.upload($(e.target)[0].files[0]);\n      });\n  }\n\n  /**\n   * Upload avatar\n   *\n   * @param {File} file\n   */\n  upload(file) {\n    if (this.loading) return;\n\n    const user = this.attrs.user;\n    const data = new FormData();\n    data.append('avatar', file);\n\n    this.loading = true;\n    m.redraw();\n\n    app\n      .request({\n        method: 'POST',\n        url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\n        serialize: (raw) => raw,\n        body: data,\n      })\n      .then(this.success.bind(this), this.failure.bind(this));\n  }\n\n  /**\n   * Remove the user's avatar.\n   */\n  remove() {\n    const user = this.attrs.user;\n\n    this.loading = true;\n    m.redraw();\n\n    app\n      .request({\n        method: 'DELETE',\n        url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\n      })\n      .then(this.success.bind(this), this.failure.bind(this));\n  }\n\n  /**\n   * After a successful upload/removal, push the updated user data into the\n   * store, and force a re-computation of the user's avatar color.\n   *\n   * @param {object} response\n   * @protected\n   */\n  success(response) {\n    app.store.pushPayload(response);\n    delete this.attrs.user.avatarColor;\n\n    this.loading = false;\n    m.redraw();\n  }\n\n  /**\n   * If avatar upload/removal fails, stop loading.\n   *\n   * @param {object} response\n   * @protected\n   */\n  failure(response) {\n    this.loading = false;\n    m.redraw();\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/utils/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport UserControls from '../utils/UserControls';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport icon from '../../common/helpers/icon';\nimport Dropdown from '../../common/components/Dropdown';\nimport Link from '../../common/components/Link';\nimport AvatarEditor from './AvatarEditor';\nimport listItems from '../../common/helpers/listItems';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `UserCard` component displays a user's profile card. This is used both on\n * the `UserPage` (in the hero) and in discussions, shown when hovering over a\n * post author.\n *\n * ### Attrs\n *\n * - `user`\n * - `className`\n * - `editable`\n * - `controlsButtonClassName`\n */\nexport default class UserCard extends Component {\n  view() {\n    const user = this.attrs.user;\n    const controls = UserControls.controls(user, this).toArray();\n    const color = user.color();\n    const badges = user.badges().toArray();\n\n    return (\n      <div className={classList('UserCard', this.attrs.className)} style={color && { '--usercard-bg': color }}>\n        <div className=\"darkenBackground\">\n          <div className=\"container\">\n            {!!controls.length && (\n              <Dropdown\n                className=\"UserCard-controls App-primaryControl\"\n                menuClassName=\"Dropdown-menu--right\"\n                buttonClassName={this.attrs.controlsButtonClassName}\n                label={app.translator.trans('core.forum.user_controls.button')}\n                accessibleToggleLabel={app.translator.trans('core.forum.user_controls.toggle_dropdown_accessible_label')}\n                icon=\"fas fa-ellipsis-v\"\n              >\n                {controls}\n              </Dropdown>\n            )}\n\n            <div className=\"UserCard-profile\">\n              <h1 className=\"UserCard-identity\">\n                {this.attrs.editable ? (\n                  <>\n                    <AvatarEditor user={user} className=\"UserCard-avatar\" /> {username(user)}\n                  </>\n                ) : (\n                  <Link href={app.route.user(user)}>\n                    <div className=\"UserCard-avatar\">{avatar(user, { loading: 'eager' })}</div>\n                    {username(user)}\n                  </Link>\n                )}\n              </h1>\n\n              {!!badges.length && <ul className=\"UserCard-badges badges\">{listItems(badges)}</ul>}\n\n              <ul className=\"UserCard-info\">{listItems(this.infoItems().toArray())}</ul>\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list of tidbits of info to show on this user's profile.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  infoItems() {\n    const items = new ItemList();\n    const user = this.attrs.user;\n    const lastSeenAt = user.lastSeenAt();\n\n    if (lastSeenAt) {\n      const online = user.isOnline();\n\n      items.add(\n        'lastSeen',\n        <span className={classList('UserCard-lastSeen', { online })}>\n          {online\n            ? [icon('fas fa-circle'), ' ', app.translator.trans('core.forum.user.online_text')]\n            : [icon('far fa-clock'), ' ', humanTime(lastSeenAt)]}\n        </span>,\n        100\n      );\n    }\n\n    items.add('joined', app.translator.trans('core.forum.user.joined_date_text', { ago: humanTime(user.joinTime()) }), 90);\n\n    return items;\n  }\n}\n","import type Mithril from 'mithril';\nimport User from '../models/User';\nimport icon from './icon';\n\n/**\n * The `useronline` helper displays a green circle if the user is online.\n */\nexport default function userOnline(user: User): Mithril.Vnode<{}, {}> | null {\n  if (user.lastSeenAt() && user.isOnline()) {\n    return <span className=\"UserOnline\">{icon('fas fa-circle')}</span>;\n  }\n\n  return null;\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport UserCard from './UserCard';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport userOnline from '../../common/helpers/userOnline';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `PostUser` component shows the avatar and username of a post's author.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostUser extends Component {\n  view() {\n    const post = this.attrs.post;\n    const user = post.user();\n\n    if (!user) {\n      return (\n        <div className=\"PostUser\">\n          <h3 className=\"PostUser-name\">\n            {avatar(user, { className: 'PostUser-avatar' })} {username(user)}\n          </h3>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostUser\">\n        <h3 className=\"PostUser-name\">\n          <Link href={app.route.user(user)}>\n            {avatar(user, { className: 'PostUser-avatar' })}\n            {userOnline(user)}\n            {username(user)}\n          </Link>\n        </h3>\n        <ul className=\"PostUser-badges badges\">{listItems(user.badges().toArray())}</ul>\n\n        {!post.isHidden() && this.attrs.cardVisible && (\n          <UserCard user={user} className=\"UserCard--popover\" controlsButtonClassName=\"Button Button--icon Button--flat\" />\n        )}\n      </div>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    let timeout;\n\n    this.$()\n      .on('mouseover', '.PostUser-name a, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = setTimeout(this.showCard.bind(this), 500);\n      })\n      .on('mouseout', '.PostUser-name a, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = setTimeout(this.hideCard.bind(this), 250);\n      });\n  }\n\n  /**\n   * Show the user card.\n   */\n  showCard() {\n    this.attrs.oncardshow();\n\n    setTimeout(() => this.$('.UserCard').addClass('in'));\n  }\n\n  /**\n   * Hide the user card.\n   */\n  hideCard() {\n    this.$('.UserCard')\n      .removeClass('in')\n      .one('transitionend webkitTransitionEnd oTransitionEnd', () => {\n        this.attrs.oncardhide();\n      });\n  }\n}\n","import dayjs from 'dayjs';\nimport type Mithril from 'mithril';\n\n/**\n * The `fullTime` helper displays a formatted time string wrapped in a <time>\n * tag.\n */\nexport default function fullTime(time: Date): Mithril.Vnode {\n  const d = dayjs(time);\n\n  const datetime = d.format();\n  const full = d.format('LLLL');\n\n  return (\n    <time pubdate datetime={datetime}>\n      {full}\n    </time>\n  );\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport type Mithril from 'mithril';\nimport ItemList from '../utils/ItemList';\n\nexport interface IIPAddressAttrs extends ComponentAttrs {\n  ip: string | undefined | null;\n}\n\n/**\n * A component to wrap an IP address for display.\n * Designed to be customizable for different use cases.\n *\n * @example\n * <IPAddress ip=\"127.0.0.1\" />\n * @example\n * <IPAddress ip={post.data.attributes.ipAddress} />\n */\nexport default class IPAddress<CustomAttrs extends IIPAddressAttrs = IIPAddressAttrs> extends Component<CustomAttrs> {\n  ip!: string;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.ip = this.attrs.ip || '';\n  }\n\n  view() {\n    return <span className=\"IPAddress\">{this.viewItems().toArray()}</span>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('ip', <span>{this.ip}</span>, 100);\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/helpers/humanTime';\nimport fullTime from '../../common/helpers/fullTime';\nimport ItemList from '../../common/utils/ItemList';\nimport IPAddress from '../../common/components/IPAddress';\n\n/**\n * The `PostMeta` component displays the time of a post, and when clicked, shows\n * a dropdown containing more information about the post (number, full time,\n * permalink).\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostMeta extends Component {\n  view() {\n    return <div className=\"Dropdown PostMeta\">{this.viewItems().toArray()}</div>;\n  }\n\n  /**\n   * Get the permalink for the given post.\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @returns {string}\n   */\n  getPermalink(post) {\n    return app.forum.attribute('baseOrigin') + app.route.post(post);\n  }\n\n  /**\n   * When the dropdown menu is shown, select the contents of the permalink\n   * input so that the user can quickly copy the URL.\n   * @param {Event} e\n   */\n  selectPermalink(e) {\n    setTimeout(() => $(this.element).parent().find('.PostMeta-permalink').select());\n\n    e.redraw = false;\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  viewItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n    const time = post.createdAt();\n\n    items.add(\n      'time',\n      <a className=\"Dropdown-toggle\" onclick={(e) => this.selectPermalink(e)} data-toggle=\"dropdown\">\n        {humanTime(time)}\n      </a>,\n      100\n    );\n\n    items.add('meta-dropdown', <div className=\"Dropdown-menu dropdown-menu\">{this.metaItems().toArray()}</div>, 90);\n\n    return items;\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  metaItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n    const touch = 'ontouchstart' in document.documentElement;\n    const permalink = this.getPermalink(post);\n    const time = post.createdAt();\n\n    items.add(\n      'post-number',\n      <span className=\"PostMeta-number\">{app.translator.trans('core.forum.post.number_tooltip', { number: post.number() })} </span>,\n      100\n    );\n\n    items.add('post-time', <span className=\"PostMeta-time\">{fullTime(time)}</span>, 90);\n\n    items.add(\n      'post-ip',\n      <span className=\"PostMeta-ip\">\n        <IPAddress ip={post.data.attributes.ipAddress} />\n      </span>,\n      80\n    );\n\n    items.add(\n      'permalink',\n      touch ? (\n        <a className=\"Button PostMeta-permalink\" href={permalink}>\n          {permalink}\n        </a>\n      ) : (\n        <input className=\"FormControl PostMeta-permalink\" value={permalink} onclick={(e) => e.stopPropagation()} />\n      ),\n      0\n    );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/utils/humanTime';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `PostEdited` component displays information about when and by whom a post\n * was edited.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostEdited extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n  }\n\n  view() {\n    const post = this.attrs.post;\n    const editedUser = post.editedUser();\n    const editedInfo = app.translator.trans('core.forum.post.edited_tooltip', { user: editedUser, ago: humanTime(post.editedAt()) });\n\n    return (\n      <Tooltip text={editedInfo}>\n        <span className=\"PostEdited\">{app.translator.trans('core.forum.post.edited_text')}</span>\n      </Tooltip>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n  }\n}\n","import app from '../../forum/app';\nimport Post from './Post';\nimport classList from '../../common/utils/classList';\nimport PostUser from './PostUser';\nimport PostMeta from './PostMeta';\nimport PostEdited from './PostEdited';\nimport EditPostComposer from './EditPostComposer';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport ComposerPostPreview from './ComposerPostPreview';\n\n/**\n * The `CommentPost` component displays a standard `comment`-typed post. This\n * includes a number of item lists (controls, header, and footer) surrounding\n * the post's HTML content.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class CommentPost extends Post {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * If the post has been hidden, then this flag determines whether or not its\n     * content has been expanded.\n     *\n     * @type {Boolean}\n     */\n    this.revealContent = false;\n\n    /**\n     * Whether or not the user hover card inside of PostUser is visible.\n     * The property must be managed in CommentPost to be able to use it in the subtree check\n     *\n     * @type {Boolean}\n     */\n    this.cardVisible = false;\n\n    this.subtree.check(\n      () => this.cardVisible,\n      () => this.isEditing(),\n      () => this.revealContent\n    );\n  }\n\n  content() {\n    return super.content().concat(this.contentItems().toArray());\n  }\n\n  contentItems() {\n    const items = new ItemList();\n\n    items.add(\n      'header',\n      <header className=\"Post-header\">\n        <ul>{listItems(this.headerItems().toArray())}</ul>\n      </header>,\n      100\n    );\n\n    items.add('body', <div className=\"Post-body\">{this.bodyItems().toArray()}</div>, 90);\n\n    return items;\n  }\n\n  bodyItems() {\n    const items = new ItemList();\n\n    items.add(\n      'content',\n      this.isEditing() ? <ComposerPostPreview className=\"Post-preview\" composer={app.composer} /> : m.trust(this.attrs.post.contentHtml()),\n      100\n    );\n\n    return items;\n  }\n\n  refreshContent() {\n    const contentHtml = this.isEditing() ? '' : this.attrs.post.contentHtml();\n\n    // If the post content has changed since the last render, we'll run through\n    // all of the <script> tags in the content and evaluate them. This is\n    // necessary because TextFormatter outputs them for e.g. syntax highlighting.\n    if (this.contentHtml !== contentHtml) {\n      this.$('.Post-body script').each(function () {\n        const script = document.createElement('script');\n        script.textContent = this.textContent;\n        Array.from(this.attributes).forEach((attr) => script.setAttribute(attr.name, attr.value));\n        this.parentNode.replaceChild(script, this);\n      });\n    }\n\n    this.contentHtml = contentHtml;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.refreshContent();\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    this.refreshContent();\n  }\n\n  isEditing() {\n    return app.composer.bodyMatches(EditPostComposer, { post: this.attrs.post });\n  }\n\n  elementAttrs() {\n    const post = this.attrs.post;\n    const attrs = super.elementAttrs();\n\n    attrs.className = classList(attrs.className, 'CommentPost', {\n      'Post--renderFailed': post.renderFailed(),\n      'Post--hidden': post.isHidden(),\n      'Post--edited': post.isEdited(),\n      revealContent: this.revealContent,\n      editing: this.isEditing(),\n    });\n\n    if (this.isEditing()) attrs['aria-busy'] = 'true';\n\n    return attrs;\n  }\n\n  /**\n   * Toggle the visibility of a hidden post's content.\n   */\n  toggleContent() {\n    this.revealContent = !this.revealContent;\n  }\n\n  /**\n   * Build an item list for the post's header.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  headerItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n\n    items.add(\n      'user',\n      <PostUser\n        post={post}\n        cardVisible={this.cardVisible}\n        oncardshow={() => {\n          this.cardVisible = true;\n          m.redraw();\n        }}\n        oncardhide={() => {\n          this.cardVisible = false;\n          m.redraw();\n        }}\n      />,\n      100\n    );\n    items.add('meta', <PostMeta post={post} />);\n\n    if (post.isEdited() && !post.isHidden()) {\n      items.add('edited', <PostEdited post={post} />);\n    }\n\n    // If the post is hidden, add a button that allows toggling the visibility\n    // of the post's content.\n    if (post.isHidden()) {\n      items.add(\n        'toggle',\n        <Button className=\"Button Button--default Button--more\" icon=\"fas fa-ellipsis-h\" onclick={this.toggleContent.bind(this)} />\n      );\n    }\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Post from './Post';\nimport { ucfirst } from '../../common/utils/string';\nimport usernameHelper from '../../common/helpers/username';\nimport icon from '../../common/helpers/icon';\nimport Link from '../../common/components/Link';\nimport humanTime from '../../common/helpers/humanTime';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `EventPost` component displays a post which indicating a discussion\n * event, like a discussion being renamed or stickied. Subclasses must implement\n * the `icon` and `description` methods.\n *\n * ### Attrs\n *\n * - All of the attrs for `Post`\n *\n * @abstract\n */\nexport default class EventPost extends Post {\n  elementAttrs() {\n    const attrs = super.elementAttrs();\n\n    attrs.className = classList(attrs.className, 'EventPost', ucfirst(this.attrs.post.contentType()) + 'Post');\n\n    return attrs;\n  }\n\n  content() {\n    const user = this.attrs.post.user();\n    const username = usernameHelper(user);\n    const data = Object.assign(this.descriptionData(), {\n      user,\n      username: user ? (\n        <Link className=\"EventPost-user\" href={app.route.user(user)}>\n          {username}\n        </Link>\n      ) : (\n        username\n      ),\n      time: humanTime(this.attrs.post.createdAt()),\n    });\n\n    return super\n      .content()\n      .concat([icon(this.icon(), { className: 'EventPost-icon' }), <div className=\"EventPost-info\">{this.description(data)}</div>]);\n  }\n\n  /**\n   * Get the name of the event icon.\n   *\n   * @return {string}\n   */\n  icon() {\n    return '';\n  }\n\n  /**\n   * Get the description text for the event.\n   *\n   * @param {Record<string, unknown>} data\n   * @return {import('mithril').Children} The description to render in the DOM\n   */\n  description(data) {\n    return app.translator.trans(this.descriptionKey(), data);\n  }\n\n  /**\n   * Get the translation key for the description of the event.\n   *\n   * @return {string}\n   */\n  descriptionKey() {\n    return '';\n  }\n\n  /**\n   * Get the translation data for the description of the event.\n   *\n   * @return {Record<string, unknown>}\n   */\n  descriptionData() {\n    return {};\n  }\n}\n","import app from '../../forum/app';\nimport EventPost from './EventPost';\nimport extractText from '../../common/utils/extractText';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `DiscussionRenamedPost` component displays a discussion event post\n * indicating that the discussion has been renamed.\n *\n * ### Attrs\n *\n * - All of the attrs for EventPost\n */\nexport default class DiscussionRenamedPost extends EventPost {\n  icon() {\n    return 'fas fa-pencil-alt';\n  }\n\n  description(data) {\n    const renamed = app.translator.trans('core.forum.post_stream.discussion_renamed_text', data);\n\n    return <span>{renamed}</span>;\n  }\n\n  descriptionData() {\n    const post = this.attrs.post;\n    const oldTitle = post.content()[0];\n    const newTitle = post.content()[1];\n\n    return {\n      new: (\n        <Tooltip text={extractText(app.translator.trans('core.forum.post_stream.discussion_renamed_old_tooltip', { old: oldTitle }))}>\n          <strong className=\"DiscussionRenamedPost-new\">{newTitle}</strong>\n        </Tooltip>\n      ),\n    };\n  }\n}\n","import app from '../app';\nimport Component from '../../common/Component';\nimport Button from '../../common/components/Button';\nimport type Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface IWelcomeHeroAttrs {}\n\nconst LOCAL_STORAGE_KEY = 'welcomeHidden';\n\n/**\n * The `WelcomeHero` component displays a hero that welcomes the user to the\n * forum.\n */\nexport default class WelcomeHero extends Component<IWelcomeHeroAttrs> {\n  /**\n   * @deprecated Extend the `isHidden` method instead.\n   */\n  hidden: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<IWelcomeHeroAttrs, this>) {\n    super.oninit(vnode);\n  }\n\n  view(vnode: Mithril.Vnode<IWelcomeHeroAttrs, this>) {\n    if (this.isHidden()) return null;\n\n    return (\n      <header className=\"Hero WelcomeHero\">\n        <div className=\"container\">{this.viewItems().toArray()}</div>\n      </header>\n    );\n  }\n\n  /**\n   * Hide the welcome hero.\n   */\n  hide() {\n    localStorage.setItem(LOCAL_STORAGE_KEY, 'true');\n  }\n\n  /**\n   * Determines whether the welcome hero should be hidden.\n   *\n   * @returns if the welcome hero is hidden.\n   */\n  isHidden(): boolean {\n    if (!app.forum.attribute<string>('welcomeTitle')?.trim()) return true;\n    if (localStorage.getItem(LOCAL_STORAGE_KEY)) return true;\n    if (this.hidden) return true;\n\n    return false;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const slideUp = () => {\n      this.$().slideUp(this.hide.bind(this));\n    };\n\n    items.add(\n      'dismiss-button',\n      <Button\n        icon=\"fas fa-times\"\n        onclick={slideUp}\n        className=\"Hero-close Button Button--icon Button--link\"\n        aria-label={app.translator.trans('core.forum.welcome_hero.hide')}\n      />,\n      100\n    );\n\n    items.add('content', <div className=\"containerNarrow\">{this.contentItems().toArray()}</div>, 80);\n\n    return items;\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('title', <h1 className=\"Hero-title\">{app.forum.attribute('welcomeTitle')}</h1>, 100);\n\n    items.add('subtitle', <div className=\"Hero-subtitle\">{m.trust(app.forum.attribute('welcomeMessage'))}</div>);\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport extractText from '../../common/utils/extractText';\nimport Stream from '../../common/utils/Stream';\n\n/**\n * The `DiscussionComposer` component displays the composer content for starting\n * a new discussion. It adds a text field as a header control so the user can\n * enter the title of their discussion. It also overrides the `submit` and\n * `willExit` actions to account for the title.\n *\n * ### Attrs\n *\n * - All of the attrs for ComposerBody\n * - `titlePlaceholder`\n */\nexport default class DiscussionComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.placeholder = attrs.placeholder || extractText(app.translator.trans('core.forum.composer_discussion.body_placeholder'));\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_discussion.submit_button');\n    attrs.confirmExit = attrs.confirmExit || extractText(app.translator.trans('core.forum.composer_discussion.discard_confirmation'));\n    attrs.titlePlaceholder = attrs.titlePlaceholder || extractText(app.translator.trans('core.forum.composer_discussion.title_placeholder'));\n    attrs.className = 'ComposerBody--discussion';\n  }\n\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.composer.fields.title = this.composer.fields.title || Stream('');\n\n    /**\n     * The value of the title input.\n     *\n     * @type {Function}\n     */\n    this.title = this.composer.fields.title;\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n\n    items.add('title', <h3>{app.translator.trans('core.forum.composer_discussion.title')}</h3>, 100);\n\n    items.add(\n      'discussionTitle',\n      <h3>\n        <input\n          className=\"FormControl\"\n          bidi={this.title}\n          placeholder={this.attrs.titlePlaceholder}\n          disabled={!!this.attrs.disabled}\n          onkeydown={this.onkeydown.bind(this)}\n        />\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Handle the title input's keydown event. When the return key is pressed,\n   * move the focus to the start of the text editor.\n   *\n   * @param {KeyboardEvent} e\n   */\n  onkeydown(e) {\n    if (e.which === 13) {\n      // Return\n      e.preventDefault();\n      this.composer.editor.moveCursorTo(0);\n    }\n\n    e.redraw = false;\n  }\n\n  hasChanges() {\n    return this.title() || this.composer.fields.content();\n  }\n\n  /**\n   * Get the data to submit to the server when the discussion is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      title: this.title(),\n      content: this.composer.fields.content(),\n    };\n  }\n\n  onsubmit() {\n    this.loading = true;\n\n    const data = this.data();\n\n    app.store\n      .createRecord('discussions')\n      .save(data)\n      .then((discussion) => {\n        this.composer.hide();\n        app.discussions.refresh();\n        m.route.set(app.route.discussion(discussion));\n      }, this.loaded.bind(this));\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport DiscussionList from './DiscussionList';\nimport WelcomeHero from './WelcomeHero';\nimport DiscussionComposer from './DiscussionComposer';\nimport LogInModal from './LogInModal';\nimport DiscussionPage from './DiscussionPage';\nimport Dropdown from '../../common/components/Dropdown';\nimport Button from '../../common/components/Button';\nimport LinkButton from '../../common/components/LinkButton';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\nimport type Discussion from '../../common/models/Discussion';\n\nexport interface IIndexPageAttrs extends IPageAttrs {}\n\n/**\n * The `IndexPage` component displays the index page, including the welcome\n * hero, the sidebar, and the discussion list.\n */\nexport default class IndexPage<CustomAttrs extends IIndexPageAttrs = IIndexPageAttrs, CustomState = {}> extends Page<CustomAttrs, CustomState> {\n  static providesInitialSearch = true;\n  lastDiscussion?: Discussion;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    // If the user is returning from a discussion page, then take note of which\n    // discussion they have just visited. After the view is rendered, we will\n    // scroll down so that this discussion is in view.\n    if (app.previous.matches(DiscussionPage)) {\n      this.lastDiscussion = app.previous.get('discussion');\n    }\n\n    // If the user is coming from the discussion list, then they have either\n    // just switched one of the parameters (filter, sort, search) or they\n    // probably want to refresh the results. We will clear the discussion list\n    // cache so that results are reloaded.\n    if (app.previous.matches(IndexPage)) {\n      app.discussions.clear();\n    }\n\n    app.discussions.refreshParams(app.search.params(), (m.route.param('page') && Number(m.route.param('page'))) || 1);\n\n    app.history.push('index', extractText(app.translator.trans('core.forum.header.back_to_index_tooltip')));\n\n    this.bodyClass = 'App--index';\n    this.scrollTopOnCreate = false;\n  }\n\n  view() {\n    return (\n      <div className=\"IndexPage\">\n        {this.hero()}\n        <div className=\"container\">\n          <div className=\"sideNavContainer\">\n            <nav className=\"IndexPage-nav sideNav\">\n              <ul>{listItems(this.sidebarItems().toArray())}</ul>\n            </nav>\n            <div className=\"IndexPage-results sideNavOffset\">{this.contentItems().toArray()}</div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('toolbar', <div className=\"IndexPage-toolbar\">{this.toolbarItems().toArray()}</div>, 100);\n    items.add('discussionList', <DiscussionList state={app.discussions} />, 90);\n\n    return items;\n  }\n\n  toolbarItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('view', <ul className=\"IndexPage-toolbar-view\">{listItems(this.viewItems().toArray())}</ul>, 100);\n    items.add('action', <ul className=\"IndexPage-toolbar-action\">{listItems(this.actionItems().toArray())}</ul>, 90);\n\n    return items;\n  }\n\n  setTitle() {\n    app.setTitle(extractText(app.translator.trans('core.forum.index.meta_title_text')));\n    app.setTitleCount(0);\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.setTitle();\n\n    // Work out the difference between the height of this hero and that of the\n    // previous hero. Maintain the same scroll position relative to the bottom\n    // of the hero so that the sidebar doesn't jump around.\n    const oldHeroHeight = app.cache.heroHeight as number;\n    const heroHeight = (app.cache.heroHeight = this.$('.Hero').outerHeight() || 0);\n    const scrollTop = app.cache.scrollTop as number;\n\n    $('#app').css('min-height', ($(window).height() || 0) + heroHeight);\n\n    // Let browser handle scrolling on page reload.\n    if (app.previous.type == null) return;\n\n    // Only retain scroll position if we're coming from a discussion page.\n    // Otherwise, we've just changed the filter, so we should go to the top of the page.\n    if (this.lastDiscussion) {\n      $(window).scrollTop(scrollTop - oldHeroHeight + heroHeight);\n    } else {\n      $(window).scrollTop(0);\n    }\n\n    // If we've just returned from a discussion page, then the constructor will\n    // have set the `lastDiscussion` property. If this is the case, we want to\n    // scroll down to that discussion so that it's in view.\n    if (this.lastDiscussion) {\n      const $discussion = this.$(`li[data-id=\"${this.lastDiscussion.id()}\"] .DiscussionListItem`);\n\n      if ($discussion.length) {\n        const indexTop = $('#header').outerHeight() || 0;\n        const indexBottom = $(window).height() || 0;\n        const discussionOffset = $discussion.offset();\n        const discussionTop = (discussionOffset && discussionOffset.top) || 0;\n        const discussionBottom = discussionTop + ($discussion.outerHeight() || 0);\n\n        if (discussionTop < scrollTop + indexTop || discussionBottom > scrollTop + indexBottom) {\n          $(window).scrollTop(discussionTop - indexTop);\n        }\n      }\n    }\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeremove(vnode);\n\n    // Save the scroll position so we can restore it when we return to the\n    // discussion list.\n    app.cache.scrollTop = $(window).scrollTop();\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    $('#app').css('min-height', '');\n  }\n\n  /**\n   * Get the component to display as the hero.\n   */\n  hero() {\n    return <WelcomeHero />;\n  }\n\n  /**\n   * Build an item list for the sidebar of the index page. By default this is a\n   * \"New Discussion\" button, and then a DropdownSelect component containing a\n   * list of navigation items.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n    const canStartDiscussion = app.forum.attribute('canStartDiscussion') || !app.session.user;\n\n    items.add(\n      'newDiscussion',\n      <Button\n        icon=\"fas fa-edit\"\n        className=\"Button Button--primary IndexPage-newDiscussion\"\n        itemClassName=\"App-primaryControl\"\n        onclick={() => {\n          // If the user is not logged in, the promise rejects, and a login modal shows up.\n          // Since that's already handled, we dont need to show an error message in the console.\n          return this.newDiscussionAction().catch(() => {});\n        }}\n        disabled={!canStartDiscussion}\n      >\n        {app.translator.trans(`core.forum.index.${canStartDiscussion ? 'start_discussion_button' : 'cannot_start_discussion_button'}`)}\n      </Button>\n    );\n\n    items.add(\n      'nav',\n      <SelectDropdown\n        buttonClassName=\"Button\"\n        className=\"App-titleControl\"\n        accessibleToggleLabel={app.translator.trans('core.forum.index.toggle_sidenav_dropdown_accessible_label')}\n      >\n        {this.navItems().toArray()}\n      </SelectDropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the navigation in the sidebar of the index page. By\n   * default this is just the 'All Discussions' link.\n   */\n  navItems() {\n    const items = new ItemList<Mithril.Children>();\n    const params = app.search.stickyParams();\n\n    items.add(\n      'allDiscussions',\n      <LinkButton href={app.route('index', params)} icon=\"far fa-comments\">\n        {app.translator.trans('core.forum.index.all_discussions_link')}\n      </LinkButton>,\n      100\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the part of the toolbar which is concerned with how\n   * the results are displayed. By default this is just a select box to change\n   * the way discussions are sorted.\n   */\n  viewItems() {\n    const items = new ItemList<Mithril.Children>();\n    const sortMap = app.discussions.sortMap();\n\n    const sortOptions = Object.keys(sortMap).reduce((acc: any, sortId) => {\n      acc[sortId] = app.translator.trans(`core.forum.index_sort.${sortId}_button`);\n      return acc;\n    }, {});\n\n    items.add(\n      'sort',\n      <Dropdown\n        buttonClassName=\"Button\"\n        label={sortOptions[app.search.params().sort] || Object.keys(sortMap).map((key) => sortOptions[key])[0]}\n        accessibleToggleLabel={app.translator.trans('core.forum.index_sort.toggle_dropdown_accessible_label')}\n      >\n        {Object.keys(sortOptions).map((value) => {\n          const label = sortOptions[value];\n          const active = (app.search.params().sort || Object.keys(sortMap)[0]) === value;\n\n          return (\n            <Button icon={active ? 'fas fa-check' : true} onclick={app.search.changeSort.bind(app.search, value)} active={active}>\n              {label}\n            </Button>\n          );\n        })}\n      </Dropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the part of the toolbar which is about taking action\n   * on the results. By default this is just a \"mark all as read\" button.\n   */\n  actionItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'refresh',\n      <Button\n        title={app.translator.trans('core.forum.index.refresh_tooltip')}\n        icon=\"fas fa-sync\"\n        className=\"Button Button--icon\"\n        onclick={() => {\n          app.discussions.refresh();\n          if (app.session.user) {\n            app.store.find('users', app.session.user.id()!);\n            m.redraw();\n          }\n        }}\n      />\n    );\n\n    if (app.session.user) {\n      items.add(\n        'markAllAsRead',\n        <Button\n          title={app.translator.trans('core.forum.index.mark_all_as_read_tooltip')}\n          icon=\"fas fa-check\"\n          className=\"Button Button--icon\"\n          onclick={this.markAllAsRead.bind(this)}\n        />\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Open the composer for a new discussion or prompt the user to login.\n   */\n  newDiscussionAction(): Promise<unknown> {\n    return new Promise((resolve, reject) => {\n      if (app.session.user) {\n        app.composer.load(DiscussionComposer, { user: app.session.user });\n        app.composer.show();\n\n        return resolve(app.composer);\n      } else {\n        app.modal.show(LogInModal);\n\n        return reject();\n      }\n    });\n  }\n\n  /**\n   * Mark all discussions as read.\n   */\n  markAllAsRead() {\n    const confirmation = confirm(extractText(app.translator.trans('core.forum.index.mark_all_as_read_confirmation')));\n\n    if (confirmation) {\n      app.session.user?.save({ markedAllAsReadAt: new Date() });\n    }\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport Placeholder from '../../common/components/Placeholder';\nimport CommentPost from './CommentPost';\nimport type Post from '../../common/models/Post';\nimport type Mithril from 'mithril';\nimport type User from '../../common/models/User';\n\n/**\n * The `PostsUserPage` component shows a user's activity feed inside of their\n * profile.\n */\nexport default class PostsUserPage extends UserPage {\n  /**\n   * Whether or not the activity feed is currently loading.\n   */\n  loading: boolean = true;\n\n  /**\n   * Whether or not there are any more activity items that can be loaded.\n   */\n  moreResults: boolean = false;\n\n  /**\n   * The Post models in the feed.\n   */\n  posts: Post[] = [];\n\n  /**\n   * The number of activity items to load per request.\n   */\n  loadLimit: number = 20;\n\n  oninit(vnode: Mithril.Vnode<IUserPageAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loadUser(m.route.param('username'));\n  }\n\n  content() {\n    if (this.posts.length === 0 && !this.loading) {\n      return (\n        <div className=\"PostsUserPage\">\n          <Placeholder text={app.translator.trans('core.forum.user.posts_empty_text')} />\n        </div>\n      );\n    }\n\n    let footer;\n\n    if (this.loading) {\n      footer = <LoadingIndicator />;\n    } else if (this.moreResults) {\n      footer = (\n        <div className=\"PostsUserPage-loadMore\">\n          <Button className=\"Button\" onclick={this.loadMore.bind(this)}>\n            {app.translator.trans('core.forum.user.posts_load_more_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostsUserPage\">\n        <ul className=\"PostsUserPage-list\">\n          {this.posts.map((post) => (\n            <li>\n              <div className=\"PostsUserPage-discussion\">\n                {app.translator.trans('core.forum.user.in_discussion_text', {\n                  discussion: <Link href={app.route.post(post)}>{this.discussionTitle(post)}</Link>,\n                })}\n              </div>\n\n              <CommentPost post={post} />\n            </li>\n          ))}\n        </ul>\n        <div className=\"PostsUserPage-loadMore\">{footer}</div>\n      </div>\n    );\n  }\n\n  /**\n   * Initialize the component with a user, and trigger the loading of their\n   * activity feed.\n   */\n  show(user: User): void {\n    super.show(user);\n\n    this.refresh();\n  }\n\n  /**\n   * Clear and reload the user's activity feed.\n   */\n  refresh() {\n    this.loading = true;\n    this.posts = [];\n\n    m.redraw();\n\n    this.loadResults().then(this.parseResults.bind(this));\n  }\n\n  /**\n   * Load a new page of the user's activity feed.\n   *\n   * @protected\n   */\n  loadResults(offset = 0) {\n    return app.store.find<Post[]>('posts', {\n      filter: {\n        author: this.user!.username(),\n        type: 'comment',\n      },\n      page: { offset, limit: this.loadLimit },\n      sort: '-createdAt',\n    });\n  }\n\n  /**\n   * Load the next page of results.\n   */\n  loadMore() {\n    this.loading = true;\n    this.loadResults(this.posts.length).then(this.parseResults.bind(this));\n  }\n\n  /**\n   * Parse results and append them to the activity feed.\n   */\n  parseResults(results: Post[]): Post[] {\n    this.loading = false;\n\n    this.posts.push(...results);\n\n    this.moreResults = results.length >= this.loadLimit;\n    m.redraw();\n\n    return results;\n  }\n\n  discussionTitle(post: Post): string {\n    return post.discussion().title();\n  }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\nimport { ApiQueryParamsPlural, ApiResponsePlural } from '../Store';\n\nexport interface Page<TModel> {\n  number: number;\n  items: TModel[];\n\n  hasPrev?: boolean;\n  hasNext?: boolean;\n}\n\nexport interface PaginationLocation {\n  page: number;\n  startIndex?: number;\n  endIndex?: number;\n}\n\nexport interface PaginatedListParams {\n  [key: string]: any;\n}\n\nexport interface PaginatedListRequestParams extends Omit<ApiQueryParamsPlural, 'include'> {\n  include?: string | string[];\n}\n\nexport default abstract class PaginatedListState<T extends Model, P extends PaginatedListParams = PaginatedListParams> {\n  protected location!: PaginationLocation;\n  protected pageSize: number;\n\n  protected pages: Page<T>[] = [];\n  protected params: P = {} as P;\n\n  protected initialLoading: boolean = false;\n  protected loadingPrev: boolean = false;\n  protected loadingNext: boolean = false;\n\n  protected constructor(params: P = {} as P, page: number = 1, pageSize: number = 20) {\n    this.params = params;\n\n    this.location = { page };\n    this.pageSize = pageSize;\n  }\n\n  abstract get type(): string;\n\n  public clear(): void {\n    this.pages = [];\n\n    m.redraw();\n  }\n\n  public loadPrev(): Promise<void> {\n    if (this.loadingPrev || this.getLocation().page === 1) return Promise.resolve();\n\n    this.loadingPrev = true;\n\n    const page: number = this.getPrevPageNumber();\n\n    return this.loadPage(page)\n      .then(this.parseResults.bind(this, page))\n      .finally(() => (this.loadingPrev = false));\n  }\n\n  public loadNext(): Promise<void> {\n    if (this.loadingNext) return Promise.resolve();\n\n    this.loadingNext = true;\n\n    const page: number = this.getNextPageNumber();\n\n    return this.loadPage(page)\n      .then(this.parseResults.bind(this, page))\n      .finally(() => (this.loadingNext = false));\n  }\n\n  protected parseResults(pg: number, results: ApiResponsePlural<T>): void {\n    const pageNum = Number(pg);\n\n    const links = results.payload?.links;\n    const page = {\n      number: pageNum,\n      items: results,\n      hasNext: !!links?.next,\n      hasPrev: !!links?.prev,\n    };\n\n    if (this.isEmpty() || pageNum > this.getNextPageNumber() - 1) {\n      this.pages.push(page);\n    } else {\n      this.pages.unshift(page);\n    }\n\n    this.location = { page: pageNum };\n\n    m.redraw();\n  }\n\n  /**\n   * Load a new page of results.\n   */\n  protected loadPage(page = 1): Promise<ApiResponsePlural<T>> {\n    const reqParams = this.requestParams();\n\n    const include = Array.isArray(reqParams.include) ? reqParams.include.join(',') : reqParams.include;\n\n    const params: ApiQueryParamsPlural = {\n      ...reqParams,\n      page: {\n        ...reqParams.page,\n        offset: this.pageSize * (page - 1),\n      },\n      include,\n    };\n\n    return app.store.find<T[]>(this.type, params);\n  }\n\n  /**\n   * Get the parameters that should be passed in the API request.\n   * Do not include page offset unless subclass overrides loadPage.\n   *\n   * @abstract\n   * @see loadPage\n   */\n  protected requestParams(): PaginatedListRequestParams {\n    return this.params;\n  }\n\n  /**\n   * Update the `this.params` object, calling `refresh` if they have changed.\n   * Use `requestParams` for converting `this.params` into API parameters\n   *\n   * @param newParams\n   * @param page\n   * @see requestParams\n   */\n  public refreshParams(newParams: P, page: number): Promise<void> {\n    if (this.isEmpty() || this.paramsChanged(newParams)) {\n      this.params = newParams;\n\n      return this.refresh(page);\n    }\n\n    return Promise.resolve();\n  }\n\n  public refresh(page: number = 1): Promise<void> {\n    this.initialLoading = true;\n    this.loadingPrev = false;\n    this.loadingNext = false;\n\n    this.clear();\n\n    this.location = { page };\n\n    return this.loadPage()\n      .then((results) => {\n        this.pages = [];\n        this.parseResults(this.location.page, results);\n      })\n      .finally(() => (this.initialLoading = false));\n  }\n\n  public getPages(): Page<T>[] {\n    return this.pages;\n  }\n  public getLocation(): PaginationLocation {\n    return this.location;\n  }\n\n  public isLoading(): boolean {\n    return this.initialLoading || this.loadingNext || this.loadingPrev;\n  }\n  public isInitialLoading(): boolean {\n    return this.initialLoading;\n  }\n  public isLoadingPrev(): boolean {\n    return this.loadingPrev;\n  }\n  public isLoadingNext(): boolean {\n    return this.loadingNext;\n  }\n\n  /**\n   * Returns true when the number of items across all loaded pages is not 0.\n   *\n   * @see isEmpty\n   */\n  public hasItems(): boolean {\n    return !!this.getAllItems().length;\n  }\n\n  /**\n   * Returns true when there aren't any items *and* the state has already done its initial loading.\n   * If you want to know whether there are items regardless of load state, use `hasItems()` instead\n   *\n   * @see hasItems\n   */\n  public isEmpty(): boolean {\n    return !this.isInitialLoading() && !this.hasItems();\n  }\n\n  public hasPrev(): boolean {\n    return !!this.pages[0]?.hasPrev;\n  }\n  public hasNext(): boolean {\n    return !!this.pages[this.pages.length - 1]?.hasNext;\n  }\n\n  /**\n   * Stored state parameters.\n   */\n  public getParams(): P {\n    return this.params;\n  }\n\n  protected getNextPageNumber(): number {\n    const pg = this.pages[this.pages.length - 1]?.number;\n\n    if (pg && !isNaN(pg)) {\n      return pg + 1;\n    } else {\n      return this.location.page;\n    }\n  }\n  protected getPrevPageNumber(): number {\n    const pg = this.pages[0]?.number;\n\n    if (pg && !isNaN(pg)) {\n      // If the calculated page number is less than 1,\n      // return 1 as the prev page (first possible page number)\n      return Math.max(pg - 1, 1);\n    } else {\n      return this.location.page;\n    }\n  }\n\n  protected paramsChanged(newParams: P): boolean {\n    return Object.keys(newParams).some((key) => this.getParams()[key] !== newParams[key]);\n  }\n\n  protected getAllItems(): T[] {\n    return this.getPages()\n      .map((pg) => pg.items)\n      .flat();\n  }\n}\n","export default class EventEmitter {\n  protected events: any = {};\n\n  public constructor() {\n    this.events = {};\n  }\n\n  public on(event: string, listener: Function): EventEmitter {\n    if (!this.events[event]) {\n      this.events[event] = [];\n    }\n\n    this.events[event].push(listener);\n\n    return this;\n  }\n\n  public emit(event: string, ...args: any[]): void {\n    if (this.events[event]) {\n      this.events[event].forEach((listener: Function) => listener(...args));\n    }\n  }\n}\n","import app from '../../forum/app';\nimport PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from '../../common/states/PaginatedListState';\nimport Discussion from '../../common/models/Discussion';\nimport { ApiResponsePlural } from '../../common/Store';\nimport EventEmitter from '../../common/utils/EventEmitter';\n\nexport interface DiscussionListParams extends PaginatedListParams {\n  sort?: string;\n}\n\nconst globalEventEmitter = new EventEmitter();\n\nexport default class DiscussionListState<P extends DiscussionListParams = DiscussionListParams> extends PaginatedListState<Discussion, P> {\n  protected extraDiscussions: Discussion[] = [];\n  protected eventEmitter: EventEmitter;\n\n  constructor(params: P, page: number = 1) {\n    super(params, page, 20);\n\n    this.eventEmitter = globalEventEmitter.on('discussion.deleted', this.deleteDiscussion.bind(this));\n  }\n\n  get type(): string {\n    return 'discussions';\n  }\n\n  requestParams(): PaginatedListRequestParams {\n    const params = {\n      include: ['user', 'lastPostedUser'],\n      filter: this.params.filter || {},\n      sort: this.sortMap()[this.params.sort ?? ''],\n    };\n\n    if (this.params.q) {\n      params.filter.q = this.params.q;\n      params.include.push('mostRelevantPost', 'mostRelevantPost.user');\n    }\n\n    return params;\n  }\n\n  protected loadPage(page: number = 1): Promise<ApiResponsePlural<Discussion>> {\n    const preloadedDiscussions = app.preloadedApiDocument<Discussion[]>();\n\n    if (preloadedDiscussions) {\n      this.initialLoading = false;\n\n      return Promise.resolve(preloadedDiscussions);\n    }\n\n    return super.loadPage(page);\n  }\n\n  clear(): void {\n    super.clear();\n\n    this.extraDiscussions = [];\n  }\n\n  /**\n   * Get a map of sort keys (which appear in the URL, and are used for\n   * translation) to the API sort value that they represent.\n   */\n  sortMap() {\n    const map: any = {};\n\n    if (this.params.q) {\n      map.relevance = '';\n    }\n    map.latest = '-lastPostedAt';\n    map.top = '-commentCount';\n    map.newest = '-createdAt';\n    map.oldest = 'createdAt';\n\n    return map;\n  }\n\n  /**\n   * In the last request, has the user searched for a discussion?\n   */\n  isSearchResults(): boolean {\n    return !!this.params.q;\n  }\n\n  removeDiscussion(discussion: Discussion): void {\n    this.eventEmitter.emit('discussion.deleted', discussion);\n  }\n\n  deleteDiscussion(discussion: Discussion): void {\n    for (const page of this.pages) {\n      const index = page.items.indexOf(discussion);\n\n      if (index !== -1) {\n        page.items.splice(index, 1);\n        break;\n      }\n    }\n\n    const index = this.extraDiscussions.indexOf(discussion);\n\n    if (index !== -1) {\n      this.extraDiscussions.splice(index);\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Add a discussion to the top of the list.\n   */\n  addDiscussion(discussion: Discussion): void {\n    this.removeDiscussion(discussion);\n    this.extraDiscussions.unshift(discussion);\n\n    m.redraw();\n  }\n\n  protected getAllItems(): Discussion[] {\n    return this.extraDiscussions.concat(super.getAllItems());\n  }\n\n  public getPages(): Page<Discussion>[] {\n    const pages = super.getPages();\n\n    if (this.extraDiscussions.length) {\n      return [\n        {\n          number: -1,\n          items: this.extraDiscussions,\n        },\n        ...pages,\n      ];\n    }\n\n    return pages;\n  }\n}\n","import UserPage, { IUserPageAttrs } from './UserPage';\nimport DiscussionList from './DiscussionList';\nimport DiscussionListState from '../states/DiscussionListState';\nimport type Mithril from 'mithril';\nimport type User from '../../common/models/User';\n\n/**\n * The `DiscussionsUserPage` component shows a discussion list inside of a user\n * page.\n */\nexport default class DiscussionsUserPage extends UserPage<IUserPageAttrs, DiscussionListState> {\n  oninit(vnode: Mithril.Vnode<IUserPageAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loadUser(m.route.param('username'));\n  }\n\n  show(user: User): void {\n    super.show(user);\n\n    this.state = new DiscussionListState({\n      filter: { author: user.username() },\n      sort: 'newest',\n    });\n\n    this.state.refresh();\n  }\n\n  content() {\n    return (\n      <div className=\"DiscussionsUserPage\">\n        <DiscussionList state={this.state} />\n      </div>\n    );\n  }\n}\n","/**\n * An event handler factory that makes it simpler to implement data binding\n * for component event listeners.\n *\n * The handler created by this factory passes the DOM element's attribute\n * identified by the first argument to the callback (usually a bidirectional\n * Mithril stream: https://mithril.js.org/stream.html#bidirectional-bindings).\n *\n * Replaces m.withAttr for Mithril 2.0.\n * @see https://mithril.js.org/archive/v0.2.5/mithril.withAttr.html\n */\nexport default (key: string, cb: Function) =>\n  function (this: Element) {\n    cb(this.getAttribute(key) || (this as any)[key]);\n  };\n","import Component, { ComponentAttrs } from '../Component';\nimport LoadingIndicator from './LoadingIndicator';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport withAttr from '../utils/withAttr';\nimport type Mithril from 'mithril';\n\nexport interface ICheckboxAttrs extends ComponentAttrs {\n  state?: boolean;\n  loading?: boolean;\n  disabled?: boolean;\n  onchange: (checked: boolean, component: Checkbox<this>) => void;\n}\n\n/**\n * The `Checkbox` component defines a checkbox input.\n *\n * ### Attrs\n *\n * - `state` Whether or not the checkbox is checked.\n * - `className` The class name for the root element.\n * - `disabled` Whether or not the checkbox is disabled.\n * - `loading` Whether or not the checkbox is loading.\n * - `onchange` A callback to run when the checkbox is checked/unchecked.\n * - `children` A text label to display next to the checkbox.\n */\nexport default class Checkbox<CustomAttrs extends ICheckboxAttrs = ICheckboxAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const className = classList([\n      'Checkbox',\n      this.attrs.state ? 'on' : 'off',\n      this.attrs.className,\n      this.attrs.loading && 'loading',\n      this.attrs.disabled && 'disabled',\n    ]);\n\n    return (\n      <label className={className}>\n        <input type=\"checkbox\" checked={this.attrs.state} disabled={this.attrs.disabled} onchange={withAttr('checked', this.onchange.bind(this))} />\n        <div className=\"Checkbox-display\" aria-hidden=\"true\">\n          {this.getDisplay()}\n        </div>\n        {vnode.children}\n      </label>\n    );\n  }\n\n  /**\n   * Get the template for the checkbox's display (tick/cross icon).\n   */\n  protected getDisplay(): Mithril.Children {\n    return this.attrs.loading ? <LoadingIndicator display=\"unset\" size=\"small\" /> : icon(this.attrs.state ? 'fas fa-check' : 'fas fa-times');\n  }\n\n  /**\n   * Run a callback when the state of the checkbox is changed.\n   */\n  protected onchange(checked: boolean): void {\n    if (this.attrs.onchange) this.attrs.onchange(checked, this);\n  }\n}\n","import classList from '../utils/classList';\nimport Checkbox, { ICheckboxAttrs } from './Checkbox';\n\n/**\n * The `Switch` component is a `Checkbox`, but with a switch display instead of\n * a tick/cross one.\n */\nexport default class Switch extends Checkbox {\n  static initAttrs(attrs: ICheckboxAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Checkbox--switch');\n  }\n\n  getDisplay() {\n    return !!this.attrs.loading && super.getDisplay();\n  }\n}\n","import Component from '../Component';\nimport listItems from '../helpers/listItems';\n\n/**\n * The `FieldSet` component defines a collection of fields, displayed in a list\n * underneath a title. Accepted properties are:\n *\n * - `className` The class name for the fieldset.\n * - `label` The title of this group of fields.\n *\n * The children should be an array of items to show in the fieldset.\n */\nexport default class FieldSet extends Component {\n  view(vnode) {\n    return (\n      <fieldset className={this.attrs.className}>\n        <legend>{this.attrs.label}</legend>\n        <ul>{listItems(vnode.children)}</ul>\n      </fieldset>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Checkbox from '../../common/components/Checkbox';\nimport icon from '../../common/helpers/icon';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `NotificationGrid` component displays a table of notification types and\n * methods, allowing the user to toggle each combination.\n *\n * ### Attrs\n *\n * - `user`\n */\nexport default class NotificationGrid extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * Information about the available notification methods.\n     *\n     * @type {({ name: string, icon: string, label: import('mithril').Children })[]}\n     */\n    this.methods = this.notificationMethods().toArray();\n\n    /**\n     * A map of which notification checkboxes are loading.\n     *\n     * @type {Record<string, boolean>}\n     */\n    this.loading = {};\n\n    /**\n     * Information about the available notification types.\n     *\n     * @type {({ name: string, icon: string, label: import('mithril').Children })[]}\n     */\n    this.types = this.notificationTypes().toArray();\n  }\n\n  view() {\n    const preferences = this.attrs.user.preferences();\n\n    return (\n      <table className=\"NotificationGrid\">\n        <thead>\n          <tr>\n            <td />\n            {this.methods.map((method) => (\n              <th className=\"NotificationGrid-groupToggle\" onclick={this.toggleMethod.bind(this, method.name)}>\n                {icon(method.icon)} {method.label}\n              </th>\n            ))}\n          </tr>\n        </thead>\n\n        <tbody>\n          {this.types.map((type) => (\n            <tr>\n              <td className=\"NotificationGrid-groupToggle\" onclick={this.toggleType.bind(this, type.name)}>\n                {icon(type.icon)} {type.label}\n              </td>\n              {this.methods.map((method) => {\n                const key = this.preferenceKey(type.name, method.name);\n\n                return (\n                  <td className=\"NotificationGrid-checkbox\">\n                    <Checkbox\n                      state={!!preferences[key]}\n                      loading={this.loading[key]}\n                      disabled={!(key in preferences)}\n                      onchange={this.toggle.bind(this, [key])}\n                    >\n                      <span className=\"sr-only\">\n                        {app.translator.trans('core.forum.settings.notification_checkbox_a11y_label_template', {\n                          description: type.label,\n                          method: method.label,\n                        })}\n                      </span>\n                    </Checkbox>\n                  </td>\n                );\n              })}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.$('thead .NotificationGrid-groupToggle').bind('mouseenter mouseleave', function (e) {\n      const i = parseInt($(this).index(), 10) + 1;\n      $(this)\n        .parents('table')\n        .find('td:nth-child(' + i + ')')\n        .toggleClass('highlighted', e.type === 'mouseenter');\n    });\n\n    this.$('tbody .NotificationGrid-groupToggle').bind('mouseenter mouseleave', function (e) {\n      $(this)\n        .parent()\n        .find('td')\n        .toggleClass('highlighted', e.type === 'mouseenter');\n    });\n  }\n\n  /**\n   * Toggle the state of the given preferences, based on the value of the first\n   * one.\n   *\n   * @param {string[]} keys\n   */\n  toggle(keys) {\n    const user = this.attrs.user;\n    const preferences = user.preferences();\n    const enabled = !preferences[keys[0]];\n\n    keys.forEach((key) => {\n      this.loading[key] = true;\n      preferences[key] = enabled;\n    });\n\n    m.redraw();\n\n    user.save({ preferences }).then(() => {\n      keys.forEach((key) => (this.loading[key] = false));\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Toggle all notification types for the given method.\n   *\n   * @param {string} method\n   */\n  toggleMethod(method) {\n    const keys = this.types.map((type) => this.preferenceKey(type.name, method)).filter((key) => key in this.attrs.user.preferences());\n\n    this.toggle(keys);\n  }\n\n  /**\n   * Toggle all notification methods for the given type.\n   *\n   * @param {string} type\n   */\n  toggleType(type) {\n    const keys = this.methods.map((method) => this.preferenceKey(type, method.name)).filter((key) => key in this.attrs.user.preferences());\n\n    this.toggle(keys);\n  }\n\n  /**\n   * Get the name of the preference key for the given notification type-method\n   * combination.\n   *\n   * @param {string} type\n   * @param {string} method\n   * @return {string}\n   */\n  preferenceKey(type, method) {\n    return 'notify_' + type + '_' + method;\n  }\n\n  /**\n   * Build an item list for the notification methods to display in the grid.\n   *\n   * Each notification method is an object which has the following properties:\n   *\n   * - `name` The name of the notification method.\n   * - `icon` The icon to display in the column header.\n   * - `label` The label to display in the column header.\n   *\n   * @return {ItemList<{ name: string, icon: string, label: import('mithril').Children }>}\n   */\n  notificationMethods() {\n    const items = new ItemList();\n\n    items.add('alert', {\n      name: 'alert',\n      icon: 'fas fa-bell',\n      label: app.translator.trans('core.forum.settings.notify_by_web_heading'),\n    });\n\n    items.add('email', {\n      name: 'email',\n      icon: 'far fa-envelope',\n      label: app.translator.trans('core.forum.settings.notify_by_email_heading'),\n    });\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the notification types to display in the grid.\n   *\n   * Each notification type is an object which has the following properties:\n   *\n   * - `name` The name of the notification type.\n   * - `icon` The icon to display in the notification grid row.\n   * - `label` The label to display in the notification grid row.\n   *\n   * @return {ItemList<{ name: string, icon: string, label: import('mithril').Children}>}\n   */\n  notificationTypes() {\n    const items = new ItemList();\n\n    items.add('discussionRenamed', {\n      name: 'discussionRenamed',\n      icon: 'fas fa-pencil-alt',\n      label: app.translator.trans('core.forum.settings.notify_discussion_renamed_label'),\n    });\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `ChangePasswordModal` component shows a modal dialog which allows the\n * user to send themself a password reset email.\n */\nexport default class ChangePasswordModal<CustomAttrs extends IInternalModalAttrs = IInternalModalAttrs> extends Modal<CustomAttrs> {\n  className() {\n    return 'ChangePasswordModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.change_password.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">{this.fields().toArray()}</div>\n      </div>\n    );\n  }\n\n  fields() {\n    const fields = new ItemList<Mithril.Children>();\n\n    fields.add('help', <p className=\"helpText\">{app.translator.trans('core.forum.change_password.text')}</p>);\n\n    fields.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.change_password.send_button')}\n        </Button>\n      </div>\n    );\n\n    return fields;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute('apiUrl') + '/forgot',\n        body: this.requestBody(),\n      })\n      .then(this.hide.bind(this), this.loaded.bind(this));\n  }\n\n  requestBody() {\n    return { email: app.session.user!.email() };\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `ChangeEmailModal` component shows a modal dialog which allows the user\n * to change their email address.\n */\nexport default class ChangeEmailModal<CustomAttrs extends IInternalModalAttrs = IInternalModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n\n  /**\n   * Whether or not the email has been changed successfully.\n   */\n  success: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.email = Stream(app.session.user!.email() || '');\n    this.password = Stream('');\n  }\n\n  className() {\n    return 'ChangeEmailModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.change_email.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">{this.fields().toArray()}</div>\n      </div>\n    );\n  }\n\n  fields(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.success) {\n      items.add(\n        'help',\n        <p className=\"helpText\">\n          {app.translator.trans('core.forum.change_email.confirmation_message', {\n            email: <strong>{this.email()}</strong>,\n          })}\n        </p>\n      );\n\n      items.add(\n        'dismiss',\n        <div className=\"Form-group\">\n          <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n            {app.translator.trans('core.forum.change_email.dismiss_button')}\n          </Button>\n        </div>\n      );\n    } else {\n      items.add(\n        'email',\n        <div className=\"Form-group\">\n          <input\n            type=\"email\"\n            name=\"email\"\n            className=\"FormControl\"\n            placeholder={app.session.user!.email()}\n            bidi={this.email}\n            disabled={this.loading}\n          />\n        </div>\n      );\n\n      items.add(\n        'password',\n        <div className=\"Form-group\">\n          <input\n            type=\"password\"\n            name=\"password\"\n            className=\"FormControl\"\n            autocomplete=\"current-password\"\n            placeholder={app.translator.trans('core.forum.change_email.confirm_password_placeholder')}\n            bidi={this.password}\n            disabled={this.loading}\n          />\n        </div>\n      );\n\n      items.add(\n        'submit',\n        <div className=\"Form-group\">\n          <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n            {app.translator.trans('core.forum.change_email.submit_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    return items;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    // If the user hasn't actually entered a different email address, we don't\n    // need to do anything. Woot!\n    if (this.email() === app.session.user!.email()) {\n      this.hide();\n      return;\n    }\n\n    this.loading = true;\n    this.alertAttrs = null;\n\n    app.session\n      .user!.save(this.requestAttributes(), {\n        errorHandler: this.onerror.bind(this),\n        meta: { password: this.password() },\n      })\n      .then(() => {\n        this.success = true;\n      })\n      .catch(() => {})\n      .then(this.loaded.bind(this));\n  }\n\n  requestAttributes() {\n    return { email: this.email() };\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 401 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.change_email.incorrect_password_message');\n    }\n\n    super.onerror(error);\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport Switch from '../../common/components/Switch';\nimport Button from '../../common/components/Button';\nimport FieldSet from '../../common/components/FieldSet';\nimport NotificationGrid from './NotificationGrid';\nimport ChangePasswordModal from './ChangePasswordModal';\nimport ChangeEmailModal from './ChangeEmailModal';\nimport listItems from '../../common/helpers/listItems';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\n/**\n * The `SettingsPage` component displays the user's settings control panel, in\n * the context of their user profile.\n */\nexport default class SettingsPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs> extends UserPage<CustomAttrs> {\n  discloseOnlineLoading?: boolean;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.show(app.session.user!);\n\n    app.setTitle(extractText(app.translator.trans('core.forum.settings.title')));\n  }\n\n  content() {\n    return (\n      <div className=\"SettingsPage\">\n        <ul>{listItems(this.settingsItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list for the user's settings controls.\n   */\n  settingsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    ['account', 'notifications', 'privacy'].forEach((section, index) => {\n      const sectionItems = `${section}Items` as 'accountItems' | 'notificationsItems' | 'privacyItems';\n\n      items.add(\n        section,\n        <FieldSet className={`Settings-${section}`} label={app.translator.trans(`core.forum.settings.${section}_heading`)}>\n          {this[sectionItems]().toArray()}\n        </FieldSet>,\n        100 - index * 10\n      );\n    });\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's account settings.\n   */\n  accountItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'changePassword',\n      <Button className=\"Button\" onclick={() => app.modal.show(ChangePasswordModal)}>\n        {app.translator.trans('core.forum.settings.change_password_button')}\n      </Button>,\n      100\n    );\n\n    items.add(\n      'changeEmail',\n      <Button className=\"Button\" onclick={() => app.modal.show(ChangeEmailModal)}>\n        {app.translator.trans('core.forum.settings.change_email_button')}\n      </Button>,\n      90\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's notification settings.\n   */\n  notificationsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('notificationGrid', <NotificationGrid user={this.user} />, 100);\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's privacy settings.\n   */\n  privacyItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'discloseOnline',\n      <Switch\n        state={this.user!.preferences()?.discloseOnline}\n        onchange={(value: boolean) => {\n          this.discloseOnlineLoading = true;\n\n          this.user!.savePreferences({ discloseOnline: value }).then(() => {\n            this.discloseOnlineLoading = false;\n            m.redraw();\n          });\n        }}\n        loading={this.discloseOnlineLoading}\n      >\n        {app.translator.trans('core.forum.settings.privacy_disclose_online_label')}\n      </Switch>,\n      100\n    );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport NotificationList from './NotificationList';\nimport type Mithril from 'mithril';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `NotificationsPage` component shows the notifications list. It is only\n * used on mobile devices where the notifications dropdown is within the drawer.\n */\nexport default class NotificationsPage<CustomAttrs extends IPageAttrs = IPageAttrs> extends Page<CustomAttrs> {\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    app.history.push('notifications', extractText(app.translator.trans('core.forum.notifications.title')));\n\n    app.notifications.load();\n\n    this.bodyClass = 'App--notifications';\n  }\n\n  view() {\n    return (\n      <div className=\"NotificationsPage\">\n        <NotificationList state={app.notifications}></NotificationList>\n      </div>\n    );\n  }\n}\n","import type Mithril from 'mithril';\nimport type { RouteResolver } from '../Application';\nimport type { default as Component, ComponentAttrs } from '../Component';\n\n/**\n * Generates a route resolver for a given component.\n *\n * In addition to regular route resolver functionality:\n * - It provide the current route name as an attr\n * - It sets a key on the component so a rerender will be triggered on route change.\n */\nexport default class DefaultResolver<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> implements RouteResolver<Attrs, Comp, RouteArgs>\n{\n  component: new () => Comp;\n  routeName: string;\n\n  constructor(component: new () => Comp, routeName: string) {\n    this.component = component;\n    this.routeName = routeName;\n  }\n\n  /**\n   * When a route change results in a changed key, a full page\n   * rerender occurs. This method can be overriden in subclasses\n   * to prevent rerenders on some route changes.\n   */\n  makeKey(): string {\n    return this.routeName + JSON.stringify(m.route.param());\n  }\n\n  makeAttrs(vnode: Mithril.Vnode<Attrs, Comp>): Attrs & { routeName: string } {\n    return {\n      ...vnode.attrs,\n      routeName: this.routeName,\n    };\n  }\n\n  onmatch(args: RouteArgs, requestedPath: string, route: string): { new (): Comp } {\n    return this.component;\n  }\n\n  render(vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children {\n    return [{ ...vnode, attrs: this.makeAttrs(vnode), key: this.makeKey() }];\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport DefaultResolver from '../../common/resolvers/DefaultResolver';\nimport DiscussionPage, { IDiscussionPageAttrs } from '../components/DiscussionPage';\n\n/**\n * A custom route resolver for DiscussionPage that generates the same key to all posts\n * on the same discussion. It triggers a scroll when going from one post to another\n * in the same discussion.\n */\nexport default class DiscussionPageResolver<\n  Attrs extends IDiscussionPageAttrs = IDiscussionPageAttrs,\n  RouteArgs extends Record<string, unknown> = {}\n> extends DefaultResolver<Attrs, DiscussionPage<Attrs>, RouteArgs> {\n  static scrollToPostNumber: number | null = null;\n\n  /**\n   * Remove optional parts of a discussion's slug to keep the substring\n   * that bijectively maps to a discussion object. By default this just\n   * extracts the numerical ID from the slug. If a custom discussion\n   * slugging driver is used, this may need to be overriden.\n   * @param slug\n   */\n  canonicalizeDiscussionSlug(slug: string | undefined) {\n    if (!slug) return;\n    return slug.split('-')[0];\n  }\n\n  /**\n   * @inheritdoc\n   */\n  makeKey() {\n    const params = { ...m.route.param() };\n    if ('near' in params) {\n      delete params.near;\n    }\n    params.id = this.canonicalizeDiscussionSlug(params.id);\n    return this.routeName.replace('.near', '') + JSON.stringify(params);\n  }\n\n  onmatch(args: Attrs & RouteArgs, requestedPath: string, route: string) {\n    if (app.current.matches(DiscussionPage) && this.canonicalizeDiscussionSlug(args.id) === this.canonicalizeDiscussionSlug(m.route.param('id'))) {\n      // By default, the first post number of any discussion is 1\n      DiscussionPageResolver.scrollToPostNumber = args.near || 1;\n    }\n\n    return super.onmatch(args, requestedPath, route);\n  }\n\n  render(vnode: Mithril.Vnode<Attrs, DiscussionPage<Attrs>>) {\n    if (DiscussionPageResolver.scrollToPostNumber !== null) {\n      const number = DiscussionPageResolver.scrollToPostNumber;\n      // Scroll after a timeout to avoid clashes with the render.\n      setTimeout(() => app.current.get('stream').goToNumber(number));\n      DiscussionPageResolver.scrollToPostNumber = null;\n    }\n\n    return super.render(vnode);\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport type Mithril from 'mithril';\nimport app from '../app';\n\nexport interface ILabelValueAttrs extends ComponentAttrs {\n  label: Mithril.Children;\n  value: Mithril.Children;\n}\n\n/**\n * A generic component for displaying a label and value inline.\n * Created to avoid reinventing the wheel.\n *\n * `label: value`\n */\nexport default class LabelValue<CustomAttrs extends ILabelValueAttrs = ILabelValueAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {\n    return (\n      <div className=\"LabelValue\">\n        <div className=\"LabelValue-label\">\n          {app.translator.trans('core.lib.data_segment.label', {\n            label: this.attrs.label,\n          })}\n        </div>\n        <div className=\"LabelValue-value\">{this.attrs.value}</div>\n      </div>\n    );\n  }\n}\n","import app from '../app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport icon from '../../common/helpers/icon';\nimport Button from '../../common/components/Button';\nimport humanTime from '../../common/helpers/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport LabelValue from '../../common/components/LabelValue';\nimport extractText from '../../common/utils/extractText';\nimport classList from '../../common/utils/classList';\nimport Tooltip from '../../common/components/Tooltip';\nimport type Mithril from 'mithril';\nimport type AccessToken from '../../common/models/AccessToken';\nimport { NestedStringArray } from '@askvortsov/rich-icu-message-formatter';\nimport IPAddress from '../../common/components/IPAddress';\n\nexport interface IAccessTokensListAttrs extends ComponentAttrs {\n  tokens: AccessToken[];\n  type: 'session' | 'developer_token';\n  hideTokens?: boolean;\n  icon?: string;\n  ondelete?: (token: AccessToken) => void;\n}\n\nexport default class AccessTokensList<CustomAttrs extends IAccessTokensListAttrs = IAccessTokensListAttrs> extends Component<CustomAttrs> {\n  protected loading: Record<string, boolean | undefined> = {};\n  protected showingTokens: Record<string, boolean | undefined> = {};\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {\n    return (\n      <div className=\"AccessTokensList\">\n        {this.attrs.tokens.length ? (\n          this.attrs.tokens.map(this.tokenView.bind(this))\n        ) : (\n          <div className=\"AccessTokensList--empty\">{app.translator.trans('core.forum.security.empty_text')}</div>\n        )}\n      </div>\n    );\n  }\n\n  tokenView(token: AccessToken): Mithril.Children {\n    return (\n      <div\n        className={classList('AccessTokensList-item', {\n          'AccessTokensList-item--active': token.isCurrent(),\n        })}\n        key={token.id()!}\n      >\n        {this.tokenViewItems(token).toArray()}\n      </div>\n    );\n  }\n\n  tokenViewItems(token: AccessToken): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('icon', <div className=\"AccessTokensList-item-icon\">{icon(this.attrs.icon || 'fas fa-key')}</div>, 50);\n\n    items.add('info', <div className=\"AccessTokensList-item-info\">{this.tokenInfoItems(token).toArray()}</div>, 40);\n\n    items.add('actions', <div className=\"AccessTokensList-item-actions\">{this.tokenActionItems(token).toArray()}</div>, 30);\n\n    return items;\n  }\n\n  tokenInfoItems(token: AccessToken) {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.attrs.type === 'session') {\n      items.add(\n        'title',\n        <div className=\"AccessTokensList-item-title\">\n          <span className=\"AccessTokensList-item-title-main\">{token.device()}</span>\n          {token.isCurrent() && [\n            ' \u2014 ',\n            <span className=\"AccessTokensList-item-title-sub\">{app.translator.trans('core.forum.security.current_active_session')}</span>,\n          ]}\n        </div>\n      );\n    } else {\n      items.add(\n        'title',\n        <div className=\"AccessTokensList-item-title\">\n          <span className=\"AccessTokensList-item-title-main\">{this.generateTokenTitle(token)}</span>\n        </div>\n      );\n    }\n\n    items.add(\n      'createdAt',\n      <div className=\"AccessTokensList-item-createdAt\">\n        <LabelValue label={app.translator.trans('core.forum.security.created')} value={humanTime(token.createdAt())} />\n      </div>\n    );\n\n    items.add(\n      'lastActivityAt',\n      <div className=\"AccessTokensList-item-lastActivityAt\">\n        <LabelValue\n          label={app.translator.trans('core.forum.security.last_activity')}\n          value={\n            token.lastActivityAt() ? (\n              <>\n                {humanTime(token.lastActivityAt())}\n                {token.lastIpAddress() && (\n                  <span>\n                    {' '}\n                    \u2014 <IPAddress ip={token.lastIpAddress()} />\n                  </span>\n                )}\n                {this.attrs.type === 'developer_token' && token.device() && (\n                  <>\n                    {' '}\n                    \u2014 <span className=\"AccessTokensList-item-title-sub\">{token.device()}</span>\n                  </>\n                )}\n              </>\n            ) : (\n              app.translator.trans('core.forum.security.never')\n            )\n          }\n        />\n      </div>\n    );\n\n    return items;\n  }\n\n  tokenActionItems(token: AccessToken) {\n    const items = new ItemList<Mithril.Children>();\n\n    const deleteKey = {\n      session: 'terminate_session',\n      developer_token: 'revoke_access_token',\n    }[this.attrs.type];\n\n    if (this.attrs.type === 'developer_token') {\n      const isHidden = !this.showingTokens[token.id()!];\n      const displayKey = isHidden ? 'show_access_token' : 'hide_access_token';\n\n      items.add(\n        'toggleDisplay',\n        <Button\n          className=\"Button Button--inverted\"\n          icon={isHidden ? 'fas fa-eye' : 'fas fa-eye-slash'}\n          onclick={() => {\n            this.showingTokens[token.id()!] = isHidden;\n            m.redraw();\n          }}\n        >\n          {app.translator.trans(`core.forum.security.${displayKey}`)}\n        </Button>\n      );\n    }\n\n    let revokeButton = (\n      <Button className=\"Button Button--danger\" disabled={token.isCurrent()} loading={!!this.loading[token.id()!]} onclick={() => this.revoke(token)}>\n        {app.translator.trans(`core.forum.security.${deleteKey}`)}\n      </Button>\n    );\n\n    if (token.isCurrent()) {\n      revokeButton = (\n        <Tooltip text={app.translator.trans('core.forum.security.cannot_terminate_current_session')}>\n          <div tabindex=\"0\">{revokeButton}</div>\n        </Tooltip>\n      );\n    }\n\n    items.add('revoke', revokeButton);\n\n    return items;\n  }\n\n  async revoke(token: AccessToken) {\n    if (!confirm(extractText(app.translator.trans('core.forum.security.revoke_access_token_confirmation')))) return;\n\n    this.loading[token.id()!] = true;\n\n    await token.delete();\n\n    this.loading[token.id()!] = false;\n    this.attrs.ondelete?.(token);\n\n    const key = this.attrs.type === 'session' ? 'session_terminated' : 'token_revoked';\n\n    app.alerts.show({ type: 'success' }, app.translator.trans(`core.forum.security.${key}`, { count: 1 }));\n    m.redraw();\n  }\n\n  generateTokenTitle(token: AccessToken): NestedStringArray {\n    const name = token.title() || app.translator.trans('core.forum.security.token_title_placeholder');\n    const value = this.tokenValueDisplay(token);\n\n    return app.translator.trans('core.forum.security.token_item_title', { title: name, token: value });\n  }\n\n  tokenValueDisplay(token: AccessToken): Mithril.Children {\n    const obfuscatedName = Array(12).fill('*').join('');\n    const value = this.showingTokens[token.id()!] ? token.token() : obfuscatedName;\n\n    return <code className=\"AccessTokensList-item-token\">{value}</code>;\n  }\n}\n","import app from '../app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport type AccessToken from '../../common/models/AccessToken';\nimport type { SaveAttributes } from '../../common/Model';\nimport type Mithril from 'mithril';\n\nexport interface INewAccessTokenModalAttrs extends IInternalModalAttrs {\n  onsuccess: (token: AccessToken) => void;\n}\n\nexport default class NewAccessTokenModal<CustomAttrs extends INewAccessTokenModalAttrs = INewAccessTokenModalAttrs> extends Modal<CustomAttrs> {\n  protected titleInput = Stream('');\n\n  className(): string {\n    return 'Modal--small NewAccessTokenModal';\n  }\n\n  title(): Mithril.Children {\n    return app.translator.trans('core.forum.security.new_access_token_modal.title');\n  }\n\n  content(): Mithril.Children {\n    const titleLabel = app.translator.trans('core.forum.security.new_access_token_modal.title_placeholder');\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <div className=\"Form-group\">\n            <input type=\"text\" className=\"FormControl\" bidi={this.titleInput} placeholder={titleLabel} aria-label={titleLabel} />\n          </div>\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n              {app.translator.trans('core.forum.security.new_access_token_modal.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  submitData(): SaveAttributes {\n    return {\n      title: this.titleInput(),\n    };\n  }\n\n  onsubmit(e: SubmitEvent) {\n    super.onsubmit(e);\n    e.preventDefault();\n\n    this.loading = true;\n\n    app.store\n      .createRecord<AccessToken>('access-tokens')\n      .save(this.submitData())\n      .then((token) => {\n        this.attrs.onsuccess(token);\n        app.modal.close();\n      })\n      .finally(this.loaded.bind(this));\n  }\n}\n","import AccessToken from '../../common/models/AccessToken';\n\nexport default class UserSecurityPageState {\n  protected tokens: AccessToken[] | null = null;\n  public loadingTerminateSessions: boolean = false;\n  public loadingGlobalLogout: boolean = false;\n\n  public hasLoadedTokens(): boolean {\n    return this.tokens !== null;\n  }\n\n  public getTokens(): AccessToken[] | null {\n    return this.tokens;\n  }\n\n  public setTokens(tokens: AccessToken[]): void {\n    this.tokens = tokens;\n  }\n\n  public pushToken(token: AccessToken): void {\n    this.tokens?.push(token);\n  }\n\n  public removeToken(token: AccessToken): void {\n    this.tokens = this.tokens!.filter((t) => t !== token);\n  }\n\n  public getSessionTokens(): AccessToken[] {\n    return this.tokens?.filter((token) => token.isSessionToken()).sort((a, b) => (b.isCurrent() ? 1 : -1)) || [];\n  }\n\n  public getDeveloperTokens(): AccessToken[] | null {\n    return this.tokens?.filter((token) => !token.isSessionToken()) || null;\n  }\n\n  /**\n   * Look up session tokens other than the current one.\n   */\n  public getOtherSessionTokens(): AccessToken[] {\n    return this.tokens?.filter((token) => token.isSessionToken() && !token.isCurrent()) || [];\n  }\n\n  public hasOtherActiveSessions(): boolean {\n    return (this.getOtherSessionTokens() || []).length > 0;\n  }\n\n  public removeOtherSessionTokens() {\n    this.tokens = this.tokens!.filter((token) => !token.isSessionToken() || token.isCurrent());\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport FieldSet from '../../common/components/FieldSet';\nimport listItems from '../../common/helpers/listItems';\nimport extractText from '../../common/utils/extractText';\nimport AccessTokensList from './AccessTokensList';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Button from '../../common/components/Button';\nimport NewAccessTokenModal from './NewAccessTokenModal';\nimport { camelCaseToSnakeCase } from '../../common/utils/string';\nimport type AccessToken from '../../common/models/AccessToken';\nimport type Mithril from 'mithril';\nimport Tooltip from '../../common/components/Tooltip';\nimport UserSecurityPageState from '../states/UserSecurityPageState';\n\n/**\n * The `UserSecurityPage` component displays the user's security control panel, in\n * the context of their user profile.\n */\nexport default class UserSecurityPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs> extends UserPage<CustomAttrs, UserSecurityPageState> {\n  state = new UserSecurityPageState();\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    const routeUsername = m.route.param('username');\n\n    if (routeUsername !== app.session.user?.slug() && !app.forum.attribute<boolean>('canModerateAccessTokens')) {\n      m.route.set('/');\n    }\n\n    this.loadUser(routeUsername);\n\n    app.setTitle(extractText(app.translator.trans('core.forum.security.title')));\n\n    this.loadTokens();\n  }\n\n  content() {\n    return (\n      <div className=\"UserSecurityPage\">\n        <ul>{listItems(this.settingsItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list for the user's settings controls.\n   */\n  settingsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    if (\n      app.forum.attribute('canCreateAccessToken') ||\n      app.forum.attribute('canModerateAccessTokens') ||\n      (this.state.hasLoadedTokens() && this.state.getDeveloperTokens()?.length)\n    ) {\n      items.add(\n        'developerTokens',\n        <FieldSet className=\"UserSecurityPage-developerTokens\" label={app.translator.trans(`core.forum.security.developer_tokens_heading`)}>\n          {this.developerTokensItems().toArray()}\n        </FieldSet>\n      );\n    } else if (!this.state.hasLoadedTokens()) {\n      items.add('developerTokens', <LoadingIndicator />);\n    }\n\n    items.add(\n      'sessions',\n      <FieldSet className=\"UserSecurityPage-sessions\" label={app.translator.trans(`core.forum.security.sessions_heading`)}>\n        {this.sessionsItems().toArray()}\n      </FieldSet>\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      items.add(\n        'globalLogout',\n        <FieldSet className=\"UserSecurityPage-globalLogout\" label={app.translator.trans('core.forum.security.global_logout.heading')}>\n          <span className=\"helpText\">{app.translator.trans('core.forum.security.global_logout.help_text')}</span>\n          <Button\n            className=\"Button\"\n            icon=\"fas fa-sign-out-alt\"\n            onclick={this.globalLogout.bind(this)}\n            loading={this.state.loadingGlobalLogout}\n            disabled={this.state.loadingTerminateSessions}\n          >\n            {app.translator.trans('core.forum.security.global_logout.log_out_button')}\n          </Button>\n        </FieldSet>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's access accessToken settings.\n   */\n  developerTokensItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'accessTokenList',\n      !this.state.hasLoadedTokens() ? (\n        <LoadingIndicator />\n      ) : (\n        <AccessTokensList\n          type=\"developer_token\"\n          ondelete={(token: AccessToken) => {\n            this.state.removeToken(token);\n            m.redraw();\n          }}\n          tokens={this.state.getDeveloperTokens()}\n          icon=\"fas fa-key\"\n          hideTokens={false}\n        />\n      )\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      items.add(\n        'newAccessToken',\n        <Button\n          className=\"Button\"\n          disabled={!app.forum.attribute<boolean>('canCreateAccessToken')}\n          onclick={() =>\n            app.modal.show(NewAccessTokenModal, {\n              onsuccess: (token: AccessToken) => {\n                this.state.pushToken(token);\n                m.redraw();\n              },\n            })\n          }\n        >\n          {app.translator.trans('core.forum.security.new_access_token_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's access accessToken settings.\n   */\n  sessionsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'sessionsList',\n      !this.state.hasLoadedTokens() ? (\n        <LoadingIndicator />\n      ) : (\n        <AccessTokensList\n          type=\"session\"\n          ondelete={(token: AccessToken) => {\n            this.state.removeToken(token);\n            m.redraw();\n          }}\n          tokens={this.state.getSessionTokens()}\n          icon=\"fas fa-laptop\"\n          hideTokens={true}\n        />\n      )\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      const isDisabled = !this.state.hasOtherActiveSessions();\n\n      let terminateAllOthersButton = (\n        <Button\n          className=\"Button\"\n          onclick={this.terminateAllOtherSessions.bind(this)}\n          loading={this.state.loadingTerminateSessions}\n          disabled={this.state.loadingGlobalLogout || isDisabled}\n        >\n          {app.translator.trans('core.forum.security.terminate_all_other_sessions')}\n        </Button>\n      );\n\n      if (isDisabled) {\n        terminateAllOthersButton = (\n          <Tooltip text={app.translator.trans('core.forum.security.cannot_terminate_current_session')}>\n            <span tabindex=\"0\">{terminateAllOthersButton}</span>\n          </Tooltip>\n        );\n      }\n\n      items.add('terminateAllOtherSessions', terminateAllOthersButton);\n    }\n\n    return items;\n  }\n\n  loadTokens() {\n    return app.store\n      .find<AccessToken[]>('access-tokens', {\n        filter: { user: this.user!.id()! },\n      })\n      .then((tokens) => {\n        this.state.setTokens(tokens);\n        m.redraw();\n      });\n  }\n\n  terminateAllOtherSessions() {\n    if (!confirm(extractText(app.translator.trans('core.forum.security.terminate_all_other_sessions_confirmation')))) return;\n\n    this.state.loadingTerminateSessions = true;\n\n    return app\n      .request({\n        method: 'DELETE',\n        url: app.forum.attribute('apiUrl') + '/sessions',\n      })\n      .then(() => {\n        // Count terminated sessions first.\n        const count = this.state.getOtherSessionTokens().length;\n\n        this.state.removeOtherSessionTokens();\n\n        app.alerts.show({ type: 'success' }, app.translator.trans('core.forum.security.session_terminated', { count }));\n      })\n      .catch(() => {\n        app.alerts.show({ type: 'error' }, app.translator.trans('core.forum.security.session_termination_failed'));\n      })\n      .finally(() => {\n        this.state.loadingTerminateSessions = false;\n        m.redraw();\n      });\n  }\n\n  globalLogout() {\n    this.state.loadingGlobalLogout = true;\n\n    return app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute<string>('baseUrl') + '/global-logout',\n      })\n      .then(() => window.location.reload())\n      .finally(() => {\n        this.state.loadingGlobalLogout = false;\n        m.redraw();\n      });\n  }\n}\n","import ForumApplication from './ForumApplication';\nimport IndexPage from './components/IndexPage';\nimport DiscussionPage from './components/DiscussionPage';\nimport PostsUserPage from './components/PostsUserPage';\nimport DiscussionsUserPage from './components/DiscussionsUserPage';\nimport SettingsPage from './components/SettingsPage';\nimport NotificationsPage from './components/NotificationsPage';\nimport DiscussionPageResolver from './resolvers/DiscussionPageResolver';\nimport Discussion from '../common/models/Discussion';\nimport type Post from '../common/models/Post';\nimport type User from '../common/models/User';\nimport UserSecurityPage from './components/UserSecurityPage';\n\n/**\n * Helper functions to generate URLs to form pages.\n */\nexport interface ForumRoutes {\n  discussion: (discussion: Discussion, near?: number) => string;\n  post: (post: Post) => string;\n  user: (user: User) => string;\n}\n\n/**\n * The `routes` initializer defines the forum app's routes.\n */\nexport default function (app: ForumApplication) {\n  app.routes = {\n    index: { path: '/all', component: IndexPage },\n\n    discussion: { path: '/d/:id', component: DiscussionPage, resolverClass: DiscussionPageResolver },\n    'discussion.near': { path: '/d/:id/:near', component: DiscussionPage, resolverClass: DiscussionPageResolver },\n\n    user: { path: '/u/:username', component: PostsUserPage },\n    'user.posts': { path: '/u/:username', component: PostsUserPage },\n    'user.discussions': { path: '/u/:username/discussions', component: DiscussionsUserPage },\n\n    settings: { path: '/settings', component: SettingsPage },\n    'user.security': { path: '/u/:username/security', component: UserSecurityPage },\n    notifications: { path: '/notifications', component: NotificationsPage },\n  };\n}\n\nexport function makeRouteHelpers(app: ForumApplication) {\n  return {\n    /**\n     * Generate a URL to a discussion.\n     */\n    discussion: (discussion: Discussion, near?: number) => {\n      return app.route(near && near !== 1 ? 'discussion.near' : 'discussion', {\n        id: discussion.slug(),\n        near: near && near !== 1 ? near : undefined,\n      });\n    },\n\n    /**\n     * Generate a URL to a post.\n     */\n    post: (post: Post) => {\n      return app.route.discussion(post.discussion(), post.number());\n    },\n\n    /**\n     * Generate a URL to a user.\n     */\n    user: (user: User) => {\n      return app.route('user', {\n        username: user.slug(),\n      });\n    },\n  };\n}\n","import Alert from '../../common/components/Alert';\nimport Button from '../../common/components/Button';\nimport icon from '../../common/helpers/icon';\nimport Component from '../../common/Component';\n\n/**\n * Shows an alert if the user has not yet confirmed their email address.\n *\n * @param {import('../ForumApplication').default} app\n */\nexport default function alertEmailConfirmation(app) {\n  const user = app.session.user;\n\n  if (!user || user.isEmailConfirmed()) return;\n\n  class ResendButton extends Component {\n    oninit(vnode) {\n      super.oninit(vnode);\n\n      this.loading = false;\n      this.sent = false;\n    }\n\n    view() {\n      return (\n        <Button className=\"Button Button--link\" onclick={this.onclick.bind(this)} loading={this.loading} disabled={this.sent}>\n          {this.sent\n            ? [icon('fas fa-check'), ' ', app.translator.trans('core.forum.user_email_confirmation.sent_message')]\n            : app.translator.trans('core.forum.user_email_confirmation.resend_button')}\n        </Button>\n      );\n    }\n\n    onclick() {\n      this.loading = true;\n      m.redraw();\n\n      app\n        .request({\n          method: 'POST',\n          url: app.forum.attribute('apiUrl') + '/users/' + user.id() + '/send-confirmation',\n        })\n        .then(() => {\n          this.loading = false;\n          this.sent = true;\n          m.redraw();\n        })\n        .catch(() => {\n          this.loading = false;\n          m.redraw();\n        });\n    }\n  }\n\n  class ContainedAlert extends Alert {\n    view(vnode) {\n      const vdom = super.view(vnode);\n      return { ...vdom, children: [<div className=\"container\">{vdom.children}</div>] };\n    }\n  }\n\n  m.mount($('<div className=\"App-notices\"/>').insertBefore('#content')[0], {\n    view: () => (\n      <ContainedAlert dismissible={false} controls={[<ResendButton />]} className=\"Alert--emailConfirmation\">\n        {app.translator.trans('core.forum.user_email_confirmation.alert_message', { email: <strong>{user.email()}</strong> })}\n      </ContainedAlert>\n    ),\n  });\n}\n","const candidateSelectors = [\n  'input',\n  'select',\n  'textarea',\n  'a[href]',\n  'button',\n  '[tabindex]:not(slot)',\n  'audio[controls]',\n  'video[controls]',\n  '[contenteditable]:not([contenteditable=\"false\"])',\n  'details>summary:first-of-type',\n  'details',\n];\nconst candidateSelector = /* #__PURE__ */ candidateSelectors.join(',');\n\nconst NoElement = typeof Element === 'undefined';\n\nconst matches = NoElement\n  ? function () {}\n  : Element.prototype.matches ||\n    Element.prototype.msMatchesSelector ||\n    Element.prototype.webkitMatchesSelector;\n\nconst getRootNode =\n  !NoElement && Element.prototype.getRootNode\n    ? (element) => element.getRootNode()\n    : (element) => element.ownerDocument;\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nconst getCandidates = function (el, includeContainer, filter) {\n  let candidates = Array.prototype.slice.apply(\n    el.querySelectorAll(candidateSelector)\n  );\n  if (includeContainer && matches.call(el, candidateSelector)) {\n    candidates.unshift(el);\n  }\n  candidates = candidates.filter(filter);\n  return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidatesScope\n * @property {Element} scope contains inner candidates\n * @property {Element[]} candidates\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n *  if a function, implies shadow support is enabled and either returns the shadow root of an element\n *  or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidatesScope>}\n */\nconst getCandidatesIteratively = function (\n  elements,\n  includeContainer,\n  options\n) {\n  const candidates = [];\n  const elementsToCheck = Array.from(elements);\n  while (elementsToCheck.length) {\n    const element = elementsToCheck.shift();\n    if (element.tagName === 'SLOT') {\n      // add shadow dom slot scope (slot itself cannot be focusable)\n      const assigned = element.assignedElements();\n      const content = assigned.length ? assigned : element.children;\n      const nestedCandidates = getCandidatesIteratively(content, true, options);\n      if (options.flatten) {\n        candidates.push(...nestedCandidates);\n      } else {\n        candidates.push({\n          scope: element,\n          candidates: nestedCandidates,\n        });\n      }\n    } else {\n      // check candidate element\n      const validCandidate = matches.call(element, candidateSelector);\n      if (\n        validCandidate &&\n        options.filter(element) &&\n        (includeContainer || !elements.includes(element))\n      ) {\n        candidates.push(element);\n      }\n\n      // iterate over shadow content if possible\n      const shadowRoot =\n        element.shadowRoot ||\n        // check for an undisclosed shadow\n        (typeof options.getShadowRoot === 'function' &&\n          options.getShadowRoot(element));\n\n      const validShadowRoot =\n        !options.shadowRootFilter || options.shadowRootFilter(element);\n\n      if (shadowRoot && validShadowRoot) {\n        // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n        //  shadow exists, so look at light dom children as fallback BUT create a scope for any\n        //  child candidates found because they're likely slotted elements (elements that are\n        //  children of the web component element (which has the shadow), in the light dom, but\n        //  slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n        //  _after_ we return from this recursive call\n        const nestedCandidates = getCandidatesIteratively(\n          shadowRoot === true ? element.children : shadowRoot.children,\n          true,\n          options\n        );\n\n        if (options.flatten) {\n          candidates.push(...nestedCandidates);\n        } else {\n          candidates.push({\n            scope: element,\n            candidates: nestedCandidates,\n          });\n        }\n      } else {\n        // there's not shadow so just dig into the element's (light dom) children\n        //  __without__ giving the element special scope treatment\n        elementsToCheck.unshift(...element.children);\n      }\n    }\n  }\n  return candidates;\n};\n\nconst getTabindex = function (node, isScope) {\n  if (node.tabIndex < 0) {\n    // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n    // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n    // yet they are still part of the regular tab order; in FF, they get a default\n    // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n    // order, consider their tab index to be 0.\n    // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n    // so if they don't have a tabindex attribute specifically set, assume it's 0.\n    //\n    // isScope is positive for custom element with shadow root or slot that by default\n    // have tabIndex -1, but need to be sorted by document order in order for their\n    // content to be inserted in the correct position\n    if (\n      (isScope ||\n        /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) ||\n        node.isContentEditable) &&\n      isNaN(parseInt(node.getAttribute('tabindex'), 10))\n    ) {\n      return 0;\n    }\n  }\n\n  return node.tabIndex;\n};\n\nconst sortOrderedTabbables = function (a, b) {\n  return a.tabIndex === b.tabIndex\n    ? a.documentOrder - b.documentOrder\n    : a.tabIndex - b.tabIndex;\n};\n\nconst isInput = function (node) {\n  return node.tagName === 'INPUT';\n};\n\nconst isHiddenInput = function (node) {\n  return isInput(node) && node.type === 'hidden';\n};\n\nconst isDetailsWithSummary = function (node) {\n  const r =\n    node.tagName === 'DETAILS' &&\n    Array.prototype.slice\n      .apply(node.children)\n      .some((child) => child.tagName === 'SUMMARY');\n  return r;\n};\n\nconst getCheckedRadio = function (nodes, form) {\n  for (let i = 0; i < nodes.length; i++) {\n    if (nodes[i].checked && nodes[i].form === form) {\n      return nodes[i];\n    }\n  }\n};\n\nconst isTabbableRadio = function (node) {\n  if (!node.name) {\n    return true;\n  }\n  const radioScope = node.form || getRootNode(node);\n  const queryRadios = function (name) {\n    return radioScope.querySelectorAll(\n      'input[type=\"radio\"][name=\"' + name + '\"]'\n    );\n  };\n\n  let radioSet;\n  if (\n    typeof window !== 'undefined' &&\n    typeof window.CSS !== 'undefined' &&\n    typeof window.CSS.escape === 'function'\n  ) {\n    radioSet = queryRadios(window.CSS.escape(node.name));\n  } else {\n    try {\n      radioSet = queryRadios(node.name);\n    } catch (err) {\n      // eslint-disable-next-line no-console\n      console.error(\n        'Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s',\n        err.message\n      );\n      return false;\n    }\n  }\n\n  const checked = getCheckedRadio(radioSet, node.form);\n  return !checked || checked === node;\n};\n\nconst isRadio = function (node) {\n  return isInput(node) && node.type === 'radio';\n};\n\nconst isNonTabbableRadio = function (node) {\n  return isRadio(node) && !isTabbableRadio(node);\n};\n\nconst isZeroArea = function (node) {\n  const { width, height } = node.getBoundingClientRect();\n  return width === 0 && height === 0;\n};\nconst isHidden = function (node, { displayCheck, getShadowRoot }) {\n  // NOTE: visibility will be `undefined` if node is detached from the document\n  //  (see notes about this further down), which means we will consider it visible\n  //  (this is legacy behavior from a very long way back)\n  // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n  //  _visibility_ check, not a _display_ check\n  if (getComputedStyle(node).visibility === 'hidden') {\n    return true;\n  }\n\n  const isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n  const nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n  if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n    return true;\n  }\n\n  // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n  //  (but NOT _the_ document; see second 'If' comment below for more).\n  // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n  //  is attached, and the one we need to check if it's in the document or not (because the\n  //  shadow, and all nodes it contains, is never considered in the document since shadows\n  //  behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n  //  is hidden, or is not in the document itself but is detached, it will affect the shadow's\n  //  visibility, including all the nodes it contains). The host could be any normal node,\n  //  or a custom element (i.e. web component). Either way, that's the one that is considered\n  //  part of the document, not the shadow root, nor any of its children (i.e. the node being\n  //  tested).\n  // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n  //  document (per the docs) and while it's a Document-type object, that document does not\n  //  appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n  //  to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n  //  using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n  //  node is actually detached.\n  const nodeRootHost = getRootNode(node).host;\n  const nodeIsAttached =\n    nodeRootHost?.ownerDocument.contains(nodeRootHost) ||\n    node.ownerDocument.contains(node);\n\n  if (!displayCheck || displayCheck === 'full') {\n    if (typeof getShadowRoot === 'function') {\n      // figure out if we should consider the node to be in an undisclosed shadow and use the\n      //  'non-zero-area' fallback\n      const originalNode = node;\n      while (node) {\n        const parentElement = node.parentElement;\n        const rootNode = getRootNode(node);\n        if (\n          parentElement &&\n          !parentElement.shadowRoot &&\n          getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n        ) {\n          // node has an undisclosed shadow which means we can only treat it as a black box, so we\n          //  fall back to a non-zero-area test\n          return isZeroArea(node);\n        } else if (node.assignedSlot) {\n          // iterate up slot\n          node = node.assignedSlot;\n        } else if (!parentElement && rootNode !== node.ownerDocument) {\n          // cross shadow boundary\n          node = rootNode.host;\n        } else {\n          // iterate up normal dom\n          node = parentElement;\n        }\n      }\n\n      node = originalNode;\n    }\n    // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n    //  (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n    //  it might be a falsy value, which means shadow DOM support is disabled\n\n    // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n    //  now we can just test to see if it would normally be visible or not, provided it's\n    //  attached to the main document.\n    // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n    //  `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n    if (nodeIsAttached) {\n      // this works wherever the node is: if there's at least one client rect, it's\n      //  somehow displayed; it also covers the CSS 'display: contents' case where the\n      //  node itself is hidden in place of its contents; and there's no need to search\n      //  up the hierarchy either\n      return !node.getClientRects().length;\n    }\n\n    // Else, the node isn't attached to the document, which means the `getClientRects()`\n    //  API will __always__ return zero rects (this can happen, for example, if React\n    //  is used to render nodes onto a detached tree, as confirmed in this thread:\n    //  https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n    //\n    // It also means that even window.getComputedStyle(node).display will return `undefined`\n    //  because styles are only computed for nodes that are in the document.\n    //\n    // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n    //  somehow. Though it was never stated officially, anyone who has ever used tabbable\n    //  APIs on nodes in detached containers has actually implicitly used tabbable in what\n    //  was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n    //  considering __everything__ to be visible because of the innability to determine styles.\n  } else if (displayCheck === 'non-zero-area') {\n    // NOTE: Even though this tests that the node's client rect is non-zero to determine\n    //  whether it's displayed, and that a detached node will __always__ have a zero-area\n    //  client rect, we don't special-case for whether the node is attached or not. In\n    //  this mode, we do want to consider nodes that have a zero area to be hidden at all\n    //  times, and that includes attached or not.\n    return isZeroArea(node);\n  }\n\n  // visible, as far as we can tell, or per current `displayCheck` mode\n  return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n//  unless they are in the _first_ <legend> element of the top-most disabled\n//  fieldset\nconst isDisabledFromFieldset = function (node) {\n  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n    let parentNode = node.parentElement;\n    // check if `node` is contained in a disabled <fieldset>\n    while (parentNode) {\n      if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n        // look for the first <legend> among the children of the disabled <fieldset>\n        for (let i = 0; i < parentNode.children.length; i++) {\n          const child = parentNode.children.item(i);\n          // when the first <legend> (in document order) is found\n          if (child.tagName === 'LEGEND') {\n            // if its parent <fieldset> is not nested in another disabled <fieldset>,\n            // return whether `node` is a descendant of its first <legend>\n            return matches.call(parentNode, 'fieldset[disabled] *')\n              ? true\n              : !child.contains(node);\n          }\n        }\n        // the disabled <fieldset> containing `node` has no <legend>\n        return true;\n      }\n      parentNode = parentNode.parentElement;\n    }\n  }\n\n  // else, node's tabbable/focusable state should not be affected by a fieldset's\n  //  enabled/disabled state\n  return false;\n};\n\nconst isNodeMatchingSelectorFocusable = function (options, node) {\n  if (\n    node.disabled ||\n    isHiddenInput(node) ||\n    isHidden(node, options) ||\n    // For a details element with a summary, the summary element gets the focus\n    isDetailsWithSummary(node) ||\n    isDisabledFromFieldset(node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isNodeMatchingSelectorTabbable = function (options, node) {\n  if (\n    isNonTabbableRadio(node) ||\n    getTabindex(node) < 0 ||\n    !isNodeMatchingSelectorFocusable(options, node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isValidShadowRootTabbable = function (shadowHostNode) {\n  const tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n  if (isNaN(tabIndex) || tabIndex >= 0) {\n    return true;\n  }\n  // If a custom element has an explicit negative tabindex,\n  // browsers will not allow tab targeting said element's children.\n  return false;\n};\n\n/**\n * @param {Array.<Element|CandidatesScope>} candidates\n * @returns Element[]\n */\nconst sortByOrder = function (candidates) {\n  const regularTabbables = [];\n  const orderedTabbables = [];\n  candidates.forEach(function (item, i) {\n    const isScope = !!item.scope;\n    const element = isScope ? item.scope : item;\n    const candidateTabindex = getTabindex(element, isScope);\n    const elements = isScope ? sortByOrder(item.candidates) : element;\n    if (candidateTabindex === 0) {\n      isScope\n        ? regularTabbables.push(...elements)\n        : regularTabbables.push(element);\n    } else {\n      orderedTabbables.push({\n        documentOrder: i,\n        tabIndex: candidateTabindex,\n        item: item,\n        isScope: isScope,\n        content: elements,\n      });\n    }\n  });\n\n  return orderedTabbables\n    .sort(sortOrderedTabbables)\n    .reduce((acc, sortable) => {\n      sortable.isScope\n        ? acc.push(...sortable.content)\n        : acc.push(sortable.content);\n      return acc;\n    }, [])\n    .concat(regularTabbables);\n};\n\nconst tabbable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorTabbable.bind(null, options),\n      flatten: false,\n      getShadowRoot: options.getShadowRoot,\n      shadowRootFilter: isValidShadowRootTabbable,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorTabbable.bind(null, options)\n    );\n  }\n  return sortByOrder(candidates);\n};\n\nconst focusable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorFocusable.bind(null, options),\n      flatten: true,\n      getShadowRoot: options.getShadowRoot,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorFocusable.bind(null, options)\n    );\n  }\n\n  return candidates;\n};\n\nconst isTabbable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, candidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorTabbable(options, node);\n};\n\nconst focusableCandidateSelector = /* #__PURE__ */ candidateSelectors\n  .concat('iframe')\n  .join(',');\n\nconst isFocusable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, focusableCandidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { tabbable, focusable, isTabbable, isFocusable };\n","import { tabbable, focusable, isFocusable, isTabbable } from 'tabbable';\n\nconst activeFocusTraps = (function () {\n  const trapQueue = [];\n  return {\n    activateTrap(trap) {\n      if (trapQueue.length > 0) {\n        const activeTrap = trapQueue[trapQueue.length - 1];\n        if (activeTrap !== trap) {\n          activeTrap.pause();\n        }\n      }\n\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex === -1) {\n        trapQueue.push(trap);\n      } else {\n        // move this existing trap to the front of the queue\n        trapQueue.splice(trapIndex, 1);\n        trapQueue.push(trap);\n      }\n    },\n\n    deactivateTrap(trap) {\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex !== -1) {\n        trapQueue.splice(trapIndex, 1);\n      }\n\n      if (trapQueue.length > 0) {\n        trapQueue[trapQueue.length - 1].unpause();\n      }\n    },\n  };\n})();\n\nconst isSelectableInput = function (node) {\n  return (\n    node.tagName &&\n    node.tagName.toLowerCase() === 'input' &&\n    typeof node.select === 'function'\n  );\n};\n\nconst isEscapeEvent = function (e) {\n  return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;\n};\n\nconst isTabEvent = function (e) {\n  return e.key === 'Tab' || e.keyCode === 9;\n};\n\nconst delay = function (fn) {\n  return setTimeout(fn, 0);\n};\n\n// Array.find/findIndex() are not supported on IE; this replicates enough\n//  of Array.findIndex() for our needs\nconst findIndex = function (arr, fn) {\n  let idx = -1;\n\n  arr.every(function (value, i) {\n    if (fn(value)) {\n      idx = i;\n      return false; // break\n    }\n\n    return true; // next\n  });\n\n  return idx;\n};\n\n/**\n * Get an option's value when it could be a plain value, or a handler that provides\n *  the value.\n * @param {*} value Option's value to check.\n * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.\n * @returns {*} The `value`, or the handler's returned value.\n */\nconst valueOrHandler = function (value, ...params) {\n  return typeof value === 'function' ? value(...params) : value;\n};\n\nconst getActualTarget = function (event) {\n  // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the\n  //  shadow host. However, event.target.composedPath() will be an array of\n  //  nodes \"clicked\" from inner-most (the actual element inside the shadow) to\n  //  outer-most (the host HTML document). If we have access to composedPath(),\n  //  then use its first element; otherwise, fall back to event.target (and\n  //  this only works for an _open_ shadow DOM; otherwise,\n  //  composedPath()[0] === event.target always).\n  return event.target.shadowRoot && typeof event.composedPath === 'function'\n    ? event.composedPath()[0]\n    : event.target;\n};\n\nconst createFocusTrap = function (elements, userOptions) {\n  // SSR: a live trap shouldn't be created in this type of environment so this\n  //  should be safe code to execute if the `document` option isn't specified\n  const doc = userOptions?.document || document;\n\n  const config = {\n    returnFocusOnDeactivate: true,\n    escapeDeactivates: true,\n    delayInitialFocus: true,\n    ...userOptions,\n  };\n\n  const state = {\n    // containers given to createFocusTrap()\n    // @type {Array<HTMLElement>}\n    containers: [],\n\n    // list of objects identifying tabbable nodes in `containers` in the trap\n    // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n    //  is active, but the trap should never get to a state where there isn't at least one group\n    //  with at least one tabbable node in it (that would lead to an error condition that would\n    //  result in an error being thrown)\n    // @type {Array<{\n    //   container: HTMLElement,\n    //   tabbableNodes: Array<HTMLElement>, // empty if none\n    //   focusableNodes: Array<HTMLElement>, // empty if none\n    //   firstTabbableNode: HTMLElement|null,\n    //   lastTabbableNode: HTMLElement|null,\n    //   nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n    // }>}\n    containerGroups: [], // same order/length as `containers` list\n\n    // references to objects in `containerGroups`, but only those that actually have\n    //  tabbable nodes in them\n    // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n    //  the same length\n    tabbableGroups: [],\n\n    nodeFocusedBeforeActivation: null,\n    mostRecentlyFocusedNode: null,\n    active: false,\n    paused: false,\n\n    // timer ID for when delayInitialFocus is true and initial focus in this trap\n    //  has been delayed during activation\n    delayInitialFocusTimer: undefined,\n  };\n\n  let trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later\n\n  /**\n   * Gets a configuration option value.\n   * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,\n   *  value will be taken from this object. Otherwise, value will be taken from base configuration.\n   * @param {string} optionName Name of the option whose value is sought.\n   * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`\n   *  IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.\n   */\n  const getOption = (configOverrideOptions, optionName, configOptionName) => {\n    return configOverrideOptions &&\n      configOverrideOptions[optionName] !== undefined\n      ? configOverrideOptions[optionName]\n      : config[configOptionName || optionName];\n  };\n\n  /**\n   * Finds the index of the container that contains the element.\n   * @param {HTMLElement} element\n   * @returns {number} Index of the container in either `state.containers` or\n   *  `state.containerGroups` (the order/length of these lists are the same); -1\n   *  if the element isn't found.\n   */\n  const findContainerIndex = function (element) {\n    // NOTE: search `containerGroups` because it's possible a group contains no tabbable\n    //  nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)\n    //  and we still need to find the element in there\n    return state.containerGroups.findIndex(\n      ({ container, tabbableNodes }) =>\n        container.contains(element) ||\n        // fall back to explicit tabbable search which will take into consideration any\n        //  web components if the `tabbableOptions.getShadowRoot` option was used for\n        //  the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n        //  look inside web components even if open)\n        tabbableNodes.find((node) => node === element)\n    );\n  };\n\n  /**\n   * Gets the node for the given option, which is expected to be an option that\n   *  can be either a DOM node, a string that is a selector to get a node, `false`\n   *  (if a node is explicitly NOT given), or a function that returns any of these\n   *  values.\n   * @param {string} optionName\n   * @returns {undefined | false | HTMLElement | SVGElement} Returns\n   *  `undefined` if the option is not specified; `false` if the option\n   *  resolved to `false` (node explicitly not given); otherwise, the resolved\n   *  DOM node.\n   * @throws {Error} If the option is set, not `false`, and is not, or does not\n   *  resolve to a node.\n   */\n  const getNodeForOption = function (optionName, ...params) {\n    let optionValue = config[optionName];\n\n    if (typeof optionValue === 'function') {\n      optionValue = optionValue(...params);\n    }\n\n    if (optionValue === true) {\n      optionValue = undefined; // use default value\n    }\n\n    if (!optionValue) {\n      if (optionValue === undefined || optionValue === false) {\n        return optionValue;\n      }\n      // else, empty string (invalid), null (invalid), 0 (invalid)\n\n      throw new Error(\n        `\\`${optionName}\\` was specified but was not a node, or did not return a node`\n      );\n    }\n\n    let node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n    if (typeof optionValue === 'string') {\n      node = doc.querySelector(optionValue); // resolve to node, or null if fails\n      if (!node) {\n        throw new Error(\n          `\\`${optionName}\\` as selector refers to no known node`\n        );\n      }\n    }\n\n    return node;\n  };\n\n  const getInitialFocusNode = function () {\n    let node = getNodeForOption('initialFocus');\n\n    // false explicitly indicates we want no initialFocus at all\n    if (node === false) {\n      return false;\n    }\n\n    if (node === undefined) {\n      // option not specified: use fallback options\n      if (findContainerIndex(doc.activeElement) >= 0) {\n        node = doc.activeElement;\n      } else {\n        const firstTabbableGroup = state.tabbableGroups[0];\n        const firstTabbableNode =\n          firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n\n        // NOTE: `fallbackFocus` option function cannot return `false` (not supported)\n        node = firstTabbableNode || getNodeForOption('fallbackFocus');\n      }\n    }\n\n    if (!node) {\n      throw new Error(\n        'Your focus-trap needs to have at least one focusable element'\n      );\n    }\n\n    return node;\n  };\n\n  const updateTabbableNodes = function () {\n    state.containerGroups = state.containers.map((container) => {\n      const tabbableNodes = tabbable(container, config.tabbableOptions);\n\n      // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes\n      //  are a superset of tabbable nodes\n      const focusableNodes = focusable(container, config.tabbableOptions);\n\n      return {\n        container,\n        tabbableNodes,\n        focusableNodes,\n        firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,\n        lastTabbableNode:\n          tabbableNodes.length > 0\n            ? tabbableNodes[tabbableNodes.length - 1]\n            : null,\n\n        /**\n         * Finds the __tabbable__ node that follows the given node in the specified direction,\n         *  in this container, if any.\n         * @param {HTMLElement} node\n         * @param {boolean} [forward] True if going in forward tab order; false if going\n         *  in reverse.\n         * @returns {HTMLElement|undefined} The next tabbable node, if any.\n         */\n        nextTabbableNode(node, forward = true) {\n          // NOTE: If tabindex is positive (in order to manipulate the tab order separate\n          //  from the DOM order), this __will not work__ because the list of focusableNodes,\n          //  while it contains tabbable nodes, does not sort its nodes in any order other\n          //  than DOM order, because it can't: Where would you place focusable (but not\n          //  tabbable) nodes in that order? They have no order, because they aren't tabbale...\n          // Support for positive tabindex is already broken and hard to manage (possibly\n          //  not supportable, TBD), so this isn't going to make things worse than they\n          //  already are, and at least makes things better for the majority of cases where\n          //  tabindex is either 0/unset or negative.\n          // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375\n          const nodeIdx = focusableNodes.findIndex((n) => n === node);\n          if (nodeIdx < 0) {\n            return undefined;\n          }\n\n          if (forward) {\n            return focusableNodes\n              .slice(nodeIdx + 1)\n              .find((n) => isTabbable(n, config.tabbableOptions));\n          }\n\n          return focusableNodes\n            .slice(0, nodeIdx)\n            .reverse()\n            .find((n) => isTabbable(n, config.tabbableOptions));\n        },\n      };\n    });\n\n    state.tabbableGroups = state.containerGroups.filter(\n      (group) => group.tabbableNodes.length > 0\n    );\n\n    // throw if no groups have tabbable nodes and we don't have a fallback focus node either\n    if (\n      state.tabbableGroups.length <= 0 &&\n      !getNodeForOption('fallbackFocus') // returning false not supported for this option\n    ) {\n      throw new Error(\n        'Your focus-trap must have at least one container with at least one tabbable node in it at all times'\n      );\n    }\n  };\n\n  const tryFocus = function (node) {\n    if (node === false) {\n      return;\n    }\n\n    if (node === doc.activeElement) {\n      return;\n    }\n\n    if (!node || !node.focus) {\n      tryFocus(getInitialFocusNode());\n      return;\n    }\n\n    node.focus({ preventScroll: !!config.preventScroll });\n    state.mostRecentlyFocusedNode = node;\n\n    if (isSelectableInput(node)) {\n      node.select();\n    }\n  };\n\n  const getReturnFocusNode = function (previousActiveElement) {\n    const node = getNodeForOption('setReturnFocus', previousActiveElement);\n    return node ? node : node === false ? false : previousActiveElement;\n  };\n\n  // This needs to be done on mousedown and touchstart instead of click\n  // so that it precedes the focus event.\n  const checkPointerDown = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      // allow the click since it ocurred inside the trap\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      // immediately deactivate the trap\n      trap.deactivate({\n        // if, on deactivation, we should return focus to the node originally-focused\n        //  when the trap was activated (or the configured `setReturnFocus` node),\n        //  then assume it's also OK to return focus to the outside node that was\n        //  just clicked, causing deactivation, as long as that node is focusable;\n        //  if it isn't focusable, then return focus to the original node focused\n        //  on activation (or the configured `setReturnFocus` node)\n        // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n        //  which will result in the outside click setting focus to the node\n        //  that was clicked, whether it's focusable or not; by setting\n        //  `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n        //  on activation (or the configured `setReturnFocus` node)\n        returnFocus:\n          config.returnFocusOnDeactivate &&\n          !isFocusable(target, config.tabbableOptions),\n      });\n      return;\n    }\n\n    // This is needed for mobile devices.\n    // (If we'll only let `click` events through,\n    // then on mobile they will be blocked anyways if `touchstart` is blocked.)\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      // allow the click outside the trap to take place\n      return;\n    }\n\n    // otherwise, prevent the click\n    e.preventDefault();\n  };\n\n  // In case focus escapes the trap for some strange reason, pull it back in.\n  const checkFocusIn = function (e) {\n    const target = getActualTarget(e);\n    const targetContained = findContainerIndex(target) >= 0;\n\n    // In Firefox when you Tab out of an iframe the Document is briefly focused.\n    if (targetContained || target instanceof Document) {\n      if (targetContained) {\n        state.mostRecentlyFocusedNode = target;\n      }\n    } else {\n      // escaped! pull it back in to where it just left\n      e.stopImmediatePropagation();\n      tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n    }\n  };\n\n  // Hijack Tab events on the first and last focusable nodes of the trap,\n  // in order to prevent focus from escaping. If it escapes for even a\n  // moment it can end up scrolling the page and causing confusion so we\n  // kind of need to capture the action at the keydown phase.\n  const checkTab = function (e) {\n    const target = getActualTarget(e);\n    updateTabbableNodes();\n\n    let destinationNode = null;\n\n    if (state.tabbableGroups.length > 0) {\n      // make sure the target is actually contained in a group\n      // NOTE: the target may also be the container itself if it's focusable\n      //  with tabIndex='-1' and was given initial focus\n      const containerIndex = findContainerIndex(target);\n      const containerGroup =\n        containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;\n\n      if (containerIndex < 0) {\n        // target not found in any group: quite possible focus has escaped the trap,\n        //  so bring it back in to...\n        if (e.shiftKey) {\n          // ...the last node in the last group\n          destinationNode =\n            state.tabbableGroups[state.tabbableGroups.length - 1]\n              .lastTabbableNode;\n        } else {\n          // ...the first node in the first group\n          destinationNode = state.tabbableGroups[0].firstTabbableNode;\n        }\n      } else if (e.shiftKey) {\n        // REVERSE\n\n        // is the target the first tabbable node in a group?\n        let startOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ firstTabbableNode }) => target === firstTabbableNode\n        );\n\n        if (\n          startOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target, false)))\n        ) {\n          // an exception case where the target is either the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle shift+tab as if focus were on the container's\n          //  first tabbable node, and go to the last tabbable node of the LAST group\n          startOfGroupIndex = containerIndex;\n        }\n\n        if (startOfGroupIndex >= 0) {\n          // YES: then shift+tab should go to the last tabbable node in the\n          //  previous group (and wrap around to the last tabbable node of\n          //  the LAST group if it's the first tabbable node of the FIRST group)\n          const destinationGroupIndex =\n            startOfGroupIndex === 0\n              ? state.tabbableGroups.length - 1\n              : startOfGroupIndex - 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.lastTabbableNode;\n        }\n      } else {\n        // FORWARD\n\n        // is the target the last tabbable node in a group?\n        let lastOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ lastTabbableNode }) => target === lastTabbableNode\n        );\n\n        if (\n          lastOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target)))\n        ) {\n          // an exception case where the target is the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle tab as if focus were on the container's\n          //  last tabbable node, and go to the first tabbable node of the FIRST group\n          lastOfGroupIndex = containerIndex;\n        }\n\n        if (lastOfGroupIndex >= 0) {\n          // YES: then tab should go to the first tabbable node in the next\n          //  group (and wrap around to the first tabbable node of the FIRST\n          //  group if it's the last tabbable node of the LAST group)\n          const destinationGroupIndex =\n            lastOfGroupIndex === state.tabbableGroups.length - 1\n              ? 0\n              : lastOfGroupIndex + 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.firstTabbableNode;\n        }\n      }\n    } else {\n      // NOTE: the fallbackFocus option does not support returning false to opt-out\n      destinationNode = getNodeForOption('fallbackFocus');\n    }\n\n    if (destinationNode) {\n      e.preventDefault();\n      tryFocus(destinationNode);\n    }\n    // else, let the browser take care of [shift+]tab and move the focus\n  };\n\n  const checkKey = function (e) {\n    if (\n      isEscapeEvent(e) &&\n      valueOrHandler(config.escapeDeactivates, e) !== false\n    ) {\n      e.preventDefault();\n      trap.deactivate();\n      return;\n    }\n\n    if (isTabEvent(e)) {\n      checkTab(e);\n      return;\n    }\n  };\n\n  const checkClick = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      return;\n    }\n\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      return;\n    }\n\n    e.preventDefault();\n    e.stopImmediatePropagation();\n  };\n\n  //\n  // EVENT LISTENERS\n  //\n\n  const addListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    // There can be only one listening focus trap at a time\n    activeFocusTraps.activateTrap(trap);\n\n    // Delay ensures that the focused element doesn't capture the event\n    // that caused the focus trap activation.\n    state.delayInitialFocusTimer = config.delayInitialFocus\n      ? delay(function () {\n          tryFocus(getInitialFocusNode());\n        })\n      : tryFocus(getInitialFocusNode());\n\n    doc.addEventListener('focusin', checkFocusIn, true);\n    doc.addEventListener('mousedown', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('touchstart', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('click', checkClick, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('keydown', checkKey, {\n      capture: true,\n      passive: false,\n    });\n\n    return trap;\n  };\n\n  const removeListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    doc.removeEventListener('focusin', checkFocusIn, true);\n    doc.removeEventListener('mousedown', checkPointerDown, true);\n    doc.removeEventListener('touchstart', checkPointerDown, true);\n    doc.removeEventListener('click', checkClick, true);\n    doc.removeEventListener('keydown', checkKey, true);\n\n    return trap;\n  };\n\n  //\n  // TRAP DEFINITION\n  //\n\n  trap = {\n    get active() {\n      return state.active;\n    },\n\n    get paused() {\n      return state.paused;\n    },\n\n    activate(activateOptions) {\n      if (state.active) {\n        return this;\n      }\n\n      const onActivate = getOption(activateOptions, 'onActivate');\n      const onPostActivate = getOption(activateOptions, 'onPostActivate');\n      const checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');\n\n      if (!checkCanFocusTrap) {\n        updateTabbableNodes();\n      }\n\n      state.active = true;\n      state.paused = false;\n      state.nodeFocusedBeforeActivation = doc.activeElement;\n\n      if (onActivate) {\n        onActivate();\n      }\n\n      const finishActivation = () => {\n        if (checkCanFocusTrap) {\n          updateTabbableNodes();\n        }\n        addListeners();\n        if (onPostActivate) {\n          onPostActivate();\n        }\n      };\n\n      if (checkCanFocusTrap) {\n        checkCanFocusTrap(state.containers.concat()).then(\n          finishActivation,\n          finishActivation\n        );\n        return this;\n      }\n\n      finishActivation();\n      return this;\n    },\n\n    deactivate(deactivateOptions) {\n      if (!state.active) {\n        return this;\n      }\n\n      const options = {\n        onDeactivate: config.onDeactivate,\n        onPostDeactivate: config.onPostDeactivate,\n        checkCanReturnFocus: config.checkCanReturnFocus,\n        ...deactivateOptions,\n      };\n\n      clearTimeout(state.delayInitialFocusTimer); // noop if undefined\n      state.delayInitialFocusTimer = undefined;\n\n      removeListeners();\n      state.active = false;\n      state.paused = false;\n\n      activeFocusTraps.deactivateTrap(trap);\n\n      const onDeactivate = getOption(options, 'onDeactivate');\n      const onPostDeactivate = getOption(options, 'onPostDeactivate');\n      const checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');\n      const returnFocus = getOption(\n        options,\n        'returnFocus',\n        'returnFocusOnDeactivate'\n      );\n\n      if (onDeactivate) {\n        onDeactivate();\n      }\n\n      const finishDeactivation = () => {\n        delay(() => {\n          if (returnFocus) {\n            tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n          }\n          if (onPostDeactivate) {\n            onPostDeactivate();\n          }\n        });\n      };\n\n      if (returnFocus && checkCanReturnFocus) {\n        checkCanReturnFocus(\n          getReturnFocusNode(state.nodeFocusedBeforeActivation)\n        ).then(finishDeactivation, finishDeactivation);\n        return this;\n      }\n\n      finishDeactivation();\n      return this;\n    },\n\n    pause() {\n      if (state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = true;\n      removeListeners();\n\n      return this;\n    },\n\n    unpause() {\n      if (!state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = false;\n      updateTabbableNodes();\n      addListeners();\n\n      return this;\n    },\n\n    updateContainerElements(containerElements) {\n      const elementsAsArray = [].concat(containerElements).filter(Boolean);\n\n      state.containers = elementsAsArray.map((element) =>\n        typeof element === 'string' ? doc.querySelector(element) : element\n      );\n\n      if (state.active) {\n        updateTabbableNodes();\n      }\n\n      return this;\n    },\n  };\n\n  // initialize container elements\n  trap.updateContainerElements(elements);\n\n  return trap;\n};\n\nexport { createFocusTrap };\n","import { createFocusTrap as _createFocusTrap } from 'focus-trap';\n\n/**\n * Creates a focus trap for the given element with the given options.\n * \n * This function applies some default options that are different to the library.\n * Your own options still override these custom defaults:\n * \n * ```json\n * {\n     escapeDeactivates: false,\n * }\n * ```\n * \n * @param element The element to be the focus trap, or a selector that will be used to find the element.\n * \n * @see https://github.com/focus-trap/focus-trap#readme - Library documentation\n */\nfunction createFocusTrap(...args: Parameters<typeof _createFocusTrap>): ReturnType<typeof _createFocusTrap> {\n  args[1] = {\n    escapeDeactivates: false,\n    ...args[1],\n  };\n\n  return _createFocusTrap(...args);\n}\n\nexport * from 'focus-trap';\nexport { createFocusTrap };\n","function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n// Older browsers don't support event options, feature detect it.\n\n// Adopted and modified solution from Bohdan Didukh (2017)\n// https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi\n\nvar hasPassiveEvents = false;\nif (typeof window !== 'undefined') {\n  var passiveTestOptions = {\n    get passive() {\n      hasPassiveEvents = true;\n      return undefined;\n    }\n  };\n  window.addEventListener('testPassive', null, passiveTestOptions);\n  window.removeEventListener('testPassive', null, passiveTestOptions);\n}\n\nvar isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);\n\n\nvar locks = [];\nvar documentListenerAdded = false;\nvar initialClientY = -1;\nvar previousBodyOverflowSetting = void 0;\nvar previousBodyPosition = void 0;\nvar previousBodyPaddingRight = void 0;\n\n// returns true if `el` should be allowed to receive touchmove events.\nvar allowTouchMove = function allowTouchMove(el) {\n  return locks.some(function (lock) {\n    if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {\n      return true;\n    }\n\n    return false;\n  });\n};\n\nvar preventDefault = function preventDefault(rawEvent) {\n  var e = rawEvent || window.event;\n\n  // For the case whereby consumers adds a touchmove event listener to document.\n  // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })\n  // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then\n  // the touchmove event on document will break.\n  if (allowTouchMove(e.target)) {\n    return true;\n  }\n\n  // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).\n  if (e.touches.length > 1) return true;\n\n  if (e.preventDefault) e.preventDefault();\n\n  return false;\n};\n\nvar setOverflowHidden = function setOverflowHidden(options) {\n  // If previousBodyPaddingRight is already set, don't set it again.\n  if (previousBodyPaddingRight === undefined) {\n    var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;\n    var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;\n\n    if (_reserveScrollBarGap && scrollBarGap > 0) {\n      var computedBodyPaddingRight = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'), 10);\n      previousBodyPaddingRight = document.body.style.paddingRight;\n      document.body.style.paddingRight = computedBodyPaddingRight + scrollBarGap + 'px';\n    }\n  }\n\n  // If previousBodyOverflowSetting is already set, don't set it again.\n  if (previousBodyOverflowSetting === undefined) {\n    previousBodyOverflowSetting = document.body.style.overflow;\n    document.body.style.overflow = 'hidden';\n  }\n};\n\nvar restoreOverflowSetting = function restoreOverflowSetting() {\n  if (previousBodyPaddingRight !== undefined) {\n    document.body.style.paddingRight = previousBodyPaddingRight;\n\n    // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it\n    // can be set again.\n    previousBodyPaddingRight = undefined;\n  }\n\n  if (previousBodyOverflowSetting !== undefined) {\n    document.body.style.overflow = previousBodyOverflowSetting;\n\n    // Restore previousBodyOverflowSetting to undefined\n    // so setOverflowHidden knows it can be set again.\n    previousBodyOverflowSetting = undefined;\n  }\n};\n\nvar setPositionFixed = function setPositionFixed() {\n  return window.requestAnimationFrame(function () {\n    // If previousBodyPosition is already set, don't set it again.\n    if (previousBodyPosition === undefined) {\n      previousBodyPosition = {\n        position: document.body.style.position,\n        top: document.body.style.top,\n        left: document.body.style.left\n      };\n\n      // Update the dom inside an animation frame \n      var _window = window,\n          scrollY = _window.scrollY,\n          scrollX = _window.scrollX,\n          innerHeight = _window.innerHeight;\n\n      document.body.style.position = 'fixed';\n      document.body.style.top = -scrollY;\n      document.body.style.left = -scrollX;\n\n      setTimeout(function () {\n        return window.requestAnimationFrame(function () {\n          // Attempt to check if the bottom bar appeared due to the position change\n          var bottomBarHeight = innerHeight - window.innerHeight;\n          if (bottomBarHeight && scrollY >= innerHeight) {\n            // Move the content further up so that the bottom bar doesn't hide it\n            document.body.style.top = -(scrollY + bottomBarHeight);\n          }\n        });\n      }, 300);\n    }\n  });\n};\n\nvar restorePositionSetting = function restorePositionSetting() {\n  if (previousBodyPosition !== undefined) {\n    // Convert the position from \"px\" to Int\n    var y = -parseInt(document.body.style.top, 10);\n    var x = -parseInt(document.body.style.left, 10);\n\n    // Restore styles\n    document.body.style.position = previousBodyPosition.position;\n    document.body.style.top = previousBodyPosition.top;\n    document.body.style.left = previousBodyPosition.left;\n\n    // Restore scroll\n    window.scrollTo(x, y);\n\n    previousBodyPosition = undefined;\n  }\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions\nvar isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {\n  return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;\n};\n\nvar handleScroll = function handleScroll(event, targetElement) {\n  var clientY = event.targetTouches[0].clientY - initialClientY;\n\n  if (allowTouchMove(event.target)) {\n    return false;\n  }\n\n  if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {\n    // element is at the top of its scroll.\n    return preventDefault(event);\n  }\n\n  if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {\n    // element is at the bottom of its scroll.\n    return preventDefault(event);\n  }\n\n  event.stopPropagation();\n  return true;\n};\n\nexport var disableBodyScroll = function disableBodyScroll(targetElement, options) {\n  // targetElement must be provided\n  if (!targetElement) {\n    // eslint-disable-next-line no-console\n    console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');\n    return;\n  }\n\n  // disableBodyScroll must not have been called on this targetElement before\n  if (locks.some(function (lock) {\n    return lock.targetElement === targetElement;\n  })) {\n    return;\n  }\n\n  var lock = {\n    targetElement: targetElement,\n    options: options || {}\n  };\n\n  locks = [].concat(_toConsumableArray(locks), [lock]);\n\n  if (isIosDevice) {\n    setPositionFixed();\n  } else {\n    setOverflowHidden(options);\n  }\n\n  if (isIosDevice) {\n    targetElement.ontouchstart = function (event) {\n      if (event.targetTouches.length === 1) {\n        // detect single touch.\n        initialClientY = event.targetTouches[0].clientY;\n      }\n    };\n    targetElement.ontouchmove = function (event) {\n      if (event.targetTouches.length === 1) {\n        // detect single touch.\n        handleScroll(event, targetElement);\n      }\n    };\n\n    if (!documentListenerAdded) {\n      document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = true;\n    }\n  }\n};\n\nexport var clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {\n  if (isIosDevice) {\n    // Clear all locks ontouchstart/ontouchmove handlers, and the references.\n    locks.forEach(function (lock) {\n      lock.targetElement.ontouchstart = null;\n      lock.targetElement.ontouchmove = null;\n    });\n\n    if (documentListenerAdded) {\n      document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = false;\n    }\n\n    // Reset initial clientY.\n    initialClientY = -1;\n  }\n\n  if (isIosDevice) {\n    restorePositionSetting();\n  } else {\n    restoreOverflowSetting();\n  }\n\n  locks = [];\n};\n\nexport var enableBodyScroll = function enableBodyScroll(targetElement) {\n  if (!targetElement) {\n    // eslint-disable-next-line no-console\n    console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');\n    return;\n  }\n\n  locks = locks.filter(function (lock) {\n    return lock.targetElement !== targetElement;\n  });\n\n  if (isIosDevice) {\n    targetElement.ontouchstart = null;\n    targetElement.ontouchmove = null;\n\n    if (documentListenerAdded && locks.length === 0) {\n      document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = false;\n    }\n  }\n\n  if (isIosDevice) {\n    restorePositionSetting();\n  } else {\n    restoreOverflowSetting();\n  }\n};\n\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {parseCases} from './utilities.js';\n\nlet pluralFormatter;\n\nlet keyCounter = 0;\n\n// All the special keywords that can be used in `plural` blocks for the various branches\nconst ONE   = 'one';\nconst OTHER = 'other';\n\n/**\n * @private\n * @param {String} caseBody\n * @param {Number} value\n * @return {Object} {caseBody: string, numberValues: object}\n */\nfunction replaceNumberSign(caseBody, value) {\n\tlet i = 0;\n\tlet output = '';\n\tlet numBraces = 0;\n\tconst numberValues = {};\n\n\twhile (i < caseBody.length) {\n\t\tif (caseBody[i] === '#' && !numBraces) {\n\t\t\tlet keyParam = `__hashToken${keyCounter++}`;\n\t\t\toutput += `{${keyParam}, number}`;\n\t\t\tnumberValues[keyParam] = value;\n\t\t}\n\t\telse {\n\t\t\toutput += caseBody[i];\n\t\t}\n\n\t\tif (caseBody[i] === '{') {\n\t\t\tnumBraces++;\n\t\t}\n\t\telse if (caseBody[i] === '}') {\n\t\t\tnumBraces--;\n\t\t}\n\n\t\ti++;\n\t}\n\n\treturn {\n\t\tcaseBody: output,\n\t\tnumberValues\n\t};\n}\n\n/**\n * Handler for `plural` statements within ICU message syntax strings.  Returns\n * a formatted string for the branch that closely matches the current value.\n * \n * See https://formatjs.io/docs/core-concepts/icu-syntax#plural-format for more\n * details on how the `plural` statement works.\n * \n * @param {String} value\n * @param {String} matches\n * @param {String} locale\n * @param {String} values\n * @param {Function} format\n * @return {String}\n */\nexport default function pluralTypeHandler(value, matches = '', locale, values, format) {\n\tconst { args, cases } = parseCases(matches);\n\n\tlet intValue = parseInt(value);\n\n\targs.forEach((arg) => {\n\t\tif (arg.startsWith('offset:')) {\n\t\t\tintValue -= parseInt(arg.slice('offset:'.length));\n\t\t}\n\t});\n\n\tconst keywordPossibilities = [];\n\n\tif ('PluralRules' in Intl) {\n\t\t// Effectively memoize because instantiation of `Int.*` objects is expensive.\n\t\tif (pluralFormatter === undefined || pluralFormatter.resolvedOptions().locale !== locale) {\n\t\t\tpluralFormatter = new Intl.PluralRules(locale);\n\t\t}\n\n\t\tconst pluralKeyword = pluralFormatter.select(intValue);\n\n\t\t// Other is always added last with least priority, so we don't want to add it here.\n\t\tif (pluralKeyword !== OTHER) {\n\t\t\tkeywordPossibilities.push(pluralKeyword);\n\t\t}\n\t}\n\tif (intValue === 1) {\n\t\tkeywordPossibilities.push(ONE);\n\t}\n\tkeywordPossibilities.push(`=${intValue}`, OTHER);\n\n\tfor (let i = 0; i < keywordPossibilities.length; i++) {\n\t\tconst keyword = keywordPossibilities[i];\n\t\tif (keyword in cases) {\n\t\t\tconst { caseBody, numberValues } = replaceNumberSign(cases[keyword], intValue);\n\t\t\treturn format(caseBody, {\n\t\t\t\t...values,\n\t\t\t\t...numberValues\n\t\t\t});\n\t\t}\n\t}\n\n\treturn value;\n}\n","import Component from '../Component';\n\nimport { createFocusTrap, FocusTrap } from '../utils/focusTrap';\n\nimport { disableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock';\n\nimport type ModalManagerState from '../states/ModalManagerState';\nimport type Mithril from 'mithril';\n\ninterface IModalManagerAttrs {\n  state: ModalManagerState;\n}\n\n/**\n * The `ModalManager` component manages one or more modal dialogs. Stacking modals\n * is supported. Multiple dialogs can be shown at once; loading a new component\n * into the ModalManager will overwrite the previous one.\n */\nexport default class ModalManager extends Component<IModalManagerAttrs> {\n  // Current focus trap\n  protected focusTrap: FocusTrap | undefined;\n\n  // Keep track of the last set focus trap\n  protected lastSetFocusTrap: number | undefined;\n\n  // Keep track if there's an modal closing\n  protected modalClosing: boolean = false;\n\n  protected keyUpListener: null | ((e: KeyboardEvent) => void) = null;\n\n  view(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): Mithril.Children {\n    return (\n      <>\n        {this.attrs.state.modalList.map((modal, i) => {\n          const Tag = modal?.componentClass;\n\n          return (\n            <div\n              key={modal.key}\n              className=\"ModalManager modal\"\n              data-modal-key={modal.key}\n              data-modal-number={i}\n              role=\"dialog\"\n              aria-modal=\"true\"\n              style={{ '--modal-number': i }}\n              aria-hidden={this.attrs.state.modal !== modal && 'true'}\n            >\n              {!!Tag && [\n                <Tag\n                  key={modal.key}\n                  {...modal.attrs}\n                  animateShow={this.animateShow.bind(this)}\n                  animateHide={this.animateHide.bind(this)}\n                  state={this.attrs.state}\n                />,\n                /* This backdrop is invisible and used for outside clicks to close the modal. */\n                <div key={modal.key} className=\"ModalManager-invisibleBackdrop\" onclick={this.handlePossibleBackdropClick.bind(this)} />,\n              ]}\n            </div>\n          );\n        })}\n\n        {this.attrs.state.backdropShown && (\n          <div\n            className=\"Modal-backdrop backdrop\"\n            ontransitionend={this.onBackdropTransitionEnd.bind(this)}\n            data-showing={!!this.attrs.state.modalList.length}\n            style={{ '--modal-count': this.attrs.state.modalList.length }}\n          />\n        )}\n      </>\n    );\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.oncreate(vnode);\n\n    this.keyUpListener = this.handleEscPress.bind(this);\n    document.body.addEventListener('keyup', this.keyUpListener);\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.onbeforeremove(vnode);\n\n    this.keyUpListener && document.body.removeEventListener('keyup', this.keyUpListener);\n    this.keyUpListener = null;\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.onupdate(vnode);\n\n    requestAnimationFrame(() => {\n      try {\n        // Main content should gain or lose `aria-hidden` when modals are shown/removed\n        // See: http://web-accessibility.carnegiemuseums.org/code/dialogs/\n\n        if (!this.attrs.state.isModalOpen()) {\n          document.getElementById('app')?.setAttribute('aria-hidden', 'false');\n          this.focusTrap!.deactivate?.();\n          clearAllBodyScrollLocks();\n\n          return;\n        }\n\n        document.getElementById('app')?.setAttribute('aria-hidden', 'true');\n\n        // Get current dialog key\n        const dialogKey = this.attrs.state.modal!.key;\n\n        // Deactivate focus trap if there's a new dialog/closed\n        if (this.focusTrap && this.lastSetFocusTrap !== dialogKey) {\n          this.focusTrap!.deactivate?.();\n\n          clearAllBodyScrollLocks();\n        }\n\n        // Activate focus trap if there's a new dialog which is not trapped yet\n        if (this.activeDialogElement && this.lastSetFocusTrap !== dialogKey) {\n          this.focusTrap = createFocusTrap(this.activeDialogElement as HTMLElement, { allowOutsideClick: true });\n          this.focusTrap!.activate?.();\n\n          disableBodyScroll(this.activeDialogManagerElement!, { reserveScrollBarGap: true });\n        }\n\n        // Update key of current opened modal\n        this.lastSetFocusTrap = dialogKey;\n      } catch {\n        // We can expect errors to occur here due to the nature of mithril rendering\n      }\n    });\n  }\n\n  /**\n   * Get current active dialog\n   */\n  private get activeDialogElement(): HTMLElement {\n    return document.body.querySelector(`.ModalManager[data-modal-key=\"${this.attrs.state.modal?.key}\"] .Modal`) as HTMLElement;\n  }\n\n  /**\n   * Get current active dialog\n   */\n  private get activeDialogManagerElement(): HTMLElement {\n    return document.body.querySelector(`.ModalManager[data-modal-key=\"${this.attrs.state.modal?.key}\"]`) as HTMLElement;\n  }\n\n  animateShow(readyCallback: () => void = () => {}): void {\n    if (!this.attrs.state.modal) return;\n\n    this.activeDialogElement.addEventListener(\n      'transitionend',\n      () => {\n        readyCallback();\n      },\n      { once: true }\n    );\n\n    requestAnimationFrame(() => {\n      this.activeDialogElement.classList.add('in');\n    });\n  }\n\n  animateHide(closedCallback: () => void = () => {}): void {\n    if (this.modalClosing) return;\n    this.modalClosing = true;\n\n    const afterModalClosedCallback = () => {\n      this.modalClosing = false;\n\n      // Close the dialog\n      this.attrs.state.close();\n\n      closedCallback();\n    };\n\n    this.activeDialogElement.addEventListener('transitionend', afterModalClosedCallback, { once: true });\n\n    this.activeDialogElement.classList.remove('in');\n    this.activeDialogElement.classList.add('out');\n  }\n\n  protected handleEscPress(e: KeyboardEvent): void {\n    if (!this.attrs.state.modal) return;\n\n    const dismissibleState = this.attrs.state.modal.componentClass.dismissibleOptions;\n\n    // Close the dialog if the escape key was pressed\n    // Check if closing via escape key is enabled\n    if (e.key === 'Escape' && dismissibleState.viaEscKey) {\n      e.preventDefault();\n\n      this.animateHide();\n    }\n  }\n\n  protected handlePossibleBackdropClick(e: MouseEvent): void {\n    if (!this.attrs.state.modal || !this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick) return;\n\n    this.animateHide();\n  }\n\n  protected onBackdropTransitionEnd(e: TransitionEvent) {\n    if (e.propertyName === 'opacity') {\n      const backdrop = e.currentTarget as HTMLDivElement;\n\n      if (backdrop.getAttribute('data-showing') === null) {\n        // Backdrop is fading out\n        this.attrs.state.backdropShown = false;\n        m.redraw();\n      }\n    }\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport AlertManagerState from '../states/AlertManagerState';\nimport type Mithril from 'mithril';\n\nexport interface IAlertManagerAttrs extends ComponentAttrs {\n  state: AlertManagerState;\n}\n\n/**\n * The `AlertManager` component provides an area in which `Alert` components can\n * be shown and dismissed.\n */\nexport default class AlertManager<CustomAttrs extends IAlertManagerAttrs = IAlertManagerAttrs> extends Component<CustomAttrs, AlertManagerState> {\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.state = this.attrs.state;\n  }\n\n  view() {\n    const activeAlerts = this.state.getActiveAlerts();\n\n    return (\n      <div className=\"AlertManager\">\n        {Object.keys(activeAlerts)\n          .map(Number)\n          .map((key) => {\n            const alert = activeAlerts[key];\n            const urgent = alert.attrs.type === 'error';\n\n            return (\n              <div className=\"AlertManager-alert\" role=\"alert\" aria-live={urgent ? 'assertive' : 'polite'}>\n                <alert.componentClass {...alert.attrs} ondismiss={this.state.dismiss.bind(this.state, key)}>\n                  {alert.children}\n                </alert.componentClass>\n              </div>\n            );\n          })}\n      </div>\n    );\n  }\n}\n","import type RequestError from '../utils/RequestError';\nimport Modal, { IInternalModalAttrs } from './Modal';\n\nexport interface IRequestErrorModalAttrs extends IInternalModalAttrs {\n  error: RequestError;\n  formattedError: string[];\n}\n\nexport default class RequestErrorModal<CustomAttrs extends IRequestErrorModalAttrs = IRequestErrorModalAttrs> extends Modal<CustomAttrs> {\n  className() {\n    return 'RequestErrorModal Modal--large';\n  }\n\n  title() {\n    return !!this.attrs.error.xhr && `${this.attrs.error.xhr.status} ${this.attrs.error.xhr.statusText}`;\n  }\n\n  content() {\n    const { error, formattedError } = this.attrs;\n\n    let responseText;\n\n    // If the error is already formatted, just add line endings;\n    // else try to parse it as JSON and stringify it with indentation\n    if (formattedError.length) {\n      responseText = formattedError.join('\\n\\n');\n    } else if (error.response) {\n      responseText = JSON.stringify(error.response, null, 2);\n    } else {\n      responseText = error.responseText;\n    }\n\n    return (\n      <div className=\"Modal-body\">\n        <pre>\n          {this.attrs.error.options.method} {this.attrs.error.options.url}\n          <br />\n          <br />\n          {responseText}\n        </pre>\n      </div>\n    );\n  }\n}\n","/* \n * Copyright 2017, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Flattens an array of arrays of infinite depth into a single-dimension array.\n * \n * > This is now natively in JavaScript as the `flat` method on an Array\n * > instance.  [Check MDN for which browsers have access to this feature](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat).\n * > If you can't use `flat`, then this method will do the job \ud83d\ude42\n * \n * @param {Array} array\n * @return {Array} Flattened array.\n */\nexport function flatten(array) {\n\n\treturn array.reduce((accumulator, value) => {\n\t\treturn accumulator.concat(Array.isArray(value) ? flatten(value) : value);\n\t}, []);\n}\n\n/**\n * Creates an array of numbers from the starting value (inclusive) to the end\n * (exclusive), with an optional step (the gap between values).\n * \n * @param {Number} start\n *   The value to start at, the first item in the returned array.\n * @param {Number} end\n *   The value to end with, the last item in the returned array.\n * @param {Number} [step=1]\n *   The increment/gap between values, defaults to 1.\n * @return {Array} An array encompassing the given range.\n */\nexport function range(start, end, step = 1) {\n\n\treturn Array.apply(0, Array(Math.ceil((end - start) / step))).map((empty, index) => index * step + start);\n}\n\n/**\n * Remove and return the first item from `array` that matches the predicate\n * function.\n * \n * @param {Array} array\n * @param {Function} predicate\n *   Invoked with the array item.\n * @return {Object} The matching item, or `null` if no match was found.\n */\nexport function remove(array, predicate) {\n\n\treturn array.find((item, index) => {\n\t\tif (predicate(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\treturn item;\n\t\t}\n\t});\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Most branch-based type handlers are based around \"cases\".\n * For example, `select` and `plural` compare compare a value\n * to \"case keys\" to choose a subtranslation.\n * \n * This util splits \"matches\" portions provided to the aforementioned\n * handlers into case strings, and extracts any prepended arguments\n * (for example, `plural` supports an `offset:n` argument used for\n * populating the magic `#` variable).\n * \n * @param {String} string\n * @return {Object} The `cases` key points to a map of all cases.\n *                  The `arguments` key points to a list of prepended arguments.\n */\nexport function parseCases(string) {\n\tconst isWhitespace = ch => /\\s/.test(ch);\n\n\tconst args = [];\n\tconst cases = {};\n\n\tlet currTermStart = 0;\n\tlet latestTerm = null;\n\tlet inTerm = false;\n\n\tlet i = 0;\n\twhile (i < string.length) {\n\t\t// Term ended\n\t\tif (inTerm && (isWhitespace(string[i]) || string[i] === '{')) {\n\t\t\tinTerm = false;\n\t\t\tlatestTerm = string.slice(currTermStart, i);\n\n\t\t\t// We want to process the opening char again so the case will be properly registered.\n\t\t\tif (string[i] === '{') {\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\t// New term\n\t\telse if (!inTerm && !isWhitespace(string[i])) {\n\t\t\tconst caseBody = string[i] === '{';\n\n\t\t\t// If there's a previous term, we can either handle a whole\n\t\t\t// case, or add that as an argument.\n\t\t\tif (latestTerm && caseBody) {\n\t\t\t\tconst branchEndIndex = findClosingBracket(string, i);\n\n\t\t\t\tif (branchEndIndex === -1) {\n\t\t\t\t\tthrow new Error(`Unbalanced curly braces in string: \"${string}\"`);\n\t\t\t\t}\n\n\t\t\t\tcases[latestTerm] = string.slice(i + 1, branchEndIndex);  // Don't include the braces\n\n\t\t\t\ti = branchEndIndex; // Will be moved up where needed at end of loop.\n\t\t\t\tlatestTerm = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (latestTerm) {\n\t\t\t\t\targs.push(latestTerm);\n\t\t\t\t\tlatestTerm = null;\n\t\t\t\t}\n\n\t\t\t\tinTerm = true;\n\t\t\t\tcurrTermStart = i;\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\n\tif (inTerm) {\n\t\tlatestTerm = string.slice(currTermStart);\n\t}\n\n\tif (latestTerm) {\n\t\targs.push(latestTerm);\n\t}\n\n\treturn {\n\t\targs,\n\t\tcases\n\t};\n}\n\n/**\n * Finds the index of the matching closing curly bracket, including through\n * strings that could have nested brackets.\n * \n * @param {String} string\n * @param {Number} fromIndex\n * @return {Number} The index of the matching closing bracket, or -1 if no\n *   closing bracket could be found.\n */\nexport function findClosingBracket(string, fromIndex) {\n\tlet depth = 0;\n\tfor (let i = fromIndex + 1; i < string.length; i++) {\n\t\tlet char = string.charAt(i);\n\t\tif (char === '}') {\n\t\t\tif (depth === 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\tdepth--;\n\t\t}\n\t\telse if (char === '{') {\n\t\t\tdepth++;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * Split a `{key, type, format}` block into those 3 parts, taking into account\n * nested message syntax that can exist in the `format` part.\n * \n * @param {String} block\n * @return {Array}\n *   An array with `key`, `type`, and `format` items in that order, if present\n *   in the formatted argument block.\n */\nexport function splitFormattedArgument(block) {\n\treturn split(block.slice(1, -1), ',', 3);\n}\n\n/**\n * Like `String.prototype.split()` but where the limit parameter causes the\n * remainder of the string to be grouped together in a final entry.\n * \n * @private\n * @param {String} string\n * @param {String} separator\n * @param {Number} limit\n * @param {Array} [accumulator=[]]\n * @return {Array}\n */\nfunction split(string, separator, limit, accumulator = []) {\n\tif (!string) {\n\t\treturn accumulator;\n\t}\n\tif (limit === 1) {\n\t\taccumulator.push(string);\n\t\treturn accumulator;\n\t}\n\tlet indexOfDelimiter = string.indexOf(separator);\n\tif (indexOfDelimiter === -1) {\n\t\taccumulator.push(string);\n\t\treturn accumulator;\n\t}\n\tlet head = string.substring(0, indexOfDelimiter).trim();\n\tlet tail = string.substring(indexOfDelimiter + separator.length + 1).trim();\n\taccumulator.push(head);\n\treturn split(tail, separator, limit - 1, accumulator);\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {parseCases} from './utilities.js';\n\nconst OTHER = 'other';\n\n/**\n * Handler for `select` statements within ICU message syntax strings.  Returns\n * a formatted string for the branch that closely matches the current value.\n * \n * See https://formatjs.io/docs/core-concepts/icu-syntax#select-format for more\n * details on how the `select` statement works.\n * \n * @param {String} value\n * @param {String} matches\n * @param {String} locale\n * @param {String} values\n * @param {Function} format\n * @return {String}\n */\nexport default function selectTypeHandler(value, matches = '', locale, values, format) {\n\tconst { cases } = parseCases(matches);\n\n\tif (value in cases) {\n\t\treturn format(cases[value], values);\n\t}\n\telse if (OTHER in cases) {\n\t\treturn format(cases[OTHER], values);\n\t}\n\n\treturn value;\n}\n","import { unEscapeHtml } from './utilities';\n\nexport default function defaultRichHandler(tag, values, contents) {\n\treturn `<${tag}>${unEscapeHtml(contents)}</${tag}>`;\n}\n","import { MessageFormatter } from '@ultraq/icu-message-formatter';\nimport { flatten } from '@ultraq/array-utils';\n\nimport defaultRichHandler from './defaultRichHandler';\nimport { replaceRichTags, sanitizeValues } from './utilities';\n\nexport default class RichMessageFormatter extends MessageFormatter {\n\tconstructor(locale, typeHandlers = {}, richHandler = null) {\n\t\tsuper(locale, typeHandlers);\n\t\tthis.richHandler = richHandler ? richHandler : defaultRichHandler;\n\t}\n\n\trich(message, values = {}) {\n\t\tconst cleanedValues = sanitizeValues(values);\n\n\t\tconst formatted = flatten(this.process(message, cleanedValues));\n\n\t\t// TODO\n\t\t// Should be a symbol but isn't because of conversion issues.\n\t\t// We use a random string instead. \n\t\tlet sym = Math.random().toString(36) + Math.random().toString(36) + Math.random().toString(36);\n\t\tconst fakeValues = Object.fromEntries(Object.entries(values).map(([key, _value]) => [key, sym]));\n\t\tconst formattedFake = flatten(this.process(message, fakeValues));\n\t\tconst replaceFake = replaceRichTags(formattedFake, fakeValues, () => sym);\n\t\tconst originalTemplateSegmentIndices = replaceFake.map((v, i) => v === sym ? null: i).filter(i => i !== null);\n\n\t\treturn replaceRichTags(formatted, cleanedValues, this.richHandler, originalTemplateSegmentIndices);\n\t}\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {findClosingBracket, splitFormattedArgument} from './utilities.js';\n\nimport {flatten} from '@ultraq/array-utils';\nimport {memoize} from '@ultraq/function-utils';\n\n/**\n * The main class for formatting messages.\n * \n * @author Emanuel Rabina\n */\nexport default class MessageFormatter {\n\n\t/**\n\t * Creates a new formatter that can work using any of the custom type handlers\n\t * you register.\n\t * \n\t * @param {String} locale\n\t * @param {Object} [typeHandlers={}]\n\t *   Optional object where the keys are the names of the types to register,\n\t *   their values being the functions that will return a nicely formatted\n\t *   string for the data and locale they are given.\n\t */\n\tconstructor(locale, typeHandlers = {}) {\n\n\t\tthis.locale = locale;\n\t\tthis.typeHandlers = typeHandlers;\n\t}\n\n\t/**\n\t * Formats an ICU message syntax string using `values` for placeholder data\n\t * and any currently-registered type handlers.\n\t * \n\t * @param {String} message\n\t * @param {Object} [values={}]\n\t * @return {String}\n\t */\n\tformat = memoize((message, values = {}) => {\n\n\t\treturn flatten(this.process(message, values)).join('');\n\t})\n\n\t/**\n\t * Process an ICU message syntax string using `values` for placeholder data\n\t * and any currently-registered type handlers.  The result of this method is\n\t * an array of the component parts after they have been processed in turn by\n\t * their own type handlers.  This raw output is useful for other renderers,\n\t * eg: React where components can be used instead of being forced to return\n\t * raw strings.\n\t * \n\t * This method is used by {@link MessageFormatter#format} where it acts as a\n\t * string renderer.\n\t * \n\t * @param {String} message\n\t * @param {Object} [values={}]\n\t * @return {Array}\n\t */\n\tprocess(message, values = {}) {\n\n\t\tif (!message) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet blockStartIndex = message.indexOf('{');\n\t\tif (blockStartIndex !== -1) {\n\t\t\tlet blockEndIndex = findClosingBracket(message, blockStartIndex);\n\t\t\tif (blockEndIndex !== -1) {\n\t\t\t\tlet block = message.substring(blockStartIndex, blockEndIndex + 1);\n\t\t\t\tif (block) {\n\t\t\t\t\tlet result = [];\n\t\t\t\t\tlet head = message.substring(0, blockStartIndex);\n\t\t\t\t\tif (head) {\n\t\t\t\t\t\tresult.push(head);\n\t\t\t\t\t}\n\t\t\t\t\tlet [key, type, format] = splitFormattedArgument(block);\n\t\t\t\t\tlet body = values[key];\n\t\t\t\t\tif (body === null || body === undefined) {\n\t\t\t\t\t\tbody = '';\n\t\t\t\t\t}\n\t\t\t\t\tlet typeHandler = type && this.typeHandlers[type];\n\t\t\t\t\tresult.push(typeHandler ?\n\t\t\t\t\t\ttypeHandler(body, format, this.locale, values, this.process.bind(this)) :\n\t\t\t\t\t\tbody);\n\t\t\t\t\tlet tail = message.substring(blockEndIndex + 1);\n\t\t\t\t\tif (tail) {\n\t\t\t\t\t\tresult.push(this.process(tail, values));\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Error(`Unbalanced curly braces in string: \"${message}\"`);\n\t\t\t}\n\t\t}\n\t\treturn [message];\n\t}\n}\n","/**\n * A higher-order function to apply [memoization](https://en.wikipedia.org/wiki/Memoization).\n * \n * If memoizing a recursive function, then memoize and define the function at\n * the same time so you can make a call to the memoized function, eg:\n * \n * ```javascript\n * const myFunction = memoize(() => myFunction());\n * ```\n * \n * @param {Function} func\n * @return {Function} \n */\nexport function memoize(func) {\n\tconst cache = {};\n\treturn function(...args) {\n\t\tlet key = args.length ? args\n\t\t\t.map(arg =>\n\t\t\t\targ === null ? 'null' :\n\t\t\t\targ === undefined ? 'undefined' :\n\t\t\t\ttypeof arg === 'function' ? arg.toString() :\n\t\t\t\targ instanceof Date ? arg.toISOString() :\n\t\t\t\tJSON.stringify(arg)\n\t\t\t)\n\t\t\t.join('|') :\n\t\t\t'_(no-args)_';\n\t\tif (Object.prototype.hasOwnProperty.call(cache, key)) {\n\t\t\treturn cache[key];\n\t\t}\n\t\tlet result = func(...args);\n\t\tcache[key] = result;\n\t\treturn result;\n\t};\n}\n","import { unEscapeHtml } from './utilities';\n\nexport default function mithrilRichHandler(tag, values, contents) {\n\tconst vnode = values[tag] || m(tag);\n\tlet children = unEscapeHtml(m.fragment(contents).children);\n\treturn { ...vnode, children };\n}\n","import { RichMessageFormatter, mithrilRichHandler } from '@askvortsov/rich-icu-message-formatter';\nimport { pluralTypeHandler, selectTypeHandler } from '@ultraq/icu-message-formatter';\nimport username from './helpers/username';\nimport User from './models/User';\nimport extract from './utils/extract';\n\ntype Translations = Record<string, string>;\ntype TranslatorParameters = Record<string, unknown>;\n\nexport default class Translator {\n  /**\n   * A map of translation keys to their translated values.\n   */\n  translations: Translations = {};\n\n  /**\n   * The underlying ICU MessageFormatter util.\n   */\n  protected formatter = new RichMessageFormatter(null, this.formatterTypeHandlers(), mithrilRichHandler);\n\n  /**\n   * Sets the formatter's locale to the provided value.\n   */\n  setLocale(locale: string) {\n    this.formatter.locale = locale;\n  }\n\n  /**\n   * Returns the formatter's current locale.\n   */\n  getLocale() {\n    return this.formatter.locale;\n  }\n\n  addTranslations(translations: Translations) {\n    Object.assign(this.translations, translations);\n  }\n\n  /**\n   * An extensible entrypoint for extenders to register type handlers for translations.\n   */\n  protected formatterTypeHandlers() {\n    return {\n      plural: pluralTypeHandler,\n      select: selectTypeHandler,\n    };\n  }\n\n  /**\n   * A temporary system to preprocess parameters.\n   * Should not be used by extensions.\n   * TODO: An extender will be added in v1.x.\n   *\n   * @internal\n   */\n  protected preprocessParameters(parameters: TranslatorParameters) {\n    // If we've been given a user model as one of the input parameters, then\n    // we'll extract the username and use that for the translation. In the\n    // future there should be a hook here to inspect the user and change the\n    // translation key. This will allow a gender property to determine which\n    // translation key is used.\n\n    if ('user' in parameters) {\n      const user = extract(parameters, 'user') as User;\n\n      if (!parameters.username) parameters.username = username(user);\n    }\n\n    return parameters;\n  }\n\n  trans(id: string, parameters: TranslatorParameters = {}) {\n    const translation = this.translations[id];\n\n    if (translation) {\n      parameters = this.preprocessParameters(parameters);\n      return this.formatter.rich(translation, parameters);\n    }\n\n    return id;\n  }\n}\n","import app from '../common/app';\nimport { FlarumRequestOptions } from './Application';\nimport { fireDeprecationWarning } from './helpers/fireDebugWarning';\nimport Model, { ModelData, SavedModelData } from './Model';\n\nexport interface MetaInformation {\n  [key: string]: any;\n}\n\nexport interface ApiQueryParamsSingle {\n  fields?: string[];\n  include?: string;\n  bySlug?: boolean;\n  meta?: MetaInformation;\n}\n\nexport interface ApiQueryParamsPlural {\n  fields?: string[];\n  include?: string;\n  filter?:\n    | {\n        q: string;\n      }\n    | Record<string, string>;\n  page?: {\n    near?: number;\n    offset?: number;\n    number?: number;\n    limit?: number;\n    size?: number;\n  };\n  sort?: string;\n  meta?: MetaInformation;\n}\n\nexport type ApiQueryParams = ApiQueryParamsPlural | ApiQueryParamsSingle;\n\nexport interface ApiPayloadSingle {\n  data: SavedModelData;\n  included?: SavedModelData[];\n  meta?: MetaInformation;\n}\n\nexport interface ApiPayloadPlural {\n  data: SavedModelData[];\n  included?: SavedModelData[];\n  links?: {\n    first: string;\n    next?: string;\n    prev?: string;\n  };\n  meta?: MetaInformation;\n}\n\nexport type ApiPayload = ApiPayloadSingle | ApiPayloadPlural;\n\nexport type ApiResponseSingle<M extends Model> = M & { payload: ApiPayloadSingle };\nexport type ApiResponsePlural<M extends Model> = M[] & { payload: ApiPayloadPlural };\nexport type ApiResponse<M extends Model> = ApiResponseSingle<M> | ApiResponsePlural<M>;\n\ninterface ApiQueryRequestOptions<ResponseType> extends Omit<FlarumRequestOptions<ResponseType>, 'url'> {}\n\ninterface StoreData {\n  [type: string]: Partial<Record<string, Model>>;\n}\n\nexport function payloadIsPlural(payload: ApiPayload): payload is ApiPayloadPlural {\n  return Array.isArray((payload as ApiPayloadPlural).data);\n}\n\n/**\n * The `Store` class defines a local data store, and provides methods to\n * retrieve data from the API.\n */\nexport default class Store {\n  /**\n   * The local data store. A tree of resource types to IDs, such that\n   * accessing data[type][id] will return the model for that type/ID.\n   */\n  protected data: StoreData = {};\n\n  /**\n   * The model registry. A map of resource types to the model class that\n   * should be used to represent resources of that type.\n   */\n  models: Record<string, { new (): Model }>;\n\n  constructor(models: Record<string, { new (): Model }>) {\n    this.models = models;\n  }\n\n  /**\n   * Push resources contained within an API payload into the store.\n   *\n   * @return The model(s) representing the resource(s) contained\n   *     within the 'data' key of the payload.\n   */\n  pushPayload<M extends Model>(payload: ApiPayloadSingle): ApiResponseSingle<M>;\n  pushPayload<Ms extends Model[]>(payload: ApiPayloadPlural): ApiResponsePlural<Ms[number]>;\n  pushPayload<M extends Model | Model[]>(payload: ApiPayload): ApiResponse<FlatArray<M, 1>> {\n    if (payload.included) payload.included.map(this.pushObject.bind(this));\n\n    const models = payload.data instanceof Array ? payload.data.map((o) => this.pushObject(o, false)) : this.pushObject(payload.data, false);\n    const result = models as ApiResponse<FlatArray<M, 1>>;\n\n    // Attach the original payload to the model that we give back. This is\n    // useful to consumers as it allows them to access meta information\n    // associated with their request.\n    result.payload = payload;\n\n    return result;\n  }\n\n  /**\n   * Create a model to represent a resource object (or update an existing one),\n   * and push it into the store.\n   *\n   * @param data The resource object\n   * @return The model, or null if no model class has been\n   *     registered for this resource type.\n   */\n  pushObject<M extends Model>(data: SavedModelData): M | null;\n  pushObject<M extends Model>(data: SavedModelData, allowUnregistered: false): M;\n  pushObject<M extends Model>(data: SavedModelData, allowUnregistered = true): M | null {\n    if (!this.models[data.type]) {\n      if (!allowUnregistered) {\n        setTimeout(() =>\n          fireDeprecationWarning(`Pushing object of type \\`${data.type}\\` not allowed, as type not yet registered in the store.`, '3206')\n        );\n      }\n\n      return null;\n    }\n\n    const type = (this.data[data.type] = this.data[data.type] || {});\n\n    // Necessary for TS to narrow correctly.\n    const curr = type[data.id] as M;\n    const instance = curr ? curr.pushData(data) : this.createRecord<M>(data.type, data);\n\n    type[data.id] = instance;\n    instance.exists = true;\n\n    return instance;\n  }\n\n  /**\n   * Make a request to the API to find record(s) of a specific type.\n   */\n  async find<M extends Model>(type: string, params?: ApiQueryParamsSingle): Promise<ApiResponseSingle<M>>;\n  async find<Ms extends Model[]>(type: string, params?: ApiQueryParamsPlural): Promise<ApiResponsePlural<Ms[number]>>;\n  async find<M extends Model>(\n    type: string,\n    id: string,\n    params?: ApiQueryParamsSingle,\n    options?: ApiQueryRequestOptions<ApiPayloadSingle>\n  ): Promise<ApiResponseSingle<M>>;\n  async find<Ms extends Model[]>(\n    type: string,\n    ids: string[],\n    params?: ApiQueryParamsPlural,\n    options?: ApiQueryRequestOptions<ApiPayloadPlural>\n  ): Promise<ApiResponsePlural<Ms[number]>>;\n  async find<M extends Model | Model[]>(\n    type: string,\n    idOrParams: undefined | string | string[] | ApiQueryParams,\n    query: ApiQueryParams = {},\n    options: ApiQueryRequestOptions<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle> = {}\n  ): Promise<ApiResponse<FlatArray<M, 1>>> {\n    let params = query;\n    let url = app.forum.attribute('apiUrl') + '/' + type;\n\n    if (idOrParams instanceof Array) {\n      url += '?filter[id]=' + idOrParams.join(',');\n    } else if (typeof idOrParams === 'object') {\n      params = idOrParams;\n    } else if (idOrParams) {\n      url += '/' + idOrParams;\n    }\n\n    return app\n      .request<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle>({\n        method: 'GET',\n        url,\n        params,\n        ...options,\n      })\n      .then((payload) => {\n        if (payloadIsPlural(payload)) {\n          return this.pushPayload<FlatArray<M, 1>[]>(payload);\n        } else {\n          return this.pushPayload<FlatArray<M, 1>>(payload);\n        }\n      });\n  }\n\n  /**\n   * Get a record from the store by ID.\n   */\n  getById<M extends Model>(type: string, id: string): M | undefined {\n    return this.data?.[type]?.[id] as M;\n  }\n\n  /**\n   * Get a record from the store by the value of a model attribute.\n   *\n   * @param type The resource type.\n   * @param key The name of the method on the model.\n   * @param value The value of the model attribute.\n   */\n  getBy<M extends Model, T = unknown>(type: string, key: keyof M, value: T): M | undefined {\n    // @ts-expect-error No way to do this safely, unfortunately.\n    return this.all(type).filter((model) => model[key]() === value)[0] as M;\n  }\n\n  /**\n   * Get all loaded records of a specific type.\n   */\n  all<M extends Model>(type: string): M[] {\n    const records = this.data[type];\n\n    return records ? (Object.values(records) as M[]) : [];\n  }\n\n  /**\n   * Remove the given model from the store.\n   */\n  remove(model: Model): void {\n    delete this.data[model.data.type as string][model.id() as string];\n  }\n\n  /**\n   * Create a new record of the given type.\n   *\n   * @param type The resource type\n   * @param data Any data to initialize the model with\n   */\n  createRecord<M extends Model>(type: string, data: ModelData = {}): M {\n    data.type = data.type || type;\n\n    // @ts-expect-error this will complain about initializing abstract models,\n    // but we can safely assume that all models registered with the store are\n    // not abstract.\n    return new this.models[type](data, this);\n  }\n}\n","import app from '../common/app';\nimport User from './models/User';\nimport { FlarumRequestOptions } from './Application';\n\nexport type LoginParams = {\n  /**\n   * The username/email\n   */\n  identification: string;\n  password: string;\n  remember: boolean;\n};\n\n/**\n * The `Session` class defines the current user session. It stores a reference\n * to the current authenticated user, and provides methods to log in/out.\n */\nexport default class Session {\n  /**\n   * The current authenticated user.\n   */\n  user: User | null;\n\n  /**\n   * The CSRF token.\n   */\n  csrfToken: string;\n\n  constructor(user: User | null, csrfToken: string) {\n    this.user = user;\n    this.csrfToken = csrfToken;\n  }\n\n  /**\n   * Attempt to log in a user.\n   */\n  login(body: LoginParams, options: Omit<FlarumRequestOptions<any>, 'url' | 'body' | 'method'> = {}) {\n    return app.request({\n      method: 'POST',\n      url: `${app.forum.attribute('baseUrl')}/login`,\n      body,\n      ...options,\n    });\n  }\n\n  /**\n   * Log the user out.\n   */\n  logout() {\n    window.location.href = `${app.forum.attribute('baseUrl')}/logout?token=${this.csrfToken}`;\n  }\n}\n","import { createFocusTrap } from './focusTrap';\n\n/**\n * The `Drawer` class controls the page's drawer. The drawer is the area the\n * slides out from the left on mobile devices; it contains the header and the\n * footer.\n */\nexport default class Drawer {\n  /**\n   * @type {import('./focusTrap').FocusTrap}\n   */\n  focusTrap;\n\n  /**\n   * @type {HTMLDivElement}\n   */\n  appElement;\n\n  constructor() {\n    // Set up an event handler so that whenever the content area is tapped,\n    // the drawer will close.\n    document.getElementById('content').addEventListener('click', (e) => {\n      if (this.isOpen()) {\n        e.preventDefault();\n        this.hide();\n      }\n    });\n\n    this.appElement = document.getElementById('app');\n    // Despite the `focus-trap` documentation, both `clickOutsideDeactivates`\n    // and `allowOutsideClick` are necessary so that inputs in modals triggered\n    // from the drawer's nav components can be interacted with.\n    this.focusTrap = createFocusTrap('#drawer', { allowOutsideClick: true, clickOutsideDeactivates: true });\n    this.drawerAvailableMediaQuery = window.matchMedia(\n      `(max-width: ${getComputedStyle(document.documentElement).getPropertyValue('--screen-phone-max')})`\n    );\n  }\n\n  /**\n   * Handler for the `resize` event on `window`.\n   *\n   * This is used to close the drawer when the viewport is widened past the `phone` size.\n   * At this point, the drawer turns into the standard header that we see on desktop, but\n   * the drawer is still registered as 'open' internally.\n   *\n   * This causes issues with the focus trap, resulting in focus becoming trapped within\n   * the header on desktop viewports.\n   *\n   * @internal\n   */\n  resizeHandler = ((e) => {\n    if (!e.matches && this.isOpen()) {\n      // Drawer is open but we've made window bigger, so hide it.\n      this.hide();\n    }\n  }).bind(this);\n\n  /**\n   * @internal\n   * @type {MediaQueryList}\n   */\n  drawerAvailableMediaQuery;\n\n  /**\n   * Check whether or not the drawer is currently open.\n   *\n   * @return {boolean}\n   */\n  isOpen() {\n    return this.appElement.classList.contains('drawerOpen');\n  }\n\n  /**\n   * Hide the drawer.\n   */\n  hide() {\n    /**\n     * As part of hiding the drawer, this function also ensures that the drawer\n     * correctly animates out, while ensuring it is not part of the navigation\n     * tree while off-screen.\n     *\n     * More info: https://github.com/flarum/core/pull/2666#discussion_r595381014\n     */\n\n    this.focusTrap.deactivate();\n    this.drawerAvailableMediaQuery.removeListener(this.resizeHandler);\n\n    if (!this.isOpen()) return;\n\n    const $drawer = $('#drawer');\n\n    // Used to prevent `visibility: hidden` from breaking the exit animation\n    $drawer.css('visibility', 'visible').one('transitionend', () => $drawer.css('visibility', ''));\n\n    this.appElement.classList.remove('drawerOpen');\n\n    this.$backdrop?.remove?.();\n  }\n\n  /**\n   * Show the drawer.\n   */\n  show() {\n    this.appElement.classList.add('drawerOpen');\n\n    this.drawerAvailableMediaQuery.addListener(this.resizeHandler);\n\n    this.$backdrop = $('<div/>').addClass('drawer-backdrop fade').appendTo('body').on('click', this.hide.bind(this));\n\n    requestAnimationFrame(() => {\n      this.$backdrop.addClass('in');\n\n      this.focusTrap.activate();\n    });\n  }\n}\n","import type { FlarumGenericRoute, RouteResolver } from '../Application';\nimport type Component from '../Component';\nimport DefaultResolver from '../resolvers/DefaultResolver';\n\n/**\n * The `mapRoutes` utility converts a map of named application routes into a\n * format that can be understood by Mithril, and wraps them in route resolvers\n * to provide each route with the current route name.\n *\n * @see https://mithril.js.org/route.html#signature\n */\nexport default function mapRoutes(routes: Record<string, FlarumGenericRoute>, basePath: string = '') {\n  const map: Record<\n    string,\n    RouteResolver<Record<string, unknown>, Component<{ routeName: string; [key: string]: unknown }>, Record<string, unknown>>\n  > = {};\n\n  for (const routeName in routes) {\n    const route = routes[routeName];\n\n    if ('resolver' in route) {\n      map[basePath + route.path] = route.resolver;\n    } else if ('component' in route) {\n      const resolverClass = 'resolverClass' in route ? route.resolverClass! : DefaultResolver;\n      map[basePath + route.path] = new resolverClass(route.component, routeName);\n    } else {\n      throw new Error(`Either a resolver or a component must be provided for the route [${routeName}]`);\n    }\n  }\n\n  return map;\n}\n","import type Mithril from 'mithril';\nimport type { AlertAttrs } from '../components/Alert';\n\nexport type InternalFlarumRequestOptions<ResponseType> = Mithril.RequestOptions<ResponseType> & {\n  url: string;\n};\n\nexport default class RequestError<ResponseType = string> {\n  status: number;\n  options: InternalFlarumRequestOptions<ResponseType>;\n  xhr: XMLHttpRequest;\n\n  responseText: string | null;\n  response: {\n    [key: string]: unknown;\n    errors?: {\n      detail?: string;\n      code?: string;\n      [key: string]: unknown;\n    }[];\n  } | null;\n\n  alert: AlertAttrs | null;\n\n  constructor(status: number, responseText: string | null, options: InternalFlarumRequestOptions<ResponseType>, xhr: XMLHttpRequest) {\n    this.status = status;\n    this.responseText = responseText;\n    this.options = options;\n    this.xhr = xhr;\n\n    try {\n      this.response = JSON.parse(responseText ?? 'null');\n    } catch (e) {\n      this.response = null;\n    }\n\n    this.alert = null;\n  }\n}\n","import humanTime from './humanTime';\n\nfunction updateHumanTimes() {\n  $('[data-humantime]').each(function () {\n    const $this = $(this);\n    const ago = humanTime($this.attr('datetime'));\n\n    $this.html(ago);\n  });\n}\n\n/**\n * The `liveHumanTimes` initializer sets up a loop every 1 second to update\n * timestamps rendered with the `humanTime` helper.\n */\nexport default function liveHumanTimes() {\n  setInterval(updateHumanTimes, 10000);\n}\n","/**\n * Extend an object's method by running its output through a mutating callback\n * every time it is called.\n *\n * The callback accepts the method's return value and should perform any\n * mutations directly on this value. For this reason, this function will not be\n * effective on methods which return scalar values (numbers, strings, booleans).\n *\n * Care should be taken to extend the correct object \u2013 in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example <caption>Example usage of extending one method.</caption>\n * extend(Discussion.prototype, 'badges', function(badges) {\n *   // do something with `badges`\n * });\n *\n * @example <caption>Example usage of extending multiple methods.</caption>\n * extend(IndexPage.prototype, ['oncreate', 'onupdate'], function(vnode) {\n *   // something that needs to be run on creation and update\n * });\n *\n * @param object The object that owns the method\n * @param methods The name or names of the method(s) to extend\n * @param callback A callback which mutates the method's output\n */\nexport function extend<T extends Record<string, any>, K extends KeyOfType<T, Function>>(\n  object: T,\n  methods: K | K[],\n  callback: (this: T, val: ReturnType<T[K]>, ...args: Parameters<T[K]>) => void\n) {\n  const allMethods = Array.isArray(methods) ? methods : [methods];\n\n  allMethods.forEach((method: K) => {\n    const original: Function | undefined = object[method];\n\n    object[method] = function (this: T, ...args: Parameters<T[K]>) {\n      const value = original ? original.apply(this, args) : undefined;\n\n      callback.apply(this, [value, ...args]);\n\n      return value;\n    } as T[K];\n\n    Object.assign(object[method], original);\n  });\n}\n\n/**\n * Override an object's method by replacing it with a new function, so that the\n * new function will be run every time the object's method is called.\n *\n * The replacement function accepts the original method as its first argument,\n * which is like a call to `super`. Any arguments passed to the original method\n * are also passed to the replacement.\n *\n * Care should be taken to extend the correct object \u2013 in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example <caption>Example usage of overriding one method.</caption>\n * override(Discussion.prototype, 'badges', function(original) {\n *   const badges = original();\n *   // do something with badges\n *   return badges;\n * });\n *\n * @example <caption>Example usage of overriding multiple methods.</caption>\n * extend(Discussion.prototype, ['oncreate', 'onupdate'], function(original, vnode) {\n *   // something that needs to be run on creation and update\n * });\n *\n * @param object The object that owns the method\n * @param methods The name or names of the method(s) to override\n * @param newMethod The method to replace it with\n */\nexport function override<T extends Record<any, any>, K extends KeyOfType<T, Function>>(\n  object: T,\n  methods: K | K[],\n  newMethod: (this: T, orig: T[K], ...args: Parameters<T[K]>) => void\n) {\n  const allMethods = Array.isArray(methods) ? methods : [methods];\n\n  allMethods.forEach((method) => {\n    const original: Function = object[method];\n\n    object[method] = function (this: T, ...args: Parameters<T[K]>) {\n      return newMethod.apply(this, [original.bind(this), ...args]);\n    } as T[K];\n\n    Object.assign(object[method], original);\n  });\n}\n","import Model from '../Model';\n\nexport default class Forum extends Model {\n  apiEndpoint() {\n    return '/';\n  }\n}\n","type RGB = { r: number; g: number; b: number };\n\nfunction hsvToRgb(h: number, s: number, v: number): RGB {\n  let r!: number;\n  let g!: number;\n  let b!: number;\n\n  const i = Math.floor(h * 6);\n  const f = h * 6 - i;\n  const p = v * (1 - s);\n  const q = v * (1 - f * s);\n  const t = v * (1 - (1 - f) * s);\n\n  switch (i % 6) {\n    case 0:\n      r = v;\n      g = t;\n      b = p;\n      break;\n    case 1:\n      r = q;\n      g = v;\n      b = p;\n      break;\n    case 2:\n      r = p;\n      g = v;\n      b = t;\n      break;\n    case 3:\n      r = p;\n      g = q;\n      b = v;\n      break;\n    case 4:\n      r = t;\n      g = p;\n      b = v;\n      break;\n    case 5:\n      r = v;\n      g = p;\n      b = q;\n      break;\n  }\n\n  return {\n    r: Math.floor(r * 255),\n    g: Math.floor(g * 255),\n    b: Math.floor(b * 255),\n  };\n}\n\n/**\n * Convert the given string to a unique color.\n */\nexport default function stringToColor(string: string): string {\n  let num = 0;\n\n  // Convert the username into a number based on the ASCII value of each\n  // character.\n  for (let i = 0; i < string.length; i++) {\n    num += string.charCodeAt(i);\n  }\n\n  // Construct a color using the remainder of that number divided by 360, and\n  // some predefined saturation and value values.\n  const hue = num % 360;\n  const rgb = hsvToRgb(hue / 360, 0.3, 0.9);\n\n  return '' + rgb.r.toString(16) + rgb.g.toString(16) + rgb.b.toString(16);\n}\n","import ColorThief, { Color } from 'color-thief-browser';\n\nimport Model from '../Model';\nimport stringToColor from '../utils/stringToColor';\nimport ItemList from '../utils/ItemList';\nimport computed from '../utils/computed';\nimport GroupBadge from '../components/GroupBadge';\nimport Mithril from 'mithril';\nimport Group from './Group';\n\nexport default class User extends Model {\n  username() {\n    return Model.attribute<string>('username').call(this);\n  }\n  slug() {\n    return Model.attribute<string>('slug').call(this);\n  }\n  displayName() {\n    return Model.attribute<string>('displayName').call(this);\n  }\n\n  email() {\n    return Model.attribute<string | undefined>('email').call(this);\n  }\n  isEmailConfirmed() {\n    return Model.attribute<boolean | undefined>('isEmailConfirmed').call(this);\n  }\n\n  password() {\n    return Model.attribute<string | undefined>('password').call(this);\n  }\n\n  avatarUrl() {\n    return Model.attribute<string | null>('avatarUrl').call(this);\n  }\n\n  preferences() {\n    return Model.attribute<Record<string, any> | null | undefined>('preferences').call(this);\n  }\n\n  groups() {\n    return Model.hasMany<Group>('groups').call(this);\n  }\n\n  isAdmin() {\n    return Model.attribute<boolean | undefined>('isAdmin').call(this);\n  }\n\n  joinTime() {\n    return Model.attribute('joinTime', Model.transformDate).call(this);\n  }\n\n  lastSeenAt() {\n    return Model.attribute('lastSeenAt', Model.transformDate).call(this);\n  }\n\n  markedAllAsReadAt() {\n    return Model.attribute('markedAllAsReadAt', Model.transformDate).call(this);\n  }\n\n  unreadNotificationCount() {\n    return Model.attribute<number | undefined>('unreadNotificationCount').call(this);\n  }\n  newNotificationCount() {\n    return Model.attribute<number | undefined>('newNotificationCount').call(this);\n  }\n\n  discussionCount() {\n    return Model.attribute<number | undefined>('discussionCount').call(this);\n  }\n  commentCount() {\n    return Model.attribute<number | undefined>('commentCount').call(this);\n  }\n\n  canEdit() {\n    return Model.attribute<boolean | undefined>('canEdit').call(this);\n  }\n  canEditCredentials() {\n    return Model.attribute<boolean | undefined>('canEditCredentials').call(this);\n  }\n  canEditGroups() {\n    return Model.attribute<boolean | undefined>('canEditGroups').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n\n  color() {\n    return computed<string, User>('displayName', 'avatarUrl', 'avatarColor', (displayName, avatarUrl, avatarColor) => {\n      // If we've already calculated and cached the dominant color of the user's\n      // avatar, then we can return that in RGB format. If we haven't, we'll want\n      // to calculate it. Unless the user doesn't have an avatar, in which case\n      // we generate a color from their display name.\n      if (avatarColor) {\n        return `rgb(${(avatarColor as Color).join(', ')})`;\n      } else if (avatarUrl) {\n        this.calculateAvatarColor();\n        return '';\n      }\n\n      return '#' + stringToColor(displayName as string);\n    }).call(this);\n  }\n\n  protected avatarColor: Color | null = null;\n\n  /**\n   * Check whether or not the user has been seen in the last 5 minutes.\n   */\n  isOnline(): boolean {\n    return dayjs().subtract(5, 'minutes').isBefore(this.lastSeenAt());\n  }\n\n  /**\n   * Get the Badge components that apply to this user.\n   */\n  badges(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n    const groups = this.groups();\n\n    if (groups) {\n      groups.forEach((group) => {\n        items.add(`group${group?.id()}`, <GroupBadge group={group} />);\n      });\n    }\n\n    return items;\n  }\n\n  /**\n   * Calculate the dominant color of the user's avatar. The dominant color will\n   * be set to the `avatarColor` property once it has been calculated.\n   */\n  protected calculateAvatarColor() {\n    const image = new Image();\n    const user = this;\n\n    image.addEventListener('load', function (this: HTMLImageElement) {\n      try {\n        const colorThief = new ColorThief();\n        user.avatarColor = colorThief.getColor(this);\n      } catch (e) {\n        // Completely white avatars throw errors due to a glitch in color thief\n        // See https://github.com/lokesh/color-thief/issues/40\n        if (e instanceof TypeError) {\n          user.avatarColor = [255, 255, 255];\n        } else {\n          throw e;\n        }\n      }\n      user.freshness = new Date();\n      m.redraw();\n    });\n    image.crossOrigin = 'anonymous';\n    image.src = this.avatarUrl() ?? '';\n  }\n\n  /**\n   * Update the user's preferences.\n   */\n  savePreferences(newPreferences: Record<string, unknown>): Promise<this> {\n    const preferences = this.preferences();\n\n    Object.assign(preferences ?? {}, newPreferences);\n\n    return this.save({ preferences });\n  }\n}\n","import Model from '../Model';\nimport computed from '../utils/computed';\nimport { getPlainContent } from '../utils/string';\nimport Discussion from './Discussion';\nimport User from './User';\n\nexport default class Post extends Model {\n  number() {\n    return Model.attribute<number>('number').call(this);\n  }\n  discussion() {\n    return Model.hasOne<Discussion>('discussion').call(this) as Discussion;\n  }\n\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n  user() {\n    return Model.hasOne<User>('user').call(this);\n  }\n\n  contentType() {\n    return Model.attribute<string | null>('contentType').call(this);\n  }\n  content() {\n    return Model.attribute<string | null | undefined>('content').call(this);\n  }\n  contentHtml() {\n    return Model.attribute<string | null | undefined>('contentHtml').call(this);\n  }\n  renderFailed() {\n    return Model.attribute<boolean | undefined>('renderFailed').call(this);\n  }\n  contentPlain() {\n    return computed<string | null | undefined>('contentHtml', (content) => {\n      if (typeof content === 'string') {\n        return getPlainContent(content);\n      }\n\n      return content as null | undefined;\n    }).call(this);\n  }\n\n  editedAt() {\n    return Model.attribute('editedAt', Model.transformDate).call(this);\n  }\n  editedUser() {\n    return Model.hasOne<User | null>('editedUser').call(this);\n  }\n  isEdited() {\n    return computed<boolean>('editedAt', (editedAt) => !!editedAt).call(this);\n  }\n\n  hiddenAt() {\n    return Model.attribute('hiddenAt', Model.transformDate).call(this);\n  }\n  hiddenUser() {\n    return Model.hasOne<User | null>('hiddenUser').call(this);\n  }\n  isHidden() {\n    return computed<boolean>('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n  }\n\n  canEdit() {\n    return Model.attribute<boolean | undefined>('canEdit').call(this);\n  }\n  canHide() {\n    return Model.attribute<boolean | undefined>('canHide').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n}\n","import Model from '../Model';\nimport User from './User';\n\nexport default class Notification extends Model {\n  contentType() {\n    return Model.attribute<string>('contentType').call(this);\n  }\n  content<T = unknown>() {\n    return Model.attribute<T>('content').call(this);\n  }\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n\n  isRead() {\n    return Model.attribute<boolean>('isRead').call(this);\n  }\n\n  user() {\n    return Model.hasOne<User>('user').call(this);\n  }\n  fromUser() {\n    return Model.hasOne<User | null>('fromUser').call(this);\n  }\n  subject() {\n    return Model.hasOne<Model | null>('subject').call(this);\n  }\n}\n","import type Component from '../Component';\nimport Modal, { IDismissibleOptions } from '../components/Modal';\n\n/**\n * Ideally, `show` would take a higher-kinded generic, ala:\n *  `show<Attrs, C>(componentClass: C<Attrs>, attrs: Attrs): void`\n * Unfortunately, TypeScript does not support this:\n * https://github.com/Microsoft/TypeScript/issues/1213\n * Therefore, we have to use this ugly, messy workaround.\n */\ntype UnsafeModalClass = ComponentClass<any, Modal> & { get dismissibleOptions(): IDismissibleOptions; component: typeof Component.component };\n\ntype ModalItem = {\n  componentClass: UnsafeModalClass;\n  attrs?: Record<string, unknown>;\n  key: number;\n};\n\n/**\n * Class used to manage modal state.\n *\n * Accessible on the `app` object via `app.modal` property.\n */\nexport default class ModalManagerState {\n  /**\n   * @internal\n   */\n  modal: ModalItem | null = null;\n\n  /**\n   * @internal\n   */\n  modalList: ModalItem[] = [];\n\n  /**\n   * @internal\n   */\n  backdropShown: boolean = false;\n\n  /**\n   * Used to force re-initialization of modals if a modal\n   * is replaced by another of the same type.\n   */\n  private key = 0;\n\n  /**\n   * Shows a modal dialog.\n   *\n   * If `stackModal` is `true`, the modal will be shown on top of the current modal.\n   *\n   * If a value for `stackModal` is not provided, opening a new modal will close\n   * any others currently being shown for backwards compatibility.\n   *\n   * @example <caption>Show a modal</caption>\n   * app.modal.show(MyCoolModal, { attr: 'value' });\n   *\n   * @example <caption>Show a modal from a lifecycle method (`oncreate`, `view`, etc.)</caption>\n   * // This \"hack\" is needed due to quirks with nested redraws in Mithril.\n   * setTimeout(() => app.modal.show(MyCoolModal, { attr: 'value' }), 0);\n   *\n   * @example <caption>Stacking modals</caption>\n   * app.modal.show(MyCoolStackedModal, { attr: 'value' }, true);\n   */\n  show(componentClass: UnsafeModalClass, attrs: Record<string, unknown> = {}, stackModal: boolean = false): void {\n    if (!(componentClass.prototype instanceof Modal)) {\n      // This is duplicated so that if the error is caught, an error message still shows up in the debug console.\n      const invalidModalWarning = 'The ModalManager can only show Modals.';\n      console.error(invalidModalWarning);\n      throw new Error(invalidModalWarning);\n    }\n\n    this.backdropShown = true;\n    m.redraw.sync();\n\n    // We use requestAnimationFrame here, since we need to wait for the backdrop to be added\n    // to the DOM before actually adding the modal to the modal list.\n    //\n    // This is because we use RAF inside the ModalManager onupdate lifecycle hook, and if we\n    // skip this RAF call, the hook will attempt to add a focus trap as well as lock scroll\n    // onto the newly added modal before it's in the DOM, creating an extra scrollbar.\n    requestAnimationFrame(() => {\n      // Set current modal\n      this.modal = { componentClass, attrs, key: this.key++ };\n\n      // We want to stack this modal\n      if (stackModal) {\n        // Remember previously opened modal and add new modal to the modal list\n        this.modalList.push(this.modal);\n      } else {\n        // Override last modals\n        this.modalList = [this.modal];\n      }\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Closes the topmost currently open dialog, if one is open.\n   */\n  close(): void {\n    if (!this.modal) return;\n\n    // If there are two modals, remove the most recent one\n    if (this.modalList.length > 1) {\n      // Remove last modal from list\n      this.modalList.pop();\n\n      // Open last modal from list\n      this.modal = this.modalList[this.modalList.length - 1];\n    } else {\n      // Reset state\n      this.modal = null;\n      this.modalList = [];\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Checks if a modal is currently open.\n   *\n   * @return `true` if a modal dialog is currently open, otherwise `false`.\n   */\n  isModalOpen(): boolean {\n    return !!this.modal;\n  }\n}\n","import type Mithril from 'mithril';\nimport Alert, { AlertAttrs } from '../components/Alert';\n\n/**\n * Returned by `AlertManagerState.show`. Used to dismiss alerts.\n */\nexport type AlertIdentifier = number;\n\nexport type AlertArray = { [id: AlertIdentifier]: AlertState };\n\nexport interface AlertState {\n  componentClass: typeof Alert;\n  attrs: AlertAttrs;\n  children: Mithril.Children;\n}\n\nexport default class AlertManagerState {\n  protected activeAlerts: AlertArray = {};\n  protected alertId: AlertIdentifier = 0;\n\n  getActiveAlerts() {\n    return this.activeAlerts;\n  }\n\n  /**\n   * Show an Alert in the alerts area.\n   *\n   * @return The alert's ID, which can be used to dismiss the alert.\n   */\n  show(children: Mithril.Children): AlertIdentifier;\n  show(attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;\n  show(componentClass: typeof Alert, attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;\n\n  show(arg1: any, arg2?: any, arg3?: any) {\n    // Assigns variables as per the above signatures\n    let componentClass = Alert;\n    let attrs: AlertAttrs = {};\n    let children: Mithril.Children;\n\n    if (arguments.length == 1) {\n      children = arg1 as Mithril.Children;\n    } else if (arguments.length == 2) {\n      attrs = arg1 as AlertAttrs;\n      children = arg2 as Mithril.Children;\n    } else if (arguments.length == 3) {\n      componentClass = arg1 as typeof Alert;\n      attrs = arg2 as AlertAttrs;\n      children = arg3;\n    }\n\n    this.activeAlerts[++this.alertId] = { children, attrs, componentClass };\n    m.redraw();\n\n    return this.alertId;\n  }\n\n  /**\n   * Dismiss an alert.\n   */\n  dismiss(key: AlertIdentifier | null): void {\n    if (!key || !(key in this.activeAlerts)) return;\n\n    delete this.activeAlerts[key];\n    m.redraw();\n  }\n\n  /**\n   * Clear all alerts.\n   */\n  clear(): void {\n    this.activeAlerts = {};\n    m.redraw();\n  }\n}\n","import app from '../app';\n\n/**\n * Fire a Flarum error which is shown in the JS console for everyone and in an alert for the admin.\n *\n * @param userTitle: a user friendly title of the error, should be localized.\n * @param consoleTitle: an error title that goes in the console, doesn't have to be localized.\n * @param error: the error.\n */\nexport default function fireApplicationError(userTitle: string, consoleTitle: string, error: any) {\n  console.group(`%c${consoleTitle}`, 'background-color: #d83e3e; color: #ffffff; font-weight: bold;');\n  console.error(error);\n  console.groupEnd();\n\n  if (app.session?.user?.isAdmin()) {\n    app.alerts.show({ type: 'error' }, `${userTitle}`);\n  }\n}\n","import Model from '../Model';\n\nexport default class AccessToken extends Model {\n  token() {\n    return Model.attribute<string | undefined>('token').call(this);\n  }\n  userId() {\n    return Model.attribute<string>('userId').call(this);\n  }\n  title() {\n    return Model.attribute<string | null>('title').call(this);\n  }\n  type() {\n    return Model.attribute<string>('type').call(this);\n  }\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n  lastActivityAt() {\n    return Model.attribute<Date, string>('lastActivityAt', Model.transformDate).call(this);\n  }\n  lastIpAddress() {\n    return Model.attribute<string>('lastIpAddress').call(this);\n  }\n  device() {\n    return Model.attribute<string>('device').call(this);\n  }\n  isCurrent() {\n    return Model.attribute<boolean>('isCurrent').call(this);\n  }\n  isSessionToken() {\n    return Model.attribute<boolean>('isSessionToken').call(this);\n  }\n}\n","import app from '../common/app';\n\nimport ItemList from './utils/ItemList';\nimport Button from './components/Button';\nimport ModalManager from './components/ModalManager';\nimport AlertManager from './components/AlertManager';\nimport RequestErrorModal from './components/RequestErrorModal';\nimport Translator from './Translator';\nimport Store, { ApiPayload, ApiResponse, ApiResponsePlural, ApiResponseSingle, payloadIsPlural } from './Store';\nimport Session from './Session';\nimport extract from './utils/extract';\nimport extractText from './utils/extractText';\nimport Drawer from './utils/Drawer';\nimport mapRoutes from './utils/mapRoutes';\nimport RequestError, { InternalFlarumRequestOptions } from './utils/RequestError';\nimport ScrollListener from './utils/ScrollListener';\nimport liveHumanTimes from './utils/liveHumanTimes';\n// @ts-expect-error We need to explicitly use the prefix to distinguish between the extend folder.\nimport { extend } from './extend.ts';\n\nimport Forum from './models/Forum';\nimport User from './models/User';\nimport Discussion from './models/Discussion';\nimport Post from './models/Post';\nimport Group from './models/Group';\nimport Notification from './models/Notification';\nimport PageState from './states/PageState';\nimport ModalManagerState from './states/ModalManagerState';\nimport AlertManagerState from './states/AlertManagerState';\n\nimport type DefaultResolver from './resolvers/DefaultResolver';\nimport type Mithril from 'mithril';\nimport type Component from './Component';\nimport type { ComponentAttrs } from './Component';\nimport Model, { SavedModelData } from './Model';\nimport fireApplicationError from './helpers/fireApplicationError';\nimport IHistory from './IHistory';\nimport IExtender from './extenders/IExtender';\nimport AccessToken from './models/AccessToken';\n\nexport type FlarumScreens = 'phone' | 'tablet' | 'desktop' | 'desktop-hd';\n\nexport type FlarumGenericRoute = RouteItem<any, any, any>;\n\nexport interface FlarumRequestOptions<ResponseType> extends Omit<Mithril.RequestOptions<ResponseType>, 'extract'> {\n  errorHandler?: (error: RequestError) => void;\n  url: string;\n  // TODO: [Flarum 2.0] Remove deprecated option\n  /**\n   * Manipulate the response text before it is parsed into JSON.\n   *\n   * @deprecated Please use `modifyText` instead.\n   */\n  extract?: (responseText: string) => string;\n  /**\n   * Manipulate the response text before it is parsed into JSON.\n   *\n   * This overrides any `extract` method provided.\n   */\n  modifyText?: (responseText: string) => string;\n}\n\n/**\n * A valid route definition.\n */\nexport type RouteItem<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> = {\n  /**\n   * The path for your route.\n   *\n   * This might be a specific URL path (e.g.,`/myPage`), or it might\n   * contain a variable used by a resolver (e.g., `/myPage/:id`).\n   *\n   * @see https://docs.flarum.org/extend/frontend-pages.html#route-resolvers-advanced\n   */\n  path: `/${string}`;\n} & (\n  | {\n      /**\n       * The component to render when this route matches.\n       */\n      component: new () => Comp;\n      /**\n       * A custom resolver class.\n       *\n       * This should be the class itself, and **not** an instance of the\n       * class.\n       */\n      resolverClass?: new (component: new () => Comp, routeName: string) => DefaultResolver<Attrs, Comp, RouteArgs>;\n    }\n  | {\n      /**\n       * An instance of a route resolver.\n       */\n      resolver: RouteResolver<Attrs, Comp, RouteArgs>;\n    }\n);\n\nexport interface RouteResolver<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> {\n  /**\n   * A method which selects which component to render based on\n   * conditional logic.\n   *\n   * Returns the component class, and **not** a Vnode or JSX\n   * expression.\n   *\n   * @see https://mithril.js.org/route.html#routeresolveronmatch\n   */\n  onmatch(this: this, args: RouteArgs, requestedPath: string, route: string): { new (): Comp };\n  /**\n   * A function which renders the provided component.\n   *\n   * If not specified, the route will default to rendering the\n   * component on its own, inside of a fragment.\n   *\n   * Returns a Mithril Vnode or other children.\n   *\n   * @see https://mithril.js.org/route.html#routeresolverrender\n   */\n  render?(this: this, vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children;\n}\n\nexport interface ApplicationData {\n  apiDocument: ApiPayload | null;\n  locale: string;\n  locales: Record<string, string>;\n  resources: SavedModelData[];\n  session: { userId: number; csrfToken: string };\n  [key: string]: unknown;\n}\n\n/**\n * The `App` class provides a container for an application, as well as various\n * utilities for the rest of the app to use.\n */\nexport default class Application {\n  /**\n   * The forum model for this application.\n   */\n  forum!: Forum;\n\n  /**\n   * A map of routes, keyed by a unique route name. Each route is an object\n   * containing the following properties:\n   *\n   * - `path` The path that the route is accessed at.\n   * - `component` The Mithril component to render when this route is active.\n   *\n   * @example\n   * app.routes.discussion = { path: '/d/:id', component: DiscussionPage };\n   */\n  routes: Record<string, FlarumGenericRoute> = {};\n\n  /**\n   * An ordered list of initializers to bootstrap the application.\n   */\n  initializers: ItemList<(app: this) => void> = new ItemList();\n\n  /**\n   * The app's session.\n   *\n   * Stores info about the current user.\n   */\n  session!: Session;\n\n  /**\n   * The app's translator.\n   */\n  translator: Translator = new Translator();\n\n  /**\n   * The app's data store.\n   */\n  store: Store = new Store({\n    'access-tokens': AccessToken,\n    forums: Forum,\n    users: User,\n    discussions: Discussion,\n    posts: Post,\n    groups: Group,\n    notifications: Notification,\n  });\n\n  /**\n   * A local cache that can be used to store data at the application level, so\n   * that is persists between different routes.\n   */\n  cache: Record<string, unknown> = {};\n\n  /**\n   * Whether or not the app has been booted.\n   */\n  booted: boolean = false;\n\n  /**\n   * The page the app is currently on.\n   *\n   * This object holds information about the type of page we are currently\n   * visiting, and sometimes additional arbitrary page state that may be\n   * relevant to lower-level components.\n   */\n  current: PageState = new PageState(null);\n\n  /**\n   * The page the app was on before the current page.\n   *\n   * Once the application navigates to another page, the object previously\n   * assigned to this.current will be moved to this.previous, while this.current\n   * is re-initialized.\n   */\n  previous: PageState = new PageState(null);\n\n  /**\n   * An object that manages modal state.\n   */\n  modal: ModalManagerState = new ModalManagerState();\n\n  /**\n   * An object that manages the state of active alerts.\n   */\n  alerts: AlertManagerState = new AlertManagerState();\n\n  /**\n   * An object that manages the state of the navigation drawer.\n   */\n  drawer!: Drawer;\n\n  history: IHistory | null = null;\n  pane: any = null;\n\n  data!: ApplicationData;\n\n  refs: Record<string, string> = {\n    fontawesome: 'https://fontawesome.com/v5/search?o=r&m=free',\n  };\n\n  private _title: string = '';\n  private _titleCount: number = 0;\n\n  private set title(val: string) {\n    this._title = val;\n  }\n\n  get title() {\n    return this._title;\n  }\n\n  private set titleCount(val: number) {\n    this._titleCount = val;\n  }\n\n  get titleCount() {\n    return this._titleCount;\n  }\n\n  /**\n   * The key for an Alert that was shown as a result of an AJAX request error.\n   * If present, it will be dismissed on the next successful request.\n   */\n  private requestErrorAlert: number | null = null;\n\n  initialRoute!: string;\n\n  public load(payload: Application['data']) {\n    this.data = payload;\n    this.translator.setLocale(payload.locale);\n  }\n\n  public boot() {\n    const caughtInitializationErrors: CallableFunction[] = [];\n\n    this.initializers.toArray().forEach((initializer) => {\n      try {\n        initializer(this);\n      } catch (e) {\n        const extension = initializer.itemName.includes('/')\n          ? initializer.itemName.replace(/(\\/flarum-ext-)|(\\/flarum-)/g, '-')\n          : initializer.itemName;\n\n        caughtInitializationErrors.push(() =>\n          fireApplicationError(\n            extractText(app.translator.trans('core.lib.error.extension_initialiation_failed_message', { extension })),\n            `${extension} failed to initialize`,\n            e\n          )\n        );\n      }\n    });\n\n    this.store.pushPayload({ data: this.data.resources });\n\n    this.forum = this.store.getById('forums', '1')!;\n\n    this.session = new Session(this.store.getById<User>('users', String(this.data.session.userId)) ?? null, this.data.session.csrfToken);\n\n    this.mount();\n\n    this.initialRoute = window.location.href;\n\n    caughtInitializationErrors.forEach((handler) => handler());\n  }\n\n  public bootExtensions(extensions: Record<string, { extend?: IExtender[] }>) {\n    Object.keys(extensions).forEach((name) => {\n      const extension = extensions[name];\n\n      // If an extension doesn't define extenders, there's nothing more to do here.\n      if (!extension.extend) return;\n\n      const extenders = extension.extend.flat(Infinity);\n\n      for (const extender of extenders) {\n        extender.extend(this, { name, exports: extension });\n      }\n    });\n  }\n\n  protected mount(basePath: string = '') {\n    // An object with a callable view property is used in order to pass arguments to the component; see https://mithril.js.org/mount.html\n    m.mount(document.getElementById('modal')!, { view: () => <ModalManager state={this.modal} /> });\n    m.mount(document.getElementById('alerts')!, { view: () => <AlertManager state={this.alerts} /> });\n\n    this.drawer = new Drawer();\n\n    m.route(document.getElementById('content')!, basePath + '/', mapRoutes(this.routes, basePath));\n\n    const appEl = document.getElementById('app')!;\n    const appHeaderEl = document.querySelector('.App-header')!;\n\n    // Add a class to the body which indicates that the page has been scrolled\n    // down. When this happens, we'll add classes to the header and app body\n    // which will set the navbar's position to fixed. We don't want to always\n    // have it fixed, as that could overlap with custom headers.\n    const scrollListener = new ScrollListener((top: number) => {\n      const offset = appEl.getBoundingClientRect().top + document.body.scrollTop;\n\n      appEl.classList.toggle('affix', top >= offset);\n      appEl.classList.toggle('scrolled', top > offset);\n\n      appHeaderEl.classList.toggle('navbar-fixed-top', top >= offset);\n    });\n\n    scrollListener.start();\n    scrollListener.update();\n\n    document.body.classList.add('ontouchstart' in window ? 'touch' : 'no-touch');\n\n    liveHumanTimes();\n  }\n\n  /**\n   * Get the API response document that has been preloaded into the application.\n   */\n  preloadedApiDocument<M extends Model>(): ApiResponseSingle<M> | null;\n  preloadedApiDocument<Ms extends Model[]>(): ApiResponsePlural<Ms[number]> | null;\n  preloadedApiDocument<M extends Model | Model[]>(): ApiResponse<FlatArray<M, 1>> | null {\n    // If the URL has changed, the preloaded Api document is invalid.\n    if (this.data.apiDocument && window.location.href === this.initialRoute) {\n      const results = payloadIsPlural(this.data.apiDocument)\n        ? this.store.pushPayload<FlatArray<M, 1>[]>(this.data.apiDocument)\n        : this.store.pushPayload<FlatArray<M, 1>>(this.data.apiDocument);\n\n      this.data.apiDocument = null;\n\n      return results;\n    }\n\n    return null;\n  }\n\n  /**\n   * Determine the current screen mode, based on our media queries.\n   */\n  screen(): FlarumScreens {\n    const styles = getComputedStyle(document.documentElement);\n    return styles.getPropertyValue('--flarum-screen') as ReturnType<Application['screen']>;\n  }\n\n  /**\n   * Set the `<title>` of the page.\n   *\n   * @param title New page title\n   */\n  setTitle(title: string): void {\n    this.title = title;\n    this.updateTitle();\n  }\n\n  /**\n   * Set a number to display in the `<title>` of the page.\n   *\n   * @param count Number to display in title\n   */\n  setTitleCount(count: number): void {\n    this.titleCount = count;\n    this.updateTitle();\n  }\n\n  updateTitle(): void {\n    const count = this.titleCount ? `(${this.titleCount}) ` : '';\n    const onHomepage = m.route.get() === this.forum.attribute('basePath') + '/';\n\n    const params = {\n      pageTitle: this.title,\n      forumName: this.forum.attribute('title'),\n      // Until we add page numbers to the frontend, this is constant at 1\n      // so that the page number portion doesn't show up in the URL.\n      pageNumber: 1,\n    };\n\n    let title =\n      onHomepage || !this.title\n        ? extractText(app.translator.trans('core.lib.meta_titles.without_page_title', params))\n        : extractText(app.translator.trans('core.lib.meta_titles.with_page_title', params));\n\n    title = count + title;\n\n    // We pass the title through a DOMParser to allow HTML entities\n    // to be rendered correctly, while still preventing XSS attacks\n    // from user input by using a script-disabled environment.\n    // https://github.com/flarum/framework/issues/3514\n    // https://github.com/flarum/framework/pull/3684\n    // This is only a temporary solution for 1.x,\n    // and the actual source of the issue will be fixed in 2.x\n    // Actual source of the issue: https://github.com/flarum/framework/issues/3685\n    const parser = new DOMParser();\n    document.title = parser.parseFromString(title, 'text/html').body.innerText;\n  }\n\n  protected transformRequestOptions<ResponseType>(flarumOptions: FlarumRequestOptions<ResponseType>): InternalFlarumRequestOptions<ResponseType> {\n    const { background, deserialize, extract, modifyText, ...tmpOptions } = { ...flarumOptions };\n\n    // Unless specified otherwise, requests should run asynchronously in the\n    // background, so that they don't prevent redraws from occurring.\n    const defaultBackground = true;\n\n    // When we deserialize JSON data, if for some reason the server has provided\n    // a dud response, we don't want the application to crash. We'll show an\n    // error message to the user instead.\n\n    const defaultDeserialize = (response: string) => response as ResponseType;\n\n    // When extracting the data from the response, we can check the server\n    // response code and show an error message to the user if something's gone\n    // awry.\n    const originalExtract = modifyText || extract;\n\n    const options: InternalFlarumRequestOptions<ResponseType> = {\n      background: background ?? defaultBackground,\n      deserialize: deserialize ?? defaultDeserialize,\n      ...tmpOptions,\n    };\n\n    extend(options, 'config', (_: undefined, xhr: XMLHttpRequest) => {\n      xhr.setRequestHeader('X-CSRF-Token', this.session.csrfToken!);\n    });\n\n    // If the method is something like PATCH or DELETE, which not all servers\n    // and clients support, then we'll send it as a POST request with the\n    // intended method specified in the X-HTTP-Method-Override header.\n    if (options.method && !['GET', 'POST'].includes(options.method)) {\n      const method = options.method;\n\n      extend(options, 'config', (_: undefined, xhr: XMLHttpRequest) => {\n        xhr.setRequestHeader('X-HTTP-Method-Override', method);\n      });\n\n      options.method = 'POST';\n    }\n\n    options.extract = (xhr: XMLHttpRequest) => {\n      let responseText;\n\n      if (originalExtract) {\n        responseText = originalExtract(xhr.responseText);\n      } else {\n        responseText = xhr.responseText;\n      }\n\n      const status = xhr.status;\n\n      if (status < 200 || status > 299) {\n        throw new RequestError<ResponseType>(status, `${responseText}`, options, xhr);\n      }\n\n      if (xhr.getResponseHeader) {\n        const csrfToken = xhr.getResponseHeader('X-CSRF-Token');\n        if (csrfToken) app.session.csrfToken = csrfToken;\n      }\n\n      try {\n        if (responseText === '') {\n          return null;\n        }\n\n        return JSON.parse(responseText);\n      } catch (e) {\n        throw new RequestError<ResponseType>(500, `${responseText}`, options, xhr);\n      }\n    };\n\n    return options;\n  }\n\n  /**\n   * Make an AJAX request, handling any low-level errors that may occur.\n   *\n   * @see https://mithril.js.org/request.html\n   */\n  request<ResponseType>(originalOptions: FlarumRequestOptions<ResponseType>): Promise<ResponseType> {\n    const options = this.transformRequestOptions(originalOptions);\n\n    if (this.requestErrorAlert) this.alerts.dismiss(this.requestErrorAlert);\n\n    return m.request(options).catch((e) => this.requestErrorCatch(e, originalOptions.errorHandler));\n  }\n\n  /**\n   * By default, show an error alert, and log the error to the console.\n   */\n  protected requestErrorCatch<ResponseType>(error: RequestError, customErrorHandler: FlarumRequestOptions<ResponseType>['errorHandler']) {\n    // the details property is decoded to transform escaped characters such as '\\n'\n    const formattedErrors = error.response?.errors?.map((e) => decodeURI(e.detail ?? '')) ?? [];\n\n    let content;\n    switch (error.status) {\n      case 422:\n        content = formattedErrors\n          .map((detail) => [detail, <br />])\n          .flat()\n          .slice(0, -1);\n        break;\n\n      case 401:\n      case 403:\n        content = app.translator.trans('core.lib.error.permission_denied_message');\n        break;\n\n      case 404:\n      case 410:\n        content = app.translator.trans('core.lib.error.not_found_message');\n        break;\n\n      case 413:\n        content = app.translator.trans('core.lib.error.payload_too_large_message');\n        break;\n\n      case 429:\n        content = app.translator.trans('core.lib.error.rate_limit_exceeded_message');\n        break;\n\n      default:\n        if (this.requestWasCrossOrigin(error)) {\n          content = app.translator.trans('core.lib.error.generic_cross_origin_message');\n        } else {\n          content = app.translator.trans('core.lib.error.generic_message');\n        }\n    }\n\n    const isDebug: boolean = app.forum.attribute('debug');\n\n    error.alert = {\n      type: 'error',\n      content,\n      controls: isDebug && [\n        <Button className=\"Button Button--link\" onclick={this.showDebug.bind(this, error, formattedErrors)}>\n          {app.translator.trans('core.lib.debug_button')}\n        </Button>,\n      ],\n    };\n\n    if (customErrorHandler) {\n      customErrorHandler(error);\n    } else {\n      this.requestErrorDefaultHandler(error, isDebug, formattedErrors);\n    }\n\n    return Promise.reject(error);\n  }\n\n  /**\n   * Used to modify the error message shown on the page to help troubleshooting.\n   * While not certain, a failing cross-origin request likely indicates a missing redirect to Flarum canonical URL.\n   * Because XHR errors do not expose CORS information, we can only compare the requested URL origin to the page origin.\n   *\n   * @param error\n   * @protected\n   */\n  protected requestWasCrossOrigin(error: RequestError): boolean {\n    return new URL(error.options.url, document.baseURI).origin !== window.location.origin;\n  }\n\n  protected requestErrorDefaultHandler(e: unknown, isDebug: boolean, formattedErrors: string[]): void {\n    if (e instanceof RequestError) {\n      if (isDebug && e.xhr) {\n        const { method, url } = e.options;\n        const { status = '' } = e.xhr;\n\n        console.group(`${method} ${url} ${status}`);\n\n        if (formattedErrors.length) {\n          console.error(...formattedErrors);\n        } else {\n          console.error(e);\n        }\n\n        console.groupEnd();\n      }\n\n      if (e.alert) {\n        this.requestErrorAlert = this.alerts.show(e.alert, e.alert.content);\n      }\n    } else {\n      throw e;\n    }\n  }\n\n  private showDebug(error: RequestError, formattedError: string[]) {\n    if (this.requestErrorAlert !== null) this.alerts.dismiss(this.requestErrorAlert);\n\n    this.modal.show(RequestErrorModal, { error, formattedError });\n  }\n\n  /**\n   * Construct a URL to the route with the given name.\n   */\n  route(name: string, params: Record<string, unknown> = {}): string {\n    const route = this.routes[name];\n\n    if (!route) throw new Error(`Route '${name}' does not exist`);\n\n    const url = route.path.replace(/:([^\\/]+)/g, (m, key) => `${extract(params, key)}`);\n\n    // Remove falsy values in params to avoid having urls like '/?sort&q'\n    for (const key in params) {\n      if (params.hasOwnProperty(key) && !params[key]) delete params[key];\n    }\n\n    const queryString = m.buildQueryString(params as any);\n    const prefix = m.route.prefix === '' ? this.forum.attribute('basePath') : '';\n\n    return prefix + url + (queryString ? '?' + queryString : '');\n  }\n}\n","import app from '../../common/app';\nimport Component from '../Component';\nimport Button from './Button';\nimport LinkButton from './LinkButton';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\n\n/**\n * The `Navigation` component displays a set of navigation buttons. Typically\n * this is just a back button which pops the app's History. If the user is on\n * the root page and there is no history to pop, then in some instances it may\n * show a button that toggles the app's drawer.\n *\n * If the app has a pane, it will also include a 'pin' button which toggles the\n * pinned state of the pane.\n *\n * Accepts the following attrs:\n *\n * - `className` The name of a class to set on the root element.\n * - `drawer` Whether or not to show a button to toggle the app's drawer if\n *   there is no more history to pop.\n */\nexport default class Navigation extends Component {\n  view() {\n    const { history, pane } = app;\n\n    return (\n      <div\n        className={classList('Navigation ButtonGroup', this.attrs.className)}\n        onmouseenter={pane && pane.show.bind(pane)}\n        onmouseleave={pane && pane.onmouseleave.bind(pane)}\n      >\n        {history?.canGoBack() ? [this.getBackButton(), this.getPaneButton()] : this.getDrawerButton()}\n      </div>\n    );\n  }\n\n  /**\n   * Get the back button.\n   */\n  protected getBackButton(): Mithril.Children {\n    const { history } = app;\n    const previous = history?.getPrevious();\n\n    return (\n      <LinkButton\n        className=\"Button Navigation-back Button--icon\"\n        href={history?.backUrl()}\n        icon=\"fas fa-chevron-left\"\n        aria-label={previous?.title}\n        onclick={(e: MouseEvent) => {\n          if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return;\n          e.preventDefault();\n          history?.back();\n        }}\n      />\n    );\n  }\n\n  /**\n   * Get the pane pinned toggle button.\n   */\n  protected getPaneButton(): Mithril.Children {\n    const { pane } = app;\n\n    if (!pane || !pane.active) return null;\n\n    return (\n      <Button\n        className={classList('Button Button--icon Navigation-pin', { active: pane.pinned })}\n        onclick={pane.togglePinned.bind(pane)}\n        icon=\"fas fa-thumbtack\"\n      />\n    );\n  }\n\n  /**\n   * Get the drawer toggle button.\n   */\n  protected getDrawerButton(): Mithril.Children {\n    if (!this.attrs.drawer) return null;\n\n    const { drawer } = app;\n    const user = app.session.user;\n\n    return (\n      <Button\n        className={classList('Button Button--icon Navigation-drawer', { new: user?.newNotificationCount() })}\n        onclick={(e: MouseEvent) => {\n          e.stopPropagation();\n          drawer.show();\n        }}\n        icon=\"fas fa-bars\"\n        aria-label={app.translator.trans('core.lib.nav.drawer_button')}\n      />\n    );\n  }\n}\n","import app from '../../forum/app';\nimport PaginatedListState from '../../common/states/PaginatedListState';\nimport Notification from '../../common/models/Notification';\n\nexport default class NotificationListState extends PaginatedListState<Notification> {\n  constructor() {\n    super({}, 1, 20);\n  }\n\n  get type(): string {\n    return 'notifications';\n  }\n\n  /**\n   * Load the next page of notification results.\n   */\n  load(): Promise<void> {\n    if (app.session.user?.newNotificationCount()) {\n      this.pages = [];\n      this.location = { page: 1 };\n    }\n\n    if (this.pages.length > 0) {\n      return Promise.resolve();\n    }\n\n    app.session.user?.pushAttributes({ newNotificationCount: 0 });\n\n    return super.loadNext();\n  }\n\n  /**\n   * Mark all of the notifications as read.\n   */\n  markAllAsRead() {\n    if (this.pages.length === 0) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: 0 });\n\n    this.pages.forEach((page) => {\n      page.items.forEach((notification) => notification.pushAttributes({ isRead: true }));\n    });\n\n    return app.request({\n      url: app.forum.attribute('apiUrl') + '/notifications/read',\n      method: 'POST',\n    });\n  }\n\n  /**\n   * Delete all of the notifications for this user.\n   */\n  deleteAll() {\n    if (this.pages.length === 0) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: 0 });\n\n    this.pages = [];\n\n    return app.request({\n      url: app.forum.attribute('apiUrl') + '/notifications',\n      method: 'DELETE',\n    });\n  }\n}\n","export default class SearchState {\n  protected cachedSearches: Set<string>;\n  protected value: string = '';\n\n  constructor(cachedSearches: string[] = []) {\n    this.cachedSearches = new Set(cachedSearches);\n  }\n\n  /**\n   * If we are displaying the full results of a search (not just a preview),\n   * this value should return the query that prompted that search.\n   *\n   * In this generic class, full page searching is not supported.\n   * This method should be implemented by subclasses that do support it.\n   *\n   * @see Search\n   */\n  getInitialSearch(): string {\n    return '';\n  }\n\n  getValue(): string {\n    return this.value;\n  }\n\n  setValue(value: string) {\n    this.value = value;\n  }\n\n  /**\n   * Clear the search value.\n   */\n  clear() {\n    this.setValue('');\n  }\n\n  /**\n   * Mark that we have already searched for this query so that we don't\n   * have to ping the endpoint again.\n   */\n  cache(query: string) {\n    this.cachedSearches.add(query);\n  }\n\n  /**\n   * Check if this query has been searched before.\n   */\n  isCached(query: string): boolean {\n    return this.cachedSearches.has(query);\n  }\n}\n","import app from '../../forum/app';\nimport setRouteWithForcedRefresh from '../../common/utils/setRouteWithForcedRefresh';\nimport SearchState from './SearchState';\n\ntype SearchParams = Record<string, string>;\n\nexport default class GlobalSearchState extends SearchState {\n  private initialValueSet = false;\n\n  constructor(cachedSearches = []) {\n    super(cachedSearches);\n  }\n\n  getValue(): string {\n    // If we are on a search results page, we should initialize the value\n    // from the current search, if one is present.\n    // We can't do this in the constructor, as this class is instantiated\n    // before pages are rendered, and we need app.current.\n    if (!this.initialValueSet && this.currPageProvidesSearch()) {\n      this.intializeValue();\n    }\n\n    return super.getValue();\n  }\n\n  protected intializeValue() {\n    this.setValue(this.getInitialSearch());\n    this.initialValueSet = true;\n  }\n\n  protected currPageProvidesSearch(): boolean {\n    return app.current.type && app.current.type.providesInitialSearch;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  getInitialSearch(): string {\n    return this.currPageProvidesSearch() ? this.params().q : '';\n  }\n\n  /**\n   * Clear the search input and the current controller's active search.\n   */\n  clear() {\n    super.clear();\n\n    if (this.getInitialSearch()) {\n      this.clearInitialSearch();\n    } else {\n      m.redraw();\n    }\n  }\n\n  /**\n   * Redirect to the index page without a search filter. This is called when the\n   * 'x' is clicked in the search box in the header.\n   */\n  protected clearInitialSearch() {\n    const { q, ...params } = this.params();\n\n    setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n  }\n\n  /**\n   * Get URL parameters that stick between filter changes.\n   *\n   * This can be used to generate a link that clears filters.\n   */\n  stickyParams(): SearchParams {\n    return {\n      sort: m.route.param('sort'),\n      q: m.route.param('q'),\n    };\n  }\n\n  /**\n   * Get parameters to be used in the current page.\n   */\n  params(): SearchParams {\n    const params = this.stickyParams();\n\n    params.filter = m.route.param('filter');\n\n    return params;\n  }\n\n  /**\n   * Redirect to the index page using the given sort parameter.\n   */\n  changeSort(sort: string) {\n    const params = this.params();\n\n    if (sort === Object.keys(app.discussions.sortMap())[0]) {\n      delete params.sort;\n    } else {\n      params.sort = sort;\n    }\n\n    setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n  }\n}\n","/**\n * @see https://stackoverflow.com/a/31732310\n */\nexport default function isSafariMobile(): boolean {\n  return (\n    'ontouchstart' in window &&\n    navigator.vendor != null &&\n    navigator.vendor.includes('Apple') &&\n    navigator.userAgent != null &&\n    !navigator.userAgent.includes('CriOS') &&\n    !navigator.userAgent.includes('FxiOS')\n  );\n}\n","import app from './app';\n\nimport History from './utils/History';\nimport Pane from './utils/Pane';\nimport DiscussionPage from './components/DiscussionPage';\nimport SignUpModal from './components/SignUpModal';\nimport HeaderPrimary from './components/HeaderPrimary';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport Composer from './components/Composer';\nimport DiscussionRenamedNotification from './components/DiscussionRenamedNotification';\nimport CommentPost from './components/CommentPost';\nimport DiscussionRenamedPost from './components/DiscussionRenamedPost';\nimport routes, { ForumRoutes, makeRouteHelpers } from './routes';\nimport alertEmailConfirmation from './utils/alertEmailConfirmation';\nimport Application, { ApplicationData } from '../common/Application';\nimport Navigation from '../common/components/Navigation';\nimport NotificationListState from './states/NotificationListState';\nimport GlobalSearchState from './states/GlobalSearchState';\nimport DiscussionListState from './states/DiscussionListState';\nimport ComposerState from './states/ComposerState';\nimport isSafariMobile from './utils/isSafariMobile';\n\nimport type Notification from './components/Notification';\nimport type Post from './components/Post';\nimport type Discussion from '../common/models/Discussion';\nimport type NotificationModel from '../common/models/Notification';\nimport type PostModel from '../common/models/Post';\nimport extractText from '../common/utils/extractText';\n\nexport interface ForumApplicationData extends ApplicationData {}\n\nexport default class ForumApplication extends Application {\n  /**\n   * A map of notification types to their components.\n   */\n  notificationComponents: Record<string, ComponentClass<{ notification: NotificationModel }, Notification<{ notification: NotificationModel }>>> = {\n    discussionRenamed: DiscussionRenamedNotification,\n  };\n\n  /**\n   * A map of post types to their components.\n   */\n  postComponents: Record<string, ComponentClass<{ post: PostModel }, Post<{ post: PostModel }>>> = {\n    comment: CommentPost,\n    discussionRenamed: DiscussionRenamedPost,\n  };\n\n  /**\n   * An object which controls the state of the page's side pane.\n   */\n  pane: Pane | null = null;\n\n  /**\n   * The app's history stack, which keeps track of which routes the user visits\n   * so that they can easily navigate back to the previous route.\n   */\n  history: History = new History();\n\n  /**\n   * An object which controls the state of the user's notifications.\n   */\n  notifications: NotificationListState = new NotificationListState();\n\n  /**\n   * An object which stores previously searched queries and provides convenient\n   * tools for retrieving and managing search values.\n   */\n  search: GlobalSearchState = new GlobalSearchState();\n\n  /**\n   * An object which controls the state of the composer.\n   */\n  composer: ComposerState = new ComposerState();\n\n  /**\n   * An object which controls the state of the cached discussion list, which\n   * is used in the index page and the slideout pane.\n   */\n  discussions: DiscussionListState = new DiscussionListState({});\n\n  route: typeof Application.prototype.route & ForumRoutes;\n\n  data!: ForumApplicationData;\n\n  constructor() {\n    super();\n\n    routes(this);\n\n    this.route = Object.assign((Object.getPrototypeOf(Object.getPrototypeOf(this)) as Application).route.bind(this), makeRouteHelpers(this));\n  }\n\n  /**\n   * @inheritdoc\n   */\n  mount() {\n    // Get the configured default route and update that route's path to be '/'.\n    // Push the homepage as the first route, so that the user will always be\n    // able to click on the 'back' button to go home, regardless of which page\n    // they started on.\n    const defaultRoute = this.forum.attribute('defaultRoute');\n    let defaultAction = 'index';\n\n    for (const i in this.routes) {\n      if (this.routes[i].path === defaultRoute) defaultAction = i;\n    }\n\n    this.routes[defaultAction].path = '/';\n    this.history.push(defaultAction, extractText(this.translator.trans('core.forum.header.back_to_index_tooltip')), '/');\n\n    this.pane = new Pane(document.getElementById('app'));\n\n    m.route.prefix = '';\n    super.mount(this.forum.attribute('basePath'));\n\n    // We mount navigation and header components after the page, so components\n    // like the back button can access the updated state when rendering.\n    m.mount(document.getElementById('app-navigation')!, { view: () => <Navigation className=\"App-backControl\" drawer /> });\n    m.mount(document.getElementById('header-navigation')!, Navigation);\n    m.mount(document.getElementById('header-primary')!, HeaderPrimary);\n    m.mount(document.getElementById('header-secondary')!, HeaderSecondary);\n    m.mount(document.getElementById('composer')!, { view: () => <Composer state={this.composer} /> });\n\n    alertEmailConfirmation(this);\n\n    // Route the home link back home when clicked. We do not want it to register\n    // if the user is opening it in a new tab, however.\n    document.getElementById('home-link')!.addEventListener('click', (e) => {\n      if (e.ctrlKey || e.metaKey || e.button === 1) return;\n      e.preventDefault();\n      app.history.home();\n\n      // Reload the current user so that their unread notification count is refreshed.\n      const userId = app.session.user?.id();\n      if (userId) {\n        app.store.find('users', userId);\n        m.redraw();\n      }\n    });\n\n    if (isSafariMobile()) {\n      $(() => {\n        $('.App').addClass('mobile-safari');\n      });\n    }\n  }\n\n  /**\n   * Check whether or not the user is currently viewing a discussion.\n   */\n  public viewingDiscussion(discussion: Discussion): boolean {\n    return this.current.matches(DiscussionPage, { discussion });\n  }\n\n  /**\n   * Callback for when an external authenticator (social login) action has\n   * completed.\n   *\n   * If the payload indicates that the user has been logged in, then the page\n   * will be reloaded. Otherwise, a SignUpModal will be opened, prefilled\n   * with the provided details.\n   */\n  public authenticationComplete(payload: Record<string, unknown>): void {\n    if (payload.loggedIn) {\n      window.location.reload();\n    } else {\n      this.modal.show(SignUpModal, payload);\n    }\n  }\n}\n","import Forum from './ForumApplication';\n\nconst app = new Forum();\n\n// @ts-expect-error We need to do this for backwards compatibility purposes.\nwindow.app = app;\n\nexport default app;\n","import IExtender, { IExtensionModule } from './IExtender';\nimport Application from '../Application';\nimport ActualModel from '../Model';\n\nexport default class Model implements IExtender {\n  private readonly model: { new (): ActualModel };\n  private callbacks: Array<() => void> = [];\n\n  public constructor(model: { new (): ActualModel }) {\n    this.model = model;\n  }\n\n  public attribute<T, O = unknown>(name: string, transform: ((attr: O) => T) | null = null): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = transform ? ActualModel.attribute<T, O>(name, transform) : ActualModel.attribute<T>(name);\n    });\n\n    return this;\n  }\n\n  public hasOne<M extends ActualModel>(name: string): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = ActualModel.hasOne<M>(name);\n    });\n\n    return this;\n  }\n\n  public hasMany<M extends ActualModel>(name: string): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = ActualModel.hasMany<M>(name);\n    });\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    for (const callback of this.callbacks) {\n      callback.call(this);\n    }\n  }\n}\n","import IExtender, { IExtensionModule } from './IExtender';\nimport Application from '../Application';\nimport ForumApplication from '../../forum/ForumApplication';\n\nexport default class PostTypes implements IExtender {\n  private postComponents: Record<string, any> = {};\n\n  /**\n   * Register a new post component type.\n   * Usually used for event posts.\n   *\n   * @param name The name of the post type.\n   * @param component The component class to render the post.\n   */\n  add(name: string, component: any): PostTypes {\n    this.postComponents[name] = component;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    Object.assign((app as unknown as ForumApplication).postComponents, this.postComponents);\n  }\n}\n","import Application, { FlarumGenericRoute } from '../Application';\nimport IExtender, { IExtensionModule } from './IExtender';\n\ntype HelperRoute = (...args: any) => string;\n\nexport default class Routes implements IExtender {\n  private routes: Record<string, FlarumGenericRoute> = {};\n  private helpers: Record<string, HelperRoute> = {};\n\n  /**\n   * Add a mithril route to the application.\n   *\n   * @param name The name of the route.\n   * @param path The path of the route.\n   * @param component must extend `Page` component.\n   */\n  add(name: string, path: `/${string}`, component: any): Routes {\n    this.routes[name] = { path, component };\n\n    return this;\n  }\n\n  helper(name: string, callback: HelperRoute): Routes {\n    this.helpers[name] = callback;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule) {\n    Object.assign(app.routes, this.routes);\n    Object.assign(app.route, this.helpers);\n  }\n}\n","import Application from '../Application';\nimport IExtender, { IExtensionModule } from './IExtender';\nimport Model from '../Model';\n\nexport default class Store implements IExtender {\n  private readonly models: { [type: string]: { new (): Model } } = {};\n\n  public add(type: string, model: { new (): Model }): Store {\n    this.models[type] = model;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    for (const type in this.models) {\n      if (app.store.models[type]) {\n        throw new Error(`The model type \"${type}\" has already been registered with the class \"${app.store.models[type].name}\".`);\n      }\n\n      app.store.models[type] = this.models[type];\n    }\n  }\n}\n","import Model from './Model';\nimport PostTypes from './PostTypes';\nimport Routes from './Routes';\nimport Store from './Store';\n\nexport default {\n  Model,\n  PostTypes,\n  Routes,\n  Store,\n};\n","import { fireDeprecationWarning } from '../helpers/fireDebugWarning';\n\nconst deprecatedNotice = 'The `evented` util is deprecated and no longer supported.';\nconst deprecationIssueId = '2547';\n\n/**\n * The `evented` mixin provides methods allowing an object to trigger events,\n * running externally registered event handlers.\n *\n * @deprecated v1.2, to be removed in v2.0\n */\nexport default {\n  /**\n   * Arrays of registered event handlers, grouped by the event name.\n   *\n   * @type {Record<string, unknown>}\n   * @protected\n   *\n   * @deprecated\n   */\n  handlers: null,\n\n  /**\n   * Get all of the registered handlers for an event.\n   *\n   * @param {string} event The name of the event.\n   * @return {Function[]}\n   * @protected\n   *\n   * @deprecated\n   */\n  getHandlers(event) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.handlers = this.handlers || {};\n\n    this.handlers[event] = this.handlers[event] || [];\n\n    return this.handlers[event];\n  },\n\n  /**\n   * Trigger an event.\n   *\n   * @param {string} event The name of the event.\n   * @param {any[]} args Arguments to pass to event handlers.\n   *\n   * @deprecated\n   */\n  trigger(event, ...args) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.getHandlers(event).forEach((handler) => handler.apply(this, args));\n  },\n\n  /**\n   * Register an event handler.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function to handle the event.\n   *\n   * @deprecated\n   */\n  on(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.getHandlers(event).push(handler);\n  },\n\n  /**\n   * Register an event handler so that it will run only once, and then\n   * unregister itself.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function to handle the event.\n   *\n   * @deprecated\n   */\n  one(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    const wrapper = function () {\n      handler.apply(this, arguments);\n\n      this.off(event, wrapper);\n    };\n\n    this.getHandlers(event).push(wrapper);\n  },\n\n  /**\n   * Unregister an event handler.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function that handles the event.\n   *\n   * @deprecated\n   */\n  off(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    const handlers = this.getHandlers(event);\n    const index = handlers.indexOf(handler);\n\n    if (index !== -1) {\n      handlers.splice(index, 1);\n    }\n  },\n};\n","/*\n * Original Copyright GitHub, Inc. Licensed under the MIT License.\n * See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.\n */\n\nimport insertText, { SelectionRange } from './insertText';\n\ninterface StyleArgs {\n  prefix: string;\n  suffix: string;\n  blockPrefix: string;\n  blockSuffix: string;\n  multiline: boolean;\n  replaceNext: string;\n  prefixSpace: boolean;\n  scanFor: string;\n  surroundWithNewlines: boolean;\n  orderedList: boolean;\n  unorderedList: boolean;\n  trimFirst: boolean;\n}\n\nconst defaults: StyleArgs = {\n  prefix: '',\n  suffix: '',\n  blockPrefix: '',\n  blockSuffix: '',\n  multiline: false,\n  replaceNext: '',\n  prefixSpace: false,\n  scanFor: '',\n  surroundWithNewlines: false,\n  orderedList: false,\n  unorderedList: false,\n  trimFirst: false,\n};\n\nexport default function styleSelectedText(textarea: HTMLTextAreaElement, styleArgs: StyleArgs) {\n  // Next 2 lines are added\n  textarea.focus();\n  styleArgs = Object.assign({}, defaults, styleArgs);\n  // Prev 2 lines are added\n  const text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n\n  let result;\n  if (styleArgs.orderedList || styleArgs.unorderedList) {\n    result = listStyle(textarea, styleArgs);\n  } else if (styleArgs.multiline && isMultipleLines(text)) {\n    result = multilineStyle(textarea, styleArgs);\n  } else {\n    result = blockStyle(textarea, styleArgs);\n  }\n\n  insertText(textarea, result);\n}\n\nfunction isMultipleLines(string: string): boolean {\n  return string.trim().split('\\n').length > 1;\n}\n\nfunction repeat(string: string, n: number): string {\n  return Array(n + 1).join(string);\n}\n\nfunction wordSelectionStart(text: string, i: number): number {\n  let index = i;\n  while (text[index] && text[index - 1] != null && !text[index - 1].match(/\\s/)) {\n    index--;\n  }\n  return index;\n}\n\nfunction wordSelectionEnd(text: string, i: number, multiline: boolean): number {\n  let index = i;\n  const breakpoint = multiline ? /\\n/ : /\\s/;\n  while (text[index] && !text[index].match(breakpoint)) {\n    index++;\n  }\n  return index;\n}\n\nfunction expandSelectionToLine(textarea: HTMLTextAreaElement) {\n  const lines = textarea.value.split('\\n');\n  let counter = 0;\n  for (let index = 0; index < lines.length; index++) {\n    const lineLength = lines[index].length + 1;\n    if (textarea.selectionStart >= counter && textarea.selectionStart < counter + lineLength) {\n      textarea.selectionStart = counter;\n    }\n    if (textarea.selectionEnd >= counter && textarea.selectionEnd < counter + lineLength) {\n      textarea.selectionEnd = counter + lineLength - 1;\n    }\n    counter += lineLength;\n  }\n}\n\nfunction expandSelectedText(textarea: HTMLTextAreaElement, prefixToUse: string, suffixToUse: string, multiline = false): string {\n  if (textarea.selectionStart === textarea.selectionEnd) {\n    textarea.selectionStart = wordSelectionStart(textarea.value, textarea.selectionStart);\n    textarea.selectionEnd = wordSelectionEnd(textarea.value, textarea.selectionEnd, multiline);\n  } else {\n    const expandedSelectionStart = textarea.selectionStart - prefixToUse.length;\n    const expandedSelectionEnd = textarea.selectionEnd + suffixToUse.length;\n    const beginsWithPrefix = textarea.value.slice(expandedSelectionStart, textarea.selectionStart) === prefixToUse;\n    const endsWithSuffix = textarea.value.slice(textarea.selectionEnd, expandedSelectionEnd) === suffixToUse;\n    if (beginsWithPrefix && endsWithSuffix) {\n      textarea.selectionStart = expandedSelectionStart;\n      textarea.selectionEnd = expandedSelectionEnd;\n    }\n  }\n  return textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n}\n\ninterface Newlines {\n  newlinesToAppend: string;\n  newlinesToPrepend: string;\n}\n\nfunction newlinesToSurroundSelectedText(textarea: HTMLTextAreaElement): Newlines {\n  const beforeSelection = textarea.value.slice(0, textarea.selectionStart);\n  const afterSelection = textarea.value.slice(textarea.selectionEnd);\n\n  const breaksBefore = beforeSelection.match(/\\n*$/);\n  const breaksAfter = afterSelection.match(/^\\n*/);\n  const newlinesBeforeSelection = breaksBefore ? breaksBefore[0].length : 0;\n  const newlinesAfterSelection = breaksAfter ? breaksAfter[0].length : 0;\n\n  let newlinesToAppend;\n  let newlinesToPrepend;\n\n  if (beforeSelection.match(/\\S/) && newlinesBeforeSelection < 2) {\n    newlinesToAppend = repeat('\\n', 2 - newlinesBeforeSelection);\n  }\n\n  if (afterSelection.match(/\\S/) && newlinesAfterSelection < 2) {\n    newlinesToPrepend = repeat('\\n', 2 - newlinesAfterSelection);\n  }\n\n  if (newlinesToAppend == null) {\n    newlinesToAppend = '';\n  }\n\n  if (newlinesToPrepend == null) {\n    newlinesToPrepend = '';\n  }\n\n  return { newlinesToAppend, newlinesToPrepend };\n}\n\nfunction blockStyle(textarea: HTMLTextAreaElement, arg: StyleArgs): SelectionRange {\n  let newlinesToAppend;\n  let newlinesToPrepend;\n\n  const { prefix, suffix, blockPrefix, blockSuffix, replaceNext, prefixSpace, scanFor, surroundWithNewlines } = arg;\n  const originalSelectionStart = textarea.selectionStart;\n  const originalSelectionEnd = textarea.selectionEnd;\n\n  let selectedText = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n  let prefixToUse = isMultipleLines(selectedText) && blockPrefix.length > 0 ? `${blockPrefix}\\n` : prefix;\n  // CHANGED\n  let suffixToUse = isMultipleLines(selectedText) && blockSuffix.length > 0 ? `\\n${blockSuffix}` : prefixToUse === prefix ? suffix : '';\n  // END CHANGED\n\n  if (prefixSpace) {\n    const beforeSelection = textarea.value[textarea.selectionStart - 1];\n    if (textarea.selectionStart !== 0 && beforeSelection != null && !beforeSelection.match(/\\s/)) {\n      prefixToUse = ` ${prefixToUse}`;\n    }\n  }\n  selectedText = expandSelectedText(textarea, prefixToUse, suffixToUse, arg.multiline);\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n  const hasReplaceNext = replaceNext.length > 0 && suffixToUse.indexOf(replaceNext) > -1 && selectedText.length > 0;\n  if (surroundWithNewlines) {\n    const ref = newlinesToSurroundSelectedText(textarea);\n    newlinesToAppend = ref.newlinesToAppend;\n    newlinesToPrepend = ref.newlinesToPrepend;\n    prefixToUse = newlinesToAppend + prefix;\n    suffixToUse += newlinesToPrepend;\n  }\n\n  if (selectedText.startsWith(prefixToUse) && selectedText.endsWith(suffixToUse)) {\n    const replacementText = selectedText.slice(prefixToUse.length, selectedText.length - suffixToUse.length);\n    if (originalSelectionStart === originalSelectionEnd) {\n      let position = originalSelectionStart - prefixToUse.length;\n      position = Math.max(position, selectionStart);\n      position = Math.min(position, selectionStart + replacementText.length);\n      selectionStart = selectionEnd = position;\n    } else {\n      selectionEnd = selectionStart + replacementText.length;\n    }\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else if (!hasReplaceNext) {\n    let replacementText = prefixToUse + selectedText + suffixToUse;\n    selectionStart = originalSelectionStart + prefixToUse.length;\n    selectionEnd = originalSelectionEnd + prefixToUse.length;\n    const whitespaceEdges = selectedText.match(/^\\s*|\\s*$/g);\n    if (arg.trimFirst && whitespaceEdges) {\n      const leadingWhitespace = whitespaceEdges[0] || '';\n      const trailingWhitespace = whitespaceEdges[1] || '';\n      replacementText = leadingWhitespace + prefixToUse + selectedText.trim() + suffixToUse + trailingWhitespace;\n      selectionStart += leadingWhitespace.length;\n      selectionEnd -= trailingWhitespace.length;\n    }\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else if (scanFor.length > 0 && selectedText.match(scanFor)) {\n    suffixToUse = suffixToUse.replace(replaceNext, selectedText);\n    const replacementText = prefixToUse + suffixToUse;\n    selectionStart = selectionEnd = selectionStart + prefixToUse.length;\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else {\n    const replacementText = prefixToUse + selectedText + suffixToUse;\n    selectionStart = selectionStart + prefixToUse.length + selectedText.length + suffixToUse.indexOf(replaceNext);\n    selectionEnd = selectionStart + replaceNext.length;\n    return { text: replacementText, selectionStart, selectionEnd };\n  }\n}\n\nfunction multilineStyle(textarea: HTMLTextAreaElement, arg: StyleArgs) {\n  const { prefix, suffix, blockPrefix, blockSuffix, surroundWithNewlines } = arg;\n  let text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n  const lines = text.split('\\n');\n  // CHANGED\n  let prefixToUse = blockPrefix.length > 0 ? blockPrefix : prefix;\n  let suffixToUse = blockSuffix.length > 0 ? blockSuffix : prefixToUse == prefix ? suffix : '';\n  const undoStyle = lines.every((line) => line.startsWith(prefixToUse) && line.endsWith(suffixToUse));\n  // END CHANGED\n\n  if (undoStyle) {\n    text = lines.map((line) => line.slice(prefixToUse.length, line.length - suffixToUse.length)).join('\\n');\n    selectionEnd = selectionStart + text.length;\n  } else {\n    // CHANGED\n    text = lines.map((line) => prefixToUse + line + suffixToUse).join('\\n');\n    if (surroundWithNewlines || suffixToUse === '') {\n      // END CHANGED\n      const { newlinesToAppend, newlinesToPrepend } = newlinesToSurroundSelectedText(textarea);\n      selectionStart += newlinesToAppend.length;\n      selectionEnd = selectionStart + text.length;\n      text = newlinesToAppend + text + newlinesToPrepend;\n    }\n  }\n\n  return { text, selectionStart, selectionEnd };\n}\n\ninterface UndoResult {\n  text: string;\n  processed: boolean;\n}\nfunction undoOrderedListStyle(text: string): UndoResult {\n  const lines = text.split('\\n');\n  const orderedListRegex = /^\\d+\\.\\s+/;\n  const shouldUndoOrderedList = lines.every((line) => orderedListRegex.test(line));\n  let result = lines;\n  if (shouldUndoOrderedList) {\n    result = lines.map((line) => line.replace(orderedListRegex, ''));\n  }\n\n  return {\n    text: result.join('\\n'),\n    processed: shouldUndoOrderedList,\n  };\n}\n\nfunction undoUnorderedListStyle(text: string): UndoResult {\n  const lines = text.split('\\n');\n  const unorderedListPrefix = '- ';\n  const shouldUndoUnorderedList = lines.every((line) => line.startsWith(unorderedListPrefix));\n  let result = lines;\n  if (shouldUndoUnorderedList) {\n    result = lines.map((line) => line.slice(unorderedListPrefix.length, line.length));\n  }\n\n  return {\n    text: result.join('\\n'),\n    processed: shouldUndoUnorderedList,\n  };\n}\n\nfunction makePrefix(index: number, unorderedList: boolean): string {\n  if (unorderedList) {\n    return '- ';\n  } else {\n    return `${index + 1}. `;\n  }\n}\n\nfunction clearExistingListStyle(style: StyleArgs, selectedText: string): [UndoResult, UndoResult, string] {\n  let undoResultOpositeList: UndoResult;\n  let undoResult: UndoResult;\n  let pristineText;\n  if (style.orderedList) {\n    undoResult = undoOrderedListStyle(selectedText);\n    undoResultOpositeList = undoUnorderedListStyle(undoResult.text);\n    pristineText = undoResultOpositeList.text;\n  } else {\n    undoResult = undoUnorderedListStyle(selectedText);\n    undoResultOpositeList = undoOrderedListStyle(undoResult.text);\n    pristineText = undoResultOpositeList.text;\n  }\n  return [undoResult, undoResultOpositeList, pristineText];\n}\n\nfunction listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRange {\n  const noInitialSelection = textarea.selectionStart === textarea.selectionEnd;\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n\n  // Select whole line\n  expandSelectionToLine(textarea);\n\n  const selectedText = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n\n  // If the user intent was to do an undo, we will stop after this.\n  // Otherwise, we will still undo to other list type to prevent list stacking\n  const [undoResult, undoResultOpositeList, pristineText] = clearExistingListStyle(style, selectedText);\n\n  const prefixedLines = pristineText.split('\\n').map((value, index) => {\n    return `${makePrefix(index, style.unorderedList)}${value}`;\n  });\n\n  const totalPrefixLength = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {\n    return previousValue + makePrefix(currentIndex, style.unorderedList).length;\n  }, 0);\n\n  const totalPrefixLengthOpositeList = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {\n    return previousValue + makePrefix(currentIndex, !style.unorderedList).length;\n  }, 0);\n\n  if (undoResult.processed) {\n    if (noInitialSelection) {\n      selectionStart = Math.max(selectionStart - makePrefix(0, style.unorderedList).length, 0);\n      selectionEnd = selectionStart;\n    } else {\n      selectionStart = textarea.selectionStart;\n      selectionEnd = textarea.selectionEnd - totalPrefixLength;\n    }\n    return { text: pristineText, selectionStart, selectionEnd };\n  }\n\n  const { newlinesToAppend, newlinesToPrepend } = newlinesToSurroundSelectedText(textarea);\n  const text = newlinesToAppend + prefixedLines.join('\\n') + newlinesToPrepend;\n\n  if (noInitialSelection) {\n    selectionStart = Math.max(selectionStart + makePrefix(0, style.unorderedList).length + newlinesToAppend.length, 0);\n    selectionEnd = selectionStart;\n  } else {\n    if (undoResultOpositeList.processed) {\n      selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);\n      selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength - totalPrefixLengthOpositeList;\n    } else {\n      selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);\n      selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength;\n    }\n  }\n\n  return { text, selectionStart, selectionEnd };\n}\n","export default function proxifyCompat(compat: Record<string, unknown>, namespace: string) {\n  // regex to replace common/ and NAMESPACE/ for core & core extensions\n  // and remove .js, .ts and .tsx extensions\n  // e.g. admin/utils/extract --> utils/extract\n  // e.g. tags/common/utils/sortTags --> tags/utils/sortTags\n  const regex = new RegExp(String.raw`(\\w+\\/)?(${namespace}|common)\\/`);\n  const fileExt = /(\\.js|\\.tsx?)$/;\n\n  return new Proxy(compat, {\n    get: (obj, prop: string) => obj[prop] || obj[prop.replace(regex, '$1').replace(fileExt, '')],\n  });\n}\n","function _taggedTemplateLiteralLoose(e, t) {\n  return t || (t = e.slice(0)), e.raw = t, e;\n}\nexport { _taggedTemplateLiteralLoose as default };","import Component from '../Component';\nimport icon from '../helpers/icon';\nimport withAttr from '../utils/withAttr';\nimport classList from '../utils/classList';\n\n/**\n * The `Select` component displays a <select> input, surrounded with some extra\n * elements for styling. It accepts the following attrs:\n *\n * - `options` A map of option values to labels.\n * - `onchange` A callback to run when the selected value is changed.\n * - `value` The value of the selected option.\n * - `disabled` Disabled state for the input.\n * - `wrapperAttrs` A map of attrs to be passed to the DOM element wrapping the `<select>`\n *\n * Other attributes are passed directly to the `<select>` element rendered to the DOM.\n */\nexport default class Select extends Component {\n  view() {\n    const {\n      options,\n      onchange,\n      value,\n      disabled,\n      className,\n      class: _class,\n\n      // Destructure the `wrapperAttrs` object to extract the `className` for passing to `classList()`\n      // `= {}` prevents errors when `wrapperAttrs` is undefined\n      wrapperAttrs: { className: wrapperClassName, class: wrapperClass, ...wrapperAttrs } = {},\n\n      ...domAttrs\n    } = this.attrs;\n\n    return (\n      <span className={classList('Select', wrapperClassName, wrapperClass)} {...wrapperAttrs}>\n        <select\n          className={classList('Select-input FormControl', className, _class)}\n          onchange={onchange ? withAttr('value', onchange.bind(this)) : undefined}\n          value={value}\n          disabled={disabled}\n          {...domAttrs}\n        >\n          {Object.keys(options).map((key) => (\n            <option value={key}>{options[key]}</option>\n          ))}\n        </select>\n        {icon('fas fa-sort', { className: 'Select-caret' })}\n      </span>\n    );\n  }\n}\n","import type Mithril from 'mithril';\n\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\nimport icon from '../helpers/icon';\n\nexport default class ColorPreviewInput extends Component {\n  view(vnode: Mithril.Vnode<ComponentAttrs, this>) {\n    const { className, id, ...attrs } = this.attrs;\n\n    attrs.type ||= 'text';\n\n    // If the input is a 3 digit hex code, convert it to 6 digits.\n    if (attrs.value.length === 4) {\n      attrs.value = attrs.value.replace(/#([a-f0-9])([a-f0-9])([a-f0-9])/, '#$1$1$2$2$3$3');\n    }\n\n    return (\n      <div className=\"ColorInput\">\n        <input className={classList('FormControl', className)} id={id} {...attrs} />\n\n        <span className=\"ColorInput-icon\" role=\"presentation\">\n          {icon('fas fa-exclamation-circle')}\n        </span>\n\n        <input className=\"ColorInput-preview\" {...attrs} type=\"color\" />\n      </div>\n    );\n  }\n}\n","import extractText from '../utils/extractText';\nimport Button from './Button';\nimport Tooltip from './Tooltip';\n\n/**\n * The `TextEditorButton` component displays a button suitable for the text\n * editor toolbar.\n *\n * Automatically creates tooltips using the Tooltip component and provided text.\n *\n * ## Attrs\n * - `title` - Tooltip for the button\n */\nexport default class TextEditorButton extends Button {\n  view(vnode) {\n    const originalView = super.view(vnode);\n\n    return <Tooltip text={this.attrs.tooltipText || extractText(vnode.children)}>{originalView}</Tooltip>;\n  }\n\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = attrs.className || 'Button Button--icon Button--link';\n    attrs.tooltipText = attrs.title;\n  }\n}\n","import * as extend from './extend';\nimport extenders from './extenders';\nimport Session from './Session';\nimport Store from './Store';\nimport BasicEditorDriver from './utils/BasicEditorDriver';\nimport bidi from './utils/bidi';\nimport evented from './utils/evented';\nimport EventEmitter from './utils/EventEmitter';\nimport KeyboardNavigatable from './utils/KeyboardNavigatable';\nimport liveHumanTimes from './utils/liveHumanTimes';\nimport ItemList from './utils/ItemList';\nimport mixin from './utils/mixin';\nimport humanTime from './utils/humanTime';\nimport computed from './utils/computed';\nimport insertText from './utils/insertText';\nimport styleSelectedText from './utils/styleSelectedText';\nimport Drawer from './utils/Drawer';\nimport * as EditorDriverInterface from './utils/EditorDriverInterface';\nimport anchorScroll from './utils/anchorScroll';\nimport RequestError from './utils/RequestError';\nimport abbreviateNumber from './utils/abbreviateNumber';\nimport escapeRegExp from './utils/escapeRegExp';\nimport * as string from './utils/string';\nimport * as ThrottleDebounce from './utils/throttleDebounce';\nimport Stream from './utils/Stream';\nimport SubtreeRetainer from './utils/SubtreeRetainer';\nimport setRouteWithForcedRefresh from './utils/setRouteWithForcedRefresh';\nimport extract from './utils/extract';\nimport ScrollListener from './utils/ScrollListener';\nimport stringToColor from './utils/stringToColor';\nimport subclassOf from './utils/subclassOf';\nimport patchMithril from './utils/patchMithril';\nimport proxifyCompat from './utils/proxifyCompat';\nimport classList from './utils/classList';\nimport extractText from './utils/extractText';\nimport formatNumber from './utils/formatNumber';\nimport mapRoutes from './utils/mapRoutes';\nimport withAttr from './utils/withAttr';\nimport * as FocusTrap from './utils/focusTrap';\nimport isDark from './utils/isDark';\nimport AccessToken from './models/AccessToken';\nimport Notification from './models/Notification';\nimport User from './models/User';\nimport Post from './models/Post';\nimport Discussion from './models/Discussion';\nimport Group from './models/Group';\nimport Forum from './models/Forum';\nimport Component from './Component';\nimport Translator from './Translator';\nimport AlertManager from './components/AlertManager';\nimport Page from './components/Page';\nimport Switch from './components/Switch';\nimport Badge from './components/Badge';\nimport LoadingIndicator from './components/LoadingIndicator';\nimport Placeholder from './components/Placeholder';\nimport Separator from './components/Separator';\nimport Dropdown from './components/Dropdown';\nimport SplitDropdown from './components/SplitDropdown';\nimport RequestErrorModal from './components/RequestErrorModal';\nimport FieldSet from './components/FieldSet';\nimport Select from './components/Select';\nimport Navigation from './components/Navigation';\nimport Alert from './components/Alert';\nimport Link from './components/Link';\nimport LinkButton from './components/LinkButton';\nimport Checkbox from './components/Checkbox';\nimport ColorPreviewInput from './components/ColorPreviewInput';\nimport ConfirmDocumentUnload from './components/ConfirmDocumentUnload';\nimport SelectDropdown from './components/SelectDropdown';\nimport ModalManager from './components/ModalManager';\nimport Button from './components/Button';\nimport Modal from './components/Modal';\nimport GroupBadge from './components/GroupBadge';\nimport TextEditor from './components/TextEditor';\nimport TextEditorButton from './components/TextEditorButton';\nimport EditUserModal from './components/EditUserModal';\nimport Tooltip from './components/Tooltip';\nimport Model from './Model';\nimport Application from './Application';\nimport fullTime from './helpers/fullTime';\nimport avatar from './helpers/avatar';\nimport fireApplicationError from './helpers/fireApplicationError';\nimport * as fireDebugWarning from './helpers/fireDebugWarning';\nimport icon from './helpers/icon';\nimport humanTimeHelper from './helpers/humanTime';\nimport punctuateSeries from './helpers/punctuateSeries';\nimport highlight from './helpers/highlight';\nimport username from './helpers/username';\nimport userOnline from './helpers/userOnline';\nimport listItems from './helpers/listItems';\nimport textContrastClass from './helpers/textContrastClass';\nimport Fragment from './Fragment';\nimport DefaultResolver from './resolvers/DefaultResolver';\nimport PaginatedListState from './states/PaginatedListState';\nimport isObject from './utils/isObject';\nimport AlertManagerState from './states/AlertManagerState';\nimport ModalManagerState from './states/ModalManagerState';\nimport PageState from './states/PageState';\nimport LabelValue from './components/LabelValue';\nimport IPAddress from './components/IPAddress';\n\nexport default {\n  extenders,\n  extend: extend,\n  Session: Session,\n  Store: Store,\n  'utils/BasicEditorDriver': BasicEditorDriver,\n  'utils/bidi': bidi,\n  'utils/evented': evented,\n  'utils/EventEmitter': EventEmitter,\n  'utils/KeyboardNavigatable': KeyboardNavigatable,\n  'utils/liveHumanTimes': liveHumanTimes,\n  'utils/ItemList': ItemList,\n  'utils/mixin': mixin,\n  'utils/humanTime': humanTime,\n  'utils/computed': computed,\n  'utils/insertText': insertText,\n  'utils/styleSelectedText': styleSelectedText,\n  'utils/Drawer': Drawer,\n  'utils/EditorDriverInterface': EditorDriverInterface,\n  'utils/anchorScroll': anchorScroll,\n  'utils/RequestError': RequestError,\n  'utils/abbreviateNumber': abbreviateNumber,\n  'utils/string': string,\n  'utils/SubtreeRetainer': SubtreeRetainer,\n  'utils/escapeRegExp': escapeRegExp,\n  'utils/extract': extract,\n  'utils/ScrollListener': ScrollListener,\n  'utils/stringToColor': stringToColor,\n  'utils/Stream': Stream,\n  'utils/subclassOf': subclassOf,\n  'utils/setRouteWithForcedRefresh': setRouteWithForcedRefresh,\n  'utils/patchMithril': patchMithril,\n  'utils/proxifyCompat': proxifyCompat,\n  'utils/classList': classList,\n  'utils/extractText': extractText,\n  'utils/formatNumber': formatNumber,\n  'utils/mapRoutes': mapRoutes,\n  'utils/withAttr': withAttr,\n  'utils/throttleDebounce': ThrottleDebounce,\n  'utils/isObject': isObject,\n  'utils/focusTrap': FocusTrap,\n  'utils/isDark': isDark,\n  'models/AccessToken': AccessToken,\n  'models/Notification': Notification,\n  'models/User': User,\n  'models/Post': Post,\n  'models/Discussion': Discussion,\n  'models/Group': Group,\n  'models/Forum': Forum,\n  Component: Component,\n  Fragment: Fragment,\n  Translator: Translator,\n  'components/AlertManager': AlertManager,\n  'components/Page': Page,\n  'components/Switch': Switch,\n  'components/Badge': Badge,\n  'components/LoadingIndicator': LoadingIndicator,\n  'components/Placeholder': Placeholder,\n  'components/Separator': Separator,\n  'components/Dropdown': Dropdown,\n  'components/SplitDropdown': SplitDropdown,\n  'components/RequestErrorModal': RequestErrorModal,\n  'components/FieldSet': FieldSet,\n  'components/Select': Select,\n  'components/Navigation': Navigation,\n  'components/Alert': Alert,\n  'components/Link': Link,\n  'components/LinkButton': LinkButton,\n  'components/Checkbox': Checkbox,\n  'components/ColorPreviewInput': ColorPreviewInput,\n  'components/ConfirmDocumentUnload': ConfirmDocumentUnload,\n  'components/SelectDropdown': SelectDropdown,\n  'components/ModalManager': ModalManager,\n  'components/Button': Button,\n  'components/Modal': Modal,\n  'components/GroupBadge': GroupBadge,\n  'components/TextEditor': TextEditor,\n  'components/TextEditorButton': TextEditorButton,\n  'components/Tooltip': Tooltip,\n  'components/EditUserModal': EditUserModal,\n  'components/LabelValue': LabelValue,\n  'components/IPAddress': IPAddress,\n  Model: Model,\n  Application: Application,\n  'helpers/fullTime': fullTime,\n  'helpers/avatar': avatar,\n  'helpers/fireApplicationError': fireApplicationError,\n  'helpers/fireDebugWarning': fireDebugWarning,\n  'helpers/icon': icon,\n  'helpers/humanTime': humanTimeHelper,\n  'helpers/punctuateSeries': punctuateSeries,\n  'helpers/highlight': highlight,\n  'helpers/username': username,\n  'helpers/userOnline': userOnline,\n  'helpers/listItems': listItems,\n  'helpers/textContrastClass': textContrastClass,\n  'resolvers/DefaultResolver': DefaultResolver,\n  'states/PaginatedListState': PaginatedListState,\n  'states/AlertManagerState': AlertManagerState,\n  'states/ModalManagerState': ModalManagerState,\n  'states/PageState': PageState,\n};\n","/**\n * The `mixin` utility assigns the properties of a set of 'mixin' objects to\n * the prototype of a parent object.\n *\n * @example\n * class MyClass extends mixin(ExistingClass, evented, etc) {}\n *\n * @param {object} Parent The class to extend the new class from.\n * @param {Record<string, any>[]} mixins The objects to mix in.\n * @return {object} A new class that extends Parent and contains the mixins.\n */\nexport default function mixin(Parent, ...mixins) {\n  class Mixed extends Parent {}\n\n  mixins.forEach((object) => {\n    Object.assign(Mixed.prototype, object);\n  });\n\n  return Mixed;\n}\n","import type Mithril from 'mithril';\n\n/**\n * The `Fragment` class represents a chunk of DOM that is rendered once with Mithril and then takes\n * over control of its own DOM and lifecycle.\n *\n * This is very similar to the `Component` wrapper class, but is used for more fine-grained control over\n * the rendering and display of some significant chunks of the DOM. In contrast to components, fragments\n * do not offer Mithril's lifecycle hooks.\n *\n * Use this when you want to enjoy the benefits of JSX / VDOM for initial rendering, combined with\n * small helper methods that then make updates to that DOM directly, instead of fully redrawing\n * everything through Mithril.\n *\n * This should only be used when necessary, and only with `m.render`. If you are unsure whether you need\n * this or `Component, you probably need `Component`.\n */\nexport default abstract class Fragment {\n  /**\n   * The root DOM element for the fragment.\n   */\n  protected element!: Element;\n\n  /**\n   * Returns a jQuery object for this fragment's element. If you pass in a\n   * selector string, this method will return a jQuery object, using the current\n   * element as its buffer.\n   *\n   * For example, calling `fragment.$('li')` will return a jQuery object\n   * containing all of the `li` elements inside the DOM element of this\n   * fragment.\n   *\n   * @param [selector] a jQuery-compatible selector string\n   * @returns the jQuery object for the DOM node\n   * @final\n   */\n  public $(selector?: string): JQuery {\n    const $element = $(this.element) as JQuery<HTMLElement>;\n\n    return selector ? $element.find(selector) : $element;\n  }\n\n  /**\n   * Get the renderable virtual DOM that represents the fragment's view.\n   *\n   * This should NOT be overridden by subclasses. Subclasses wishing to define\n   * their virtual DOM should override Fragment#view instead.\n   *\n   * @example\n   * const fragment = new MyFragment();\n   * m.render(document.body, fragment.render());\n   *\n   * @final\n   */\n  public render(): Mithril.Vnode<Mithril.Attributes, this> {\n    const vdom = this.view();\n\n    vdom.attrs = vdom.attrs || {};\n\n    const originalOnCreate = vdom.attrs.oncreate;\n\n    vdom.attrs.oncreate = (vnode) => {\n      this.element = vnode.dom;\n      if (originalOnCreate) originalOnCreate.apply(this, [vnode]);\n    };\n\n    return vdom;\n  }\n\n  /**\n   * Creates a view out of virtual elements.\n   */\n  abstract view(): Mithril.Vnode<Mithril.Attributes, this>;\n}\n","import app from '../../common/app';\n\n/**\n * The `punctuateSeries` helper formats a list of strings (e.g. names) to read\n * fluently in the application's locale.\n *\n * ```js\n * punctuateSeries(['Toby', 'Franz', 'Dominion']) // Toby, Franz, and Dominion\n * ```\n *\n * @param {import('mithril').Children[]} items\n * @return {import('mithril').Children}')}\n */\nexport default function punctuateSeries(items) {\n  if (items.length === 2) {\n    return app.translator.trans('core.lib.series.two_text', {\n      first: items[0],\n      second: items[1],\n    });\n  } else if (items.length >= 3) {\n    // If there are three or more items, we will join all but the first and\n    // last items with the equivalent of a comma, and then we will feed that\n    // into the translator along with the first and last item.\n    const second = items\n      .slice(1, items.length - 1)\n      .reduce((list, item) => list.concat([item, app.translator.trans('core.lib.series.glue_text')]), [])\n      .slice(0, -1);\n\n    return app.translator.trans('core.lib.series.three_text', {\n      first: items[0],\n      second,\n      third: items[items.length - 1],\n    });\n  }\n\n  return items;\n}\n","import app from '../../forum/app';\nimport Button from '../../common/components/Button';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `LogInButton` component displays a social login button which will open\n * a popup window containing the specified path.\n *\n * ### Attrs\n *\n * - `path`\n */\nexport default class LogInButton extends Button {\n  static initAttrs(attrs) {\n    attrs.className = classList(attrs.className, 'LogInButton');\n\n    attrs.onclick = function () {\n      const width = 580;\n      const height = 400;\n      const $window = $(window);\n\n      window.open(\n        app.forum.attribute('baseUrl') + attrs.path,\n        'logInPopup',\n        `width=${width},` +\n          `height=${height},` +\n          `top=${$window.height() / 2 - height / 2},` +\n          `left=${$window.width() / 2 - width / 2},` +\n          'status=no,scrollbars=yes,resizable=no'\n      );\n    };\n\n    super.initAttrs(attrs);\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport highlight from '../../common/helpers/highlight';\n\n/**\n * The `PostPreview` component shows a link to a post containing the avatar and\n * username of the author, and a short excerpt of the post's content.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostPreview extends Component {\n  view() {\n    const post = this.attrs.post;\n    const user = post.user();\n\n    return (\n      <Link className=\"PostPreview\" href={app.route.post(post)} onclick={this.attrs.onclick}>\n        <span className=\"PostPreview-content\">\n          {avatar(user)}\n          {username(user)} <span className=\"PostPreview-excerpt\">{this.excerpt()}</span>\n        </span>\n      </Link>\n    );\n  }\n\n  /**\n   * @returns {string|undefined|null}\n   */\n  content() {\n    return this.attrs.post.contentType() === 'comment' && this.attrs.post.contentPlain();\n  }\n\n  /**\n   * @returns {string}\n   */\n  excerpt() {\n    return this.content() ? highlight(this.content(), this.attrs.highlight, 300) : '';\n  }\n}\n","import compat from '../common/compat';\n\nimport PostControls from './utils/PostControls';\nimport KeyboardNavigatable from '../common/utils/KeyboardNavigatable';\nimport slidable from './utils/slidable';\nimport History from './utils/History';\nimport DiscussionControls from './utils/DiscussionControls';\nimport alertEmailConfirmation from './utils/alertEmailConfirmation';\nimport UserControls from './utils/UserControls';\nimport Pane from './utils/Pane';\nimport ComposerState from './states/ComposerState';\nimport DiscussionListState from './states/DiscussionListState';\nimport GlobalSearchState from './states/GlobalSearchState';\nimport NotificationListState from './states/NotificationListState';\nimport PostStreamState from './states/PostStreamState';\nimport SearchState from './states/SearchState';\nimport UserSecurityPageState from './states/UserSecurityPageState';\nimport AffixedSidebar from './components/AffixedSidebar';\nimport DiscussionPage from './components/DiscussionPage';\nimport DiscussionListPane from './components/DiscussionListPane';\nimport LogInModal from './components/LogInModal';\nimport NewAccessTokenModal from './components/NewAccessTokenModal';\nimport ComposerBody from './components/ComposerBody';\nimport ForgotPasswordModal from './components/ForgotPasswordModal';\nimport Notification from './components/Notification';\nimport LogInButton from './components/LogInButton';\nimport DiscussionsUserPage from './components/DiscussionsUserPage';\nimport Composer from './components/Composer';\nimport SessionDropdown from './components/SessionDropdown';\nimport HeaderPrimary from './components/HeaderPrimary';\nimport PostEdited from './components/PostEdited';\nimport PostStream from './components/PostStream';\nimport ChangePasswordModal from './components/ChangePasswordModal';\nimport IndexPage from './components/IndexPage';\nimport DiscussionRenamedNotification from './components/DiscussionRenamedNotification';\nimport DiscussionsSearchSource from './components/DiscussionsSearchSource';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport ComposerButton from './components/ComposerButton';\nimport DiscussionList from './components/DiscussionList';\nimport ReplyPlaceholder from './components/ReplyPlaceholder';\nimport AvatarEditor from './components/AvatarEditor';\nimport Post from './components/Post';\nimport SettingsPage from './components/SettingsPage';\nimport TerminalPost from './components/TerminalPost';\nimport ChangeEmailModal from './components/ChangeEmailModal';\nimport NotificationsDropdown from './components/NotificationsDropdown';\nimport UserPage from './components/UserPage';\nimport PostUser from './components/PostUser';\nimport UserCard from './components/UserCard';\nimport UsersSearchSource from './components/UsersSearchSource';\nimport UserSecurityPage from './components/UserSecurityPage';\nimport NotificationGrid from './components/NotificationGrid';\nimport PostPreview from './components/PostPreview';\nimport EventPost from './components/EventPost';\nimport DiscussionHero from './components/DiscussionHero';\nimport PostMeta from './components/PostMeta';\nimport DiscussionRenamedPost from './components/DiscussionRenamedPost';\nimport DiscussionComposer from './components/DiscussionComposer';\nimport LogInButtons from './components/LogInButtons';\nimport NotificationList from './components/NotificationList';\nimport WelcomeHero from './components/WelcomeHero';\nimport SignUpModal from './components/SignUpModal';\nimport CommentPost from './components/CommentPost';\nimport ComposerPostPreview from './components/ComposerPostPreview';\nimport ReplyComposer from './components/ReplyComposer';\nimport NotificationsPage from './components/NotificationsPage';\nimport PostStreamScrubber from './components/PostStreamScrubber';\nimport EditPostComposer from './components/EditPostComposer';\nimport RenameDiscussionModal from './components/RenameDiscussionModal';\nimport Search from './components/Search';\nimport DiscussionListItem from './components/DiscussionListItem';\nimport LoadingPost from './components/LoadingPost';\nimport PostsUserPage from './components/PostsUserPage';\nimport DiscussionPageResolver from './resolvers/DiscussionPageResolver';\nimport BasicEditorDriver from '../common/utils/BasicEditorDriver';\nimport routes from './routes';\nimport ForumApplication from './ForumApplication';\nimport isSafariMobile from './utils/isSafariMobile';\nimport AccessTokensList from './components/AccessTokensList';\nimport DiscussionsSearchItem from './components/DiscussionsSearchItem';\n\nexport default Object.assign(compat, {\n  'utils/PostControls': PostControls,\n  // @deprecated import from 'flarum/common/utils/KeyboardNavigatable' instead\n  'utils/KeyboardNavigatable': KeyboardNavigatable,\n  'utils/slidable': slidable,\n  'utils/History': History,\n  'utils/DiscussionControls': DiscussionControls,\n  'utils/alertEmailConfirmation': alertEmailConfirmation,\n  'utils/UserControls': UserControls,\n  'utils/Pane': Pane,\n  'utils/BasicEditorDriver': BasicEditorDriver,\n  'utils/isSafariMobile': isSafariMobile,\n  'states/ComposerState': ComposerState,\n  'states/DiscussionListState': DiscussionListState,\n  'states/GlobalSearchState': GlobalSearchState,\n  'states/NotificationListState': NotificationListState,\n  'states/PostStreamState': PostStreamState,\n  'states/SearchState': SearchState,\n  'states/UserSecurityPageState': UserSecurityPageState,\n  'components/AffixedSidebar': AffixedSidebar,\n  'components/DiscussionPage': DiscussionPage,\n  'components/DiscussionListPane': DiscussionListPane,\n  'components/LogInModal': LogInModal,\n  'components/NewAccessTokenModal': NewAccessTokenModal,\n  'components/ComposerBody': ComposerBody,\n  'components/ForgotPasswordModal': ForgotPasswordModal,\n  'components/Notification': Notification,\n  'components/LogInButton': LogInButton,\n  'components/DiscussionsUserPage': DiscussionsUserPage,\n  'components/Composer': Composer,\n  'components/SessionDropdown': SessionDropdown,\n  'components/HeaderPrimary': HeaderPrimary,\n  'components/PostEdited': PostEdited,\n  'components/PostStream': PostStream,\n  'components/ChangePasswordModal': ChangePasswordModal,\n  'components/IndexPage': IndexPage,\n  'components/DiscussionRenamedNotification': DiscussionRenamedNotification,\n  'components/DiscussionsSearchSource': DiscussionsSearchSource,\n  'components/DiscussionsSearchItem': DiscussionsSearchItem,\n  'components/HeaderSecondary': HeaderSecondary,\n  'components/ComposerButton': ComposerButton,\n  'components/DiscussionList': DiscussionList,\n  'components/ReplyPlaceholder': ReplyPlaceholder,\n  'components/AvatarEditor': AvatarEditor,\n  'components/Post': Post,\n  'components/SettingsPage': SettingsPage,\n  'components/TerminalPost': TerminalPost,\n  'components/ChangeEmailModal': ChangeEmailModal,\n  'components/NotificationsDropdown': NotificationsDropdown,\n  'components/UserPage': UserPage,\n  'components/PostUser': PostUser,\n  'components/UserCard': UserCard,\n  'components/UsersSearchSource': UsersSearchSource,\n  'components/UserSecurityPage': UserSecurityPage,\n  'components/NotificationGrid': NotificationGrid,\n  'components/PostPreview': PostPreview,\n  'components/EventPost': EventPost,\n  'components/DiscussionHero': DiscussionHero,\n  'components/PostMeta': PostMeta,\n  'components/DiscussionRenamedPost': DiscussionRenamedPost,\n  'components/DiscussionComposer': DiscussionComposer,\n  'components/LogInButtons': LogInButtons,\n  'components/NotificationList': NotificationList,\n  'components/WelcomeHero': WelcomeHero,\n  'components/SignUpModal': SignUpModal,\n  'components/CommentPost': CommentPost,\n  'components/ComposerPostPreview': ComposerPostPreview,\n  'components/ReplyComposer': ReplyComposer,\n  'components/NotificationsPage': NotificationsPage,\n  'components/PostStreamScrubber': PostStreamScrubber,\n  'components/EditPostComposer': EditPostComposer,\n  'components/RenameDiscussionModal': RenameDiscussionModal,\n  'components/Search': Search,\n  'components/DiscussionListItem': DiscussionListItem,\n  'components/LoadingPost': LoadingPost,\n  'components/PostsUserPage': PostsUserPage,\n  'components/AccessTokensList': AccessTokensList,\n  'resolvers/DiscussionPageResolver': DiscussionPageResolver,\n  routes: routes,\n  ForumApplication: ForumApplication,\n});\n","// Expose punycode and ColorThief to the window browser object\nimport 'expose-loader?exposes=punycode!punycode';\nimport 'expose-loader?exposes=ColorThief!color-thief-browser';\n\nimport app from './app';\n\nexport { app };\n\n// Export compat API\nimport compatObj from './compat';\nimport proxifyCompat from '../common/utils/proxifyCompat';\n\n// @ts-ignore\ncompatObj.app = app;\n\nexport const compat = proxifyCompat(compatObj, 'forum');\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","export default class FlagListState {\n  constructor(app) {\n    this.app = app;\n\n    /**\n     * Whether or not the flags are loading.\n     *\n     * @type {Boolean}\n     */\n    this.loading = false;\n  }\n\n  /**\n   * Load flags into the application's cache if they haven't already\n   * been loaded.\n   */\n  load() {\n    if (this.cache && !this.app.session.user.attribute('newFlagCount')) {\n      return;\n    }\n\n    this.loading = true;\n    m.redraw();\n\n    this.app.store\n      .find('flags')\n      .then((flags) => {\n        this.app.session.user.pushAttributes({ newFlagCount: 0 });\n        this.cache = flags.sort((a, b) => b.createdAt() - a.createdAt());\n      })\n      .catch(() => {})\n      .then(() => {\n        this.loading = false;\n        m.redraw();\n      });\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/withAttr'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\n\nimport Stream from 'flarum/common/utils/Stream';\nimport withAttr from 'flarum/common/utils/withAttr';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport default class FlagPostModal extends Modal {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.success = false;\n\n    this.reason = Stream('');\n    this.reasonDetail = Stream('');\n  }\n\n  className() {\n    return 'FlagPostModal Modal--medium';\n  }\n\n  title() {\n    return app.translator.trans('flarum-flags.forum.flag_post.title');\n  }\n\n  content() {\n    if (this.success) {\n      return (\n        <div className=\"Modal-body\">\n          <div className=\"Form Form--centered\">\n            <p className=\"helpText\">{app.translator.trans('flarum-flags.forum.flag_post.confirmation_message')}</p>\n            <div className=\"Form-group\">\n              <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n                {app.translator.trans('flarum-flags.forum.flag_post.dismiss_button')}\n              </Button>\n            </div>\n          </div>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <div className=\"Form-group\">\n            <div>{this.flagReasons().toArray()}</div>\n          </div>\n\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading} disabled={!this.reason()}>\n              {app.translator.trans('flarum-flags.forum.flag_post.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  flagReasons() {\n    const items = new ItemList();\n    const guidelinesUrl = app.forum.attribute('guidelinesUrl');\n\n    items.add(\n      'off-topic',\n      <label className=\"checkbox\">\n        <input type=\"radio\" name=\"reason\" checked={this.reason() === 'off_topic'} value=\"off_topic\" onclick={withAttr('value', this.reason)} />\n        <strong>{app.translator.trans('flarum-flags.forum.flag_post.reason_off_topic_label')}</strong>\n        {app.translator.trans('flarum-flags.forum.flag_post.reason_off_topic_text')}\n        {this.reason() === 'off_topic' && (\n          <textarea\n            className=\"FormControl\"\n            placeholder={app.translator.trans('flarum-flags.forum.flag_post.reason_details_placeholder')}\n            value={this.reasonDetail()}\n            oninput={withAttr('value', this.reasonDetail)}\n          ></textarea>\n        )}\n      </label>,\n      70\n    );\n\n    items.add(\n      'inappropriate',\n      <label className=\"checkbox\">\n        <input\n          type=\"radio\"\n          name=\"reason\"\n          checked={this.reason() === 'inappropriate'}\n          value=\"inappropriate\"\n          onclick={withAttr('value', this.reason)}\n        />\n        <strong>{app.translator.trans('flarum-flags.forum.flag_post.reason_inappropriate_label')}</strong>\n        {app.translator.trans('flarum-flags.forum.flag_post.reason_inappropriate_text', {\n          a: guidelinesUrl ? <a href={guidelinesUrl} target=\"_blank\" /> : undefined,\n        })}\n        {this.reason() === 'inappropriate' && (\n          <textarea\n            className=\"FormControl\"\n            placeholder={app.translator.trans('flarum-flags.forum.flag_post.reason_details_placeholder')}\n            value={this.reasonDetail()}\n            oninput={withAttr('value', this.reasonDetail)}\n          ></textarea>\n        )}\n      </label>,\n      60\n    );\n\n    items.add(\n      'spam',\n      <label className=\"checkbox\">\n        <input type=\"radio\" name=\"reason\" checked={this.reason() === 'spam'} value=\"spam\" onclick={withAttr('value', this.reason)} />\n        <strong>{app.translator.trans('flarum-flags.forum.flag_post.reason_spam_label')}</strong>\n        {app.translator.trans('flarum-flags.forum.flag_post.reason_spam_text')}\n        {this.reason() === 'spam' && (\n          <textarea\n            className=\"FormControl\"\n            placeholder={app.translator.trans('flarum-flags.forum.flag_post.reason_details_placeholder')}\n            value={this.reasonDetail()}\n            oninput={withAttr('value', this.reasonDetail)}\n          ></textarea>\n        )}\n      </label>,\n      50\n    );\n\n    items.add(\n      'other',\n      <label className=\"checkbox\">\n        <input type=\"radio\" name=\"reason\" checked={this.reason() === 'other'} value=\"other\" onclick={withAttr('value', this.reason)} />\n        <strong>{app.translator.trans('flarum-flags.forum.flag_post.reason_other_label')}</strong>\n        {this.reason() === 'other' && (\n          <textarea className=\"FormControl\" value={this.reasonDetail()} oninput={withAttr('value', this.reasonDetail)}></textarea>\n        )}\n      </label>,\n      10\n    );\n\n    return items;\n  }\n\n  onsubmit(e) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app.store\n      .createRecord('flags')\n      .save(\n        {\n          reason: this.reason() === 'other' ? null : this.reason(),\n          reasonDetail: this.reasonDetail(),\n          relationships: {\n            user: app.session.user,\n            post: this.attrs.post,\n          },\n        },\n        { errorHandler: this.onerror.bind(this) }\n      )\n      .then(() => (this.success = true))\n      .catch(() => {})\n      .then(this.loaded.bind(this));\n  }\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport Button from 'flarum/common/components/Button';\n\nimport FlagPostModal from './components/FlagPostModal';\n\nexport default function () {\n  extend(PostControls, 'userControls', function (items, post) {\n    if (post.isHidden() || post.contentType() !== 'comment' || !post.canFlag()) return;\n\n    items.add(\n      'flag',\n      <Button icon=\"fas fa-flag\" onclick={() => app.modal.show(FlagPostModal, { post })}>\n        {app.translator.trans('flarum-flags.forum.post_controls.flag_button')}\n      </Button>\n    );\n  });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/HeaderSecondary'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationsDropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport icon from 'flarum/common/helpers/icon';\nimport humanTime from 'flarum/common/helpers/humanTime';\n\nexport default class FlagList extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n    this.state = this.attrs.state;\n  }\n\n  view() {\n    const flags = this.state.cache || [];\n\n    return (\n      <div className=\"NotificationList FlagList\">\n        <div className=\"NotificationList-header\">\n          <h4 className=\"App-titleControl App-titleControl--text\">{app.translator.trans('flarum-flags.forum.flagged_posts.title')}</h4>\n        </div>\n        <div className=\"NotificationList-content\">\n          <ul className=\"NotificationGroup-content\">\n            {flags.length ? (\n              flags.map((flag) => {\n                const post = flag.post();\n\n                return (\n                  <li>\n                    <Link\n                      href={app.route.post(post)}\n                      className=\"Notification Flag\"\n                      onclick={(e) => {\n                        app.flags.index = post;\n                        e.redraw = false;\n                      }}\n                    >\n                      {avatar(post.user())}\n                      {icon('fas fa-flag', { className: 'Notification-icon' })}\n                      <span className=\"Notification-content\">\n                        {app.translator.trans('flarum-flags.forum.flagged_posts.item_text', {\n                          username: username(post.user()),\n                          em: <em />,\n                          discussion: post.discussion().title(),\n                        })}\n                      </span>\n                      {humanTime(flag.createdAt())}\n                      <div className=\"Notification-excerpt\">{post.contentPlain()}</div>\n                    </Link>\n                  </li>\n                );\n              })\n            ) : !this.state.loading ? (\n              <div className=\"NotificationList-empty\">{app.translator.trans('flarum-flags.forum.flagged_posts.empty_text')}</div>\n            ) : (\n              <LoadingIndicator className=\"LoadingIndicator--block\" />\n            )}\n          </ul>\n        </div>\n      </div>\n    );\n  }\n}\n","import app from 'flarum/forum/app';\nimport NotificationsDropdown from 'flarum/forum/components/NotificationsDropdown';\n\nimport FlagList from './FlagList';\n\nexport default class FlagsDropdown extends NotificationsDropdown {\n  static initAttrs(attrs) {\n    attrs.label = attrs.label || app.translator.trans('flarum-flags.forum.flagged_posts.tooltip');\n    attrs.icon = attrs.icon || 'fas fa-flag';\n\n    super.initAttrs(attrs);\n  }\n\n  getMenu() {\n    return (\n      <div className={'Dropdown-menu ' + this.attrs.menuClassName} onclick={this.menuClick.bind(this)}>\n        {this.showing && <FlagList state={this.attrs.state} />}\n      </div>\n    );\n  }\n\n  goToRoute() {\n    m.route.set(app.route('flags'));\n  }\n\n  getUnreadCount() {\n    return app.flags.cache ? app.flags.cache.length : app.forum.attribute('flagCount');\n  }\n\n  getNewCount() {\n    return app.session.user.attribute('newFlagCount');\n  }\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport HeaderSecondary from 'flarum/forum/components/HeaderSecondary';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default function () {\n  extend(HeaderSecondary.prototype, 'items', function (items) {\n    if (app.forum.attribute('canViewFlags')) {\n      items.add('flags', <FlagsDropdown state={app.flags} />, 15);\n    }\n  });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/humanTime'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Post from 'flarum/forum/components/Post';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport humanTime from 'flarum/common/utils/humanTime';\n\nexport default function () {\n  extend(Post.prototype, 'elementAttrs', function (attrs) {\n    if (this.attrs.post.flags().length) {\n      attrs.className += ' Post--flagged';\n    }\n  });\n\n  Post.prototype.dismissFlag = function (body) {\n    const post = this.attrs.post;\n\n    delete post.data.relationships.flags;\n\n    this.subtree.invalidate();\n\n    if (app.flags.cache) {\n      app.flags.cache.some((flag, i) => {\n        if (flag.post() === post) {\n          app.flags.cache.splice(i, 1);\n\n          if (app.flags.index === post) {\n            let next = app.flags.cache[i];\n\n            if (!next) next = app.flags.cache[0];\n\n            if (next) {\n              const nextPost = next.post();\n              app.flags.index = nextPost;\n              m.route.set(app.route.post(nextPost));\n            }\n          }\n\n          return true;\n        }\n      });\n    }\n\n    return app.request({\n      url: app.forum.attribute('apiUrl') + post.apiEndpoint() + '/flags',\n      method: 'DELETE',\n      body,\n    });\n  };\n\n  Post.prototype.flagActionItems = function () {\n    const items = new ItemList();\n\n    const controls = PostControls.destructiveControls(this.attrs.post);\n\n    Object.keys(controls.items).forEach((k) => {\n      const attrs = controls.get(k).attrs;\n\n      attrs.className = 'Button';\n\n      extend(attrs, 'onclick', () => this.dismissFlag());\n    });\n\n    items.add('controls', <div className=\"ButtonGroup\">{controls.toArray()}</div>);\n\n    items.add(\n      'dismiss',\n      <Button className=\"Button\" icon=\"far fa-eye-slash\" onclick={this.dismissFlag.bind(this)}>\n        {app.translator.trans('flarum-flags.forum.post.dismiss_flag_button')}\n      </Button>,\n      -100\n    );\n\n    return items;\n  };\n\n  extend(Post.prototype, 'viewItems', function (items) {\n    const post = this.attrs.post;\n    const flags = post.flags();\n\n    if (!flags.length) return;\n\n    if (post.isHidden()) this.revealContent = true;\n\n    items.add(\n      'flagged',\n      <div className=\"Post-flagged\">\n        <div className=\"Post-flagged-flags\">\n          {flags.map((flag) => (\n            <div className=\"Post-flagged-flag\">{this.flagReason(flag)}</div>\n          ))}\n        </div>\n        <div className=\"Post-flagged-actions\">{this.flagActionItems().toArray()}</div>\n      </div>,\n      110\n    );\n  });\n\n  Post.prototype.flagReason = function (flag) {\n    if (flag.type() === 'user') {\n      const user = flag.user();\n      const reason = flag.reason() ? app.translator.trans(`flarum-flags.forum.flag_post.reason_${flag.reason()}_label`) : null;\n      const detail = flag.reasonDetail();\n      const time = humanTime(flag.createdAt());\n\n      return [\n        app.translator.trans(reason ? 'flarum-flags.forum.post.flagged_by_with_reason_text' : 'flarum-flags.forum.post.flagged_by_text', {\n          time,\n          user,\n          reason,\n        }),\n        !!detail && <span className=\"Post-flagged-detail\">{detail}</span>,\n      ];\n    }\n  };\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Page'];","import app from 'flarum/forum/app';\nimport Page from 'flarum/components/Page';\n\nimport FlagList from './FlagList';\n\n/**\n * The `FlagsPage` component shows the flags list. It is only\n * used on mobile devices where the flags dropdown is within the drawer.\n */\nexport default class FlagsPage extends Page {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    app.history.push('flags');\n\n    app.flags.load();\n\n    this.bodyClass = 'App--flags';\n  }\n\n  view() {\n    return (\n      <div className=\"FlagsPage\">\n        <FlagList state={app.flags}></FlagList>\n      </div>\n    );\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Model from 'flarum/common/Model';\nimport type Post from 'flarum/common/models/Post';\nimport type User from 'flarum/common/models/User';\n\nexport default class Flag extends Model {\n  type() {\n    return Model.attribute<string>('type').call(this);\n  }\n  reason() {\n    return Model.attribute<string | null>('reason').call(this);\n  }\n  reasonDetail() {\n    return Model.attribute<string | null>('reasonDetail').call(this);\n  }\n  createdAt() {\n    return Model.attribute('createdAt', Model.transformDate).call(this);\n  }\n\n  post() {\n    return Model.hasOne<Post>('post').call(this);\n  }\n  user() {\n    return Model.hasOne<User | null>('user').call(this);\n  }\n}\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport FlagsPage from './components/FlagsPage';\nimport Flag from './models/Flag';\n\nexport default [\n  new Extend.Routes() //\n    .add('flags', '/flags', FlagsPage),\n\n  new Extend.Store() //\n    .add('flags', Flag),\n\n  new Extend.Model(Post) //\n    .hasMany<Flag>('flags')\n    .attribute<boolean>('canFlag'),\n];\n","import addFlagsToPosts from './addFlagsToPosts';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport Flag from './models/Flag';\nimport FlagList from './components/FlagList';\nimport FlagPostModal from './components/FlagPostModal';\nimport FlagsPage from './components/FlagsPage';\nimport FlagsDropdown from './components/FlagsDropdown';\nimport FlagListState from './states/FlagListState';\n\nexport default {\n  'flags/addFlagsToPosts': addFlagsToPosts,\n  'flags/addFlagControl': addFlagControl,\n  'flags/addFlagsDropdown': addFlagsDropdown,\n  'flags/models/Flag': Flag,\n  'flags/components/FlagList': FlagList,\n  'flags/components/FlagPostModal': FlagPostModal,\n  'flags/components/FlagsPage': FlagsPage,\n  'flags/components/FlagsDropdown': FlagsDropdown,\n  'flags/states/FlagListState': FlagListState,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import app from 'flarum/forum/app';\n\nimport FlagListState from './states/FlagListState';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport addFlagsToPosts from './addFlagsToPosts';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-flags', () => {\n  app.flags = new FlagListState(app);\n\n  addFlagControl();\n  addFlagsDropdown();\n  addFlagsToPosts();\n});\n\n// Expose compat API\nimport flagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, flagsCompat);\n","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n","function _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n  \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n  module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n    return e;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  var t,\n    e = {},\n    r = Object.prototype,\n    n = r.hasOwnProperty,\n    o = Object.defineProperty || function (t, e, r) {\n      t[e] = r.value;\n    },\n    i = \"function\" == typeof Symbol ? Symbol : {},\n    a = i.iterator || \"@@iterator\",\n    c = i.asyncIterator || \"@@asyncIterator\",\n    u = i.toStringTag || \"@@toStringTag\";\n  function define(t, e, r) {\n    return Object.defineProperty(t, e, {\n      value: r,\n      enumerable: !0,\n      configurable: !0,\n      writable: !0\n    }), t[e];\n  }\n  try {\n    define({}, \"\");\n  } catch (t) {\n    define = function define(t, e, r) {\n      return t[e] = r;\n    };\n  }\n  function wrap(t, e, r, n) {\n    var i = e && e.prototype instanceof Generator ? e : Generator,\n      a = Object.create(i.prototype),\n      c = new Context(n || []);\n    return o(a, \"_invoke\", {\n      value: makeInvokeMethod(t, r, c)\n    }), a;\n  }\n  function tryCatch(t, e, r) {\n    try {\n      return {\n        type: \"normal\",\n        arg: t.call(e, r)\n      };\n    } catch (t) {\n      return {\n        type: \"throw\",\n        arg: t\n      };\n    }\n  }\n  e.wrap = wrap;\n  var h = \"suspendedStart\",\n    l = \"suspendedYield\",\n    f = \"executing\",\n    s = \"completed\",\n    y = {};\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n  var p = {};\n  define(p, a, function () {\n    return this;\n  });\n  var d = Object.getPrototypeOf,\n    v = d && d(d(values([])));\n  v && v !== r && n.call(v, a) && (p = v);\n  var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n  function defineIteratorMethods(t) {\n    [\"next\", \"throw\", \"return\"].forEach(function (e) {\n      define(t, e, function (t) {\n        return this._invoke(e, t);\n      });\n    });\n  }\n  function AsyncIterator(t, e) {\n    function invoke(r, o, i, a) {\n      var c = tryCatch(t[r], t, o);\n      if (\"throw\" !== c.type) {\n        var u = c.arg,\n          h = u.value;\n        return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n          invoke(\"next\", t, i, a);\n        }, function (t) {\n          invoke(\"throw\", t, i, a);\n        }) : e.resolve(h).then(function (t) {\n          u.value = t, i(u);\n        }, function (t) {\n          return invoke(\"throw\", t, i, a);\n        });\n      }\n      a(c.arg);\n    }\n    var r;\n    o(this, \"_invoke\", {\n      value: function value(t, n) {\n        function callInvokeWithMethodAndArg() {\n          return new e(function (e, r) {\n            invoke(t, n, e, r);\n          });\n        }\n        return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n      }\n    });\n  }\n  function makeInvokeMethod(e, r, n) {\n    var o = h;\n    return function (i, a) {\n      if (o === f) throw Error(\"Generator is already running\");\n      if (o === s) {\n        if (\"throw\" === i) throw a;\n        return {\n          value: t,\n          done: !0\n        };\n      }\n      for (n.method = i, n.arg = a;;) {\n        var c = n.delegate;\n        if (c) {\n          var u = maybeInvokeDelegate(c, n);\n          if (u) {\n            if (u === y) continue;\n            return u;\n          }\n        }\n        if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n          if (o === h) throw o = s, n.arg;\n          n.dispatchException(n.arg);\n        } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n        o = f;\n        var p = tryCatch(e, r, n);\n        if (\"normal\" === p.type) {\n          if (o = n.done ? s : l, p.arg === y) continue;\n          return {\n            value: p.arg,\n            done: n.done\n          };\n        }\n        \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n      }\n    };\n  }\n  function maybeInvokeDelegate(e, r) {\n    var n = r.method,\n      o = e.iterator[n];\n    if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n    var i = tryCatch(o, e.iterator, r.arg);\n    if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n    var a = i.arg;\n    return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n  }\n  function pushTryEntry(t) {\n    var e = {\n      tryLoc: t[0]\n    };\n    1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n  }\n  function resetTryEntry(t) {\n    var e = t.completion || {};\n    e.type = \"normal\", delete e.arg, t.completion = e;\n  }\n  function Context(t) {\n    this.tryEntries = [{\n      tryLoc: \"root\"\n    }], t.forEach(pushTryEntry, this), this.reset(!0);\n  }\n  function values(e) {\n    if (e || \"\" === e) {\n      var r = e[a];\n      if (r) return r.call(e);\n      if (\"function\" == typeof e.next) return e;\n      if (!isNaN(e.length)) {\n        var o = -1,\n          i = function next() {\n            for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n            return next.value = t, next.done = !0, next;\n          };\n        return i.next = i;\n      }\n    }\n    throw new TypeError(_typeof(e) + \" is not iterable\");\n  }\n  return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n    value: GeneratorFunctionPrototype,\n    configurable: !0\n  }), o(GeneratorFunctionPrototype, \"constructor\", {\n    value: GeneratorFunction,\n    configurable: !0\n  }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n    var e = \"function\" == typeof t && t.constructor;\n    return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n  }, e.mark = function (t) {\n    return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n  }, e.awrap = function (t) {\n    return {\n      __await: t\n    };\n  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n    return this;\n  }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n    void 0 === i && (i = Promise);\n    var a = new AsyncIterator(wrap(t, r, n, o), i);\n    return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n      return t.done ? t.value : a.next();\n    });\n  }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n    return this;\n  }), define(g, \"toString\", function () {\n    return \"[object Generator]\";\n  }), e.keys = function (t) {\n    var e = Object(t),\n      r = [];\n    for (var n in e) r.push(n);\n    return r.reverse(), function next() {\n      for (; r.length;) {\n        var t = r.pop();\n        if (t in e) return next.value = t, next.done = !1, next;\n      }\n      return next.done = !0, next;\n    };\n  }, e.values = values, Context.prototype = {\n    constructor: Context,\n    reset: function reset(e) {\n      if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n    },\n    stop: function stop() {\n      this.done = !0;\n      var t = this.tryEntries[0].completion;\n      if (\"throw\" === t.type) throw t.arg;\n      return this.rval;\n    },\n    dispatchException: function dispatchException(e) {\n      if (this.done) throw e;\n      var r = this;\n      function handle(n, o) {\n        return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n      }\n      for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n        var i = this.tryEntries[o],\n          a = i.completion;\n        if (\"root\" === i.tryLoc) return handle(\"end\");\n        if (i.tryLoc <= this.prev) {\n          var c = n.call(i, \"catchLoc\"),\n            u = n.call(i, \"finallyLoc\");\n          if (c && u) {\n            if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n            if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n          } else if (c) {\n            if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n          } else {\n            if (!u) throw Error(\"try statement without catch or finally\");\n            if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n          }\n        }\n      }\n    },\n    abrupt: function abrupt(t, e) {\n      for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n        var o = this.tryEntries[r];\n        if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n          var i = o;\n          break;\n        }\n      }\n      i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n      var a = i ? i.completion : {};\n      return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n    },\n    complete: function complete(t, e) {\n      if (\"throw\" === t.type) throw t.arg;\n      return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n    },\n    finish: function finish(t) {\n      for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n        var r = this.tryEntries[e];\n        if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n      }\n    },\n    \"catch\": function _catch(t) {\n      for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n        var r = this.tryEntries[e];\n        if (r.tryLoc === t) {\n          var n = r.completion;\n          if (\"throw\" === n.type) {\n            var o = n.arg;\n            resetTryEntry(r);\n          }\n          return o;\n        }\n      }\n      throw Error(\"illegal catch attempt\");\n    },\n    delegateYield: function delegateYield(e, r, n) {\n      return this.delegate = {\n        iterator: values(e),\n        resultName: r,\n        nextLoc: n\n      }, \"next\" === this.method && (this.arg = t), y;\n    }\n  }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n  try {\n    var i = n[a](c),\n      u = i.value;\n  } catch (n) {\n    return void e(n);\n  }\n  i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n  return function () {\n    var t = this,\n      e = arguments;\n    return new Promise(function (r, o) {\n      var a = n.apply(t, e);\n      function _next(n) {\n        asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n      }\n      function _throw(n) {\n        asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n      }\n      _next(void 0);\n    });\n  };\n}\nexport { _asyncToGenerator as default };","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\nimport type Tag from '../../common/models/Tag';\n\nexport default class TagListState {\n  loadedIncludes?: Set<string>;\n\n  async load(includes: string[] = []): Promise<Tag[]> {\n    if (!this.loadedIncludes) {\n      return this.query(includes);\n    }\n\n    const unloadedIncludes = includes.filter((include) => !this.loadedIncludes!.has(include));\n\n    if (unloadedIncludes.length === 0) {\n      return Promise.resolve(app.store.all<Tag>('tags'));\n    }\n\n    return this.query(unloadedIncludes);\n  }\n\n  async query(includes: string[] = []): Promise<Tag[]> {\n    this.loadedIncludes ??= new Set();\n\n    return app.store.find<Tag[]>('tags', { include: includes.join(',') }).then((val) => {\n      includes.forEach((include) => this.loadedIncludes!.add(include));\n      return val;\n    });\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Separator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","function _setPrototypeOf(t, e) {\n  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n    return t.__proto__ = e, t;\n  }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n  t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","import classList from 'flarum/common/utils/classList';\n\nexport default function tagIcon(tag, attrs = {}, settings = {}) {\n  const hasIcon = tag && tag.icon();\n  const { useColor = true } = settings;\n\n  attrs.className = classList([attrs.className, 'icon', hasIcon ? tag.icon() : 'TagIcon']);\n\n  if (tag && useColor) {\n    attrs.style = attrs.style || {};\n    attrs.style['--color'] = tag.color();\n\n    if (hasIcon) {\n      attrs.style.color = tag.color();\n    }\n  } else if (!tag) {\n    attrs.className += ' untagged';\n  }\n\n  return hasIcon ? <i {...attrs} /> : <span {...attrs} />;\n}\n","import Link from 'flarum/common/components/Link';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport classList from 'flarum/common/utils/classList';\nimport tagIcon from '../../common/helpers/tagIcon';\n\nexport default class TagLinkButton extends LinkButton {\n  view(vnode) {\n    const tag = this.attrs.model;\n    const description = tag && tag.description();\n    const className = classList('TagLinkButton hasIcon', { child: tag.isChild() }, this.attrs.className);\n\n    return (\n      <Link className={className} href={this.attrs.route} style={tag ? { '--color': tag.color() } : undefined} title={description || undefined}>\n        {tagIcon(tag, { className: 'Button-icon' })}\n        <span className=\"Button-label\">{tag ? tag.name() : app.translator.trans('flarum-tags.forum.index.untagged_link')}</span>\n      </Link>\n    );\n  }\n\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    const tag = attrs.model;\n\n    attrs.params.tags = tag ? tag.slug() : 'untagged';\n    attrs.route = app.route('tag', attrs.params);\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/textContrastClass'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extract'];","import extract from 'flarum/common/utils/extract';\nimport Link from 'flarum/common/components/Link';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from './tagIcon';\n\nexport default function tagLabel(tag, attrs = {}) {\n  attrs.style = attrs.style || {};\n  attrs.className = 'TagLabel ' + (attrs.className || '');\n\n  const link = extract(attrs, 'link');\n  const tagText = tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text');\n\n  if (tag) {\n    const color = tag.color();\n    if (color) {\n      attrs.style['--tag-bg'] = color;\n      attrs.className = classList(attrs.className, 'colored', textContrastClass(color));\n    }\n\n    if (link) {\n      attrs.title = tag.description() || '';\n      attrs.href = app.route('tag', { tags: tag.slug() });\n    }\n\n    if (tag.isChild()) {\n      attrs.className += ' TagLabel--child';\n    }\n  } else {\n    attrs.className += ' untagged';\n  }\n\n  return m(\n    link ? Link : 'span',\n    attrs,\n    <span className=\"TagLabel-text\">\n      {tag && tag.icon() && tagIcon(tag, { className: 'TagLabel-icon' }, { useColor: false })}\n      <span className=\"TagLabel-name\">{tagText}</span>\n    </span>\n  );\n}\n","import Tag from '../models/Tag';\n\nexport default function sortTags(tags: Tag[]) {\n  return tags.slice(0).sort((a, b) => {\n    const aPos = a.position();\n    const bPos = b.position();\n\n    // If they're both secondary tags, sort them by their discussions count,\n    // descending.\n    if (aPos === null && bPos === null) return b.discussionCount() - a.discussionCount();\n\n    // If just one is a secondary tag, then the primary tag should\n    // come first.\n    if (bPos === null) return -1;\n    if (aPos === null) return 1;\n\n    // If we've made it this far, we know they're both primary tags. So we'll\n    // need to see if they have parents.\n    const aParent = a.parent();\n    const bParent = b.parent();\n\n    // If they both have the same parent, then their positions are local,\n    // so we can compare them directly.\n    if (aParent === bParent) return aPos - bPos;\n    // If they are both child tags, then we will compare the positions of their\n    // parents.\n    else if (aParent && bParent) return aParent.position()! - bParent.position()!;\n    // If we are comparing a child tag with its parent, then we let the parent\n    // come first. If we are comparing an unrelated parent/child, then we\n    // compare both of the parents.\n    else if (aParent) return aParent === b ? 1 : aParent.position()! - bPos;\n    else if (bParent) return bParent === a ? -1 : aPos - bParent.position()!;\n\n    return 0;\n  });\n}\n","import Page from 'flarum/common/components/Page';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport listItems from 'flarum/common/helpers/listItems';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport classList from 'flarum/common/utils/classList';\n\nimport tagIcon from '../../common/helpers/tagIcon';\nimport tagLabel from '../../common/helpers/tagLabel';\nimport sortTags from '../../common/utils/sortTags';\n\nexport default class TagsPage extends Page {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    app.history.push('tags', app.translator.trans('flarum-tags.forum.header.back_to_tags_tooltip'));\n\n    this.tags = [];\n\n    const preloaded = app.preloadedApiDocument();\n\n    if (preloaded) {\n      this.tags = sortTags(preloaded.filter((tag) => !tag.isChild()));\n      return;\n    }\n\n    this.loading = true;\n\n    app.tagList.load(['children', 'lastPostedDiscussion', 'parent']).then(() => {\n      this.tags = sortTags(app.store.all('tags').filter((tag) => !tag.isChild()));\n\n      this.loading = false;\n\n      m.redraw();\n    });\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    app.setTitle(app.translator.trans('flarum-tags.forum.all_tags.meta_title_text'));\n    app.setTitleCount(0);\n  }\n\n  view() {\n    return <div className=\"TagsPage\">{this.pageContent().toArray()}</div>;\n  }\n\n  pageContent() {\n    const items = new ItemList();\n\n    items.add('hero', this.hero(), 100);\n    items.add('main', <div className=\"container\">{this.mainContent().toArray()}</div>, 10);\n\n    return items;\n  }\n\n  mainContent() {\n    const items = new ItemList();\n\n    items.add('sidebar', this.sidebar(), 100);\n    items.add('content', this.content(), 10);\n\n    return items;\n  }\n\n  content() {\n    return <div className=\"TagsPage-content sideNavOffset\">{this.contentItems().toArray()}</div>;\n  }\n\n  contentItems() {\n    const items = new ItemList();\n\n    if (this.loading) {\n      items.add('loading', <LoadingIndicator />);\n    } else {\n      const pinned = this.tags.filter((tag) => tag.position() !== null);\n      const cloud = this.tags.filter((tag) => tag.position() === null);\n\n      items.add('tagTiles', this.tagTileListView(pinned), 100);\n\n      if (cloud.length) {\n        items.add('cloud', this.cloudView(cloud), 10);\n      }\n    }\n\n    return items;\n  }\n\n  hero() {\n    return IndexPage.prototype.hero();\n  }\n\n  sidebar() {\n    return (\n      <nav className=\"TagsPage-nav IndexPage-nav sideNav\">\n        <ul>{listItems(this.sidebarItems().toArray())}</ul>\n      </nav>\n    );\n  }\n\n  sidebarItems() {\n    return IndexPage.prototype.sidebarItems();\n  }\n\n  tagTileListView(pinned) {\n    return <ul className=\"TagTiles\">{pinned.map(this.tagTileView.bind(this))}</ul>;\n  }\n\n  tagTileView(tag) {\n    const lastPostedDiscussion = tag.lastPostedDiscussion();\n    const children = sortTags(tag.children() || []);\n\n    return (\n      <li className={classList('TagTile', { colored: tag.color() }, textContrastClass(tag.color()))} style={{ '--tag-bg': tag.color() }}>\n        <Link className=\"TagTile-info\" href={app.route.tag(tag)}>\n          {tag.icon() && tagIcon(tag, {}, { useColor: false })}\n          <h3 className=\"TagTile-name\">{tag.name()}</h3>\n          <p className=\"TagTile-description\">{tag.description()}</p>\n          {!!children && (\n            <div className=\"TagTile-children\">{children.map((child) => [<Link href={app.route.tag(child)}>{child.name()}</Link>, ' '])}</div>\n          )}\n        </Link>\n        {lastPostedDiscussion ? (\n          <Link className=\"TagTile-lastPostedDiscussion\" href={app.route.discussion(lastPostedDiscussion, lastPostedDiscussion.lastPostNumber())}>\n            <span className=\"TagTile-lastPostedDiscussion-title\">{lastPostedDiscussion.title()}</span>\n            {humanTime(lastPostedDiscussion.lastPostedAt())}\n          </Link>\n        ) : (\n          <span className=\"TagTile-lastPostedDiscussion\" />\n        )}\n      </li>\n    );\n  }\n\n  cloudView(cloud) {\n    return <div className=\"TagCloud\">{cloud.map((tag) => [tagLabel(tag, { link: true }), ' '])}</div>;\n  }\n}\n","import { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Separator from 'flarum/common/components/Separator';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nimport TagLinkButton from './components/TagLinkButton';\nimport TagsPage from './components/TagsPage';\nimport app from 'flarum/forum/app';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function () {\n  // Add a link to the tags page, as well as a list of all the tags,\n  // to the index page's sidebar.\n  extend(IndexPage.prototype, 'navItems', function (items) {\n    items.add(\n      'tags',\n      <LinkButton icon=\"fas fa-th-large\" href={app.route('tags')}>\n        {app.translator.trans('flarum-tags.forum.index.tags_link')}\n      </LinkButton>,\n      -10\n    );\n\n    if (app.current.matches(TagsPage)) return;\n\n    items.add('separator', <Separator />, -12);\n\n    const params = app.search.stickyParams();\n    const tags = app.store.all('tags');\n    const currentTag = this.currentTag();\n\n    const addTag = (tag) => {\n      let active = currentTag === tag;\n\n      if (!active && currentTag) {\n        active = currentTag.parent() === tag;\n      }\n\n      // tag.name() is passed here as children even though it isn't used directly\n      // because when we need to get the active child in SelectDropdown, we need to\n      // use its children to populate the dropdown. The problem here is that `view`\n      // on TagLinkButton is only called AFTER SelectDropdown, so no children are available\n      // for SelectDropdown to use at the time.\n      items.add(\n        'tag' + tag.id(),\n        <TagLinkButton model={tag} params={params} active={active}>\n          {tag?.name()}\n        </TagLinkButton>,\n        -14\n      );\n    };\n\n    sortTags(tags)\n      .filter(\n        (tag) => tag.position() !== null && (!tag.isChild() || (currentTag && (tag.parent() === currentTag || tag.parent() === currentTag.parent())))\n      )\n      .forEach(addTag);\n\n    const more = tags.filter((tag) => tag.position() === null).sort((a, b) => b.discussionCount() - a.discussionCount());\n\n    more.splice(0, 3).forEach(addTag);\n\n    if (more.length) {\n      items.add('moreTags', <LinkButton href={app.route('tags')}>{app.translator.trans('flarum-tags.forum.index.more_link')}</LinkButton>, -16);\n    }\n  });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/GlobalSearchState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport classList from 'flarum/common/utils/classList';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport default class TagHero extends Component {\n  view() {\n    const tag = this.attrs.model;\n    const color = tag.color();\n\n    return (\n      <header\n        className={classList('Hero', 'TagHero', { 'TagHero--colored': color, [textContrastClass(color)]: color })}\n        style={color ? { '--hero-bg': color } : undefined}\n      >\n        <div className=\"container\">{this.viewItems().toArray()}</div>\n      </header>\n    );\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  viewItems() {\n    const items = new ItemList();\n\n    items.add('content', <div className=\"containerNarrow\">{this.contentItems().toArray()}</div>, 80);\n\n    return items;\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  contentItems() {\n    const items = new ItemList();\n    const tag = this.attrs.model;\n\n    items.add(\n      'tag-title',\n      <h1 className=\"Hero-title\">\n        {tag.icon() && tagIcon(tag, {}, { useColor: false })} {tag.name()}\n      </h1>,\n      100\n    );\n\n    items.add('tag-subtitle', <div className=\"Hero-subtitle\">{tag.description()}</div>, 90);\n\n    return items;\n  }\n}\n","import app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\nimport { extend, override } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\n\nimport TagHero from './components/TagHero';\nimport Tag from '../common/models/Tag';\nimport { ComponentAttrs } from 'flarum/common/Component';\n\nconst findTag = (slug: string) => app.store.all<Tag>('tags').find((tag) => tag.slug().localeCompare(slug, undefined, { sensitivity: 'base' }) === 0);\n\nexport default function () {\n  IndexPage.prototype.currentTag = function () {\n    if (this.currentActiveTag) {\n      return this.currentActiveTag;\n    }\n\n    const slug = app.search.params().tags;\n    let tag = null;\n\n    if (slug) {\n      tag = findTag(slug);\n    }\n\n    if ((slug && !tag) || (tag && !tag.isChild() && !tag.children())) {\n      if (this.currentTagLoading) {\n        return;\n      }\n\n      this.currentTagLoading = true;\n\n      // Unlike the backend, no need to fetch parent.children because if we're on\n      // a child tag page, then either:\n      //    - We loaded in that child tag (and its siblings) in the API document\n      //    - We first navigated to the current tag's parent, which would have loaded in the current tag's siblings.\n      app.store\n        .find('tags', slug, { include: 'children,children.parent,parent,state' })\n        .then(() => {\n          this.currentActiveTag = findTag(slug);\n\n          m.redraw();\n        })\n        .finally(() => {\n          this.currentTagLoading = false;\n        });\n    }\n\n    if (tag) {\n      this.currentActiveTag = tag;\n      return this.currentActiveTag;\n    }\n\n    return;\n  };\n\n  // If currently viewing a tag, insert a tag hero at the top of the view.\n  override(IndexPage.prototype, 'hero', function (original) {\n    const tag = this.currentTag();\n\n    if (tag) return <TagHero model={tag} />;\n\n    return original();\n  });\n\n  extend(IndexPage.prototype, 'view', function (vdom: Mithril.Vnode<ComponentAttrs, {}>) {\n    const tag = this.currentTag();\n\n    if (tag) vdom.attrs.className += ' IndexPage--tag' + tag.id();\n  });\n\n  extend(IndexPage.prototype, 'setTitle', function () {\n    const tag = this.currentTag();\n\n    if (tag) {\n      app.setTitle(tag.name());\n    }\n  });\n\n  // If currently viewing a tag, restyle the 'new discussion' button to use\n  // the tag's color, and disable if the user isn't allowed to edit.\n  extend(IndexPage.prototype, 'sidebarItems', function (items) {\n    const tag = this.currentTag();\n\n    if (tag) {\n      const color = tag.color();\n      const canStartDiscussion = tag.canStartDiscussion() || !app.session.user;\n      const newDiscussion = items.get('newDiscussion') as Mithril.Vnode<ComponentAttrs, {}>;\n\n      if (color) {\n        newDiscussion.attrs.className = classList([newDiscussion.attrs.className, 'Button--tagColored', textContrastClass(color)]);\n        newDiscussion.attrs.style = { '--color': color };\n      }\n\n      newDiscussion.attrs.disabled = !canStartDiscussion;\n      newDiscussion.children = app.translator.trans(\n        canStartDiscussion ? 'core.forum.index.start_discussion_button' : 'core.forum.index.cannot_start_discussion_button'\n      );\n    }\n  });\n\n  // Add a parameter for the global search state to pass on to the\n  // DiscussionListState that will let us filter discussions by tag.\n  extend(GlobalSearchState.prototype, 'params', function (params) {\n    params.tags = m.route.param('tags');\n  });\n\n  // Translate that parameter into a gambit appended to the search query.\n  extend(DiscussionListState.prototype, 'requestParams', function (this: DiscussionListState, params) {\n    if (typeof params.include === 'string') {\n      params.include = [params.include];\n    } else {\n      params.include?.push('tags', 'tags.parent');\n    }\n\n    if (this.params.tags) {\n      const filter = params.filter ?? {};\n      filter.tag = this.params.tags;\n      // TODO: replace this with a more robust system.\n      const q = filter.q;\n      if (q) {\n        filter.q = `${q} tag:${this.params.tags}`;\n      }\n      params.filter = filter;\n    }\n  });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionHero'];","function _objectWithoutPropertiesLoose(r, e) {\n  if (null == r) return {};\n  var t = {};\n  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n    if (-1 !== e.indexOf(n)) continue;\n    t[n] = r[n];\n  }\n  return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","import extract from 'flarum/common/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\nimport classList from 'flarum/common/utils/classList';\n\nexport default function tagsLabel(tags, attrs = {}) {\n  const children = [];\n  const { link, ...otherAttrs } = attrs;\n\n  otherAttrs.className = classList('TagsLabel', otherAttrs.className);\n\n  if (tags) {\n    sortTags(tags).forEach((tag) => {\n      if (tag || tags.length === 1) {\n        children.push(tagLabel(tag, { link }));\n      }\n    });\n  } else {\n    children.push(tagLabel());\n  }\n\n  return <span {...otherAttrs}>{children}</span>;\n}\n","import { extend } from 'flarum/common/extend';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionHero from 'flarum/forum/components/DiscussionHero';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport classList from 'flarum/common/utils/classList';\n\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function () {\n  // Add tag labels to each discussion in the discussion list.\n  extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n    const tags = this.attrs.discussion.tags();\n\n    if (tags && tags.length) {\n      items.add('tags', tagsLabel(tags), 10);\n    }\n  });\n\n  // Restyle a discussion's hero to use its first tag's color.\n  extend(DiscussionHero.prototype, 'view', function (view) {\n    const tags = sortTags(this.attrs.discussion.tags());\n\n    if (tags && tags.length) {\n      const color = tags[0].color();\n      if (color) {\n        view.attrs.style = { '--hero-bg': color };\n        view.attrs.className = classList(view.attrs.className, 'DiscussionHero--colored', textContrastClass(color));\n      }\n    }\n  });\n\n  // Add a list of a discussion's tags to the discussion hero, displayed\n  // before the title. Put the title on its own line.\n  extend(DiscussionHero.prototype, 'items', function (items) {\n    const tags = this.attrs.discussion.tags();\n\n    if (tags && tags.length) {\n      items.add('tags', tagsLabel(tags, { link: true }), 5);\n    }\n  });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","export default function getSelectableTags(discussion) {\n  let tags = app.store.all('tags');\n\n  if (discussion) {\n    tags = tags.filter((tag) => tag.canAddToDiscussion() || discussion.tags().indexOf(tag) !== -1);\n  } else {\n    tags = tags.filter((tag) => tag.canStartDiscussion());\n  }\n\n  return tags;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/highlight'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/KeyboardNavigatable'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","import Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\n\n/**\n * @TODO move to core\n */\nexport default class ToggleButton extends Component {\n  view(vnode) {\n    const { className, isToggled, ...attrs } = this.attrs;\n    const icon = isToggled ? 'far fa-check-circle' : 'far fa-circle';\n\n    return (\n      <Button {...attrs} icon={icon} className={classList([className, isToggled && 'Button--toggled'])}>\n        {vnode.children}\n      </Button>\n    );\n  }\n}\n","import app from 'flarum/common/app';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\nimport highlight from 'flarum/common/helpers/highlight';\nimport KeyboardNavigatable from 'flarum/common/utils/KeyboardNavigatable';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Modal from 'flarum/common/components/Modal';\nimport Stream from 'flarum/common/utils/Stream';\n\nimport sortTags from '../utils/sortTags';\nimport tagLabel from '../helpers/tagLabel';\nimport tagIcon from '../helpers/tagIcon';\nimport ToggleButton from '../../forum/components/ToggleButton';\n\nimport type Tag from '../models/Tag';\nimport type { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport type Mithril from 'mithril';\n\nexport interface ITagSelectionModalLimits {\n  /** Whether to allow bypassing the limits set here. This will show a toggle button to bypass limits. */\n  allowBypassing?: boolean;\n  /** Maximum number of primary/secondary tags allowed. */\n  max?: {\n    total?: number;\n    primary?: number;\n    secondary?: number;\n  };\n  /** Minimum number of primary/secondary tags to be selected. */\n  min?: {\n    total?: number;\n    primary?: number;\n    secondary?: number;\n  };\n}\n\nexport interface ITagSelectionModalAttrs extends IInternalModalAttrs {\n  /** Custom modal className to use. */\n  className?: string;\n  /** Modal title, defaults to 'Choose Tags'. */\n  title?: string;\n  /** Initial tag selection value. */\n  selectedTags?: Tag[];\n  /** Limits set based on minimum and maximum number of primary/secondary tags that can be selected. */\n  limits?: ITagSelectionModalLimits;\n  /** Whether to allow resetting the value. Defaults to true. */\n  allowResetting?: boolean;\n  /** Whether to require the parent tag of a selected tag to be selected as well. */\n  requireParentTag?: boolean;\n  /** Filter tags that can be selected. */\n  selectableTags?: (tags: Tag[]) => Tag[];\n  /** Whether a tag can be selected. */\n  canSelect: (tag: Tag) => boolean;\n  /** Callback for when a tag is selected. */\n  onSelect?: (tag: Tag, selected: Tag[]) => void;\n  /** Callback for when a tag is deselected. */\n  onDeselect?: (tag: Tag, selected: Tag[]) => void;\n  /** Callback for when the selection is submitted. */\n  onsubmit?: (selected: Tag[]) => void;\n}\n\nexport type ITagSelectionModalState = undefined;\n\nexport default class TagSelectionModal<\n  CustomAttrs extends ITagSelectionModalAttrs = ITagSelectionModalAttrs,\n  CustomState extends ITagSelectionModalState = ITagSelectionModalState\n> extends Modal<CustomAttrs, CustomState> {\n  protected loading = true;\n  protected tags!: Tag[];\n  protected selected: Tag[] = [];\n  protected bypassReqs: boolean = false;\n\n  protected filter = Stream('');\n  protected focused = false;\n  protected navigator = new KeyboardNavigatable();\n  protected indexTag?: Tag;\n\n  static initAttrs(attrs: ITagSelectionModalAttrs) {\n    super.initAttrs(attrs);\n\n    // Default values for optional attributes.\n    attrs.title ||= extractText(app.translator.trans('flarum-tags.lib.tag_selection_modal.title'));\n    attrs.canSelect ||= () => true;\n    attrs.allowResetting ??= true;\n    attrs.limits = {\n      min: {\n        total: attrs.limits?.min?.total ?? -Infinity,\n        primary: attrs.limits?.min?.primary ?? -Infinity,\n        secondary: attrs.limits?.min?.secondary ?? -Infinity,\n      },\n      max: {\n        total: attrs.limits?.max?.total ?? Infinity,\n        primary: attrs.limits?.max?.primary ?? Infinity,\n        secondary: attrs.limits?.max?.secondary ?? Infinity,\n      },\n    };\n\n    // Prevent illogical limits from being provided.\n    catchInvalidLimits(attrs.limits);\n  }\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.navigator\n      .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n      .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n      .onSelect(this.select.bind(this))\n      .onRemove(() => this.selected.splice(this.selected.length - 1, 1));\n\n    app.tagList.load(['parent']).then((tags) => {\n      this.loading = false;\n\n      if (this.attrs.selectableTags) {\n        tags = this.attrs.selectableTags(tags);\n      }\n\n      this.tags = sortTags(tags);\n\n      if (this.attrs.selectedTags) {\n        this.attrs.selectedTags.map(this.addTag.bind(this));\n      }\n\n      this.indexTag = tags[0];\n\n      m.redraw();\n    });\n  }\n\n  className() {\n    return classList('TagSelectionModal', this.attrs.className);\n  }\n\n  title() {\n    return this.attrs.title;\n  }\n\n  content() {\n    if (this.loading || !this.tags) {\n      return <LoadingIndicator />;\n    }\n\n    const filter = this.filter().toLowerCase();\n    const primaryCount = this.primaryCount();\n    const secondaryCount = this.secondaryCount();\n    const tags = this.getFilteredTags();\n\n    const inputWidth = Math.max(extractText(this.getInstruction(primaryCount, secondaryCount)).length, this.filter().length);\n\n    return [\n      <div className=\"Modal-body\">\n        <div className=\"TagSelectionModal-form\">\n          <div className=\"TagSelectionModal-form-input\">\n            <div className={'TagsInput FormControl ' + (this.focused ? 'focus' : '')} onclick={() => this.$('.TagsInput input').focus()}>\n              <span className=\"TagsInput-selected\">\n                {this.selected.map((tag) => (\n                  <span\n                    className=\"TagsInput-tag\"\n                    onclick={() => {\n                      this.removeTag(tag);\n                      this.onready();\n                    }}\n                  >\n                    {tagLabel(tag)}\n                  </span>\n                ))}\n              </span>\n              <input\n                className=\"FormControl\"\n                placeholder={extractText(this.getInstruction(primaryCount, secondaryCount))}\n                bidi={this.filter}\n                style={{ width: inputWidth + 'ch' }}\n                onkeydown={this.navigator.navigate.bind(this.navigator)}\n                onfocus={() => (this.focused = true)}\n                onblur={() => (this.focused = false)}\n              />\n            </div>\n          </div>\n          <div className=\"TagSelectionModal-form-submit App-primaryControl\">\n            <Button\n              type=\"submit\"\n              className=\"Button Button--primary\"\n              disabled={!this.meetsRequirements(primaryCount, secondaryCount)}\n              icon=\"fas fa-check\"\n            >\n              {app.translator.trans('flarum-tags.lib.tag_selection_modal.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>,\n\n      <div className=\"Modal-footer\">\n        <ul className=\"TagSelectionModal-list SelectTagList\">\n          {tags.map((tag) => (\n            <li\n              data-index={tag.id()}\n              className={classList({\n                pinned: tag.position() !== null,\n                child: !!tag.parent(),\n                colored: !!tag.color(),\n                selected: this.selected.includes(tag),\n                active: this.indexTag === tag,\n              })}\n              style={{ color: tag.color() }}\n              onmouseover={() => (this.indexTag = tag)}\n              onclick={this.toggleTag.bind(this, tag)}\n            >\n              {tagIcon(tag)}\n              <span className=\"SelectTagListItem-name\">{highlight(tag.name(), filter)}</span>\n              {tag.description() ? <span className=\"SelectTagListItem-description\">{tag.description()}</span> : ''}\n            </li>\n          ))}\n        </ul>\n        {this.attrs.limits!.allowBypassing && (\n          <div className=\"TagSelectionModal-controls\">\n            <ToggleButton className=\"Button\" onclick={() => (this.bypassReqs = !this.bypassReqs)} isToggled={this.bypassReqs}>\n              {app.translator.trans('flarum-tags.lib.tag_selection_modal.bypass_requirements')}\n            </ToggleButton>\n          </div>\n        )}\n      </div>,\n    ];\n  }\n\n  /**\n   * Filters the available tags on every state change.\n   */\n  private getFilteredTags(): Tag[] {\n    const filter = this.filter().toLowerCase();\n    const primaryCount = this.primaryCount();\n    const secondaryCount = this.secondaryCount();\n    let tags = this.tags;\n\n    if (this.attrs.requireParentTag) {\n      // Filter out all child tags whose parents have not been selected. This\n      // makes it impossible to select a child if its parent hasn't been selected.\n      tags = tags.filter((tag) => {\n        const parent = tag.parent();\n        return parent !== null && (parent === false || this.selected.includes(parent));\n      });\n    }\n\n    if (!this.bypassReqs) {\n      // If we reached the total maximum number of tags, we can't select anymore.\n      if (this.selected.length >= this.attrs.limits!.max!.total!) {\n        tags = tags.filter((tag) => this.selected.includes(tag));\n      }\n      // If the number of selected primary/secondary tags is at the maximum, then\n      // we'll filter out all other tags of that type.\n      else {\n        if (primaryCount >= this.attrs.limits!.max!.primary!) {\n          tags = tags.filter((tag) => !tag.isPrimary() || this.selected.includes(tag));\n        }\n        if (secondaryCount >= this.attrs.limits!.max!.secondary!) {\n          tags = tags.filter((tag) => tag.isPrimary() || this.selected.includes(tag));\n        }\n      }\n    }\n\n    // If the user has entered text in the filter input, then filter by tags\n    // whose name matches what they've entered.\n    if (filter) {\n      tags = tags.filter((tag) => tag.name().toLowerCase().includes(filter));\n    }\n\n    if (!this.indexTag || !tags.includes(this.indexTag)) this.indexTag = tags[0];\n\n    return tags;\n  }\n\n  /**\n   * Counts the number of selected primary tags.\n   */\n  protected primaryCount(): number {\n    return this.selected.filter((tag) => tag.isPrimary()).length;\n  }\n\n  /**\n   * Counts the number of selected secondary tags.\n   */\n  protected secondaryCount(): number {\n    return this.selected.filter((tag) => !tag.isPrimary()).length;\n  }\n\n  /**\n   * Validates the number of selected primary/secondary tags against the set min max limits.\n   */\n  protected meetsRequirements(primaryCount: number, secondaryCount: number) {\n    if (this.bypassReqs || (this.attrs.allowResetting && this.selected.length === 0)) {\n      return true;\n    }\n\n    if (this.selected.length < this.attrs.limits!.min!.total!) {\n      return false;\n    }\n\n    return primaryCount >= this.attrs.limits!.min!.primary! && secondaryCount >= this.attrs.limits!.min!.secondary!;\n  }\n\n  /**\n   * Add the given tag to the list of selected tags.\n   */\n  protected addTag(tag: Tag | undefined) {\n    if (!tag || !this.attrs.canSelect(tag)) return;\n\n    if (this.attrs.onSelect) {\n      this.attrs.onSelect(tag, this.selected);\n    }\n\n    // If this tag has a parent, we'll also need to add the parent tag to the\n    // selected list if it's not already in there.\n    if (this.attrs.requireParentTag) {\n      const parent = tag.parent();\n      if (parent && !this.selected.includes(parent)) {\n        this.selected.push(parent);\n      }\n    }\n\n    if (!this.selected.includes(tag)) {\n      this.selected.push(tag);\n    }\n  }\n\n  /**\n   * Remove the given tag from the list of selected tags.\n   */\n  protected removeTag(tag: Tag) {\n    const index = this.selected.indexOf(tag);\n\n    if (index !== -1) {\n      this.selected.splice(index, 1);\n\n      // Look through the list of selected tags for any tags which have the tag\n      // we just removed as their parent. We'll need to remove them too.\n      if (this.attrs.requireParentTag) {\n        this.selected.filter((t) => t.parent() === tag).forEach(this.removeTag.bind(this));\n      }\n\n      if (this.attrs.onDeselect) {\n        this.attrs.onDeselect(tag, this.selected);\n      }\n    }\n  }\n\n  protected toggleTag(tag: Tag) {\n    // Won't happen, needed for type safety.\n    if (!this.tags) return;\n\n    if (this.selected.includes(tag)) {\n      this.removeTag(tag);\n    } else {\n      this.addTag(tag);\n    }\n\n    if (this.filter()) {\n      this.filter('');\n      this.indexTag = this.tags[0];\n    }\n\n    this.onready();\n  }\n\n  /**\n   * Gives human text instructions based on the current number of selected tags and set limits.\n   */\n  protected getInstruction(primaryCount: number, secondaryCount: number) {\n    if (this.bypassReqs) {\n      return '';\n    }\n\n    if (primaryCount < this.attrs.limits!.min!.primary!) {\n      const remaining = this.attrs.limits!.min!.primary! - primaryCount;\n      return extractText(app.translator.trans('flarum-tags.lib.tag_selection_modal.choose_primary_placeholder', { count: remaining }));\n    } else if (secondaryCount < this.attrs.limits!.min!.secondary!) {\n      const remaining = this.attrs.limits!.min!.secondary! - secondaryCount;\n      return extractText(app.translator.trans('flarum-tags.lib.tag_selection_modal.choose_secondary_placeholder', { count: remaining }));\n    } else if (this.selected.length < this.attrs.limits!.min!.total!) {\n      const remaining = this.attrs.limits!.min!.total! - this.selected.length;\n      return extractText(app.translator.trans('flarum-tags.lib.tag_selection_modal.choose_tags_placeholder', { count: remaining }));\n    }\n\n    return '';\n  }\n\n  /**\n   * Submit tag selection.\n   */\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    if (this.attrs.onsubmit) this.attrs.onsubmit(this.selected);\n\n    this.hide();\n  }\n\n  protected select(e: KeyboardEvent) {\n    // Ctrl + Enter submits the selection, just Enter completes the current entry\n    if (e.metaKey || e.ctrlKey || (this.indexTag && this.selected.includes(this.indexTag))) {\n      if (this.selected.length) {\n        // The DOM submit method doesn't emit a `submit event, so we\n        // simulate a manual submission so our `onsubmit` logic is run.\n        this.$('button[type=\"submit\"]').click();\n      }\n    } else if (this.indexTag) {\n      this.getItem(this.indexTag)[0].dispatchEvent(new Event('click'));\n    }\n  }\n\n  protected selectableItems() {\n    return this.$('.TagSelectionModal-list > li');\n  }\n\n  protected getCurrentNumericIndex() {\n    if (!this.indexTag) return -1;\n\n    return this.selectableItems().index(this.getItem(this.indexTag));\n  }\n\n  protected getItem(selectedTag: Tag) {\n    return this.selectableItems().filter(`[data-index=\"${selectedTag.id()}\"]`);\n  }\n\n  protected setIndex(index: number, scrollToItem: boolean) {\n    const $items = this.selectableItems();\n    const $dropdown = $items.parent();\n\n    if (index < 0) {\n      index = $items.length - 1;\n    } else if (index >= $items.length) {\n      index = 0;\n    }\n\n    const $item = $items.eq(index);\n\n    this.indexTag = app.store.getById('tags', $item.attr('data-index')!);\n\n    m.redraw();\n\n    if (scrollToItem && this.indexTag) {\n      const dropdownScroll = $dropdown.scrollTop()!;\n      const dropdownTop = $dropdown.offset()!.top;\n      const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;\n      const itemTop = $item.offset()!.top;\n      const itemBottom = itemTop + $item.outerHeight()!;\n\n      let scrollTop;\n      if (itemTop < dropdownTop) {\n        scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n      } else if (itemBottom > dropdownBottom) {\n        scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n      }\n\n      if (typeof scrollTop !== 'undefined') {\n        $dropdown.stop(true).animate({ scrollTop }, 100);\n      }\n    }\n  }\n}\n\n/**\n * Catch invalid limits provided to the tag selection modal.\n */\nfunction catchInvalidLimits(limits: ITagSelectionModalLimits) {\n  if (limits.min!.primary! > limits.max!.primary!) {\n    throw new Error('The minimum number of primary tags allowed cannot be more than the maximum number of primary tags allowed.');\n  }\n\n  if (limits.min!.secondary! > limits.max!.secondary!) {\n    throw new Error('The minimum number of secondary tags allowed cannot be more than the maximum number of secondary tags allowed.');\n  }\n\n  if (limits.min!.total! > limits.max!.primary! + limits.max!.secondary!) {\n    throw new Error('The minimum number of tags allowed cannot be more than the maximum number of primary and secondary tags allowed together.');\n  }\n\n  if (limits.max!.total! < limits.min!.primary! + limits.min!.secondary!) {\n    throw new Error('The maximum number of tags allowed cannot be less than the minimum number of primary and secondary tags allowed together.');\n  }\n\n  if (limits.min!.total! > limits.max!.total!) {\n    throw new Error('The minimum number of tags allowed cannot be more than the maximum number of tags allowed.');\n  }\n}\n","import app from 'flarum/forum/app';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\n\nimport getSelectableTags from '../utils/getSelectableTags';\nimport TagSelectionModal, { ITagSelectionModalAttrs } from '../../common/components/TagSelectionModal';\n\nimport type Discussion from 'flarum/common/models/Discussion';\nimport type Tag from '../../common/models/Tag';\n\nexport interface TagDiscussionModalAttrs extends ITagSelectionModalAttrs {\n  discussion?: Discussion;\n}\n\nexport default class TagDiscussionModal extends TagSelectionModal<TagDiscussionModalAttrs> {\n  static initAttrs(attrs: TagDiscussionModalAttrs) {\n    super.initAttrs(attrs);\n\n    const title = attrs.discussion\n      ? app.translator.trans('flarum-tags.forum.choose_tags.edit_title', { title: <em>{attrs.discussion.title()}</em> })\n      : app.translator.trans('flarum-tags.forum.choose_tags.title');\n\n    attrs.className = classList(attrs.className, 'TagDiscussionModal');\n    attrs.title = extractText(title);\n    attrs.allowResetting = !!app.forum.attribute('canBypassTagCounts');\n    attrs.limits = {\n      allowBypassing: attrs.allowResetting,\n      max: {\n        primary: app.forum.attribute<number>('maxPrimaryTags'),\n        secondary: app.forum.attribute<number>('maxSecondaryTags'),\n      },\n      min: {\n        primary: app.forum.attribute<number>('minPrimaryTags'),\n        secondary: app.forum.attribute<number>('minSecondaryTags'),\n      },\n    };\n    attrs.requireParentTag = true;\n    attrs.selectableTags = () => getSelectableTags(attrs.discussion);\n    attrs.selectedTags ??= (attrs.discussion?.tags() as Tag[]) || [];\n    attrs.canSelect = (tag) => tag.canStartDiscussion();\n\n    const suppliedOnsubmit = attrs.onsubmit || null;\n\n    // Save changes.\n    attrs.onsubmit = function (tags) {\n      const discussion = attrs.discussion;\n\n      if (discussion) {\n        discussion.save({ relationships: { tags } }).then(() => {\n          if (app.current.matches(DiscussionPage)) {\n            app.current.get('stream').update();\n          }\n\n          m.redraw();\n        });\n      }\n\n      if (suppliedOnsubmit) suppliedOnsubmit(tags);\n    };\n  }\n}\n","import { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport Button from 'flarum/common/components/Button';\n\nimport TagDiscussionModal from './components/TagDiscussionModal';\n\nexport default function () {\n  // Add a control allowing the discussion to be moved to another category.\n  extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n    if (discussion.canTag()) {\n      items.add(\n        'tags',\n        <Button icon=\"fas fa-tag\" onclick={() => app.modal.show(TagDiscussionModal, { discussion })}>\n          {app.translator.trans('flarum-tags.forum.discussion_controls.edit_tags_button')}\n        </Button>\n      );\n    }\n  });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionComposer'];","import { extend, override } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport classList from 'flarum/common/utils/classList';\n\nimport TagDiscussionModal from './components/TagDiscussionModal';\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport getSelectableTags from './utils/getSelectableTags';\n\nexport default function () {\n  extend(IndexPage.prototype, 'newDiscussionAction', function (promise) {\n    // From `addTagFilter\n    const tag = this.currentTag();\n\n    if (tag) {\n      const parent = tag.parent();\n      const tags = parent ? [parent, tag] : [tag];\n      promise.then((composer) => (composer.fields.tags = tags));\n    } else {\n      app.composer.fields.tags = [];\n    }\n  });\n\n  extend(DiscussionComposer.prototype, 'oninit', function () {\n    app.tagList.load(['parent']).then(() => m.redraw());\n  });\n\n  // Add tag-selection abilities to the discussion composer.\n  DiscussionComposer.prototype.chooseTags = function () {\n    const selectableTags = getSelectableTags();\n\n    if (!selectableTags.length) return;\n\n    app.modal.show(TagDiscussionModal, {\n      selectedTags: (this.composer.fields.tags || []).slice(0),\n      onsubmit: (tags) => {\n        this.composer.fields.tags = tags;\n        this.$('textarea').focus();\n      },\n    });\n  };\n\n  // Add a tag-selection menu to the discussion composer's header, after the\n  // title.\n  extend(DiscussionComposer.prototype, 'headerItems', function (items) {\n    const tags = this.composer.fields.tags || [];\n    const selectableTags = getSelectableTags();\n\n    items.add(\n      'tags',\n      <a className={classList(['DiscussionComposer-changeTags', !selectableTags.length && 'disabled'])} onclick={this.chooseTags.bind(this)}>\n        {tags.length ? (\n          tagsLabel(tags)\n        ) : (\n          <span className=\"TagLabel untagged\">{app.translator.trans('flarum-tags.forum.composer_discussion.choose_tags_link')}</span>\n        )}\n      </a>,\n      10\n    );\n  });\n\n  override(DiscussionComposer.prototype, 'onsubmit', function (original) {\n    const chosenTags = this.composer.fields.tags || [];\n    const chosenPrimaryTags = chosenTags.filter((tag) => tag.position() !== null && !tag.isChild());\n    const chosenSecondaryTags = chosenTags.filter((tag) => tag.position() === null);\n    const selectableTags = getSelectableTags();\n\n    const minPrimaryTags = parseInt(app.forum.attribute('minPrimaryTags'));\n    const minSecondaryTags = parseInt(app.forum.attribute('minSecondaryTags'));\n    const maxPrimaryTags = parseInt(app.forum.attribute('maxPrimaryTags'));\n    const maxSecondaryTags = parseInt(app.forum.attribute('maxSecondaryTags'));\n\n    if (\n      ((!chosenTags.length && maxPrimaryTags !== 0 && maxSecondaryTags !== 0) ||\n        chosenPrimaryTags.length < minPrimaryTags ||\n        chosenSecondaryTags.length < minSecondaryTags) &&\n      selectableTags.length\n    ) {\n      app.modal.show(TagDiscussionModal, {\n        selectedTags: chosenTags,\n        onsubmit: (tags) => {\n          this.composer.fields.tags = tags;\n          original();\n        },\n      });\n    } else {\n      original();\n    }\n  });\n\n  // Add the selected tags as data to submit to the server.\n  extend(DiscussionComposer.prototype, 'data', function (data) {\n    data.relationships = data.relationships || {};\n    data.relationships.tags = this.composer.fields.tags;\n  });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import EventPost from 'flarum/forum/components/EventPost';\nimport tagsLabel from '../../common/helpers/tagsLabel';\n\nexport default class DiscussionTaggedPost extends EventPost {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    const oldTags = attrs.post.content()[0];\n    const newTags = attrs.post.content()[1];\n\n    function diffTags(tags1, tags2) {\n      return tags1.filter((tag) => tags2.indexOf(tag) === -1).map((id) => app.store.getById('tags', id));\n    }\n\n    attrs.tagsAdded = diffTags(newTags, oldTags);\n    attrs.tagsRemoved = diffTags(oldTags, newTags);\n  }\n\n  icon() {\n    return 'fas fa-tag';\n  }\n\n  descriptionKey() {\n    if (this.attrs.tagsAdded.length) {\n      if (this.attrs.tagsRemoved.length) {\n        return 'flarum-tags.forum.post_stream.added_and_removed_tags_text';\n      }\n\n      return 'flarum-tags.forum.post_stream.added_tags_text';\n    }\n\n    return 'flarum-tags.forum.post_stream.removed_tags_text';\n  }\n\n  descriptionData() {\n    const data = {};\n\n    if (this.attrs.tagsAdded.length) {\n      data.tagsAdded = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {\n        tags: tagsLabel(this.attrs.tagsAdded, { link: true }),\n        count: this.attrs.tagsAdded.length,\n      });\n    }\n\n    if (this.attrs.tagsRemoved.length) {\n      data.tagsRemoved = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {\n        tags: tagsLabel(this.attrs.tagsRemoved, { link: true }),\n        count: this.attrs.tagsRemoved.length,\n      });\n    }\n\n    return data;\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/computed'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import computed from 'flarum/common/utils/computed';\nimport Model from 'flarum/common/Model';\nimport type Discussion from 'flarum/common/models/Discussion';\n\nexport default class Tag extends Model {\n  name() {\n    return Model.attribute<string>('name').call(this);\n  }\n  slug() {\n    return Model.attribute<string>('slug').call(this);\n  }\n  description() {\n    return Model.attribute<string | null>('description').call(this);\n  }\n\n  color() {\n    return Model.attribute<string | null>('color').call(this);\n  }\n  backgroundUrl() {\n    return Model.attribute<string | null>('backgroundUrl').call(this);\n  }\n  backgroundMode() {\n    return Model.attribute<string | null>('backgroundMode').call(this);\n  }\n  icon() {\n    return Model.attribute<string | null>('icon').call(this);\n  }\n\n  position() {\n    return Model.attribute<number | null>('position').call(this);\n  }\n  parent() {\n    return Model.hasOne<Tag | null>('parent').call(this);\n  }\n  children() {\n    return Model.hasMany<Tag>('children').call(this);\n  }\n  defaultSort() {\n    return Model.attribute<string | null>('defaultSort').call(this);\n  }\n  isChild() {\n    return Model.attribute<boolean>('isChild').call(this);\n  }\n  isHidden() {\n    return Model.attribute<boolean>('isHidden').call(this);\n  }\n\n  discussionCount() {\n    return Model.attribute<number>('discussionCount').call(this);\n  }\n  lastPostedAt() {\n    return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n  }\n  lastPostedDiscussion() {\n    return Model.hasOne<Discussion | null>('lastPostedDiscussion').call(this);\n  }\n\n  isRestricted() {\n    return Model.attribute<boolean>('isRestricted').call(this);\n  }\n  canStartDiscussion() {\n    return Model.attribute<boolean>('canStartDiscussion').call(this);\n  }\n  canAddToDiscussion() {\n    return Model.attribute<boolean>('canAddToDiscussion').call(this);\n  }\n\n  isPrimary() {\n    return computed<boolean, this>('position', 'parent', (position, parent) => position !== null && parent === false).call(this);\n  }\n}\n","import Extend from 'flarum/common/extenders';\nimport Tag from './models/Tag';\n\nexport default [\n  new Extend.Store() //\n    .add('tags', Tag),\n];\n","import app from 'flarum/forum/app';\nimport Extend from 'flarum/common/extenders';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\nimport TagsPage from './components/TagsPage';\nimport Tag from '../common/models/Tag';\n\nimport commonExtend from '../common/extend';\n\nexport default [\n  ...commonExtend,\n\n  new Extend.Routes() //\n    .add('tags', '/tags', TagsPage) //\n    .add('tag', '/t/:tags', IndexPage) //\n    .helper('tag', (tag) => app.route('tag', { tags: tag.slug() })),\n\n  new Extend.PostTypes() //\n    .add('discussionTagged', DiscussionTaggedPost),\n\n  new Extend.Model(Discussion) //\n    .hasMany<Tag>('tags') //\n    .attribute<boolean>('canTag'),\n];\n","import sortTags from './utils/sortTags';\nimport Tag from './models/Tag';\nimport tagsLabel from './helpers/tagsLabel';\nimport tagIcon from './helpers/tagIcon';\nimport tagLabel from './helpers/tagLabel';\nimport TagSelectionModal from './components/TagSelectionModal';\nimport TagListState from './states/TagListState';\n\nexport default {\n  'tags/utils/sortTags': sortTags,\n  'tags/models/Tag': Tag,\n  'tags/helpers/tagsLabel': tagsLabel,\n  'tags/helpers/tagIcon': tagIcon,\n  'tags/helpers/tagLabel': tagLabel,\n  'tags/components/TagSelectionModal': TagSelectionModal,\n  'tags/states/TagListState': TagListState,\n};\n","import compat from '../common/compat';\n\nimport addTagFilter from './addTagFilter';\nimport addTagControl from './addTagControl';\nimport TagHero from './components/TagHero';\nimport TagDiscussionModal from './components/TagDiscussionModal';\nimport TagsPage from './components/TagsPage';\nimport ToggleButton from './components/ToggleButton';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\nimport TagLinkButton from './components/TagLinkButton';\nimport addTagList from './addTagList';\nimport addTagLabels from './addTagLabels';\nimport addTagComposer from './addTagComposer';\nimport getSelectableTags from './utils/getSelectableTags';\n\nexport default Object.assign(compat, {\n  'tags/addTagFilter': addTagFilter,\n  'tags/addTagControl': addTagControl,\n  'tags/components/TagHero': TagHero,\n  'tags/components/TagDiscussionModal': TagDiscussionModal,\n  'tags/components/TagsPage': TagsPage,\n  'tags/components/ToggleButton': ToggleButton,\n  'tags/components/DiscussionTaggedPost': DiscussionTaggedPost,\n  'tags/components/TagLinkButton': TagLinkButton,\n  'tags/addTagList': addTagList,\n  'tags/addTagLabels': addTagLabels,\n  'tags/addTagComposer': addTagComposer,\n  'tags/utils/getSelectableTags': getSelectableTags,\n});\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import app from 'flarum/forum/app';\n\nimport TagListState from '../common/states/TagListState';\n\nimport addTagList from './addTagList';\nimport addTagFilter from './addTagFilter';\nimport addTagLabels from './addTagLabels';\nimport addTagControl from './addTagControl';\nimport addTagComposer from './addTagComposer';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-tags', function () {\n  app.tagList = new TagListState();\n\n  addTagList();\n  addTagFilter();\n  addTagLabels();\n  addTagControl();\n  addTagComposer();\n});\n\n// Expose compat API\nimport tagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, tagsCompat);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Post from 'flarum/common/models/Post';\nimport Badge from 'flarum/common/components/Badge';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport PostComponent from 'flarum/forum/components/Post';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport Button from 'flarum/common/components/Button';\nimport PostControls from 'flarum/forum/utils/PostControls';\n\napp.initializers.add(\n  'flarum-approval',\n  () => {\n    Discussion.prototype.isApproved = Discussion.attribute('isApproved');\n\n    extend(Discussion.prototype, 'badges', function (items) {\n      if (!this.isApproved() && !items.has('hidden')) {\n        items.add(\n          'awaitingApproval',\n          <Badge type=\"awaitingApproval\" icon=\"fas fa-gavel\" label={app.translator.trans('flarum-approval.forum.badge.awaiting_approval_tooltip')} />\n        );\n      }\n    });\n\n    Post.prototype.isApproved = Post.attribute('isApproved');\n    Post.prototype.canApprove = Post.attribute('canApprove');\n\n    extend(DiscussionListItem.prototype, 'elementAttrs', function (attrs) {\n      if (!this.attrs.discussion.isApproved()) {\n        attrs.className += ' DiscussionListItem--unapproved';\n      }\n    });\n\n    extend(PostComponent.prototype, 'elementAttrs', function (attrs) {\n      if (!this.attrs.post.isApproved()) {\n        attrs.className += ' Post--unapproved';\n      }\n    });\n\n    extend(CommentPost.prototype, 'headerItems', function (items) {\n      if (!this.attrs.post.isApproved() && !this.attrs.post.isHidden()) {\n        items.add('unapproved', app.translator.trans('flarum-approval.forum.post.awaiting_approval_text'));\n      }\n    });\n\n    override(PostComponent.prototype, 'flagReason', function (original, flag) {\n      if (flag.type() === 'approval') {\n        return app.translator.trans('flarum-approval.forum.post.awaiting_approval_text');\n      }\n\n      return original(flag);\n    });\n\n    extend(PostControls, 'destructiveControls', function (items, post) {\n      if (!post.isApproved() && post.canApprove()) {\n        items.add(\n          'approve',\n          <Button icon=\"fas fa-check\" onclick={PostControls.approveAction.bind(post)}>\n            {app.translator.trans('flarum-approval.forum.post_controls.approve_button')}\n          </Button>,\n          10\n        );\n      }\n    });\n\n    PostControls.approveAction = function () {\n      this.save({ isApproved: true });\n\n      if (this.number() === 1) {\n        this.discussion().pushAttributes({ isApproved: true });\n      }\n    };\n  },\n  -10\n); // set initializer priority to run after reports\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",f=\"month\",h=\"quarter\",c=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=h+\"Date\",n[d]=h+\"Date\",n[f]=h+\"Month\",n[c]=h+\"FullYear\",n[u]=h+\"Hours\",n[s]=h+\"Minutes\",n[i]=h+\"Seconds\",n[r]=h+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,\"0\")},d=n.meridiem||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,\"0\"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,\"0\"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,\"0\"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,\"0\"),s:String(this.$s),ss:O.s(this.$s,2,\"0\"),SSS:O.s(this.$ms,3,\"0\"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",f],[\"$y\",c],[\"$D\",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_utc=i()}(this,(function(){\"use strict\";var t=\"minute\",i=/[+-]\\d\\d(?::?\\d\\d)?/g,e=/([+-]|\\d\\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else r.call(this)};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if(\"string\"==typeof s&&(s=function(t){void 0===t&&(t=\"\");var s=t.match(i);if(!s)return null;var f=(\"\"+s[0]).match(e)||[\"-\",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:\"+\"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?\"YYYY-MM-DDTHH:mm:ss[Z]\":\"\");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return\"s\"===t&&this.$offset?n(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)}}}));","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['utils/UserControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['models/User'];","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['utils/withAttr'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\n\ndayjs.extend(utc);\n\nexport function getPermanentSuspensionDate(): Date {\n  return new Date('2038-01-01');\n}\n\nexport function isPermanentSuspensionDate(date: Date): boolean {\n  return dayjs.utc(date).isSame(dayjs.utc('2038-01-01'));\n}\n\nexport function localStorageKey(): string {\n  return 'flarum-suspend.acknowledge-suspension';\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\n\nimport Stream from 'flarum/utils/Stream';\nimport withAttr from 'flarum/utils/withAttr';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport { getPermanentSuspensionDate } from '../helpers/suspensionHelper';\n\nexport default class SuspendUserModal extends Modal {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    let until = this.attrs.user.suspendedUntil();\n    const reason = this.attrs.user.suspendReason();\n    const message = this.attrs.user.suspendMessage();\n    let status = null;\n\n    if (new Date() > until) until = null;\n\n    if (until) {\n      if (until.getFullYear() === 9999) status = 'indefinitely';\n      else status = 'limited';\n    }\n\n    this.status = Stream(status);\n    this.reason = Stream(reason);\n    this.message = Stream(message);\n    this.daysRemaining = Stream(status === 'limited' && -dayjs().diff(until, 'days') + 1);\n  }\n\n  className() {\n    return 'SuspendUserModal Modal--medium';\n  }\n\n  title() {\n    return app.translator.trans('flarum-suspend.forum.suspend_user.title', { user: this.attrs.user });\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form\">\n          <div className=\"Form-group\">\n            <label>{app.translator.trans('flarum-suspend.forum.suspend_user.status_heading')}</label>\n            <div>{this.formItems().toArray()}</div>\n          </div>\n\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary\" loading={this.loading} type=\"submit\">\n              {app.translator.trans('flarum-suspend.forum.suspend_user.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  radioItems() {\n    const items = new ItemList();\n\n    items.add(\n      'not-suspended',\n      <label className=\"checkbox\">\n        <input type=\"radio\" name=\"status\" checked={!this.status()} value=\"\" onclick={withAttr('value', this.status)} />\n        {app.translator.trans('flarum-suspend.forum.suspend_user.not_suspended_label')}\n      </label>,\n      100\n    );\n\n    items.add(\n      'indefinitely',\n      <label className=\"checkbox\">\n        <input type=\"radio\" name=\"status\" checked={this.status() === 'indefinitely'} value=\"indefinitely\" onclick={withAttr('value', this.status)} />\n        {app.translator.trans('flarum-suspend.forum.suspend_user.indefinitely_label')}\n      </label>,\n      90\n    );\n\n    items.add(\n      'time-suspension',\n      <label className=\"checkbox SuspendUserModal-days\">\n        <input\n          type=\"radio\"\n          name=\"status\"\n          checked={this.status() === 'limited'}\n          value=\"limited\"\n          onclick={(e) => {\n            this.status(e.target.value);\n            m.redraw.sync();\n            this.$('.SuspendUserModal-days-input input').select();\n            e.redraw = false;\n          }}\n        />\n        {app.translator.trans('flarum-suspend.forum.suspend_user.limited_time_label')}\n        {this.status() === 'limited' && (\n          <div className=\"SuspendUserModal-days-input\">\n            <input type=\"number\" min=\"0\" value={this.daysRemaining()} oninput={withAttr('value', this.daysRemaining)} className=\"FormControl\" />\n            {app.translator.trans('flarum-suspend.forum.suspend_user.limited_time_days_text')}\n          </div>\n        )}\n      </label>,\n      80\n    );\n\n    return items;\n  }\n\n  formItems() {\n    const items = new ItemList();\n\n    items.add('radioItems', <div className=\"Form-group\">{this.radioItems().toArray()}</div>, 100);\n\n    items.add(\n      'reason',\n      <div className=\"Form-group\">\n        <label>\n          {app.translator.trans('flarum-suspend.forum.suspend_user.reason')}\n          <textarea\n            className=\"FormControl\"\n            bidi={this.reason}\n            placeholder={app.translator.trans('flarum-suspend.forum.suspend_user.placeholder_optional')}\n            rows=\"2\"\n          />\n        </label>\n      </div>,\n      90\n    );\n\n    items.add(\n      'message',\n      <div className=\"Form-group\">\n        <label>\n          {app.translator.trans('flarum-suspend.forum.suspend_user.display_message')}\n          <textarea\n            className=\"FormControl\"\n            bidi={this.message}\n            placeholder={app.translator.trans('flarum-suspend.forum.suspend_user.placeholder_optional')}\n            rows=\"2\"\n          />\n        </label>\n      </div>,\n      80\n    );\n\n    return items;\n  }\n\n  onsubmit(e) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    let suspendedUntil = null;\n    switch (this.status()) {\n      case 'indefinitely':\n        suspendedUntil = getPermanentSuspensionDate();\n        break;\n\n      case 'limited':\n        suspendedUntil = dayjs().add(this.daysRemaining(), 'days').toDate();\n        break;\n\n      default:\n      // no default\n    }\n\n    this.attrs.user\n      .save({ suspendedUntil, suspendReason: this.reason(), suspendMessage: this.message() })\n      .then(() => this.hide(), this.loaded.bind(this));\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/components/Notification';\nimport { isPermanentSuspensionDate } from '../helpers/suspensionHelper';\n\nexport default class UserSuspendedNotification extends Notification {\n  icon() {\n    return 'fas fa-ban';\n  }\n\n  href() {\n    return app.route.user(this.attrs.notification.subject());\n  }\n\n  content() {\n    const notification = this.attrs.notification;\n    const suspendedUntil = notification.content();\n    const timeReadable = dayjs(suspendedUntil).from(notification.createdAt(), true);\n\n    return isPermanentSuspensionDate(suspendedUntil)\n      ? app.translator.trans('flarum-suspend.forum.notifications.user_suspended_indefinite_text')\n      : app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {\n          timeReadable,\n        });\n  }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/components/Notification';\n\nexport default class UserUnsuspendedNotification extends Notification {\n  icon() {\n    return 'fas fa-ban';\n  }\n\n  href() {\n    return app.route.user(this.attrs.notification.subject());\n  }\n\n  content() {\n    const notification = this.attrs.notification;\n\n    return app.translator.trans('flarum-suspend.forum.notifications.user_unsuspended_text');\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/fullTime'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport fullTime from 'flarum/common/helpers/fullTime';\nimport { isPermanentSuspensionDate, localStorageKey } from '../helpers/suspensionHelper';\n\nexport default class SuspensionInfoModal extends Modal {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.message = this.attrs.message;\n    this.until = this.attrs.until;\n  }\n\n  className() {\n    return 'SuspensionInfoModal Modal';\n  }\n\n  title() {\n    return app.translator.trans('flarum-suspend.forum.suspension_info.title');\n  }\n\n  content() {\n    const timespan = isPermanentSuspensionDate(new Date(this.until))\n      ? app.translator.trans('flarum-suspend.forum.suspension_info.indefinite')\n      : app.translator.trans('flarum-suspend.forum.suspension_info.limited', { date: fullTime(this.until) });\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <p className=\"helpText\">{this.message}</p>\n          <p className=\"helpText\">{timespan}</p>\n\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n              {app.translator.trans('flarum-suspend.forum.suspension_info.dismiss_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  hide() {\n    localStorage.setItem(localStorageKey(), this.attrs.until.getTime());\n    this.attrs.state.close();\n  }\n}\n","import app from 'flarum/forum/app';\nimport SuspensionInfoModal from './components/SuspensionInfoModal';\nimport { localStorageKey } from './helpers/suspensionHelper';\n\nexport default function () {\n  return setTimeout(() => {\n    if (app.session.user) {\n      const message = app.session.user.suspendMessage();\n      const until = app.session.user.suspendedUntil();\n      const isSuspended = message && until && new Date() < until;\n      const alreadyDisplayed = localStorage.getItem(localStorageKey()) === until?.getTime().toString();\n\n      if (isSuspended && !alreadyDisplayed) {\n        app.modal.show(SuspensionInfoModal, { message, until });\n      } else if (localStorage.getItem(localStorageKey())) {\n        localStorage.removeItem(localStorageKey());\n      }\n    }\n  }, 0);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Extend from 'flarum/common/extenders';\nimport User from 'flarum/common/models/User';\nimport Model from 'flarum/common/Model';\n\nexport default [\n  new Extend.Model(User)\n    .attribute<boolean>('canSuspend')\n    .attribute<Date, string | null | undefined>('suspendedUntil', Model.transformDate)\n    .attribute<string | null | undefined>('suspendReason')\n    .attribute<string | null | undefined>('suspendMessage'),\n];\n","import SuspendUserModal from './components/SuspendUserModal';\nimport SuspensionInfoModal from './components/SuspensionInfoModal';\nimport UserSuspendedNotification from './components/UserSuspendedNotification';\nimport UserUnsuspendedNotification from './components/UserUnsuspendedNotification';\nimport * as suspensionHelper from './helpers/suspensionHelper';\nimport checkForSuspension from './checkForSuspension';\n\nexport default {\n  'suspend/components/suspendUserModal': SuspendUserModal,\n  'suspend/components/suspensionInfoModal': SuspensionInfoModal,\n  'suspend/components/UserSuspendedNotification': UserSuspendedNotification,\n  'suspend/components/UserUnsuspendedNotification': UserUnsuspendedNotification,\n  'suspend/helpers/suspensionHelper': suspensionHelper,\n  'suspend/checkForSuspension': checkForSuspension,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport UserControls from 'flarum/utils/UserControls';\nimport Button from 'flarum/components/Button';\nimport Badge from 'flarum/components/Badge';\nimport User from 'flarum/models/User';\n\nimport SuspendUserModal from './components/SuspendUserModal';\nimport UserSuspendedNotification from './components/UserSuspendedNotification';\nimport UserUnsuspendedNotification from './components/UserUnsuspendedNotification';\nimport checkForSuspension from './checkForSuspension';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-suspend', () => {\n  app.notificationComponents.userSuspended = UserSuspendedNotification;\n  app.notificationComponents.userUnsuspended = UserUnsuspendedNotification;\n\n  extend(UserControls, 'moderationControls', (items, user) => {\n    if (user.canSuspend()) {\n      items.add(\n        'suspend',\n        <Button icon=\"fas fa-ban\" onclick={() => app.modal.show(SuspendUserModal, { user })}>\n          {app.translator.trans('flarum-suspend.forum.user_controls.suspend_button')}\n        </Button>\n      );\n    }\n  });\n\n  extend(User.prototype, 'badges', function (items) {\n    const until = this.suspendedUntil();\n\n    if (new Date() < until) {\n      items.add(\n        'suspended',\n        <Badge icon=\"fas fa-ban\" type=\"suspended\" label={app.translator.trans('flarum-suspend.forum.user_badge.suspended_tooltip')} />,\n        100\n      );\n    }\n  });\n\n  checkForSuspension();\n});\n\n// Expose compat API\nimport suspendCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, suspendCompat);\n"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n","module.exports = flarum.core.compat['forum/utils/PostControls'];","module.exports = flarum.core.compat['forum/app'];","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['forum/components/CommentPost'];","/*\n * This file is part of justoverclock/edit-posts.\n *\n * Copyright (c) 2021 Marco Colia.\n * https://flarum.it\n * based on Clark Winkelmann tutorial\n *\n * For the full copyright and license information, please view the LICENSE.md\n * file that was distributed with this source code.\n */\n\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport PostControls from 'flarum/forum/utils/PostControls';\n\napp.initializers.add('justoverclock/edit-posts', () => {\n  extend(CommentPost.prototype, 'content', function (content) {\n    if (!this.attrs.post.canEdit()) {\n      return;\n    }\n    if (this.attrs.post.isHidden()) {\n      return;\n    }\n    content.push(Button.component({\n        className: 'Dropdown-toggle Button Button--icon Button--flat hidebutton',\n        icon: 'fas fa-eye',\n        title: app.translator.trans('justoverclock-edit-posts.forum.hidepost'),\n        onclick: PostControls.hideAction.bind(this.attrs.post)\n      }\n    ));\n    content.push(Button.component({\n        className: 'Dropdown-toggle Button Button--icon Button--flat edipostbutton',\n        icon: 'fas fa-pen',\n        title: app.translator.trans('justoverclock-edit-posts.forum.editpost'),\n        onclick: PostControls.editAction.bind(this.attrs.post)\n      }\n    ));\n    content.push(Button.component({\n        className: 'Dropdown-toggle Button Button--icon Button--flat delpostbutton',\n        icon: 'far fa-trash-alt',\n        title: app.translator.trans('justoverclock-edit-posts.forum.deleteforever'),\n        onclick: PostControls.deleteAction.bind(this.attrs.post)\n      }\n    ));\n  });\n  extend(PostControls, 'moderationControls', function (items) {\n    if (items.has('edit')) {\n      items.remove('edit');\n    }\n  })\n  extend(PostControls, 'destructiveControls', function (items) {\n    if (items.has('hide')) {\n      items.remove('hide');\n    }\n    if (items.has('delete')) {\n      items.remove('delete');\n    }\n  });\n});\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserPage'];","import app from 'flarum/forum/app';\nimport addFeedIcons from './addFeedIcons';\n\napp.initializers.add('ianm-syndication', () => {\n  addFeedIcons();\n});\n","import ItemList from 'flarum/common/utils/ItemList';\nimport app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport type Mithril from 'mithril';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport Discussion from 'flarum/common/models/Discussion';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport type User from 'flarum/common/models/User';\n\nexport default function addFeedIcons() {\n  extend(IndexPage.prototype, 'actionItems', function (items: ItemList<Mithril.Children>) {\n    if (!app.forum.attribute('ianm-syndication.plugin.forum-icons')) {\n      return;\n    }\n\n    if (items.has('refresh')) items.setPriority('refresh', 100);\n    if (items.has('markAllAsRead')) items.setPriority('markAllAsRead', 90);\n\n    const format = app.forum.attribute('ianm-syndication.plugin.forum-format');\n\n    let url = app.forum.attribute('baseUrl') + '/' + format;\n\n    if ('flarum-tags' in flarum.extensions && this.currentTag()) {\n      url = url + '/t/' + this.currentTag().slug();\n    }\n\n    items.add('rss-feed', <LinkButton icon=\"fas fa-rss\" className=\"Button Button--icon\" href={url} target=\"_blank\" />, 105);\n  });\n\n  extend(DiscussionControls, 'userControls', function (items: ItemList<Mithril.Children>, discussion: Discussion) {\n    if (!app.forum.attribute('ianm-syndication.plugin.forum-icons')) {\n      return;\n    }\n\n    const format = app.forum.attribute('ianm-syndication.plugin.forum-format');\n\n    items.add(\n      'rss-link',\n      <LinkButton icon=\"fas fa-rss\" href={app.forum.attribute('baseUrl') + `/${format}/d/` + discussion.id()} external={true} target=\"_blank\">\n        {app.translator.trans('ianm-syndication.forum.discussion.feed_link')}\n      </LinkButton>\n    );\n  });\n\n  extend(UserPage.prototype, 'navItems', function (this: UserPage, items) {\n    if (!app.forum.attribute('ianm-syndication.plugin.forum-icons')) {\n      return;\n    }\n\n    const format = app.forum.attribute('ianm-syndication.plugin.forum-format');\n    const url = app.forum.attribute('baseUrl') + '/' + format + '/u/' + this.user.username() + '/posts';\n\n    items.add(\n      'rss-feed',\n      <LinkButton icon=\"fas fa-rss\" href={url} external={true} target=\"_blank\">\n        {app.translator.trans('ianm-syndication.forum.discussion.feed_link')}\n      </LinkButton>,\n      40\n    );\n  });\n}\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","import app from 'flarum/common/app';\nimport Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\n\n/**\n * The `PageHero` component displays the hero on a page page.\n *\n * ### Props\n *\n * - `page`\n */\nexport default class PageHero extends Component {\n  view() {\n    return (\n      <header className=\"Hero PageHero\">\n        <div className=\"container\">\n          <ul className=\"PageHero-items\">{listItems(this.items().toArray())}</ul>\n        </div>\n      </header>\n    );\n  }\n\n  /**\n   * Build an item list for the contents of the page hero.\n   *\n   * @return {ItemList}\n   */\n  items() {\n    const items = new ItemList();\n    const page = this.attrs.page;\n\n    items.add(\n      'title',\n      <h1 className=\"PageHero-title\">\n        <Link href={app.route.page(page)}>{page.title()}</Link>\n      </h1>\n    );\n\n    return items;\n  }\n}\n","import Page from 'flarum/common/components/Page';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport classList from 'flarum/common/utils/classList';\n\nimport PageHero from './PageHero';\n\nexport default class PagePage extends Page {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * The page that is being viewed.\n     *\n     * @type {fof/pages/models/Page}\n     */\n    this.page = null;\n\n    this.loadPage();\n\n    this.bodyClass = 'App--page';\n  }\n\n  view() {\n    const page = this.page;\n\n    return (\n      <div className={classList('Pages', page?.isHtml() && 'Pages--isHtml')} data-id={page?.id()} data-slug={page?.slug()}>\n        <div className=\"Pages-page\">\n          {page\n            ? [\n                this.hero(),\n                <div className=\"Pages-container container\">\n                  <div className=\"Post-body\">{this.content()}</div>\n                </div>,\n              ]\n            : LoadingIndicator.component({ className: 'LoadingIndicator--block' })}\n        </div>\n      </div>\n    );\n  }\n\n  /**\n   * Initialize page.\n   *\n   * @param {fof/pages/models/Page} page\n   * @protected\n   */\n  show(page) {\n    this.page = page;\n\n    app.history.push('page', page.title());\n    app.setTitle(page.title());\n\n    m.redraw();\n  }\n\n  /**\n   * Get the hero of current page.\n   */\n  hero() {\n    return PageHero.component({ page: this.page });\n  }\n\n  /**\n   * Get the content of page.\n   */\n  content() {\n    return m.trust(this.page.contentHtml());\n  }\n\n  /**\n   * Get current page id from route.\n   *\n   * @return string\n   */\n  id() {\n    const id = m.route.param('id').split('-')[0];\n    if (!isNaN(parseInt(id))) {\n      return id;\n    } else {\n      return m.route.param('id');\n    }\n  }\n\n  /**\n   * Load page from the store, or make a request\n   * if we don't have it yet. Then initialize the page.\n   */\n  loadPage() {\n    const id = this.id();\n\n    const preloaded = app.preloadedApiDocument();\n    const page = (!Array.isArray(preloaded) && preloaded) || app.store.getById('pages', id);\n\n    if (page) {\n      this.show(page);\n    } else {\n      Promise.all([\n        app.store.find('pages', id).then((result) => {\n          this.show(result);\n        }),\n        m.redraw(),\n      ]);\n    }\n  }\n}\n","import IndexPage from 'flarum/forum/components/IndexPage';\nimport icon from 'flarum/common/helpers/icon';\n\nimport PagePage from './PagePage';\n\nexport default class HomePage extends PagePage {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    app.history.push('homePage', icon('fas fa-home'));\n    app.drawer.hide();\n    app.modal.close();\n  }\n\n  show(page) {\n    this.page = page;\n    app.setTitle('');\n    m.redraw();\n  }\n\n  hero() {\n    return IndexPage.prototype.hero();\n  }\n\n  id() {\n    return app.data['fof-pages.home'];\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/computed'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","import app from 'flarum/app';\nimport Model from 'flarum/common/Model';\nimport computed from 'flarum/common/utils/computed';\nimport { getPlainContent } from 'flarum/common/utils/string';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default class Page extends Model {\n  title = Model.attribute('title');\n  time = Model.attribute('time', Model.transformDate);\n  editTime = Model.attribute('editTime', Model.transformDate);\n  content = Model.attribute('content');\n  contentHtml = Model.attribute('contentHtml');\n  contentPlain = computed('contentHtml', getPlainContent);\n  slug = Model.attribute('slug');\n  isHidden = Model.attribute('isHidden');\n  isRestricted = Model.attribute('isRestricted');\n  isHtml = Model.attribute('isHtml');\n\n  badges() {\n    const items = new ItemList();\n\n    if (this.isHidden()) {\n      items.add(\n        'hidden',\n        Badge.component({\n          type: 'hidden',\n          icon: 'fas fa-trash',\n          label: app.translator.trans('fof-pages.admin.badges.hidden'),\n        })\n      );\n    }\n\n    if (this.isRestricted()) {\n      items.add(\n        'restricted',\n        Badge.component({\n          type: 'restricted',\n          icon: 'fas fa-user-shield',\n          label: app.translator.trans('fof-pages.admin.badges.restricted'),\n        })\n      );\n    }\n\n    return items;\n  }\n}\n","import HomePage from './components/HomePage';\nimport PagePage from './components/PagePage';\nimport Page from '../common/models/Page';\n\napp.initializers.add('fof-pages', (app) => {\n  app.routes.homePage = { path: '/pages/home', component: HomePage };\n\n  app.routes.page = { path: '/p/:id', component: PagePage };\n  app.store.models.pages = Page;\n\n  /**\n   * Generate a URL to a page.\n   *\n   * @param {../common/models/Page} page\n   * @return {String}\n   */\n  app.route.page = (page) => {\n    return app.route('page', {\n      id: page.id() + '-' + page.slug(),\n    });\n  };\n});\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/HeaderPrimary'];","export default function sortLinks(links) {\n  return links.slice(0).sort((a, b) => {\n    const aPos = a.position();\n    const bPos = b.position();\n    return aPos > bPos ? 1 : aPos < bPos ? -1 : 0;\n  });\n}\n","function _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n  var i = toPrimitive(t, \"string\");\n  return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n  if (\"object\" != _typeof(t) || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != _typeof(i)) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(e, r) {\n  for (var t = 0; t < r.length; t++) {\n    var o = r[t];\n    o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n  }\n}\nfunction _createClass(e, r, t) {\n  return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n    writable: !1\n  }), e;\n}\nexport { _createClass as default };","function _setPrototypeOf(t, e) {\n  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n    return t.__proto__ = e, t;\n  }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n  t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Separator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","/* global m*/\n\nimport app from 'flarum/forum/app';\nimport Link from 'flarum/common/components/Link';\nimport LinkModel from '../../common/models/Link';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport icon from 'flarum/common/helpers/icon';\nimport Separator from 'flarum/common/components/Separator';\nimport classList from 'flarum/common/utils/classList';\nimport type { IButtonAttrs } from 'flarum/common/components/Button';\nimport type Mithril from 'mithril';\nimport Button from 'flarum/common/components/Button';\n\nexport interface ILinkItemAttrs extends IButtonAttrs {\n  link: LinkModel;\n  className?: string;\n  inDropdown?: boolean;\n  isDropdownButton?: boolean;\n}\n\nexport default class LinkItem extends LinkButton {\n  // Just definitions to satisfy TypeScript\n  attrs!: ILinkItemAttrs;\n\n  view(vnode: Mithril.Vnode<ILinkItemAttrs, never>): JSX.Element {\n    if (this.isLabel) return this.labelView(vnode);\n\n    return this.linkView(vnode);\n  }\n\n  labelView(vnode: Mithril.Vnode<ILinkItemAttrs, never>): JSX.Element {\n    const link = this.attrs.link;\n\n    const LinkLabelNode = this.attrs.inDropdown ? 'span' : Button;\n\n    return (\n      <>\n        {this.attrs.inDropdown && <Separator />}\n        <LinkLabelNode\n          class={classList(this.class, 'LinksButton--label')}\n          onclick={(e: MouseEvent) => {\n            if (this.attrs.inDropdown) {\n              // don't close dropdown when clicking label\n              e.stopPropagation();\n            }\n          }}\n          data-toggle={this.attrs.isDropdownButton ? 'dropdown' : undefined}\n        >\n          {this.icon}\n          <span className=\"LinksButton-title\">{link.title()}</span>\n        </LinkLabelNode>\n        {this.attrs.inDropdown && <Separator />}\n      </>\n    );\n  }\n\n  linkView(vnode: Mithril.Vnode<ILinkItemAttrs, never>): JSX.Element {\n    const link = this.attrs.link;\n\n    const linkAttrs = {\n      className: this.class,\n      rel: this.rel,\n      target: this.linkTarget,\n      external: link.isNewtab() ? false : !link.isInternal(),\n      href: this.linkHref,\n    };\n\n    return (\n      <Link {...linkAttrs}>\n        {this.icon}\n        <span className=\"LinksButton-title\">{link.title()}</span>\n      </Link>\n    );\n  }\n\n  get isInternal(): boolean {\n    const link = this.attrs.link;\n\n    return link.isInternal() && !link.isNewtab();\n  }\n\n  get isLabel(): boolean {\n    return this.attrs.link.url().length === 0;\n  }\n\n  get linkHref(): string {\n    const link = this.attrs.link;\n    const url = link.url();\n\n    if (url.startsWith('/') && link.isInternal()) {\n      return app.forum.attribute('baseUrl') + url;\n    }\n\n    return url;\n  }\n\n  get icon(): Mithril.Child | null {\n    const link = this.attrs.link;\n    const iconClass = link.icon();\n\n    if (iconClass) {\n      return icon(iconClass, { className: 'Button-icon LinksButton-icon' });\n    }\n\n    return null;\n  }\n\n  get rel(): string | undefined {\n    // Prevent security risk on older browsers.\n    // Modern browsers now have `noopener` by default and\n    // require `opener` to enable `window.opener`.\n    //\n    // Learn more:\n    // https://web.dev/external-anchors-use-rel-noopener\n\n    return classList(this.attrs.link.isNewtab() && 'noopener noreferrer', this.attrs.link.useRelMe() && 'me') || undefined;\n  }\n\n  get class(): string {\n    return classList('LinksButton', this.attrs.className || 'Button Button--link', {\n      'LinksButton--inDropdown': this.attrs.inDropdown,\n      active: this.isLinkCurrentPage,\n    });\n  }\n\n  get isLinkCurrentPage(): boolean {\n    const link = this.attrs.link;\n\n    if (!link.isInternal()) return false;\n\n    const base = app.forum.attribute<string>('baseUrl');\n\n    // Mithril returns the current path relative to the origin, which isn't necessarily the base forum URL\n    const currentUrl = new URL(m.route.get() || '/', base);\n    const currentPath = currentUrl.href.replace(base, '');\n\n    // The link from `this.linkHref` should already be absolute, but we'll make sure\n    const linkUrl = new URL(this.linkHref, base);\n    const linkPath = linkUrl.href.replace(base, '');\n\n    // The link is active if the current path starts with the link path.\n    // Except if it's the base url, in which case only an exact match is considered active\n    return currentPath.indexOf(linkPath) === 0 && (currentPath === '/' || linkPath !== '/');\n  }\n\n  get linkTarget(): string | undefined {\n    const link = this.attrs.link;\n\n    if (this.isInternal) return undefined;\n\n    return link.isNewtab() ? '_blank' : undefined;\n  }\n}\n","function _extends() {\n  return _extends = Object.assign ? Object.assign.bind() : function (n) {\n    for (var e = 1; e < arguments.length; e++) {\n      var t = arguments[e];\n      for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n    }\n    return n;\n  }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/SplitDropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import app from 'flarum/forum/app';\n\nimport SplitDropdown from 'flarum/common/components/SplitDropdown';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport icon from 'flarum/common/helpers/icon';\nimport classList from 'flarum/common/utils/classList';\n\nimport LinkItem from './LinkItem';\nimport sortLinks from '../../common/utils/sortLinks';\nexport default class LinkDropdown extends SplitDropdown {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.className += ' LinkDropdown';\n    attrs.buttonClassName += ' Button--link';\n  }\n\n  view(vnode) {\n    const children = this.items().toArray();\n\n    return super.view({ ...vnode, children });\n  }\n\n  getButton(children) {\n    // Make a copy of the attrs of the first child component. We will assign\n    // these attrs to a new button, so that it has exactly the same behaviour as\n    // the first child.\n    const firstChild = this.getFirstChild(children);\n    firstChild.attrs.className = classList(firstChild.attrs.className, 'SplitDropdown-button Button', this.attrs.buttonClassName);\n    firstChild.attrs.isDropdownButton = true;\n\n    return [\n      firstChild,\n      <button className={classList('Dropdown-toggle', 'Button', 'Button--icon', this.attrs.buttonClassName)} data-toggle=\"dropdown\">\n        {icon('fas fa-caret-down', { className: 'Button-caret' })}\n      </button>,\n    ];\n  }\n\n  /**\n   * Build an item list for the contents of the dropdown menu.\n   *\n   * @return {ItemList}\n   */\n  items() {\n    const items = new ItemList();\n    const parent = this.attrs.link;\n\n    items.add(`link${parent.id()}`, LinkItem.component({ link: parent }));\n\n    sortLinks(app.store.all('links'))\n      .filter((link) => link.parent() === parent)\n      .forEach((child) => {\n        items.add(`link${parent.id()}-${child.id()}`, LinkItem.component({ link: child, inDropdown: true }));\n      });\n\n    return items;\n  }\n}\n","import LinkDropdown from './LinkDropdown';\nimport LinkItem from './LinkItem';\n\nexport const components = {\n  LinkDropdown,\n  LinkItem,\n};\n","import sortLinks from './sortLinks';\n\nexport const utils = {\n  sortLinks,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Model from 'flarum/common/Model';\n\nexport default class Link extends Model {\n  title() {\n    return Model.attribute<string>('title').call(this);\n  }\n\n  icon() {\n    return Model.attribute<string>('icon').call(this);\n  }\n\n  type() {\n    return Model.attribute<string>('type').call(this);\n  }\n\n  url() {\n    return Model.attribute<string>('url').call(this);\n  }\n\n  position() {\n    return Model.attribute<number | null | undefined>('position').call(this);\n  }\n\n  isInternal() {\n    return Model.attribute<boolean>('isInternal').call(this);\n  }\n\n  isNewtab() {\n    return Model.attribute<boolean>('isNewtab').call(this);\n  }\n\n  useRelMe() {\n    return Model.attribute<boolean>('useRelMe').call(this);\n  }\n\n  isChild() {\n    return Model.attribute<boolean>('isChild').call(this);\n  }\n\n  parent() {\n    return Model.hasOne<Link>('parent').call(this);\n  }\n\n  isRestricted() {\n    return Model.attribute<boolean>('isRestricted').call(this);\n  }\n\n  guestOnly() {\n    return Model.attribute<boolean>('guestOnly').call(this);\n  }\n}\n","import Link from './Link';\n\nexport const models = {\n  Link,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","import Extend from 'flarum/common/extenders';\nimport Link from './models/Link';\n\nexport default [\n  new Extend.Store() //\n    .add('links', Link),\n];\n","import commonExtend from '../common/extend';\n\nexport default [...commonExtend];\n","import app from 'flarum/forum/app';\nimport extendHeader from './extendHeader';\n\nexport * from './components';\nexport * from '../common/utils';\nexport * from '../common/models';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('fof-links', () => {\n  extendHeader();\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport HeaderPrimary from 'flarum/forum/components/HeaderPrimary';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport sortLinks from '../common/utils/sortLinks';\nimport type Mithril from 'mithril';\nimport Link from '../common/models/Link';\nimport LinkItem from './components/LinkItem';\nimport LinkDropdown from './components/LinkDropdown';\n\nexport default function extendHeader() {\n  extend(HeaderPrimary.prototype, 'items', function (items: ItemList<Mithril.Children>) {\n    const allLinks = app.store.all<Link>('links');\n    const links = allLinks.filter((link) => !link.isChild());\n\n    const addLink = (parent: Link | null | undefined) => {\n      const hasChildren = allLinks.some((link) => link.parent() == parent);\n\n      // If the link has no URL and no children, do not display it.\n      if (!parent?.url() && !hasChildren) {\n        return;\n      }\n\n      items.add(`link${parent?.id()}`, hasChildren ? LinkDropdown.component({ link: parent }) : LinkItem.component({ link: parent }));\n    };\n\n    sortLinks(links).map(addLink);\n  });\n}\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/UserControls'];","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Switch'];","import Button from 'flarum/common/components/Button';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport User from 'flarum/common/models/User';\nimport app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\nimport Switch from 'flarum/common/components/Switch';\n\ninterface HandleSpammerModalAttrs extends IInternalModalAttrs {\n  user: User;\n}\n\nexport default class HandleSpammerModal extends Modal<HandleSpammerModalAttrs> {\n  user!: User;\n  hardDeleteUser!: boolean;\n  hardDeleteDiscussions!: boolean;\n  hardDeletePosts!: boolean;\n  moveDiscussionsToQuarantine!: boolean;\n  reportToSfs!: boolean;\n\n  oninit(vnode: Mithril.Vnode<HandleSpammerModalAttrs>) {\n    super.oninit(vnode);\n\n    this.user = this.attrs.user;\n\n    const defaultActions = app.forum.attribute('fof-anti-spam')['default-options'];\n    this.hardDeleteUser = defaultActions['deleteUser'];\n    this.hardDeleteDiscussions = defaultActions['deleteDiscussions'];\n    this.hardDeletePosts = defaultActions['deletePosts'];\n    this.moveDiscussionsToQuarantine = defaultActions['spamQuarantine'];\n    this.reportToSfs = defaultActions['reportToSfs'];\n  }\n\n  className() {\n    return 'HandleSpammerModal Modal--medium';\n  }\n\n  title() {\n    return app.translator.trans('fof-anti-spam.forum.spammer_modal.title', {\n      username: this.user.displayName(),\n    });\n  }\n\n  content() {\n    const tagsEnabled = app.initializers.has('flarum-tags');\n    const sfsEnabled = !!app.forum.attribute('fof-anti-spam')['stopforumspam']['enabled'];\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form\">\n          <p className=\"helpText\">{app.translator.trans('fof-anti-spam.forum.spammer_modal.intro')}</p>\n          <div className=\"Form-group\">\n            <Switch\n              state={this.hardDeleteDiscussions}\n              onchange={(value: boolean) => {\n                this.hardDeleteDiscussions = value;\n                m.redraw();\n              }}\n            >\n              {app.translator.trans('fof-anti-spam.forum.spammer_modal.hard_delete_discussions_label')}\n            </Switch>\n            <p className=\"helpText\">{app.translator.trans('fof-anti-spam.forum.spammer_modal.hard_delete_discussions_help')}</p>\n          </div>\n          <div className=\"Form-group\">\n            <Switch\n              state={this.hardDeletePosts}\n              onchange={(value: boolean) => {\n                this.hardDeletePosts = value;\n              }}\n            >\n              {app.translator.trans('fof-anti-spam.forum.spammer_modal.hard_delete_posts_label')}\n            </Switch>\n            <p className=\"helpText\">{app.translator.trans('fof-anti-spam.forum.spammer_modal.hard_delete_posts_help')}</p>\n          </div>\n          {tagsEnabled && !this.hardDeleteDiscussions && (\n            <div className=\"Form-group\">\n              <Switch\n                state={this.moveDiscussionsToQuarantine}\n                onchange={(value: boolean) => {\n                  this.moveDiscussionsToQuarantine = value;\n                }}\n              >\n                {app.translator.trans('fof-anti-spam.forum.spammer_modal.move_discussions_tag_label')}\n              </Switch>\n              <p className=\"helpText\">{app.translator.trans('fof-anti-spam.forum.spammer_modal.move_discussions_tag_help')}</p>\n            </div>\n          )}\n          <div className=\"Form-group\">\n            <Switch\n              state={this.hardDeleteUser}\n              onchange={(value: boolean) => {\n                this.hardDeleteUser = value;\n              }}\n            >\n              {app.translator.trans('fof-anti-spam.forum.spammer_modal.hard_delete_user_label')}\n            </Switch>\n            <p className=\"helpText\">{app.translator.trans('fof-anti-spam.forum.spammer_modal.hard_delete_user_help')}</p>\n          </div>\n          {sfsEnabled && (\n            <div className=\"Form-group\">\n              <Switch\n                state={this.reportToSfs}\n                onchange={(value: boolean) => {\n                  this.reportToSfs = value;\n                }}\n              >\n                {app.translator.trans('fof-anti-spam.forum.spammer_modal.report_to_sfs_label')}\n              </Switch>\n              <p className=\"helpText\">{app.translator.trans('fof-anti-spam.forum.spammer_modal.report_to_sfs_help')}</p>\n            </div>\n          )}\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary\" onclick={() => this.submitData()} loading={this.loading} disabled={this.loading}>\n              {app.translator.trans('fof-anti-spam.forum.spammer_modal.process_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  submitData() {\n    this.loading = true;\n\n    const body = {\n      options: {\n        deletePosts: this.hardDeletePosts,\n        deleteDiscussions: this.hardDeleteDiscussions,\n        deleteUser: this.hardDeleteUser,\n        moveDiscussionsToQuarantine: this.moveDiscussionsToQuarantine,\n        reportToSfs: this.reportToSfs,\n      },\n    };\n\n    app\n      .request({\n        method: 'POST',\n        url: `${app.forum.attribute('apiUrl')}/users/${this.user.id()}/spamblock`,\n        body: body,\n      })\n      .then(() => {\n        this.loading = false;\n        this.hide();\n      });\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Model from 'flarum/common/Model';\n\nexport default class BlockedRegistration extends Model {\n  ip() {\n    return Model.attribute<string>('ip').call(this);\n  }\n\n  email() {\n    return Model.attribute<string>('email').call(this);\n  }\n\n  username() {\n    return Model.attribute<string>('username').call(this);\n  }\n\n  sfsData() {\n    return Model.attribute<string>('sfsData').call(this);\n  }\n\n  provider() {\n    return Model.attribute<string | null>('provider').call(this);\n  }\n\n  providerData() {\n    return Model.attribute<string | null>('providerData').call(this);\n  }\n\n  attemptedAt() {\n    return Model.attribute('attemptedAt', Model.transformDate).call(this);\n  }\n}\n","import Extend from 'flarum/common/extenders';\nimport BlockedRegistration from './models/BlockedRegistration';\n\nexport default [\n  new Extend.Store() //\n    .add('blocked-registrations', BlockedRegistration),\n];\n","import Extend from 'flarum/common/extenders';\nimport User from 'flarum/common/models/User';\n\nimport { default as extend } from '../common/extend';\n\nexport default [\n  ...extend,\n\n  new Extend.Model(User) //\n    .attribute<boolean>('canSpamblock'),\n];\n","import app from 'flarum/forum/app';\nimport addSpamblockControls from './extenders/addSpamblockControls';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('fof/anti-spam', () => {\n  addSpamblockControls();\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Button from 'flarum/common/components/Button';\nimport UserControls from 'flarum/forum/utils/UserControls';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport User from 'flarum/common/models/User';\nimport type Mithril from 'mithril';\nimport HandleSpammerModal from '../components/HandleSpammerModal';\n\nexport default function addSpamblockControls() {\n  extend(UserControls, 'moderationControls', function (items: ItemList<Mithril.Children>, user: User) {\n    /** @ts-ignore */\n    user.canSpamblock() &&\n      items.add(\n        'spammer',\n        <Button\n          icon=\"fas fa-pastafarianism\"\n          onclick={() => {\n            app.modal.show(HandleSpammerModal, { user });\n          }}\n        >\n          {app.translator.trans('fof-anti-spam.forum.user_controls.spammer_button')}\n        </Button>\n      );\n  });\n}\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\n\nexport default class SubscriptionMenuItem extends Component {\n  view() {\n    return (\n      <button className=\"SubscriptionMenuItem hasIcon\" onclick={this.attrs.onclick}>\n        {this.attrs.active && icon('fas fa-check', { className: 'Button-icon' })}\n        <span className=\"SubscriptionMenuItem-label\">\n          {icon(this.attrs.icon, { className: 'Button-icon' })}\n          <strong>{this.attrs.label}</strong>\n          <span className=\"SubscriptionMenuItem-description\">{this.attrs.description}</span>\n        </span>\n      </button>\n    );\n  }\n}\n","import app from 'flarum/forum/app';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport extractText from 'flarum/common/utils/extractText';\nimport classList from 'flarum/common/utils/classList';\n\nimport SubscriptionMenuItem from './SubscriptionMenuItem';\n\nexport default class SubscriptionMenu extends Dropdown {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.options = [\n      {\n        subscription: null,\n        icon: 'far fa-star',\n        label: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_button'),\n        description: app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_text'),\n      },\n      {\n        subscription: 'follow',\n        icon: 'fas fa-star',\n        label: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button'),\n        description: app.translator.trans('flarum-subscriptions.forum.sub_controls.following_text'),\n      },\n      {\n        subscription: 'ignore',\n        icon: 'far fa-eye-slash',\n        label: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button'),\n        description: app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_text'),\n      },\n    ];\n  }\n\n  view() {\n    const discussion = this.attrs.discussion;\n    const subscription = discussion.subscription();\n\n    let buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.follow_button');\n    let buttonIcon = 'far fa-star';\n    const buttonClass = 'SubscriptionMenu-button--' + subscription;\n\n    switch (subscription) {\n      case 'follow':\n        buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button');\n        buttonIcon = 'fas fa-star';\n        break;\n\n      case 'ignore':\n        buttonLabel = app.translator.trans('flarum-subscriptions.forum.sub_controls.ignoring_button');\n        buttonIcon = 'far fa-eye-slash';\n        break;\n\n      default:\n      // no default\n    }\n\n    const preferences = app.session.user.preferences();\n    const notifyEmail = preferences['notify_newPost_email'];\n    const notifyAlert = preferences['notify_newPost_alert'];\n    const tooltipText = extractText(\n      app.translator.trans(\n        notifyEmail ? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip' : 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip'\n      )\n    );\n\n    const shouldShowTooltip = (notifyEmail || notifyAlert) && subscription === null;\n\n    const button = (\n      <Button\n        className={classList('Button', 'SubscriptionMenu-button', buttonClass)}\n        icon={buttonIcon}\n        onclick={this.saveSubscription.bind(this, discussion, ['follow', 'ignore'].indexOf(subscription) !== -1 ? null : 'follow')}\n      >\n        {buttonLabel}\n      </Button>\n    );\n\n    return (\n      <div className=\"Dropdown ButtonGroup SubscriptionMenu\">\n        {shouldShowTooltip ? (\n          <Tooltip text={tooltipText} position=\"bottom\">\n            {button}\n          </Tooltip>\n        ) : (\n          button\n        )}\n\n        <button className={classList('Dropdown-toggle Button Button--icon', buttonClass)} data-toggle=\"dropdown\">\n          {icon('fas fa-caret-down', { className: 'Button-icon' })}\n        </button>\n\n        <ul className=\"Dropdown-menu dropdown-menu Dropdown-menu--right\">\n          {this.options.map((attrs) => (\n            <li>\n              <SubscriptionMenuItem\n                {...attrs}\n                onclick={this.saveSubscription.bind(this, discussion, attrs.subscription)}\n                active={subscription === attrs.subscription}\n              />\n            </li>\n          ))}\n        </ul>\n      </div>\n    );\n  }\n\n  saveSubscription(discussion, subscription) {\n    discussion.save({ subscription });\n\n    this.$('.SubscriptionMenu-button').tooltip('hide');\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/GlobalSearchState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/SettingsPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Switch'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class NewPostNotification extends Notification {\n  icon() {\n    return 'fas fa-star';\n  }\n\n  href() {\n    const notification = this.attrs.notification;\n    const discussion = notification.subject();\n    const content = notification.content() || {};\n\n    return app.route.discussion(discussion, content.postNumber);\n  }\n\n  content() {\n    return app.translator.trans('flarum-subscriptions.forum.notifications.new_post_text', { user: this.attrs.notification.fromUser() });\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","import Extend from 'flarum/common/extenders';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Discussion from 'flarum/common/models/Discussion';\n\nexport default [\n  new Extend.Routes() //\n    .add('following', '/following', IndexPage),\n\n  new Extend.Model(Discussion) //\n    .attribute('subscription'),\n];\n","import NewPostNotification from './components/NewPostNotification';\nimport SubscriptionMenu from './components/SubscriptionMenu';\nimport SubscriptionMenuItem from './components/SubscriptionMenuItem';\n\nexport default {\n  'subscriptions/components/NewPostNotification': NewPostNotification,\n  'subscriptions/components/SubscriptionMenu': SubscriptionMenu,\n  'subscriptions/components/SubscriptionMenuItem': SubscriptionMenuItem,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Model from 'flarum/common/Model';\nimport Discussion from 'flarum/common/models/Discussion';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport addSubscriptionBadge from './addSubscriptionBadge';\nimport addSubscriptionControls from './addSubscriptionControls';\nimport addSubscriptionFilter from './addSubscriptionFilter';\nimport addSubscriptionSettings from './addSubscriptionSettings';\n\nimport NewPostNotification from './components/NewPostNotification';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('subscriptions', function () {\n  app.notificationComponents.newPost = NewPostNotification;\n\n  addSubscriptionBadge();\n  addSubscriptionControls();\n  addSubscriptionFilter();\n  addSubscriptionSettings();\n\n  extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n    items.add('newPost', {\n      name: 'newPost',\n      icon: 'fas fa-star',\n      label: app.translator.trans('flarum-subscriptions.forum.settings.notify_new_post_label'),\n    });\n  });\n});\n\n// Expose compat API\nimport subscriptionsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, subscriptionsCompat);\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default function addSubscriptionBadge() {\n  extend(Discussion.prototype, 'badges', function (badges) {\n    let badge;\n\n    switch (this.subscription()) {\n      case 'follow':\n        badge = <Badge label={app.translator.trans('flarum-subscriptions.forum.badge.following_tooltip')} icon=\"fas fa-star\" type=\"following\" />;\n        break;\n\n      case 'ignore':\n        badge = <Badge label={app.translator.trans('flarum-subscriptions.forum.badge.ignoring_tooltip')} icon=\"far fa-eye-slash\" type=\"ignoring\" />;\n        break;\n    }\n\n    if (badge) {\n      badges.add('subscription', badge);\n    }\n  });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Button from 'flarum/common/components/Button';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\n\nimport SubscriptionMenu from './components/SubscriptionMenu';\n\nexport default function addSubscriptionControls() {\n  extend(DiscussionControls, 'userControls', function (items, discussion, context) {\n    if (app.session.user && !(context instanceof DiscussionPage)) {\n      const states = {\n        none: { label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.follow_button'), icon: 'fas fa-star', save: 'follow' },\n        follow: { label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unfollow_button'), icon: 'far fa-star', save: null },\n        ignore: { label: app.translator.trans('flarum-subscriptions.forum.discussion_controls.unignore_button'), icon: 'fas fa-eye', save: null },\n      };\n\n      const subscription = discussion.subscription() || 'none';\n\n      items.add(\n        'subscription',\n        <Button icon={states[subscription].icon} onclick={discussion.save.bind(discussion, { subscription: states[subscription].save })}>\n          {states[subscription].label}\n        </Button>\n      );\n    }\n  });\n\n  extend(DiscussionPage.prototype, 'sidebarItems', function (items) {\n    if (app.session.user) {\n      const discussion = this.discussion;\n\n      items.add('subscription', <SubscriptionMenu discussion={discussion} />, 80);\n    }\n  });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\n\nexport default function addSubscriptionFilter() {\n  extend(IndexPage.prototype, 'navItems', function (items) {\n    if (app.session.user) {\n      const params = app.search.stickyParams();\n\n      items.add(\n        'following',\n        <LinkButton href={app.route('following', params)} icon=\"fas fa-star\">\n          {app.translator.trans('flarum-subscriptions.forum.index.following_link')}\n        </LinkButton>,\n        50\n      );\n    }\n  });\n\n  extend(IndexPage.prototype, 'setTitle', function () {\n    if (app.current.get('routeName') === 'following') {\n      app.setTitle(app.translator.trans('flarum-subscriptions.forum.following.meta_title_text'));\n    }\n  });\n\n  extend(GlobalSearchState.prototype, 'params', function (params) {\n    // We can't set `q` here directly, as that would make the search bar\n    // think that text has been entered, and display the \"clear\" button.\n    params.onFollowing = app.current.get('routeName') === 'following';\n  });\n\n  extend(DiscussionListState.prototype, 'requestParams', function (params) {\n    if (this.params.onFollowing) {\n      params.filter ||= {};\n\n      if (params.filter.q) {\n        params.filter.q += ' is:following';\n      } else {\n        params.filter.subscription = 'following';\n      }\n    }\n  });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport SettingsPage from 'flarum/forum/components/SettingsPage';\nimport Switch from 'flarum/common/components/Switch';\n\nexport default function () {\n  extend(SettingsPage.prototype, 'notificationsItems', function (this: SettingsPage, items) {\n    items.add(\n      'followAfterReply',\n      <Switch\n        state={this.user.preferences().followAfterReply}\n        onchange={(value) => {\n          this.followAfterReplyLoading = true;\n\n          this.user.savePreferences({ followAfterReply: value }).then(() => {\n            this.followAfterReplyLoading = false;\n            m.redraw();\n          });\n        }}\n        loading={this.followAfterReplyLoading}\n      >\n        {app.translator.trans('flarum-subscriptions.forum.settings.follow_after_reply_label')}\n      </Switch>\n    );\n\n    items.add(\n      'notifyForAllPosts',\n      <Switch\n        id=\"flarum_subscriptions__notify_for_all_posts\"\n        state={!!this.user!.preferences()?.['flarum-subscriptions.notify_for_all_posts']}\n        onchange={(val: boolean) => {\n          this.user!.savePreferences({ 'flarum-subscriptions.notify_for_all_posts': val });\n        }}\n      >\n        {app.translator.trans('flarum-subscriptions.forum.settings.notify_for_all_posts_label')}\n      </Switch>\n    );\n  });\n}\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import EventPost from 'flarum/forum/components/EventPost';\n\nexport default class DiscussionStickiedPost extends EventPost {\n  icon() {\n    return 'fas fa-thumbtack';\n  }\n\n  descriptionKey() {\n    return this.attrs.post.content().sticky\n      ? 'flarum-sticky.forum.post_stream.discussion_stickied_text'\n      : 'flarum-sticky.forum.post_stream.discussion_unstickied_text';\n  }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionStickiedPost from './components/DiscussionStickiedPost';\n\nexport default [\n  new Extend.PostTypes() //\n    .add('discussionStickied', DiscussionStickiedPost),\n\n  new Extend.Model(Discussion) //\n    .attribute<boolean>('isSticky')\n    .attribute<boolean>('canSticky'),\n];\n","import DiscussionStickiedPost from './components/DiscussionStickiedPost';\n\nexport default {\n  'sticky/components/DiscussionStickiedPost': DiscussionStickiedPost,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import app from 'flarum/forum/app';\n\nimport addStickyBadge from './addStickyBadge';\nimport addStickyControl from './addStickyControl';\nimport addStickyExcerpt from './addStickyExcerpt';\nimport addStickyClass from './addStickyClass';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-sticky', () => {\n  addStickyBadge();\n  addStickyControl();\n  addStickyExcerpt();\n  addStickyClass();\n});\n\n// Expose compat API\nimport stickyCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, stickyCompat);\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default function addStickyBadge() {\n  extend(Discussion.prototype, 'badges', function (badges) {\n    if (this.isSticky()) {\n      badges.add(\n        'sticky',\n        <Badge type=\"sticky\" label={app.translator.trans('flarum-sticky.forum.badge.sticky_tooltip')} icon=\"fas fa-thumbtack\" />,\n        10\n      );\n    }\n  });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\n\nexport default function addStickyControl() {\n  extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n    if (discussion.canSticky()) {\n      items.add(\n        'sticky',\n        <Button icon=\"fas fa-thumbtack\" onclick={this.stickyAction.bind(discussion)}>\n          {app.translator.trans(`flarum-sticky.forum.discussion_controls.${discussion.isSticky() ? 'unsticky' : 'sticky'}_button`)}\n        </Button>\n      );\n    }\n  });\n\n  DiscussionControls.stickyAction = function () {\n    this.save({ isSticky: !this.isSticky() }).then(() => {\n      if (app.current.matches(DiscussionPage)) {\n        app.current.get('stream').update();\n      }\n\n      m.redraw();\n    });\n  };\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport { truncate } from 'flarum/common/utils/string';\n\nexport default function addStickyControl() {\n  extend(DiscussionListState.prototype, 'requestParams', function (params) {\n    if (app.current.matches(IndexPage) || app.current.matches(DiscussionPage)) {\n      params.include.push('firstPost');\n    }\n  });\n\n  extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n    const discussion = this.attrs.discussion;\n\n    if (discussion.isSticky() && !this.attrs.params.q && !discussion.lastReadPostNumber()) {\n      const firstPost = discussion.firstPost();\n\n      if (firstPost) {\n        const excerpt = truncate(firstPost.contentPlain(), 175);\n\n        // Wrapping in <div> because ItemList entries need to be vnodes\n        items.add('excerpt', <div>{excerpt}</div>, -100);\n      }\n    }\n  });\n}\n","import { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\n\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\n\nexport default function addStickyClass() {\n  extend(DiscussionListItem.prototype, 'elementAttrs', function (attrs) {\n    if (this.attrs.discussion.isSticky()) {\n      attrs.className = classList(attrs.className, 'DiscussionListItem--sticky');\n    }\n  });\n}\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/BasicEditorDriver'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/styleSelectedText'];","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\n\nexport default class MarkdownToolbar extends Component {\n  view(vnode) {\n    return <div className=\"MarkdownToolbar\">{vnode.children}</div>;\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\nexport default class MarkdownButton extends Component {\n  oncreate(vnode) {\n    super.oncreate(vnode);\n  }\n\n  view() {\n    const button = (\n      <button\n        className=\"Button Button--icon Button--link\"\n        type=\"button\"\n        data-hotkey={this.attrs.hotkey}\n        onkeydown={this.keydown.bind(this)}\n        onclick={this.attrs.onclick}\n      >\n        {icon(this.attrs.icon)}\n      </button>\n    );\n\n    if (this.attrs.title) {\n      return <Tooltip text={this.attrs.title}>{button}</Tooltip>;\n    }\n\n    return button;\n  }\n\n  keydown(event) {\n    if (event.key === ' ' || event.key === 'Enter') {\n      event.preventDefault();\n      this.element.click();\n    }\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","/*!\n * Includes modified code from GitHub Markdown Toolbar Element\n * https://github.com/github/markdown-toolbar-element/\n *\n * Original Copyright GitHub, Inc.\n * Released under the MIT license\n * https://github.com/github/markdown-toolbar-element/blob/master/LICENSE\n */\n\nimport app from 'flarum/common/app';\nimport { extend, override } from 'flarum/common/extend';\nimport TextEditor from 'flarum/common/components/TextEditor';\nimport BasicEditorDriver from 'flarum/common/utils/BasicEditorDriver';\nimport styleSelectedText from 'flarum/common/utils/styleSelectedText';\n\nimport MarkdownToolbar from './components/MarkdownToolbar';\nimport MarkdownButton from './components/MarkdownButton';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nconst modifierKey = navigator.userAgent.match(/Macintosh/) ? '\u2318' : 'ctrl';\n\nconst styles = {\n  header: { prefix: '### ' },\n  bold: { prefix: '**', suffix: '**', trimFirst: true },\n  italic: { prefix: '_', suffix: '_', trimFirst: true },\n  strikethrough: { prefix: '~~', suffix: '~~', trimFirst: true },\n  quote: { prefix: '> ', multiline: true, surroundWithNewlines: true },\n  code: { prefix: '`', suffix: '`', blockPrefix: '```', blockSuffix: '```' },\n  link: { prefix: '[', suffix: '](https://)', replaceNext: 'https://', scanFor: 'https?://' },\n  image: { prefix: '![', suffix: '](https://)', replaceNext: 'https://', scanFor: 'https?://' },\n  unordered_list: { prefix: '- ', multiline: true, surroundWithNewlines: true },\n  ordered_list: { prefix: '1. ', multiline: true, orderedList: true },\n  spoiler: { prefix: '>!', suffix: '!<', blockPrefix: '>! ', multiline: true, trimFirst: true },\n};\n\nconst applyStyle = (id, editorDriver) => {\n  // This is a nasty hack that breaks encapsulation of the editor.\n  // In future releases, we'll need to tweak the editor driver interface\n  // to support triggering events like this.\n  styleSelectedText(editorDriver.el, styles[id]);\n};\n\nfunction makeShortcut(id, key, editorDriver) {\n  return function (e) {\n    if (e.key === key && ((e.metaKey && modifierKey === '\u2318') || (e.ctrlKey && modifierKey === 'ctrl'))) {\n      e.preventDefault();\n      applyStyle(id, editorDriver);\n    }\n  };\n}\n\nfunction markdownToolbarItems(oldFunc) {\n  const items = typeof oldFunc === 'function' ? oldFunc() : new ItemList();\n\n  function tooltip(name, hotkey) {\n    return app.translator.trans(`flarum-markdown.lib.composer.${name}_tooltip`) + (hotkey ? ` <${modifierKey}-${hotkey}>` : '');\n  }\n\n  const makeApplyStyle = (id) => {\n    return () => applyStyle(id, this.attrs.composer.editor);\n  };\n\n  items.add('header', <MarkdownButton title={tooltip('header')} icon=\"fas fa-heading\" onclick={makeApplyStyle('header')} />, 1000);\n  items.add('bold', <MarkdownButton title={tooltip('bold', 'b')} icon=\"fas fa-bold\" onclick={makeApplyStyle('bold')} />, 900);\n  items.add('italic', <MarkdownButton title={tooltip('italic', 'i')} icon=\"fas fa-italic\" onclick={makeApplyStyle('italic')} />, 800);\n  items.add(\n    'strikethrough',\n    <MarkdownButton title={tooltip('strikethrough')} icon=\"fas fa-strikethrough\" onclick={makeApplyStyle('strikethrough')} />,\n    700\n  );\n  items.add('quote', <MarkdownButton title={tooltip('quote')} icon=\"fas fa-quote-left\" onclick={makeApplyStyle('quote')} />, 600);\n  items.add('spoiler', <MarkdownButton title={tooltip('spoiler')} icon=\"fas fa-exclamation-triangle\" onclick={makeApplyStyle('spoiler')} />, 500);\n  items.add('code', <MarkdownButton title={tooltip('code')} icon=\"fas fa-code\" onclick={makeApplyStyle('code')} />, 400);\n  items.add('link', <MarkdownButton title={tooltip('link')} icon=\"fas fa-link\" onclick={makeApplyStyle('link')} />, 300);\n  items.add('image', <MarkdownButton title={tooltip('image')} icon=\"fas fa-image\" onclick={makeApplyStyle('image')} />, 200);\n  items.add(\n    'unordered_list',\n    <MarkdownButton title={tooltip('unordered_list')} icon=\"fas fa-list-ul\" onclick={makeApplyStyle('unordered_list')} />,\n    100\n  );\n  items.add('ordered_list', <MarkdownButton title={tooltip('ordered_list')} icon=\"fas fa-list-ol\" onclick={makeApplyStyle('ordered_list')} />, 0);\n\n  return items;\n}\n\nexport function initialize(app) {\n  extend(BasicEditorDriver.prototype, 'keyHandlers', function (items) {\n    items.add('bold', makeShortcut('bold', 'b', this));\n    items.add('italic', makeShortcut('italic', 'i', this));\n  });\n\n  if (TextEditor.prototype.markdownToolbarItems) {\n    override(TextEditor.prototype, 'markdownToolbarItems', markdownToolbarItems);\n  } else {\n    TextEditor.prototype.markdownToolbarItems = markdownToolbarItems;\n  }\n\n  extend(TextEditor.prototype, 'toolbarItems', function (items) {\n    items.add(\n      'markdown',\n      <MarkdownToolbar for={this.textareaId} setShortcutHandler={(handler) => (shortcutHandler = handler)}>\n        {this.markdownToolbarItems().toArray()}\n      </MarkdownToolbar>,\n      100\n    );\n  });\n}\n","export default function _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}","import MarkdownButton from './components/MarkdownButton';\nimport MarkdownToolbar from './components/MarkdownToolbar';\n\nexport default {\n  'markdown/components/MarkdownButton': MarkdownButton,\n  'markdown/components/MarkdownToolbar': MarkdownToolbar,\n};\n","import commonCompat from '../common/compat';\n\nexport default {\n  ...commonCompat,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import app from 'flarum/forum/app';\nimport { initialize } from '../common/index';\n\napp.initializers.add('flarum-markdown', initialize);\n\n// Expose compat API\nimport markdownCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, markdownCompat);\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class DiscussionLockedNotification extends Notification {\n  icon() {\n    return 'fas fa-lock';\n  }\n\n  href() {\n    const notification = this.attrs.notification;\n\n    return app.route.discussion(notification.subject(), notification.content().postNumber);\n  }\n\n  content() {\n    return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', { user: this.attrs.notification.fromUser() });\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import EventPost from 'flarum/forum/components/EventPost';\n\nexport default class DiscussionLockedPost extends EventPost {\n  icon() {\n    return this.attrs.post.content().locked ? 'fas fa-lock' : 'fas fa-unlock';\n  }\n\n  descriptionKey() {\n    return this.attrs.post.content().locked\n      ? 'flarum-lock.forum.post_stream.discussion_locked_text'\n      : 'flarum-lock.forum.post_stream.discussion_unlocked_text';\n  }\n}\n","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\n\nexport default [\n  new Extend.PostTypes() //\n    .add('discussionLocked', DiscussionLockedPost),\n\n  new Extend.Model(Discussion) //\n    .attribute<boolean>('isLocked')\n    .attribute<boolean>('canLock'),\n];\n","import DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\n\nexport default {\n  'lock/components/DiscussionLockedNotification': DiscussionLockedNotification,\n  'lock/components/DiscussionLockedPost': DiscussionLockedPost,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport addLockBadge from './addLockBadge';\nimport addLockControl from './addLockControl';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-lock', () => {\n  app.notificationComponents.discussionLocked = DiscussionLockedNotification;\n\n  addLockBadge();\n  addLockControl();\n\n  extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n    items.add('discussionLocked', {\n      name: 'discussionLocked',\n      icon: 'fas fa-lock',\n      label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label'),\n    });\n  });\n});\n\n// Expose compat API\nimport lockCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, lockCompat);\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default function addLockBadge() {\n  extend(Discussion.prototype, 'badges', function (badges) {\n    if (this.isLocked()) {\n      badges.add('locked', <Badge type=\"locked\" label={app.translator.trans('flarum-lock.forum.badge.locked_tooltip')} icon=\"fas fa-lock\" />);\n    }\n  });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\n\nexport default function addLockControl() {\n  extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n    if (discussion.canLock()) {\n      items.add(\n        'lock',\n        <Button icon=\"fas fa-lock\" onclick={this.lockAction.bind(discussion)}>\n          {app.translator.trans(`flarum-lock.forum.discussion_controls.${discussion.isLocked() ? 'unlock' : 'lock'}_button`)}\n        </Button>\n      );\n    }\n  });\n\n  DiscussionControls.lockAction = function () {\n    this.save({ isLocked: !this.isLocked() }).then(() => {\n      if (app.current.matches(DiscussionPage)) {\n        app.current.get('stream').update();\n      }\n\n      m.redraw();\n    });\n  };\n}\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Post'];","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport type Post from 'flarum/common/models/Post';\nimport type ItemList from 'flarum/common/utils/ItemList';\n\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport PostComponent from 'flarum/forum/components/Post';\nimport type Mithril from 'mithril';\n\napp.initializers.add('flarum-akismet', () => {\n  extend(PostControls, 'destructiveControls', function (items: ItemList<Mithril.Children>, post: Post) {\n    if (items.has('approve')) {\n      const flags = post.flags();\n\n      if (flags && flags.some((flag) => flag?.type() === 'akismet')) {\n        const approveItem = items.get('approve');\n        if (approveItem && typeof approveItem === 'object' && 'children' in approveItem) {\n          approveItem.children = app.translator.trans('flarum-akismet.forum.post.not_spam_button');\n        }\n      }\n    }\n  });\n\n  override(PostComponent.prototype, 'flagReason', function (original, flag) {\n    if (flag.type() === 'akismet') {\n      return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');\n    }\n\n    return original(flag);\n  });\n});\n"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 14);\n","module.exports = flarum.core.compat['forum/app'];","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['common/components/Badge'];","module.exports = flarum.core.compat['forum/components/CommentPost'];","module.exports = flarum.core.compat['common/models/Discussion'];","module.exports = flarum.core.compat['common/models/User'];","module.exports = flarum.core.compat['forum/utils/DiscussionControls'];","module.exports = flarum.core.compat['forum/utils/PostControls'];","module.exports = flarum.core.compat['forum/utils/UserControls'];","module.exports = flarum.core.compat['forum/components/DiscussionListItem'];","module.exports = flarum.core.compat['common/components/Modal'];","module.exports = flarum.core.compat['common/utils/withAttr'];","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}","import {Vnode} from 'mithril';\nimport app from 'flarum/forum/app';\nimport {ComponentAttrs} from 'flarum/common/Component';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport User from 'flarum/common/models/User';\nimport withAttr from 'flarum/common/utils/withAttr';\n\ninterface BanUserModalAttrs extends ComponentAttrs {\n    user: User\n}\n\n// @ts-ignore Modal.view incorrectly type-hinted in Flarum\nexport default class BanUserModal extends Modal {\n    until: string | null = null\n    attrs!: BanUserModalAttrs;\n\n    oninit(vnode: Vnode<BanUserModalAttrs, this>) {\n        super.oninit(vnode);\n\n        let until = this.attrs.user.attribute('shadowBannedUntil');\n\n        // In case the database column ends up as 0000-00-00 00:00:00, the Carbon output will have a minus sign in front\n        // We need to ignore this value because DayJS can't handle it\n        if (typeof until === 'string' && until && until[0] === '-') {\n            until = null;\n        }\n\n        if (until) {\n            // If date is in the past behave the same way as if the user wasn't shadow banned\n            if (new Date() > new Date(until)) until = null;\n        }\n\n        if (until) {\n            // @ts-ignore dayjs type-hints not available\n            this.until = dayjs(until).toISOString().substring(0, 16); // Remove timezone and seconds for compatibility with datetime-local\n        }\n    }\n\n    className() {\n        return 'ShadowBanUserModal Modal--small';\n    }\n\n    title() {\n        return app.translator.trans('clarkwinkelmann-shadow-ban.forum.banUser.title', {user: this.attrs.user});\n    }\n\n    content() {\n        let until = this.attrs.user.attribute('shadowBannedUntil');\n\n        if (new Date() > until) until = null;\n\n        return m('.Modal-body', m('.Form', [\n            m('.Form-group', [\n                m('label', app.translator.trans('clarkwinkelmann-shadow-ban.forum.banUser.until')),\n                m('input.FormControl', {\n                    type: 'datetime-local',\n                    value: this.until || '',\n                    onchange: withAttr('value', (value: string) => {\n                        this.until = value || null;\n                    }),\n                }),\n            ]),\n            m('.Form-group', [\n                m('label', app.translator.trans('clarkwinkelmann-shadow-ban.forum.banUser.quick')),\n                Button.component({\n                    className: 'Button' + (this.until ? '' : ' active'),\n                    onclick: () => {\n                        this.until = null;\n                    },\n                }, app.translator.trans('clarkwinkelmann-shadow-ban.forum.banUser.quickChoiceReset')),\n                [1, 2, 7, 30].map(days => {\n                    let active: boolean = false;\n\n                    if (this.until) {\n                        // @ts-ignore\n                        const untilDayjs = dayjs(this.until);\n                        // @ts-ignore\n                        const from = dayjs().add(days, 'days').subtract(12, 'hours');\n                        // @ts-ignore\n                        const to = dayjs().add(days, 'days').add(12, 'hours');\n\n                        active = untilDayjs.isAfter(from) && untilDayjs.isBefore(to);\n                    }\n\n                    return Button.component({\n                        className: 'Button' + (active ? ' active' : ''),\n                        onclick: () => {\n                            // @ts-ignore dayjs type-hints not available\n                            this.until = dayjs().add(days, 'days').toISOString().substring(0, 16);\n                        },\n                    }, app.translator.trans('clarkwinkelmann-shadow-ban.forum.banUser.quickChoiceDays', {\n                        count: days,\n                    }));\n                }),\n            ]),\n            m('.Form-group', Button.component({\n                className: 'Button Button--primary',\n                loading: this.loading,\n                type: 'submit',\n            }, app.translator.trans('clarkwinkelmann-shadow-ban.forum.banUser.submit'))),\n        ]));\n    }\n\n    // @ts-ignore Modal.onsubmit incorrectly type-hinted in Flarum\n    onsubmit(event: Event) {\n        event.preventDefault();\n\n        this.loading = true;\n\n        this.attrs.user.save({\n            shadowBannedUntil: this.until,\n        }).then(\n            () => this.hide(),\n            this.loaded.bind(this)\n        );\n    }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","import {extend} from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport Badge from 'flarum/common/components/Badge';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Post from 'flarum/common/models/Post';\nimport User from 'flarum/common/models/User';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport UserControls from 'flarum/forum/utils/UserControls';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport BanUserModal from './components/BanUserModal';\n\napp.initializers.add('clarkwinkelmann-shadow-ban', () => {\n    extend(DiscussionControls, 'moderationControls', function (items: ItemList, discussion: Discussion) {\n        if (!discussion.attribute('canShadowHide')) {\n            return;\n        }\n\n        const hidden = discussion.attribute('isShadowHidden');\n\n        items.add('shadow-hide', Button.component({\n            icon: 'fas fa-volume-mute',\n            onclick() {\n                discussion.save({\n                    isShadowHidden: !hidden,\n                }).then(() => {\n                    m.redraw();\n                });\n            },\n        }, app.translator.trans('clarkwinkelmann-shadow-ban.forum.discussionControl.' + (hidden ? 'restore' : 'hide'))));\n    });\n\n    extend(PostControls, 'moderationControls', function (items: ItemList, post: Post) {\n        if (!post.attribute('canShadowHide')) {\n            return;\n        }\n\n        const hidden = post.attribute('isShadowHidden');\n\n        items.add('shadow-hide', Button.component({\n            icon: 'fas fa-volume-mute',\n            onclick() {\n                post.save({\n                    isShadowHidden: !hidden,\n                }).then(() => {\n                    m.redraw();\n                });\n            },\n        }, app.translator.trans('clarkwinkelmann-shadow-ban.forum.postControl.' + (hidden ? 'restore' : 'hide'))));\n    });\n\n    extend(UserControls, 'moderationControls', function (items: ItemList, user: User) {\n        if (!user.attribute('canShadowBan')) {\n            return;\n        }\n\n        items.add('shadow-ban', Button.component({\n            icon: 'fas fa-volume-mute',\n            onclick() {\n                app.modal.show(BanUserModal, {\n                    user,\n                });\n            },\n        }, app.translator.trans('clarkwinkelmann-shadow-ban.forum.userControl.ban')));\n    });\n\n    extend(User.prototype, 'badges', function (this: User, items: ItemList) {\n        const until = this.attribute('shadowBannedUntil');\n\n        if (until && new Date() < new Date(until)) {\n            items.add('shadow-banned', Badge.component({\n                icon: 'fas fa-volume-mute',\n                type: 'shadow-banned',\n                label: app.translator.trans('clarkwinkelmann-shadow-ban.forum.badge.user'),\n            }));\n        }\n    });\n\n    extend(Discussion.prototype, 'badges', function (this: Discussion, items: ItemList) {\n        if (this.attribute('isShadowHidden')) {\n            items.add('shadow-banned', Badge.component({\n                icon: 'fas fa-volume-mute',\n                type: 'shadow-banned',\n                label: app.translator.trans('clarkwinkelmann-shadow-ban.forum.badge.discussion'),\n            }));\n        }\n    });\n\n    extend(CommentPost.prototype, 'elementAttrs', function (this: CommentPost, attrs: any) {\n        // @ts-ignore missing type-hint in Flarum\n        const {post} = this.attrs;\n\n        if (post.attribute('isShadowHidden')) {\n            attrs.className = (attrs.className || '') + ' Post--hidden Post--shadow-hidden';\n        }\n    });\n\n    extend(CommentPost.prototype, 'headerItems', function (this: CommentPost, items: ItemList) {\n        // @ts-ignore missing type-hint in Flarum\n        const {post} = this.attrs;\n\n        // Add same button as hidden toggle\n        if (post.attribute('isShadowHidden')) {\n            items.add('shadow-hidden', m('span.ShadowHiddenPostBadge', app.translator.trans('clarkwinkelmann-shadow-ban.forum.badge.post')));\n\n            if (!items.has('toggle')) {\n                items.add(\n                    'toggle',\n                    Button.component({\n                        className: 'Button Button--default Button--more',\n                        icon: 'fas fa-ellipsis-h',\n                        onclick: this.toggleContent.bind(this),\n                    })\n                );\n            }\n        }\n    });\n\n    extend(DiscussionListItem.prototype, 'elementAttrs', function (this: DiscussionListItem, attrs: any) {\n        // @ts-ignore missing type-hint in Flarum\n        const {discussion} = this.attrs;\n\n        if (discussion.attribute('isShadowHidden')) {\n            attrs.className = (attrs.className || '') + ' DiscussionListItem--hidden DiscussionListItem--shadow-hidden';\n        }\n    });\n});\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Composer'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionComposer'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/ComposerState'];","export default function _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","import app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport listItems from 'flarum/common/helpers/listItems';\nimport extractText from 'flarum/common/utils/extractText';\nimport Stream from 'flarum/common/utils/Stream';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Tag from 'flarum/tags/common/models/Tag';\n\n// Copied from flarum-tags addTagFilter()\nconst findTag = (slug: string) => app.store.all<Tag>('tags').find((tag) => tag.slug().localeCompare(slug, undefined, {sensitivity: 'base'}) === 0);\n\nfunction isPrivateDiscussion(): boolean {\n    const PrivateDiscussionComposer = (flarum.extensions['fof-byobu'] as any)?.discussions?.PrivateDiscussionComposer;\n\n    return PrivateDiscussionComposer && app.composer.bodyMatches(PrivateDiscussionComposer);\n}\n\nexport default class ComposerPage extends Page {\n    loading: boolean = false\n    handlers: any = {}\n\n    currentTag(): Promise<Tag | null | undefined> {\n        return new Promise(resolve => {\n            const {slug} = m.route.param();\n\n            if (!slug) {\n                return resolve(null);\n            }\n\n            const tag = findTag(slug);\n\n            if (tag) {\n                return resolve(tag);\n            }\n\n            this.loading = true;\n\n            // Same code as in flarum-tags IndexPage.prototype.currentTag\n            // Maybe the number of relationships is overkill for our use case here\n            app.store\n                .find('tags', slug, {include: 'children,children.parent,parent,state'})\n                .then(() => {\n                    this.loading = false;\n                    resolve(findTag(slug));\n                });\n        });\n    }\n\n    oninit(vnode: any) {\n        super.oninit(vnode);\n\n        app.setTitle(extractText(app.translator.trans('clarkwinkelmann-composer-page.forum.page' + (isPrivateDiscussion() ? '-private' : '') + '.title')));\n        app.setTitleCount(0);\n\n        // Invoke the preloaded payload to get access to the current tag(s)\n        app.preloadedApiDocument();\n\n        const {user} = app.session;\n\n        if (!user) {\n            this.loading = true;\n\n            // If user is logged out, redirect to index page\n            m.route.set(app.route('index'));\n\n            return;\n        }\n\n        if (!app.composer.bodyMatches(DiscussionComposer)) {\n            app.composer.load(DiscussionComposer, {\n                user,\n            });\n            // Will not actually show the real composer, but that's where our logic to set the default when leaving the standalone page resides\n            // so we need to call it at some point to prepare the composer\n            app.composer.show();\n\n            const fields = app.composer.fields as any;\n\n            if (fields) {\n                const {title, content} = m.route.param();\n\n                if (title) {\n                    // Most likely, the title field won't exist yet at this point\n                    // but we'll handle both options just to be sure\n                    if (fields.title) {\n                        fields.title(title);\n                    } else {\n                        fields.title = Stream(title);\n                    }\n                }\n\n                if (content && fields.content) {\n                    fields.content(content);\n                }\n\n                const currentRouteName = (app.current.data as any).routeName;\n\n                if (currentRouteName === 'composeTag') {\n                    this.currentTag().then(tag => {\n\n                        if (tag) {\n                            const parent = tag.parent();\n                            fields.tags = parent ? [parent, tag] : [tag];\n                        } else {\n                            fields.tags = [];\n                        }\n\n                        m.redraw();\n\n                        this.updateHeight();\n                    });\n                }\n            }\n        }\n    }\n\n    view() {\n        const isPrivate = isPrivateDiscussion();\n\n        return m('.ComposerPageContainer', {\n            className: isPrivate ? 'ComposerPageContainer--private-discussion' : '',\n        }, m('.container', m('.sideNavContainer', [\n            m('nav.IndexPage-nav.sideNav', m('ul', listItems(IndexPage.prototype.sidebarItems().toArray()))),\n            m('.sideNavOffset', m('.ComposerPage', [\n                m('h2.App-titleControl', app.translator.trans('clarkwinkelmann-composer-page.forum.page' + (isPrivate ? '-private' : '') + '.heading')),\n                this.body(),\n            ])),\n        ])));\n    }\n\n    body() {\n        const body = app.composer.body as any;\n\n        if (!body.componentClass || this.loading) {\n            return LoadingIndicator.component();\n        }\n\n        return body.componentClass.component({\n            ...body.attrs,\n            composer: app.composer,\n            disabled: false,\n        });\n    }\n\n    oncreate(vnode: any) {\n        super.oncreate(vnode);\n\n        $(window).on('resize', (this.handlers.onresize = this.updateHeight.bind(this)));\n\n        // We need to watch for changes to the content because it can change while editing:\n        // - When adding many tags it can span multiple lines\n        // - When adding or removing lines in Formulaire multi-entry fields\n        // - When Formulaire validation errors appear during submitting\n        this.handlers.observer = new ResizeObserver(this.updateHeight.bind(this));\n        this.handlers.observer.observe(this.element.querySelector('.ComposerBody-header'));\n\n        // We need a little delay before the first height update because the TextEditor doesn't initialize the textarea in the same rendering thread\n        setTimeout(() => {\n            this.updateHeight();\n        }, 10);\n    }\n\n    onremove(vnode: any) {\n        super.onremove(vnode);\n\n        $(window).off('resize', this.handlers.onresize);\n\n        this.handlers.observer.disconnect();\n\n        // If we leave the page without quitting the composer, switch to the floating composer\n        if (app.composer.bodyMatches(DiscussionComposer)) {\n            app.composer.minimize();\n        }\n    }\n\n    updateHeight() {\n        const $flexible = this.$('.Composer-flexible');\n\n        // Adapted from Composer.prototype.updateHeight\n        // The comparison is now done directly against the full document\n        if ($flexible.length) {\n            const headerHeight = $flexible.offset()!.top;\n            const paddingBottom = parseInt($flexible.css('padding-bottom'), 10);\n            const footerHeight = this.$('.Composer-footer').outerHeight(true)!;\n\n            $flexible.height(Math.max(window.innerHeight - headerHeight - paddingBottom - footerHeight, 200));\n        }\n    }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","import {extend, override} from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport TextEditor from 'flarum/common/components/TextEditor';\nimport listItems from 'flarum/common/helpers/listItems';\nimport Composer from 'flarum/forum/components/Composer';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport ComposerState from 'flarum/forum/states/ComposerState';\nimport ComposerPage from './components/ComposerPage';\n\nfunction isComposerPage(): boolean {\n    const currentRouteName = (app.current.data as any).routeName;\n\n    return currentRouteName === 'compose' || currentRouteName === 'composeTag';\n}\n\nfunction shouldUsePage(tagSlugs: string[]): boolean {\n    const pageTags = app.forum.attribute<string>('composerPageTags');\n\n    // If nothing set, applies to all\n    if (!pageTags) {\n        return true;\n    }\n\n    return pageTags.split(',').some(slug => tagSlugs.indexOf(slug) !== -1);\n}\n\napp.initializers.add('clarkwinkelmann-composer-page', () => {\n    app.routes.compose = {path: '/compose', component: ComposerPage};\n    // Calling the parameter the same as the original tag route (:tags) seems to lead to issues detecting the current tag when switching between the 2 routes\n    // So we'll call it :slug instead\n    app.routes.composeTag = {path: '/t/:slug/compose', component: ComposerPage};\n\n    override(Composer.prototype, 'view', function (original) {\n        if (!isComposerPage()) {\n            return original();\n        }\n\n        // We don't really need any of this, but we return an almost identical template to the original to reduce the risk of extensions breaking\n        // Also there's a lot of hooks around those elements so removing them from the DOM might break the reply composer\n        // The only goal is to remove the ComposerBody element so we don't have 2 text editors on the page at the same time\n        return m('.Composer', [\n            m('.Composer-handle', {\n                oncreate: this.configHandle.bind(this),\n            }),\n            m('ul.Composer-controls', listItems(this.controlItems().toArray())),\n            m('.Composer-handle'),\n            m('.Composer-content'),\n        ]);\n    });\n\n    let lastTagSelectionHash = '[]';\n\n    // This code could be in any onupdate hook, as long as it's a component that exists continously\n    extend(Composer.prototype, 'onupdate', function () {\n        const selectedTagSlugs = ((app.composer.fields || {}).tags || []).map(tag => tag.slug());\n\n        const newHash = JSON.stringify(selectedTagSlugs);\n\n        // We don't need a check for private discussions here\n        // Since the Byobu composer doesn't have a control for tags, the hash will never change\n        if (lastTagSelectionHash !== newHash) {\n            // Check if new tags selection needs the composer page\n            if (app.composer.bodyMatches(DiscussionComposer) && shouldUsePage(selectedTagSlugs) && !isComposerPage()) {\n                // Don't switch page before the tags modal has closed otherwise it can never be closed again the next time it's opened\n                setTimeout(() => {\n                    app.composer.show();\n                }, 220); // Modal animation is 200ms by default, add a bit more for margin\n            }\n\n            lastTagSelectionHash = newHash;\n        }\n    });\n\n    override(ComposerState.prototype, 'show', function (original) {\n        if (!this.bodyMatches(DiscussionComposer)) {\n            return original();\n        }\n        const PrivateDiscussionComposer = (flarum.extensions['fof-byobu'] as any)?.discussions?.PrivateDiscussionComposer;\n\n        if (PrivateDiscussionComposer && this.bodyMatches(PrivateDiscussionComposer) && !app.forum.attribute<string>('composerPagePrivateDiscussions')) {\n            return original();\n        }\n\n        // Use normal composer for tags where this feature is not enabled, unless we are already on the page\n        if (!shouldUsePage((this.fields?.tags || []).map(tag => tag.slug())) && !isComposerPage()) {\n            return original();\n        }\n\n        // Set position to minimized in case the user leaves changes page without cancelling the composer\n        this.position = ComposerState.Position.HIDDEN;\n\n        if (!isComposerPage()) {\n            m.route.set(app.route('compose'));\n        }\n    });\n\n    override(ComposerState.prototype, 'isVisible', function (original) {\n        // We must return visible here so that features like the exit callbacks get triggered\n        // We must also check the body because otherwise it returns true in ComposerState.prototype.load which creates nested redraws\n        if (this.bodyMatches(DiscussionComposer) && isComposerPage()) {\n            return true;\n        }\n\n        return original();\n    });\n\n    override(DiscussionComposer.prototype, 'oninit', function (original, vnode) {\n        // This code runs before oninit, so this.composer or this.attrs won't work. We need vnode.attrs\n        const content = vnode.attrs.composer.fields.content();\n\n        original(vnode);\n\n        // Copy over the existing value, otherwise it's lost when changing between page<->composer\n        this.composer.fields.content(content);\n    });\n\n    extend(DiscussionComposer.prototype, 'view', function (vdom: any) {\n        if (!isComposerPage()) {\n            return;\n        }\n\n        // Add a second button that we will keep at the bottom on mobile\n        // Otherwise it's not super obvious you need to click at the top right\n        // Some people might even want to hide the top right button to force people to scroll properly to the bottom\n        vdom.children.push(m('.ComposerPageMobileSubmit', Button.component({\n            icon: 'fas fa-paper-plane',\n            className: 'Button Button--primary',\n            onclick: this.onsubmit.bind(this),\n        }, this.attrs.submitLabel)));\n    });\n\n    extend(IndexPage.prototype, 'sidebarItems', function (items) {\n        const newDiscussion = items.has('newDiscussion') && items.get('newDiscussion');\n\n        // Don't replace button if guest, because that button will open the login modal in that situation\n        if (!newDiscussion || !app.session.user) {\n            return;\n        }\n\n        // Do not modify Byobu's button\n        // This means there will be no \"continue\" button either but that's fine\n        if (newDiscussion.attrs.itemClassName?.indexOf('fof-byobu_primaryControl') !== -1) {\n            return;\n        }\n\n        if (isComposerPage()) {\n            newDiscussion.attrs.className = newDiscussion.attrs.className.replace('Button--primary', '');\n            newDiscussion.attrs.icon = 'fas fa-trash';\n            delete newDiscussion.attrs.itemClassName; // Remove App-primaryControl otherwise there might be a conflict with the composer buttons\n            newDiscussion.children = app.translator.trans('clarkwinkelmann-composer-page.forum.nav.cancel');\n\n            return;\n        }\n\n        if (app.composer.bodyMatches(DiscussionComposer)) {\n            // Remove color since the button won't start a new discussion in current tag\n            newDiscussion.attrs.className = newDiscussion.attrs.className.replace('Button--tagColored', '');\n            newDiscussion.attrs.className = newDiscussion.attrs.className.replace('Button--primary', '');\n            if (newDiscussion.attrs.style) {\n                delete newDiscussion.attrs.style['--color'];\n            }\n            newDiscussion.children = app.translator.trans('clarkwinkelmann-composer-page.forum.nav.continue');\n            return;\n        }\n\n        const tag = this.currentTag && this.currentTag();\n\n        const tagSlugs = [];\n\n        if (tag) {\n            tagSlugs.push(tag.slug());\n\n            const parent = tag.parent();\n\n            if (parent) {\n                tagSlugs.push(parent.slug());\n            }\n        }\n\n        // If a tag setting was set, we'll start by opening normally\n        if (!shouldUsePage(tagSlugs)) {\n            return;\n        }\n\n        // Replace button with link. This serves multiple purposes:\n        // - No need to override IndexPage.prototype.newDiscussionAction to change the URL for tags\n        // - Ability to open in new tab\n        newDiscussion.tag = LinkButton;\n        newDiscussion.attrs.href = tag ? app.route('composeTag', {slug: tag.slug()}) : app.route('compose');\n        delete newDiscussion.attrs.onclick;\n    });\n\n    override(IndexPage.prototype, 'newDiscussionAction', function (original) {\n        // Action for \"cancel\" label\n        if (isComposerPage()) {\n            // Call close to invoke any exit callback\n            app.composer.close();\n\n            // Check that the composer successfully closed\n            // (it could still be prevented at that point)\n            if (!(app.composer.body as any).componentClass) {\n                m.route.set(app.route('index'));\n            }\n\n            return Promise.resolve();\n        }\n\n        // Action for our \"continue\" label. Will try to re-open the page, or just the composer if page is not required\n        if (app.composer.bodyMatches(DiscussionComposer)) {\n            app.composer.show();\n\n            return Promise.resolve();\n        }\n\n        return original();\n    });\n\n    // This method is exposed in FoF Upload for this specific reason\n    // We don't really need to check whether we are on the composer page, we can just return a new selector if the original returned nothing\n    // We target the editor and not the whole page to make sure it doesn't interfere with Formulaire upload fields\n    override(TextEditor.prototype, 'fofUploadDragAndDropTarget', function (original) {\n        const target = original();\n\n        if (!target) {\n            return this.$('.TextEditor-editor')[0];\n        }\n    });\n});\n","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/models/Tag'];","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/utils/sortTags'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/helpers/tagLabel'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport classList from 'flarum/common/utils/classList';\nimport app from 'flarum/forum/app';\n\nimport type Mithril from 'mithril';\n\ninterface Attrs {\n  count: number;\n  icon: string;\n  label: Mithril.Children;\n}\n\nexport default class StatWidget extends Component<Attrs> {\n  view() {\n    return (\n      <div class={classList('StatWidget', { 'Categories-compactMobileModeEnabled': !!app.forum.attribute('categories.compactMobile') })}>\n        {this.content().toArray()}\n      </div>\n    );\n  }\n\n  content() {\n    const items = new ItemList();\n\n    items.add('count', <div class=\"StatWidget-count\">{this.attrs.count}</div>, 100);\n    items.add(\n      'label',\n      <div class=\"StatWidget-label\">\n        <span className=\"Categories-showOnMobile\">{icon(this.attrs.icon)}</span>\n        <span className=\"Categories-hideOnMobile\">{this.attrs.label}</span>\n      </div>,\n      80\n    );\n\n    return items;\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserCard'];","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport { truncate } from 'flarum/common/utils/string';\nimport Link from 'flarum/common/components/Link';\nimport UserCard from 'flarum/forum/components/UserCard';\nimport type Discussion from 'flarum/common/models/Discussion';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport extractText from 'flarum/common/utils/extractText';\nimport type Mithril from 'mithril';\n\ninterface Attrs {\n  discussion: Discussion;\n}\n\nexport default class LastDiscussionWidget extends Component<Attrs> {\n  /**\n   * Whether or not the user hover card is visible.\n   */\n  cardVisible!: boolean;\n\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.cardVisible = false;\n  }\n\n  view() {\n    const discussion = this.attrs.discussion;\n\n    if (!discussion) {\n      return <div class=\"LastDiscussion\">{app.translator.trans('askvortsov-categories.forum.last_discussion_widget.no_discussions')}</div>;\n    }\n\n    const user = discussion.lastPostedUser();\n\n    return (\n      <Link class=\"LastDiscussion\" href={app.route.discussion(discussion, discussion.lastPostNumber() ?? 0)}>\n        {this.content().toArray()}\n      </Link>\n    );\n  }\n\n  content() {\n    const items = new ItemList();\n\n    const discussion = this.attrs.discussion;\n    const user = discussion.lastPostedUser();\n\n    items.add(\n      'avatar',\n      <Link className=\"LastDiscussion-avatar\" href={user ? app.route.user(user) : '#'} aria-label={extractText(username(user))}>\n        {!!user && avatar(user)}\n      </Link>,\n      100\n    );\n\n    items.add(\n      'mainContent',\n      <div class=\"LastDiscussion-content\">\n        <div class=\"LastDiscussion-bottomRow\">\n          {humanTime(discussion.lastPostedAt()!)}{' '}\n          <Link className=\"LastDiscussion-usernameLink\" href={user ? app.route.user(user) : '#'}>\n            <span style={{ display: 'inline', margin: '0 4px' }} role=\"presentation\">\n              |\n            </span>\n            {username(user)}\n          </Link>\n        </div>\n        <div class=\"LastDiscussion-topRow\">{truncate(discussion.title(), 26)}</div>\n      </div>,\n      50\n    );\n\n    let card: Mithril.Children = null;\n\n    if (user && this.cardVisible) {\n      card = UserCard.component({\n        user,\n        className: 'UserCard--popover',\n        controlsButtonClassName: 'Button Button--icon Button--flat',\n      });\n    }\n\n    items.add('card', <div class=\"LastDiscussion-userCardContainer\">{card}</div>, 10);\n\n    return items;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    let timeout: number;\n\n    this.$()\n      .on('mouseover', '.LastDiscussion-avatar, .LastDiscussion-usernameLinkUserCard, .username, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = window.setTimeout(this.showCard.bind(this), 300);\n      })\n      .on('mouseout', '.LastDiscussion-avatar, .LastDiscussion-usernameLinkUserCard, .username, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = window.setTimeout(this.hideCard.bind(this), 150);\n      });\n  }\n\n  onremove(vnode): void {\n    super.onremove(vnode);\n\n    this.$().off('mouseover mouseout');\n  }\n\n  /**\n   * Show the user card.\n   */\n  showCard() {\n    this.cardVisible = true;\n\n    m.redraw();\n\n    setTimeout(() => this.$('.UserCard').addClass('in'));\n  }\n\n  /**\n   * Hide the user card.\n   */\n  hideCard() {\n    $('.UserCard').removeClass('in');\n    this.cardVisible = false;\n    m.redraw();\n  }\n}\n","import Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\n\nimport icon from 'flarum/common/helpers/icon';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport sortTags from 'flarum/tags/utils/sortTags';\n\nimport StatWidget from './StatWidget';\nimport LastDiscussionWidget from './LastDiscussionWidget';\nimport app from 'flarum/forum/app';\nimport classList from 'flarum/common/utils/classList';\n\nimport type Mithril from 'mithril';\n\ninterface Attrs {\n  model: any;\n  parent: any;\n}\n\n/*\n * Provide compatibility for Flarum Tag Passwords extension, this is to ensure that locked tag with Password or Group permission has view restriction on latest discussion.\n * To know if a tag is protected, there is an isUnlocked variable that is specific for this extension.\n * https://github.com/datlechin/flarum-tag-passwords\n * \n */\ninterface TagLocked {\n  icon: icon;\n  text: string;\n  isVisible: boolean;\n}\n\nexport default class Category extends Component<Attrs> {\n  tag!: any;\n  isChild!: boolean;\n  collapsed!: boolean;\n  compactMobileMode!: boolean;\n  tagLocked!: TagLocked;\n\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.tag = this.attrs.model;\n\n    this.isChild = this.attrs.parent != null && this.attrs.parent != undefined;\n\n    this.collapsed = false;\n\n    // Identify if the tag has been Goup or Password protected with flarum-tag-passwords extension.\n    if (typeof this.tag.isUnlocked == 'function') {\n      if ((this.tag.isGroupProtected() || this.tag.isPasswordProtected()) && !this.tag.isUnlocked()) {\n        this.tagLocked = {\n          icon: this.tag.isPasswordProtected() ? icon('fas fa-lock') : icon('fas fa-user-lock'),\n          text: this.tag.isPasswordProtected() ? app.translator.trans('datlechin-tag-passwords.forum.tags_page.password_protected') : app.translator.trans('datlechin-tag-passwords.forum.tags_page.group_protected'),\n          isVisible: this.tag.isProtectedTagDisplayedForTagsPage() == true\n        };\n      }\n    }\n\n    window.addEventListener('resize', function () {\n      m.redraw();\n    });\n  }\n\n  view() {\n    const tag = this.tag;\n\n    if (!tag) {\n      return null;\n    } else if (this.tagLocked && !this.tagLocked.isVisible) {\n      // Hide the navigation when protected Tag in 'Tag Passwords > Display protected Tag in Tags page navigation' is disabled\n      return null;\n    }\n\n    this.compactMobileMode = !!app.forum.attribute('categories.compactMobile');\n\n    return (\n      <li\n        className={classList('TagCategory', `TagCategory-${tag.slug()}`, {\n          SubCategory: this.isChild,\n          ParentCategory: !this.isChild,\n          compactMobile: this.compactMobileMode,\n        })}\n      >\n        {this.categoryItems().toArray()}\n      </li>\n    );\n  }\n\n  categoryItems() {\n    const items = new ItemList();\n    const tag = this.tag;\n\n    const children = this.isChild ? [] : sortTags(tag.children() || []);\n\n    items.add(\n      'link',\n      <Link\n        className={`TagCategory-content ${app.forum.attribute('categories.compactMobile')? 'compactMobile' : '' } TagCategory-content-${tag.slug()}`}\n        style={this.isChild ? {} : { backgroundColor: tag.color() }}\n        href={app.route.tag(tag)}\n      >\n        {this.contentItems().toArray()}\n      </Link>,\n      100\n    );\n\n    if (!this.compactMobileMode && !this.isChild) {\n      items.add(\n        'children',\n        <ol className=\"TagCategory-subTagList\">{children.map((child) => [Category.component({ model: child, parent: this })])}</ol>,\n        10\n      );\n    }\n\n    return items;\n  }\n\n  contentItems() {\n    const items = new ItemList();\n\n    const tag = this.tag;\n    const children = this.isChild ? [] : sortTags(tag.children() || []);\n\n    items.add('alignStart', <div className=\"TagCategory-alignStart\">{this.alignStartItems().toArray()}</div>, 100);\n\n    items.add('alignEnd', <div className=\"TagCategory-alignEnd\">{this.alignEndItems().toArray()}</div>, 50);\n\n    const childrenInContent = !this.isChild && this.compactMobileMode;\n\n    if (childrenInContent && !this.collapsed) {\n      items.add(\n        'children',\n        <ol className=\"TagCategory-subTagList\">{children.map((child) => [Category.component({ model: child, parent: this })])}</ol>,\n        10\n      );\n    }\n\n    return items;\n  }\n\n  alignStartItems() {\n    const items = new ItemList();\n\n    const tag = this.tag;\n    const children = this.isChild ? [] : sortTags(tag.children() || []);\n\n    items.add('icon', <span className=\"TagCategory-icon\">{this.iconItems().toArray()}</span>, 100);\n\n    items.add('main', <div className=\"TagCategory-main\">{this.mainItems().toArray()}</div>, 50);\n\n    if (!!children.length) {\n      items.add(\n        'toggleArrow',\n        <button\n          className=\"TagCategory-toggleArrow Button--ua-reset\"\n          onclick={(e: MouseEvent) => {\n            this.toggleArrow(e);\n          }}\n        >\n          {icon(this.collapsed ? 'fas fa-caret-down' : 'fas fa-caret-up')}\n        </button>,\n        10\n      );\n    }\n\n    return items;\n  }\n\n  alignEndItems() {\n    const items = new ItemList();\n\n    if (this.tagLocked) {\n      items.add('locked', <div className=\"TagCategory-locked\">{this.lockedItems().toArray()}</div>, 100);\n      return items;\n    }\n\n    const tag = this.tag;\n\n    items.add('stats', <div className=\"TagCategory-stats StatWidgetList\">{this.statItems().toArray()}</div>, 100);\n\n    items.add(\n      'lastDiscussion',\n      <div className={classList('TagCategory-lastDiscussion', { empty: !tag.lastPostedDiscussion() })}>{this.lastDiscussionItems().toArray()}</div>,\n      50\n    );\n\n    return items;\n  }\n\n  lockedItems() {\n    const items = new ItemList();\n    const classes = this.compactMobileMode ? 'fa-stack fa-1x' : 'fa-stack fa-2x';\n    items.add(\n      'icon',\n      <span className={classes}>\n        {\n          <i className=\"fa-stack-2x\" style={{ color: this.tag.color() }}></i>\n        }\n        {this.tagLocked.icon}\n      </span>,\n      10\n    );\n    items.add(\n      'LockedText',\n      <div className={classList('TagCategory-lockedText')}>{this.tagLocked.text}</div>,\n      50\n    );\n    return items;\n  }\n\n  iconItems() {\n    const items = new ItemList();\n\n    if (this.tag.icon() && this.isChild) {\n      const style: Record<string, unknown> = {};\n\n      let iconClasses = 'fa-stack-1x CategoryIcon';\n\n      if (app.forum.attribute('categories.childBareIcon')) {\n        iconClasses += ' NoBackgroundCategoryIcon';\n        style.color = '#fafafa';\n      } else {\n        style.color = this.tag.color();\n      }\n\n      const classes = this.compactMobileMode ? 'fa-stack fa-1x' : 'fa-stack fa-2x';\n\n      items.add(\n        'icon',\n        <span className={classes}>\n          {!!app.forum.attribute('categories.childBareIcon') && (\n            <i className=\"fa fa-circle fa-stack-2x icon-background\" style={{ color: this.tag.color() }}></i>\n          )}\n          {icon(this.tag.icon(), { className: iconClasses, style: style })}\n        </span>,\n        10\n      );\n    } else if (this.tag.icon() && !app.forum.attribute('categories.parentRemoveIcon')) {\n      const classes = this.compactMobileMode ? 'fa-stack fa-2x' : 'fa-stack fa-3x';\n\n      items.add('icon', <span className={classes}>{icon(this.tag.icon(), { className: 'fa-stack-1x CategoryIcon' })}</span>, 10);\n    }\n\n    return items;\n  }\n\n  mainItems() {\n    const items = new ItemList();\n\n    items.add('name', <h4 className=\"TagCategory-name\">{this.tag.name()}</h4>, 15);\n\n    if (this.tag.description() && (this.isChild || !app.forum.attribute('categories.parentRemoveDescription'))) {\n      items.add('description', <div className=\"TagCategory-description\">{this.tag.description()}</div>, 10);\n    }\n\n    return items;\n  }\n\n  statItems() {\n    const items = new ItemList();\n\n    if (this.isChild || !app.forum.attribute('categories.parentRemoveStats')) {\n      items.add(\n        'discussionCount',\n        StatWidget.component({\n          count: Intl.NumberFormat().format(this.tag.discussionCount()),\n          label: app.translator.trans('askvortsov-categories.forum.stat-widgets.discussion_label'),\n          icon: 'fas fa-file-alt',\n        }),\n        15\n      );\n\n      items.add(\n        'postCount',\n        StatWidget.component({\n          count: Intl.NumberFormat().format(this.tag.postCount()),\n          label: app.translator.trans('askvortsov-categories.forum.stat-widgets.post_label'),\n          icon: 'fas fa-comment',\n        }),\n        10\n      );\n    }\n\n    return items;\n  }\n\n  lastDiscussionItems() {\n    const items = new ItemList();\n\n    if (this.isChild || !app.forum.attribute('categories.parentRemoveLastDiscussion')) {\n      items.add(\n        'lastDiscussion',\n        LastDiscussionWidget.component({\n          discussion: this.tag.lastPostedDiscussion(),\n        }),\n        10\n      );\n    }\n\n    return items;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.$('.TagCategory-content,.TagCategory-toggleArrow').on('mouseenter', function (e) {\n      $(this).addClass('hover');\n      if ($(this).parent().hasClass('SubCategory') || $(this).hasClass('TagCategory-toggleArrow')) {\n        $(this).closest('.ParentCategory').children('.TagCategory-content').removeClass('hover');\n      }\n    });\n\n    this.$('.TagCategory-content,.TagCategory-toggleArrow').on('mouseleave', function (e) {\n      $(this).removeClass('hover');\n      if ($(this).parent().hasClass('SubCategory') || $(this).hasClass('TagCategory-toggleArrow')) {\n        $(this).closest('.ParentCategory').children('.TagCategory-content').addClass('hover');\n      }\n    });\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<Attrs, this>): void {\n    super.onremove(vnode);\n\n    this.$('.TagCategory-content,.TagCategory-toggleArrow').off('mouseenter');\n    this.$('.TagCategory-content,.TagCategory-toggleArrow').off('mouseleave');\n  }\n\n  toggleArrow(e: MouseEvent) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.collapsed = !this.collapsed;\n    m.redraw();\n  }\n}\n","import app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport listItems from 'flarum/common/helpers/listItems';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport extractText from 'flarum/common/utils/extractText';\nimport classList from 'flarum/common/utils/classList';\n\nimport sortTags from 'flarum/tags/utils/sortTags';\nimport tagLabel from 'flarum/tags/helpers/tagLabel';\n\nimport Category from './Category';\n\nexport default class CategoriesPage extends Page {\n  tags!: any[];\n  loading!: boolean;\n\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    app.history.push('categories', extractText(app.translator.trans('askvortsov-category.forum.header.back_to_categories_tooltip')));\n\n    this.tags = [];\n\n    const preloaded = app.preloadedApiDocument<any>();\n\n    if (preloaded) {\n      this.tags = sortTags(preloaded.filter((tag: any) => !tag.isChild()));\n      return;\n    }\n\n    this.loading = true;\n\n    app.tagList.load(['parent', 'children', 'lastPostedDiscussion', 'lastPostedDiscussion.lastPostedUser']).then(() => {\n      this.tags = sortTags(app.store.all('tags').filter((tag) => !tag.isChild()));\n\n      this.loading = false;\n\n      m.redraw();\n    });\n  }\n\n  view() {\n    if (this.loading) {\n      return <LoadingIndicator />;\n    }\n\n    const classes = ['CategoriesPage'];\n\n    return <div className={classList(classes)}>{this.pageItems().toArray()}</div>;\n  }\n\n  pageItems() {\n    const items = new ItemList();\n\n    items.add('hero', IndexPage.prototype.hero(), 100);\n\n    items.add(\n      'container',\n      <div className={app.forum.attribute('categories.fullPageDesktop') ? 'container topNavContainer' : 'container sideNavContainer'}>\n        {this.containerItems().toArray()}\n      </div>,\n      50\n    );\n\n    return items;\n  }\n\n  containerItems() {\n    const items = new ItemList();\n\n    const pinned = this.tags.filter((tag) => tag.position() !== null);\n    const cloud = this.tags.filter((tag) => tag.position() === null);\n\n    items.add(\n      'sideNav',\n        <nav className={app.forum.attribute('categories.fullPageDesktop') ? 'CategoriesPage-nav IndexPage-nav topNav' : 'CategoriesPage-nav IndexPage-nav sideNav'}>\n          <ul>{listItems(IndexPage.prototype.sidebarItems().toArray())}</ul>\n        </nav>,\n      100\n    );\n\n    items.add(\n      'categoriesList',\n      <div className=\"CategoriesPage-content sideNavOffset\">\n        <ol className=\"TagCategoryList\">\n          {pinned.map((tag) => {\n            return Category.component({ model: tag });\n          })}\n        </ol>\n\n        {cloud.length ? <div className=\"TagCloud\">{cloud.map((tag) => [tagLabel(tag, { link: true }), ' '])}</div> : ''}\n      </div>,\n      50\n    );\n\n    return items;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    app.setTitle(extractText(app.translator.trans('askvortsov-categories.forum.all_categories.meta_title_text')));\n  }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/forum/components/TagsPage'];","import { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport Model from 'flarum/common/Model';\nimport Tag from 'flarum/tags/models/Tag';\nimport CategoriesPage from './components/CategoriesPage';\nimport TagsPage from 'flarum/tags/forum/components/TagsPage';\nimport Category from './components/Category';\nimport LastDiscussionWidget from './components/LastDiscussionWidget';\nimport StatWidget from './components/StatWidget';\n\nfunction pruneIndexNav(items, func) {\n  const isTagsPageVisible = app.forum.attribute('categories.keepTagsNav');\n\n  const isCustomTagsHidden = (app.current.matches(CategoriesPage) || app.current.matches(TagsPage));\n  for (const item in items.items) {\n    if (func(item)) {\n      if(item == 'tags') {\n        /*\n         * Tags must be visible on the navibation bar, when the User has selected to keep Tags within the Extension Settings.\n         * Finding all items that begins with 'tag' will also load 'tags', due to custom tag are labelled 'tag1', 'tag2' and so-on\n         */\n        if (!isTagsPageVisible) {\n          items.remove(item);\n        }\n      } else {\n        /*\n         * This is for custom tags, where they should not be visible within CategoriesPage and TagsPage\n         */\n        if (isCustomTagsHidden) {\n          items.remove(item);\n        }\n      }\n    }\n  }\n}\n\napp.initializers.add('askvortsov/flarum-categories', () => {\n  app.routes.categories = {\n    path: '/categories',\n    component: CategoriesPage,\n  };\n\n  Tag.prototype.postCount = Model.attribute('postCount');\n\n  extend(IndexPage.prototype, 'navItems', function (items) {\n    items.add(\n      'categories',\n      <LinkButton icon=\"fas fa-th-list\" href={app.route('categories')}>\n        {app.translator.trans('askvortsov-categories.forum.index.categories_link')}\n      </LinkButton>,\n      -9.5\n    );\n\n    if (items.has('moreTags')) {\n      items.replace('moreTags', <LinkButton href={app.route('categories')}>{app.translator.trans('flarum-tags.forum.index.more_link')}</LinkButton>);\n    }\n\n    pruneIndexNav(items, (item) => item.startsWith('tag'));\n\n    return items;\n  });\n\n  extend(IndexPage.prototype, 'sidebarItems', function (items) {\n    pruneIndexNav(items, (item) => item !== 'newDiscussion' && item !== 'nav');\n    return items;\n  });\n});\n\nexport default {\n  'components/CategoriesPage': CategoriesPage,\n  'components/Category': Category,\n  'components/LastDiscussionWidget': LastDiscussionWidget,\n  'components/StatWidget': StatWidget,\n};\n"]}