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,WAAAA,EACAN,cAAAA,EACAO,iBAAAA,EACAH,uBAAAA,EACAiB,eAAAA,GACGhB,EAEL,CAEO,IAAMkB,EAAwB,WAAH,OAAS1B,GAAgB,EAAM,EACpD2B,EAA0B,WAAH,OAAS3B,GAAgB,EAAK","sources":["webpack://rpthreadtrackerv3.frontend/./src/display/forms/validated-form/ValidatedHiddenInput.js","webpack://rpthreadtrackerv3.frontend/./src/display/forms/validated-form/ValidatedSelectInput.js","webpack://rpthreadtrackerv3.frontend/./src/display/forms/upsert-thread/_formData.js","webpack://rpthreadtrackerv3.frontend/./src/display/forms/validated-form/ValidatedTextAreaInput.js","webpack://rpthreadtrackerv3.frontend/./src/display/forms/validated-form/ValidatedMultiValueTextInput.js","webpack://rpthreadtrackerv3.frontend/./src/display/forms/upsert-thread/UpsertThreadForm.js","webpack://rpthreadtrackerv3.frontend/./src/display/forms/upsert-thread/_validator.js","webpack://rpthreadtrackerv3.frontend/./src/display/shared/modals/UpsertThreadModal.js","webpack://rpthreadtrackerv3.frontend/./src/display/shared/styled/Modal.js","webpack://rpthreadtrackerv3.frontend/./src/infrastructure/hooks/queries/useCharactersQuery.js","webpack://rpthreadtrackerv3.frontend/./src/infrastructure/hooks/queries/useUserProfileQuery.js","webpack://rpthreadtrackerv3.frontend/./src/infrastructure/hooks/queries/useUserSettingsQuery.js","webpack://rpthreadtrackerv3.frontend/./src/infrastructure/hooks/queries/useNewsQuery.js","webpack://rpthreadtrackerv3.frontend/./src/infrastructure/hooks/queries/useThreadsQuery.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst propTypes = {\n\tregister: PropTypes.func.isRequired,\n\ttrigger: PropTypes.func.isRequired,\n\tname: PropTypes.string.isRequired\n};\n\nconst ValidatedHiddenInput = ({ register, name, trigger, ...props }) => {\n\treturn (\n\t\t<div>\n\t\t\t<input type=\"hidden\" {...register(name)} {...props} />\n\t\t</div>\n\t);\n};\nValidatedHiddenInput.propTypes = propTypes;\nexport default ValidatedHiddenInput;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Select from 'react-select';\nimport { Controller } from 'react-hook-form';\nimport ValidatedErrorMessage from './ValidatedErrorMessage';\n\nconst propTypes = {\n\tregister: PropTypes.func.isRequired,\n\terrors: PropTypes.shape({}).isRequired,\n\tmultiple: PropTypes.bool,\n\tname: PropTypes.string.isRequired,\n\ttrigger: PropTypes.func.isRequired,\n\thelpMessage: PropTypes.element,\n\toptions: PropTypes.arrayOf(PropTypes.shape({})),\n\tcontrol: PropTypes.shape({}).isRequired\n};\n\nconst ValidatedSelectInput = ({\n\tregister,\n\terrors,\n\ttrigger,\n\tcontrol,\n\tname,\n\thelpMessage = '',\n\tmultiple = false,\n\toptions,\n\t...props\n}) => {\n\treturn (\n\t\t<div>\n\t\t\t{!multiple && (\n\t\t\t\t<Controller\n\t\t\t\t\tname={name}\n\t\t\t\t\tcontrol={control}\n\t\t\t\t\trender={({ field: { onChange, value, ref } }) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\tinputRef={ref}\n\t\t\t\t\t\t\t\tclassName={`${errors[name] ? 'is-invalid' : ''}`}\n\t\t\t\t\t\t\t\tisMulti={multiple}\n\t\t\t\t\t\t\t\toptions={options}\n\t\t\t\t\t\t\t\tvalue={options.find((c) => c.value === value)}\n\t\t\t\t\t\t\t\tonChange={(val) => onChange(val.value)}\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{multiple && (\n\t\t\t\t<Controller\n\t\t\t\t\tname={name}\n\t\t\t\t\tdefaultValue={[]}\n\t\t\t\t\tcontrol={control}\n\t\t\t\t\trender={({ field: { onChange, value, ref } }) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\t\tclassName={`${errors[name] ? 'is-invalid' : ''}`}\n\t\t\t\t\t\t\t\tinputRef={ref}\n\t\t\t\t\t\t\t\tvalue={options.filter((c) => value.includes(c.value))}\n\t\t\t\t\t\t\t\tonChange={(val) => onChange(val.map((c) => c.value))}\n\t\t\t\t\t\t\t\toptions={options}\n\t\t\t\t\t\t\t\tisMulti\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<ValidatedErrorMessage error={errors[name]} />\n\t\t\t{helpMessage && <small className=\"form-text text-muted\">{helpMessage}</small>}\n\t\t</div>\n\t);\n};\nValidatedSelectInput.propTypes = propTypes;\nexport default ValidatedSelectInput;\n","import React from 'react';\n\nexport default {\n\tpartnerUrlIdentifier: {\n\t\thelpMessage: (\n\t\t\t<span>\n\t\t\t\tFor a Tumblr account, this will be the part of your URL before{' '}\n\t\t\t\t&quot;.tumblr.com&quot;. For instance, if your URL is{' '}\n\t\t\t\t<strong>http://myawesomeblog.tumblr.com</strong>, you would enter{' '}\n\t\t\t\t<strong>myawesomeblog</strong> in this field.\n\t\t\t</span>\n\t\t),\n\t\ttooltip: (\n\t\t\t<div>\n\t\t\t\tMake sure you spell this correctly. The tracker will use this value to filter out\n\t\t\t\tirrelevant replies to the thread; if it is misspelled, or your partner changes their\n\t\t\t\tidentifier, the tracker will not identify their replies as relevant. (You can also\n\t\t\t\tleave this blank to be notified of all replies.)\n\t\t\t</div>\n\t\t)\n\t},\n\tpostId: {\n\t\thelpMessage: (\n\t\t\t<span>\n\t\t\t\tThis must be a post from your blog. The post ID is the part of the URL after\n\t\t\t\t&quot;.tumblr.com/post/&quot;. For instance, if the post is at the URL{' '}\n\t\t\t\t<strong>http://myawesomeblog.tumblr.com/post/12345</strong>, you would enter{' '}\n\t\t\t\t<strong>12345</strong> in this field.\n\t\t\t</span>\n\t\t)\n\t},\n\tuserTitle: {\n\t\thelpMessage: <span>This can be anything you like!</span>\n\t},\n\tthreadTags: {\n\t\thelpMessage: <span>Enter a comma-separated list of tags. (optional)</span>\n\t}\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport * as debounceFn from 'lodash/debounce';\nimport ValidatedErrorMessage from './ValidatedErrorMessage';\n\nconst propTypes = {\n\tregister: PropTypes.func.isRequired,\n\terrors: PropTypes.shape({}).isRequired,\n\tonChange: PropTypes.func,\n\tname: PropTypes.string.isRequired,\n\ttrigger: PropTypes.func.isRequired,\n\tdebounce: PropTypes.bool,\n\thelpMessage: PropTypes.element\n};\n\nconst ValidatedTextAreaInput = ({\n\tregister,\n\terrors,\n\ttrigger,\n\tname,\n\tdebounce = false,\n\tonChange = () => {},\n\thelpMessage = '',\n\t...props\n}) => {\n\tconst getHandleChangeFn = () => {\n\t\tif (debounce) {\n\t\t\treturn debounceFn(async () => {\n\t\t\t\tawait trigger(name);\n\t\t\t\tonChange();\n\t\t\t});\n\t\t}\n\t\treturn onChange;\n\t};\n\treturn (\n\t\t<div>\n\t\t\t<textarea\n\t\t\t\tclassName={`form-control ${errors[name] ? 'is-invalid' : ''}`}\n\t\t\t\t{...register(name, { onChange: getHandleChangeFn() })}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t\t<ValidatedErrorMessage error={errors[name]} />\n\t\t\t{helpMessage && <small className=\"form-text text-muted\">{helpMessage}</small>}\n\t\t</div>\n\t);\n};\nValidatedTextAreaInput.propTypes = propTypes;\nexport default ValidatedTextAreaInput;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Controller } from 'react-hook-form';\nimport MultipleValueTextInput from 'react-multivalue-text-input/build/components/MultipleValueTextInput';\nimport ValidatedErrorMessage from './ValidatedErrorMessage';\n\nconst propTypes = {\n\tregister: PropTypes.func,\n\ttrigger: PropTypes.func,\n\terrors: PropTypes.shape({}).isRequired,\n\tname: PropTypes.string.isRequired,\n\thelpMessage: PropTypes.element,\n\ttransform: PropTypes.shape({\n\t\tinput: PropTypes.func.isRequired,\n\t\toutput: PropTypes.func.isRequired\n\t}).isRequired,\n\tthreadId: PropTypes.string,\n\tvalues: PropTypes.arrayOf(PropTypes.string),\n\tcontrol: PropTypes.shape({}).isRequired\n};\n\nconst ValidatedMultiValueTextInput = ({\n\tregister,\n\ttrigger,\n\terrors,\n\tcontrol,\n\ttransform,\n\tname,\n\tthreadId = null,\n\thelpMessage = <span />,\n\t...props\n}) => {\n\treturn (\n\t\t<div>\n\t\t\t<Controller\n\t\t\t\tname={name}\n\t\t\t\tcontrol={control}\n\t\t\t\trender={({ field: { onChange, value } }) => {\n\t\t\t\t\tif (value === undefined && threadId) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<MultipleValueTextInput\n\t\t\t\t\t\t\tvalues={transform.input(value)}\n\t\t\t\t\t\t\tname={name}\n\t\t\t\t\t\t\tonItemAdded={(_, newValues) => {\n\t\t\t\t\t\t\t\tonChange(transform.output(newValues));\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonItemDeleted={(_, newValues) => onChange(transform.output(newValues))}\n\t\t\t\t\t\t\tshouldAddOnBlur\n\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t<ValidatedErrorMessage error={errors[name]} />\n\t\t\t{helpMessage && <small className=\"form-text text-muted\">{helpMessage}</small>}\n\t\t</div>\n\t);\n};\nValidatedMultiValueTextInput.propTypes = propTypes;\nexport default ValidatedMultiValueTextInput;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Col, Row, FormGroup, Label } from 'reactstrap';\nimport Tooltip from 'rc-tooltip';\nimport formData from './_formData';\nimport ValidatedHiddenInput from '../validated-form/ValidatedHiddenInput';\nimport ValidatedSelectInput from '../validated-form/ValidatedSelectInput';\nimport ValidatedTextInput from '../validated-form/ValidatedTextInput';\nimport ValidatedTextAreaInput from '../validated-form/ValidatedTextAreaInput';\nimport ValidatedMultiValueTextInput from '../validated-form/ValidatedMultiValueTextInput';\n\nconst propTypes = {\n\tthread: PropTypes.shape({\n\t\tid: PropTypes.string,\n\t\tcharacterId: PropTypes.number,\n\t\tuserTitle: PropTypes.string,\n\t\tpostId: PropTypes.string,\n\t\tpartnerUrlIdentifier: PropTypes.string,\n\t\tdescription: PropTypes.string,\n\t\tthreadTags: PropTypes.arrayOf(PropTypes.shape({}))\n\t}).isRequired,\n\tcharacters: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n\tshowTooltip: PropTypes.func.isRequired,\n\thideTooltip: PropTypes.func.isRequired,\n\tinputProps: PropTypes.shape({}).isRequired,\n\ttooltipDisplayData: PropTypes.shape({\n\t\tpartnerUrlIdentifier: PropTypes.bool\n\t}).isRequired\n};\n\nconst UpsertThreadForm = ({\n\tinputProps,\n\tthread,\n\tcharacters,\n\tshowTooltip,\n\thideTooltip,\n\ttooltipDisplayData\n}) => {\n\tconst characterOptions = characters.map((c) => ({\n\t\tvalue: c.characterId,\n\t\tlabel: `${c.urlIdentifier} ${c.characterName ? `(${c.characterName})` : ''}`\n\t}));\n\treturn (\n\t\t<div>\n\t\t\t{thread?.id && <ValidatedHiddenInput name=\"id\" {...inputProps} />}\n\t\t\t<Row>\n\t\t\t\t<Col>\n\t\t\t\t\t<FormGroup>\n\t\t\t\t\t\t<Label for=\"characterId\">Character</Label>\n\t\t\t\t\t\t<ValidatedSelectInput\n\t\t\t\t\t\t\tname=\"characterId\"\n\t\t\t\t\t\t\t{...inputProps}\n\t\t\t\t\t\t\toptions={[\n\t\t\t\t\t\t\t\t{ value: '', label: 'Select Character' },\n\t\t\t\t\t\t\t\t...characterOptions\n\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FormGroup>\n\t\t\t\t</Col>\n\t\t\t</Row>\n\t\t\t<Row>\n\t\t\t\t<Col>\n\t\t\t\t\t<FormGroup>\n\t\t\t\t\t\t<Label for=\"userTitle\">Thread Title</Label>\n\t\t\t\t\t\t<ValidatedTextInput\n\t\t\t\t\t\t\tname=\"userTitle\"\n\t\t\t\t\t\t\tplaceholder=\"Thread Title\"\n\t\t\t\t\t\t\thelpMessage={formData.userTitle.helpMessage}\n\t\t\t\t\t\t\t{...inputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FormGroup>\n\t\t\t\t</Col>\n\t\t\t</Row>\n\t\t\t<Row>\n\t\t\t\t<Col>\n\t\t\t\t\t<FormGroup>\n\t\t\t\t\t\t<Label for=\"postId\">Post ID</Label>\n\t\t\t\t\t\t<ValidatedTextInput\n\t\t\t\t\t\t\tname=\"postId\"\n\t\t\t\t\t\t\tplaceholder=\"Post ID\"\n\t\t\t\t\t\t\thelpMessage={formData.postId.helpMessage}\n\t\t\t\t\t\t\t{...inputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FormGroup>\n\t\t\t\t</Col>\n\t\t\t</Row>\n\t\t\t<Row>\n\t\t\t\t<Col>\n\t\t\t\t\t<Tooltip\n\t\t\t\t\t\tvisible={tooltipDisplayData.partnerUrlIdentifier}\n\t\t\t\t\t\toverlay={formData.partnerUrlIdentifier.tooltip}\n\t\t\t\t\t\toverlayStyle={{\n\t\t\t\t\t\t\twidth: 300\n\t\t\t\t\t\t}}\n\t\t\t\t\t\talign={{\n\t\t\t\t\t\t\toffset: [0, 30]\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tplacement=\"top\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormGroup>\n\t\t\t\t\t\t\t<Label for=\"partnerUrlIdentifier\">\n\t\t\t\t\t\t\t\tPartner URL Identifier (Optional)\n\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t<ValidatedTextInput\n\t\t\t\t\t\t\t\tname=\"partnerUrlIdentifier\"\n\t\t\t\t\t\t\t\tplaceholder=\"Partner Url Identifier\"\n\t\t\t\t\t\t\t\thelpMessage={formData.partnerUrlIdentifier.helpMessage}\n\t\t\t\t\t\t\t\tonFocus={showTooltip}\n\t\t\t\t\t\t\t\tonBlur={hideTooltip}\n\t\t\t\t\t\t\t\t{...inputProps}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FormGroup>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t</Col>\n\t\t\t</Row>\n\t\t\t<Row>\n\t\t\t\t<Col>\n\t\t\t\t\t<div className=\"form-group\">\n\t\t\t\t\t\t<Label htmlFor=\"description\">Thread Description (Optional)</Label>\n\t\t\t\t\t\t<ValidatedTextAreaInput\n\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\trows=\"3\"\n\t\t\t\t\t\t\tmaxLength=\"250\"\n\t\t\t\t\t\t\t{...inputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Col>\n\t\t\t</Row>\n\t\t\t<Row>\n\t\t\t\t<Col>\n\t\t\t\t\t<FormGroup>\n\t\t\t\t\t\t<ValidatedMultiValueTextInput\n\t\t\t\t\t\t\t{...inputProps}\n\t\t\t\t\t\t\tlabel=\"Thread Tags (Optional)\"\n\t\t\t\t\t\t\tname=\"threadTags\"\n\t\t\t\t\t\t\ttransform={{\n\t\t\t\t\t\t\t\tinput: (data) => data?.map((t) => t.tagText),\n\t\t\t\t\t\t\t\toutput: (data) =>\n\t\t\t\t\t\t\t\t\tdata?.map((t) => ({\n\t\t\t\t\t\t\t\t\t\ttagText: t\n\t\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tthreadId={thread?.id}\n\t\t\t\t\t\t\tplaceholder=\"Thread Tags\"\n\t\t\t\t\t\t\tclassName=\"form-control\"\n\t\t\t\t\t\t\tlabelClassName=\"form-control-label\"\n\t\t\t\t\t\t\thelpMessage={formData.threadTags.helpMessage}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FormGroup>\n\t\t\t\t</Col>\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\n\nUpsertThreadForm.propTypes = propTypes;\nexport default UpsertThreadForm;\n","import * as yup from 'yup';\n\nconst validator = yup.object().shape({\n\tuserTitle: yup\n\t\t.string()\n\t\t.required('You must enter a title for your thread.')\n\t\t.max(256, 'Your thread title is too long.'),\n\tcharacterId: yup.number().required('You must select a character for your thread.'),\n\tpostId: yup.string().matches(/^(?:\\d+)?$/, 'Post IDs can only contain numbers.'),\n\tpartnerUrlIdentifier: yup.string().max(256, \"Your partner's URL identifier is too long.\")\n});\nexport default validator;\n","// #region imports\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap';\nimport { toast } from 'react-toastify';\nimport TooltipForm from '~/display/forms/TooltipForm';\nimport UpsertThreadForm from '~/display/forms/upsert-thread/UpsertThreadForm';\nimport Modal from '~/display/shared/styled/Modal';\nimport { sortCharacters } from '~/utility';\nimport { useCreateThreadMutation, useUpdateThreadMutation } from '~/infrastructure/hooks/mutations';\nimport useValidatedForm from '~/display/forms/validated-form/useValidatedForm';\nimport LoadingIndicator from '../loading/LoadingIndicator';\nimport validator from '../../forms/upsert-thread/_validator';\n// #endregion imports\n\nconst propTypes = {\n\tisModalOpen: PropTypes.bool.isRequired,\n\tsetIsModalOpen: PropTypes.func.isRequired,\n\tcharacters: PropTypes.arrayOf(PropTypes.shape({})),\n\tactedThread: PropTypes.shape({\n\t\tthreadId: PropTypes.number,\n\t\tthreadTags: PropTypes.arrayOf(PropTypes.shape({}))\n\t})\n};\n\nconst UpsertThreadModal = ({ actedThread, characters, isModalOpen, setIsModalOpen }) => {\n\tconst { createThread, isLoading: isCreateThreadLoading } = useCreateThreadMutation();\n\tconst { updateThread, isLoading: isUpdateThreadLoading } = useUpdateThreadMutation();\n\tconst isLoading = isCreateThreadLoading || isUpdateThreadLoading;\n\tconst activeCharacters = [].concat(\n\t\tcharacters.sort(sortCharacters).filter((c) => !c.isOnHiatus)\n\t);\n\n\tconst submitForm = (formData) => {\n\t\tconst upsertFn = formData.threadId ? updateThread : createThread;\n\t\tconst submitData = {\n\t\t\t...formData\n\t\t};\n\t\tupsertFn(submitData)\n\t\t\t.then(() => {\n\t\t\t\tsetIsModalOpen(false);\n\t\t\t\ttoast.success(formData.threadId ? 'Thread updated!' : 'Thread created!');\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\ttoast.error(\n\t\t\t\t\t`There was an error ${formData.threadId ? 'updating' : 'creating'} this thread.`\n\t\t\t\t);\n\t\t\t});\n\t};\n\tconst { onFormSubmit, inputProps } = useValidatedForm(submitForm, validator, actedThread);\n\treturn (\n\t\t<Modal isOpen={isModalOpen} toggle={() => setIsModalOpen(!isModalOpen)} backdrop>\n\t\t\t<form onSubmit={onFormSubmit}>\n\t\t\t\t<ModalHeader toggle={() => setIsModalOpen(!isModalOpen)}>\n\t\t\t\t\t{actedThread?.threadId ? 'Edit Thread' : 'Add New Thread'}\n\t\t\t\t</ModalHeader>\n\t\t\t\t<ModalBody>\n\t\t\t\t\t<TooltipForm\n\t\t\t\t\t\tRenderable={UpsertThreadForm}\n\t\t\t\t\t\tthread={actedThread}\n\t\t\t\t\t\tinputProps={inputProps}\n\t\t\t\t\t\tcharacters={activeCharacters}\n\t\t\t\t\t/>\n\t\t\t\t</ModalBody>\n\t\t\t\t<ModalFooter>\n\t\t\t\t\t{isLoading && <LoadingIndicator />}\n\t\t\t\t\t<Button color=\"primary\">\n\t\t\t\t\t\t{actedThread?.threadId ? 'Edit Thread' : 'Add Thread'}\n\t\t\t\t\t</Button>{' '}\n\t\t\t\t\t<Button color=\"secondary\" onClick={() => setIsModalOpen(!isModalOpen)}>\n\t\t\t\t\t\tCancel\n\t\t\t\t\t</Button>\n\t\t\t\t</ModalFooter>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n};\n\nUpsertThreadModal.propTypes = propTypes;\nUpsertThreadModal.defaultProps = {\n\tcharacters: [],\n\tactedThread: {}\n};\nexport default UpsertThreadModal;\n","import styled from 'styled-components';\nimport { Modal } from 'reactstrap';\nimport colors from '../../../infrastructure/constants/colors';\n\nexport default styled(Modal)`\n\tcolor: ${colors.GRAY_800};\n\t.form-text {\n\t\topacity: 0.8;\n\t}\n\t.form-control {\n\t\tborder: 1px solid ${colors.GRAY_200};\n\t}\n\t.form-control-label {\n\t\tfont-weight: bold;\n\t\topacity: 0.8;\n\t\twidth: 100%;\n\t}\n\t.multiple-value-text-input-item-container {\n\t\tpadding: 0.5rem 0 0;\n\t\t.multiple-value-text-input-item {\n\t\t\tborder-radius: 5px;\n\t\t}\n\t}\n\t.public-view-form-turn-section {\n\t\tpadding: 15px 0;\n\t\tbackground: #ddd;\n\t}\n`;\n","import { useQuery } from 'react-query';\nimport axios from 'axios';\nimport queryKeys from '~/infrastructure/constants/queryKeys';\n\nfunction useCharactersQuery() {\n\tconst charactersQuery = useQuery(queryKeys.CHARACTERS, () => {\n\t\treturn axios.get(`${API_BASE_URL}api/character`).then((res) => {\n\t\t\treturn Promise.resolve(res.data);\n\t\t});\n\t});\n\treturn charactersQuery;\n}\nexport default useCharactersQuery;\n","import { useQuery } from 'react-query';\nimport axios from 'axios';\nimport queryKeys from '~/infrastructure/constants/queryKeys';\n\nfunction useUserProfileQuery() {\n\tconst userProfileQuery = useQuery(queryKeys.USER_PROFILE, () => {\n\t\treturn axios.get(`${API_BASE_URL}api/user`).then((res) => Promise.resolve(res.data));\n\t});\n\treturn userProfileQuery;\n}\nexport default useUserProfileQuery;\n","import { useQuery } from 'react-query';\nimport axios from 'axios';\nimport queryKeys from '~/infrastructure/constants/queryKeys';\n\nfunction useUserSettingsQuery() {\n\tconst userSettingsQuery = useQuery(queryKeys.USER_SETTINGS, () => {\n\t\treturn axios\n\t\t\t.get(`${API_BASE_URL}api/profilesettings`)\n\t\t\t.then((res) => Promise.resolve(res.data));\n\t});\n\treturn userSettingsQuery;\n}\nexport default useUserSettingsQuery;\n","import { useQuery } from 'react-query';\nimport axios from 'axios';\nimport { useEffect, useState } from 'react';\nimport queryKeys from '~/infrastructure/constants/queryKeys';\nimport useUserSettingsQuery from './useUserSettingsQuery';\n\nfunction useNewsQuery() {\n\tconst [markedNews, setMarkedNews] = useState([]);\n\tconst [unreadNewsCount, setUnreadNewsCount] = useState(0);\n\tconst userSettingsQuery = useUserSettingsQuery();\n\tconst { data: userSettings } = useUserSettingsQuery();\n\tconst { data: news } = useQuery(queryKeys.NEWS, () => {\n\t\treturn axios\n\t\t\t.get(`${TUMBLR_CLIENT_BASE_URL}api/news`)\n\t\t\t.then((res) => Promise.resolve(res.data));\n\t});\n\n\tuseEffect(() => {\n\t\tif (!userSettings || !news) {\n\t\t\treturn;\n\t\t}\n\t\tconst lastNewsReadDate = new Date(userSettings.lastNewsReadDate);\n\t\tconst marked = news.map((n) => ({\n\t\t\t...n,\n\t\t\tisUnread: !lastNewsReadDate || new Date(n.postDate) > lastNewsReadDate\n\t\t}));\n\n\t\tsetMarkedNews(marked);\n\t\tsetUnreadNewsCount(marked.filter((n) => n.isUnread).length);\n\t}, [news, userSettings]);\n\n\treturn {\n\t\tuserSettings: userSettingsQuery.data,\n\t\tmarkedNews,\n\t\tunreadNewsCount,\n\t\tsetUnreadNewsCount\n\t};\n}\nexport default useNewsQuery;\n","import { useQuery, useQueryClient } from 'react-query';\nimport axios from 'axios';\nimport { useEffect } from 'react';\nimport queryKeys from '~/infrastructure/constants/queryKeys';\nimport { useThreadsStatusMutation } from '../mutations';\n\nexport function useThreadsQuery(isArchived = false) {\n\tconst {\n\t\tthreadsStatus,\n\t\tfetchThreadsStatusChunk,\n\t\tclearData: resetThreadsStatus,\n\t\tisLoading: isThreadsStatusLoading\n\t} = useThreadsStatusMutation();\n\tconst threadsQuery = useQuery([queryKeys.THREADS, { isArchived }], () => {\n\t\treturn axios.get(`${API_BASE_URL}api/thread?isArchived=${isArchived}`).then((res) => {\n\t\t\treturn Promise.resolve(res.data);\n\t\t});\n\t});\n\tconst { data: threadData, isLoading: isThreadsLoading } = threadsQuery;\n\tuseEffect(() => {\n\t\tif (!threadData?.threads?.length) {\n\t\t\treturn;\n\t\t}\n\t\tresetThreadsStatus();\n\t\tconst requests = JSON.parse(threadData.threadStatusRequestJson);\n\t\tconst chunks = [];\n\t\tfor (let i = 0, j = requests.length; i < j; i += 10) {\n\t\t\tconst chunk = requests.slice(i, i + 10);\n\t\t\tchunks.push(chunk);\n\t\t}\n\t\tchunks.forEach((chunk) => {\n\t\t\tfetchThreadsStatusChunk(chunk);\n\t\t});\n\t}, [threadData, fetchThreadsStatusChunk, resetThreadsStatus]);\n\tconst queryClient = useQueryClient();\n\tconst refreshThreads = () => {\n\t\tqueryClient.resetQueries([queryKeys.THREADS, { isArchived }]);\n\t};\n\treturn {\n\t\tthreadData,\n\t\tthreadsStatus,\n\t\tisThreadsLoading,\n\t\tisThreadsStatusLoading,\n\t\trefreshThreads,\n\t\t...threadsQuery\n\t};\n}\n\nexport const useActiveThreadsQuery = () => useThreadsQuery(false);\nexport const useArchivedThreadsQuery = () => useThreadsQuery(true);\n"],"names":["propTypes","register","PropTypes","trigger","name","ValidatedHiddenInput","props","type","errors","isRequired","multiple","helpMessage","options","control","ValidatedSelectInput","render","field","onChange","value","ref","inputRef","className","isMulti","find","c","val","defaultValue","filter","includes","map","error","partnerUrlIdentifier","tooltip","postId","userTitle","threadTags","i","debounce","ValidatedTextAreaInput","debounceFn","ValidatedErrorMessage","transform","input","output","threadId","values","ValidatedMultiValueTextInput","undefined","MultipleValueTextInput","onItemAdded","_","newValues","onItemDeleted","shouldAddOnBlur","thread","id","characterId","description","characters","showTooltip","hideTooltip","inputProps","tooltipDisplayData","UpsertThreadForm","characterOptions","label","urlIdentifier","characterName","for","ValidatedTextInput","placeholder","formData","visible","overlay","overlayStyle","width","align","offset","placement","onFocus","onBlur","htmlFor","rows","maxLength","data","t","tagText","labelClassName","yup","shape","required","max","matches","isModalOpen","setIsModalOpen","actedThread","UpsertThreadModal","useCreateThreadMutation","createThread","isCreateThreadLoading","isLoading","useUpdateThreadMutation","updateThread","isUpdateThreadLoading","activeCharacters","concat","sort","sortCharacters","isOnHiatus","useValidatedForm","upsertFn","submitData","then","toast","catch","validator","onFormSubmit","Modal","isOpen","toggle","backdrop","onSubmit","TooltipForm","Renderable","LoadingIndicator","color","onClick","defaultProps","styled","colors","useQuery","queryKeys","axios","API_BASE_URL","res","Promise","resolve","useState","markedNews","setMarkedNews","unreadNewsCount","setUnreadNewsCount","userSettingsQuery","useUserSettingsQuery","userSettings","news","TUMBLR_CLIENT_BASE_URL","useEffect","lastNewsReadDate","Date","marked","n","isUnread","postDate","length","useThreadsQuery","isArchived","useThreadsStatusMutation","threadsStatus","fetchThreadsStatusChunk","resetThreadsStatus","clearData","isThreadsStatusLoading","threadsQuery","threadData","isThreadsLoading","threads","requests","JSON","parse","threadStatusRequestJson","chunks","j","chunk","slice","push","forEach","queryClient","useQueryClient","refreshThreads","resetQueries","useActiveThreadsQuery","useArchivedThreadsQuery"],"sourceRoot":""}