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A,kBAAiB,CACnE1K,IAAayK,IAAAA,OAAiBE,WAC9B1K,MAAawK,IAAAA,OAAiBE,WAC9BvK,gBAAiBqK,IAAAA,OACjBtK,YAAasK,IAAAA,OAAgBC,EAAAA,EAAAA,kBAAiB,CAC7CtK,gBAAiBqK,IAAAA,UAElBvK,WAAa0K,EAA4BD,WACzCE,WAAaJ,IAAAA,S","sources":["components/BlueprintThumbnail.js","components/LoadingIcon.js","components/PageHeader.js","components/grid/MostFavoritedGrid.js","components/grid/PaginationControls.js","components/search/EfficientSearchForm.js","components/search/EfficientTagForm.js","components/single/Spinner.js","helpers/buildImageUrl.ts","helpers/getHeaders.ts","hooks/useAuthored.js","hooks/useFavorites.js","hooks/useTagOptions.js","propTypes/ImgurImageSummaryProjection.js","propTypes/BlueprintSummaryProjection.js"],"sourcesContent":["import {faHeart} from '@fortawesome/free-solid-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\n\nimport {useQueryClient} from '@tanstack/react-query';\nimport {forbidExtraProps} from 'airbnb-prop-types';\n\nimport React from 'react';\nimport Card from 'react-bootstrap/Card';\nimport OverlayTrigger from 'react-bootstrap/OverlayTrigger';\nimport Tooltip from 'react-bootstrap/Tooltip';\nimport {Link} from 'react-router-dom';\n\nimport NoAvailableImage from '../gif/No_available_image.gif';\n\nimport buildImageUrl from '../helpers/buildImageUrl';\nimport useAuthored from '../hooks/useAuthored';\nimport useFavorites from '../hooks/useFavorites';\nimport BlueprintSummaryProjection from '../propTypes/BlueprintSummaryProjection';\n\nBlueprintThumbnail.propTypes = forbidExtraProps({\n\tblueprintSummary: BlueprintSummaryProjection,\n});\n\nfunction BlueprintThumbnail({blueprintSummary: {key, title, imgurImage, voteSummary}}) {\n\tconst numberOfUpvotes = voteSummary?.numberOfUpvotes;\n\n\tconst queryClient = useQueryClient()\n\tif (voteSummary === undefined)\n\t{\n\t\tconsole.log('BlueprintThumbnail clearing the query cache')\n\t\tqueryClient.clear()\n\t}\n\n\tconst {isSuccess, data} = useFavorites();\n\tconst authoredResult = useAuthored();\n\n\tconst mine = authoredResult.isSuccess && authoredResult.data.includes(key);\n\tconst favorite = isSuccess && data.includes(key);\n\n\tconst tooltip = (\n\t\t\n\t\t\t{title}\n\t\t\n\t);\n\tconst imageUrl = imgurImage ?\n\t\tbuildImageUrl(imgurImage.imgurId, imgurImage.imgurType, 'b') :\n\t\tNoAvailableImage;\n\n\tconst mineStyle = mine ? 'text-warning' : 'text-default';\n\tconst favoriteStyle = favorite ? 'text-warning' : 'text-default';\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t

\n\t\t\t\t{`${numberOfUpvotes}`} favorites\n\t\t\t\t\n\t\t\t\t\t{/* TODO: This heart should be a toggle button */}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{' '}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t

\n\t\t
\n\t);\n}\n\nexport default BlueprintThumbnail;\n","import {faCog} from '@fortawesome/free-solid-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nLoadingIcon.propTypes = {\n\tisLoading: PropTypes.bool.isRequired,\n};\n\nfunction LoadingIcon(props)\n{\n\treturn props.isLoading\n\t\t? \n\t\t: <>;\n}\n\nexport default LoadingIcon;\n","import {forbidExtraProps} from 'airbnb-prop-types';\n\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport Row from 'react-bootstrap/Row';\n\nconst PageHeader = ({title}) =>\n\t(\n\t\t\n\t\t\t

\n\t\t\t\t{title}\n\t\t\t

\n\t\t
\n\t);\n\nPageHeader.propTypes = forbidExtraProps({\n\ttitle: PropTypes.node.isRequired,\n});\n\nexport default PageHeader;\n","import {faExclamationTriangle} from '@fortawesome/free-solid-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport axios from 'axios';\nimport React, {useState} from 'react';\nimport Container from 'react-bootstrap/Container';\nimport Row from 'react-bootstrap/Row';\nimport {useQuery} from '@tanstack/react-query';\n\nimport {ArrayParam, StringParam, useQueryParam, withDefault} from 'use-query-params';\n\nimport BlueprintThumbnail from '../BlueprintThumbnail';\nimport PageHeader from '../PageHeader';\nimport EfficientSearchForm from '../search/EfficientSearchForm';\nimport EfficientTagForm from '../search/EfficientTagForm';\nimport Spinner from '../single/Spinner';\nimport PaginationControls from './PaginationControls';\n\nfunction MostFavoritedGrid()\n{\n\tconst [page, setPage] = useState(1);\n\n\tconst [titleFilter] = useQueryParam('title', StringParam);\n\tconst [selectedTags] = useQueryParam('tags', withDefault(ArrayParam, []));\n\n\tconst fetchBlueprintSummaries = async (page = 1, titleFilter, selectedTags) =>\n\t{\n\t\tconst url = `${process.env.REACT_APP_REST_URL}/api/blueprintSummaries/top/page/${page}`;\n\t\tconst params = new URLSearchParams();\n\t\tif (titleFilter)\n\t\t{\n\t\t\tparams.append('title', titleFilter);\n\t\t}\n\t\tselectedTags.forEach(tag => params.append('tag', '/' + tag + '/'));\n\t\tconst result = await axios.get(url, {params});\n\t\treturn result.data;\n\t};\n\n\tconst options = {\n\t\tkeepPreviousData: true,\n\t\tplaceholderData : {_data: [], _metadata: {pagination: {numberOfPages: 0, pageNumber: 0}}},\n\t};\n\tconst result = useQuery(['top', page, titleFilter, selectedTags], () => fetchBlueprintSummaries(page, titleFilter, selectedTags), options);\n\n\t// TODO: Refactor out grid commonality\n\n\tconst {isLoading, isError, data, isPreviousData} = result;\n\n\tif (isLoading)\n\t{\n\t\treturn \n\t}\n\n\tif (isError)\n\t{\n\t\tconsole.log({result});\n\t\treturn (\n\t\t\t
\n\t\t\t\t

\n\t\t\t\t\t\n\t\t\t\t\t{'Error loading blueprint summaries.'}\n\t\t\t\t

\n\t\t\t
\n\t\t);\n\t}\n\n\tconst {_data: blueprintSummaries, _metadata: {pagination: {numberOfPages, pageNumber}}} = data;\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{\n\t\t\t\t\tblueprintSummaries.map(blueprintSummary =>\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t))\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n\nexport default MostFavoritedGrid;\n","import {faAngleDoubleLeft, faAngleLeft, faAngleRight} from '@fortawesome/free-solid-svg-icons';\n\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\n\nimport {forbidExtraProps} from 'airbnb-prop-types';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nimport Button from 'react-bootstrap/Button';\nimport Col from 'react-bootstrap/Col';\nimport Row from 'react-bootstrap/Row';\nimport LoadingIcon from '../LoadingIcon';\n\nPaginationControls.propTypes = forbidExtraProps({\n\tpage : PropTypes.number.isRequired,\n\tsetPage : PropTypes.func.isRequired,\n\tpageNumber : PropTypes.number.isRequired,\n\tisPreviousData: PropTypes.bool.isRequired,\n\tnumberOfPages : PropTypes.number.isRequired,\n});\n\nfunction PaginationControls({page, setPage, pageNumber, isPreviousData, numberOfPages})\n{\n\tfunction onClick()\n\t{\n\t\tif (!isPreviousData && numberOfPages > page)\n\t\t{\n\t\t\tsetPage(old => old + 1);\n\t\t}\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{'Next Page'}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n\nexport default PaginationControls;\n","import {faSearch} from '@fortawesome/free-solid-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\n\nimport React, {useState} from 'react';\n\nimport Col from 'react-bootstrap/Col';\nimport FormControl from 'react-bootstrap/FormControl';\nimport InputGroup from 'react-bootstrap/InputGroup';\n\nimport {StringParam, useQueryParam, withDefault} from 'use-query-params';\n\nEfficientSearchForm.propTypes = {};\n\nfunction EfficientSearchForm()\n{\n\tconst [titleFilter, setTitle] = useQueryParam('title', withDefault(StringParam, ''));\n\n\tconst [localTitleFilter, setLocalTitleFilter] = useState(titleFilter);\n\n\tconst debouncedSetTitleFilter = useAsyncDebounce((value) => setTitle(value || ''), 500);\n\n\tconst handleSearchString = (event) =>\n\t{\n\t\tevent.preventDefault();\n\n\t\tconst searchString = event.target.value;\n\t\tsetLocalTitleFilter(searchString);\n\t\tdebouncedSetTitleFilter(searchString);\n\t};\n\n\tconst handleKeyDown = (event) =>\n\t{\n\t\tif (event.key === 'Escape')\n\t\t{\n\t\t\tevent.target.select();\n\t\t\tsetTitle(event.target.value || '')\n\t\t}\n\t};\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n\nexport function useGetLatest(obj)\n{\n\tconst ref = React.useRef();\n\tref.current = obj;\n\n\treturn React.useCallback(() => ref.current, []);\n}\n\n// Debouncing taken from https://github.com/tannerlinsley/react-table/blob/master/src/publicUtils.js\n// MIT License\n// Copyright (c) 2016 Tanner Linsley\nexport function useAsyncDebounce(defaultFn, defaultWait = 0)\n{\n\tconst debounceRef = React.useRef({});\n\n\tconst getDefaultFn = useGetLatest(defaultFn);\n\tconst getDefaultWait = useGetLatest(defaultWait);\n\n\treturn React.useCallback(\n\t\tasync (...args) =>\n\t\t{\n\t\t\tif (!debounceRef.current.promise)\n\t\t\t{\n\t\t\t\tdebounceRef.current.promise = new Promise((resolve, reject) =>\n\t\t\t\t{\n\t\t\t\t\tdebounceRef.current.resolve = resolve;\n\t\t\t\t\tdebounceRef.current.reject = reject;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (debounceRef.current.timeout)\n\t\t\t{\n\t\t\t\tclearTimeout(debounceRef.current.timeout);\n\t\t\t}\n\n\t\t\tdebounceRef.current.timeout = setTimeout(async () =>\n\t\t\t{\n\t\t\t\tdelete debounceRef.current.timeout;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tdebounceRef.current.resolve(await getDefaultFn()(...args));\n\t\t\t\t}\n\t\t\t\tcatch (err)\n\t\t\t\t{\n\t\t\t\t\tdebounceRef.current.reject(err);\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tdelete debounceRef.current.promise;\n\t\t\t\t}\n\t\t\t}, getDefaultWait());\n\n\t\t\treturn debounceRef.current.promise;\n\t\t},\n\t\t[getDefaultFn, getDefaultWait],\n\t);\n}\n\nexport default EfficientSearchForm;\n","import React from 'react';\nimport Col from 'react-bootstrap/Col';\nimport Select from 'react-select';\nimport makeAnimated from 'react-select/animated';\n\nimport {ArrayParam, useQueryParam, withDefault} from 'use-query-params';\n\nimport useTagOptions from '../../hooks/useTagOptions';\n\nconst animatedComponents = makeAnimated();\n\nEfficientTagForm.propTypes = {};\n\nfunction EfficientTagForm()\n{\n\tconst {tagValuesSet, tagOptions} = useTagOptions();\n\n\tconst [selectedTags, setTags] = useQueryParam('tags', withDefault(ArrayParam, []));\n\n\tconst selectedTagOptions = selectedTags\n\t\t.filter(each => tagValuesSet.has(each))\n\t\t.map(value => ({label: value, value}));\n\n\tconst setSelectedTagValues = (selectedTags) =>\n\t{\n\t\tconst selectedTagValues = selectedTags.map(selectedTag => selectedTag.value);\n\t\tsetTags(selectedTagValues);\n\t};\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n}\n\nexport default EfficientTagForm;\n","import LoadingIcon from '../LoadingIcon';\n\nexport default function Spinner()\n{\n\treturn
\n\t\t

\n\t\t\t\n\t\t\t{' Loading...'}\n\t\t

\n\t
;\n}\n","function buildImageUrl(imgurId: string, imgurType: string, suffix: string): string\n{\n\tconst typeParts: string[] = imgurType.split('/');\n\treturn `http://i.imgur.com/${imgurId}${suffix}.${typeParts[1]}`;\n}\n\nexport default buildImageUrl;\n","function getHeaders(idToken: string)\n{\n\treturn {\n\t\theaders: {\n\t\t\tAuthorization: `Bearer ${idToken}`,\n\t\t},\n\t};\n}\n\nexport default getHeaders;\n","import axios from 'axios';\nimport {useContext} from 'react';\nimport {useQuery} from '@tanstack/react-query';\nimport UserContext from '../context/userContext';\n\nimport getHeaders from '../helpers/getHeaders';\n\nfunction useAuthored()\n{\n\tconst {user} = useContext(UserContext);\n\tconst queryEnabled = user !== undefined && user !== null && user.uid !== undefined;\n\tconst uid = user?.uid;\n\tconst queryKey = ['api/my/blueprints/', uid];\n\n\treturn useQuery(\n\t\tqueryKey,\n\t\t() => getAuthored(user),\n\t\t{\n\t\t\tenabled : queryEnabled,\n\t\t\tstaleTime: 1000 * 60 * 60, // 60 minutes\n\t\t},\n\t);\n}\n\nasync function getAuthored(user)\n{\n\tconst idToken = await user?.getIdToken();\n\n\tconst headers = getHeaders(idToken);\n\tconst response = await axios.get(`${process.env.REACT_APP_REST_URL}/api/my/blueprints/`, headers);\n\treturn response.data;\n}\n\nexport default useAuthored;\n","import axios from 'axios';\nimport {useContext} from 'react';\nimport {useQuery} from '@tanstack/react-query';\nimport UserContext from '../context/userContext';\n\nimport getHeaders from '../helpers/getHeaders';\n\nfunction useFavorites()\n{\n\tconst {user} = useContext(UserContext);\n\tconst queryEnabled = user !== undefined && user !== null;\n\tconst uid = queryEnabled ? user.uid : undefined;\n\tconst queryKey = ['api/my/favorites/', uid];\n\n\treturn useQuery(\n\t\tqueryKey,\n\t\t() => getFavorites(user),\n\t\t{\n\t\t\tenabled : queryEnabled,\n\t\t\tstaleTime: 1000 * 60 * 60, // 60 minutes\n\t\t},\n\t);\n}\n\nasync function getFavorites(user)\n{\n\tconst idToken = user === undefined ? undefined : await user.getIdToken();\n\n\tconst headers = getHeaders(idToken);\n\tconst response = await axios.get(`${process.env.REACT_APP_REST_URL}/api/my/favorites/`, headers);\n\treturn response.data;\n}\n\nexport default useFavorites;\n","import axios from 'axios';\nimport {useQuery} from '@tanstack/react-query';\n\nexport type TagOption = { label: string; value: string };\n\nconst useTagOptions = (): { tagValuesSet: Set; tagOptions: TagOption[]; tagValues: string[]; tagOptionsSet: Set } =>\n{\n\tasync function fetchTagValues(): Promise\n\t{\n\t\tconst tags = await axios.get(`${process.env.REACT_APP_REST_URL}/api/tags/`);\n\t\treturn tags.data.map((tag: { category: any; name: any; }) => `${tag.category}/${tag.name}`);\n\t}\n\n\tconst result: any = useQuery(['tags'], fetchTagValues, {placeholderData: []});\n\tconst tagValues: string[] = result.data || [];\n\tconst tagValuesSet: Set = new Set(tagValues);\n\tconst tagOptions: TagOption[] = tagValues.map((value) => ({label: value, value}));\n\tconst tagOptionsSet: Set = new Set(tagOptions);\n\treturn {tagValues, tagValuesSet, tagOptions, tagOptionsSet};\n};\n\nexport default useTagOptions;\n","import {forbidExtraProps} from 'airbnb-prop-types';\nimport PropTypes from 'prop-types';\n\nconst ImgurImageSummaryProjection = PropTypes.shape(forbidExtraProps({\n\timgurId : PropTypes.string.isRequired,\n\timgurType: PropTypes.string.isRequired,\n}));\n\nexport default ImgurImageSummaryProjection;\n","import {forbidExtraProps} from 'airbnb-prop-types';\nimport PropTypes from 'prop-types';\nimport ImgurImageSummaryProjection from './ImgurImageSummaryProjection';\n\nconst BlueprintSummaryProjection = PropTypes.shape(forbidExtraProps({\n\tkey : PropTypes.string.isRequired,\n\ttitle : PropTypes.string.isRequired,\n\tnumberOfUpvotes: PropTypes.number,\n\tvoteSummary: PropTypes.shape(forbidExtraProps({\n\t\tnumberOfUpvotes: PropTypes.number,\n\t})),\n\timgurImage : ImgurImageSummaryProjection.isRequired,\n\tsystemFrom : PropTypes.string,\n}));\n\nexport default BlueprintSummaryProjection;\n"],"names":["blueprintSummary","key","title","imgurImage","voteSummary","numberOfUpvotes","queryClient","useQueryClient","undefined","console","log","clear","useFavorites","isSuccess","data","authoredResult","useAuthored","mine","includes","favorite","tooltip","imageUrl","buildImageUrl","imgurId","imgurType","NoAvailableImage","mineStyle","favoriteStyle","className","style","width","backgroundColor","to","Img","variant","src","referrerPolicy","icon","faHeart","placement","overlay","props","isLoading","faCog","size","fixedWidth","spin","useState","page","setPage","useQueryParam","StringParam","titleFilter","withDefault","ArrayParam","selectedTags","fetchBlueprintSummaries","url","process","params","URLSearchParams","append","forEach","tag","axios","get","result","useQuery","keepPreviousData","placeholderData","_data","_metadata","pagination","numberOfPages","pageNumber","isError","isPreviousData","faExclamationTriangle","blueprintSummaries","fluid","map","md","span","offset","type","onClick","disabled","faAngleDoubleLeft","old","Math","max","faAngleLeft","faAngleRight","useGetLatest","obj","ref","React","current","setTitle","localTitleFilter","setLocalTitleFilter","debouncedSetTitleFilter","defaultFn","defaultWait","debounceRef","getDefaultFn","getDefaultWait","args","promise","Promise","resolve","reject","timeout","clearTimeout","setTimeout","useAsyncDebounce","value","placeholder","onChange","event","preventDefault","searchString","target","onKeyDown","select","Text","faSearch","animatedComponents","makeAnimated","useTagOptions","tagValuesSet","tagOptions","setTags","selectedTagOptions","filter","each","has","label","options","selectedTagValues","selectedTag","isMulti","closeMenuOnSelect","components","Spinner","suffix","typeParts","split","idToken","headers","Authorization","getAuthored","user","getIdToken","getHeaders","response","useContext","UserContext","queryEnabled","uid","queryKey","enabled","staleTime","getFavorites","tags","category","name","tagValues","Set","tagOptionsSet","PropTypes","forbidExtraProps","isRequired","ImgurImageSummaryProjection","systemFrom"],"sourceRoot":""}