framework/js/dist/forum.js.map
flarum-bot 7b80d3932d Bundled output for commit c44cf42e2c
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-10-31 20:20:31 +00:00

1 line
1.4 MiB
Generated
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"file":"forum.js","mappings":";uBASC,SAAUA,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,SAE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,GACtB,4BAA6BjW,GAC7B,4BAA6B7a,GAC7B,gCAAiCyE,GACjC,wBAAyBpF,GACzB,0BAA2BzC,GAC3B,iCAAkC6B,GAClC,0BAA2Bsa,GAC3B,yBAA0B8d,GAC1B,iCAAkC7T,GAClC,sBAAuB5L,GACvB,6BAA8B/H,GAC9B,2BAA4BF,GAC5B,wBAAyB6O,GACzB,wBAAyBvX,GACzB,iCAAkCsd,GAClC,uBAAwBpE,GACxB,2CAA4CzG,GAC5C,qCAAsC1F,GACtC,6BAA8BsC,GAC9B,4BAA6BG,GAC7B,4BAA6BlS,GAC7B,8BAA+BuC,GAC/B,0BAA2BuV,GAC3B,kBAAmBtC,GACnB,0BAA2B0K,GAC3B,0BAA2BtsB,GAC3B,8BAA+BqsB,GAC/B,mCAAoCzR,GACpC,sBAAuB4I,GACvB,sBAAuBgC,GACvB,sBAAuB/B,GACvB,+BAAgC5F,GAChC,8BAA+B+N,GAC/B,yBAA0BuT,GAC1B,uBAAwBjY,GACxB,4BAA6BjqB,EAC7B,sBAAuB+oB,GACvB,mCAAoCsB,GACpC,gCAAiCM,GACjC,0BAA2B3gB,GAC3B,8BAA+B2S,GAC/B,yBAA0B+N,GAC1B,yBAA0BzgB,GAC1B,yBAA0Buf,GAC1B,iCAAkCvY,GAClC,2BAA4BvI,GAC5B,+BAAgCmnB,GAChC,gCAAiC1a,GACjC,8BAA+BqP,GAC/B,mCAAoCzZ,GACpC,oBAAqBkU,GACrB,gCAAiC1R,GACjC,yBAA0ByD,GAC1B,2BAA4B4a,GAC5B,mCAAoCsE,GACpCvnC,OAAQA,GACRi0C,iBAAkBA,KCvIpBuF,GAAAA,IAAgB5mC,GAET,IAAMujC,GAAS6C,GAAcQ,GAAW","sources":["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/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.js","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/./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.js","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.js","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/components/NotificationList.js","webpack://@flarum/core/./src/forum/components/NotificationsDropdown.js","webpack://@flarum/core/./src/forum/utils/KeyboardNavigatable.ts","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/./node_modules/@babel/runtime/helpers/esm/createClass.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.js","webpack://@flarum/core/./src/forum/utils/alertEmailConfirmation.js","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.js","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.js","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/./src/common/components/Select.js","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":["/* ========================================================================\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","/* 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\nif (!Array.prototype['flat']) {\n Array.prototype['flat'] = function flat(this: any[], depth: number = 1): any[] {\n return depth > 0\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 [...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\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 constructor(defaultRoute) {\n /**\n * The stack of routes that have been navigated to.\n *\n * @type {Array}\n * @protected\n */\n this.stack = [];\n }\n\n /**\n * Get the item on the top of the stack.\n *\n * @return {Object}\n * @public\n */\n getCurrent() {\n return this.stack[this.stack.length - 1];\n }\n\n /**\n * Get the previous item on the stack.\n *\n * @return {Object}\n * @public\n */\n getPrevious() {\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 * @public\n */\n push(name, title, 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 * @return {Boolean}\n * @public\n */\n canGoBack() {\n return this.stack.length > 1;\n }\n\n /**\n * Go back to the previous route in the history stack.\n *\n * @public\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 * @public\n */\n backUrl() {\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 * @public\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(attrs = {}, children = null): Mithril.Vnode {\n const componentAttrs = Object.assign({}, attrs) as Record<string, unknown>;\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 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 oninit(vnode) {\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 * A class name to apply to the body while the route is active.\n *\n * @type {String}\n */\n this.bodyClass = '';\n\n /**\n * Whether we should scroll to the top of the page when its rendered.\n *\n * @type {Boolean}\n */\n this.scrollTopOnCreate = true;\n\n /**\n * Whether the browser should restore scroll state on refreshes.\n *\n * @type {Boolean}\n */\n this.useBrowserScrollRestoration = true;\n }\n\n oncreate(vnode) {\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) {\n super.onremove(vnode);\n\n if (this.bodyClass) {\n $('#app').removeClass(this.bodyClass);\n }\n }\n}\n","class Item {\n content: any;\n priority: number;\n key?: number;\n\n constructor(content: any, 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 {\n /**\n * The items in the list\n */\n items: { [key: string]: Item } = {};\n\n /**\n * Check whether the list is empty.\n */\n isEmpty(): boolean {\n for (const i in this.items) {\n if (this.items.hasOwnProperty(i)) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Check whether an item is present in the list.\n */\n has(key: string): boolean {\n return !!this.items[key];\n }\n\n /**\n * Get the content of an item.\n */\n get(key: string): any {\n return this.items[key].content;\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\n * priority will be positioned before items with a lower priority.\n */\n add(key: string, content: any, priority: number = 0): this {\n this.items[key] = new Item(content, priority);\n\n return this;\n }\n\n /**\n * Replace an item in the list, only if it is already present.\n */\n replace(key: string, content: any = null, priority: number = null): this {\n if (this.items[key]) {\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\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 merge(items: this): this {\n for (const i in items.items) {\n if (items.items.hasOwnProperty(i) && items.items[i] instanceof Item) {\n this.items[i] = items.items[i];\n }\n }\n\n return this;\n }\n\n /**\n * Convert the list into an array of item content arranged by priority. Each\n * item's content will be assigned an `itemName` property equal to the item's\n * unique key.\n */\n toArray(): any[] {\n const items: Item[] = [];\n\n for (const i in this.items) {\n if (this.items.hasOwnProperty(i) && this.items[i] instanceof Item) {\n this.items[i].content = Object(this.items[i].content);\n\n this.items[i].content.itemName = i;\n items.push(this.items[i]);\n this.items[i].key = items.length;\n }\n }\n\n return items\n .sort((a, b) => {\n if (a.priority === b.priority) {\n return a.key - b.key;\n } else if (a.priority > b.priority) {\n return -1;\n }\n return 1;\n })\n .map((item) => item.content);\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 Separator from '../components/Separator';\nimport classList from '../utils/classList';\n\nfunction isSeparator(item): boolean {\n return item.tag === Separator;\n}\n\nfunction withoutUnnecessarySeparators(items: Array<Mithril.Vnode>): Array<Mithril.Vnode> {\n const newItems = [];\n let prevItem;\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 a collection of components in <li> tags,\n * stripping out any unnecessary `Separator` components.\n */\nexport default function listItems(items: Mithril.Vnode | Array<Mithril.Vnode>): Array<Mithril.Vnode> {\n if (!(items instanceof Array)) items = [items];\n\n return withoutUnnecessarySeparators(items).map((item: Mithril.Vnode) => {\n const isListItem = item.tag && item.tag.isListItem;\n const active = item.tag && item.tag.isActive && item.tag.isActive(item.attrs);\n const className = (item.attrs && 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 <li\n className={classList([className, item.itemName && `item-${item.itemName}`, active && 'active'])}\n key={(item.attrs && item.attrs.key) || item.itemName}\n >\n {item}\n </li>\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 User from '../models/User';\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: Object = {}): 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 &nbsp;').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 icons 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: Date): 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","/**\n * Extract the text nodes from a virtual element.\n *\n * @param {VirtualElement} vdom\n * @return {String}\n */\nexport default function extractText(vdom) {\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) : vdom.text;\n } else {\n return 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.Vnode<IButtonAttrs, never>) {\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<IButtonAttrs, 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 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) => {\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 keyHandlers(params: EditorDriverParams): ItemList {\n const items = new ItemList();\n\n items.add('submit', function (e) {\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 { TooltipCreationOptions } from '../../../@types/tooltips';\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.Vnode) {\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.ChildArray;\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 = [];\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 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\ninterface 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 Component<ModalAttrs & IInternalModalAttrs> {\n /**\n * Determine whether or not the modal should be dismissible via an 'x' button.\n */\n static readonly isDismissible = 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 & IInternalModalAttrs, 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 & IInternalModalAttrs, this>) {\n super.oncreate(vnode);\n\n this.attrs.animateShow(() => this.onready());\n }\n\n onbeforeremove(vnode: Mithril.VnodeDOM<ModalAttrs & IInternalModalAttrs, 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 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.bind(this),\n className: 'Button Button--icon Button--link',\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 abstract onsubmit(e: Event): void;\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() {\n this.attrs.state.close();\n }\n\n /**\n * Sets `loading` to false and triggers a redraw.\n */\n loaded() {\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) {\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 app from '../../forum/app';\nimport Page 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';\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 extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.useBrowserScrollRestoration = false;\n\n /**\n * The discussion that is being viewed.\n *\n * @type {Discussion}\n */\n this.discussion = null;\n\n /**\n * The number of the first post that is currently visible in the viewport.\n *\n * @type {number}\n */\n this.near = m.route.param('near') || 0;\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 app.history.push('discussion');\n\n this.bodyClass = 'App--discussion';\n }\n\n onremove(vnode) {\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();\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 * @param {Discussion} discussion\n */\n show(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, b) => 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 * @return {ItemList}\n */\n sidebarItems() {\n const items = new ItemList();\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 );\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 * @param {Integer} startNumber\n * @param {Integer} endNumber\n */\n positionChanged(startNumber, endNumber) {\n const discussion = this.discussion;\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 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('&nbsp;');\n\n const newStyle = { ...style, '--badge-bg': color };\n\n const badgeAttrs = {\n ...attrs,\n className,\n style: newStyle,\n };\n\n const badgeNode = <div {...badgeAttrs}>{iconChild}</div>;\n\n // If we don't have a tooltip label, don't render the tooltip component.\n if (!label) return badgeNode;\n\n return <Tooltip text={label}>{badgeNode}</Tooltip>;\n }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\nimport computed from '../utils/computed';\nimport ItemList from '../utils/ItemList';\nimport Badge from '../components/Badge';\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","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","type KeyboardEventHandler = (event: KeyboardEvent) => void;\ntype ShouldHandle = (event: KeyboardEvent) => boolean;\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(38, (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(40, (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 and Tab keys..\n */\n onSelect(callback: KeyboardEventHandler): KeyboardNavigatable {\n const handler: KeyboardEventHandler = (e) => {\n e.preventDefault();\n callback(e);\n };\n\n this.callbacks.set(9, handler);\n this.callbacks.set(13, 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(27, (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 * @public\n * @param {KeyboardNavigatable~keyCallback} callback\n * @return {KeyboardNavigatable}\n */\n onRemove(callback: KeyboardEventHandler): KeyboardNavigatable {\n this.callbacks.set(8, (e) => {\n if (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) {\n // Handle navigation key events on the navigatable element.\n $element.on('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 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';\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, unknown[]>();\n\n search(query: string) {\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) => this.results.set(query, results));\n }\n\n view(query: string): Array<Mithril.Vnode> {\n query = query.toLowerCase();\n\n const results = (this.results.get(query) || []).map((discussion: unknown) => {\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 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 type Mithril from 'mithril';\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, unknown[]>();\n\n search(query: string) {\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';\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 */\n search(query: string);\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 state!: 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?: number;\n\n private updateMaxHeightHandler?: () => void;\n\n oninit(vnode: Mithril.Vnode<T, this>) {\n super.oninit(vnode);\n\n this.state = this.attrs.state;\n }\n\n view() {\n const currentSearch = this.state.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.state.getValue() && this.hasFocus);\n const shouldShowClearButton = !!(!this.loadingSources && this.state.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.state.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.state.getValue()}\n oninput={(e) => this.state.setValue(e.target.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.state.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 this.element.querySelector('.Search-results').style['max-height'] = `${maxHeight}px`;\n }\n\n onupdate(vnode) {\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) {\n super.oncreate(vnode);\n\n const search = this;\n const state = this.state;\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))\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 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) {\n super.onremove(vnode);\n\n window.removeEventListener('resize', this.updateMaxHeightHandler);\n }\n\n /**\n * Navigate to the currently selected search result and close the list.\n */\n selectResult() {\n clearTimeout(this.searchTimeout);\n this.loadingSources = 0;\n\n if (this.state.getValue()) {\n m.route.set(this.getItem(this.index).find('a').attr('href'));\n } else {\n this.clear();\n }\n\n this.$('input').blur();\n }\n\n /**\n * Clear the search\n */\n clear() {\n this.state.clear();\n }\n\n /**\n * Build an item list of SearchSources.\n */\n sourceItems(): ItemList {\n const items = new ItemList();\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 string classes\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 === discussion.user()) {\n classes.push('Post--by-start-user');\n }\n\n return classes;\n }\n\n /**\n * Build an item list for the post's actions.\n *\n * @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\">');\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 {\n if (user.lastSeenAt() && user.isOnline()) {\n return <span className=\"UserOnline\">{icon('fas fa-circle')}</span>;\n }\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 })}\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 = {};\n for (const i in sortMap) {\n sortOptions[i] = app.translator.trans('core.forum.index_sort.' + i + '_button');\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","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}","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 default abstract class PaginatedListState<T extends Model> {\n protected location!: PaginationLocation;\n protected pageSize: number;\n\n protected pages: Page<T>[] = [];\n protected params: any = {};\n\n protected initialLoading: boolean = false;\n protected loadingPrev: boolean = false;\n protected loadingNext: boolean = false;\n\n protected constructor(params: any = {}, 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 offset: this.pageSize * (page - 1),\n ...params.page,\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, page: number) {\n if (this.isEmpty() || this.paramsChanged(newParams)) {\n this.params = newParams;\n\n return this.refresh(page);\n }\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): 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 } from '../../common/states/PaginatedListState';\nimport Discussion from '../../common/models/Discussion';\n\nexport default class DiscussionListState extends PaginatedListState<Discussion> {\n protected extraDiscussions: Discussion[] = [];\n\n constructor(params: any, page: number = 1) {\n super(params, page, 20);\n }\n\n get type(): string {\n return 'discussions';\n }\n\n requestParams() {\n const params: any = { include: ['user', 'lastPostedUser'], filter: this.params.filter || {} };\n\n params.sort = this.sortMap()[this.params.sort];\n\n if (this.params.q) {\n params.filter.q = this.params.q;\n\n params.include.push('mostRelevantPost', 'mostRelevantPost.user');\n }\n return params;\n }\n\n protected loadPage(page: number = 1): any {\n const preloadedDiscussions = app.preloadedApiDocument();\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() {\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() {\n return !!this.params.q;\n }\n\n removeDiscussion(discussion: Discussion) {\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) {\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[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 app from '../../forum/app';\nimport DefaultResolver from '../../common/resolvers/DefaultResolver';\nimport DiscussionPage 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 extends DefaultResolver {\n static scrollToPostNumber: string | 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, requestedPath, route) {\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) {\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 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';\n\n/**\n * The `routes` initializer defines the forum app's routes.\n *\n * @param {App} app\n */\nexport default function (app) {\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 /**\n * Generate a URL to a discussion.\n *\n * @param {Discussion} discussion\n * @param {Integer} [near]\n * @return {String}\n */\n app.route.discussion = (discussion, near) => {\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 * @param {Post} post\n * @return {String}\n */\n app.route.post = (post) => {\n return app.route.discussion(post.discussion(), post.number());\n };\n\n /**\n * Generate a URL to a user.\n *\n * @param {User} user\n * @return {String}\n */\n app.route.user = (user) => {\n return app.route('user', {\n username: user.slug(),\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","/* \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 type Mithril from 'mithril';\nimport type ModalManagerState from '../states/ModalManagerState';\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 view() {\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>) {\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\n animateShow(readyCallback: () => void): void {\n if (!this.attrs.state.modal) return;\n\n const dismissible = !!this.attrs.state.modal.componentClass.isDismissible;\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}\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 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');\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';\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 constructor(user, csrfToken) {\n /**\n * The current authenticated user.\n *\n * @type {User|null}\n * @public\n */\n this.user = user;\n\n /**\n * The CSRF token.\n *\n * @type {String|null}\n * @public\n */\n this.csrfToken = csrfToken;\n }\n\n /**\n * Attempt to log in a user.\n *\n * @param {String} identification The username/email.\n * @param {String} password\n * @param {Object} [options]\n * @return {Promise}\n * @public\n */\n login(body, options = {}) {\n return app.request(\n Object.assign(\n {\n method: 'POST',\n url: `${app.forum.attribute('baseUrl')}/login`,\n body,\n },\n options\n )\n );\n }\n\n /**\n * Log the user out.\n *\n * @public\n */\n logout() {\n window.location = `${app.forum.attribute('baseUrl')}/logout?token=${this.csrfToken}`;\n }\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 constructor() {\n // Set up an event handler so that whenever the content area is tapped,\n // the drawer will close.\n $('#content').click((e) => {\n if (this.isOpen()) {\n e.preventDefault();\n this.hide();\n }\n });\n }\n\n /**\n * Check whether or not the drawer is currently open.\n *\n * @return {Boolean}\n * @public\n */\n isOpen() {\n return $('#app').hasClass('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 const $app = $('#app');\n\n if (!$app.hasClass('drawerOpen')) 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 $app.removeClass('drawerOpen');\n\n if (this.$backdrop) this.$backdrop.remove();\n }\n\n /**\n * Show the drawer.\n *\n * @public\n */\n show() {\n $('#app').addClass('drawerOpen');\n\n this.$backdrop = $('<div/>')\n .addClass('drawer-backdrop fade')\n .appendTo('body')\n .click(() => this.hide());\n\n setTimeout(() => this.$backdrop.addClass('in'));\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","export default class RequestError {\n status: number;\n options: Record<string, unknown>;\n xhr: XMLHttpRequest;\n\n responseText: string | null;\n response: Record<string, unknown> | null;\n\n alert: any;\n\n constructor(status: number, responseText: string | null, options: Record<string, unknown>, 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} object The object that owns the method\n * @param {string|string[]} methods The name or names of the method(s) to extend\n * @param {function} callback A callback which mutates the method's output\n */\nexport function extend(object, methods, callback) {\n const allMethods = Array.isArray(methods) ? methods : [methods];\n\n allMethods.forEach((method) => {\n const original = object[method];\n\n object[method] = function (...args) {\n const value = original ? original.apply(this, args) : undefined;\n\n callback.apply(this, [value].concat(args));\n\n return value;\n };\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} object The object that owns the method\n * @param {string|string[]} method The name or names of the method(s) to override\n * @param {function} newMethod The method to replace it with\n */\nexport function override(object, methods, newMethod) {\n const allMethods = Array.isArray(methods) ? methods : [methods];\n\n allMethods.forEach((method) => {\n const original = object[method];\n\n object[method] = function (...args) {\n return newMethod.apply(this, [original.bind(this)].concat(args));\n };\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;\n let g;\n let b;\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?: number;\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 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): 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 from './utils/RequestError';\nimport ScrollListener from './utils/ScrollListener';\nimport liveHumanTimes from './utils/liveHumanTimes';\nimport { extend } from './extend';\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<\n Record<string, unknown>,\n Component<{ routeName: string; [key: string]: unknown }>,\n Record<string, unknown>\n>;\n\nexport interface FlarumRequestOptions<ResponseType> extends Omit<Mithril.RequestOptions<ResponseType>, 'extract'> {\n errorHandler: (errorMessage: string) => 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 (): 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 load(payload: Application['data']) {\n this.data = payload;\n this.translator.setLocale(payload.locale);\n }\n\n 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 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 extender.extend(this, { name, exports: extension });\n }\n });\n }\n\n 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 /**\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 = { ...originalOptions };\n\n // Set some default options if they haven't been overridden. We want to\n // authenticate all requests with the session token. We also want all\n // requests to run asynchronously in the background, so that they don't\n // prevent redraws from occurring.\n options.background ||= true;\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 // 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 options.deserialize ||= (responseText: string) => responseText;\n\n options.errorHandler ||= (error) => {\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 original = options.modifyText || options.extract;\n\n // @ts-expect-error\n options.extract = (xhr: XMLHttpRequest) => {\n let responseText;\n\n if (original) {\n responseText = original(xhr.responseText);\n } else {\n responseText = xhr.responseText || null;\n }\n\n const status = xhr.status;\n\n if (status < 200 || status > 299) {\n throw new RequestError(`${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 // @ts-expect-error\n return JSON.parse(responseText);\n } catch (e) {\n throw new RequestError('500', `${responseText}`, options, xhr);\n }\n };\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) => {\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] && errors[0].detail && errors.map((e) => decodeURI(e.detail));\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 (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 }\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 title: 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 });\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 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';\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 constructor() {\n super();\n\n routes(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 * @param {Discussion} discussion\n * @return {Boolean}\n */\n viewingDiscussion(discussion) {\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 * @param {Object} payload A dictionary of attrs to pass into the sign up\n * modal. A truthy `loggedIn` attr indicates that the user has logged\n * in, and thus the page is reloaded.\n * @public\n */\n authenticationComplete(payload) {\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 &&\n navigator.vendor.includes('Apple') &&\n navigator.userAgent &&\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-ignore\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 (compat: { [key: string]: any }, namespace: string) => {\n // regex to replace common/ and NAMESPACE/ for core & core extensions\n // e.g. admin/utils/extract --> utils/extract\n // e.g. tags/common/utils/sortTags --> tags/utils/sortTags\n const regex = new RegExp(`(\\\\w+\\\\/)?(${namespace}|common)\\\\/`);\n\n return new Proxy(compat, {\n get: (obj, prop: string) => obj[prop] || obj[prop.replace(regex, '$1')],\n });\n};\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 extractText from '../utils/extractText';\nimport Button from './Button';\nimport Tooltip from './Tooltip';\n\n/**\n * The `TextEditorButton` component displays a button suitable for the text\n * editor toolbar.\n *\n * Automatically creates tooltips using the Tooltip component and provided text.\n *\n * ## Attrs\n * - `title` - Tooltip for the button\n */\nexport default class TextEditorButton extends Button {\n view(vnode) {\n const originalView = super.view(vnode);\n\n return <Tooltip text={this.attrs.tooltipText || extractText(vnode.children)}>{originalView}</Tooltip>;\n }\n\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n\n attrs.className = attrs.className || 'Button Button--icon Button--link';\n attrs.tooltipText = attrs.title;\n }\n}\n","import * as extend from './extend';\nimport 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 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 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';\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 '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/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) {\n const $element = $(this.element);\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\ncompatObj.app = app;\n\nexport const compat = proxifyCompat(compatObj, 'forum');\n"],"names":["$","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","module","exports","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","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","toStringTag","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","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","previous","routeName","drawer","close","bodyClass","scrollTopOnCreate","useBrowserScrollRestoration","scrollRestoration","Item","priority","ItemList","items","itemName","Separator","isListItem","toVal","mix","str","isSeparator","listItems","prevItem","newItems","withoutUnnecessarySeparators","itemClassName","classList","DiscussionHero","discussion","badges","_objectWithoutPropertiesLoose","excluded","sourceKeys","property","external","avatar","hasTitle","displayName","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","record","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","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","onDown","onSelect","onCancel","onRemove","bindTo","navigate","keyCallback","DiscussionsSearchSource","limit","include","UsersSearchResults","localeCompare","Search","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","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","providesInitialSearch","PostsUserPage","moreResults","loadLimit","loadMore","refresh","loadResults","parseResults","author","_defineProperties","descriptor","_createClass","protoProps","staticProps","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","sent","ContainedAlert","ModalManager","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","isOpen","$app","$drawer","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","modifyText","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","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","compat","regex","Select","wrapperAttrs","wrapperClassName","wrapperClass","domAttrs","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","proxifyCompat","ThrottleDebounce","Fragment","originalOnCreate","humanTimeHelper","third","LogInButton","PostPreview","compatObj"],"sourceRoot":""}