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C,SAAU0L,EAAAA,GAAAA,SAAAA,YAA8BvO,SAASC,eAAe,oBAIvFqO,EAAU,CAACtX,EAAuBkD,KAC7Cga,IACA3F,EAAAA,GAAAA,QAAcvX,EAASkD,IAGZ9M,EAAQ,CAAC4J,EAAuBkD,KAC3Cga,IACA3F,EAAAA,GAAAA,MAAYvX,EAASkD","sources":["webpack://fider/./public/components/ErrorBoundary.tsx","webpack://fider/./public/components/ShowPostResponse.tsx","webpack://fider/./public/components/ShowPostStatus.tsx","webpack://fider/./public/components/ShowTag.tsx","webpack://fider/./public/components/Header.tsx","webpack://fider/./public/components/common/Button.tsx","webpack://fider/./public/components/common/form/Form.tsx","webpack://fider/./public/components/common/form/DisplayError.tsx","webpack://fider/./public/components/common/form/Input.tsx","webpack://fider/./public/components/common/form/ImageUploader.tsx","webpack://fider/./public/components/common/form/MultiImageUploader.tsx","webpack://fider/./public/components/common/form/TextArea.tsx","webpack://fider/./public/components/common/form/RadioButton.tsx","webpack://fider/./public/components/common/form/Select.tsx","webpack://fider/./public/components/common/form/Field.tsx","webpack://fider/./public/components/common/form/Checkbox.tsx","webpack://fider/./public/components/common/form/ImageViewer.tsx","webpack://fider/./public/components/common/Markdown.tsx","webpack://fider/./public/components/common/DevBanner.tsx","webpack://fider/./public/components/common/Icon.tsx","webpack://fider/./public/components/common/Avatar.tsx","webpack://fider/./public/components/common/AvatarStack.tsx","webpack://fider/./public/components/common/Message.tsx","webpack://fider/./public/components/common/Hint.tsx","webpack://fider/./public/components/common/Legal.tsx","webpack://fider/./public/components/common/SocialSignInButton.tsx","webpack://fider/./public/components/common/SignInControl.tsx","webpack://fider/./public/components/common/Moment.tsx","webpack://fider/./public/components/common/Modal.tsx","webpack://fider/./public/components/common/UserName.tsx","webpack://fider/./public/components/common/Loader.tsx","webpack://fider/./public/components/common/Logo.tsx","webpack://fider/./public/components/common/Toggle.tsx","webpack://fider/./public/components/common/PoweredByFider.tsx","webpack://fider/./public/components/common/PageTitle.tsx","webpack://fider/./public/components/common/Dropdown.tsx","webpack://fider/./public/components/SignInModal.tsx","webpack://fider/./public/components/VoteCounter.tsx","webpack://fider/./public/components/NotificationIndicator.tsx","webpack://fider/./public/components/UserMenu.tsx","webpack://fider/./public/components/layout/Stack.tsx","webpack://fider/./public/components/layout/Divider.tsx","webpack://fider/./public/models/post.ts","webpack://fider/./public/models/identity.ts","webpack://fider/./public/models/settings.ts","webpack://fider/./public/services/http.ts","webpack://fider/./public/services/cache.ts","webpack://fider/./public/services/analytics.ts","webpack://fider/./public/services/fider.ts","webpack://fider/./public/services/jwt.ts","webpack://fider/./public/services/utils.ts","webpack://fider/./public/services/i18n.ts","webpack://fider/./public/services/markdown.ts","webpack://fider/./public/services/notify.ts","webpack://fider/./public/services/navigator.ts","webpack://fider/./public/services/querystring.ts","webpack://fider/./public/services/device.ts","webpack://fider/./public/services/actions/user.ts","webpack://fider/./public/services/actions/tag.ts","webpack://fider/./public/services/actions/post.ts","webpack://fider/./public/services/actions/tenant.ts","webpack://fider/./public/services/actions/notification.ts","webpack://fider/./public/services/actions/invite.ts","webpack://fider/./public/services/actions/infra.ts","webpack://fider/./public/services/toastify.tsx"],"sourcesContent":["import React from \"react\"\nimport { ErrorPage } from \"@fider/pages/Error/Error.page\"\nimport { FiderContext } from \"@fider/services\"\n\ninterface ErrorBoundaryProps {\n onError?: (err: Error) => void\n}\n\ninterface ErrorBoundaryState {\n error?: Error\n errorInfo?: React.ErrorInfo\n}\n\nexport class ErrorBoundary extends React.Component {\n constructor(props: any) {\n super(props)\n\n this.state = {\n error: undefined,\n errorInfo: undefined,\n }\n }\n\n public componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n const onError = this.props.onError\n if (onError) {\n onError(error)\n }\n\n this.setState({\n error,\n errorInfo,\n })\n }\n\n public render() {\n const { error, errorInfo } = this.state\n\n if (error && errorInfo) {\n return {(fider) => }\n } else {\n return this.props.children\n }\n }\n}\n","import React from \"react\"\nimport { PostResponse, PostStatus } from \"@fider/models\"\nimport { Markdown, UserName, ShowPostStatus } from \"@fider/components\"\nimport { HStack } from \"./layout\"\n\nconst DuplicateDetails = (props: PostResponseProps): JSX.Element | null => {\n if (!props.response) {\n return null\n }\n\n const original = props.response.original\n if (!original) {\n return null\n }\n\n return (\n
\n {\" \"}\n \n {original.title}\n \n
\n )\n}\n\ninterface PostResponseProps {\n status: string\n response: PostResponse | null\n}\n\nconst StatusDetails = (props: PostResponseProps): JSX.Element | null => {\n if (!props.response || !props.response.text) {\n return null\n }\n\n return (\n
\n \n
\n )\n}\n\nexport const ShowPostResponse = (props: PostResponseProps): JSX.Element | null => {\n const status = PostStatus.Get(props.status)\n\n if (props.response && (status.show || props.response.text)) {\n return (\n
\n \n {status.show && }\n \n · \n \n \n {status === PostStatus.Duplicate ? DuplicateDetails(props) : StatusDetails(props)}\n
\n )\n }\n\n return null\n}\n","import \"./ShowPostStatus.scss\"\n\nimport React from \"react\"\nimport { PostStatus } from \"@fider/models\"\nimport { t } from \"@lingui/macro\"\n\ninterface ShowPostStatusProps {\n status: PostStatus\n}\n\nexport const ShowPostStatus = (props: ShowPostStatusProps) => {\n const id = `enum.poststatus.${props.status.value}`\n const title = t({ id, message: props.status.title })\n return {title}\n}\n","import \"./ShowTag.scss\"\n\nimport React from \"react\"\nimport { Tag } from \"@fider/models\"\nimport { classSet } from \"@fider/services\"\n\ninterface TagProps {\n tag: Tag\n circular?: boolean\n link?: boolean\n}\n\nconst getRGB = (color: string) => {\n const r = color.substring(0, 2)\n const g = color.substring(2, 4)\n const b = color.substring(4, 6)\n\n return {\n R: parseInt(r, 16),\n G: parseInt(g, 16),\n B: parseInt(b, 16),\n }\n}\n\nconst textColor = (color: string) => {\n const components = getRGB(color)\n const bgDelta = components.R * 0.299 + components.G * 0.587 + components.B * 0.114\n return bgDelta > 140 ? \"#333\" : \"#fff\"\n}\n\nexport const ShowTag = (props: TagProps) => {\n const className = classSet({\n \"c-tag\": true,\n \"c-tag--circular\": props.circular === true,\n })\n\n return (\n \n {!props.tag.isPublic && !props.circular && (\n \n \n \n )}\n {props.circular ? \"\" : props.tag.name || \"Tag\"}\n \n )\n}\n","import React, { useState } from \"react\"\nimport { SignInModal, TenantLogo, DevBanner, NotificationIndicator, UserMenu } from \"@fider/components\"\nimport { useFider } from \"@fider/hooks\"\nimport { HStack } from \"./layout\"\nimport { Trans } from \"@lingui/macro\"\n\nexport const Header = () => {\n const fider = useFider()\n const [isSignInModalOpen, setIsSignInModalOpen] = useState(false)\n\n const showModal = (e: React.MouseEvent) => {\n e.preventDefault()\n setIsSignInModalOpen(true)\n }\n\n const hideModal = () => setIsSignInModalOpen(false)\n\n return (\n <>\n \n
\n \n \n
\n \n \n \n

{fider.session.tenant.name}

\n
\n {fider.session.isAuthenticated && (\n \n \n \n \n )}\n {!fider.session.isAuthenticated && (\n \n Sign in\n \n )}\n
\n
\n
\n
\n \n )\n}\n","import \"./Button.scss\"\n\nimport React from \"react\"\nimport { classSet } from \"@fider/services\"\n\ninterface ButtonProps {\n className?: string\n disabled?: boolean\n href?: string\n rel?: \"nofollow\"\n type?: \"button\" | \"submit\"\n variant?: \"primary\" | \"danger\" | \"secondary\" | \"tertiary\"\n size?: \"small\" | \"default\" | \"large\"\n onClick?: (event: ButtonClickEvent) => Promise | void\n}\n\ninterface ButtonState {\n clicked: boolean\n}\n\nexport class ButtonClickEvent {\n private shouldEnable = true\n public preventEnable(): void {\n this.shouldEnable = false\n }\n public canEnable(): boolean {\n return this.shouldEnable\n }\n}\n\nexport class Button extends React.Component {\n private unmounted = false\n\n public static defaultProps: Partial = {\n size: \"default\",\n variant: \"secondary\",\n type: \"button\",\n }\n\n public constructor(props: ButtonProps) {\n super(props)\n this.state = {\n clicked: false,\n }\n }\n\n public componentWillUnmount() {\n this.unmounted = true\n }\n\n public click = async (e?: React.SyntheticEvent) => {\n if (e) {\n e.preventDefault()\n e.stopPropagation()\n }\n\n if (this.state.clicked) {\n return\n }\n\n const event = new ButtonClickEvent()\n this.setState({ clicked: true })\n if (this.props.onClick) {\n await this.props.onClick(event)\n if (!this.unmounted && event.canEnable()) {\n this.setState({ clicked: false })\n }\n }\n }\n\n public render() {\n const className = classSet({\n \"c-button\": true,\n [`c-button--${this.props.size}`]: this.props.size,\n [`c-button--${this.props.variant}`]: this.props.variant,\n \"c-button--loading\": this.state.clicked,\n \"c-button--disabled\": this.state.clicked || this.props.disabled,\n [this.props.className || \"\"]: this.props.className,\n \"shadow-sm\": this.props.variant !== \"tertiary\",\n })\n\n if (this.props.href) {\n return (\n \n {this.props.children}\n \n )\n } else if (this.props.onClick) {\n return (\n \n )\n } else {\n return (\n \n )\n }\n }\n}\n","import \"./Form.scss\"\n\nimport React from \"react\"\nimport { Failure, classSet } from \"@fider/services\"\nimport { DisplayError } from \"@fider/components\"\n\ninterface ValidationContext {\n error?: Failure\n}\n\ninterface FormProps {\n className?: string\n error?: Failure\n}\n\nexport const ValidationContext = React.createContext({})\n\nexport const Form: React.FunctionComponent = (props) => {\n const className = classSet({\n \"c-form\": true,\n [props.className || \"\"]: props.className,\n })\n\n return (\n
\n \n {props.children}\n \n )\n}\n","import React from \"react\"\nimport { Failure } from \"@fider/services\"\n\nimport \"./DisplayError.scss\"\n\nconst arrayToTag = (items: string[]) => {\n return items.map((m) =>
  • {m}
  • )\n}\n\ninterface DisplayErrorProps {\n error?: Failure\n fields?: string[]\n}\n\nexport const hasError = (field?: string, error?: Failure): boolean => {\n if (field && error && error.errors) {\n for (const err of error.errors) {\n if (err.field === field) {\n return true\n }\n }\n }\n return false\n}\n\nexport const DisplayError = (props: DisplayErrorProps) => {\n if (!props.error || !props.error.errors) {\n return null\n }\n\n const dict = props.error.errors.reduce((result, err) => {\n result[err.field || \"\"] = result[err.field || \"\"] || []\n result[err.field || \"\"].push(err.message)\n return result\n }, {} as { [key: string]: string[] })\n\n let items: JSX.Element[] = []\n\n if (dict[\"\"] && !props.fields) {\n items = arrayToTag(dict[\"\"])\n } else if (props.fields) {\n for (const field of props.fields || Object.keys(dict)) {\n if (Object.prototype.hasOwnProperty.call(dict, field)) {\n const tags = arrayToTag(dict[field])\n tags.forEach((t) => items.push(t))\n }\n }\n }\n\n return items.length > 0 ? (\n
    \n
      {items}
    \n
    \n ) : null\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { ValidationContext } from \"./Form\"\nimport { DisplayError, hasError } from \"./DisplayError\"\nimport { Icon } from \"@fider/components\"\n\nimport \"./Input.scss\"\nimport { HStack } from \"@fider/components/layout\"\n\ninterface InputProps {\n field: string\n label?: string\n className?: string\n autoComplete?: string\n autoFocus?: boolean\n noTabFocus?: boolean\n afterLabel?: JSX.Element\n icon?: SpriteSymbol\n maxLength?: number\n value?: string\n disabled?: boolean\n suffix?: string | JSX.Element\n placeholder?: string\n onIconClick?: () => void\n onFocus?: () => void\n inputRef?: React.MutableRefObject\n onChange?: (value: string) => void\n}\n\nexport const Input: React.FunctionComponent = (props) => {\n const onChange = (e: React.FormEvent) => {\n if (props.onChange) {\n props.onChange(e.currentTarget.value)\n }\n }\n\n const suffix = typeof props.suffix === \"string\" ? {props.suffix} : props.suffix\n\n const icon = props.icon ? : undefined\n\n return (\n \n {(ctx) => (\n \n {!!props.label && (\n \n )}\n \n \n {icon}\n {suffix}\n \n \n {props.children}\n \n )}\n \n )\n}\n","import \"./ImageUploader.scss\"\n\nimport React from \"react\"\nimport { ValidationContext } from \"./Form\"\nimport { DisplayError, hasError } from \"./DisplayError\"\nimport { classSet, fileToBase64, uploadedImageURL } from \"@fider/services\"\nimport { Button, Icon, Modal } from \"@fider/components\"\nimport { ImageUpload } from \"@fider/models\"\nimport IconPhotograph from \"@fider/assets/images/heroicons-photograph.svg\"\n\nconst hardFileSizeLimit = 5 * 1024 * 1024\n\ninterface ImageUploaderProps {\n instanceID?: string\n field: string\n label?: string\n bkey?: string\n disabled?: boolean\n onChange(state: ImageUpload, instanceID?: string, previewURL?: string): void\n}\n\ninterface ImageUploaderState extends ImageUpload {\n previewURL?: string\n showModal: boolean\n}\n\nexport class ImageUploader extends React.Component {\n private fileSelector?: HTMLInputElement | null\n\n constructor(props: ImageUploaderProps) {\n super(props)\n this.state = {\n upload: undefined,\n remove: false,\n showModal: false,\n previewURL: uploadedImageURL(this.props.bkey),\n }\n }\n\n public fileChanged = async (e: React.ChangeEvent) => {\n if (e.target.files && e.target.files[0]) {\n const file = e.target.files[0]\n if (file.size > hardFileSizeLimit) {\n alert(\"The image size must be smaller than 5MB.\")\n return\n }\n\n const base64 = await fileToBase64(file)\n this.setState(\n {\n bkey: this.props.bkey,\n upload: {\n fileName: file.name,\n content: base64,\n contentType: file.type,\n },\n remove: false,\n previewURL: `data:${file.type};base64,${base64}`,\n },\n () => {\n this.props.onChange(this.state, this.props.instanceID, this.state.previewURL)\n }\n )\n }\n }\n\n public removeFile = async () => {\n if (this.fileSelector) {\n this.fileSelector.value = \"\"\n }\n\n this.setState(\n {\n bkey: this.props.bkey,\n remove: true,\n upload: undefined,\n previewURL: undefined,\n },\n () => {\n this.props.onChange(\n {\n bkey: this.state.bkey,\n remove: this.state.remove,\n upload: this.state.upload,\n },\n this.props.instanceID,\n this.state.previewURL\n )\n }\n )\n }\n\n public selectFile = async () => {\n if (this.fileSelector) {\n this.fileSelector.click()\n }\n }\n\n private openModal = () => {\n this.setState({ showModal: true })\n }\n\n private closeModal = async () => {\n this.setState({ showModal: false })\n }\n\n private modal() {\n return (\n \n {this.props.bkey ? \"\" : \"\"}\n\n \n \n \n \n )\n }\n\n public render() {\n const isUploading = !!this.state.upload\n const hasFile = (!this.state.remove && this.props.bkey) || isUploading\n\n return (\n \n {(ctx) => (\n \n {this.modal()}\n {this.props.label && }\n\n {hasFile && (\n
    \n \"\"\n {!this.props.disabled && (\n \n )}\n
    \n )}\n\n (this.fileSelector = e)} type=\"file\" onChange={this.fileChanged} accept=\"image/*\" />\n {!hasFile && (\n \n )}\n \n {this.props.children}\n \n )}\n
    \n )\n }\n}\n","import React from \"react\"\nimport { ImageUploader } from \"./ImageUploader\"\nimport { ImageUpload } from \"@fider/models\"\nimport { ValidationContext, hasError, DisplayError } from \"@fider/components\"\nimport { classSet } from \"@fider/services\"\n\nimport \"./MultiImageUploader.scss\"\n\ninterface MultiImageUploaderProps {\n field: string\n maxUploads: number\n bkeys?: string[]\n onChange?: (uploads: ImageUpload[]) => void\n}\n\ninterface MultiImageUploaderInstances {\n [key: string]: {\n element: JSX.Element\n upload?: ImageUpload\n }\n}\n\ninterface MultiImageUploaderState {\n count: number\n instances: MultiImageUploaderInstances\n removed: ImageUpload[]\n}\n\nexport class MultiImageUploader extends React.Component {\n constructor(props: MultiImageUploaderProps) {\n super(props)\n\n let count = 1\n const instances = {}\n if (props.bkeys) {\n for (const bkey of props.bkeys) {\n count++\n this.addNewElement(instances, bkey)\n }\n }\n\n if (count <= this.props.maxUploads) {\n count++\n this.addNewElement(instances)\n }\n\n this.state = { instances, count, removed: [] }\n }\n\n private imageUploaded = (upload: ImageUpload, instanceID: string) => {\n const instances = { ...this.state.instances }\n const removed = [...this.state.removed]\n let count = this.state.count\n if (upload.remove) {\n if (upload.bkey) {\n removed.push(upload)\n }\n delete instances[instanceID]\n if (--count === this.props.maxUploads) {\n this.addNewElement(instances)\n }\n } else {\n instances[instanceID].upload = upload\n if (count++ <= this.props.maxUploads) {\n this.addNewElement(instances)\n }\n }\n this.setState({ instances, count, removed }, this.triggerOnChange)\n }\n\n private triggerOnChange() {\n if (this.props.onChange) {\n const uploads = Object.keys(this.state.instances)\n .map((k) => this.state.instances[k].upload)\n .concat(this.state.removed)\n .filter((x) => !!x) as ImageUpload[]\n this.props.onChange(uploads)\n }\n }\n\n private addNewElement(instances: MultiImageUploaderInstances, bkey?: string) {\n const id = btoa(Math.random().toString())\n instances[id] = {\n element: ,\n }\n }\n\n public render() {\n const elements = Object.keys(this.state.instances).map((k) => this.state.instances[k].element)\n return (\n \n {(ctx) => (\n \n
    {elements}
    \n \n \n )}\n
    \n )\n }\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { ValidationContext } from \"../\"\nimport { DisplayError, hasError } from \"./DisplayError\"\nimport Textarea from \"react-textarea-autosize\"\n\nimport \"./TextArea.scss\"\n\ninterface TextAreaProps {\n label?: string\n field: string\n value?: string\n disabled?: boolean\n minRows?: number\n placeholder?: string\n onChange?: (value: string) => void\n inputRef?: React.MutableRefObject\n onFocus?: React.FocusEventHandler\n}\n\nexport const TextArea: React.FunctionComponent = (props) => {\n const onChange = (e: React.FormEvent) => {\n if (props.onChange) {\n props.onChange(e.currentTarget.value)\n }\n }\n\n return (\n \n {(ctx) => (\n <>\n
    \n {!!props.label && }\n \n \n {props.children}\n
    \n \n )}\n
    \n )\n}\n","import { HStack, VStack } from \"@fider/components/layout\"\nimport React from \"react\"\n\nimport \"./RadioButton.scss\"\n\ninterface RadioButtonOption {\n value: string\n label: string\n}\n\ninterface RadioButtonProps {\n label: string\n field: string\n defaultOption: RadioButtonOption\n options: RadioButtonOption[]\n onSelect?: (value: RadioButtonOption) => void\n}\n\ninterface RadioButtonState {\n selected: RadioButtonOption\n}\n\nexport class RadioButton extends React.Component {\n constructor(props: RadioButtonProps) {\n super(props)\n this.state = {\n selected: props.defaultOption || props.options[0],\n }\n }\n\n private onChange = (selected: RadioButtonOption) => {\n this.setState({ selected }, () => {\n if (this.props.onSelect) {\n this.props.onSelect(this.state.selected)\n }\n })\n }\n\n public render() {\n const inputs = this.props.options.map((option) => {\n return (\n \n \n \n \n )\n })\n\n return (\n
    \n \n {inputs}\n
    \n )\n }\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { ValidationContext } from \"./Form\"\nimport { DisplayError, hasError } from \"./DisplayError\"\n\nimport \"./Select.scss\"\n\nexport interface SelectOption {\n value: string\n label: string\n}\n\ninterface SelectProps {\n field: string\n label?: string\n maxLength?: number\n defaultValue?: string\n options: SelectOption[]\n onChange?: (option?: SelectOption) => void\n}\n\ninterface SelectState {\n selected?: SelectOption\n}\n\nexport class Select extends React.Component {\n constructor(props: SelectProps) {\n super(props)\n this.state = {\n selected: this.getOption(props.defaultValue),\n }\n }\n\n private getOption(value?: string): SelectOption | undefined {\n if (value && this.props.options) {\n const filtered = this.props.options.filter((x) => x.value === value)\n if (filtered && filtered.length > 0) {\n return filtered[0]\n }\n }\n }\n\n private onChange = (e: React.FormEvent) => {\n let selected: SelectOption | undefined\n if (e.currentTarget.value) {\n const options = this.props.options.filter((o) => o.value === e.currentTarget.value)\n if (options && options.length > 0) {\n selected = options[0]\n }\n }\n\n this.setState({ selected }, () => {\n if (this.props.onChange) {\n this.props.onChange(this.state.selected)\n }\n })\n }\n\n public render() {\n const options = this.props.options.map((option) => {\n return (\n \n )\n })\n\n return (\n \n {(ctx) => (\n <>\n
    \n {!!this.props.label && }\n \n {options}\n \n \n {this.props.children}\n
    \n \n )}\n
    \n )\n }\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { ValidationContext } from \"./Form\"\nimport { DisplayError, hasError } from \"./DisplayError\"\n\ninterface FieldProps {\n className?: string\n label?: string\n field?: string\n afterLabel?: JSX.Element\n}\n\nexport const Field: React.FunctionComponent = (props) => {\n const fields = props.field ? [props.field] : undefined\n return (\n \n {(ctx) => (\n \n {!!props.label && (\n \n )}\n {props.children}\n \n \n )}\n \n )\n}\n","import React, { useState } from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { DisplayError, ValidationContext, hasError } from \"../\"\nimport { HStack } from \"@fider/components/layout\"\n\nimport \"./Checkbox.scss\"\n\ninterface CheckboxProps {\n field: string\n checked?: boolean\n onChange?: (checked: boolean) => void\n}\n\nexport const Checkbox: React.FC = (props) => {\n const [checked, setChecked] = useState(props.checked || false)\n\n const onChange = (e: React.ChangeEvent) => {\n const isChecked: boolean = e.currentTarget.checked\n\n setChecked(isChecked)\n if (props.onChange) {\n props.onChange(isChecked)\n }\n }\n\n return (\n \n {(ctx) => (\n \n
    \n \n \n \n \n \n
    \n \n )}\n
    \n )\n}\n","import React from \"react\"\nimport { uploadedImageURL } from \"@fider/services\"\nimport { Modal, Button, Loader } from \"@fider/components\"\n\nimport \"./ImageViewer.scss\"\nimport { Trans } from \"@lingui/macro\"\n\ninterface ImageViewerProps {\n bkey: string\n}\n\ninterface ImageViewerState {\n showModal: boolean\n loadedThumbnail: boolean\n loadedPreview: boolean\n}\n\nexport class ImageViewer extends React.Component {\n constructor(props: ImageViewerProps) {\n super(props)\n\n this.state = {\n showModal: false,\n loadedThumbnail: false,\n loadedPreview: false,\n }\n }\n\n private openModal = () => {\n if (this.state.loadedThumbnail) {\n this.setState({ showModal: true })\n }\n }\n\n private closeModal = async () => {\n this.setState({ showModal: false })\n }\n\n private onThumbnailLoad = () => {\n this.setState({ loadedThumbnail: true })\n }\n\n private onPreviewLoad = () => {\n this.setState({ loadedPreview: true })\n }\n\n private modal() {\n return (\n \n \n {!this.state.loadedPreview && }\n \"\"\n \n\n \n \n \n \n )\n }\n\n public render() {\n const previewURL = uploadedImageURL(this.props.bkey, 200)\n return (\n
    \n {this.modal()}\n {!this.state.loadedThumbnail && }\n \"\"\n
    \n )\n }\n}\n","import React from \"react\"\nimport { markdown, truncate } from \"@fider/services\"\n\nimport \"./Markdown.scss\"\n\ninterface MarkdownProps {\n className?: string\n text?: string\n maxLength?: number\n style: \"full\" | \"plainText\"\n}\n\nexport const Markdown = (props: MarkdownProps) => {\n if (!props.text) {\n return null\n }\n\n const html = markdown[props.style](props.text)\n const className = `c-markdown ${props.className || \"\"}`\n const tagName = props.style === \"plainText\" ? \"p\" : \"div\"\n\n return React.createElement(tagName, {\n className,\n dangerouslySetInnerHTML: { __html: props.maxLength ? truncate(html, props.maxLength) : html },\n })\n}\n","import React from \"react\"\nimport { useFider } from \"@fider/hooks\"\n\nimport \"./DevBanner.scss\"\n\nexport const DevBanner = () => {\n const fider = useFider()\n\n if (fider.isProduction()) {\n return null\n }\n\n return
    DEV
    \n}\n","import React from \"react\"\n\ninterface IconProps {\n sprite: SpriteSymbol | string\n height?: string\n width?: string\n className?: string\n onClick?: () => void\n}\n\nexport const Icon = (props: IconProps) => {\n if (typeof props.sprite === \"string\") {\n const styles = { height: props.height && `${props.height}px`, width: props.width && `${props.width}px` }\n return \n }\n\n return (\n \n \n \n )\n}\n","import \"./Avatar.scss\"\n\nimport React from \"react\"\nimport { UserRole } from \"@fider/models\"\n\ninterface AvatarProps {\n user: {\n role?: UserRole\n avatarURL: string\n name: string\n }\n size?: \"small\" | \"normal\"\n}\n\nexport const Avatar = (props: AvatarProps) => {\n const size = props.size === \"small\" ? \"h-6 w-6\" : \"h-8 w-8\"\n return {props.user.name}\n}\n","import \"./AvatarStack.scss\"\n\nimport React from \"react\"\nimport { UserRole } from \"@fider/models\"\nimport { Avatar } from \"./Avatar\"\n\ninterface AvatarStackProps {\n users: Array<{\n role?: UserRole\n avatarURL: string\n name: string\n }>\n}\n\nexport const AvatarStack = (props: AvatarStackProps) => {\n return (\n
    \n {props.users.map((x, i) => (\n \n ))}\n
    \n )\n}\n","import \"./Message.scss\"\n\nimport React from \"react\"\nimport { classSet } from \"@fider/services\"\nimport IconCheckCircle from \"@fider/assets/images/heroicons-check-circle.svg\"\nimport IconExclamationCircle from \"@fider/assets/images/heroicons-exclamation-circle.svg\"\nimport IconExclamation from \"@fider/assets/images/heroicons-exclamation.svg\"\nimport { HStack } from \"@fider/components/layout\"\nimport { Icon } from \"./Icon\"\n\ninterface MessageProps {\n type: \"success\" | \"warning\" | \"error\"\n className?: string\n showIcon?: boolean\n}\n\nexport const Message: React.FunctionComponent = (props) => {\n const className = classSet({\n \"c-message\": true,\n [`c-message--${props.type}`]: true,\n [`${props.className}`]: props.className,\n })\n\n const icon = props.type === \"error\" ? IconExclamation : props.type === \"warning\" ? IconExclamationCircle : IconCheckCircle\n\n return (\n \n {props.showIcon === true && }\n {props.children}\n \n )\n}\n","import \"./Hint.scss\"\n\nimport React, { useState } from \"react\"\nimport IconX from \"@fider/assets/images/heroicons-x.svg\"\nimport { HStack } from \"@fider/components/layout\"\nimport { cache } from \"@fider/services\"\nimport { Icon } from \"./Icon\"\n\ninterface HintProps {\n permanentCloseKey?: string\n condition?: boolean\n}\n\nexport const Hint: React.FC = (props) => {\n const cacheKey: string | undefined = props.permanentCloseKey ? `Hint-Closed-${props.permanentCloseKey}` : undefined\n const [isClosed, setIsClosed] = useState(cacheKey ? cache.local.has(cacheKey) : false)\n\n const close = () => {\n if (cacheKey) {\n cache.local.set(cacheKey, \"true\")\n }\n setIsClosed(true)\n }\n\n if (props.condition === false || isClosed) {\n return null\n }\n\n return (\n \n {props.children}\n {cacheKey && }\n \n )\n}\n","import React from \"react\"\nimport { Modal, Checkbox } from \"@fider/components\"\nimport { useFider } from \"@fider/hooks\"\nimport { Trans } from \"@lingui/macro\"\n\ninterface LegalAgreementProps {\n onChange: (agreed: boolean) => void\n}\n\nexport const TermsOfService = () => {\n const fider = useFider()\n\n if (fider.settings.hasLegal) {\n return (\n \n Terms of Service\n \n )\n }\n return null\n}\n\nexport const PrivacyPolicy = () => {\n const fider = useFider()\n\n if (fider.settings.hasLegal) {\n return (\n \n Privacy Policy\n \n )\n }\n return null\n}\n\nexport const LegalNotice = () => {\n const fider = useFider()\n\n if (fider.settings.hasLegal) {\n return (\n

    \n \n By signing in, you agree to the and .\n \n

    \n )\n }\n return null\n}\n\nexport const LegalFooter = () => {\n const fider = useFider()\n\n if (fider.settings.hasLegal) {\n return (\n \n \n \n )\n }\n return null\n}\n\nexport const LegalAgreement: React.FunctionComponent = (props) => {\n const fider = useFider()\n\n if (fider.settings.hasLegal) {\n return (\n \n \n I have read and agree to the and .\n \n \n )\n }\n return null\n}\n","import React from \"react\"\nimport { Button, OAuthProviderLogo } from \"@fider/components\"\n\ninterface SocialSignInButtonProps {\n option: {\n displayName: string\n provider?: string\n url?: string\n logoBlobKey?: string\n logoURL?: string\n }\n className?: string\n redirectTo?: string\n}\n\nexport const SocialSignInButton = (props: SocialSignInButtonProps) => {\n const redirectTo = props.redirectTo || window.location.href\n const href = props.option.url ? `${props.option.url}?redirect=${redirectTo}` : undefined\n\n return (\n \n )\n}\n","import \"./SignInControl.scss\"\n\nimport React, { useState } from \"react\"\nimport { SocialSignInButton, Form, Button, Input, Message } from \"@fider/components\"\nimport { Divider } from \"@fider/components/layout\"\nimport { device, actions, Failure, isCookieEnabled } from \"@fider/services\"\nimport { useFider } from \"@fider/hooks\"\nimport { Trans } from \"@lingui/macro\"\n\ninterface SignInControlProps {\n useEmail: boolean\n redirectTo?: string\n onEmailSent?: (email: string) => void\n}\n\nexport const SignInControl: React.FunctionComponent = (props) => {\n const fider = useFider()\n const [showEmailForm, setShowEmailForm] = useState(fider.session.tenant ? fider.session.tenant.isEmailAuthAllowed : true)\n const [email, setEmail] = useState(\"\")\n const [error, setError] = useState(undefined)\n\n const forceShowEmailForm = (e: React.MouseEvent) => {\n e.preventDefault()\n setShowEmailForm(true)\n }\n\n const signIn = async () => {\n const result = await actions.signIn(email)\n if (result.ok) {\n setEmail(\"\")\n setError(undefined)\n if (props.onEmailSent) {\n props.onEmailSent(email)\n }\n } else if (result.error) {\n setError(result.error)\n }\n }\n\n const providersLen = fider.settings.oauth.length\n\n if (!isCookieEnabled()) {\n return (\n \n

    Cookies Required

    \n

    Cookies are not enabled on your browser. Please enable cookies in your browser preferences to continue.

    \n
    \n )\n }\n\n return (\n
    \n {providersLen > 0 && (\n <>\n
    \n {fider.settings.oauth.map((o) => (\n \n \n \n ))}\n
    \n {props.useEmail && }\n \n )}\n\n {props.useEmail &&\n (showEmailForm ? (\n
    \n

    \n Enter your email address to sign in\n

    \n
    \n \n Sign in\n \n }\n />\n \n {!fider.session.tenant.isEmailAuthAllowed && (\n

    \n Currently only allowed to sign in to an administrator account\n

    \n )}\n
    \n ) : (\n
    \n

    \n \n Email authentication has been disabled by an administrator. If you have an administrator account and need to bypass this restriction, please{\" \"}\n \n click here\n \n .\n \n

    \n
    \n ))}\n
    \n )\n}\n","import React from \"react\"\nimport { formatDate, timeSince } from \"@fider/services\"\n\ninterface MomentText {\n locale: string\n date: Date | string\n format?: \"relative\" | \"full\" | \"short\"\n}\n\nexport const Moment = (props: MomentText) => {\n if (!props.date) {\n return \n }\n\n const format = props.format || \"relative\"\n\n const now = new Date()\n const date = props.date instanceof Date ? props.date : new Date(props.date)\n const diff = (now.getTime() - date.getTime()) / (60 * 60 * 24 * 1000)\n const display =\n diff >= 365 && format === \"relative\"\n ? formatDate(props.locale, props.date, \"short\")\n : format === \"relative\"\n ? timeSince(props.locale, now, date)\n : formatDate(props.locale, props.date, format)\n\n return (\n \n {display}\n \n )\n}\n","import \"./Modal.scss\"\n\nimport React, { useEffect, useRef } from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { classSet } from \"@fider/services\"\n\ninterface ModalWindowProps {\n className?: string\n isOpen: boolean\n size?: \"small\" | \"large\" | \"fluid\"\n canClose?: boolean\n center?: boolean\n onClose: () => void\n}\n\ninterface ModalFooterProps {\n align?: \"left\" | \"center\" | \"right\"\n children?: React.ReactNode\n}\n\nconst ModalWindow: React.FunctionComponent = (props) => {\n const root = useRef(document.getElementById(\"root-modal\"))\n\n useEffect(() => {\n if (props.isOpen) {\n document.body.style.overflow = \"hidden\"\n document.addEventListener(\"keydown\", keyDown, false)\n } else {\n document.body.style.overflow = \"\"\n document.removeEventListener(\"keydown\", keyDown, false)\n }\n }, [props.isOpen])\n\n const swallow = (evt: React.MouseEvent) => {\n evt.stopPropagation()\n }\n\n const keyDown = (event: KeyboardEvent) => {\n if (event.keyCode === 27) {\n // ESC\n close()\n }\n }\n\n const close = () => {\n if (props.canClose) {\n props.onClose()\n }\n }\n\n if (!props.isOpen || !root.current) {\n return null\n }\n\n const className = classSet({\n \"c-modal-window\": true,\n [`${props.className}`]: !!props.className,\n \"c-modal-window--center\": props.center,\n [`c-modal-window--${props.size}`]: true,\n })\n\n return ReactDOM.createPortal(\n
    \n
    \n {props.children}\n
    \n
    ,\n root.current\n )\n}\n\nModalWindow.defaultProps = {\n size: \"small\",\n canClose: true,\n center: true,\n}\n\nconst Header = (props: { children: React.ReactNode }) =>
    {props.children}
    \nconst Content = (props: { children: React.ReactNode }) =>
    {props.children}
    \nconst Footer = (props: ModalFooterProps) => {\n const align = props.align || \"right\"\n const className = classSet({\n \"c-modal-footer\": true,\n [`c-modal-footer--${align}`]: true,\n })\n return
    {props.children}
    \n}\n\nexport const Modal = {\n Window: ModalWindow,\n Header,\n Content,\n Footer,\n}\n","import \"./UserName.scss\"\n\nimport React from \"react\"\nimport { isCollaborator, UserRole } from \"@fider/models\"\nimport { classSet } from \"@fider/services\"\n\ninterface UserNameProps {\n user: {\n id: number\n name: string\n role?: UserRole\n }\n}\n\nexport const UserName = (props: UserNameProps) => {\n const isStaff = props.user.role && isCollaborator(props.user.role)\n const className = classSet({\n \"c-username\": true,\n \"c-username--staff\": isStaff,\n })\n\n return (\n
    \n {props.user.name || \"Anonymous\"}\n {isStaff && (\n
    \n \n \n \n
    \n )}\n
    \n )\n}\n","import \"./Loader.scss\"\n\nimport React, { useState } from \"react\"\nimport { useTimeout } from \"@fider/hooks\"\n\nexport function Loader() {\n const [show, setShow] = useState(false)\n\n useTimeout(() => {\n setShow(true)\n }, 500)\n\n return show ?
    : null\n}\n","import React from \"react\"\nimport { uploadedImageURL } from \"@fider/services\"\nimport { useFider } from \"@fider/hooks\"\nimport { Tenant } from \"@fider/models\"\n\ntype Size = 24 | 50 | 100 | 200\n\ninterface TenantLogoProps {\n size: Size\n useFiderIfEmpty?: boolean\n}\n\nexport const TenantLogoURL = (tenant: Tenant, size: Size): string | undefined => {\n if (tenant && tenant.logoBlobKey) {\n return uploadedImageURL(tenant.logoBlobKey, size)\n }\n return undefined\n}\n\nexport const TenantLogo = (props: TenantLogoProps) => {\n const fider = useFider()\n\n const tenant = fider.session.tenant\n if (tenant && tenant.logoBlobKey) {\n return {tenant.name}\n } else if (props.useFiderIfEmpty) {\n return \"Fider\"\n }\n return null\n}\n\nTenantLogo.defaultProps = {\n useFiderIfEmpty: false,\n}\n\ninterface OAuthProviderLogoProps {\n option: {\n provider?: string\n displayName: string\n logoBlobKey?: string\n }\n}\n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ni0zLjc0LDcuNDk4LTcuMzA0LDcuODkzQzE5LjQ3OSwyMy41NDgsMjAsMjQuNTA4LDIwLDI2YzAsMiwwLDMuOTAyLDAsNC40MjhjMCwwLjQyOCwwLjI1OCwwLjkwMSwxLjA3LDAuNzQ2ICBDMjcuNDIyLDI5LjA1NSwzMiwyMy4wNjIsMzIsMTUuOTk3QzMyLDcuMTYyLDI0LjgzOCwwLDE2LjAwMywweiIgZmlsbD0iIzE4MTYxNiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PGcvPjxnLz48Zy8+PGcvPjxnLz48Zy8+PC9zdmc+\",\n}\n\nexport const OAuthProviderLogoURL = (logoBlobKey?: string): string | undefined => {\n if (logoBlobKey) {\n return uploadedImageURL(logoBlobKey, 100)\n }\n return undefined\n}\n\nexport const OAuthProviderLogo = (props: OAuthProviderLogoProps) => {\n if (props.option.logoBlobKey) {\n return {props.option.displayName}\n }\n\n if (props.option.provider && props.option.provider in systemProvidersLogo) {\n return {props.option.displayName}\n }\n\n return null\n}\n","import \"./Toggle.scss\"\n\nimport React, { useState } from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { HStack } from \"../layout\"\nimport { DisplayError, ValidationContext } from \"@fider/components\"\n\ninterface ToggleProps {\n field?: string\n label?: string\n active: boolean\n disabled?: boolean\n onToggle?: (active: boolean) => void\n}\n\nexport const Toggle: React.FC = (props) => {\n const [active, setActive] = useState(props.active)\n\n const toggle = () => {\n if (props.disabled) {\n return\n }\n\n const newActive = !active\n setActive(newActive)\n if (props.onToggle) {\n props.onToggle(newActive)\n }\n }\n\n const className = classSet({\n \"c-toggle\": true,\n \"c-toggle--enabled\": active,\n \"c-toggle--disabled\": !!props.disabled,\n })\n\n return (\n \n {(ctx) => (\n <>\n \n \n {props.label && {props.label}}\n \n {props.field && }\n \n )}\n \n )\n}\n","import React from \"react\"\n\nimport \"./PoweredByFider.scss\"\n\ninterface PoweredByFiderProps {\n className: string\n}\n\nexport const PoweredByFider = (props: PoweredByFiderProps) => {\n return (\n \n )\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\n\ninterface PageTitleLogo {\n title: string\n subtitle?: string\n className?: string\n}\n\nexport const PageTitle = (props: PageTitleLogo) => {\n const className = classSet({\n \"mb-4\": true,\n [`${props.className}`]: props.className,\n })\n\n return (\n
    \n
    {props.title}
    \n
    {props.subtitle}
    \n
    \n )\n}\n","import \"./Dropdown.scss\"\n\nimport React, { createContext, useContext, useEffect, useRef, useState } from \"react\"\nimport { classSet } from \"@fider/services\"\n\ninterface DropdownListItemProps {\n href?: string\n onClick?: () => void\n className?: string\n children: React.ReactNode\n}\n\nconst ListItem = (props: DropdownListItemProps) => {\n const ctx = useContext(DropdownContext)\n const handleClick = () => {\n if (props.onClick) {\n props.onClick()\n }\n\n ctx?.close()\n }\n\n if (props.href) {\n return (\n \n {props.children}\n \n )\n }\n\n return (\n
    \n {props.children}\n
    \n )\n}\n\nconst Divider = () => {\n return
    \n}\n\ninterface DropdownProps {\n renderHandle: JSX.Element\n position?: \"left\" | \"right\"\n children: React.ReactNode\n}\n\ninterface DropdownContextFuncs {\n close(): void\n}\n\nconst DropdownContext = createContext(null)\nDropdownContext.displayName = \"DropdownContext\"\n\nexport const Dropdown = (props: DropdownProps) => {\n const node = useRef(null)\n const [isOpen, setIsOpen] = useState(false)\n const position = props.position || \"right\"\n\n const toggleIsOpen = () => {\n setIsOpen(!isOpen)\n }\n\n const close = () => {\n setIsOpen(false)\n }\n\n const handleClick = (e: MouseEvent) => {\n if (node.current && node.current.contains(e.target as Node)) {\n return\n }\n\n close()\n }\n\n useEffect(() => {\n document.addEventListener(\"mousedown\", handleClick)\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClick)\n }\n }, [])\n\n const listClassName = classSet({\n \"c-dropdown__list shadow-lg\": true,\n [`c-dropdown__list--${position}`]: position === \"left\",\n })\n\n return (\n \n
    \n \n {isOpen &&
    {props.children}
    }\n
    \n
    \n )\n}\n\nDropdown.ListItem = ListItem\nDropdown.Divider = Divider\n","import React, { useState, useEffect } from \"react\"\nimport { Modal, SignInControl, LegalFooter } from \"@fider/components\"\nimport { Button } from \"./common\"\nimport { Trans } from \"@lingui/macro\"\n\ninterface SignInModalProps {\n isOpen: boolean\n onClose: () => void\n}\n\nexport const SignInModal: React.StatelessComponent = (props) => {\n const [confirmationAddress, setConfirmationAddress] = useState(\"\")\n\n useEffect(() => {\n if (confirmationAddress) {\n setTimeout(() => setConfirmationAddress(\"\"), 5000)\n }\n }, [confirmationAddress])\n\n const onEmailSent = (email: string): void => {\n setConfirmationAddress(email)\n }\n\n const closeModal = () => {\n setConfirmationAddress(\"\")\n props.onClose()\n }\n\n const content = confirmationAddress ? (\n <>\n

    \n \n We have just sent a confirmation link to {confirmationAddress}.
    Click the link and you’ll be signed in.\n
    \n

    \n

    \n \n

    \n \n ) : (\n \n )\n\n return (\n \n \n Sign in to post and vote\n \n {content}\n \n \n )\n}\n","import \"./VoteCounter.scss\"\n\nimport React, { useState } from \"react\"\nimport { Post, PostStatus } from \"@fider/models\"\nimport { actions, classSet } from \"@fider/services\"\nimport { Icon, SignInModal } from \"@fider/components\"\nimport { useFider } from \"@fider/hooks\"\nimport FaCaretUp from \"@fider/assets/images/fa-caretup.svg\"\n\ninterface VoteCounterProps {\n post: Post\n}\n\nexport const VoteCounter = (props: VoteCounterProps) => {\n const fider = useFider()\n const [hasVoted, setHasVoted] = useState(props.post.hasVoted)\n const [votesCount, setVotesCount] = useState(props.post.votesCount)\n const [isSignInModalOpen, setIsSignInModalOpen] = useState(false)\n\n const voteOrUndo = async () => {\n if (!fider.session.isAuthenticated) {\n setIsSignInModalOpen(true)\n return\n }\n\n const action = hasVoted ? actions.removeVote : actions.addVote\n\n const response = await action(props.post.number)\n if (response.ok) {\n setVotesCount(votesCount + (hasVoted ? -1 : 1))\n setHasVoted(!hasVoted)\n }\n }\n\n const hideModal = () => setIsSignInModalOpen(false)\n\n const status = PostStatus.Get(props.post.status)\n\n const className = classSet({\n \"c-vote-counter__button\": true,\n \"c-vote-counter__button--voted\": !status.closed && hasVoted,\n \"c-vote-counter__button--disabled\": status.closed,\n })\n\n const vote = (\n \n )\n\n const disabled = (\n \n )\n\n return (\n <>\n \n
    {status.closed ? disabled : vote}
    \n \n )\n}\n","import \"./NotificationIndicator.scss\"\n\nimport React, { useEffect, useState } from \"react\"\nimport IconBell from \"@fider/assets/images/heroicons-bell.svg\"\nimport { useFider } from \"@fider/hooks\"\nimport { actions } from \"@fider/services\"\nimport { Icon } from \"./common\"\n\nexport const NotificationIndicator = () => {\n const fider = useFider()\n const [unreadNotifications, setUnreadNotifications] = useState(0)\n\n useEffect(() => {\n if (fider.session.isAuthenticated) {\n actions.getTotalUnreadNotifications().then((result) => {\n if (result.ok && result.data > 0) {\n setUnreadNotifications(result.data)\n }\n })\n }\n }, [fider.session.isAuthenticated])\n\n return (\n \n \n {unreadNotifications > 0 &&
    }\n \n )\n}\n","import React from \"react\"\nimport { useFider } from \"@fider/hooks\"\nimport { Avatar, Dropdown } from \"./common\"\nimport { Trans } from \"@lingui/macro\"\n\nexport const UserMenu = () => {\n const fider = useFider()\n\n return (\n
    \n }>\n
    {fider.session.user.name}
    \n \n My Settings\n \n \n\n {fider.session.user.isCollaborator && (\n <>\n
    \n Administration\n
    \n \n Site Settings\n \n \n \n )}\n \n Sign out\n \n
    \n
    \n )\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\n\ninterface StackProps {\n className?: string\n children: React.ReactNode\n onClick?: () => void\n center?: boolean\n divide?: boolean\n justify?: \"between\" | \"evenly\"\n spacing?: 0 | 1 | 2 | 4 | 6 | 8\n}\n\nconst Stack = (props: StackProps, dir: \"x\" | \"y\") => {\n const spacing = props.spacing === undefined ? 1 : props.spacing\n const className = classSet({\n [`${props.className}`]: props.className,\n flex: true,\n \"flex flex-x\": dir === \"x\",\n \"flex flex-y\": dir === \"y\",\n [`flex--spacing-${spacing}`]: spacing > 0 && !props.divide,\n [`flex--divide-${spacing}`]: spacing > 0 && !!props.divide,\n \"flex-items-center\": dir === \"x\" && props.center !== false,\n \"justify-between\": props.justify === \"between\",\n \"justify-evenly\": props.justify === \"evenly\",\n })\n\n return (\n
    \n {props.children}\n
    \n )\n}\n\nexport const HStack = (props: StackProps) => {\n return Stack(props, \"x\")\n}\n\nexport const VStack = (props: StackProps) => {\n return Stack(props, \"y\")\n}\n","import \"./Divider.scss\"\n\nimport React from \"react\"\nimport { Trans } from \"@lingui/macro\"\n\nexport const Divider = () => {\n return (\n
    \n OR\n
    \n )\n}\n","import { User } from \"./identity\"\n\nexport interface Post {\n id: number\n number: number\n slug: string\n title: string\n description: string\n createdAt: string\n status: string\n user: User\n hasVoted: boolean\n response: PostResponse | null\n votesCount: number\n commentsCount: number\n tags: string[]\n}\n\nexport class PostStatus {\n constructor(public title: string, public value: string, public show: boolean, public closed: boolean, public filterable: boolean) {}\n\n public static Open = new PostStatus(\"Open\", \"open\", false, false, false)\n public static Planned = new PostStatus(\"Planned\", \"planned\", true, false, true)\n public static Started = new PostStatus(\"Started\", \"started\", true, false, true)\n public static Completed = new PostStatus(\"Completed\", \"completed\", true, true, true)\n public static Declined = new PostStatus(\"Declined\", \"declined\", true, true, true)\n public static Duplicate = new PostStatus(\"Duplicate\", \"duplicate\", true, true, false)\n public static Deleted = new PostStatus(\"Deleted\", \"deleted\", false, true, false)\n\n public static Get(value: string): PostStatus {\n for (const status of PostStatus.All) {\n if (status.value === value) {\n return status\n }\n }\n throw new Error(`PostStatus not found for value ${value}.`)\n }\n\n public static All = [PostStatus.Open, PostStatus.Planned, PostStatus.Started, PostStatus.Completed, PostStatus.Duplicate, PostStatus.Declined]\n}\n\nexport interface PostResponse {\n user: User\n text: string\n respondedAt: Date\n original?: {\n number: number\n title: string\n slug: string\n status: string\n }\n}\n\nexport interface Comment {\n id: number\n content: string\n createdAt: string\n user: User\n attachments?: string[]\n editedAt?: string\n editedBy?: User\n}\n\nexport interface Tag {\n id: number\n slug: string\n name: string\n color: string\n isPublic: boolean\n}\n\nexport interface Vote {\n createdAt: Date\n user: {\n id: number\n name: string\n email: string\n avatarURL: string\n }\n}\n","export interface Tenant {\n id: number\n name: string\n cname: string\n subdomain: string\n locale: string\n invitation: string\n welcomeMessage: string\n status: TenantStatus\n isPrivate: boolean\n logoBlobKey: string\n isEmailAuthAllowed: boolean\n}\n\nexport enum TenantStatus {\n Active = 1,\n Pending = 2,\n Locked = 3,\n}\n\nexport interface User {\n id: number\n name: string\n role: UserRole\n status: UserStatus\n avatarURL: string\n}\n\nexport enum UserAvatarType {\n Letter = \"letter\",\n Gravatar = \"gravatar\",\n Custom = \"custom\",\n}\n\nexport enum UserStatus {\n Active = \"active\",\n Deleted = \"deleted\",\n Blocked = \"blocked\",\n}\n\nexport enum UserRole {\n Visitor = \"visitor\",\n Collaborator = \"collaborator\",\n Administrator = \"administrator\",\n}\n\nexport const isCollaborator = (role: UserRole): boolean => {\n return role === UserRole.Collaborator || role === UserRole.Administrator\n}\n\nexport interface CurrentUser {\n id: number\n name: string\n email: string\n avatarType: UserAvatarType\n avatarBlobKey: string\n avatarURL: string\n role: UserRole\n status: UserStatus\n isAdministrator: boolean\n isCollaborator: boolean\n}\n","export interface OAuthProviderOption {\n provider: string\n displayName: string\n clientID: string\n url: string\n callbackURL: string\n logoBlobKey: string\n isCustomProvider: boolean\n isEnabled: boolean\n}\n\nexport interface SystemSettings {\n mode: string\n locale: string\n version: string\n environment: string\n domain: string\n hasLegal: boolean\n baseURL: string\n assetsURL: string\n oauth: OAuthProviderOption[]\n}\n\nexport interface UserSettings {\n [key: string]: string\n}\n\nexport const OAuthConfigStatus = {\n Disabled: 1,\n Enabled: 2,\n}\n\nexport interface OAuthConfig {\n provider: string\n displayName: string\n status: number\n clientID: string\n clientSecret: string\n authorizeURL: string\n tokenURL: string\n profileURL: string\n logoBlobKey: string\n scope: string\n jsonUserIDPath: string\n jsonUserNamePath: string\n jsonUserEmailPath: string\n}\n\nexport interface ImageUpload {\n bkey?: string\n upload?: {\n fileName?: string\n content?: string\n contentType?: string\n }\n remove: boolean\n}\n","import { analytics, notify, truncate } from \"@fider/services\"\n\nexport interface ErrorItem {\n field?: string\n message: string\n}\n\nexport interface Failure {\n errors?: ErrorItem[]\n}\n\nexport interface Result {\n ok: boolean\n data: T\n error?: Failure\n}\n\nasync function toResult(response: Response): Promise> {\n const body = await response.json()\n\n if (response.status < 400) {\n return {\n ok: true,\n data: body as T,\n }\n }\n\n if (response.status === 500) {\n notify.error(\"An unexpected error occurred while processing your request.\")\n } else if (response.status === 403) {\n notify.error(\"You are not authorized to perform this operation.\")\n }\n\n return {\n ok: false,\n data: body as T,\n error: {\n errors: body.errors,\n },\n }\n}\nasync function request(url: string, method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\", body?: any): Promise> {\n const headers = [\n [\"Accept\", \"application/json\"],\n [\"Content-Type\", \"application/json\"],\n ]\n try {\n const response = await fetch(url, {\n method,\n headers,\n body: JSON.stringify(body),\n credentials: \"same-origin\",\n })\n return await toResult(response)\n } catch (err) {\n const truncatedBody = truncate(body ? JSON.stringify(body) : \"\", 1000)\n throw new Error(`Failed to ${method} ${url} with body '${truncatedBody}'`)\n }\n}\n\nexport const http = {\n get: async (url: string): Promise> => {\n return await request(url, \"GET\")\n },\n post: async (url: string, body?: any): Promise> => {\n return await request(url, \"POST\", body)\n },\n put: async (url: string, body?: any): Promise> => {\n return await request(url, \"PUT\", body)\n },\n delete: async (url: string, body?: any): Promise> => {\n return await request(url, \"DELETE\", body)\n },\n event:\n (category: string, action: string) =>\n (result: Result): Result => {\n if (result && result.ok) {\n analytics.event(category, action)\n }\n return result\n },\n}\n","const set = (storage: Storage, key: string, value: string): void => {\n if (storage) {\n storage.setItem(key, value)\n }\n}\n\nconst get = (storage: Storage, key: string): string | null => {\n if (window.localStorage) {\n return storage.getItem(key)\n }\n return null\n}\n\nconst has = (storage: Storage, key: string): boolean => {\n if (storage) {\n return !!storage.getItem(key)\n }\n return false\n}\n\nconst remove = (storage: Storage, ...keys: string[]): void => {\n if (storage && keys) {\n for (const key of keys) {\n storage.removeItem(key)\n }\n }\n}\n\nexport const cache = {\n local: {\n set: (key: string, value: string): void => {\n set(window.localStorage, key, value)\n },\n get: (key: string): string | null => {\n return get(window.localStorage, key)\n },\n has: (key: string): boolean => {\n return has(window.localStorage, key)\n },\n remove: (...keys: string[]): void => {\n remove(window.localStorage, ...keys)\n },\n },\n session: {\n set: (key: string, value: string): void => {\n set(window.sessionStorage, key, value)\n },\n get: (key: string): string | null => {\n return get(window.sessionStorage, key)\n },\n has: (key: string): boolean => {\n return has(window.sessionStorage, key)\n },\n remove: (...keys: string[]): void => {\n remove(window.sessionStorage, ...keys)\n },\n },\n}\n","export const analytics = {\n event: (eventCategory: string, eventAction: string): void => {\n if (window.ga) {\n window.ga(\"send\", \"event\", {\n eventCategory,\n eventAction,\n })\n }\n },\n error: (err?: Error): void => {\n if (window.ga) {\n window.ga(\"send\", \"exception\", {\n exDescription: err ? err.stack : \"\",\n exFatal: false,\n })\n }\n },\n}\n","import { createContext } from \"react\"\nimport { CurrentUser, SystemSettings, Tenant } from \"@fider/models\"\n\nexport class FiderSession {\n private pContextID: string\n private pTenant: Tenant\n private pUser: CurrentUser | undefined\n private pProps: { [key: string]: any } = {}\n\n constructor(data: any) {\n this.pContextID = data.contextID\n this.pProps = data.props\n this.pUser = data.user\n this.pTenant = data.tenant\n }\n\n public get contextID(): string {\n return this.pContextID\n }\n\n public get user(): CurrentUser {\n if (!this.pUser) throw new Error(\"User is undefined\")\n return this.pUser\n }\n\n public get tenant(): Tenant {\n return this.pTenant\n }\n\n public get props(): { [key: string]: any } {\n return this.pProps\n }\n\n public get isAuthenticated(): boolean {\n return !!this.pUser\n }\n}\n\nexport class FiderImpl {\n private pSettings!: SystemSettings\n private pSession!: FiderSession\n\n public initialize = (initData?: any): FiderImpl => {\n if (initData) {\n this.pSettings = initData.settings\n this.pSession = new FiderSession(initData)\n return this\n }\n\n const el = document.getElementById(\"server-data\")\n const data = el ? JSON.parse(el.textContent || el.innerText) : {}\n this.pSettings = data.settings\n this.pSession = new FiderSession(data)\n return this\n }\n\n public get currentLocale(): string {\n if (this.session.tenant) {\n return this.session.tenant.locale\n }\n return this.settings.locale\n }\n\n public get session(): FiderSession {\n return this.pSession\n }\n\n public get settings(): SystemSettings {\n return this.pSettings\n }\n\n public isProduction(): boolean {\n return this.pSettings.environment === \"production\"\n }\n\n public isSingleHostMode(): boolean {\n return this.pSettings.mode === \"single\"\n }\n}\n\nexport const Fider = new FiderImpl()\n\nexport const FiderContext = createContext(Fider)\n","export const jwt = {\n decode: (token: string): any => {\n if (token) {\n const segments = token.split(\".\")\n try {\n return JSON.parse(window.atob(segments[1]))\n } catch {\n return undefined\n }\n }\n },\n}\n","import { Fider } from \".\"\n\nexport const delay = (ms: number) => {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\nexport const classSet = (input?: any): string => {\n let classes = \"\"\n if (input) {\n for (const key in input) {\n if (key && !!input[key]) {\n classes += ` ${key}`\n }\n }\n return classes.trim()\n }\n return \"\"\n}\n\ntype DateFormat = \"full\" | \"short\"\nconst shortOpts: Intl.DateTimeFormatOptions = { month: \"short\", year: \"2-digit\" }\nconst fullOpts: Intl.DateTimeFormatOptions = { day: \"2-digit\", month: \"long\", year: \"numeric\", hour: \"numeric\", minute: \"numeric\" }\n\nexport const formatDate = (locale: string, input: Date | string, format: DateFormat = \"full\"): string => {\n const date = input instanceof Date ? input : new Date(input)\n\n try {\n const opts = format === \"short\" ? shortOpts : fullOpts\n return new Intl.DateTimeFormat(locale, opts).format(date)\n } catch {\n return date.toLocaleString(locale)\n }\n}\n\nexport const timeSince = (locale: string, now: Date, date: Date): string => {\n try {\n const seconds = Math.round((now.getTime() - date.getTime()) / 1000)\n const minutes = Math.round(seconds / 60)\n const hours = Math.round(minutes / 60)\n const days = Math.round(hours / 24)\n const months = Math.round(days / 30)\n const years = Math.round(days / 365)\n\n const rtf = new Intl.RelativeTimeFormat(locale, { numeric: \"auto\" })\n return (\n (seconds < 60 && rtf.format(-1 * seconds, \"seconds\")) ||\n (minutes < 60 && rtf.format(-1 * minutes, \"minutes\")) ||\n (hours < 24 && rtf.format(-1 * hours, \"hours\")) ||\n (days < 30 && rtf.format(-1 * days, \"days\")) ||\n (days < 365 && rtf.format(-1 * months, \"months\")) ||\n rtf.format(-1 * years, \"years\")\n )\n } catch {\n return formatDate(locale, date, \"short\")\n }\n}\n\nexport const fileToBase64 = async (file: File): Promise => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader()\n reader.addEventListener(\n \"load\",\n () => {\n const parts = (reader.result as string).split(\"base64,\")\n resolve(parts[1])\n },\n false\n )\n\n reader.addEventListener(\n \"error\",\n () => {\n reject(reader.error)\n },\n false\n )\n\n reader.readAsDataURL(file)\n })\n}\n\nexport const timeAgo = (date: string | Date): number => {\n const d = date instanceof Date ? date : new Date(date)\n return (new Date().getTime() - d.getTime()) / 1000\n}\n\nexport const isCookieEnabled = (): boolean => {\n try {\n document.cookie = \"cookietest=1\"\n const ret = document.cookie.indexOf(\"cookietest=\") !== -1\n document.cookie = \"cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT\"\n return ret\n } catch (e) {\n return false\n }\n}\n\nexport const uploadedImageURL = (bkey: string | undefined, size?: number): string | undefined => {\n if (bkey) {\n if (size) {\n return `${Fider.settings.assetsURL}/static/images/${bkey}?size=${size}`\n }\n return `${Fider.settings.assetsURL}/static/images/${bkey}`\n }\n return undefined\n}\n\nexport const truncate = (input: string, maxLength: number): string => {\n if (input && input.length > maxLength) {\n return `${input.substr(0, maxLength)}...`\n }\n return input\n}\n","import { i18n, I18n } from \"@lingui/core\"\nimport { en, pt, fr, de } from \"make-plural/plurals\"\n\nexport function activateI18NSync(locale: string, messages?: any): I18n {\n i18n.loadLocaleData(\"en\", { plurals: en })\n i18n.loadLocaleData(\"pt-BR\", { plurals: pt })\n i18n.loadLocaleData(\"de\", { plurals: de })\n i18n.loadLocaleData(\"fr\", { plurals: fr })\n i18n.load(locale, messages)\n i18n.activate(locale)\n return i18n\n}\n\nexport async function activateI18N(locale: string): Promise {\n try {\n const content = await import(\n /* webpackChunkName: \"locale-[request]\" */\n `@locale/${locale}/client.json`\n )\n return activateI18NSync(locale, content.messages)\n } catch (err) {\n console.error(err)\n return activateI18NSync(locale)\n }\n}\n","import marked from \"marked\"\nimport DOMPurify from \"dompurify\"\n\nmarked.setOptions({\n headerIds: false,\n xhtml: true,\n smartLists: true,\n gfm: true,\n breaks: true,\n})\n\nif (DOMPurify.isSupported) {\n DOMPurify.setConfig({\n USE_PROFILES: {\n html: true,\n },\n ADD_ATTR: [\"target\"],\n })\n}\n\nconst link = (href: string, title: string, text: string) => {\n const titleAttr = title ? ` title=${title}` : \"\"\n return `${text}`\n}\n\nconst fullRenderer = new marked.Renderer()\nfullRenderer.image = () => \"\"\nfullRenderer.link = link\n\nconst plainTextRenderer = new marked.Renderer()\nplainTextRenderer.link = (_href, _title, text) => text\nplainTextRenderer.image = () => \"\"\nplainTextRenderer.br = () => \" \"\nplainTextRenderer.strong = (text) => text\nplainTextRenderer.list = (body) => body\nplainTextRenderer.listitem = (text) => `${text} `\nplainTextRenderer.heading = (text) => text\nplainTextRenderer.paragraph = (text) => ` ${text} `\nplainTextRenderer.code = (code) => code\nplainTextRenderer.codespan = (code) => code\nplainTextRenderer.html = (html) => html\nplainTextRenderer.del = (text) => text\n\nconst entities: { [key: string]: string } = {\n \"<\": \"<\",\n \">\": \">\",\n}\n\nconst encodeHTML = (s: string) => s.replace(/[<>]/g, (tag) => entities[tag] || tag)\nconst sanitize = (input: string) => (DOMPurify.isSupported ? DOMPurify.sanitize(input) : input)\n\nexport const full = (input: string): string => {\n return sanitize(marked(encodeHTML(input), { renderer: fullRenderer }).trim())\n}\n\nexport const plainText = (input: string): string => {\n return sanitize(marked(encodeHTML(input), { renderer: plainTextRenderer }).trim())\n}\n","const toastify = () => import(/* webpackChunkName: \"toastify\" */ \"./toastify\")\n\nexport const success = (content: string | JSX.Element) => {\n return toastify().then((toast) => {\n toast.success(content)\n })\n}\n\nexport const error = (content: string | JSX.Element) => {\n return toastify().then((toast) => {\n toast.error(content)\n })\n}\n","import { Fider } from \"@fider/services\"\n\nconst navigator = {\n url: () => {\n return window.location.href\n },\n goHome: () => {\n window.location.href = \"/\"\n },\n goTo: (url: string) => {\n const isEqual = window.location.href === url || window.location.pathname === url\n if (!isEqual) {\n window.location.href = url\n }\n },\n replaceState: (path: string): void => {\n if (history.replaceState !== undefined) {\n const newURL = Fider.settings.baseURL + path\n window.history.replaceState({ path: newURL }, \"\", newURL)\n }\n },\n}\n\nexport default navigator\n","import navigator from \"./navigator\"\n\nexport const getNumber = (name: string): number | undefined => {\n return parseInt(get(name), 10) || undefined\n}\n\nexport const set = (name: string, value: any): string => {\n const uri = navigator.url()\n const re = new RegExp(\"([?&])\" + name + \"=.*?(&|$)\", \"i\")\n if (uri.match(re)) {\n return uri.replace(re, \"$1\" + name + \"=\" + value + \"$2\")\n } else {\n const separator = uri.indexOf(\"?\") !== -1 ? \"&\" : \"?\"\n return uri + separator + name + \"=\" + value\n }\n}\n\nexport const get = (name: string): string => {\n name = name.replace(/[[\\]]/g, \"\\\\$&\")\n const regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\")\n const results = regex.exec(navigator.url())\n\n if (!results || !results[2]) {\n return \"\"\n }\n\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"))\n}\n\nexport const getArray = (name: string): string[] => {\n const qs = get(name)\n if (qs) {\n return qs.split(\",\").filter((i) => i)\n }\n\n return []\n}\n\nexport interface QueryString {\n [key: string]: string | string[] | number | undefined\n}\n\nexport const stringify = (object: QueryString | undefined): string => {\n if (!object) {\n return \"\"\n }\n\n let qs = \"\"\n\n for (const key of Object.keys(object)) {\n const symbol = qs ? \"&\" : \"?\"\n const value = object[key]\n if (value instanceof Array) {\n if (value.length > 0) {\n qs += `${symbol}${key}=${value.join(\",\")}`\n }\n } else if (value) {\n qs += `${symbol}${key}=${encodeURIComponent(value.toString()).replace(/%20/g, \"+\")}`\n }\n }\n\n return qs\n}\n","export const isTouch = (): boolean => {\n return \"ontouchstart\" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0\n}\n","import { http, Result } from \"@fider/services/http\"\nimport { UserSettings, UserAvatarType, ImageUpload } from \"@fider/models\"\n\ninterface UpdateUserSettings {\n name: string\n avatar?: ImageUpload\n avatarType: UserAvatarType\n settings: UserSettings\n}\n\nexport const updateUserSettings = async (request: UpdateUserSettings): Promise => {\n return await http.post(\"/_api/user/settings\", request)\n}\n\nexport const changeUserEmail = async (email: string): Promise => {\n return await http.post(\"/_api/user/change-email\", {\n email,\n })\n}\n\nexport const deleteCurrentAccount = async (): Promise => {\n return await http.delete(\"/_api/user\")\n}\n\nexport const regenerateAPIKey = async (): Promise> => {\n return await http.post<{ apiKey: string }>(\"/_api/user/regenerate-apikey\")\n}\n","import { http, Result } from \"@fider/services/http\"\nimport { Tag } from \"@fider/models\"\n\nexport const createTag = async (name: string, color: string, isPublic: boolean): Promise> => {\n return http.post(`/api/v1/tags`, { name, color, isPublic }).then(http.event(\"tag\", \"create\"))\n}\n\nexport const updateTag = async (slug: string, name: string, color: string, isPublic: boolean): Promise> => {\n return http.put(`/api/v1/tags/${slug}`, { name, color, isPublic }).then(http.event(\"tag\", \"update\"))\n}\n\nexport const deleteTag = async (slug: string): Promise => {\n return http.delete(`/api/v1/tags/${slug}`).then(http.event(\"tag\", \"delete\"))\n}\n\nexport const assignTag = async (slug: string, postNumber: number): Promise => {\n return http.post(`/api/v1/posts/${postNumber}/tags/${slug}`).then(http.event(\"tag\", \"assign\"))\n}\n\nexport const unassignTag = async (slug: string, postNumber: number): Promise => {\n return http.delete(`/api/v1/posts/${postNumber}/tags/${slug}`).then(http.event(\"tag\", \"unassign\"))\n}\n","import { http, Result, querystring } from \"@fider/services\"\nimport { Post, Vote, ImageUpload } from \"@fider/models\"\n\nexport const getAllPosts = async (): Promise> => {\n return await http.get(\"/api/v1/posts\")\n}\n\nexport interface SearchPostsParams {\n query?: string\n view?: string\n limit?: number\n tags?: string[]\n}\n\nexport const searchPosts = async (params: SearchPostsParams): Promise> => {\n return await http.get(\n `/api/v1/posts${querystring.stringify({\n tags: params.tags,\n query: params.query,\n view: params.view,\n limit: params.limit,\n })}`\n )\n}\n\nexport const deletePost = async (postNumber: number, text: string): Promise => {\n return http\n .delete(`/api/v1/posts/${postNumber}`, {\n text,\n })\n .then(http.event(\"post\", \"delete\"))\n}\n\nexport const addVote = async (postNumber: number): Promise => {\n return http.post(`/api/v1/posts/${postNumber}/votes`).then(http.event(\"post\", \"vote\"))\n}\n\nexport const removeVote = async (postNumber: number): Promise => {\n return http.delete(`/api/v1/posts/${postNumber}/votes`).then(http.event(\"post\", \"unvote\"))\n}\n\nexport const subscribe = async (postNumber: number): Promise => {\n return http.post(`/api/v1/posts/${postNumber}/subscription`).then(http.event(\"post\", \"subscribe\"))\n}\n\nexport const unsubscribe = async (postNumber: number): Promise => {\n return http.delete(`/api/v1/posts/${postNumber}/subscription`).then(http.event(\"post\", \"unsubscribe\"))\n}\n\nexport const listVotes = async (postNumber: number): Promise> => {\n return http.get(`/api/v1/posts/${postNumber}/votes`)\n}\n\nexport const createComment = async (postNumber: number, content: string, attachments: ImageUpload[]): Promise => {\n return http.post(`/api/v1/posts/${postNumber}/comments`, { content, attachments }).then(http.event(\"comment\", \"create\"))\n}\n\nexport const updateComment = async (postNumber: number, commentID: number, content: string, attachments: ImageUpload[]): Promise => {\n return http.put(`/api/v1/posts/${postNumber}/comments/${commentID}`, { content, attachments }).then(http.event(\"comment\", \"update\"))\n}\n\nexport const deleteComment = async (postNumber: number, commentID: number): Promise => {\n return http.delete(`/api/v1/posts/${postNumber}/comments/${commentID}`).then(http.event(\"comment\", \"delete\"))\n}\n\ninterface SetResponseInput {\n status: string\n text: string\n originalNumber: number\n}\n\nexport const respond = async (postNumber: number, input: SetResponseInput): Promise => {\n return http\n .put(`/api/v1/posts/${postNumber}/status`, {\n status: input.status,\n text: input.text,\n originalNumber: input.originalNumber,\n })\n .then(http.event(\"post\", \"respond\"))\n}\n\ninterface CreatePostResponse {\n id: number\n number: number\n title: string\n slug: string\n}\n\nexport const createPost = async (title: string, description: string, attachments: ImageUpload[]): Promise> => {\n return http.post(`/api/v1/posts`, { title, description, attachments }).then(http.event(\"post\", \"create\"))\n}\n\nexport const updatePost = async (postNumber: number, title: string, description: string, attachments: ImageUpload[]): Promise => {\n return http.put(`/api/v1/posts/${postNumber}`, { title, description, attachments }).then(http.event(\"post\", \"update\"))\n}\n","import { http, Result } from \"@fider/services/http\"\nimport { UserRole, OAuthConfig, ImageUpload } from \"@fider/models\"\n\nexport interface CheckAvailabilityResponse {\n message: string\n}\n\nexport interface CreateTenantRequest {\n legalAgreement: boolean\n tenantName: string\n subdomain?: string\n name?: string\n token?: string\n email?: string\n}\n\nexport interface CreateTenantResponse {\n token?: string\n}\n\nexport const createTenant = async (request: CreateTenantRequest): Promise> => {\n return await http.post(\"/_api/tenants\", request)\n}\n\nexport interface UpdateTenantSettingsRequest {\n logo?: ImageUpload\n title: string\n invitation: string\n welcomeMessage: string\n cname: string\n locale: string\n}\n\nexport const updateTenantSettings = async (request: UpdateTenantSettingsRequest): Promise => {\n return await http.post(\"/_api/admin/settings/general\", request)\n}\n\nexport const updateTenantAdvancedSettings = async (customCSS: string): Promise => {\n return await http.post(\"/_api/admin/settings/advanced\", { customCSS })\n}\n\nexport const updateTenantPrivacy = async (isPrivate: boolean): Promise => {\n return await http.post(\"/_api/admin/settings/privacy\", {\n isPrivate,\n })\n}\n\nexport const updateTenantEmailAuthAllowed = async (isEmailAuthAllowed: boolean): Promise => {\n return await http.post(\"/_api/admin/settings/emailauth\", {\n isEmailAuthAllowed,\n })\n}\n\nexport const checkAvailability = async (subdomain: string): Promise> => {\n return await http.get(`/_api/tenants/${subdomain}/availability`)\n}\n\nexport const signIn = async (email: string): Promise => {\n return await http.post(\"/_api/signin\", {\n email,\n })\n}\n\nexport const completeProfile = async (key: string, name: string): Promise => {\n return await http.post(\"/_api/signin/complete\", {\n key,\n name,\n })\n}\n\nexport const changeUserRole = async (userID: number, role: UserRole): Promise => {\n return await http.post(`/_api/admin/roles/${role}/users`, {\n userID,\n })\n}\n\nexport const blockUser = async (userID: number): Promise => {\n return await http.put(`/_api/admin/users/${userID}/block`)\n}\n\nexport const unblockUser = async (userID: number): Promise => {\n return await http.delete(`/_api/admin/users/${userID}/block`)\n}\n\nexport const getOAuthConfig = async (provider: string): Promise> => {\n return await http.get(`/_api/admin/oauth/${provider}`)\n}\n\nexport interface CreateEditOAuthConfigRequest {\n provider: string\n status: number\n displayName: string\n clientID: string\n clientSecret: string\n authorizeURL: string\n tokenURL: string\n scope: string\n profileURL: string\n jsonUserIDPath: string\n jsonUserNamePath: string\n jsonUserEmailPath: string\n logo?: ImageUpload\n}\n\nexport const saveOAuthConfig = async (request: CreateEditOAuthConfigRequest): Promise => {\n return await http.post(\"/_api/admin/oauth\", request)\n}\n","import { http, Result } from \"@fider/services\"\n\nexport const getTotalUnreadNotifications = async (): Promise> => {\n return http.get<{ total: number }>(\"/_api/notifications/unread/total\").then((result) => {\n return {\n ok: result.ok,\n error: result.error,\n data: result.data ? result.data.total : 0,\n }\n })\n}\n\nexport const markAllAsRead = async (): Promise => {\n return await http.post(\"/_api/notifications/read-all\")\n}\n","import { http, Result } from \"@fider/services\"\n\nexport const sendInvites = async (subject: string, message: string, recipients: string[]): Promise => {\n return http.post(\"/api/v1/invitations/send\", { subject, message, recipients }).then(http.event(\"invite\", \"send\"))\n}\n\nexport const sendSampleInvite = async (subject: string, message: string): Promise => {\n return http.post(\"/api/v1/invitations/sample\", { subject, message }).then(http.event(\"invite\", \"sample\"))\n}\n","import { http, Result, navigator, analytics } from \"@fider/services\"\n\nconst ignoreErrors = [\n \"http://gj.track.uc.cn/collect\", // CSP error: UC Browser tries to use sendBeacon to this domain, which is blocked by our CSP rule\n \"null is not an object (evaluating 'c.sheet.insertRule')\", // CSP error: UC Browser throws this error even when page is loaded sucessfully\n \"Refused to evaluate a string as JavaScript because 'unsafe-eval'\", // CSP error: usually thrown because of bad Chrome Extensions\n \"vid_mate_check is not defined\", // CSP error: thrown by VidMate, an Android Browser\n \"SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules\", // CSP error: usually thrown because of bad Chrome Extensions\n]\n\nexport const logError = async (message: string, err?: Error): Promise => {\n for (const pattern of ignoreErrors) {\n if (message.indexOf(pattern) >= 0) {\n return\n }\n }\n\n const data = {\n url: navigator.url(),\n stack: err ? err.stack : \"\",\n }\n\n try {\n analytics.error(err)\n return await http.post(\"/_api/log-error\", { message, data })\n } catch (err) {\n console.error(err)\n }\n}\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\n\nimport { ToastContainer, toast, ToastContent, ToastOptions } from \"react-toastify\"\nimport \"react-toastify/dist/ReactToastify.css\"\n\nlet hasContainer = false\n\nconst setup = () => {\n if (!hasContainer) {\n hasContainer = true\n ReactDOM.render(, document.getElementById(\"root-toastify\"))\n }\n}\n\nexport const success = (content: ToastContent, options?: ToastOptions) => {\n setup()\n toast.success(content, options)\n}\n\nexport const error = (content: ToastContent, options?: ToastOptions) => {\n setup()\n toast.error(content, options)\n}\n"],"names":["ErrorBoundary","React","constructor","props","super","this","state","error","undefined","errorInfo","componentDidCatch","onError","setState","render","fider","showDetails","isProduction","children","ShowPostResponse","status","PostStatus","response","show","text","className","ShowPostStatus","UserName","user","original","href","number","slug","title","DuplicateDetails","Markdown","style","StatusDetails","id","value","textColor","color","components","r","substring","g","b","R","parseInt","G","B","getRGB","ShowTag","classSet","circular","link","tag","name","isPublic","backgroundColor","xmlns","viewBox","fill","fillRule","d","clipRule","Header","useFider","isSignInModalOpen","setIsSignInModalOpen","useState","DevBanner","SignInModal","isOpen","onClose","justify","TenantLogo","size","session","tenant","isAuthenticated","spacing","NotificationIndicator","UserMenu","onClick","e","preventDefault","ButtonClickEvent","preventEnable","shouldEnable","canEnable","Button","async","stopPropagation","clicked","event","unmounted","componentWillUnmount","variant","disabled","rel","type","click","ValidationContext","Form","autoComplete","DisplayError","Provider","arrayToTag","items","map","m","key","hasError","field","errors","err","dict","reduce","result","push","message","fields","Object","keys","prototype","hasOwnProperty","call","forEach","t","length","Input","onChange","currentTarget","suffix","icon","Icon","sprite","onIconClick","clickable","Consumer","ctx","label","htmlFor","afterLabel","center","tabIndex","noTabFocus","ref","inputRef","autoFocus","onFocus","maxLength","placeholder","ImageUploader","target","files","file","alert","base64","fileToBase64","bkey","upload","fileName","content","contentType","remove","previewURL","instanceID","fileSelector","showModal","uploadedImageURL","modal","Modal","Window","closeModal","Content","alt","src","Footer","isUploading","hasFile","openModal","removeFile","fileChanged","accept","selectFile","IconPhotograph","MultiImageUploader","instances","removed","count","maxUploads","addNewElement","triggerOnChange","bkeys","uploads","k","concat","filter","x","btoa","Math","random","toString","element","imageUploaded","elements","TextArea","minRows","RadioButton","selected","onSelect","defaultOption","options","inputs","option","checked","bind","Select","o","getOption","defaultValue","filtered","Field","Checkbox","setChecked","isChecked","ImageViewer","loadedThumbnail","loadedPreview","Loader","onLoad","onPreviewLoad","onThumbnailLoad","html","markdown","tagName","dangerouslySetInnerHTML","__html","truncate","styles","height","width","url","Avatar","avatarURL","AvatarStack","users","i","Message","IconExclamation","IconExclamationCircle","IconCheckCircle","showIcon","Hint","cacheKey","permanentCloseKey","isClosed","setIsClosed","cache","condition","IconX","TermsOfService","settings","hasLegal","PrivacyPolicy","LegalNotice","LegalFooter","align","LegalAgreement","SocialSignInButton","redirectTo","window","location","logoURL","displayName","OAuthProviderLogo","SignInControl","showEmailForm","setShowEmailForm","isEmailAuthAllowed","email","setEmail","setError","providersLen","oauth","isCookieEnabled","provider","useEmail","device","actions","ok","onEmailSent","Moment","date","format","now","Date","display","getTime","formatDate","locale","timeSince","data-tooltip","ModalWindow","root","useRef","document","getElementById","useEffect","body","overflow","addEventListener","keyDown","removeEventListener","keyCode","close","canClose","current","ReactDOM","aria-disabled","data-testid","evt","defaultProps","isStaff","role","isCollaborator","setShow","useTimeout","TenantLogoURL","logoBlobKey","useFiderIfEmpty","systemProvidersLogo","google","facebook","github","OAuthProviderLogoURL","Toggle","active","setActive","toggle","newActive","onToggle","aria-hidden","PoweredByFider","PageTitle","subtitle","DropdownContext","createContext","Dropdown","node","setIsOpen","position","handleClick","contains","listClassName","renderHandle","ListItem","useContext","Divider","confirmationAddress","setConfirmationAddress","setTimeout","VoteCounter","hasVoted","setHasVoted","post","votesCount","setVotesCount","closed","vote","action","FaCaretUp","unreadNotifications","setUnreadNotifications","then","data","IconBell","Stack","dir","flex","divide","HStack","VStack","filterable","All","Error","TenantStatus","UserAvatarType","UserStatus","UserRole","Open","Planned","Started","Completed","Duplicate","Declined","Collaborator","Administrator","OAuthConfigStatus","Disabled","Enabled","request","method","headers","fetch","JSON","stringify","credentials","json","notify","toResult","truncatedBody","http","get","put","delete","category","analytics","set","storage","setItem","localStorage","getItem","has","removeItem","local","sessionStorage","eventCategory","eventAction","ga","exDescription","stack","exFatal","FiderSession","pContextID","contextID","pProps","pUser","pTenant","Fider","initData","pSettings","pSession","el","parse","textContent","innerText","environment","isSingleHostMode","mode","FiderContext","jwt","decode","token","segments","split","atob","input","classes","trim","shortOpts","month","year","fullOpts","day","hour","minute","opts","Intl","DateTimeFormat","toLocaleString","seconds","round","minutes","hours","days","months","years","rtf","RelativeTimeFormat","numeric","Promise","resolve","reject","reader","FileReader","parts","readAsDataURL","timeAgo","cookie","ret","indexOf","assetsURL","substr","activateI18NSync","messages","i18n","plurals","en","pt","de","fr","activateI18N","console","marked","headerIds","xhtml","smartLists","gfm","breaks","DOMPurify","USE_PROFILES","ADD_ATTR","fullRenderer","image","plainTextRenderer","_href","_title","br","strong","list","listitem","heading","paragraph","code","codespan","del","entities","encodeHTML","s","replace","sanitize","full","renderer","plainText","toastify","success","toast","goHome","goTo","pathname","replaceState","path","history","newURL","baseURL","getNumber","uri","navigator","re","RegExp","match","separator","results","exec","decodeURIComponent","getArray","qs","object","symbol","Array","join","encodeURIComponent","isTouch","maxTouchPoints","msMaxTouchPoints","updateUserSettings","changeUserEmail","deleteCurrentAccount","regenerateAPIKey","createTag","updateTag","deleteTag","assignTag","postNumber","unassignTag","getAllPosts","searchPosts","querystring","tags","params","query","view","limit","deletePost","addVote","removeVote","subscribe","unsubscribe","listVotes","createComment","attachments","updateComment","commentID","deleteComment","respond","originalNumber","createPost","description","updatePost","createTenant","updateTenantSettings","updateTenantAdvancedSettings","customCSS","updateTenantPrivacy","isPrivate","updateTenantEmailAuthAllowed","checkAvailability","subdomain","signIn","completeProfile","changeUserRole","userID","blockUser","unblockUser","getOAuthConfig","saveOAuthConfig","getTotalUnreadNotifications","total","markAllAsRead","sendInvites","subject","recipients","sendSampleInvite","ignoreErrors","logError","pattern","hasContainer","setup"],"sourceRoot":""}