mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 22:53:37 +08:00
17d25ba4ce
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
1 line
1.5 MiB
Generated
1 line
1.5 MiB
Generated
{"version":3,"file":"forum.js","mappings":";2BAAAA,EAAOC,QAAU,EAAjBD,gBCSC,SAAUE,GACT,aAKA,IAAIC,EAAQ,SAARA,EAAkBC,EAASC,GAC7BC,KAAKD,QAAUH,EAAEK,OAAO,GAAIJ,EAAMK,SAAUH,GAE5C,IAAII,EAASH,KAAKD,QAAQI,SAAWN,EAAMK,SAASC,OAASP,EAAEI,KAAKD,QAAQI,QAAUP,EAAEQ,UAAUC,KAAKL,KAAKD,QAAQI,QAEpHH,KAAKM,QAAUH,EACZI,GAAG,2BAA4BX,EAAEY,MAAMR,KAAKS,cAAeT,OAC3DO,GAAG,0BAA4BX,EAAEY,MAAMR,KAAKU,2BAA4BV,OAE3EA,KAAKW,SAAef,EAAEE,GACtBE,KAAKY,QAAe,KACpBZ,KAAKa,MAAe,KACpBb,KAAKc,aAAe,KAEpBd,KAAKS,iBA2FP,SAASM,EAAOC,GACd,OAAOhB,KAAKiB,MAAK,WACf,IAAIC,EAAUtB,EAAEI,MACZmB,EAAUD,EAAMC,KAAK,YACrBpB,EAA2B,iBAAViB,GAAsBA,EAEtCG,GAAMD,EAAMC,KAAK,WAAaA,EAAO,IAAItB,EAAMG,KAAMD,IACrC,iBAAViB,GAAoBG,EAAKH,QA/FxCnB,EAAMuB,QAAW,QAEjBvB,EAAMwB,MAAW,+BAEjBxB,EAAMK,SAAW,CACfoB,OAAQ,EACRnB,OAAQoB,QAGV1B,EAAM2B,UAAUC,SAAW,SAAUC,EAAcC,EAAQC,EAAWC,GACpE,IAAIC,EAAe9B,KAAKM,QAAQwB,YAC5BC,EAAe/B,KAAKW,SAASW,SAC7BU,EAAehC,KAAKM,QAAQqB,SAEhC,GAAiB,MAAbC,GAAqC,OAAhB5B,KAAKY,QAAkB,OAAOkB,EAAY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6BAA8BiM,GAC9B,2BAA4B0V,GAC5B,+BAAgCJ,GAChC,yBAA0BvrB,GAC1B,qBAAsBwrB,GACtB,4BAA6B7c,GAC7B,4BAA6B9b,GAC7B,gCAAiCyE,GACjC,wBAAyBpF,GACzB,0BAA2BzC,GAC3B,iCAAkC6B,GAClC,0BAA2Bub,GAC3B,yBAA0B+kB,GAC1B,iCAAkClb,GAClC,sBAAuBxL,GACvB,6BAA8BjJ,GAC9B,2BAA4BF,GAC5B,wBAAyB+P,GACzB,wBAAyBxY,GACzB,iCAAkCme,GAClC,uBAAwBhE,GACxB,2CAA4CzG,GAC5C,qCAAsC5F,GACtC,6BAA8BwC,GAC9B,4BAA6BG,GAC7B,4BAA6BnT,GAC7B,8BAA+BuC,GAC/B,0BAA2BwW,GAC3B,kBAAmBtC,GACnB,0BAA2BsK,GAC3B,0BAA2BntB,GAC3B,8BAA+BktB,GAC/B,mCAAoCtS,GACpC,sBAAuB6J,GACvB,sBAAuBgC,GACvB,sBAAuB/B,GACvB,+BAAgC5F,GAChC,8BAA+B2N,GAC/B,yBAA0B4a,GAC1B,uBAAwBlf,GACxB,4BAA6BhrB,EAC7B,sBAAuB8pB,GACvB,mCAAoCsB,GACpC,gCAAiCM,GACjC,0BAA2B5hB,GAC3B,8BAA+B2S,GAC/B,yBAA0BgP,GAC1B,yBAA0B1hB,GAC1B,yBAA0BwgB,GAC1B,iCAAkCxZ,GAClC,2BAA4BvI,GAC5B,+BAAgCgoB,GAChC,gCAAiCvb,GACjC,8BAA+BsQ,GAC/B,mCAAoC1a,GACpC,oBAAqBiV,GACrB,gCAAiCzS,GACjC,yBAA0ByD,GAC1B,2BAA4B8b,GAC5B,mCAAoCiE,GACpCjuC,OAAQA,GACR2hD,iBAAkBA,KCtIpB4F,GAAAA,IAAgB5vC,GAET,IAAMosC,GAASD,GAAcyD,GAAW","sources":["webpack://@flarum/core/./node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/core/./node_modules/bootstrap/js/affix.js","webpack://@flarum/core/./node_modules/bootstrap/js/dropdown.js","webpack://@flarum/core/./node_modules/bootstrap/js/modal.js","webpack://@flarum/core/./node_modules/bootstrap/js/tooltip.js","webpack://@flarum/core/./node_modules/bootstrap/js/transition.js","webpack://@flarum/core/./node_modules/color-thief-browser/dist/color-thief.min.js","webpack://@flarum/core/./node_modules/dayjs/dayjs.min.js","webpack://@flarum/core/./node_modules/dayjs/plugin/localizedFormat.js","webpack://@flarum/core/./node_modules/dayjs/plugin/relativeTime.js","webpack://@flarum/core/./node_modules/expose-loader/dist/runtime/getGlobalThis.js","webpack://@flarum/core/./node_modules/jquery.hotkeys/jquery.hotkeys.js","webpack://@flarum/core/./node_modules/jquery/dist/jquery.js","webpack://@flarum/core/./node_modules/mithril/api/mount-redraw.js","webpack://@flarum/core/./node_modules/mithril/api/router.js","webpack://@flarum/core/./node_modules/mithril/hyperscript.js","webpack://@flarum/core/./node_modules/mithril/index.js","webpack://@flarum/core/./node_modules/mithril/mount-redraw.js","webpack://@flarum/core/./node_modules/mithril/pathname/assign.js","webpack://@flarum/core/./node_modules/mithril/pathname/build.js","webpack://@flarum/core/./node_modules/mithril/pathname/compileTemplate.js","webpack://@flarum/core/./node_modules/mithril/pathname/parse.js","webpack://@flarum/core/./node_modules/mithril/promise/polyfill.js","webpack://@flarum/core/./node_modules/mithril/promise/promise.js","webpack://@flarum/core/./node_modules/mithril/querystring/build.js","webpack://@flarum/core/./node_modules/mithril/querystring/parse.js","webpack://@flarum/core/./node_modules/mithril/render.js","webpack://@flarum/core/./node_modules/mithril/render/fragment.js","webpack://@flarum/core/./node_modules/mithril/render/hyperscript.js","webpack://@flarum/core/./node_modules/mithril/render/hyperscriptVnode.js","webpack://@flarum/core/./node_modules/mithril/render/render.js","webpack://@flarum/core/./node_modules/mithril/render/trust.js","webpack://@flarum/core/./node_modules/mithril/render/vnode.js","webpack://@flarum/core/./node_modules/mithril/request.js","webpack://@flarum/core/./node_modules/mithril/request/request.js","webpack://@flarum/core/./node_modules/mithril/route.js","webpack://@flarum/core/./node_modules/mithril/stream.js","webpack://@flarum/core/./node_modules/mithril/stream/stream.js","webpack://@flarum/core/./node_modules/punycode/punycode.es6.js","webpack://@flarum/core/./node_modules/regenerator-runtime/runtime.js","webpack://@flarum/core/./node_modules/textarea-caret/index.js","webpack://@flarum/core/./src/common/utils/arrayFlatPolyfill.ts","webpack://@flarum/core/./node_modules/jquery/dist/jquery-exposed.js","webpack://@flarum/core/./node_modules/color-thief-browser/dist/color-thief.min-exposed.js","webpack://@flarum/core/./node_modules/dayjs/dayjs.min-exposed.js","webpack://@flarum/core/./node_modules/mithril/index-exposed.js","webpack://@flarum/core/./node_modules/punycode/punycode.es6-exposed.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/extend/Model.js","webpack://@flarum/core/./src/common/extend/PostTypes.js","webpack://@flarum/core/./src/common/extend/Routes.js","webpack://@flarum/core/./src/common/app.ts","webpack://@flarum/core/./src/common/index.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","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/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/humanTime.ts","webpack://@flarum/core/./src/common/utils/abbreviateNumber.ts","webpack://@flarum/core/./src/common/components/Dropdown.js","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/utils/extractText.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.js","webpack://@flarum/core/./src/forum/components/LogInButtons.js","webpack://@flarum/core/./src/forum/components/SignUpModal.js","webpack://@flarum/core/./src/forum/components/LogInModal.js","webpack://@flarum/core/./src/forum/components/RenameDiscussionModal.js","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.js","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.js","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.js","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.js","webpack://@flarum/core/./src/common/components/SelectDropdown.js","webpack://@flarum/core/./src/common/Model.js","webpack://@flarum/core/./src/common/utils/computed.js","webpack://@flarum/core/./src/common/components/Badge.js","webpack://@flarum/core/./src/common/models/Discussion.js","webpack://@flarum/core/./src/forum/utils/KeyboardNavigatable.ts","webpack://@flarum/core/./src/forum/components/NotificationList.js","webpack://@flarum/core/./src/forum/components/NotificationsDropdown.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","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.js","webpack://@flarum/core/./src/forum/components/DiscussionRenamedNotification.js","webpack://@flarum/core/./src/forum/components/EditPostComposer.js","webpack://@flarum/core/./src/forum/utils/PostControls.js","webpack://@flarum/core/./src/forum/components/Post.js","webpack://@flarum/core/./src/common/components/GroupBadge.js","webpack://@flarum/core/./src/common/models/Group.js","webpack://@flarum/core/./src/common/components/EditUserModal.js","webpack://@flarum/core/./src/forum/components/AffixedSidebar.js","webpack://@flarum/core/./src/forum/components/UserPage.js","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/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.js","webpack://@flarum/core/./src/forum/components/DiscussionComposer.js","webpack://@flarum/core/./src/forum/components/IndexPage.js","webpack://@flarum/core/./src/forum/components/PostsUserPage.js","webpack://@flarum/core/./src/common/states/PaginatedListState.ts","webpack://@flarum/core/./src/forum/states/DiscussionListState.ts","webpack://@flarum/core/./src/forum/components/DiscussionsUserPage.js","webpack://@flarum/core/./src/common/utils/withAttr.ts","webpack://@flarum/core/./src/common/components/Checkbox.js","webpack://@flarum/core/./src/common/components/Switch.js","webpack://@flarum/core/./src/common/components/FieldSet.js","webpack://@flarum/core/./src/forum/components/NotificationGrid.js","webpack://@flarum/core/./src/forum/components/ChangePasswordModal.js","webpack://@flarum/core/./src/forum/components/ChangeEmailModal.js","webpack://@flarum/core/./src/forum/components/SettingsPage.js","webpack://@flarum/core/./src/forum/components/NotificationsPage.js","webpack://@flarum/core/./src/common/resolvers/DefaultResolver.ts","webpack://@flarum/core/./src/forum/resolvers/DiscussionPageResolver.ts","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/../source/pluralTypeHandler.js","webpack://@flarum/core/./src/common/components/ModalManager.tsx","webpack://@flarum/core/./src/common/components/AlertManager.js","webpack://@flarum/core/./src/common/components/RequestErrorModal.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://@flarum/core/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/core/array-utils.js","webpack://@flarum/core/function-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/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://@flarum/core/../source/MessageFormatter.js","webpack://@flarum/core/../source/mithrilRichHandler.js","webpack://@flarum/core/./src/common/Translator.tsx","webpack://@flarum/core/./src/common/Store.js","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.js","webpack://@flarum/core/./src/common/utils/stringToColor.ts","webpack://@flarum/core/./src/common/models/User.js","webpack://@flarum/core/./src/common/models/Post.js","webpack://@flarum/core/./src/common/models/Notification.js","webpack://@flarum/core/./src/common/states/ModalManagerState.ts","webpack://@flarum/core/./src/common/states/AlertManagerState.ts","webpack://@flarum/core/./src/common/Application.tsx","webpack://@flarum/core/./src/common/components/Navigation.js","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/ForumApplication.ts","webpack://@flarum/core/./src/forum/utils/isSafariMobile.ts","webpack://@flarum/core/./src/forum/app.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.js","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.js","webpack://@flarum/core/./src/forum/index.ts"],"sourcesContent":["module.exports = require(\"regenerator-runtime\");\n","/* ========================================================================\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","/* ========================================================================\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","/* ========================================================================\n * Bootstrap: modal.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#modals\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 // MODAL CLASS DEFINITION\n // ======================\n\n var Modal = function (element, options) {\n this.options = options\n this.$body = $(document.body)\n this.$element = $(element)\n this.$dialog = this.$element.find('.modal-dialog')\n this.$backdrop = null\n this.isShown = null\n this.originalBodyPad = null\n this.scrollbarWidth = 0\n this.ignoreBackdropClick = false\n this.fixedContent = '.navbar-fixed-top, .navbar-fixed-bottom'\n\n if (this.options.remote) {\n this.$element\n .find('.modal-content')\n .load(this.options.remote, $.proxy(function () {\n this.$element.trigger('loaded.bs.modal')\n }, this))\n }\n }\n\n Modal.VERSION = '3.4.1'\n\n Modal.TRANSITION_DURATION = 300\n Modal.BACKDROP_TRANSITION_DURATION = 150\n\n Modal.DEFAULTS = {\n backdrop: true,\n keyboard: true,\n show: true\n }\n\n Modal.prototype.toggle = function (_relatedTarget) {\n return this.isShown ? this.hide() : this.show(_relatedTarget)\n }\n\n Modal.prototype.show = function (_relatedTarget) {\n var that = this\n var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })\n\n this.$element.trigger(e)\n\n if (this.isShown || e.isDefaultPrevented()) return\n\n this.isShown = true\n\n this.checkScrollbar()\n this.setScrollbar()\n this.$body.addClass('modal-open')\n\n this.escape()\n this.resize()\n\n this.$element.on('click.dismiss.bs.modal', '[data-dismiss=\"modal\"]', $.proxy(this.hide, this))\n\n this.$dialog.on('mousedown.dismiss.bs.modal', function () {\n that.$element.one('mouseup.dismiss.bs.modal', function (e) {\n if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true\n })\n })\n\n this.backdrop(function () {\n var transition = $.support.transition && that.$element.hasClass('fade')\n\n if (!that.$element.parent().length) {\n that.$element.appendTo(that.$body) // don't move modals dom position\n }\n\n that.$element\n .show()\n .scrollTop(0)\n\n that.adjustDialog()\n\n if (transition) {\n that.$element[0].offsetWidth // force reflow\n }\n\n that.$element.addClass('in')\n\n that.enforceFocus()\n\n var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })\n\n transition ?\n that.$dialog // wait for modal to slide in\n .one('bsTransitionEnd', function () {\n that.$element.trigger('focus').trigger(e)\n })\n .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n that.$element.trigger('focus').trigger(e)\n })\n }\n\n Modal.prototype.hide = function (e) {\n if (e) e.preventDefault()\n\n e = $.Event('hide.bs.modal')\n\n this.$element.trigger(e)\n\n if (!this.isShown || e.isDefaultPrevented()) return\n\n this.isShown = false\n\n this.escape()\n this.resize()\n\n $(document).off('focusin.bs.modal')\n\n this.$element\n .removeClass('in')\n .off('click.dismiss.bs.modal')\n .off('mouseup.dismiss.bs.modal')\n\n this.$dialog.off('mousedown.dismiss.bs.modal')\n\n $.support.transition && this.$element.hasClass('fade') ?\n this.$element\n .one('bsTransitionEnd', $.proxy(this.hideModal, this))\n .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n this.hideModal()\n }\n\n Modal.prototype.enforceFocus = function () {\n $(document)\n .off('focusin.bs.modal') // guard against infinite focus loop\n .on('focusin.bs.modal', $.proxy(function (e) {\n if (document !== e.target &&\n this.$element[0] !== e.target &&\n !this.$element.has(e.target).length) {\n this.$element.trigger('focus')\n }\n }, this))\n }\n\n Modal.prototype.escape = function () {\n if (this.isShown && this.options.keyboard) {\n this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {\n e.which == 27 && this.hide()\n }, this))\n } else if (!this.isShown) {\n this.$element.off('keydown.dismiss.bs.modal')\n }\n }\n\n Modal.prototype.resize = function () {\n if (this.isShown) {\n $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))\n } else {\n $(window).off('resize.bs.modal')\n }\n }\n\n Modal.prototype.hideModal = function () {\n var that = this\n this.$element.hide()\n this.backdrop(function () {\n that.$body.removeClass('modal-open')\n that.resetAdjustments()\n that.resetScrollbar()\n that.$element.trigger('hidden.bs.modal')\n })\n }\n\n Modal.prototype.removeBackdrop = function () {\n this.$backdrop && this.$backdrop.remove()\n this.$backdrop = null\n }\n\n Modal.prototype.backdrop = function (callback) {\n var that = this\n var animate = this.$element.hasClass('fade') ? 'fade' : ''\n\n if (this.isShown && this.options.backdrop) {\n var doAnimate = $.support.transition && animate\n\n this.$backdrop = $(document.createElement('div'))\n .addClass('modal-backdrop ' + animate)\n .appendTo(this.$body)\n\n this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {\n if (this.ignoreBackdropClick) {\n this.ignoreBackdropClick = false\n return\n }\n if (e.target !== e.currentTarget) return\n this.options.backdrop == 'static'\n ? this.$element[0].focus()\n : this.hide()\n }, this))\n\n if (doAnimate) this.$backdrop[0].offsetWidth // force reflow\n\n this.$backdrop.addClass('in')\n\n if (!callback) return\n\n doAnimate ?\n this.$backdrop\n .one('bsTransitionEnd', callback)\n .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n callback()\n\n } else if (!this.isShown && this.$backdrop) {\n this.$backdrop.removeClass('in')\n\n var callbackRemove = function () {\n that.removeBackdrop()\n callback && callback()\n }\n $.support.transition && this.$element.hasClass('fade') ?\n this.$backdrop\n .one('bsTransitionEnd', callbackRemove)\n .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n callbackRemove()\n\n } else if (callback) {\n callback()\n }\n }\n\n // these following methods are used to handle overflowing modals\n\n Modal.prototype.handleUpdate = function () {\n this.adjustDialog()\n }\n\n Modal.prototype.adjustDialog = function () {\n var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight\n\n this.$element.css({\n paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',\n paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''\n })\n }\n\n Modal.prototype.resetAdjustments = function () {\n this.$element.css({\n paddingLeft: '',\n paddingRight: ''\n })\n }\n\n Modal.prototype.checkScrollbar = function () {\n var fullWindowWidth = window.innerWidth\n if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8\n var documentElementRect = document.documentElement.getBoundingClientRect()\n fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)\n }\n this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth\n this.scrollbarWidth = this.measureScrollbar()\n }\n\n Modal.prototype.setScrollbar = function () {\n var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)\n this.originalBodyPad = document.body.style.paddingRight || ''\n var scrollbarWidth = this.scrollbarWidth\n if (this.bodyIsOverflowing) {\n this.$body.css('padding-right', bodyPad + scrollbarWidth)\n $(this.fixedContent).each(function (index, element) {\n var actualPadding = element.style.paddingRight\n var calculatedPadding = $(element).css('padding-right')\n $(element)\n .data('padding-right', actualPadding)\n .css('padding-right', parseFloat(calculatedPadding) + scrollbarWidth + 'px')\n })\n }\n }\n\n Modal.prototype.resetScrollbar = function () {\n this.$body.css('padding-right', this.originalBodyPad)\n $(this.fixedContent).each(function (index, element) {\n var padding = $(element).data('padding-right')\n $(element).removeData('padding-right')\n element.style.paddingRight = padding ? padding : ''\n })\n }\n\n Modal.prototype.measureScrollbar = function () { // thx walsh\n var scrollDiv = document.createElement('div')\n scrollDiv.className = 'modal-scrollbar-measure'\n this.$body.append(scrollDiv)\n var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n this.$body[0].removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n\n // MODAL PLUGIN DEFINITION\n // =======================\n\n function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }\n\n var old = $.fn.modal\n\n $.fn.modal = Plugin\n $.fn.modal.Constructor = Modal\n\n\n // MODAL NO CONFLICT\n // =================\n\n $.fn.modal.noConflict = function () {\n $.fn.modal = old\n return this\n }\n\n\n // MODAL DATA-API\n // ==============\n\n $(document).on('click.bs.modal.data-api', '[data-toggle=\"modal\"]', function (e) {\n var $this = $(this)\n var href = $this.attr('href')\n var target = $this.attr('data-target') ||\n (href && href.replace(/.*(?=#[^\\s]+$)/, '')) // strip for ie7\n\n var $target = $(document).find(target)\n var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())\n\n if ($this.is('a')) e.preventDefault()\n\n $target.one('show.bs.modal', function (showEvent) {\n if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown\n $target.one('hidden.bs.modal', function () {\n $this.is(':visible') && $this.trigger('focus')\n })\n })\n Plugin.call($target, option, this)\n })\n\n}(jQuery);\n","/* ========================================================================\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","/* ========================================================================\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","/*!\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","!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\",$=\"Invalid Date\",l=/^(\\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(\"_\")},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},g={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}},D=\"en\",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if(\"string\"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else{var i=t.name;v[i]=t,r=i}return!n&&r&&(D=r),r||!n&&D},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=g;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(l);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()===$)},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),$=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)},l=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,g=\"set\"+(this.$u?\"UTC\":\"\");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+\"Hours\",0);case u:return l(g+\"Minutes\",1);case s:return l(g+\"Seconds\",2);case i:return l(g+\"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\":\"\"),$=(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],l=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 $&&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,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||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||$;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].substr(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},l={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||l[t]||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[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}(),b=_.prototype;return w.prototype=b,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",f],[\"$y\",c],[\"$D\",d]].forEach((function(t){b[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=v[D],w.Ls=v,w.p={},w}));","!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)}}}));","!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\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}();","/*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","/*!\n * jQuery JavaScript Library v3.6.0\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2021-03-02T17:08Z\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 #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\n\tversion = \"3.6.0\",\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\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\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}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.6\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2021-02-16\n */\n( function( window ) {\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\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\t// Instance methods\n\thasOwn = ( {} ).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpushNative = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" +\n\t\t\"ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\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: http://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]\n\t\t// 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\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" +\n\t\twhitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace +\n\t\t\"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": 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\t\"needsContext\": 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\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\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// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\treturn nonHex ?\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\tnonHex :\n\n\t\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t\t// Support: IE <=11+\n\t\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t\t// surrogate pair\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" +\n\t\t\t\tch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\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 = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( ( target[ j++ ] = els[ i++ ] ) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( 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, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\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\tresults.push( 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, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\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\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( 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 ] ) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\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 ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t( nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\" ) ) {\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 ) || rcombinators.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\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 = nid.replace( rcssescape, fcssescape );\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( rtrim, \"$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 (see Issue #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 Sizzle\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 * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split( \"|\" ),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[ i ] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( ( cur = cur.nextSibling ) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\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\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"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\tvar name = elem.nodeName.toLowerCase();\n\t\treturn ( name === \"input\" || name === \"button\" ) && elem.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\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\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 Sizzle 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// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem && elem.namespaceURI,\n\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, 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\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\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 ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n\t// Safari 4 - 5 only, Opera <=11.6 - 12.x only\n\t// IE/Edge & older browsers don't support the :scope pseudo-class.\n\t// Support: Safari 6.0 only\n\t// Safari 6.0 supports :scope but it's an alias of :root there.\n\tsupport.scope = assert( function( el ) {\n\t\tdocElem.appendChild( el ).appendChild( document.createElement( \"div\" ) );\n\t\treturn typeof el.querySelectorAll !== \"undefined\" &&\n\t\t\t!el.querySelectorAll( \":scope fieldset div\" ).length;\n\t} );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert( function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute( \"className\" );\n\t} );\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert( function( el ) {\n\t\tel.appendChild( document.createComment( \"\" ) );\n\t\treturn !el.getElementsByTagName( \"*\" ).length;\n\t} );\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\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\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\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\" ] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[ \"CLASS\" ] = support.getElementsByClassName && 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\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {\n\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert( function( el ) {\n\n\t\t\tvar input;\n\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll( \"[msallowcapture^='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"~=\" );\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t\t// Adding a temporary attribute to the document before the selection works\n\t\t\t// around the issue.\n\t\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\t\tinput = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"name\", \"\" );\n\t\t\tel.appendChild( input );\n\t\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\t\trbuggyQSA.push( \":checked\" );\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t\t}\n\n\t\t\t// Support: Firefox <=3.6 - 5 only\n\t\t\t// Old Firefox doesn't throw on a badly-escaped identifier.\n\t\t\tel.querySelectorAll( \"\\\\\\f\" );\n\t\t\trbuggyQSA.push( \"[\\\\r\\\\n\\\\f]\" );\n\t\t} );\n\n\t\tassert( function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll( \"[name=d]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll( \":enabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: Opera 10 - 11 only\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll( \"*,:x\" );\n\t\t\trbuggyQSA.push( \",.*:\" );\n\t\t} );\n\t}\n\n\tif ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector ) ) ) ) {\n\n\t\tassert( function( el ) {\n\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t} );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( \"|\" ) );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t) );\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( ( b = b.parentNode ) ) {\n\t\t\t\t\tif ( b === a ) {\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\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( 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\tcontains( 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\tcontains( 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( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\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 eqeqeq */\n\t\t\treturn a == document ? -1 :\n\t\t\t\tb == document ? 1 :\n\t\t\t\t/* eslint-enable eqeqeq */\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[ i ] === bp[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[ i ], bp[ i ] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\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 eqeqeq */\n\t\t\tap[ i ] == preferredDoc ? -1 :\n\t\t\tbp[ i ] == preferredDoc ? 1 :\n\t\t\t/* eslint-enable eqeqeq */\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( 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// As well, disconnected nodes are said to be in a document\n\t\t\t\t// fragment in IE 9\n\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 Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.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 contains( context, elem );\n};\n\nSizzle.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 (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\nSizzle.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 */\nSizzle.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\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( 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\tresults.splice( 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\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\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\t\"ATTR\": 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 ] ||\n\t\t\t\tmatch[ 5 ] || \"\" ).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\t\"CHILD\": 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\tSizzle.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\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": 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\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = 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 elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace +\n\t\t\t\t\t\")\" + className + \"(\" + whitespace + \"|$)\" ) ) && classCache(\n\t\t\t\t\t\tclassName, function( elem ) {\n\t\t\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.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\t/* eslint-disable max-len */\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t\t/* eslint-enable max-len */\n\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": 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, uniqueCache, 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\tnode.nodeName.toLowerCase() === 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\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\tcache = uniqueCache[ 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\tuniqueCache[ 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\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ 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\tnode.nodeName.toLowerCase() === 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\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ 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\t\"PSEUDO\": function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://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\tSizzle.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 Sizzle 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( 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\t\"not\": 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( rtrim, \"$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 (issue #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\t\"has\": markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\t\"contains\": markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || getText( 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// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": 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\tSizzle.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\t\"target\": 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\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement &&\n\t\t\t\t( !document.hasFocus || document.hasFocus() ) &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn ( nodeName === \"input\" && !!elem.checked ) ||\n\t\t\t\t( nodeName === \"option\" && !!elem.selected );\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\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\t\"empty\": function( elem ) {\n\n\t\t\t// http://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\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[ \"empty\" ]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear 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\t\"first\": createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\t\"last\": createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\t\"eq\": createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\t\"even\": 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\t\"odd\": 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\t\"lt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ?\n\t\t\t\targument + length :\n\t\t\t\targument > length ?\n\t\t\t\t\tlength :\n\t\t\t\t\targument;\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\t\"gt\": 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\ntokenize = Sizzle.tokenize = function( 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 = rcombinators.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( rtrim, \" \" )\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\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\n\t\t\t// Cache the tokens\n\t\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, uniqueCache, 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\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] ||\n\t\t\t\t\t\t\t( outerCache[ elem.uniqueID ] = {} );\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = uniqueCache[ 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\tuniqueCache[ 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\tSizzle( 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,\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 || multipleContexts(\n\t\t\t\tselector || \"*\",\n\t\t\t\tcontext.nodeType ? [ context ] : context,\n\t\t\t\t[]\n\t\t\t),\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\t\tmatcherOut = matcher ?\n\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\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( 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( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\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 (issue #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// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\ttokens\n\t\t\t\t\t\t.slice( 0, i - 1 )\n\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrim, \"$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: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\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\tresults.push( 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\tSizzle.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\ncompile = Sizzle.compile = function( 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(\n\t\t\tselector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers )\n\t\t);\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 Sizzle's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( 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\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find[ \"ID\" ]( token.matches[ 0 ]\n\t\t\t\t.replace( runescape, funescape ), context ) || [] )[ 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 ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext\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// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\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\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert( function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.firstChild.getAttribute( \"href\" ) === \"#\";\n} ) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert( function( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n} ) ) {\n\taddHandle( \"value\", function( elem, _name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert( function( el ) {\n\treturn el.getAttribute( \"disabled\" ) == null;\n} ) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\t\tnull;\n\t\t}\n\t} );\n}\n\nreturn Sizzle;\n\n} )( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\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\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\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 (#9521)\n\t// Strict HTML recognition (#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 Sizzle\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.stackTrace );\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 stack, 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.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = 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\njQuery.Deferred.exceptionHook = function( error, stack ) {\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, error.stack, stack );\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 #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 (#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 #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 (#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 (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#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 (#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 (#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 (#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\n// Support: IE <=9 - 11+\n// focus() and blur() are asynchronous, except when they are no-op.\n// So expect focus to be synchronous when the element is already active,\n// and blur to be synchronous when the element is not already active.\n// (focus and blur are always synchronous in other supported browsers,\n// this just defines when we can count on it).\nfunction expectSync( elem, type ) {\n\treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n}\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\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 (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #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 (#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\", returnTrue );\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, expectSync ) {\n\n\t// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !expectSync ) {\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 notAsync, 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\t// Saved data should be false in such cases, but might be a leftover capture object\n\t\t\t\t// from an async native handler (gh-4350)\n\t\t\t\tif ( !saved.length ) {\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\t// Support: IE <=9 - 11+\n\t\t\t\t\t// focus() and blur() are asynchronous\n\t\t\t\t\tnotAsync = expectSync( this, type );\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tif ( saved !== result || notAsync ) {\n\t\t\t\t\t\tdataPriv.set( this, type, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = {};\n\t\t\t\t\t}\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\t// Support: Chrome 86+\n\t\t\t\t\t\t// In Chrome, if an element having a focusout handler is blurred by\n\t\t\t\t\t\t// clicking outside of it, it invokes the handler synchronously. If\n\t\t\t\t\t\t// that handler calls `.remove()` on the element, the data is cleared,\n\t\t\t\t\t\t// leaving `result` undefined. We need to guard against this.\n\t\t\t\t\t\treturn result && result.value;\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 the\n\t\t\t\t// 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.length ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, {\n\t\t\t\t\tvalue: jQuery.event.trigger(\n\n\t\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t\t// Extend with the prototype to reset the above stopImmediatePropagation()\n\t\t\t\t\t\tjQuery.extend( saved[ 0 ], jQuery.Event.prototype ),\n\t\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\t\tthis\n\t\t\t\t\t)\n\t\t\t\t} );\n\n\t\t\t\t// Abort handling of the native event\n\t\t\t\tevent.stopImmediatePropagation();\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 (#504, #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\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\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, expectSync );\n\n\t\t\t// Return false to allow normal processing in the caller\n\t\t\treturn false;\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\t// Suppress native focus or blur as it's already being fired\n\t\t// in leverageNative.\n\t\t_default: function() {\n\t\t\treturn true;\n\t\t},\n\n\t\tdelegateType: delegateType\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\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 (#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// Reenable 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\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 Sizzle here for performance reasons: 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 getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (#15098, #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 (#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 = \"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\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, #12537)\n\t// .css('--customProperty) (#3144)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\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\trcustomProp = /^--/,\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\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\tif ( box === \"margin\" ) {\n\t\t\tdelta += 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;\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\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"gridArea\": true,\n\t\t\"gridColumn\": true,\n\t\t\"gridColumnEnd\": true,\n\t\t\"gridColumnStart\": true,\n\t\t\"gridRow\": true,\n\t\t\"gridRowEnd\": true,\n\t\t\"gridRowStart\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": 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 (#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 #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 (#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 )` (#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.\n// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\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// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#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 classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\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\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\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\telem.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 classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\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\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\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\telem.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 type = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\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\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\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = classesToArray( value );\n\n\t\t\t\twhile ( ( className = 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 (#14686, #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 (#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\n\n\nsupport.focusin = \"onfocusin\" in window;\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 (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#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 (#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\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\n\t\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\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\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// #7653, #8125, #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 (#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 #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 (#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 #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 (#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// #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 (#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// #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 #8605, #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// #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.mouseenter( fnOver ).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\nvar rtrim = /^[\\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, \"\" );\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// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\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","\"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","\"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 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 render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, requestAnimationFrame, console)\n","\"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 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","\"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","\"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/** @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 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","\"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\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\nmodule.exports = require(\"./render/render\")(window)\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","\"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","\"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\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\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","\"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","\"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 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","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(window, mountRedraw)\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\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","'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-\\x7E]/; // non-ASCII chars\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, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(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 {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.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\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).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 = array => String.fromCodePoint(...array);\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 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\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\tlet 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 || 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\tlet 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\tlet 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.1.0',\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","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\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","// 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","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","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","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","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 ___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","// 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","export default class Model {\n type;\n attributes = [];\n hasOnes = [];\n hasManys = [];\n\n constructor(type, model = null) {\n this.type = type;\n this.model = model;\n }\n\n attribute(name) {\n this.attributes.push(name);\n\n return this;\n }\n\n hasOne(type) {\n this.hasOnes.push(type);\n\n return this;\n }\n\n hasMany(type) {\n this.hasManys.push(type);\n\n return this;\n }\n\n extend(app, extension) {\n if (this.model) {\n app.store.models[this.type] = this.model;\n }\n\n const model = app.store.models[this.type];\n\n this.attributes.forEach((name) => (model.prototype[name] = model.attribute(name)));\n this.hasOnes.forEach((name) => (model.prototype[name] = model.hasOne(name)));\n this.hasManys.forEach((name) => (model.prototype[name] = model.hasMany(name)));\n }\n}\n","export default class PostTypes {\n postComponents = {};\n\n add(name, component) {\n this.postComponents[name] = component;\n\n return this;\n }\n\n extend(app, extension) {\n Object.assign(app.postComponents, this.postComponents);\n }\n}\n","export default class Routes {\n routes = {};\n\n add(name, path, component) {\n this.routes[name] = { path, component };\n\n return this;\n }\n\n extend(app, extension) {\n Object.assign(app.routes, this.routes);\n }\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/modal';\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 * as Extend from './extend/index';\nimport app from './app';\n\nexport { Extend, app };\n\nimport './utils/arrayFlatPolyfill';\n\nconst tooltipGen = $.fn.tooltip;\n\n// Remove in a future version of Flarum.\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","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","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 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}","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","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';\n\nexport interface HistoryEntry {\n name: string;\n title: string;\n url: string;\n}\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 {\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 * @public\n */\n enable() {\n this.active = true;\n this.render();\n }\n\n /**\n * Disable the pane.\n *\n * @public\n */\n disable() {\n this.active = false;\n this.showing = false;\n this.render();\n }\n\n /**\n * Show the pane.\n *\n * @public\n */\n show() {\n clearTimeout(this.hideTimeout);\n this.showing = true;\n this.render();\n }\n\n /**\n * Hide the pane.\n *\n * @public\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 * @public\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 * @public\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 protected 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 protected 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 protected 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 protected $(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 protected static initAttrs<T>(attrs: T): 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\n * accepted as well.\n * @param {object} 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> extends Component<CustomAttrs> {\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 _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","/**\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, nothing will happen.\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, nothing will happen.\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 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 * @returns 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 toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string' || typeof mix === 'number') {\n\t\tstr += mix;\n\t} else if (typeof mix === 'object') {\n\t\tif (Array.isArray(mix)) {\n\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tif (y = toVal(mix[k])) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (k in mix) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\tstr += k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn str;\n}\n\nexport default function () {\n\tvar i=0, tmp, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (tmp = arguments[i++]) {\n\t\t\tif (x = toVal(tmp)) {\n\t\t\t\tstr && (str += ' ');\n\t\t\t\tstr += x\n\t\t\t}\n\t\t}\n\t}\n\treturn str;\n}\n","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\nexport interface ModdedVnodeAttrs {\n itemClassName?: string;\n key?: string;\n}\n\nexport type ModdedVnode<Attrs> = Mithril.Vnode<ModdedVnodeAttrs, Component<Attrs> | {}> & {\n itemName?: string;\n itemClassName?: string;\n tag: Mithril.Vnode['tag'] & {\n isListItem?: boolean;\n isActive?: (attrs: ComponentAttrs) => boolean;\n };\n};\n\nfunction isSeparator<Attrs>(item: ModdedVnode<Attrs>): boolean {\n return item.tag === Separator;\n}\n\nfunction withoutUnnecessarySeparators<Attrs>(items: ModdedVnode<Attrs>[]): ModdedVnode<Attrs>[] {\n const newItems: ModdedVnode<Attrs>[] = [];\n let prevItem: ModdedVnode<Attrs>;\n\n items.filter(Boolean).forEach((item: Mithril.Vnode, 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 Record<string, unknown>>(\n rawItems: ModdedVnode<Attrs> | ModdedVnode<Attrs>[],\n customTag: string | Component<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: ModdedVnode<Attrs>) => {\n const isListItem = item.tag?.isListItem;\n const active = item.tag?.isActive?.(item.attrs);\n const className = item.attrs?.itemClassName || item.itemClassName;\n\n if (isListItem) {\n item.attrs = item.attrs || {};\n item.attrs.key = item.attrs.key || item.itemName;\n item.key = item.attrs.key;\n }\n\n const node: Mithril.Vnode = isListItem ? (\n item\n ) : (\n // @ts-expect-error `Component` does not have any construct or call signatures\n <Tag\n className={classList([className, item.itemName && `item-${item.itemName}`, active && 'active'])}\n key={item?.attrs?.key || item.itemName}\n {...attributes}\n >\n {item}\n </Tag>\n );\n\n return node;\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}\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', <h2 className=\"DiscussionHero-title\">{discussion.title()}</h2>);\n\n return items;\n }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","/**\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 = 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';\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, attrs: ComponentAttrs = {}): Mithril.Vnode {\n attrs.className = 'Avatar ' + (attrs.className || '');\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: string = user.displayName() || '?';\n const avatarUrl: string = 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. Non-alphanumeric characters are\n * 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): string {\n return string\n .toLowerCase()\n .replace(/[^a-z0-9]/gi, '-')\n .replace(/-+/g, '-')\n .replace(/-$|^-/g, '');\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 ').replace(/<img\\b[^>]*>/gi, ' ');\n\n const dom = $('<div/>').html(html);\n\n dom.find(getPlainContent.removeSelectors.join(',')).remove();\n\n return dom.text().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","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';\n\n/**\n * The `icon` helper displays an icon.\n *\n * @param fontClass The full icon class, prefix and the icon’s name.\n * @param attrs Any other attributes to apply.\n */\nexport default function icon(fontClass: string, attrs: Mithril.Attributes = {}): Mithril.Vnode {\n attrs.className = 'icon ' + fontClass + ' ' + (attrs.className || '');\n\n return <i aria-hidden=\"true\" {...attrs} />;\n}\n","import dayjs from 'dayjs';\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('D MMM');\n } else {\n ago = d.format('ll');\n }\n } else {\n ago = d.fromNow();\n }\n\n return ago;\n}\n","import app from '../../common/app';\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) + app.translator.trans('core.lib.number_suffix.mega_text');\n } else if (number >= 1000) {\n return (number / 1000).toFixed(1) + 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 from '../Component';\nimport icon from '../helpers/icon';\nimport listItems from '../helpers/listItems';\n\n/**\n * The `Dropdown` component displays a button which, when clicked, shows a\n * dropdown menu beneath it.\n *\n * ### Attrs\n *\n * - `buttonClassName` A class name to apply to the dropdown toggle button.\n * - `menuClassName` A class name to apply to the dropdown menu.\n * - `icon` The name of an icon to show in the dropdown toggle button.\n * - `caretIcon` The name of an icon to show on the right of the button.\n * - `label` The label of the dropdown toggle button. Defaults to 'Controls'.\n * - `accessibleToggleLabel` The label used to describe the dropdown toggle button to assistive readers. Defaults to 'Toggle dropdown menu'.\n * - `onhide`\n * - `onshow`\n *\n * The children will be displayed as a list inside of the dropdown menu.\n */\nexport default class Dropdown extends Component {\n static initAttrs(attrs) {\n attrs.className = attrs.className || '';\n attrs.buttonClassName = attrs.buttonClassName || '';\n attrs.menuClassName = attrs.menuClassName || '';\n attrs.label = attrs.label || '';\n attrs.caretIcon = typeof attrs.caretIcon !== 'undefined' ? attrs.caretIcon : 'fas fa-caret-down';\n attrs.accessibleToggleLabel = attrs.accessibleToggleLabel || app.translator.trans('core.lib.dropdown.toggle_dropdown_accessible_label');\n }\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.showing = false;\n }\n\n view(vnode) {\n const items = vnode.children ? listItems(vnode.children) : [];\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)}\n {renderItems && this.getMenu(items)}\n </div>\n );\n }\n\n oncreate(vnode) {\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 $menu.removeClass('Dropdown-menu--top Dropdown-menu--right');\n\n $menu.toggleClass('Dropdown-menu--top', $menu.offset().top + $menu.height() > $(window).scrollTop() + $(window).height());\n\n if ($menu.offset().top < 0) {\n $menu.removeClass('Dropdown-menu--top');\n }\n\n $menu.toggleClass('Dropdown-menu--right', isRight || $menu.offset().left + $menu.width() > $(window).scrollLeft() + $(window).width());\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 * @return {*}\n * @protected\n */\n getButton(children) {\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 * @return {*}\n * @protected\n */\n getButtonContent(children) {\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) {\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 *\n * ### Children\n *\n * NOTE: Only the first child will be rendered. (Use this component to wrap\n * another component / DOM element.)\n *\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 // To avoid having to render another wrapping <div> here, we assume that\n // this component is only wrapped around a single element / component.\n return vnode.children[0];\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","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 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 (!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 EditorDriverInterface, { EditorDriverParams } from './EditorDriverInterface';\nimport ItemList from './ItemList';\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 * Manually show tooltip. `false` will show based on cursor events.\n *\n * Default: `false`.\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}\n */\n controlItems() {\n const items = new ItemList();\n\n items.add(\n 'submit',\n Button.component(\n {\n icon: 'fas fa-paper-plane',\n className: 'Button Button--primary',\n itemClassName: 'App-primaryControl',\n onclick: this.onsubmit.bind(this),\n },\n this.attrs.submitLabel\n )\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}\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={'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.component({\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 && 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 {String}\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}\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 {Object}\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 = Button.component(\n {\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 );\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';\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 /** 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 = 'Alert Alert--' + type + ' ' + (attrs.className || '');\n\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(<Button icon=\"fas fa-times\" className=\"Button Button--link Button--icon Alert-dismiss\" onclick={ondismiss} />);\n }\n\n return (\n <div {...attrs}>\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';\n\nexport interface IInternalModalAttrs {\n state: ModalManagerState;\n animateShow: ModalManager['animateShow'];\n animateHide: ModalManager['animateHide'];\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> extends Component<ModalAttrs> {\n /**\n * Determine whether or not the modal should be dismissible via an 'x' button.\n */\n static readonly isDismissible: boolean = true;\n\n protected loading: boolean = false;\n\n /**\n * Attributes for an alert component to show below the header.\n */\n alertAttrs!: AlertAttrs;\n\n oninit(vnode: Mithril.VnodeDOM<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 this.attrs.animateHide();\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={'Modal modal-dialog ' + this.className()}>\n <div className=\"Modal-content\">\n {(this.constructor as typeof Modal).isDismissible && (\n <div className=\"Modal-close App-backControl\">\n {Button.component({\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 ? <div className=\"Modal-alert\">{Alert.component(this.alertAttrs)}</div> : ''}\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(): string;\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.state.close();\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","import Stream from 'mithril/stream';\n\nexport default Stream;\n","import app from '../../forum/app';\nimport Modal from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport extractText from '../../common/utils/extractText';\nimport Stream from '../../common/utils/Stream';\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 *\n * ### Attrs\n *\n * - `email`\n */\nexport default class ForgotPasswordModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n /**\n * The value of the email input.\n *\n * @type {Function}\n */\n this.email = Stream(this.attrs.email || '');\n\n /**\n * Whether or not the password reset email was sent successfully.\n *\n * @type {Boolean}\n */\n this.success = false;\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 <div className=\"Form-group\">\n <input\n className=\"FormControl\"\n name=\"email\"\n type=\"email\"\n placeholder={extractText(app.translator.trans('core.forum.forgot_password.email_placeholder'))}\n bidi={this.email}\n disabled={this.loading}\n />\n </div>\n <div className=\"Form-group\">\n {Button.component(\n {\n className: 'Button Button--primary Button--block',\n type: 'submit',\n loading: this.loading,\n },\n app.translator.trans('core.forum.forgot_password.submit_button')\n )}\n </div>\n </div>\n </div>\n );\n }\n\n onsubmit(e) {\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: { email: this.email() },\n errorHandler: this.onerror.bind(this),\n })\n .then(() => {\n this.success = true;\n this.alert = null;\n })\n .catch(() => {})\n .then(this.loaded.bind(this));\n }\n\n onerror(error) {\n if (error.status === 404) {\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}\n * @public\n */\n items() {\n return new ItemList();\n }\n}\n","import app from '../../forum/app';\nimport Modal 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';\n\n/**\n * The `SignUpModal` component displays a modal dialog with a singup form.\n *\n * ### Attrs\n *\n * - `username`\n * - `email`\n * - `password`\n * - `token` An email token to sign up with.\n */\nexport default class SignUpModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n /**\n * The value of the username input.\n *\n * @type {Function}\n */\n this.username = Stream(this.attrs.username || '');\n\n /**\n * The value of the email input.\n *\n * @type {Function}\n */\n this.email = Stream(this.attrs.email || '');\n\n /**\n * The value of the password input.\n *\n * @type {Function}\n */\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) {\n return this.attrs.provided && this.attrs.provided.indexOf(field) !== -1;\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 items.add(\n 'username',\n <div className=\"Form-group\">\n <input\n className=\"FormControl\"\n name=\"username\"\n type=\"text\"\n placeholder={extractText(app.translator.trans('core.forum.sign_up.username_placeholder'))}\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={extractText(app.translator.trans('core.forum.sign_up.email_placeholder'))}\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={extractText(app.translator.trans('core.forum.sign_up.password_placeholder'))}\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 * @public\n */\n logIn() {\n const attrs = {\n identification: this.email() || this.username(),\n password: this.password(),\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) {\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 * @return {Object}\n * @protected\n */\n submitData() {\n const data = {\n username: this.username(),\n email: this.email(),\n };\n\n if (this.attrs.token) {\n data.token = this.attrs.token;\n } else {\n data.password = this.password();\n }\n\n return data;\n }\n}\n","import app from '../../forum/app';\nimport Modal 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';\n\n/**\n * The `LogInModal` component displays a modal dialog with a login form.\n *\n * ### Attrs\n *\n * - `identification`\n * - `password`\n */\nexport default class LogInModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n /**\n * The value of the identification input.\n *\n * @type {Function}\n */\n this.identification = Stream(this.attrs.identification || '');\n\n /**\n * The value of the password input.\n *\n * @type {Function}\n */\n this.password = Stream(this.attrs.password || '');\n\n /**\n * The value of the remember me input.\n *\n * @type {Function}\n */\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 items.add(\n 'identification',\n <div className=\"Form-group\">\n <input\n className=\"FormControl\"\n name=\"identification\"\n type=\"text\"\n placeholder={extractText(app.translator.trans('core.forum.log_in.username_or_email_placeholder'))}\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={extractText(app.translator.trans('core.forum.log_in.password_placeholder'))}\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.component(\n {\n className: 'Button Button--primary Button--block',\n type: 'submit',\n loading: this.loading,\n },\n app.translator.trans('core.forum.log_in.submit_button')\n )}\n </div>,\n -10\n );\n\n return items;\n }\n\n footer() {\n return [\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\n app.forum.attribute('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 /**\n * Open the forgot password modal, prefilling it with an email if the user has\n * entered one.\n *\n * @public\n */\n forgotPassword() {\n const email = this.identification();\n const attrs = email.indexOf('@') !== -1 ? { 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 * @public\n */\n signUp() {\n const attrs = { password: this.password() };\n const identification = this.identification();\n attrs[identification.indexOf('@') !== -1 ? 'email' : 'username'] = identification;\n\n app.modal.show(SignUpModal, attrs);\n }\n\n onready() {\n this.$('[name=' + (this.identification() ? 'password' : 'identification') + ']').select();\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n const identification = this.identification();\n const password = this.password();\n const remember = this.remember();\n\n app.session\n .login({ identification, password, remember }, { errorHandler: this.onerror.bind(this) })\n .then(() => window.location.reload(), this.loaded.bind(this));\n }\n\n onerror(error) {\n if (error.status === 401) {\n error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');\n }\n\n super.onerror(error);\n }\n}\n","import app from '../../forum/app';\nimport Modal from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\n\n/**\n * The 'RenameDiscussionModal' displays a modal dialog with an input to rename a discussion\n */\nexport default class RenameDiscussionModal extends Modal {\n oninit(vnode) {\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.component(\n {\n className: 'Button Button--primary Button--block',\n type: 'submit',\n loading: this.loading,\n },\n app.translator.trans('core.forum.rename_discussion.submit_button')\n )}\n </div>\n </div>\n </div>\n );\n }\n\n onsubmit(e) {\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 {Discussion} discussion\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\n * @public\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.component());\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 {Discussion} discussion\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\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.component(\n {\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 )\n : Button.component(\n {\n icon: 'fas fa-reply',\n className: 'disabled',\n title: app.translator.trans('core.forum.discussion_controls.cannot_reply_text'),\n },\n app.translator.trans('core.forum.discussion_controls.cannot_reply_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 {Discussion} discussion\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\n * @protected\n */\n moderationControls(discussion) {\n const items = new ItemList();\n\n if (discussion.canRename()) {\n items.add(\n 'rename',\n Button.component(\n {\n icon: 'fas fa-pencil-alt',\n onclick: this.renameAction.bind(discussion),\n },\n app.translator.trans('core.forum.discussion_controls.rename_button')\n )\n );\n }\n\n return items;\n },\n\n /**\n * Get controls for a discussion which are destructive (e.g. delete).\n *\n * @param {Discussion} discussion\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\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.component(\n {\n icon: 'far fa-trash-alt',\n onclick: this.hideAction.bind(discussion),\n },\n app.translator.trans('core.forum.discussion_controls.delete_button')\n )\n );\n }\n } else {\n if (discussion.canHide()) {\n items.add(\n 'restore',\n Button.component(\n {\n icon: 'fas fa-reply',\n onclick: this.restoreAction.bind(discussion),\n },\n app.translator.trans('core.forum.discussion_controls.restore_button')\n )\n );\n }\n\n if (discussion.canDelete()) {\n items.add(\n 'delete',\n Button.component(\n {\n icon: 'fas fa-times',\n onclick: this.deleteAction.bind(discussion),\n },\n app.translator.trans('core.forum.discussion_controls.delete_forever_button')\n )\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\n * the discussion is being viewed.\n * @param {Boolean} forceRefresh Whether or not to force a reload of the\n * composer component, even if it is already open for this discussion.\n * @return {Promise}\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}\n */\n hideAction() {\n this.pushAttributes({ hiddenAt: new Date(), hiddenUser: app.session.user });\n\n return this.save({ isHidden: true });\n },\n\n /**\n * Restore a discussion.\n *\n * @return {Promise}\n */\n restoreAction() {\n this.pushAttributes({ hiddenAt: null, 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}\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 * @return {Promise}\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 * TODO: document\n *\n * @param {DOMElement} element\n * @return {Object}\n * @property {function} reset Revert the slider to its original position. This\n * should be called, for example, when a controls dropdown is closed.\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 {Integer} newPos\n * @param {Object} [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 = 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 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';\n\n/**\n * The `DiscussionListItem` component shows a single discussion in the\n * discussion list.\n *\n * ### Attrs\n *\n * - `discussion`\n * - `params`\n */\nexport default class DiscussionListItem extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n /**\n * Set up a subtree retainer so that the discussion will not be redrawn\n * unless new data comes in.\n *\n * @type {SubtreeRetainer}\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 discussion = this.attrs.discussion;\n const user = discussion.user();\n const isUnread = discussion.isUnread();\n const isRead = discussion.isRead();\n\n let jumpTo = 0;\n const controls = DiscussionControls.controls(discussion, this).toArray();\n const attrs = this.elementAttrs();\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(), (discussion.lastReadPostNumber() || 0) + 1);\n }\n\n return (\n <div {...attrs}>\n {controls.length > 0 &&\n Dropdown.component(\n {\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 )}\n\n <span\n className={'Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic' + (isUnread ? '' : ' disabled')}\n onclick={this.markAsRead.bind(this)}\n >\n {icon('fas fa-check')}\n </span>\n\n <div className={classList('DiscussionListItem-content', 'Slidable-content', { unread: isUnread, read: isRead })}>\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, { title: '' })}\n </Link>\n </Tooltip>\n\n <ul className=\"DiscussionListItem-badges badges\">{listItems(discussion.badges().toArray())}</ul>\n\n <Link href={app.route.discussion(discussion, jumpTo)} className=\"DiscussionListItem-main\">\n <h3 className=\"DiscussionListItem-title\">{highlight(discussion.title(), this.highlightRegExp)}</h3>\n <ul className=\"DiscussionListItem-info\">{listItems(this.infoItems().toArray())}</ul>\n </Link>\n {this.replyCountItem()}\n </div>\n </div>\n );\n }\n\n oncreate(vnode) {\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.$());\n\n this.$('.DiscussionListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n }\n }\n\n onbeforeupdate(vnode, old) {\n super.onbeforeupdate(vnode, old);\n\n return this.subtree.needsRebuild();\n }\n\n /**\n * Determine whether or not the discussion is currently being viewed.\n *\n * @return {Boolean}\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 * @return {Boolean}\n */\n showFirstPost() {\n return ['newest', 'oldest'].indexOf(this.attrs.params.sort) !== -1;\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 * @return {ItemList}\n */\n infoItems() {\n const items = new ItemList();\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(\n 'terminalPost',\n TerminalPost.component({\n discussion: this.attrs.discussion,\n lastPost: !this.showFirstPost(),\n })\n );\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 class=\"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 class=\"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';\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 let loading;\n\n if (state.isInitialLoading() || state.isLoadingNext()) {\n loading = <LoadingIndicator />;\n } else if (state.hasNext()) {\n loading = Button.component(\n {\n className: 'Button',\n onclick: state.loadNext.bind(state),\n },\n app.translator.trans('core.forum.discussion_list.load_more_button')\n );\n }\n\n if (state.isEmpty()) {\n const text = app.translator.trans('core.forum.discussion_list.empty_text');\n return <div className=\"DiscussionList\">{Placeholder.component({ text })}</div>;\n }\n\n return (\n <div className={'DiscussionList' + (state.isSearchResults() ? ' DiscussionList--searchResults' : '')}>\n <ul className=\"DiscussionList-discussions\">\n {state.getPages().map((pg) => {\n return pg.items.map((discussion) => (\n <li key={discussion.id()} data-id={discussion.id()}>\n {DiscussionListItem.component({ discussion, 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 <div className=\"DiscussionPage-list\">{this.enoughSpace() && <DiscussionList state={this.attrs.state} />}</div>;\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 – 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","const later =\n window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.msRequestAnimationFrame ||\n window.oRequestAnimationFrame ||\n ((callback) => window.setTimeout(callback, 1000 / 60));\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 * @public\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 later(() => {\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 * @public\n */\n update() {\n this.callback(window.pageYOffset);\n }\n\n /**\n * Start listening to and handling the window's scroll position.\n *\n * @public\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 * @public\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 class=\"username\">\n * tag. If the user doesn't exist, the username will be displayed as [deleted].\n */\nexport default function username(user: User): 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\">\n <header className=\"Post-header\">\n <div className=\"PostUser\">\n <h3>\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 <article className=\"Post ReplyPlaceholder\" onclick={reply}>\n <header className=\"Post-header\">\n {avatar(app.session.user, { className: 'PostUser-avatar' })} {app.translator.trans('core.forum.post_stream.reply_placeholder')}\n </header>\n </article>\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';\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.component({ 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.component();\n }\n\n return (\n <div className=\"PostStream-item\" {...attrs}>\n {content}\n </div>\n );\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 // 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.component({ discussion: this.discussion })}\n </div>\n );\n }\n\n return <div className=\"PostStream\">{items}</div>;\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 {Integer} 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 {Integer} 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('MMMM YYYY');\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 {Integer}\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 {Integer} number\n * @param {Boolean} animate\n * @return {jQuery.Deferred}\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 {Integer} index\n * @param {Boolean} animate\n * @param {Boolean} reply Whether or not to scroll to the reply placeholder.\n * @return {jQuery.Deferred}\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 {jQuery.Deferred}\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 };\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')} {app.translator.trans('core.forum.post_scrubber.original_post_link')}\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 {app.translator.trans('core.forum.post_scrubber.unread_text', { count: unreadCount })}\n </div>\n </div>\n\n <a className=\"Scrubber-last\" onclick={this.goToLast.bind(this)}>\n {icon('fas fa-angle-double-down')} {app.translator.trans('core.forum.post_scrubber.now_link')}\n </a>\n </div>\n </div>\n </div>\n );\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 {Boolean} animate\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 {Object}\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 from './Dropdown';\nimport Button from './Button';\nimport icon from '../helpers/icon';\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) {\n super.initAttrs(attrs);\n\n attrs.className += ' Dropdown--split';\n attrs.menuClassName += ' Dropdown-menu--right';\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 const buttonAttrs = Object.assign({}, firstChild.attrs);\n buttonAttrs.className = (buttonAttrs.className || '') + ' SplitDropdown-button Button ' + this.attrs.buttonClassName;\n\n return [\n Button.component(buttonAttrs, firstChild.children),\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 {icon(this.attrs.icon, { className: 'Button-icon' })}\n {icon('fas fa-caret-down', { className: 'Button-caret' })}\n </button>,\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 * @return {*}\n * @protected\n */\n getFirstChild(children) {\n let firstChild = children;\n\n while (firstChild instanceof Array) firstChild = firstChild[0];\n\n return firstChild;\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 {DOMElement} element The element to anchor the scroll position to.\n * @param {Function} 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';\n\nclass PostStreamState {\n constructor(discussion, includedPosts = []) {\n /**\n * The discussion to display the post stream for.\n *\n * @type {Discussion}\n */\n this.discussion = discussion;\n\n /**\n * Whether or not the infinite-scrolling auto-load functionality is\n * disabled.\n *\n * @type {Boolean}\n */\n this.paused = false;\n\n this.loadPageTimeouts = {};\n this.pagesLoading = 0;\n\n this.index = 0;\n this.number = 1;\n\n /**\n * The number of posts that are currently visible in the viewport.\n *\n * @type {Number}\n */\n this.visible = 1;\n\n /**\n * The description to render on the scrubber.\n *\n * @type {String}\n */\n this.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 * @type {Boolean}\n */\n this.forceUpdateScrubber = false;\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 * @public\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 * @return {Promise}\n */\n goToFirst() {\n return this.goToIndex(0);\n }\n\n /**\n * Load and scroll down to the last post in the discussion.\n *\n * @return {Promise}\n */\n goToLast() {\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|String} number The post number to go to. If 'reply', go to\n * the last post and scroll the reply preview into view.\n * @param {Boolean} noAnimation\n * @return {Promise}\n */\n goToNumber(number, noAnimation = false) {\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.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 * @param {number} index\n * @param {Boolean} noAnimation\n * @return {Promise}\n */\n goToIndex(index, noAnimation = false) {\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 * @param {number} number\n * @return {Promise}\n */\n loadNearNumber(number) {\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('posts', {\n filter: { discussion: this.discussion.id() },\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 * @param {number} index\n * @return {Promise}\n */\n loadNearIndex(index) {\n if (index >= this.visibleStart && index < this.visibleEnd) {\n return Promise.resolve();\n }\n\n const start = this.sanitizeIndex(index - this.constructor.loadCount / 2);\n const end = start + this.constructor.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 + this.constructor.loadCount));\n\n // Unload the posts which are two pages back from the page we're currently\n // loading.\n const twoPagesAway = start - this.constructor.loadCount * 2;\n if (twoPagesAway > this.visibleStart && twoPagesAway >= 0) {\n this.visibleStart = twoPagesAway + this.constructor.loadCount + 1;\n\n if (this.loadPageTimeouts[twoPagesAway]) {\n clearTimeout(this.loadPageTimeouts[twoPagesAway]);\n this.loadPageTimeouts[twoPagesAway] = null;\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 - this.constructor.loadCount));\n\n // Unload the posts which are two pages back from the page we're currently\n // loading.\n const twoPagesAway = start + this.constructor.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 this.loadPageTimeouts[twoPagesAway] = null;\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 * @param {number} start\n * @param {number} end\n * @param {Boolean} backwards\n */\n loadPage(start, end, 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 this.loadPageTimeouts[start] = null;\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 * @param {number} start\n * @param {number} end\n * @return {Promise}\n */\n loadRange(start, end) {\n const loadIds = [];\n const loaded = [];\n\n this.discussion\n .postIds()\n .slice(start, end)\n .forEach((id) => {\n const post = app.store.getById('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('posts', loadIds).then((newPosts) => {\n return loaded.concat(newPosts).sort((a, b) => a.createdAt() - b.createdAt());\n });\n }\n\n return Promise.resolve(loaded);\n }\n\n /**\n * Set up the stream with the given array of posts.\n *\n * @param {Post[]} posts\n */\n show(posts) {\n this.visibleStart = posts.length ? this.discussion.postIds().indexOf(posts[0].id()) : 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 * @param {number} [start]\n * @param {number} [end]\n */\n reset(start, end) {\n this.visibleStart = start || 0;\n this.visibleEnd = this.sanitizeIndex(end || this.constructor.loadCount);\n }\n\n /**\n * Get the visible page of posts.\n *\n * @return {Post[]}\n */\n posts() {\n return this.discussion\n .postIds()\n .slice(this.visibleStart, this.visibleEnd)\n .map((id) => {\n const post = app.store.getById('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 * @return {number}\n */\n count() {\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 * @return {Boolean}\n */\n disabled() {\n return this.visible >= this.count();\n }\n\n /**\n * Are we currently viewing the end of the discussion?\n *\n * @return {boolean}\n */\n viewingEnd() {\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 * @param {number} index\n */\n sanitizeIndex(index) {\n return Math.max(0, Math.min(this.count(), Math.floor(index)));\n }\n}\n\n/**\n * The number of posts to load per page.\n *\n * @type {number}\n */\nPostStreamState.loadCount = 20;\n\nexport default PostStreamState;\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';\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 – if it did,\n // then the pane would redraw which would be slow and would cause problems with\n // event handlers.\n if (app.discussions.hasItems()) {\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 – unless it's empty, in which case\n // we'll just close it.\n app.pane?.disable();\n\n if (app.composer.composingReplyTo(this.discussion) && !app.composer?.fields?.content()) {\n app.composer.hide();\n } else {\n app.composer.minimize();\n }\n }\n\n view() {\n return (\n <div className=\"DiscussionPage\">\n <DiscussionListPane state={app.discussions} />\n <div className=\"DiscussionPage-discussion\">{this.discussion ? this.pageContent().toArray() : this.loadingItems().toArray()}</div>\n </div>\n );\n }\n\n /**\n * List of components shown while the discussion is loading.\n *\n * @returns {ItemList}\n */\n loadingItems() {\n const items = new ItemList();\n\n items.add('spinner', <LoadingIndicator />, 100);\n\n return items;\n }\n\n /**\n * Function that renders the `sidebarItems` ItemList.\n *\n * @returns {import('mithril').Children}\n */\n sidebar() {\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 * @returns {import('mithril').Children}\n */\n hero() {\n return <DiscussionHero discussion={this.discussion} />;\n }\n\n /**\n * List of items rendered as the main page content.\n *\n * @returns {ItemList}\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 /**\n * List of items rendered inside the main page content container.\n *\n * @returns {ItemList}\n */\n mainContent() {\n const items = new ItemList();\n\n items.add('sidebar', this.sidebar(), 100);\n\n items.add(\n 'poststream',\n <div className=\"DiscussionPage-stream\">\n {PostStream.component({\n discussion: this.discussion,\n stream: this.stream,\n onPositionChange: this.positionChanged.bind(this),\n })}\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() {\n const preloadedDiscussion = app.preloadedApiDocument() as Discussion | null;\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('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 * @return {Object}\n */\n requestParams() {\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: Discussion) {\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) –\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 = [];\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 record.relationships.discussion.data.id === discussionId\n )\n .map((record) => app.store.getById('posts', record.id))\n .sort((a: Post, b: Post) => a.createdAt() - b.createdAt())\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 this.stream.goToNumber(m.route.param('near') || (includedPosts[0] && includedPosts[0].number()), 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.Vnode>();\n\n items.add(\n 'controls',\n SplitDropdown.component(\n {\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 ),\n 100\n );\n\n items.add(\n 'scrubber',\n PostStreamScrubber.component({\n stream: this.stream,\n className: 'App-titleControl',\n }),\n -100\n );\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}\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() === attrs.href;\n }\n}\n","import app from '../../forum/app';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Dropdown 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';\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 extends Dropdown {\n static initAttrs(attrs) {\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 = app.translator.trans('core.forum.header.session_dropdown_accessible_label');\n }\n\n view(vnode) {\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 * @return {ItemList}\n */\n items() {\n const items = new ItemList();\n const user = app.session.user;\n\n items.add(\n 'profile',\n LinkButton.component(\n {\n icon: 'fas fa-user',\n href: app.route.user(user),\n },\n app.translator.trans('core.forum.header.profile_button')\n ),\n 100\n );\n\n items.add(\n 'settings',\n LinkButton.component(\n {\n icon: 'fas fa-cog',\n href: app.route('settings'),\n },\n app.translator.trans('core.forum.header.settings_button')\n ),\n 50\n );\n\n if (app.forum.attribute('adminUrl')) {\n items.add(\n 'administration',\n LinkButton.component(\n {\n icon: 'fas fa-wrench',\n href: app.forum.attribute('adminUrl'),\n target: '_blank',\n },\n app.translator.trans('core.forum.header.admin_button')\n ),\n 0\n );\n }\n\n items.add('separator', Separator.component(), -90);\n\n items.add(\n 'logOut',\n Button.component(\n {\n icon: 'fas fa-sign-out-alt',\n onclick: app.session.logout.bind(app.session),\n },\n app.translator.trans('core.forum.header.log_out_button')\n ),\n -100\n );\n\n return items;\n }\n}\n","import Dropdown from './Dropdown';\nimport icon from '../helpers/icon';\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) {\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 ('initAttrs' in tag) {\n tag.initAttrs(vnode.attrs);\n }\n\n return 'isActive' in tag ? tag.isActive(vnode.attrs) : vnode.attrs.active;\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 *\n * ### Attrs\n *\n * - `caretIcon`\n * - `defaultLabel`\n */\nexport default class SelectDropdown extends Dropdown {\n static initAttrs(attrs) {\n attrs.caretIcon = typeof attrs.caretIcon !== 'undefined' ? attrs.caretIcon : 'fas fa-sort';\n\n super.initAttrs(attrs);\n\n attrs.className += ' Dropdown--select';\n }\n\n getButtonContent(children) {\n const activeChild = children.find(isActive);\n let label = (activeChild && activeChild.children) || this.attrs.defaultLabel;\n\n if (label instanceof Array) label = label[0];\n\n return [<span className=\"Button-label\">{label}</span>, icon(this.attrs.caretIcon, { className: 'Button-caret' })];\n }\n}\n","import app from '../common/app';\n\n/**\n * The `Model` class represents a local data resource. It provides methods to\n * persist changes via the API.\n *\n * @abstract\n */\nexport default class Model {\n /**\n * @param {Object} data A resource object from the API.\n * @param {Store} store The data store that this model should be persisted to.\n * @public\n */\n constructor(data = {}, store = null) {\n /**\n * The resource object from the API.\n *\n * @type {Object}\n * @public\n */\n this.data = data;\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 * @type {Date}\n * @public\n */\n this.freshness = new Date();\n\n /**\n * Whether or not the resource exists on the server.\n *\n * @type {Boolean}\n * @public\n */\n this.exists = false;\n\n /**\n * The data store that this resource should be persisted to.\n *\n * @type {Store}\n * @protected\n */\n this.store = store;\n }\n\n /**\n * Get the model's ID.\n *\n * @return {Integer}\n * @public\n * @final\n */\n id() {\n return this.data.id;\n }\n\n /**\n * Get one of the model's attributes.\n *\n * @param {String} attribute\n * @return {*}\n * @public\n * @final\n */\n attribute(attribute) {\n return this.data.attributes[attribute];\n }\n\n /**\n * Merge new data into this model locally.\n *\n * @param {Object} data A resource object to merge into this model\n * @public\n */\n pushData(data) {\n // Since most of the top-level items in a resource object are objects\n // (e.g. relationships, attributes), we'll need to check and perform the\n // merge at the second level if that's the case.\n for (const key in data) {\n if (typeof data[key] === 'object') {\n this.data[key] = this.data[key] || {};\n\n // For every item in a second-level object, we want 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 innerKey in data[key]) {\n if (data[key][innerKey] instanceof Model) {\n data[key][innerKey] = { data: Model.getIdentifier(data[key][innerKey]) };\n }\n this.data[key][innerKey] = data[key][innerKey];\n }\n } else {\n this.data[key] = data[key];\n }\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\n /**\n * Merge new attributes into this model locally.\n *\n * @param {Object} attributes The attributes to merge.\n * @public\n */\n pushAttributes(attributes) {\n this.pushData({ attributes });\n }\n\n /**\n * Merge new attributes into this model, both locally and with persistence.\n *\n * @param {Object} attributes The attributes to save. If a 'relationships' key\n * exists, it will be extracted and relationships will also be saved.\n * @param {Object} [options]\n * @return {Promise}\n * @public\n */\n save(attributes, options = {}) {\n const data = {\n type: this.data.type,\n id: this.data.id,\n attributes,\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 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 = { data };\n if (options.meta) request.meta = options.meta;\n\n return app\n .request(\n Object.assign(\n {\n method: this.exists ? 'PATCH' : 'POST',\n url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n body: request,\n },\n options\n )\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 this.store.data[payload.data.type] = this.store.data[payload.data.type] || {};\n this.store.data[payload.data.type][payload.data.id] = this;\n return this.store.pushPayload(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 (response) => {\n this.pushData(oldData);\n m.redraw();\n throw response;\n }\n );\n }\n\n /**\n * Send a request to delete the resource.\n *\n * @param {Object} body Data to send along with the DELETE request.\n * @param {Object} [options]\n * @return {Promise}\n * @public\n */\n delete(body, options = {}) {\n if (!this.exists) return Promise.resolve();\n\n return app\n .request(\n Object.assign(\n {\n method: 'DELETE',\n url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n body,\n },\n options\n )\n )\n .then(() => {\n this.exists = false;\n this.store.remove(this);\n });\n }\n\n /**\n * Construct a path to the API endpoint for this resource.\n *\n * @return {String}\n * @protected\n */\n apiEndpoint() {\n return '/' + this.data.type + (this.exists ? '/' + this.data.id : '');\n }\n\n copyData() {\n return JSON.parse(JSON.stringify(this.data));\n }\n\n /**\n * Generate a function which returns the value of the given attribute.\n *\n * @param {String} name\n * @param {function} [transform] A function to transform the attribute value\n * @return {*}\n * @public\n */\n static attribute(name, transform) {\n return function () {\n const value = this.data.attributes && this.data.attributes[name];\n\n return transform ? transform(value) : value;\n };\n }\n\n /**\n * Generate a function which returns the value of the given has-one\n * relationship.\n *\n * @param {String} name\n * @return {Model|Boolean|undefined} 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 * @public\n */\n static hasOne(name) {\n return function () {\n if (this.data.relationships) {\n const relationship = this.data.relationships[name];\n\n if (relationship) {\n return app.store.getById(relationship.data.type, relationship.data.id);\n }\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 * @param {String} name\n * @return {Array|Boolean} 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 * @public\n */\n static hasMany(name) {\n return function () {\n if (this.data.relationships) {\n const relationship = this.data.relationships[name];\n\n if (relationship) {\n return relationship.data.map((data) => app.store.getById(data.type, data.id));\n }\n }\n\n return false;\n };\n }\n\n /**\n * Transform the given value into a Date object.\n *\n * @param {String} value\n * @return {Date|null}\n * @public\n */\n static transformDate(value) {\n return value ? new Date(value) : null;\n }\n\n /**\n * Get a resource identifier object for the given model.\n *\n * @param {Model} model\n * @return {Object}\n * @protected\n */\n static getIdentifier(model) {\n if (!model) return model;\n\n return {\n type: model.data.type,\n id: model.data.id,\n };\n }\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 {...String} dependentKeys The keys of the dependent values.\n * @param {function} compute The function which computes the value using the\n * dependent values.\n * @return {Function}\n */\nexport default function computed(...dependentKeys) {\n const keys = dependentKeys.slice(0, -1);\n const compute = dependentKeys.slice(-1)[0];\n\n const dependentValues = {};\n let computedValue;\n\n return function () {\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 value = typeof this[key] === 'function' ? this[key]() : this[key];\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","import Tooltip from './Tooltip';\nimport Component from '../Component';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\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 extends Component {\n view() {\n const { type, icon: iconName, label, color, style = {}, ...attrs } = this.attrs;\n\n const className = classList('Badge', [type && `Badge--${type}`], attrs.className);\n\n const iconChild = iconName ? icon(iconName, { className: 'Badge-icon' }) : m.trust(' ');\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';\n\nexport default class Discussion extends Model {}\n\nObject.assign(Discussion.prototype, {\n title: Model.attribute('title'),\n slug: Model.attribute('slug'),\n\n createdAt: Model.attribute('createdAt', Model.transformDate),\n user: Model.hasOne('user'),\n firstPost: Model.hasOne('firstPost'),\n\n lastPostedAt: Model.attribute('lastPostedAt', Model.transformDate),\n lastPostedUser: Model.hasOne('lastPostedUser'),\n lastPost: Model.hasOne('lastPost'),\n lastPostNumber: Model.attribute('lastPostNumber'),\n\n commentCount: Model.attribute('commentCount'),\n replyCount: computed('commentCount', (commentCount) => Math.max(0, commentCount - 1)),\n posts: Model.hasMany('posts'),\n mostRelevantPost: Model.hasOne('mostRelevantPost'),\n\n lastReadAt: Model.attribute('lastReadAt', Model.transformDate),\n lastReadPostNumber: Model.attribute('lastReadPostNumber'),\n isUnread: computed('unreadCount', (unreadCount) => !!unreadCount),\n isRead: computed('unreadCount', (unreadCount) => app.session.user && !unreadCount),\n\n hiddenAt: Model.attribute('hiddenAt', Model.transformDate),\n hiddenUser: Model.hasOne('hiddenUser'),\n isHidden: computed('hiddenAt', (hiddenAt) => !!hiddenAt),\n\n canReply: Model.attribute('canReply'),\n canRename: Model.attribute('canRename'),\n canHide: Model.attribute('canHide'),\n canDelete: Model.attribute('canDelete'),\n\n /**\n * Remove a post from the discussion's posts relationship.\n *\n * @param {Integer} id The ID of the post to remove.\n * @public\n */\n removePost(id) {\n const relationships = this.data.relationships;\n const posts = relationships && relationships.posts;\n\n if (posts) {\n posts.data.some((data, i) => {\n if (id === data.id) {\n posts.data.splice(i, 1);\n return true;\n }\n });\n }\n },\n\n /**\n * Get the estimated number of unread posts in this discussion for the current\n * user.\n *\n * @return {Integer}\n * @public\n */\n unreadCount() {\n const user = app.session.user;\n\n if (user && user.markedAllAsReadAt() < this.lastPostedAt()) {\n const unreadCount = Math.max(0, this.lastPostNumber() - (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());\n }\n\n return 0;\n },\n\n /**\n * Get the Badge components that apply to this discussion.\n *\n * @return {ItemList}\n * @public\n */\n badges() {\n const items = new ItemList();\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 * @return {Array}\n * @public\n */\n postIds() {\n const posts = this.data.relationships.posts;\n\n return posts ? posts.data.map((link) => link.id) : [];\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","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';\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\">\n <Button\n className=\"Button Button--link\"\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 </div>\n </div>\n\n <div className=\"NotificationList-content\">{this.content(state)}</div>\n </div>\n );\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 NotificationComponent ? <li>{NotificationComponent.component({ notification })}</li> : '';\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 from '../../common/components/Dropdown';\nimport icon from '../../common/helpers/icon';\nimport classList from '../../common/utils/classList';\nimport NotificationList from './NotificationList';\n\nexport default class NotificationsDropdown extends Dropdown {\n static initAttrs(attrs) {\n attrs.className = attrs.className || 'NotificationsDropdown';\n attrs.buttonClassName = attrs.buttonClassName || 'Button Button--flat';\n attrs.menuClassName = attrs.menuClassName || 'Dropdown-menu--right';\n attrs.label = attrs.label || app.translator.trans('core.forum.notifications.tooltip');\n attrs.icon = attrs.icon || 'fas fa-bell';\n\n // For best a11y support, both `title` and `aria-label` should be used\n attrs.accessibleToggleLabel = attrs.accessibleToggleLabel || app.translator.trans('core.forum.notifications.toggle_dropdown_accessible_label');\n\n super.initAttrs(attrs);\n }\n\n getButton() {\n const newNotifications = this.getNewCount();\n const vdom = super.getButton();\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() {\n const unread = this.getUnreadCount();\n\n return [\n icon(this.attrs.icon, { className: 'Button-icon' }),\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.component({ 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) {\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.which === 2) e.stopPropagation();\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","import app from '../../forum/app';\nimport highlight from '../../common/helpers/highlight';\nimport LinkButton from '../../common/components/LinkButton';\nimport Link from '../../common/components/Link';\nimport { SearchSource } from './Search';\nimport type Mithril from 'mithril';\nimport Discussion from '../../common/models/Discussion';\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\n async search(query: string): Promise<void> {\n query = query.toLowerCase();\n\n this.results.set(query, []);\n\n const params = {\n filter: { q: query },\n page: { limit: 3 },\n include: 'mostRelevantPost',\n };\n\n return app.store.find('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 const results = (this.results.get(query) || []).map((discussion) => {\n const mostRelevantPost = discussion.mostRelevantPost();\n\n return (\n <li className=\"DiscussionSearchResult\" data-index={'discussions' + discussion.id()}>\n <Link href={app.route.discussion(discussion, mostRelevantPost && mostRelevantPost.number())}>\n <div className=\"DiscussionSearchResult-title\">{highlight(discussion.title(), query)}</div>\n {mostRelevantPost ? <div className=\"DiscussionSearchResult-excerpt\">{highlight(mostRelevantPost.contentPlain(), query, 100)}</div> : ''}\n </Link>\n </li>\n );\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: query })}>\n {app.translator.trans('core.forum.search.all_discussions_button', { query })}\n </LinkButton>\n </li>,\n ...results,\n ];\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('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('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 '../utils/KeyboardNavigatable';\nimport icon from '../../common/helpers/icon';\nimport SearchState from '../states/SearchState';\nimport DiscussionsSearchSource from './DiscussionsSearchSource';\nimport UsersSearchSource from './UsersSearchSource';\nimport type Mithril from 'mithril';\nimport Model from '../../common/Model';\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> {\n /**\n * The minimum query length before sources are searched.\n */\n protected static MIN_SEARCH_LEN = 3;\n\n protected searchState!: SearchState;\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?: NodeJS.Timeout;\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.loadingSources && 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 >\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('.Search-results')?.setAttribute('style', `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 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 = 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 }, 250);\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 */\n getCurrentNumericIndex(): number {\n return 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.component({ 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.component(\n {\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 )\n );\n }\n\n items.add(\n 'locale',\n SelectDropdown.component(\n {\n buttonClassName: 'Button Button--link',\n accessibleToggleLabel: app.translator.trans('core.forum.header.locale_dropdown_accessible_label'),\n },\n locales\n ),\n 20\n );\n }\n\n if (app.session.user) {\n items.add('notifications', NotificationsDropdown.component({ state: app.notifications }), 10);\n items.add('session', SessionDropdown.component(), 0);\n } else {\n if (app.forum.attribute('allowSignUp')) {\n items.add(\n 'signUp',\n Button.component(\n {\n className: 'Button Button--link',\n onclick: () => app.modal.show(SignUpModal),\n },\n app.translator.trans('core.forum.header.sign_up_link')\n ),\n 10\n );\n }\n\n items.add(\n 'logIn',\n Button.component(\n {\n className: 'Button Button--link',\n onclick: () => app.modal.show(LogInModal),\n },\n app.translator.trans('core.forum.header.log_in_link')\n ),\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';\nimport EditorDriverInterface from '../../common/utils/EditorDriverInterface';\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 {Integer}\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 {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 {ComposerBody} componentClass\n * @public\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 * @public\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 * @public\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 * @public\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 * @public\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 * @public\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 * @public\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\n * 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 * @public\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 {Discussion} 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 {Function} 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 {Integer}\n */\n minimumHeight() {\n return 200;\n }\n\n /**\n * Maxmimum height of the Composer.\n * @returns {Integer}\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's\n * content's DOM element.\n * @returns {Integer|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 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 {body.componentClass ? body.componentClass.component({ ...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 {Event} 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}\n */\n controlItems() {\n const items = new ItemList();\n\n if (this.state.position === ComposerState.Position.FULLSCREEN) {\n items.add(\n 'exitFullScreen',\n ComposerButton.component({\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.component({\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.component({\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.component({\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 {Integer}\n */\n defaultHeight() {\n return this.$().height();\n }\n\n /**\n * Save a new Composer height and update the DOM.\n * @param {Integer} 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 Component 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';\n\n/**\n * The `Notification` component abstract displays a single notification.\n * Subclasses should implement the `icon`, `href`, and `content` methods.\n *\n * ### Attrs\n *\n * - `notification`\n *\n * @abstract\n */\nexport default class Notification extends Component {\n view() {\n const notification = this.attrs.notification;\n const href = this.href();\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(notification.fromUser())}\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) => {\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 * @return {String}\n * @abstract\n */\n icon() {}\n\n /**\n * Get the URL that the notification should link to.\n *\n * @return {String}\n * @abstract\n */\n href() {}\n\n /**\n * Get the content of the notification.\n *\n * @return {VirtualElement}\n * @abstract\n */\n content() {}\n\n /**\n * Get the excerpt of the notification.\n *\n * @return {VirtualElement}\n * @abstract\n */\n excerpt() {}\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 });\n\n this.attrs.notification.save({ isRead: true });\n }\n}\n","import app from '../../forum/app';\nimport Notification from './Notification';\n\n/**\n * The `DiscussionRenamedNotification` component displays a notification which\n * indicates that a discussion has had its title changed.\n *\n * ### Attrs\n *\n * - All of the attrs for Notification\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\n return app.route.discussion(notification.subject(), notification.content().postNumber);\n }\n\n content() {\n return app.translator.trans('core.forum.notifications.discussion_renamed_text', { user: this.attrs.notification.fromUser() });\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 {Object}\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 let alert;\n const viewButton = Button.component(\n {\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 );\n alert = app.alerts.show(\n {\n type: 'success',\n controls: [viewButton],\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 {Post} post\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\n * @public\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.component());\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 {Post} post\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\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 {Post} post\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\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.component(\n {\n icon: 'fas fa-pencil-alt',\n onclick: this.editAction.bind(post),\n },\n app.translator.trans('core.forum.post_controls.edit_button')\n )\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 {Post} post\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\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.component(\n {\n icon: 'far fa-trash-alt',\n onclick: this.hideAction.bind(post),\n },\n app.translator.trans('core.forum.post_controls.delete_button')\n )\n );\n }\n } else {\n if (post.contentType() === 'comment' && post.canHide()) {\n items.add(\n 'restore',\n Button.component(\n {\n icon: 'fas fa-reply',\n onclick: this.restoreAction.bind(post),\n },\n app.translator.trans('core.forum.post_controls.restore_button')\n )\n );\n }\n if (post.canDelete()) {\n items.add(\n 'delete',\n Button.component(\n {\n icon: 'fas fa-times',\n onclick: this.deleteAction.bind(post, context),\n },\n app.translator.trans('core.forum.post_controls.delete_forever_button')\n )\n );\n }\n }\n\n return items;\n },\n\n /**\n * Open the composer to edit a post.\n *\n * @return {Promise}\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}\n */\n hideAction() {\n if (!confirm(extractText(app.translator.trans('core.forum.post_controls.hide_confirmation')))) return;\n this.pushAttributes({ hiddenAt: new Date(), 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}\n */\n restoreAction() {\n this.pushAttributes({ hiddenAt: null, hiddenUser: null });\n\n return this.save({ isHidden: false }).then(() => m.redraw());\n },\n\n /**\n * Delete a post.\n *\n * @return {Promise}\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 from '../../common/Component';\nimport SubtreeRetainer from '../../common/utils/SubtreeRetainer';\nimport Dropdown from '../../common/components/Dropdown';\nimport PostControls from '../utils/PostControls';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\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 *\n * ### Attrs\n *\n * - `post`\n *\n * @abstract\n */\nexport default class Post extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n /**\n * May be set by subclasses.\n */\n this.loading = false;\n\n /**\n * Set up a subtree retainer so that the post will not be redrawn\n * unless new data comes in.\n *\n * @type {SubtreeRetainer}\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 () => this.controlsOpen\n );\n }\n\n view() {\n const attrs = this.elementAttrs();\n\n attrs.className = this.classes(attrs.className).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>\n {this.loading ? <LoadingIndicator /> : this.content()}\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-actions').addClass('open')}\n onhide={() => this.$('.Post-actions').removeClass('open')}\n accessibleToggleLabel={app.translator.trans('core.forum.post_controls.toggle_dropdown_accessible_label')}\n >\n {controls}\n </Dropdown>\n </li>\n ) : (\n ''\n )}\n </ul>\n </aside>\n <footer className=\"Post-footer\">{footerItems.length ? <ul>{listItems(footerItems)}</ul> : null}</footer>\n </div>\n </article>\n );\n }\n\n onbeforeupdate(vnode) {\n super.onbeforeupdate(vnode);\n\n return this.subtree.needsRebuild();\n }\n\n onupdate(vnode) {\n super.onupdate(vnode);\n\n const $actions = this.$('.Post-actions');\n const $controls = this.$('.Post-controls');\n\n $actions.toggleClass('open', $controls.hasClass('open'));\n }\n\n /**\n * Get attributes for the post element.\n *\n * @return {Object}\n */\n elementAttrs() {\n return {};\n }\n\n /**\n * Get the post's content.\n *\n * @return {Array}\n */\n content() {\n return [];\n }\n\n /**\n * Get the post's classes.\n *\n * @param existing string\n * @returns {string[]}\n */\n classes(existing) {\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.id() === discussion.attribute('startUserId')) {\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 * @return {ItemList}\n */\n actionItems() {\n return new ItemList();\n }\n\n /**\n * Build an item list for the post's footer.\n *\n * @return {ItemList}\n */\n footerItems() {\n return new ItemList();\n }\n}\n","import Badge from './Badge';\n\nexport default class GroupBadge extends Badge {\n static initAttrs(attrs) {\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\nclass Group extends Model {}\n\nObject.assign(Group.prototype, {\n nameSingular: Model.attribute('nameSingular'),\n namePlural: Model.attribute('namePlural'),\n color: Model.attribute('color'),\n icon: Model.attribute('icon'),\n isHidden: Model.attribute('isHidden'),\n});\n\nGroup.ADMINISTRATOR_ID = '1';\nGroup.GUEST_ID = '2';\nGroup.MEMBER_ID = '3';\n\nexport default Group;\n","import app from '../../common/app';\nimport Modal 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';\n\n/**\n * The `EditUserModal` component displays a modal dialog with a login form.\n */\nexport default class EditUserModal extends Modal {\n oninit(vnode) {\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);\n this.password = Stream(user.password() || '');\n this.groups = {};\n\n app.store\n .all('groups')\n .filter((group) => [Group.GUEST_ID, Group.MEMBER_ID].indexOf(group.id()) === -1)\n .forEach((group) => (this.groups[group.id()] = Stream(user.groups().indexOf(group) !== -1)));\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 (app.session.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.component(\n {\n className: 'Button Button--block',\n loading: this.loading,\n onclick: this.activate.bind(this),\n },\n app.translator.trans('core.lib.edit_user.activate_button')\n )}\n </div>\n ) : (\n ''\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) => {\n this.setPassword(e.target.checked);\n m.redraw.sync();\n if (e.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 ''\n )}\n </div>\n </div>,\n 20\n );\n }\n }\n\n if (app.session.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('groups', id))\n .map((group) => (\n <label className=\"checkbox\">\n <input\n type=\"checkbox\"\n bidi={this.groups[group.id()]}\n disabled={group.id() === Group.ADMINISTRATOR_ID && (this.attrs.user === app.session.user || !this.userIsAdmin(app.session.user))}\n />\n {GroupBadge.component({ group, label: '' })} {group.nameSingular()}\n </label>\n ))}\n </div>\n </div>,\n 10\n );\n }\n\n items.add(\n 'submit',\n <div className=\"Form-group\">\n {Button.component(\n {\n className: 'Button Button--primary',\n type: 'submit',\n loading: this.loading,\n },\n app.translator.trans('core.lib.edit_user.submit_button')\n )}\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 = {\n relationships: {},\n };\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 data.relationships.groups = Object.keys(this.groups)\n .filter((id) => this.groups[id]())\n .map((id) => app.store.getById('groups', id));\n }\n\n return data;\n }\n\n onsubmit(e) {\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() {\n return this.userIsAdmin(this.attrs.user) && !this.userIsAdmin(app.session.user);\n }\n\n /**\n * @internal\n * @protected\n */\n userIsAdmin(user) {\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 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';\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 extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n /**\n * The user this page is for.\n *\n * @type {User}\n */\n this.user = null;\n\n this.bodyClass = 'App--user';\n }\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 * @return {VirtualElement}\n */\n content() {}\n\n /**\n * Initialize the component with a user, and trigger the loading of their\n * activity feed.\n *\n * @param {User} user\n * @protected\n */\n show(user) {\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 * @param {String} username\n */\n loadUser(username) {\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('users').some((user) => {\n if ((user.username().toLowerCase() === lowercaseUsername || user.id() === username) && user.joinTime()) {\n this.show(user);\n return true;\n }\n });\n\n if (!this.user) {\n app.store.find('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 * @return {ItemList}\n */\n sidebarItems() {\n const items = new ItemList();\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 * @return {ItemList}\n */\n navItems() {\n const items = new ItemList();\n const user = this.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 (app.session.user === user) {\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 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 {User} user\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\n * @public\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 {User} user\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\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 {User} user\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\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 {User} user\n * @param {*} context The parent component under which the controls menu will\n * be displayed.\n * @return {ItemList}\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 {User} 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 {User} 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 {User} 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)}\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}\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 {Event} 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 {Event} 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 {Event} 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 {Event} 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 recomputation 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';\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={'UserCard ' + (this.attrs.className || '')} style={color && { '--usercard-bg': color }}>\n <div className=\"darkenBackground\">\n <div className=\"container\">\n {controls.length\n ? Dropdown.component(\n {\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 )\n : ''}\n\n <div className=\"UserCard-profile\">\n <h2 className=\"UserCard-identity\">\n {this.attrs.editable ? (\n [AvatarEditor.component({ user, className: 'UserCard-avatar' }), username(user)]\n ) : (\n <Link href={app.route.user(user)}>\n <div className=\"UserCard-avatar\">{avatar(user)}</div>\n {username(user)}\n </Link>\n )}\n </h2>\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}\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={'UserCard-lastSeen' + (online ? ' 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 );\n }\n\n items.add('joined', app.translator.trans('core.forum.user.joined_date_text', { ago: humanTime(user.joinTime()) }));\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>\n {avatar(user, { className: 'PostUser-avatar' })} {username(user)}\n </h3>\n </div>\n );\n }\n\n let card = '';\n\n if (!post.isHidden() && this.attrs.cardVisible) {\n card = UserCard.component({\n user,\n className: 'UserCard--popover',\n controlsButtonClassName: 'Button Button--icon Button--flat',\n });\n }\n\n return (\n <div className=\"PostUser\">\n <h3>\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 {card}\n </div>\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n let timeout;\n\n this.$()\n .on('mouseover', 'h3 a, .UserCard', () => {\n clearTimeout(timeout);\n timeout = setTimeout(this.showCard.bind(this), 500);\n })\n .on('mouseout', 'h3 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 app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/helpers/humanTime';\nimport fullTime from '../../common/helpers/fullTime';\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 const post = this.attrs.post;\n const time = post.createdAt();\n const permalink = this.getPermalink(post);\n const touch = 'ontouchstart' in document.documentElement;\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 const selectPermalink = function (e) {\n setTimeout(() => $(this).parent().find('.PostMeta-permalink').select());\n\n e.redraw = false;\n };\n\n return (\n <div className=\"Dropdown PostMeta\">\n <a className=\"Dropdown-toggle\" onclick={selectPermalink} data-toggle=\"dropdown\">\n {humanTime(time)}\n </a>\n\n <div className=\"Dropdown-menu dropdown-menu\">\n <span className=\"PostMeta-number\">{app.translator.trans('core.forum.post.number_tooltip', { number: post.number() })}</span>{' '}\n <span className=\"PostMeta-time\">{fullTime(time)}</span> <span className=\"PostMeta-ip\">{post.data.attributes.ipAddress}</span>\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 </div>\n </div>\n );\n }\n\n /**\n * Get the permalink for the given post.\n *\n * @param {Post} post\n * @returns {String}\n */\n getPermalink(post) {\n return window.location.origin + app.route.post(post);\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 class=\"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([\n <header className=\"Post-header\">\n <ul>{listItems(this.headerItems().toArray())}</ul>\n </header>,\n <div className=\"Post-body\">\n {this.isEditing() ? <ComposerPostPreview className=\"Post-preview\" composer={app.composer} /> : m.trust(this.attrs.post.contentHtml())}\n </div>,\n ]);\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 =\n (attrs.className || '') +\n ' ' +\n classList({\n CommentPost: true,\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 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}\n */\n headerItems() {\n const items = new ItemList();\n const post = this.attrs.post;\n\n items.add(\n 'user',\n PostUser.component({\n 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.component({ post }));\n\n if (post.isEdited() && !post.isHidden()) {\n items.add('edited', PostEdited.component({ 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.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 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';\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 = (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 });\n\n return super.content().concat([icon(this.icon(), { className: 'EventPost-icon' }), <div class=\"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 {Object} data\n * @return {String|Object} 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 {Object}\n */\n descriptionData() {\n return {};\n }\n}\n","import app from '../../forum/app';\nimport EventPost from './EventPost';\nimport extractText from '../../common/utils/extractText';\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 const oldName = app.translator.trans('core.forum.post_stream.discussion_renamed_old_tooltip', data);\n\n return <span title={extractText(oldName)}>{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 old: oldTitle,\n new: <strong className=\"DiscussionRenamedPost-new\">{newTitle}</strong>,\n };\n }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Button from '../../common/components/Button';\n\n/**\n * The `WelcomeHero` component displays a hero that welcomes the user to the\n * forum.\n */\nexport default class WelcomeHero extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.hidden = localStorage.getItem('welcomeHidden');\n }\n\n view() {\n if (this.hidden) return <div />;\n\n const slideUp = () => {\n this.$().slideUp(this.hide.bind(this));\n };\n\n return (\n <header className=\"Hero WelcomeHero\">\n <div class=\"container\">\n {Button.component({\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\n <div className=\"containerNarrow\">\n <h2 className=\"Hero-title\">{app.forum.attribute('welcomeTitle')}</h2>\n <div className=\"Hero-subtitle\">{m.trust(app.forum.attribute('welcomeMessage'))}</div>\n </div>\n </div>\n </header>\n );\n }\n\n /**\n * Hide the welcome hero.\n */\n hide() {\n localStorage.setItem('welcomeHidden', 'true');\n\n this.hidden = true;\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 {Event} 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 {Object}\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({ deferClear: true });\n m.route.set(app.route.discussion(discussion));\n }, this.loaded.bind(this));\n }\n}\n","import app from '../../forum/app';\nimport Page 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';\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 extends Page {\n static providesInitialSearch = true;\n\n oninit(vnode) {\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'));\n\n app.history.push('index', 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\">\n <div className=\"IndexPage-toolbar\">\n <ul className=\"IndexPage-toolbar-view\">{listItems(this.viewItems().toArray())}</ul>\n <ul className=\"IndexPage-toolbar-action\">{listItems(this.actionItems().toArray())}</ul>\n </div>\n <DiscussionList state={app.discussions} />\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n setTitle() {\n app.setTitle(app.translator.trans('core.forum.index.meta_title_text'));\n app.setTitleCount(0);\n }\n\n oncreate(vnode) {\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;\n const heroHeight = (app.cache.heroHeight = this.$('.Hero').outerHeight() || 0);\n const scrollTop = app.cache.scrollTop;\n\n $('#app').css('min-height', $(window).height() + heroHeight);\n\n // Let browser handle scrolling on page reload.\n if (app.previous.type == null) return;\n\n // When on mobile, only retain scroll 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 (app.screen() == 'desktop' || app.screen() == 'desktop-hd' || 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();\n const indexBottom = $(window).height();\n const discussionTop = $discussion.offset().top;\n const discussionBottom = discussionTop + $discussion.outerHeight();\n\n if (discussionTop < scrollTop + indexTop || discussionBottom > scrollTop + indexBottom) {\n $(window).scrollTop(discussionTop - indexTop);\n }\n }\n }\n }\n\n onbeforeremove(vnode) {\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) {\n super.onremove(vnode);\n\n $('#app').css('min-height', '');\n }\n\n /**\n * Get the component to display as the hero.\n *\n * @return {MithrilComponent}\n */\n hero() {\n return WelcomeHero.component();\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 * @return {ItemList}\n */\n sidebarItems() {\n const items = new ItemList();\n const canStartDiscussion = app.forum.attribute('canStartDiscussion') || !app.session.user;\n\n items.add(\n 'newDiscussion',\n Button.component(\n {\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(canStartDiscussion ? 'core.forum.index.start_discussion_button' : 'core.forum.index.cannot_start_discussion_button')\n )\n );\n\n items.add(\n 'nav',\n SelectDropdown.component(\n {\n buttonClassName: 'Button',\n className: 'App-titleControl',\n accessibleToggleLabel: app.translator.trans('core.forum.index.toggle_sidenav_dropdown_accessible_label'),\n },\n this.navItems(this).toArray()\n )\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 * @return {ItemList}\n */\n navItems() {\n const items = new ItemList();\n const params = app.search.stickyParams();\n\n items.add(\n 'allDiscussions',\n LinkButton.component(\n {\n href: app.route('index', params),\n icon: 'far fa-comments',\n },\n app.translator.trans('core.forum.index.all_discussions_link')\n ),\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 * @return {ItemList}\n */\n viewItems() {\n const items = new ItemList();\n const sortMap = app.discussions.sortMap();\n\n const sortOptions = Object.keys(sortMap).reduce((acc, 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.component(\n {\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 Button.component(\n {\n icon: active ? 'fas fa-check' : true,\n onclick: app.search.changeSort.bind(app.search, value),\n active: active,\n },\n label\n );\n })\n )\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 * @return {ItemList}\n */\n actionItems() {\n const items = new ItemList();\n\n items.add(\n 'refresh',\n Button.component({\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.component({\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 * @return {Promise}\n */\n newDiscussionAction() {\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 * @return void\n */\n markAllAsRead() {\n const confirmation = confirm(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 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';\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 oninit(vnode) {\n super.oninit(vnode);\n\n /**\n * Whether or not the activity feed is currently loading.\n *\n * @type {Boolean}\n */\n this.loading = true;\n\n /**\n * Whether or not there are any more activity items that can be loaded.\n *\n * @type {Boolean}\n */\n this.moreResults = false;\n\n /**\n * The Post models in the feed.\n *\n * @type {Post[]}\n */\n this.posts = [];\n\n /**\n * The number of activity items to load per request.\n *\n * @type {Integer}\n */\n this.loadLimit = 20;\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)}>{post.discussion().title()}</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) {\n super.show(user);\n\n this.refresh();\n }\n\n /**\n * Clear and reload the user's activity feed.\n *\n * @public\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 * @param {Integer} [offset] The position to start getting results from.\n * @return {Promise}\n * @protected\n */\n loadResults(offset) {\n return app.store.find('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 * @public\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 * @param {Post[]} results\n * @return {Post[]}\n */\n parseResults(results) {\n this.loading = false;\n\n [].push.apply(this.posts, results);\n\n this.moreResults = results.length >= this.loadLimit;\n m.redraw();\n\n return results;\n }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\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 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() {\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: T[]) {\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<T[]> {\n const params = this.requestParams();\n params.page = {\n ...params.page,\n offset: this.pageSize * (page - 1),\n };\n\n if (Array.isArray(params.include)) {\n params.include = params.include.join(',');\n }\n\n return app.store.find(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(): any {\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) {\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: T[]) => {\n this.pages = [];\n this.parseResults(this.location.page, results);\n })\n .finally(() => (this.initialLoading = false));\n }\n\n public getPages() {\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(): any {\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","import app from '../../forum/app';\nimport PaginatedListState, { Page, PaginatedListParams } from '../../common/states/PaginatedListState';\nimport Discussion from '../../common/models/Discussion';\n\nexport interface IRequestParams {\n include: string[];\n filter: Record<string, string>;\n sort?: string;\n}\n\nexport interface DiscussionListParams extends PaginatedListParams {\n sort?: string;\n}\n\nexport default class DiscussionListState<P extends DiscussionListParams = DiscussionListParams> extends PaginatedListState<Discussion, P> {\n protected extraDiscussions: Discussion[] = [];\n\n constructor(params: P, page: number = 1) {\n super(params, page, 20);\n }\n\n get type(): string {\n return 'discussions';\n }\n\n requestParams(): IRequestParams {\n const params: IRequestParams = {\n include: ['user', 'lastPostedUser'],\n filter: this.params.filter || {},\n };\n\n params.sort = this.sortMap()[this.params.sort ?? ''];\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<Discussion[]> {\n const preloadedDiscussions = app.preloadedApiDocument() as Discussion[] | null;\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 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 from './UserPage';\nimport DiscussionList from './DiscussionList';\nimport DiscussionListState from '../states/DiscussionListState';\n\n/**\n * The `DiscussionsUserPage` component shows a discussion list inside of a user\n * page.\n */\nexport default class DiscussionsUserPage extends UserPage {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loadUser(m.route.param('username'));\n }\n\n show(user) {\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 <div className=\"DiscussionsUserPage\">{DiscussionList.component({ state: this.state })}</div>;\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 from '../Component';\nimport LoadingIndicator from './LoadingIndicator';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport withAttr from '../utils/withAttr';\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 extends Component {\n view(vnode) {\n // Sometimes, false is stored in the DB as '0'. This is a temporary\n // conversion layer until a more robust settings encoding is introduced\n if (this.attrs.state === '0') this.attrs.state = false;\n\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 * @return {*}\n * @protected\n */\n getDisplay() {\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 * @param {Boolean} checked\n * @protected\n */\n onchange(checked) {\n if (this.attrs.onchange) this.attrs.onchange(checked, this);\n }\n}\n","import Checkbox 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) {\n super.initAttrs(attrs);\n\n attrs.className = (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 {Array}\n */\n this.methods = this.notificationMethods().toArray();\n\n /**\n * A map of which notification checkboxes are loading.\n *\n * @type {Object}\n */\n this.loading = {};\n\n /**\n * Information about the available notification types.\n *\n * @type {Array}\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 </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 {Array} 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}\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}\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 from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\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 extends Modal {\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\">\n <p className=\"helpText\">{app.translator.trans('core.forum.change_password.text')}</p>\n <div className=\"Form-group\">\n {Button.component(\n {\n className: 'Button Button--primary Button--block',\n type: 'submit',\n loading: this.loading,\n },\n app.translator.trans('core.forum.change_password.send_button')\n )}\n </div>\n </div>\n </div>\n );\n }\n\n onsubmit(e) {\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: { email: app.session.user.email() },\n })\n .then(this.hide.bind(this), this.loaded.bind(this));\n }\n}\n","import app from '../../forum/app';\nimport Modal from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\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 extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n /**\n * Whether or not the email has been changed successfully.\n *\n * @type {Boolean}\n */\n this.success = false;\n\n /**\n * The value of the email input.\n *\n * @type {function}\n */\n this.email = Stream(app.session.user.email());\n\n /**\n * The value of the password input.\n *\n * @type {function}\n */\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 if (this.success) {\n return (\n <div className=\"Modal-body\">\n <div className=\"Form Form--centered\">\n <p className=\"helpText\">\n {app.translator.trans('core.forum.change_email.confirmation_message', { email: <strong>{this.email()}</strong> })}\n </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.change_email.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 <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 <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 <div className=\"Form-group\">\n {Button.component(\n {\n className: 'Button Button--primary Button--block',\n type: 'submit',\n loading: this.loading,\n },\n app.translator.trans('core.forum.change_email.submit_button')\n )}\n </div>\n </div>\n </div>\n );\n }\n\n onsubmit(e) {\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.user\n .save(\n { email: this.email() },\n {\n errorHandler: this.onerror.bind(this),\n meta: { password: this.password() },\n }\n )\n .then(() => {\n this.success = true;\n })\n .catch(() => {})\n .then(this.loaded.bind(this));\n }\n\n onerror(error) {\n if (error.status === 401) {\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 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';\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 extends UserPage {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.show(app.session.user);\n\n app.setTitle(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 * @return {ItemList}\n */\n settingsItems() {\n const items = new ItemList();\n\n ['account', 'notifications', 'privacy'].forEach((section) => {\n items.add(\n section,\n <FieldSet className={`Settings-${section}`} label={app.translator.trans(`core.forum.settings.${section}_heading`)}>\n {this[`${section}Items`]().toArray()}\n </FieldSet>\n );\n });\n\n return items;\n }\n\n /**\n * Build an item list for the user's account settings.\n *\n * @return {ItemList}\n */\n accountItems() {\n const items = new ItemList();\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 );\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 );\n\n return items;\n }\n\n /**\n * Build an item list for the user's notification settings.\n *\n * @return {ItemList}\n */\n notificationsItems() {\n const items = new ItemList();\n\n items.add('notificationGrid', <NotificationGrid user={this.user} />);\n\n return items;\n }\n\n /**\n * Build an item list for the user's privacy settings.\n *\n * @return {ItemList}\n */\n privacyItems() {\n const items = new ItemList();\n\n items.add(\n 'discloseOnline',\n <Switch\n state={this.user.preferences().discloseOnline}\n onchange={(value) => {\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 );\n\n return items;\n }\n}\n","import app from '../../forum/app';\nimport Page from '../../common/components/Page';\nimport NotificationList from './NotificationList';\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 extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.history.push('notifications');\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 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 Post from '../common/models/Post';\nimport User from '../common/models/User';\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 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 {ForumApplication} 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 class=\"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/>').insertBefore('#content')[0], {\n view: () => (\n <ContainedAlert dismissible={false} controls={[<ResendButton />]}>\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]',\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 matches =\n typeof Element === 'undefined'\n ? function () {}\n : Element.prototype.matches ||\n Element.prototype.msMatchesSelector ||\n Element.prototype.webkitMatchesSelector;\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\nconst isContentEditable = function (node) {\n return node.contentEditable === 'true';\n};\n\nconst getTabindex = function (node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex'), 10);\n\n if (!isNaN(tabindexAttr)) {\n return tabindexAttr;\n }\n\n // 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 if (isContentEditable(node)) {\n return 0;\n }\n\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 if (\n (node.nodeName === 'AUDIO' ||\n node.nodeName === 'VIDEO' ||\n node.nodeName === 'DETAILS') &&\n node.getAttribute('tabindex') === null\n ) {\n return 0;\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 || node.ownerDocument;\n\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 isHidden = function (node, displayCheck) {\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 if (!displayCheck || displayCheck === 'full') {\n while (node) {\n if (getComputedStyle(node).display === 'none') {\n return true;\n }\n node = node.parentElement;\n }\n } else if (displayCheck === 'non-zero-area') {\n const { width, height } = node.getBoundingClientRect();\n return width === 0 && height === 0;\n }\n\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 (\n isInput(node) ||\n node.tagName === 'SELECT' ||\n node.tagName === 'TEXTAREA' ||\n node.tagName === 'BUTTON'\n ) {\n let parentNode = node.parentElement;\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> as an immediate child of the disabled\n // <fieldset>: if the node is in that legend, it'll be enabled even\n // though the fieldset is disabled; otherwise, the node is in a\n // secondary/subsequent legend, or somewhere else within the fieldset\n // (however deep nested) and it'll be disabled\n for (let i = 0; i < parentNode.children.length; i++) {\n const child = parentNode.children.item(i);\n if (child.tagName === 'LEGEND') {\n if (child.contains(node)) {\n return false;\n }\n\n // the node isn't in the first legend (in doc order), so no matter\n // where it is now, it'll be disabled\n return true;\n }\n }\n\n // the node isn't in a legend, so no matter where it is now, it'll be disabled\n return true;\n }\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.displayCheck) ||\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 !isNodeMatchingSelectorFocusable(options, node) ||\n isNonTabbableRadio(node) ||\n getTabindex(node) < 0\n ) {\n return false;\n }\n return true;\n};\n\nconst tabbable = function (el, options) {\n options = options || {};\n\n const regularTabbables = [];\n const orderedTabbables = [];\n\n const candidates = getCandidates(\n el,\n options.includeContainer,\n isNodeMatchingSelectorTabbable.bind(null, options)\n );\n\n candidates.forEach(function (candidate, i) {\n const candidateTabindex = getTabindex(candidate);\n if (candidateTabindex === 0) {\n regularTabbables.push(candidate);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n node: candidate,\n });\n }\n });\n\n const tabbableNodes = orderedTabbables\n .sort(sortOrderedTabbables)\n .map((a) => a.node)\n .concat(regularTabbables);\n\n return tabbableNodes;\n};\n\nconst focusable = function (el, options) {\n options = options || {};\n\n const candidates = getCandidates(\n el,\n options.includeContainer,\n isNodeMatchingSelectorFocusable.bind(null, options)\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, isFocusable } 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 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 // @type {Array<HTMLElement>}\n containers: [],\n\n // list of objects identifying the first and last tabbable nodes in all containers/groups in\n // 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<{ container: HTMLElement, firstTabbableNode: HTMLElement|null, lastTabbableNode: HTMLElement|null }>}\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 const getOption = (configOverrideOptions, optionName, configOptionName) => {\n return configOverrideOptions &&\n configOverrideOptions[optionName] !== undefined\n ? configOverrideOptions[optionName]\n : config[configOptionName || optionName];\n };\n\n const containersContain = function (element) {\n return !!(\n element &&\n state.containers.some((container) => container.contains(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) {\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 (containersContain(doc.activeElement)) {\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.tabbableGroups = state.containers\n .map((container) => {\n const tabbableNodes = tabbable(container);\n\n if (tabbableNodes.length > 0) {\n return {\n container,\n firstTabbableNode: tabbableNodes[0],\n lastTabbableNode: tabbableNodes[tabbableNodes.length - 1],\n };\n }\n\n return undefined;\n })\n .filter((group) => !!group); // remove groups with no tabbable nodes\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 (containersContain(target)) {\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: config.returnFocusOnDeactivate && !isFocusable(target),\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 = containersContain(target);\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 tabbable\n // with tabIndex='-1' and was given initial focus\n const containerIndex = findIndex(state.tabbableGroups, ({ container }) =>\n container.contains(target)\n );\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 state.tabbableGroups[containerIndex].container === target\n ) {\n // an exception case where the target is the container itself, 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 state.tabbableGroups[containerIndex].container === target\n ) {\n // an exception case where the target is the container itself, 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 if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n return;\n }\n\n const target = getActualTarget(e);\n\n if (containersContain(target)) {\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 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 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(deactivateOptions, 'onDeactivate');\n const onPostDeactivate = getOption(deactivateOptions, 'onPostDeactivate');\n const checkCanReturnFocus = getOption(\n deactivateOptions,\n 'checkCanReturnFocus'\n );\n\n if (onDeactivate) {\n onDeactivate();\n }\n\n const returnFocus = getOption(\n deactivateOptions,\n 'returnFocus',\n 'returnFocusOnDeactivate'\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","/* \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 type ModalManagerState from '../states/ModalManagerState';\nimport type Mithril from 'mithril';\n\ninterface IModalManagerAttrs {\n state: ModalManagerState;\n}\n\n/**\n * The `ModalManager` component manages a modal dialog. Only one modal dialog\n * can be shown at once; loading a new component into the ModalManager will\n * overwrite the previous one.\n */\nexport default class ModalManager extends Component<IModalManagerAttrs> {\n protected focusTrap: FocusTrap | undefined;\n\n /**\n * Whether a modal is currently shown by this modal manager.\n */\n protected modalShown: boolean = false;\n\n view(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): Mithril.Children {\n const modal = this.attrs.state.modal;\n\n return (\n <div className=\"ModalManager modal fade\">\n {!!modal &&\n modal.componentClass.component({\n ...modal.attrs,\n animateShow: this.animateShow.bind(this),\n animateHide: this.animateHide.bind(this),\n state: this.attrs.state,\n })}\n </div>\n );\n }\n\n oncreate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n super.oncreate(vnode);\n\n // Ensure the modal state is notified about a closed modal, even when the\n // DOM-based Bootstrap JavaScript code triggered the closing of the modal,\n // e.g. via ESC key or a click on the modal backdrop.\n this.$().on('hidden.bs.modal', this.attrs.state.close.bind(this.attrs.state));\n\n this.focusTrap = createFocusTrap(this.element as HTMLElement);\n }\n\n onupdate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n super.onupdate(vnode);\n\n requestAnimationFrame(() => {\n try {\n if (this.modalShown) this.focusTrap!.activate?.();\n else this.focusTrap!.deactivate?.();\n } catch {\n // We can expect errors to occur here due to the nature of mithril rendering\n }\n });\n }\n\n animateShow(readyCallback: () => void): void {\n if (!this.attrs.state.modal) return;\n\n const dismissible = !!this.attrs.state.modal.componentClass.isDismissible;\n\n this.modalShown = true;\n\n // If we are opening this modal while another modal is already open,\n // the shown event will not run, because the modal is already open.\n // So, we need to manually trigger the readyCallback.\n if (this.$().hasClass('in')) {\n readyCallback();\n return;\n }\n\n this.$()\n .one('shown.bs.modal', readyCallback)\n // @ts-expect-error: No typings available for Bootstrap modals.\n .modal({\n backdrop: dismissible || 'static',\n keyboard: dismissible,\n })\n .modal('show');\n }\n\n animateHide(): void {\n // @ts-expect-error: No typings available for Bootstrap modals.\n this.$().modal('hide');\n\n this.modalShown = false;\n }\n}\n","import Component from '../Component';\nimport Alert from './Alert';\n\n/**\n * The `AlertManager` component provides an area in which `Alert` components can\n * be shown and dismissed.\n */\nexport default class AlertManager extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.state = this.attrs.state;\n }\n\n view() {\n return (\n <div className=\"AlertManager\">\n {Object.entries(this.state.getActiveAlerts()).map(([key, alert]) => (\n <div className=\"AlertManager-alert\">\n <alert.componentClass {...alert.attrs} ondismiss={this.state.dismiss.bind(this.state, key)}>\n {alert.children}\n </alert.componentClass>\n </div>\n ))}\n </div>\n );\n }\n}\n","import Modal from './Modal';\n\nexport default class RequestErrorModal extends Modal {\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) {\n responseText = formattedError.join('\\n\\n');\n } else {\n try {\n const json = error.response || JSON.parse(error.responseText);\n\n responseText = JSON.stringify(json, null, 2);\n } catch (e) {\n responseText = error.responseText;\n }\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","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","import _typeof from \"@babel/runtime/helpers/typeof\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default 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}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\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 🙂\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 * 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","/* \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","export default function defaultRichHandler(tag, values, contents) {\n\treturn `<${tag}>${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\treturn replaceRichTags(formatted, cleanedValues, this.richHandler);\n\t}\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\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","export default function mithrilRichHandler(tag, values, contents) {\n\tconst vnode = values[tag] || m(tag);\n\tconst children = 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 setLocale(locale: string) {\n this.formatter.locale = 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';\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 constructor(models) {\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 * @type {Object}\n * @protected\n */\n this.data = {};\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 * @type {Object}\n * @public\n */\n this.models = models;\n }\n\n /**\n * Push resources contained within an API payload into the store.\n *\n * @param {Object} payload\n * @return {Model|Model[]} The model(s) representing the resource(s) contained\n * within the 'data' key of the payload.\n * @public\n */\n pushPayload(payload) {\n if (payload.included) payload.included.map(this.pushObject.bind(this));\n\n const result = payload.data instanceof Array ? payload.data.map(this.pushObject.bind(this)) : this.pushObject(payload.data);\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 {Object} data The resource object\n * @return {Model|null} The model, or null if no model class has been\n * registered for this resource type.\n * @public\n */\n pushObject(data) {\n if (!this.models[data.type]) return null;\n\n const type = (this.data[data.type] = this.data[data.type] || {});\n\n if (type[data.id]) {\n type[data.id].pushData(data);\n } else {\n type[data.id] = this.createRecord(data.type, data);\n }\n\n type[data.id].exists = true;\n\n return type[data.id];\n }\n\n /**\n * Make a request to the API to find record(s) of a specific type.\n *\n * @param {String} type The resource type.\n * @param {Integer|Integer[]|Object} [id] The ID(s) of the model(s) to retrieve.\n * Alternatively, if an object is passed, it will be handled as the\n * `query` parameter.\n * @param {Object} [query]\n * @param {Object} [options]\n * @return {Promise}\n * @public\n */\n find(type, id, query = {}, options = {}) {\n let params = query;\n let url = app.forum.attribute('apiUrl') + '/' + type;\n\n if (id instanceof Array) {\n url += '?filter[id]=' + id.join(',');\n } else if (typeof id === 'object') {\n params = id;\n } else if (id) {\n url += '/' + id;\n }\n\n return app\n .request(\n Object.assign(\n {\n method: 'GET',\n url,\n params,\n },\n options\n )\n )\n .then(this.pushPayload.bind(this));\n }\n\n /**\n * Get a record from the store by ID.\n *\n * @param {String} type The resource type.\n * @param {Integer} id The resource ID.\n * @return {Model}\n * @public\n */\n getById(type, id) {\n return this.data[type] && this.data[type][id];\n }\n\n /**\n * Get a record from the store by the value of a model attribute.\n *\n * @param {String} type The resource type.\n * @param {String} key The name of the method on the model.\n * @param {*} value The value of the model attribute.\n * @return {Model}\n * @public\n */\n getBy(type, key, value) {\n return this.all(type).filter((model) => model[key]() === value)[0];\n }\n\n /**\n * Get all loaded records of a specific type.\n *\n * @param {String} type\n * @return {Model[]}\n * @public\n */\n all(type) {\n const records = this.data[type];\n\n return records ? Object.keys(records).map((id) => records[id]) : [];\n }\n\n /**\n * Remove the given model from the store.\n *\n * @param {Model} model\n */\n remove(model) {\n delete this.data[model.data.type][model.id()];\n }\n\n /**\n * Create a new record of the given type.\n *\n * @param {String} type The resource type\n * @param {Object} [data] Any data to initialize the model with\n * @return {Model}\n * @public\n */\n createRecord(type, data = {}) {\n data.type = data.type || type;\n\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\n /**\n * Password\n */\n password: string;\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 this.focusTrap = createFocusTrap('#drawer', { allowOutsideClick: 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 console.log(this, 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 * @public\n */\n isOpen() {\n return this.appElement.classList.contains('drawerOpen');\n }\n\n /**\n * Hide the drawer.\n *\n * @public\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 * @public\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';\n\nexport type InternalFlarumRequestOptions<ResponseType> = Mithril.RequestOptions<ResponseType> & {\n errorHandler: (error: RequestError) => void;\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: any;\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 – 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 object, 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 – 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 object, 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","/*global ColorThief*/\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';\n\nexport default class User extends Model {}\n\nObject.assign(User.prototype, {\n username: Model.attribute('username'),\n slug: Model.attribute('slug'),\n displayName: Model.attribute('displayName'),\n email: Model.attribute('email'),\n isEmailConfirmed: Model.attribute('isEmailConfirmed'),\n password: Model.attribute('password'),\n\n avatarUrl: Model.attribute('avatarUrl'),\n preferences: Model.attribute('preferences'),\n groups: Model.hasMany('groups'),\n\n joinTime: Model.attribute('joinTime', Model.transformDate),\n lastSeenAt: Model.attribute('lastSeenAt', Model.transformDate),\n markedAllAsReadAt: Model.attribute('markedAllAsReadAt', Model.transformDate),\n unreadNotificationCount: Model.attribute('unreadNotificationCount'),\n newNotificationCount: Model.attribute('newNotificationCount'),\n\n discussionCount: Model.attribute('discussionCount'),\n commentCount: Model.attribute('commentCount'),\n\n canEdit: Model.attribute('canEdit'),\n canEditCredentials: Model.attribute('canEditCredentials'),\n canEditGroups: Model.attribute('canEditGroups'),\n canDelete: Model.attribute('canDelete'),\n\n avatarColor: null,\n color: computed('displayName', 'avatarUrl', 'avatarColor', function (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.join(', ') + ')';\n } else if (avatarUrl) {\n this.calculateAvatarColor();\n return '';\n }\n\n return '#' + stringToColor(displayName);\n }),\n\n /**\n * Check whether or not the user has been seen in the last 5 minutes.\n *\n * @return {Boolean}\n * @public\n */\n isOnline() {\n return dayjs().subtract(5, 'minutes').isBefore(this.lastSeenAt());\n },\n\n /**\n * Get the Badge components that apply to this user.\n *\n * @return {ItemList}\n */\n badges() {\n const items = new ItemList();\n const groups = this.groups();\n\n if (groups) {\n groups.forEach((group) => {\n items.add('group' + group.id(), GroupBadge.component({ 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\n */\n calculateAvatarColor() {\n const image = new Image();\n const user = this;\n\n image.onload = function () {\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 * @param {Object} newPreferences\n * @return {Promise}\n */\n savePreferences(newPreferences) {\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';\n\nexport default class Post extends Model {}\n\nObject.assign(Post.prototype, {\n number: Model.attribute('number'),\n discussion: Model.hasOne('discussion'),\n\n createdAt: Model.attribute('createdAt', Model.transformDate),\n user: Model.hasOne('user'),\n\n contentType: Model.attribute('contentType'),\n content: Model.attribute('content'),\n contentHtml: Model.attribute('contentHtml'),\n renderFailed: Model.attribute('renderFailed'),\n contentPlain: computed('contentHtml', getPlainContent),\n\n editedAt: Model.attribute('editedAt', Model.transformDate),\n editedUser: Model.hasOne('editedUser'),\n isEdited: computed('editedAt', (editedAt) => !!editedAt),\n\n hiddenAt: Model.attribute('hiddenAt', Model.transformDate),\n hiddenUser: Model.hasOne('hiddenUser'),\n isHidden: computed('hiddenAt', (hiddenAt) => !!hiddenAt),\n\n canEdit: Model.attribute('canEdit'),\n canHide: Model.attribute('canHide'),\n canDelete: Model.attribute('canDelete'),\n});\n","import Model from '../Model';\n\nexport default class Notification extends Model {}\n\nObject.assign(Notification.prototype, {\n contentType: Model.attribute('contentType'),\n content: Model.attribute('content'),\n createdAt: Model.attribute('createdAt', Model.transformDate),\n\n isRead: Model.attribute('isRead'),\n\n user: Model.hasOne('user'),\n fromUser: Model.hasOne('fromUser'),\n subject: Model.hasOne('subject'),\n});\n","import Modal from '../components/Modal';\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: null | {\n componentClass: typeof Modal;\n attrs?: Record<string, unknown>;\n } = null;\n\n private closeTimeout?: NodeJS.Timeout;\n\n /**\n * Shows a modal dialog.\n *\n * If a modal is already open, the existing one will close and the new modal will replace it.\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 show(componentClass: typeof Modal, attrs: Record<string, unknown> = {}): 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 if (this.closeTimeout) clearTimeout(this.closeTimeout);\n\n this.modal = { componentClass, attrs };\n\n m.redraw.sync();\n }\n\n /**\n * Closes the currently open dialog, if one is open.\n */\n close(): void {\n if (!this.modal) return;\n\n // Don't hide the modal immediately, because if the consumer happens to call\n // the `show` method straight after to show another modal dialog, it will\n // cause Bootstrap's modal JS to misbehave. Instead we will wait for a tiny\n // bit to give the `show` method the opportunity to prevent this from going\n // ahead.\n this.closeTimeout = setTimeout(() => {\n this.modal = null;\n m.redraw();\n });\n }\n\n /**\n * Checks if a modal is currently open.\n *\n * @returns `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 interface AlertState {\n componentClass: typeof Alert;\n attrs: AlertAttrs;\n children: Mithril.Children;\n}\n\nexport default class AlertManagerState {\n protected activeAlerts: { [id: number]: AlertState } = {};\n protected alertId = 0;\n\n getActiveAlerts() {\n return this.activeAlerts;\n }\n\n /**\n * Show an Alert in the alerts area.\n *\n * @returns 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: 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 '../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 from './Store';\nimport Session from './Session';\nimport extract from './utils/extract';\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';\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 onmatch(this: this, args: RouteArgs, requestedPath: string, route: string): { new (): Comp };\n /**\n * A function which renders the provided component.\n *\n * Returns a Mithril Vnode or other children.\n */\n render(this: this, vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children;\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 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 data!: {\n apiDocument: Record<string, unknown> | null;\n locale: string;\n locales: Record<string, string>;\n resources: Record<string, unknown>[];\n session: { userId: number; csrfToken: string };\n [key: string]: unknown;\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 this.initializers.toArray().forEach((initializer) => initializer(this));\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('users', this.data.session.userId), this.data.session.csrfToken);\n\n this.mount();\n\n this.initialRoute = window.location.href;\n }\n\n // TODO: This entire system needs a do-over for v2\n public bootExtensions(extensions: Record<string, { extend?: unknown[] }>) {\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 // @ts-expect-error This is beyond saving atm.\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.component({ state: this.modal }) });\n m.mount(document.getElementById('alerts')!, { view: () => AlertManager.component({ 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(): Record<string, unknown> | 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 = this.store.pushPayload(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 pageTitleWithSeparator = this.title && m.route.get() !== this.forum.attribute('basePath') + '/' ? this.title + ' - ' : '';\n const title = this.forum.attribute('title');\n document.title = count + pageTitleWithSeparator + title;\n }\n\n protected transformRequestOptions<ResponseType>(flarumOptions: FlarumRequestOptions<ResponseType>): InternalFlarumRequestOptions<ResponseType> {\n const { background, deserialize, errorHandler, 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 // @ts-expect-error Typescript doesn't know we return promisified `ReturnType` OR `string`,\n // so it errors due to Mithril's typings\n const defaultDeserialize = (response: string) => response as ResponseType;\n\n const defaultErrorHandler = (error: RequestError) => {\n throw error;\n };\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 errorHandler: errorHandler ?? defaultErrorHandler,\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 * @param options\n * @return {Promise}\n */\n request<ResponseType>(originalOptions: FlarumRequestOptions<ResponseType>): Promise<ResponseType | string> {\n const options = this.transformRequestOptions(originalOptions);\n\n if (this.requestErrorAlert) this.alerts.dismiss(this.requestErrorAlert);\n\n // Now make the request. If it's a failure, inspect the error that was\n // returned and show an alert containing its contents.\n return m.request(options).then(\n (response) => response,\n (error: RequestError) => {\n let content;\n\n switch (error.status) {\n case 422:\n content = ((error.response?.errors ?? {}) as Record<string, unknown>[])\n .map((error) => [error.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 content = app.translator.trans('core.lib.error.generic_message');\n }\n\n const isDebug = app.forum.attribute('debug');\n // contains a formatted errors if possible, response must be an JSON API array of errors\n // the details property is decoded to transform escaped characters such as '\\n'\n const errors = error.response && error.response.errors;\n const formattedError = (Array.isArray(errors) && errors?.[0]?.detail && errors.map((e) => decodeURI(e.detail ?? ''))) || undefined;\n\n error.alert = {\n type: 'error',\n content,\n controls: isDebug && [\n <Button className=\"Button Button--link\" onclick={this.showDebug.bind(this, error, formattedError)}>\n {app.translator.trans('core.lib.debug_button')}\n </Button>,\n ],\n };\n\n try {\n options.errorHandler(error);\n } catch (error) {\n if (error instanceof RequestError) {\n if (isDebug && error.xhr) {\n const { method, url } = error.options;\n const { status = '' } = error.xhr;\n\n console.group(`${method} ${url} ${status}`);\n\n console.error(...(formattedError || [error]));\n\n console.groupEnd();\n }\n\n this.requestErrorAlert = this.alerts.show(error.alert, error.alert.content);\n } else {\n throw error;\n }\n }\n\n return Promise.reject(error);\n }\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';\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={'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 * @return {Object}\n * @protected\n */\n getBackButton() {\n const { history } = app;\n const previous = history.getPrevious() || {};\n\n return LinkButton.component({\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) => {\n if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return;\n e.preventDefault();\n history.back();\n },\n });\n }\n\n /**\n * Get the pane pinned toggle button.\n *\n * @return {Object|String}\n * @protected\n */\n getPaneButton() {\n const { pane } = app;\n\n if (!pane || !pane.active) return '';\n\n return Button.component({\n className: 'Button Button--icon Navigation-pin' + (pane.pinned ? ' active' : ''),\n onclick: pane.togglePinned.bind(pane),\n icon: 'fas fa-thumbtack',\n });\n }\n\n /**\n * Get the drawer toggle button.\n *\n * @return {Object|String}\n * @protected\n */\n getDrawerButton() {\n if (!this.attrs.drawer) return '';\n\n const { drawer } = app;\n const user = app.session.user;\n\n return Button.component({\n className: 'Button Button--icon Navigation-drawer' + (user && user.newNotificationCount() ? ' new' : ''),\n onclick: (e) => {\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","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, 10);\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","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","import app from '../forum/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, { makeRouteHelpers } from './routes';\nimport alertEmailConfirmation from './utils/alertEmailConfirmation';\nimport Application 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 Discussion from '../common/models/Discussion';\n\nexport default class ForumApplication extends Application {\n /**\n * A map of notification types to their components.\n */\n notificationComponents: Record<string, typeof Notification> = {\n discussionRenamed: DiscussionRenamedNotification,\n };\n\n /**\n * A map of post types to their components.\n */\n postComponents: Record<string, typeof Post> = {\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 & ReturnType<typeof makeRouteHelpers>;\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, 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.component({ className: 'App-backControl', drawer: true }) });\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.component({ 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.which === 2) return;\n e.preventDefault();\n app.history.home();\n\n // Reload the current user so that their unread notification count is refreshed.\n if (app.session.user) {\n app.store.find('users', app.session.user.id());\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","/**\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 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","/**\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 */\n\nimport fireDebugWarning from '../helpers/fireDebugWarning';\n\nconst deprecatedNotice =\n 'The `evented` util is deprecated and will be removed in Flarum 2.0. For more info, please see https://github.com/flarum/core/issues/2547';\n\nexport default {\n /**\n * Arrays of registered event handlers, grouped by the event name.\n *\n * @type {Object}\n * @protected\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 {Array}\n * @protected\n */\n getHandlers(event) {\n fireDebugWarning(deprecatedNotice);\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 {...*} args Arguments to pass to event handlers.\n * @public\n */\n trigger(event, ...args) {\n fireDebugWarning(deprecatedNotice);\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 on(event, handler) {\n fireDebugWarning(deprecatedNotice);\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 one(event, handler) {\n fireDebugWarning(deprecatedNotice);\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 off(event, handler) {\n fireDebugWarning(deprecatedNotice);\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 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 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) {\n result = orderedList(textarea);\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 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 let suffixToUse = isMultipleLines(selectedText) && blockSuffix.length > 0 ? `\\n${blockSuffix}` : suffix;\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, 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 const undoStyle = lines.every((line) => line.startsWith(prefix) && line.endsWith(suffix));\n\n if (undoStyle) {\n text = lines.map((line) => line.slice(prefix.length, line.length - suffix.length)).join('\\n');\n selectionEnd = selectionStart + text.length;\n } else {\n text = lines.map((line) => prefix + line + suffix).join('\\n');\n if (surroundWithNewlines) {\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\nfunction orderedList(textarea: HTMLTextAreaElement): SelectionRange {\n const orderedListRegex = /^\\d+\\.\\s+/;\n const noInitialSelection = textarea.selectionStart === textarea.selectionEnd;\n let selectionEnd;\n let selectionStart;\n let text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n let textToUnstyle = text;\n let lines = text.split('\\n');\n let startOfLine, endOfLine;\n if (noInitialSelection) {\n const linesBefore = textarea.value.slice(0, textarea.selectionStart).split(/\\n/);\n startOfLine = textarea.selectionStart - linesBefore[linesBefore.length - 1].length;\n endOfLine = wordSelectionEnd(textarea.value, textarea.selectionStart, true);\n textToUnstyle = textarea.value.slice(startOfLine, endOfLine);\n }\n const linesToUnstyle = textToUnstyle.split('\\n');\n const undoStyling = linesToUnstyle.every((line) => orderedListRegex.test(line));\n\n if (undoStyling) {\n lines = linesToUnstyle.map((line) => line.replace(orderedListRegex, ''));\n text = lines.join('\\n');\n if (noInitialSelection && startOfLine && endOfLine) {\n const lengthDiff = linesToUnstyle[0].length - lines[0].length;\n selectionStart = selectionEnd = textarea.selectionStart - lengthDiff;\n textarea.selectionStart = startOfLine;\n textarea.selectionEnd = endOfLine;\n }\n } else {\n lines = numberedLines(lines);\n text = lines.join('\\n');\n const { newlinesToAppend, newlinesToPrepend } = newlinesToSurroundSelectedText(textarea);\n selectionStart = textarea.selectionStart + newlinesToAppend.length;\n selectionEnd = selectionStart + text.length;\n if (noInitialSelection) selectionStart = selectionEnd;\n text = newlinesToAppend + text + newlinesToPrepend;\n }\n\n return { text, selectionStart, selectionEnd };\n}\n\nfunction numberedLines(lines: string[]) {\n let i;\n let len;\n let index;\n const results = [];\n for (index = i = 0, len = lines.length; i < len; index = ++i) {\n const line = lines[index];\n results.push(`${index + 1}. ${line}`);\n }\n return results;\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","export default function _taggedTemplateLiteralLoose(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n strings.raw = raw;\n return strings;\n}","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 value?: string;\n\n view(vnode: Mithril.Vnode<ComponentAttrs, this>) {\n const { className, ...attrs } = this.attrs;\n const value = attrs.bidi?.() || attrs.value;\n\n attrs.type ||= 'text';\n\n return (\n <div className=\"ColorInput\">\n <input className={classList('FormControl', className)} {...attrs} />\n\n <span className=\"ColorInput-icon\" role=\"presentation\">\n {icon('fas fa-exclamation-circle')}\n </span>\n\n <div className=\"ColorInput-preview\" style={{ '--input-value': value }} role=\"presentation\" />\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.ts';\nimport Session from './Session';\nimport Store from './Store';\nimport BasicEditorDriver from './utils/BasicEditorDriver';\nimport evented from './utils/evented';\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 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 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 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 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 Fragment from './Fragment';\nimport DefaultResolver from './resolvers/DefaultResolver';\nimport PaginatedListState from './states/PaginatedListState';\nimport isObject from './utils/isObject';\n\nexport default {\n extend: extend,\n Session: Session,\n Store: Store,\n 'utils/BasicEditorDriver': BasicEditorDriver,\n 'utils/evented': evented,\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/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 '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/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 Model: Model,\n Application: Application,\n 'helpers/fullTime': fullTime,\n 'helpers/avatar': avatar,\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 'resolvers/DefaultResolver': DefaultResolver,\n 'states/PaginatedListState': PaginatedListState,\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 {Class} Parent The class to extend the new class from.\n * @param {...Object} mixins The objects to mix in.\n * @return {Class} 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 {String} [selector] a jQuery-compatible selector string\n * @returns {jQuery} 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 {Array} items\n * @return {VirtualElement}\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';\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 = (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 const content = post.contentType() === 'comment' && post.contentPlain();\n const excerpt = content ? highlight(content, this.attrs.highlight, 300) : '';\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\">{excerpt}</span>\n </span>\n </Link>\n );\n }\n}\n","import compat from '../common/compat';\n\nimport PostControls from './utils/PostControls';\nimport KeyboardNavigatable from './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 AffixedSidebar from './components/AffixedSidebar';\nimport DiscussionPage from './components/DiscussionPage';\nimport DiscussionListPane from './components/DiscussionListPane';\nimport LogInModal from './components/LogInModal';\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 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';\n\nexport default Object.assign(compat, {\n 'utils/PostControls': PostControls,\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 'states/ComposerState': ComposerState,\n 'states/DiscussionListState': DiscussionListState,\n 'states/GlobalSearchState': GlobalSearchState,\n 'states/NotificationListState': NotificationListState,\n 'states/PostStreamState': PostStreamState,\n 'states/SearchState': SearchState,\n 'components/AffixedSidebar': AffixedSidebar,\n 'components/DiscussionPage': DiscussionPage,\n 'components/DiscussionListPane': DiscussionListPane,\n 'components/LogInModal': LogInModal,\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/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/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 '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"],"names":["module","exports","$","Affix","element","options","this","extend","DEFAULTS","target","document","find","$target","on","proxy","checkPosition","checkPositionWithEventLoop","$element","affixed","unpin","pinnedOffset","Plugin","option","each","$this","data","VERSION","RESET","offset","window","prototype","getState","scrollHeight","height","offsetTop","offsetBottom","scrollTop","position","targetHeight","top","initializing","colliderTop","getPinnedOffset","removeClass","addClass","setTimeout","is","bottom","Math","max","body","affix","css","affixType","e","Event","trigger","isDefaultPrevented","replace","old","fn","Constructor","noConflict","$spy","call","jQuery","toggle","Dropdown","getParent","selector","attr","test","$parent","length","parent","clearMenus","which","remove","relatedTarget","hasClass","type","tagName","contains","isActive","documentElement","closest","createElement","insertAfter","toggleClass","keydown","preventDefault","stopPropagation","$items","index","eq","dropdown","Modal","$body","$dialog","$backdrop","isShown","originalBodyPad","scrollbarWidth","ignoreBackdropClick","fixedContent","remote","load","_relatedTarget","show","TRANSITION_DURATION","BACKDROP_TRANSITION_DURATION","backdrop","keyboard","hide","that","checkScrollbar","setScrollbar","escape","resize","one","transition","support","appendTo","adjustDialog","offsetWidth","enforceFocus","emulateTransitionEnd","off","hideModal","has","handleUpdate","resetAdjustments","resetScrollbar","removeBackdrop","callback","animate","doAnimate","currentTarget","focus","callbackRemove","modalIsOverflowing","clientHeight","paddingLeft","bodyIsOverflowing","paddingRight","fullWindowWidth","innerWidth","documentElementRect","getBoundingClientRect","right","abs","left","clientWidth","measureScrollbar","bodyPad","parseInt","style","actualPadding","calculatedPadding","parseFloat","padding","removeData","scrollDiv","className","append","removeChild","modal","href","showEvent","DISALLOWED_ATTRIBUTES","uriAttrs","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","allowedAttributeList","attrName","nodeName","toLowerCase","inArray","Boolean","nodeValue","match","regExp","filter","value","RegExp","i","l","sanitizeHtml","unsafeHtml","whiteList","sanitizeFn","implementation","createHTMLDocument","createdDocument","innerHTML","whitelistKeys","map","el","elements","len","elName","attributeList","attributes","whitelistedAttributes","concat","j","len2","removeAttribute","parentNode","Tooltip","enabled","timeout","hoverState","inState","init","animation","placement","template","title","delay","html","container","viewport","sanitize","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","getOptions","$viewport","isFunction","click","hover","constructor","Error","triggers","split","eventIn","eventOut","enter","leave","_options","fixTitle","getDefaults","dataAttributes","dataAttr","hasOwnProperty","getDelegateOptions","defaults","key","obj","self","tip","clearTimeout","isInStateTrue","hasContent","inDom","ownerDocument","$tip","tipId","getUID","setContent","autoToken","autoPlace","detach","display","pos","getPosition","actualWidth","actualHeight","offsetHeight","orgPlacement","viewportDim","width","calculatedOffset","getCalculatedOffset","applyPlacement","complete","prevHoverState","marginTop","marginLeft","isNaN","setOffset","using","props","round","delta","getViewportAdjustedDelta","isVertical","arrowDelta","arrowOffsetPosition","replaceArrow","dimension","arrow","getTitle","text","removeAttr","$e","isBody","elRect","isSvg","SVGElement","elOffset","scroll","outerDims","viewportPadding","viewportDimensions","topEdgeOffset","bottomEdgeOffset","leftEdgeOffset","rightEdgeOffset","o","prefix","random","getElementById","$arrow","enable","disable","toggleEnabled","destroy","tooltip","duration","called","$el","end","transEndEventNames","WebkitTransition","MozTransition","OTransition","name","undefined","transitionEnd","event","special","bsTransitionEnd","bindType","delegateType","handle","handleObj","handler","apply","arguments","CanvasImage","canvas","context","getContext","appendChild","drawImage","clear","clearRect","update","putImageData","getPixelCount","getImageData","removeCanvas","ColorThief","getColor","getPalette","c","d","f","g","k","m","n","push","MMCQ","quantize","palette","pv","slice","naturalOrder","sum","reduce","sort","peek","pop","size","debug","h","r1","r2","g1","g2","b1","b2","histo","vboxes","vbox","count","volume","Array","forEach","copy","min","_volume","_count_set","_count","avg","_avg","gval","bval","color","nearest","sqrt","pow","forcebw","r","y","M","weekdays","months","t","String","join","z","utcOffset","floor","date","year","month","clone","add","ceil","w","D","ms","Q","v","_","S","args","O","locale","$L","utc","$u","x","$x","$offset","parse","$d","Date","NaN","substring","UTC","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","$locale","weekStart","$set","daysInMonth","get","Number","subtract","format","invalidDate","substr","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","$i","isDayjs","en","Ls","LTS","LT","L","LL","LLL","LLLL","formats","toUpperCase","future","past","yy","fromToBase","relativeTime","thresholds","rounding","to","from","toNow","fromNow","globalThis","Function","global","keyHandler","keys","origHandler","hotkeys","filterInputAcceptingElements","textInputTypes","filterContentEditable","filterTextInputs","textAcceptingInputTypes","specialKeys","character","fromCharCode","modif","possible","specialKey","metaKey","ctrlKey","indexOf","shiftNums","version","factory","noGlobal","arr","getProto","Object","getPrototypeOf","flat","array","class2type","hasOwn","fnToString","ObjectFunctionString","nodeType","item","isWindow","preservedScriptAttributes","src","nonce","noModule","DOMEval","node","doc","val","script","getAttribute","setAttribute","head","toType","isArrayLike","jquery","toArray","num","pushStack","elems","ret","merge","prevObject","elem","first","last","even","grep","_elem","odd","splice","copyIsArray","deep","isPlainObject","isArray","expando","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","second","invert","matches","callbackExpect","arg","guid","Symbol","iterator","_i","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","pushNative","list","booleans","whitespace","identifier","pseudos","rwhitespace","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","nonHex","high","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","dir","next","childNodes","els","seed","nid","groups","newSelector","newContext","exec","id","getElementsByTagName","getElementsByClassName","qsa","testContext","scope","toSelector","querySelectorAll","qsaError","cache","cacheLength","shift","markFunction","assert","addHandle","attrs","attrHandle","siblingCheck","cur","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","hasCompare","subWindow","defaultView","addEventListener","attachEvent","createComment","getById","getElementsByName","attrId","getAttributeNode","tag","tmp","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","selectors","createPseudo","relative","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","useCache","lastChild","uniqueID","pseudo","setFilters","idx","matched","matcher","unmatched","lang","elemLang","hash","location","activeElement","hasFocus","tabIndex","checked","selected","selectedIndex","_matchIndexes","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","setMatchers","elementMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","matcherFromGroupMatchers","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","siblings","rneedsContext","needsContext","rsingleTag","winnow","qualifier","not","rootjQuery","root","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","prevAll","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","flag","createOptions","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","empty","lock","fireWith","Deferred","func","tuples","state","always","deferred","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","stateString","when","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","JSON","getData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","getDefaultDisplay","showHide","values","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","wrapMap","thead","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","types","origFn","leverageNative","notAsync","saved","isTrigger","stopImmediatePropagation","handleObjIn","eventHandle","events","handlers","namespaces","origType","elemData","create","triggered","dispatch","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","button","addProp","hook","enumerable","originalEvent","writable","noBubble","beforeunload","returnValue","defaultPrevented","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","detail","eventPhase","pageX","pageY","shiftKey","view","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","blur","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","prepend","insertBefore","before","after","replaceWith","replaceChild","prependTo","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","rboxStyle","curCSS","computed","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","pixelBoxStylesVal","boxSizingReliableVal","scrollboxSizeVal","measure","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","borderTopWidth","borderBottomWidth","cssPrefixes","emptyStyle","vendorProps","finalPropName","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","boxModelAdjustment","box","isBorderBox","styles","computedVal","extra","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","origName","isCustomProp","setProperty","isFinite","scrollboxSizeBuggy","margin","border","suffix","expand","expanded","parts","propHooks","run","percent","eased","step","fx","scrollLeft","linear","swing","cos","PI","fxNow","inProgress","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","timer","anim","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","opt","speeds","fadeTo","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","time","checkOn","optSelected","radioValue","boolHook","nType","attrHooks","bool","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","classes","curValue","clazz","finalValue","stateVal","isValidValue","classNames","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","parserErrorElem","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","valueOrFunction","encodeURIComponent","serialize","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","active","lastModified","etag","url","isLocal","protocol","processData","async","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","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","ajaxConvert","getJSON","getScript","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","xhr","XMLHttpRequest","xhrSuccessStatus","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","params","animated","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","unbind","delegate","undelegate","fnOver","fnOut","holdReady","hold","parseJSON","isNumeric","trim","_jQuery","_$","Vnode","require","render","subscriptions","rendering","pending","sync","redraw","mount","component","Promise","buildPathname","parsePathname","compileTemplate","assign","sentinel","$window","mountRedraw","fireAsync","setPath","path","history","replaceState","route","pushState","currentPath","lastUpdate","currentResolver","SKIP","defaultRoute","routes","onremove","SyntaxError","callAsync","setImmediate","scheduled","defaultData","some","ReferenceError","resolveRoute","search","pathname","decodeURIComponent","loop","payload","matchedRoute","localComp","comp","onmatch","onbeforeupdate","oncreate","vnode","Link","onclick","oninit","onupdate","onbeforeremove","child","handleEvent","hyperscript","trust","request","parseQueryString","buildQueryString","PromisePolyfill","queryIndex","hashIndex","queryEnd","pathEnd","query","resolved","variadic","newQueryIndex","newHashIndex","newQueryEnd","newPathEnd","querystring","templateData","templateKeys","regexp","executor","resolvers","rejectors","resolveCurrent","rejectCurrent","instance","_instance","shouldAbsorb","execute","retry","executeOnce","runs","onRejection","resolveNext","rejectNext","reason","all","total","consume","race","destructure","charAt","entries","counters","entry","levels","cursor","level","nextLevel","isNumber","desc","getOwnPropertyDescriptor","hyperscriptVnode","normalizeChildren","selectorParser","selectorCache","isEmpty","compileSelector","attrValue","execSelector","newAttrs","currentRedraw","$doc","nameSpace","svg","math","getNameSpace","xmlns","checkState","callHook","createNodes","vnodes","ns","createNode","initLifecycle","dom","insertNode","createText","createHTML","domSize","createFragment","createElementNS","setAttr","setAttrs","maybeSetContentEditable","normalized","setLateSelectAttrs","$$reentrantLock$$","normalize","initComponent","createComponent","possibleParents","updateNodes","removeNodes","isOldKeyed","isKeyed","oldStart","oe","ve","topSibling","oldEnd","updateNode","getNextSibling","moveNodes","lisIndices","originalNextSibling","vnodesLength","oldIndices","getKeyMap","oldIndex","il","lisTemp","makeLisIndices","commonLength","removeNode","oldTag","force","shouldNotUpdate","updateLifecycle","updateText","removeHTML","updateHTML","updateFragment","updateAttrs","updateElement","updateComponent","frag","moveChildToFrag","contenteditable","contentEditable","stateResult","attrsResult","mask","reallyRemove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","nsLastIndex","uppercaseRegex","capital","normalizeKey","removeProperty","EventDict","ev","prevRedraw","oncompletion","callbackCount","PromiseProxy","makeRequest","background","hasHeader","__proto__","replacedAbort","assumeJSON","FormData","extract","aborted","user","deserialize","withCredentials","config","stringify","callbackKey","Stream","lift","streams","scan","acc","origin","stream","combine","scanMerge","changed","warnedHalt","dependentStreams","dependentFns","_changing","_state","createEnd","_parents","_unregisterChild","_map","ignoreInitial","s1","s2","childIndex","every","mappers","endStream","mapper","log","maxInt","regexPunycode","regexNonASCII","regexSeparators","errors","stringFromCharCode","RangeError","mapDomain","encoded","ucs2decode","output","counter","ucs2encode","fromCodePoint","digitToBasic","digit","adapt","numPoints","firstTime","baseMinusTMin","decode","codePoint","inputLength","bias","basic","lastIndexOf","oldi","baseMinusT","out","encode","basicLength","handledCPCount","handledCPCountPlusOne","q","qMinusT","toUnicode","toASCII","runtime","Op","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","_invoke","GenStateSuspendedStart","GenStateExecuting","GenStateCompleted","doneResult","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","GenStateSuspendedYield","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","NativeIteratorPrototype","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","invoke","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","info","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","awrap","iter","skipTempReset","rootRecord","rval","exception","loc","caught","hasCatch","hasFinally","finallyEntry","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","isBrowser","isFirefox","mozInnerScreenX","getCaretCoordinates","querySelector","currentStyle","isInput","whiteSpace","wordWrap","lineHeight","coordinates","offsetLeft","backgroundColor","___EXPOSE_LOADER_IMPORT___","___EXPOSE_LOADER_GLOBAL_THIS___","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__esModule","definition","bidi","multi","onchange","selectedOptions","oninput","ctrl","patchMithril","defaultMithril","modifiedMithril","Model","model","hasOnes","hasManys","attribute","hasOne","hasMany","app","extension","store","models","PostTypes","postComponents","Routes","Proxy","Reflect","dayjs","localizedFormat","tooltipGen","_assertThisInitialized","_setPrototypeOf","_inheritsLoose","subClass","superClass","_extends","setRouteWithForcedRefresh","newOptions","caller","includes","History","getCurrent","getPrevious","secondTop","canGoBack","back","home","backUrl","Pane","pinnedKey","pinned","localStorage","getItem","showing","hideTimeout","onmouseleave","togglePinned","setItem","Component","componentAttrs","initAttrs","subclassOf","B","PageState","Page","bodyClass","scrollTopOnCreate","useBrowserScrollRestoration","previous","routeName","drawer","close","scrollRestoration","_defineProperties","descriptor","_createClass","protoProps","staticProps","isObject","Item","priority","ItemList","_items","getPriority","setPriority","otherList","keepPrimitives","createItemContentProxy","toObject","itemName","property","receiver","Separator","isListItem","toVal","mix","str","isSeparator","listItems","rawItems","customTag","items","prevItem","newItems","Tag","itemClassName","classList","DiscussionHero","discussion","badges","_objectWithoutPropertiesLoose","excluded","sourceKeys","external","avatar","hasTitle","avatarUrl","alt","slug","getPlainContent","removeSelectors","ucfirst","highlight","phrase","highlighted","icon","fontClass","humanTime","abbreviateNumber","number","translator","trans","toFixed","buttonClassName","menuClassName","label","caretIcon","accessibleToggleLabel","renderItems","lazyDraw","getButton","getMenu","onshow","$menu","isRight","onhide","getButtonContent","datetime","full","ago","humanTimeUtil","pubdate","TerminalPost","lastPost","replyCount","SubtreeRetainer","callbacks","needsRebuild","invalidate","LoadingIndicator","containerClassName","completeClassName","completeContainerClassName","role","containerAttrs","ConfirmDocumentUnload","boundHandler","fireDebugWarning","forum","extractText","vdom","Button","ariaLabel","iconName","loading","_class","buttonAttrs","hasIcon","canInsertText","insertText","textarea","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","showOnFocus","ignoreTitleWarning","realText","getRealText","checkDomNodeChanged","recreateTooltip","createTooltip","updateVisibility","domNode","isSameNode","TextEditor","controlItems","toolbarItems","composer","editor","buildEditor","newDisabled","buildEditorParams","submitLabel","preview","ComposerBody","confirmExit","preventClosingWhen","hasChanges","fields","originalContent","headerItems","jumpToPreview","loaded","minimizeComposerIfFullScreen","ReplyComposer","relationships","save","post","goToNumber","alert","viewButton","controls","Alert","dismissible","ondismiss","dismissControl","alertAttrs","missingMethods","animateShow","onready","animateHide","isDismissible","pointer","ForgotPasswordModal","email","errorHandler","LogInButtons","SignUpModal","footer","isProvided","field","provided","autocomplete","logIn","identification","LogInModal","submitData","reload","remember","forgotPassword","signUp","RenameDiscussionModal","currentTitle","newTitle","section","userControls","DiscussionPage","canReply","replyAction","moderationControls","canRename","renameAction","destructiveControls","isHidden","canHide","restoreAction","canDelete","deleteAction","hideAction","goToLast","forceRefresh","pushAttributes","hiddenAt","hiddenUser","confirm","slidable","$underneathLeft","$underneathRight","startX","startY","couldBeSliding","isSliding","animatePos","newPos","newX","newY","$underneath","side","activate","specialChars","escapeRegExp","DiscussionListItem","subtree","freshness","elementAttrs","Slidable","isUnread","isRead","jumpTo","DiscussionControls","mostRelevantPost","highlightRegExp","lastPostNumber","lastReadPostNumber","markAsRead","unread","read","createdAt","infoItems","replyCountItem","slidableInstance","showFirstPost","showRepliesCount","firstPost","excerpt","contentPlain","unreadCount","class","Placeholder","DiscussionList","getParams","isInitialLoading","isLoadingNext","hasNext","loadNext","isSearchResults","getPages","pg","hotEdge","DiscussionListPane","hasItems","enoughSpace","$list","pane","$discussion","listTop","listBottom","outerHeight","discussionTop","discussionBottom","later","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","oRequestAnimationFrame","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","dt","period","PostLoading","visibleEnd","triggerScroll","calculatePositionTimeout","needsScroll","targetPost","scrollToNumber","animateScroll","scrollToIndex","reply","paused","pagesLoading","updateScrubber","loadPostsIfNeeded","calculatePosition","getMarginTop","viewportHeight","viewportTop","$item","loadPrevious","indexFromViewPort","visibleTop","visiblePost","description","startNumber","endNumber","onPositionChange","headerId","scrollToItem","flashItem","$container","itemTop","itemBottom","scrollBottom","updateScrubberHeight","forceUpdateScrubber","loadPromise","itemOffset","$placeholder","formatNumber","Intl","NumberFormat","PostStreamScrubber","updateScrubberValues","fromScroll","forceHeightChange","viewing","formattedCount","unreadPercent","styleUnread","newStyle","oldStyle","goToFirst","onresize","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","getFirstChild","cancelled","lastExec","arguments_","elapsed","timeoutID","debounceMode","clearExistingTimeout","noTrailing","wrapper","throttle","atBegin","anchorScroll","relativeScroll","PostStreamState","includedPosts","loadPageTimeouts","_loadNext","_loadPrevious","loadRange","noAnimation","resultPromise","loadNearNumber","loadNearIndex","page","near","loadCount","twoPagesAway","loadPage","backwards","loadIds","canEdit","newPosts","pageContent","loadingItems","sidebar","sidebarItems","hero","mainContent","positionChanged","preloadedDiscussion","requestParams","bySlug","included","discussionId","HeaderPrimary","LinkButton","SessionDropdown","SelectDropdown","activeChild","defaultLabel","exists","pushData","innerKey","getIdentifier","oldData","copyData","meta","apiEndpoint","pushPayload","transform","relationship","transformDate","dependentKeys","computedValue","compute","dependentValues","recompute","Badge","iconChild","badgeAttrs","badgeNode","Discussion","lastPostedAt","lastPostedUser","commentCount","lastReadAt","session","removePost","markedAllAsReadAt","link","Keys","NotificationList","markAllAsRead","isLoading","discussions","notification","subject","notifications","group","NotificationComponent","$notifications","$scrollParent","inPanel","boundScrollHandler","scrollHandler","scrollParent","atBottom","NotificationsDropdown","newNotifications","getNewCount","getUnreadCount","menuClick","goToRoute","KeyboardNavigatable","Map","whenCallback","onUp","ArrowUp","onDown","ArrowDown","onSelect","ignoreTabPress","Tab","Enter","onTab","onCancel","Escape","onRemove","Backspace","KeyboardEvent","HTMLInputElement","bindTo","navigate","keyCallback","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","DiscussionsSearchSource","limit","include","UsersSearchResults","localeCompare","Search","searchState","sources","loadingSources","navigator","searchTimeout","updateMaxHeightHandler","currentSearch","getInitialSearch","sourceItems","searchLabel","shouldShowResults","getValue","shouldShowClearButton","focused","setValue","onfocus","onblur","updateMaxHeight","maxHeight","innerHeight","setIndex","getCurrentNumericIndex","selectableItems","$input","selectResult","isCached","MIN_SEARCH_LEN","selectedUrl","UsersSearchSource","$dropdown","fixedIndex","dropdownScroll","dropdownTop","dropdownBottom","HeaderSecondary","locales","cookie","ComposerButton","ComposerState","Position","HIDDEN","componentClass","preventExit","onExit","NORMAL","FULLSCREEN","minimize","MINIMIZED","fullScreen","exitFullScreen","bodyMatches","isFullScreen","composingReplyTo","minimumHeight","maximumHeight","computedHeight","Composer","prevPosition","normal","minimized","showIfMinimized","configHandle","updateHeight","animatePositionChange","initializeHeight","mousedown","heightStart","deltaPixels","changeHeight","updateBodyPadding","$flexible","headerHeight","paddingBottom","footerHeight","animateHeightChange","$composer","oldHeight","newHeight","showBackdrop","hideBackdrop","scrollElement","topOfViewport","defaultHeight","Notification","fromUser","unreadNotificationCount","DiscussionRenamedNotification","postNumber","EditPostComposer","editedContent","editAction","Post","controlsOpen","PostControls","footerItems","actionItems","$actions","$controls","existing","GroupBadge","nameSingular","Group","namePlural","ADMINISTRATOR_ID","GUEST_ID","MEMBER_ID","EditUserModal","isEmailConfirmed","setPassword","canEditCredentials","nonAdminEditingAdmin","userIsAdmin","canEditGroups","AffixedSidebar","boundOnresize","$sidebar","$header","$footer","$affixElement","UserPage","UserCard","editable","controlsButtonClassName","loadUser","lowercaseUsername","joinTime","navItems","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","card","cardVisible","showCard","hideCard","oncardshow","oncardhide","fullTime","PostMeta","permalink","getPermalink","touch","ipAddress","PostEdited","editedUser","editedInfo","editedAt","CommentPost","revealContent","isEditing","contentHtml","refreshContent","renderFailed","isEdited","editing","toggleContent","EventPost","usernameHelper","descriptionData","descriptionKey","DiscussionRenamedPost","renamed","oldName","oldTitle","new","WelcomeHero","DiscussionComposer","titlePlaceholder","onkeydown","deferClear","IndexPage","lastDiscussion","viewItems","setTitle","oldHeroHeight","heroHeight","indexTop","indexBottom","canStartDiscussion","newDiscussionAction","sortMap","sortOptions","sortId","providesInitialSearch","PostsUserPage","moreResults","loadLimit","loadMore","refresh","loadResults","parseResults","author","PaginatedListState","pageSize","pages","initialLoading","loadingPrev","loadingNext","loadPrev","getLocation","getPrevPageNumber","getNextPageNumber","pageNum","links","hasPrev","refreshParams","newParams","paramsChanged","isLoadingPrev","getAllItems","DiscussionListState","extraDiscussions","preloadedDiscussions","relevance","latest","newest","oldest","removeDiscussion","addDiscussion","DiscussionsUserPage","cb","Checkbox","withAttr","getDisplay","Switch","FieldSet","NotificationGrid","methods","notificationMethods","notificationTypes","preferences","toggleMethod","toggleType","preferenceKey","ChangePasswordModal","ChangeEmailModal","SettingsPage","settingsItems","accountItems","notificationsItems","privacyItems","discloseOnline","discloseOnlineLoading","savePreferences","NotificationsPage","DefaultResolver","makeKey","makeAttrs","requestedPath","DiscussionPageResolver","canonicalizeDiscussionSlug","scrollToPostNumber","resolverClass","alertEmailConfirmation","ResendButton","ContainedAlert","candidateSelectors","candidateSelector","Element","getTabindex","tabindexAttr","isContentEditable","sortOrderedTabbables","isNodeMatchingSelectorFocusable","isHiddenInput","nodeUnderDetails","displayCheck","isDetailsWithSummary","isDisabledFromFieldset","isNodeMatchingSelectorTabbable","isRadio","radioScope","queryRadios","radioSet","getCheckedRadio","isTabbableRadio","isNonTabbableRadio","focusableCandidateSelector","isFocusable","trapQueue","activeFocusTraps","activateTrap","activeTrap","trapIndex","deactivateTrap","findIndex","valueOrHandler","getActualTarget","createFocusTrap","userOptions","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","containers","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","delayInitialFocusTimer","getOption","configOverrideOptions","optionName","configOptionName","containersContain","getNodeForOption","optionValue","getInitialFocusNode","firstTabbableGroup","updateTabbableNodes","regularTabbables","orderedTabbables","candidates","tabbableNodes","includeContainer","candidate","candidateTabindex","documentOrder","firstTabbableNode","lastTabbableNode","tryFocus","preventScroll","isSelectableInput","getReturnFocusNode","checkPointerDown","trap","returnFocus","checkFocusIn","targetContained","checkKey","isEscapeEvent","isTabEvent","destinationNode","containerIndex","startOfGroupIndex","destinationGroupIndex","lastOfGroupIndex","checkTab","checkClick","addListeners","capture","removeListeners","onActivate","activateOptions","onPostActivate","checkCanFocusTrap","finishActivation","deactivate","onDeactivate","deactivateOptions","onPostDeactivate","checkCanReturnFocus","finishDeactivation","pause","unpause","updateContainerElements","elementsAsArray","containerElements","_createFocusTrap","ModalManager","focusTrap","modalShown","readyCallback","AlertManager","getActiveAlerts","dismiss","RequestErrorModal","formattedError","_classCallCheck","_typeof","_possibleConstructorReturn","assertThisInitialized","_getPrototypeOf","_arrayLikeToArray","arr2","_slicedToArray","arrayWithHoles","_s","_e","_arr","_n","_d","iterableToArrayLimit","minLen","arrayLikeToArray","unsupportedIterableToArray","nonIterableRest","_defineProperty","flatten","accumulator","memoize","parseCases","isWhitespace","cases","currTermStart","latestTerm","inTerm","caseBody","branchEndIndex","findClosingBracket","fromIndex","char","splitFormattedArgument","block","separator","indexOfDelimiter","tail","keyCounter","OTHER","replaceNumberSign","numBraces","numberValues","keyParam","pluralTypeHandler","intValue","keywordPossibilities","pluralFormatter","pluralKeyword","keyword","selectTypeHandler","defaultRichHandler","traverseMessageTags","break","endingLocation","currTag","segmentIndex","segmentStart","segmentEnd","exit","findClosingTag","entireTagInSegment","segmentContainingClosingTag","tagContents","segment","replaceRichTags","processedSegment","newSegmentIndex","currTagIsClosing","currTagStart","inTag","instructions","onTagClose","recSanitizeArr","RichMessageFormatter","typeHandlers","richHandler","cleanedValues","sanitizeValues","formatted","MessageFormatter","blockStartIndex","blockEndIndex","typeHandler","mithrilRichHandler","Translator","translations","formatter","formatterTypeHandlers","setLocale","addTranslations","plural","preprocessParameters","parameters","translation","rich","Store","pushObject","createRecord","getBy","records","Session","csrfToken","login","logout","Drawer","appElement","resizeHandler","isOpen","drawerAvailableMediaQuery","allowOutsideClick","matchMedia","removeListener","$drawer","addListener","mapRoutes","basePath","resolver","RequestError","updateHumanTimes","liveHumanTimes","override","newMethod","Forum","stringToColor","rgb","hsvToRgb","User","newNotificationCount","calculateAvatarColor","Image","colorThief","crossOrigin","newPreferences","ModalManagerState","closeTimeout","invalidModalWarning","isModalOpen","AlertManagerState","activeAlerts","alertId","arg1","arg2","arg3","Application","initializers","forums","users","booted","alerts","_title","_titleCount","requestErrorAlert","initialRoute","boot","initializer","resources","userId","bootExtensions","extensions","Infinity","appEl","appHeaderEl","preloadedApiDocument","apiDocument","screen","updateTitle","setTitleCount","titleCount","pageTitleWithSeparator","transformRequestOptions","flarumOptions","modifyText","tmpOptions","originalExtract","isDebug","decodeURI","showDebug","groupEnd","queryString","Navigation","onmouseenter","getBackButton","getPaneButton","getDrawerButton","NotificationListState","SearchState","cachedSearches","Set","GlobalSearchState","initialValueSet","currPageProvidesSearch","intializeValue","clearInitialSearch","stickyParams","changeSort","ForumApplication","notificationComponents","discussionRenamed","comment","makeRouteHelpers","defaultAction","vendor","userAgent","viewingDiscussion","authenticationComplete","loggedIn","deprecatedNotice","getHandlers","blockPrefix","blockSuffix","multiline","replaceNext","prefixSpace","scanFor","surroundWithNewlines","orderedList","trimFirst","isMultipleLines","repeat","wordSelectionEnd","breakpoint","newlinesToSurroundSelectedText","newlinesToAppend","newlinesToPrepend","beforeSelection","afterSelection","breaksBefore","breaksAfter","newlinesBeforeSelection","newlinesAfterSelection","proxifyCompat","compat","strings","regex","fileExt","Select","wrapperAttrs","wrapperClassName","wrapperClass","domAttrs","ColorPreviewInput","TextEditorButton","originalView","tooltipText","evented","Parent","Mixed","mixins","styleArgs","startOfLine","endOfLine","orderedListRegex","noInitialSelection","textToUnstyle","lines","linesBefore","linesToUnstyle","line","lengthDiff","numberedLines","startsWith","multilineStyle","originalSelectionEnd","selectedText","prefixToUse","suffixToUse","wordSelectionStart","expandedSelectionStart","expandedSelectionEnd","beginsWithPrefix","endsWithSuffix","expandSelectedText","hasReplaceNext","ref","replacementText","whitespaceEdges","leadingWhitespace","trailingWhitespace","blockStyle","ThrottleDebounce","FocusTrap","Fragment","originalOnCreate","humanTimeHelper","third","LogInButton","PostPreview","compatObj"],"sourceRoot":""} |