framework/extensions/likes/js/dist/forum.js.map
flarum-bot c766881e1f Bundled output for commit e63e161be6
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-05-07 16:49:15 +00:00

1 line
56 KiB
Plaintext
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":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,sDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,qC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,gC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,0B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,kC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,2B,aCAxD,MAAM,EAA+BF,OAAOC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a,CACrBrE,KAAM,YACN2B,KAAM,mBACN4D,MAAOvL,IAAAA,WAAAA,MAAqB,wDAEhC,GACF,G","sources":["webpack://@flarum/likes/webpack/bootstrap","webpack://@flarum/likes/webpack/runtime/compat get default export","webpack://@flarum/likes/webpack/runtime/define property getters","webpack://@flarum/likes/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/likes/webpack/runtime/make namespace object","webpack://@flarum/likes/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/punctuateSeries']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/likes/../../../framework/core/js/src/common/app.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/states/PaginatedListState.ts","webpack://@flarum/likes/./src/forum/states/PostLikesModalState.ts","webpack://@flarum/likes/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/likes/../../../framework/core/js/src/common/Component.ts","webpack://@flarum/likes/../../../node_modules/clsx/dist/clsx.m.js","webpack://@flarum/likes/../../../framework/core/js/src/common/utils/classList.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/utils/extractText.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/components/LoadingIndicator.tsx","webpack://@flarum/likes/../../../framework/core/js/src/common/components/Button.tsx","webpack://@flarum/likes/../../../framework/core/js/src/common/helpers/fireDebugWarning.ts","webpack://@flarum/likes/../../../framework/core/js/src/common/helpers/icon.tsx","webpack://@flarum/likes/./src/forum/components/PostLikesModal.tsx","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/utils/string']\"","webpack://@flarum/likes/./src/forum/components/PostLikedNotification.js","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/UserPage']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/extenders']\"","webpack://@flarum/likes/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/likes/external root \"flarum.core.compat['forum/components/PostsUserPage']\"","webpack://@flarum/likes/./src/forum/components/LikesUserPage.tsx","webpack://@flarum/likes/./src/forum/extend.ts","webpack://@flarum/likes/./src/forum/index.js","webpack://@flarum/likes/./src/forum/addLikeAction.js","webpack://@flarum/likes/./src/forum/addLikesList.js","webpack://@flarum/likes/./src/forum/addLikesTabToUserProfile.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/punctuateSeries'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","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}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\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","import app from '../../common/app';\nimport Model from '../Model';\nimport { ApiQueryParamsPlural, ApiResponsePlural } from '../Store';\n\nexport interface Page<TModel> {\n number: number;\n items: TModel[];\n\n hasPrev?: boolean;\n hasNext?: boolean;\n}\n\nexport interface PaginationLocation {\n page: number;\n startIndex?: number;\n endIndex?: number;\n}\n\nexport interface PaginatedListParams {\n [key: string]: any;\n}\n\nexport interface PaginatedListRequestParams extends Omit<ApiQueryParamsPlural, 'include'> {\n include?: string | string[];\n}\n\nexport default abstract class PaginatedListState<T extends Model, P extends PaginatedListParams = PaginatedListParams> {\n protected location!: PaginationLocation;\n protected pageSize: number;\n\n protected pages: Page<T>[] = [];\n protected params: P = {} as P;\n\n protected initialLoading: boolean = false;\n protected loadingPrev: boolean = false;\n protected loadingNext: boolean = false;\n\n protected constructor(params: P = {} as P, page: number = 1, pageSize: number = 20) {\n this.params = params;\n\n this.location = { page };\n this.pageSize = pageSize;\n }\n\n abstract get type(): string;\n\n public clear(): void {\n this.pages = [];\n\n m.redraw();\n }\n\n public loadPrev(): Promise<void> {\n if (this.loadingPrev || this.getLocation().page === 1) return Promise.resolve();\n\n this.loadingPrev = true;\n\n const page: number = this.getPrevPageNumber();\n\n return this.loadPage(page)\n .then(this.parseResults.bind(this, page))\n .finally(() => (this.loadingPrev = false));\n }\n\n public loadNext(): Promise<void> {\n if (this.loadingNext) return Promise.resolve();\n\n this.loadingNext = true;\n\n const page: number = this.getNextPageNumber();\n\n return this.loadPage(page)\n .then(this.parseResults.bind(this, page))\n .finally(() => (this.loadingNext = false));\n }\n\n protected parseResults(pg: number, results: ApiResponsePlural<T>): void {\n const pageNum = Number(pg);\n\n const links = results.payload?.links;\n const page = {\n number: pageNum,\n items: results,\n hasNext: !!links?.next,\n hasPrev: !!links?.prev,\n };\n\n if (this.isEmpty() || pageNum > this.getNextPageNumber() - 1) {\n this.pages.push(page);\n } else {\n this.pages.unshift(page);\n }\n\n this.location = { page: pageNum };\n\n m.redraw();\n }\n\n /**\n * Load a new page of results.\n */\n protected loadPage(page = 1): Promise<ApiResponsePlural<T>> {\n const reqParams = this.requestParams();\n\n const include = Array.isArray(reqParams.include) ? reqParams.include.join(',') : reqParams.include;\n\n const params: ApiQueryParamsPlural = {\n ...reqParams,\n page: {\n ...reqParams.page,\n offset: this.pageSize * (page - 1),\n },\n include,\n };\n\n return app.store.find<T[]>(this.type, params);\n }\n\n /**\n * Get the parameters that should be passed in the API request.\n * Do not include page offset unless subclass overrides loadPage.\n *\n * @abstract\n * @see loadPage\n */\n protected requestParams(): PaginatedListRequestParams {\n return this.params;\n }\n\n /**\n * Update the `this.params` object, calling `refresh` if they have changed.\n * Use `requestParams` for converting `this.params` into API parameters\n *\n * @param newParams\n * @param page\n * @see requestParams\n */\n public refreshParams(newParams: P, page: number): Promise<void> {\n if (this.isEmpty() || this.paramsChanged(newParams)) {\n this.params = newParams;\n\n return this.refresh(page);\n }\n\n return Promise.resolve();\n }\n\n public refresh(page: number = 1): Promise<void> {\n this.initialLoading = true;\n this.loadingPrev = false;\n this.loadingNext = false;\n\n this.clear();\n\n this.location = { page };\n\n return this.loadPage()\n .then((results) => {\n this.pages = [];\n this.parseResults(this.location.page, results);\n })\n .finally(() => (this.initialLoading = false));\n }\n\n public getPages(): Page<T>[] {\n return this.pages;\n }\n public getLocation(): PaginationLocation {\n return this.location;\n }\n\n public isLoading(): boolean {\n return this.initialLoading || this.loadingNext || this.loadingPrev;\n }\n public isInitialLoading(): boolean {\n return this.initialLoading;\n }\n public isLoadingPrev(): boolean {\n return this.loadingPrev;\n }\n public isLoadingNext(): boolean {\n return this.loadingNext;\n }\n\n /**\n * Returns true when the number of items across all loaded pages is not 0.\n *\n * @see isEmpty\n */\n public hasItems(): boolean {\n return !!this.getAllItems().length;\n }\n\n /**\n * Returns true when there aren't any items *and* the state has already done its initial loading.\n * If you want to know whether there are items regardless of load state, use `hasItems()` instead\n *\n * @see hasItems\n */\n public isEmpty(): boolean {\n return !this.isInitialLoading() && !this.hasItems();\n }\n\n public hasPrev(): boolean {\n return !!this.pages[0]?.hasPrev;\n }\n public hasNext(): boolean {\n return !!this.pages[this.pages.length - 1]?.hasNext;\n }\n\n /**\n * Stored state parameters.\n */\n public getParams(): P {\n return this.params;\n }\n\n protected getNextPageNumber(): number {\n const pg = this.pages[this.pages.length - 1]?.number;\n\n if (pg && !isNaN(pg)) {\n return pg + 1;\n } else {\n return this.location.page;\n }\n }\n protected getPrevPageNumber(): number {\n const pg = this.pages[0]?.number;\n\n if (pg && !isNaN(pg)) {\n // If the calculated page number is less than 1,\n // return 1 as the prev page (first possible page number)\n return Math.max(pg - 1, 1);\n } else {\n return this.location.page;\n }\n }\n\n protected paramsChanged(newParams: P): boolean {\n return Object.keys(newParams).some((key) => this.getParams()[key] !== newParams[key]);\n }\n\n protected getAllItems(): T[] {\n return this.getPages()\n .map((pg) => pg.items)\n .flat();\n }\n}\n","import PaginatedListState, { PaginatedListParams } from '@flarum/core/src/common/states/PaginatedListState';\nimport User from 'flarum/common/models/User';\n\nexport interface PostLikesModalListParams extends PaginatedListParams {\n filter: {\n liked: string;\n };\n page?: {\n offset?: number;\n limit: number;\n };\n}\n\nexport default class PostLikesModalState<P extends PostLikesModalListParams = PostLikesModalListParams> extends PaginatedListState<User, P> {\n constructor(params: P, page: number = 1) {\n const limit = 10;\n\n params.page = { ...(params.page || {}), limit };\n\n super(params, page, limit);\n }\n\n get type(): string {\n return 'users';\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 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 return target;\n}","import type Mithril from 'mithril';\n\nexport interface ComponentAttrs extends Mithril.Attributes {}\n\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n * - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n * This allows us to use attrs across components without having to pass the vnode to every single\n * method.\n * - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n * the attrs that have been passed into a component.\n * - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n * us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n * - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div', <MyComponent foo=\"bar\"><p>Hello World</p></MyComponent>);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default abstract class Component<Attrs extends ComponentAttrs = ComponentAttrs, State = undefined> implements Mithril.ClassComponent<Attrs> {\n /**\n * The root DOM element for the component.\n */\n element!: Element;\n\n /**\n * The attributes passed into the component.\n *\n * @see https://mithril.js.org/components.html#passing-data-to-components\n */\n attrs!: Attrs;\n\n /**\n * Class component state that is persisted between redraws.\n *\n * Updating this will **not** automatically trigger a redraw, unlike\n * other frameworks.\n *\n * This is different to Vnode state, which is always an instance of your\n * class component.\n *\n * This is `undefined` by default.\n */\n state!: State;\n\n /**\n * @inheritdoc\n */\n abstract view(vnode: Mithril.Vnode<Attrs, this>): Mithril.Children;\n\n /**\n * @inheritdoc\n */\n oninit(vnode: Mithril.Vnode<Attrs, this>) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n oncreate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n this.element = vnode.dom;\n }\n\n /**\n * @inheritdoc\n */\n onbeforeupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n onupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n /**\n * @inheritdoc\n */\n onbeforeremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n /**\n * @inheritdoc\n */\n onremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n /**\n * Returns a jQuery object for this component's element. If you pass in a\n * selector string, this method will return a jQuery object, using the current\n * element as its buffer.\n *\n * For example, calling `component.$('li')` will return a jQuery object\n * containing all of the `li` elements inside the DOM element of this\n * component.\n *\n * @param [selector] a jQuery-compatible selector string\n * @returns the jQuery object for the DOM node\n * @final\n */\n $(selector?: string): JQuery {\n const $element = $(this.element) as JQuery<HTMLElement>;\n\n return selector ? $element.find(selector) : $element;\n }\n\n /**\n * Convenience method to attach a component without JSX.\n * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n *\n * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n */\n static component<SAttrs extends ComponentAttrs = ComponentAttrs>(attrs: SAttrs = {} as SAttrs, children: Mithril.Children = null): Mithril.Vnode {\n const componentAttrs = { ...attrs };\n\n return m(this as any, componentAttrs, children);\n }\n\n /**\n * Saves a reference to the vnode attrs after running them through initAttrs,\n * and checking for common issues.\n */\n private setAttrs(attrs: Attrs = {} as Attrs): void {\n (this.constructor as typeof Component).initAttrs(attrs);\n\n if (attrs) {\n if ('children' in attrs) {\n throw new Error(\n `[${\n (this.constructor as typeof Component).name\n }] The \"children\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute`\n );\n }\n\n if ('tag' in attrs) {\n throw new Error(`[${(this.constructor as typeof Component).name}] You cannot use the \"tag\" attribute name with Mithril 2.`);\n }\n }\n\n this.attrs = attrs;\n }\n\n /**\n * Initialize the component's attrs.\n *\n * This can be used to assign default values for missing, optional attrs.\n */\n static initAttrs(attrs: unknown): void {}\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f);else for(t in e)e[t]&&(n&&(n+=\" \"),n+=t);return n}export function clsx(){for(var e,t,f=0,n=\"\";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import clsx from 'clsx';\n\n/**\n * This util exposes `clsx` to core and extensions as a re-usable utility.\n *\n * For full documentation, see `clsx` on GitHub.\n *\n * @see https://github.com/lukeed/clsx\n */\nconst classList = clsx;\n\nexport default classList;\n","import type Mithril from 'mithril';\n\n/**\n * Extract the text nodes from a virtual element.\n */\nexport default function extractText(vdom: Mithril.Children): string {\n if (vdom instanceof Array) {\n return vdom.map((element) => extractText(element)).join('');\n } else if (typeof vdom === 'object' && vdom !== null) {\n return vdom.children ? extractText(vdom.children) : String(vdom.text);\n } else {\n return String(vdom);\n }\n}\n","import app from '../../common/app';\nimport 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 type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport interface IButtonAttrs extends ComponentAttrs {\n /**\n * Class(es) of an optional icon to be rendered within the button.\n *\n * If provided, the button will gain a `has-icon` class.\n */\n icon?: string;\n /**\n * Disables button from user input.\n *\n * Default: `false`\n */\n disabled?: boolean;\n /**\n * Show a loading spinner within the button.\n *\n * If `true`, also disables the button.\n *\n * Default: `false`\n */\n loading?: boolean;\n /**\n * **DEPRECATED:** Please use the `aria-label` attribute instead. For tooltips, use\n * the `<Tooltip>` component.\n *\n * Accessible text for the button. This should always be present if the button only\n * contains an icon.\n *\n * The textual content of this attribute is passed to the DOM element as `aria-label`.\n *\n * @deprecated\n */\n title?: string | Mithril.ChildArray;\n /**\n * Accessible text for the button. This should always be present if the button only\n * contains an icon.\n *\n * The textual content of this attribute is passed to the DOM element as `aria-label`.\n */\n 'aria-label'?: string | Mithril.ChildArray;\n /**\n * Button type.\n *\n * Default: `\"button\"`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n */\n type?: string;\n}\n\n/**\n * The `Button` component defines an element which, when clicked, performs an\n * action.\n *\n * Other attrs will be assigned as attributes on the `<button>` element.\n *\n * Note that a Button has no default class names. This is because a Button can\n * be used to represent any generic clickable control, like a menu item. Common\n * styles can be applied by providing `className=\"Button\"` to the Button component.\n */\nexport default class Button<CustomAttrs extends IButtonAttrs = IButtonAttrs> extends Component<CustomAttrs> {\n view(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n let { type, title, 'aria-label': ariaLabel, icon: iconName, disabled, loading, className, class: _class, ...attrs } = this.attrs;\n\n // If no `type` attr provided, set to \"button\"\n type ||= 'button';\n\n // Use `title` attribute as `aria-label` if none provided\n ariaLabel ||= title;\n\n // If given a translation object, extract the text.\n if (typeof ariaLabel === 'object') {\n ariaLabel = extractText(ariaLabel);\n }\n\n if (disabled || loading) {\n delete attrs.onclick;\n }\n\n className = classList(_class, className, {\n hasIcon: iconName,\n disabled: disabled || loading,\n loading: loading,\n });\n\n const buttonAttrs = {\n disabled,\n className,\n type,\n 'aria-label': ariaLabel,\n ...attrs,\n };\n\n return <button {...buttonAttrs}>{this.getButtonContent(vnode.children)}</button>;\n }\n\n oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n super.oncreate(vnode);\n\n const { 'aria-label': ariaLabel } = this.attrs;\n\n if (this.view === Button.prototype.view && !ariaLabel && !extractText(vnode.children) && !this.element?.getAttribute?.('aria-label')) {\n fireDebugWarning(\n '[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read \"Button\". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',\n this.element\n );\n }\n }\n\n /**\n * Get the template for the button's content.\n */\n protected getButtonContent(children: Mithril.Children): Mithril.ChildArray {\n const iconName = this.attrs.icon;\n\n return [\n iconName && icon(iconName, { className: 'Button-icon' }),\n children && <span className=\"Button-label\">{children}</span>,\n this.attrs.loading && <LoadingIndicator size=\"small\" display=\"inline\" />,\n ];\n }\n}\n","import app from '../app';\n\n/**\n * Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.\n *\n * This function is intended to provide warnings to extension developers about issues with\n * their extensions that may not be easily noticed when testing, such as accessibility\n * issues.\n *\n * These warnings should be hidden on production forums to ensure webmasters are not\n * inundated with do-gooders telling them they have an issue when it isn't something they\n * can fix.\n */\nexport default function fireDebugWarning(...args: Parameters<typeof console.warn>): void {\n if (!app.forum.attribute('debug')) return;\n\n console.warn(...args);\n}\n\n/**\n * Fire a Flarum deprecation warning which is shown in the JS console.\n *\n * These warnings are only shown when the forum is in debug mode, and the function exists to\n * reduce bundle size caused by multiple warnings across our JavaScript.\n *\n * @param message The message to display. (Short, but sweet, please!)\n * @param githubId The PR or Issue ID with more info in relation to this change.\n * @param [removedFrom] The version in which this feature will be completely removed. (default: 2.0)\n * @param [repo] The repo which the issue or PR is located in. (default: flarum/core)\n *\n * @see {@link fireDebugWarning}\n */\nexport function fireDeprecationWarning(message: string, githubId: string, removedFrom: string = '2.0', repo: string = 'flarum/core'): void {\n // GitHub auto-redirects between `/pull` and `/issues` for us, so using `/pull` saves 2 bytes!\n fireDebugWarning(`[Flarum ${removedFrom} Deprecation] ${message}\\n\\nSee: https://github.com/${repo}/pull/${githubId}`);\n}\n","import type Mithril from 'mithril';\nimport classList from '../utils/classList';\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 = classList('icon', fontClass, attrs.className);\n\n return <i aria-hidden=\"true\" {...attrs} />;\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Link from 'flarum/common/components/Link';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport type { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport type Post from 'flarum/common/models/Post';\nimport type Mithril from 'mithril';\nimport PostLikesModalState from '../states/PostLikesModalState';\nimport Button from '@flarum/core/src/common/components/Button';\nimport LoadingIndicator from '@flarum/core/src/common/components/LoadingIndicator';\n\nexport interface IPostLikesModalAttrs extends IInternalModalAttrs {\n post: Post;\n}\n\nexport default class PostLikesModal<CustomAttrs extends IPostLikesModalAttrs = IPostLikesModalAttrs> extends Modal<CustomAttrs, PostLikesModalState> {\n oninit(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n super.oninit(vnode);\n\n this.state = new PostLikesModalState({\n filter: {\n liked: this.attrs.post.id()!,\n },\n });\n\n this.state.refresh();\n }\n\n className() {\n return 'PostLikesModal Modal--small';\n }\n\n title() {\n return app.translator.trans('flarum-likes.forum.post_likes.title');\n }\n\n content() {\n return (\n <>\n <div className=\"Modal-body\">\n {this.state.isInitialLoading() ? (\n <LoadingIndicator />\n ) : (\n <ul className=\"PostLikesModal-list\">\n {this.state.getPages().map((page) =>\n page.items.map((user) => (\n <li>\n <Link href={app.route.user(user)}>\n {avatar(user)} {username(user)}\n </Link>\n </li>\n ))\n )}\n </ul>\n )}\n </div>\n {this.state.hasNext() ? (\n <div className=\"Modal-footer\">\n <div className=\"Form Form--centered\">\n <div className=\"Form-group\">\n <Button className=\"Button Button--block\" onclick={() => this.state.loadNext()} loading={this.state.isLoadingNext()}>\n {app.translator.trans('flarum-likes.forum.post_likes.load_more_button')}\n </Button>\n </div>\n </div>\n </div>\n ) : null}\n </>\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\n\nexport default class PostLikedNotification extends Notification {\n icon() {\n return 'far fa-thumbs-up';\n }\n\n href() {\n return app.route.post(this.attrs.notification.subject());\n }\n\n content() {\n const notification = this.attrs.notification;\n const user = notification.fromUser();\n\n return app.translator.trans('flarum-likes.forum.notifications.post_liked_text', { user, count: 1 });\n }\n\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/PostsUserPage'];","import app from 'flarum/forum/app';\nimport PostsUserPage from 'flarum/forum/components/PostsUserPage';\n\n/**\n * The `LikesUserPage` component shows posts which user the user liked.\n */\nexport default class LikesUserPage extends PostsUserPage {\n /**\n * Load a new page of the user's activity feed.\n *\n * @param offset The position to start getting results from.\n * @protected\n */\n loadResults(offset: number) {\n return app.store.find('posts', {\n filter: {\n type: 'comment',\n likedBy: this.user.id(),\n },\n page: { offset, limit: this.loadLimit },\n sort: '-createdAt',\n });\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport User from 'flarum/common/models/User';\nimport LikesUserPage from './components/LikesUserPage';\n\nexport default [\n new Extend.Routes() //\n .add('user.likes', '/u/:username/likes', LikesUserPage),\n\n new Extend.Model(Post) //\n .hasMany<User>('likes')\n .attribute<number>('likesCount')\n .attribute<boolean>('canLike'),\n];\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport addLikeAction from './addLikeAction';\nimport addLikesList from './addLikesList';\nimport PostLikedNotification from './components/PostLikedNotification';\nimport addLikesTabToUserProfile from './addLikesTabToUserProfile';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('flarum-likes', () => {\n app.notificationComponents.postLiked = PostLikedNotification;\n\n addLikeAction();\n addLikesList();\n addLikesTabToUserProfile();\n\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('postLiked', {\n name: 'postLiked',\n icon: 'far fa-thumbs-up',\n label: app.translator.trans('flarum-likes.forum.settings.notify_post_liked_label'),\n });\n });\n});\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport CommentPost from 'flarum/forum/components/CommentPost';\n\nexport default function () {\n extend(CommentPost.prototype, 'actionItems', function (items) {\n const post = this.attrs.post;\n\n if (post.isHidden() || !post.canLike()) return;\n\n const likes = post.likes();\n\n let isLiked = app.session.user && likes && likes.some((user) => user === app.session.user);\n\n items.add(\n 'like',\n <Button\n className=\"Button Button--link\"\n onclick={() => {\n isLiked = !isLiked;\n\n post.save({ isLiked });\n\n // We've saved the fact that we do or don't like the post, but in order\n // to provide instantaneous feedback to the user, we'll need to add or\n // remove the like from the relationship data manually.\n const data = post.data.relationships.likes.data;\n data.some((like, i) => {\n if (like.id === app.session.user.id()) {\n data.splice(i, 1);\n return true;\n }\n });\n\n if (isLiked) {\n data.unshift({ type: 'users', id: app.session.user.id() });\n }\n }}\n >\n {app.translator.trans(isLiked ? 'flarum-likes.forum.post.unlike_link' : 'flarum-likes.forum.post.like_link')}\n </Button>\n );\n });\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport Link from 'flarum/common/components/Link';\nimport punctuateSeries from 'flarum/common/helpers/punctuateSeries';\nimport username from 'flarum/common/helpers/username';\nimport icon from 'flarum/common/helpers/icon';\n\nimport PostLikesModal from './components/PostLikesModal';\nimport Button from '@flarum/core/src/common/components/Button';\n\nexport default function () {\n extend(CommentPost.prototype, 'footerItems', function (items) {\n const post = this.attrs.post;\n const likes = post.likes();\n\n if (likes && likes.length) {\n const limit = 4;\n const overLimit = post.likesCount() > limit;\n\n // Construct a list of names of users who have liked this post. Make sure the\n // current user is first in the list, and cap a maximum of 4 items.\n const names = likes\n .sort((a) => (a === app.session.user ? -1 : 1))\n .slice(0, overLimit ? limit - 1 : limit)\n .map((user) => {\n return (\n <Link href={app.route.user(user)}>\n {user === app.session.user ? app.translator.trans('flarum-likes.forum.post.you_text') : username(user)}\n </Link>\n );\n });\n\n // If there are more users that we've run out of room to display, add a \"x\n // others\" name to the end of the list. Clicking on it will display a modal\n // with a full list of names.\n if (overLimit) {\n const count = post.likesCount() - names.length;\n const label = app.translator.trans('flarum-likes.forum.post.others_link', { count });\n\n if (app.forum.attribute('canSearchUsers')) {\n names.push(\n <Button\n className=\"Button Button--ua-reset Button--text\"\n onclick={(e) => {\n e.preventDefault();\n app.modal.show(PostLikesModal, { post });\n }}\n >\n {label}\n </Button>\n );\n } else {\n names.push(<span>{label}</span>);\n }\n }\n\n items.add(\n 'liked',\n <div className=\"Post-likedBy\">\n {icon('far fa-thumbs-up')}\n {app.translator.trans(`flarum-likes.forum.post.liked_by${likes[0] === app.session.user ? '_self' : ''}_text`, {\n count: names.length,\n users: punctuateSeries(names),\n })}\n </div>\n );\n }\n });\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport type Mithril from 'mithril';\n\nexport default function addLikesTabToUserProfile() {\n extend(UserPage.prototype, 'navItems', function (items: ItemList<Mithril.Children>) {\n const user = this.user;\n items.add(\n 'likes',\n <LinkButton href={app.route('user.likes', { username: user?.slug() })} icon=\"far fa-thumbs-up\">\n {app.translator.trans('flarum-likes.forum.user.likes_link')}\n </LinkButton>,\n 88\n );\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","_extends","assign","target","i","arguments","length","source","apply","this","_defineProperties","props","descriptor","configurable","writable","w","window","Proxy","_","properties","Reflect","app","set","PostLikesModalState","params","page","limit","Constructor","protoProps","pageSize","location","pages","initialLoading","loadingPrev","loadingNext","clear","m","redraw","loadPrev","getLocation","Promise","resolve","getPrevPageNumber","loadPage","then","parseResults","loadNext","getNextPageNumber","pg","results","pageNum","Number","links","payload","number","items","hasNext","next","hasPrev","prev","isEmpty","push","unshift","reqParams","requestParams","include","Array","isArray","join","offset","store","find","type","refreshParams","newParams","paramsChanged","refresh","getPages","isLoading","isInitialLoading","isLoadingPrev","isLoadingNext","hasItems","getAllItems","getParams","isNaN","Math","max","keys","some","map","flat","_objectWithoutPropertiesLoose","excluded","sourceKeys","indexOf","Component","element","attrs","state","oninit","vnode","setAttrs","oncreate","dom","onbeforeupdate","onupdate","onbeforeremove","onremove","$","selector","$element","component","children","componentAttrs","initAttrs","Error","name","r","e","t","f","n","extractText","vdom","String","text","LoadingIndicator","view","display","size","containerClassName","className","completeClassName","classList","completeContainerClassName","translator","trans","role","containerAttrs","Button","title","ariaLabel","iconName","icon","disabled","loading","_class","onclick","buttonAttrs","hasIcon","getButtonContent","getAttribute","forum","attribute","console","warn","fireDebugWarning","fontClass","PostLikesModal","filter","liked","post","id","content","user","href","avatar","username","Modal","PostLikedNotification","notification","subject","fromUser","count","excerpt","truncate","contentPlain","Notification","LikesUserPage","loadResults","likedBy","loadLimit","sort","PostsUserPage","Extend","add","Post","hasMany","extend","CommentPost","isHidden","canLike","likes","isLiked","save","data","relationships","like","splice","overLimit","likesCount","names","slice","label","preventDefault","users","punctuateSeries","UserPage","slug","NotificationGrid"],"sourceRoot":""}