{"version":3,"file":"review-CrKz6VBp.js","sources":["../../../app/javascript/components/common/dropdown_pill/DropdownPill.tsx","../../../app/javascript/components/ProCheckbox.jsx","../../../app/javascript/components/review_tiles/filters/RatingFilter.tsx","../../../app/javascript/components/review_tiles/filters/ReviewFilters.tsx","../../../app/javascript/components/fields/InvisibleRadioButton.tsx","../../../app/javascript/components/fields/withRadioGroup.tsx","../../../app/javascript/components/review_tiles/filters/SharedWithSupplierFilter.tsx","../../../app/javascript/components/review_tiles/filters/SupplierReplyFilter.tsx","../../../app/javascript/components/review_tiles/filters/ReviewFiltersContainer.tsx","../../../app/javascript/components/common/callout/Callout.tsx","../../../app/javascript/components/common/button/GetMoreReviewsButton.tsx","../../../app/javascript/components/common/callout/ReviewVisibilityCallout.tsx","../../../app/javascript/components/supplier_show/prop_shapes/star_ratings.ts","../../../app/javascript/components/supplier_show/prop_shapes/review.ts"],"sourcesContent":["import React from 'react'\n\n// Parent components can use this interface to ensure they have the properties needed to sync multiple dropdowns\nexport interface DropdownPillSyncProps {\n isExpanded: boolean\n id: string\n onClick: (id: string | null) => void\n}\n\ninterface DropdownPillBaseProps {\n labelText: string\n children?: React.ReactNode\n canClickOnContent?: boolean\n style?: string\n}\n\ntype DropdownPillProps = DropdownPillBaseProps & Partial\n\nconst toExpandIcon = \nconst toCollapseIcon = \n\n/**\n * Button that expands or hides its children\n * @param id Identify the element to parent handlers\n * @param labelText Label for the Button\n * @param children The elements to show or hide\n * @param onClick Passes the component id as an argument\n * @param canClickOnContent Flag to indicate whether clicking on child content should trigger click handler\n * @param isExpanded Flag to inedicate whether content should be displayed or not\n * @param style Class to apply to container\n */\nexport const DropdownPill: React.FC = ({\n id = null,\n labelText,\n children,\n onClick = () => {},\n canClickOnContent = true,\n isExpanded = false,\n style\n}) => {\n const icon = isExpanded ? toCollapseIcon : toExpandIcon\n\n const handleClick = (): void => {\n onClick(id)\n }\n\n const contentToggle = (): void => {\n if (canClickOnContent) {\n handleClick()\n }\n }\n\n const dropdownContent = isExpanded\n ?
{children}
\n :
{children}
\n\n return (\n
\n \n
\n {dropdownContent}\n
\n
\n )\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\nexport const ProCheckbox = ({ children, isChecked, setIsChecked, name }) => {\n const handleChange = () => {\n setIsChecked(!isChecked)\n }\n\n return (\n \n )\n}\n\nProCheckbox.propTypes = {\n isChecked: PropTypes.bool.isRequired,\n setIsChecked: PropTypes.func.isRequired,\n name: PropTypes.string.isRequired\n}\n","import React, { useState } from 'react'\nimport { DropdownPill, DropdownPillSyncProps } from 'components/common/dropdown_pill/DropdownPill'\nimport { ProCheckbox } from 'components/ProCheckbox'\n\nenum ReviewRating {\n Star5 = '5',\n Star4 = '4',\n Star3 = '3',\n Star2 = '2',\n Star1 = '1'\n}\n\nexport type RatingSelections = ReviewRating[]\n\ninterface RatingFilterBaseProps {\n onChange: (selections: RatingSelections) => void\n}\n\ntype RatingFilterProps = RatingFilterBaseProps & Partial\n\nexport const AllReviewRatingSelectors = Object.values(ReviewRating)\n\nconst sortReviewSelections = (ratings: RatingSelections): RatingSelections => ratings.sort(\n (a, b) => (AllReviewRatingSelectors.indexOf(a) - AllReviewRatingSelectors.indexOf(b))\n)\n\nexport const RatingFilter: React.FC = (props) => {\n const { onChange } = props\n const [isAllSelected, setIsAllSelected] = useState(true)\n const [selections, setSelections] = useState(AllReviewRatingSelectors)\n\n const syncProps: DropdownPillSyncProps = {\n id: props.id ?? 'none',\n isExpanded: props.isExpanded ?? false,\n onClick: props.onClick ?? (() => { console.error('Dropdown onClick handler not set') })\n }\n\n const handleChange = (selections: RatingSelections): void => {\n const sortedSelections = sortReviewSelections(selections)\n setSelections(sortedSelections)\n onChange(sortedSelections)\n }\n\n const toggleAllChecked = (): void => {\n const wasAllSelected = isAllSelected\n const updatedSelection = wasAllSelected ? [] : AllReviewRatingSelectors\n setIsAllSelected(!wasAllSelected)\n handleChange(updatedSelection)\n }\n\n const updateSelection = (selectedItem: ReviewRating) => () => {\n setIsAllSelected(false)\n const updatedSelections = selections.includes(selectedItem)\n // remove item from array\n ? selections.filter(i => i !== selectedItem)\n // add item to array\n : [selectedItem, ...selections]\n handleChange(updatedSelections)\n }\n\n const rating5 = ReviewRating.Star5\n const rating4 = ReviewRating.Star4\n const rating3 = ReviewRating.Star3\n const rating2 = ReviewRating.Star2\n const rating1 = ReviewRating.Star1\n\n const ratingsFilterLabel = (): string => {\n if (isAllSelected || selections.length === 0) { return 'Rating' }\n if (selections.length === AllReviewRatingSelectors.length) { return 'All Ratings' }\n if (selections.length === 1) {\n if (selections[0] === ReviewRating.Star1) {\n return '1 Star'\n } else {\n return `${selections[0]} Stars`\n }\n }\n const [lastValue, ...rest] = selections\n const commaSeparated = rest.reverse().join(',')\n return `${commaSeparated} & ${lastValue} Stars`\n }\n\n return (\n \n
\n
\n All Ratings\n 5 Stars\n 4 Stars\n 3 Stars\n 2 Stars\n 1 Star\n
\n
\n
\n )\n}\n","import React, { useState } from 'react'\nimport { DropdownPillSyncProps } from 'components/common/dropdown_pill/DropdownPill'\n\ninterface ReviewFiltersProps {\n dropdownFilters: React.ReactElement[]\n}\n\ntype IdState = string | null\n\nexport const ReviewFilters: React.FC = ({ dropdownFilters }) => {\n const [expandedFilterKey, setExpandedFilterKey] = useState(null)\n\n const handleShouldOpen = (id: IdState): void => {\n setExpandedFilterKey(id)\n }\n\n const handleShouldClose = (_id: IdState): void => {\n setExpandedFilterKey(null)\n }\n\n // Inject handlers and id into review filters.\n // Note that if the review filter is not a Dropdown component,\n // then it must pass the injected props down to the dropdown component\n const reviewFilters = dropdownFilters?.map((filter, index) => {\n const { id } = filter?.props\n const filterId = id ?? `${index}`\n const isExpanded = expandedFilterKey === filterId\n const onClick = isExpanded ? handleShouldClose : handleShouldOpen\n const syncProps: DropdownPillSyncProps = {\n id: filterId,\n isExpanded,\n onClick\n }\n return React.cloneElement(filter, { ...syncProps })\n })\n\n return (\n
\n {reviewFilters}\n
\n )\n}\n","import React from 'react'\n\nexport interface InvisibleRadioButtonProps {\n label: string\n optionValue: string\n selectedValue: string\n groupName?: string\n}\n\n/**\n * Example with two radio buttons (in the same group)\n * const selectedOption = 'option-2'\n * \n * \n * @param label User visible label\n * @param optionValue Option value to pass when this item is selected\n * @param selectedValue The currently selected value (to indicate whether the button is active or not)\n * @param groupName The name of the group this radio button belongs to\n * @constructor\n */\nexport const InvisibleRadioButton: React.FC = (\n { label, optionValue, selectedValue, groupName }\n) => {\n const group = groupName ?? 'invisible-radio-group'\n const isActive = optionValue === selectedValue\n\n const itemClass = isActive ? 'item active' : 'item'\n\n return (\n \n )\n}\n","import React from 'react'\nimport { InvisibleRadioButton, InvisibleRadioButtonProps } from 'components/fields/InvisibleRadioButton'\n\nconst withRadioGroup = (groupName: string) => function InvisibleRadioButtonWithGroupName (props: InvisibleRadioButtonProps) {\n return \n}\n\nexport default withRadioGroup\n","import React, { useContext, useState } from 'react'\nimport { AuthContext, verifiedAgencyUser } from 'components/common/auth/AuthContext'\nimport { DropdownPill, DropdownPillSyncProps } from 'components/common/dropdown_pill/DropdownPill'\nimport withRadioGroup from 'components/fields/withRadioGroup'\n\nconst SharedWithSupplierSelectionMap = {\n all: 'Visibility',\n shared: 'Shared with Supplier',\n notShared: 'Not Shared with Supplier'\n} as const\nexport type SharedWithSupplierSelectionMapKey = keyof typeof SharedWithSupplierSelectionMap\n\ninterface SharedWithSupplierFilterBaseProps {\n onChange: (selection: SharedWithSupplierSelectionMapKey) => void\n}\n\ntype SharedWithSupplierFilterProps = SharedWithSupplierFilterBaseProps & Partial\n\nconst ShareFilterItem = withRadioGroup('share')\n\nexport const SharedWithSupplierFilter: React.FC = ({ onChange, ...dropdownProps }) => {\n const [selection, setSelection] = useState('all')\n\n const label = SharedWithSupplierSelectionMap[selection]\n\n const authContext = useContext(AuthContext)\n const isAgencyUser = verifiedAgencyUser(authContext)\n\n const handleChange = (e: React.ChangeEvent): void => {\n const selection = (e.target.value in SharedWithSupplierSelectionMap) ? e.target.value as SharedWithSupplierSelectionMapKey : 'all'\n setSelection(selection)\n onChange(selection)\n }\n\n const syncProps: DropdownPillSyncProps = {\n id: dropdownProps.id ?? 'none',\n isExpanded: dropdownProps.isExpanded ?? false,\n onClick: dropdownProps.onClick ?? (() => { console.error('Dropdown onClick handler not set') })\n }\n\n return (\n <>\n {isAgencyUser &&\n \n
\n \n \n \n
\n
}\n \n )\n}\n","import React, { useState } from 'react'\nimport { DropdownPill, DropdownPillSyncProps } from 'components/common/dropdown_pill/DropdownPill'\nimport withRadioGroup from 'components/fields/withRadioGroup'\n\nconst ReplySelectionMap = {\n all: 'Replies',\n withReplies: 'With Replies',\n withoutReplies: 'Without Replies'\n} as const\nexport type ReplySelectionMapKey = keyof typeof ReplySelectionMap\n\ninterface SupplierReplyFilterBaseProps {\n onChange: (selection: ReplySelectionMapKey) => void\n}\n\ntype SupplierReplyFilterProps = SupplierReplyFilterBaseProps & Partial\n\nconst ReplyFilterItem = withRadioGroup('reply')\n\nexport const SupplierReplyFilter: React.FC = ({ onChange, ...dropdownProps }) => {\n const [selection, setSelection] = useState('all')\n\n const label = ReplySelectionMap[selection]\n\n const handleChange = (e: React.ChangeEvent): void => {\n const selection = (e.target.value in ReplySelectionMap) ? e.target.value as ReplySelectionMapKey : 'all'\n setSelection(selection)\n onChange(selection)\n }\n\n const syncProps: DropdownPillSyncProps = {\n id: dropdownProps.id ?? 'none',\n isExpanded: dropdownProps.isExpanded ?? false,\n onClick: dropdownProps.onClick ?? (() => { console.error('Dropdown onClick handler not set') })\n }\n\n return (\n \n
\n \n \n \n
\n
\n )\n}\n","import React, { useEffect, useState, useContext } from 'react'\nimport PropTypes from 'prop-types'\n\nimport {\n RatingFilter, AllReviewRatingSelectors, type RatingSelections,\n ReviewFilters,\n SharedWithSupplierFilter,\n SupplierReplyFilter, type ReplySelectionMapKey, SharedWithSupplierSelectionMapKey\n} from 'components/review_tiles/filters'\nimport { AuthContext, verifiedAgencyUser, AuthState } from 'components/common/auth/AuthContext'\n\nconst ReplyFilterMap = {\n all: {},\n withReplies: { replied_to: true },\n withoutReplies: { replied_to: false }\n} as const\ntype ReplyFilterMapKey = keyof typeof ReplyFilterMap\ntype ReplyFilterMapValue = typeof ReplyFilterMap[ReplyFilterMapKey]\n\nconst SharedWithSupplierFilterMap = {\n all: {},\n shared: { shared: true },\n notShared: { shared: false }\n} as const\ntype SharedWithSupplierFilterMapKey = keyof typeof SharedWithSupplierFilterMap\ntype SharedWithSupplierFilterMapValue = typeof SharedWithSupplierFilterMap[SharedWithSupplierFilterMapKey]\n\ninterface RatingSelectionParam {\n stars: RatingSelections\n}\n\nexport type EmptyReviewFilterParams = Record\n\nexport interface ReviewFilterContainerParams {\n reply_to?: boolean\n shared?: boolean\n stars?: RatingSelections\n}\n\ninterface ReviewFiltersContainerProps {\n handleFiltersQuery: (query: ReviewFilterContainerParams) => void\n}\n\nconst ratingSelectionsToParam = (selections: RatingSelections): RatingSelectionParam => {\n return { stars: selections }\n}\n\nexport const ReviewFiltersContainer: React.FC = ({ handleFiltersQuery }) => {\n const [replyParams, setReplyParams] = useState(ReplyFilterMap.all)\n const [sharedParams, setSharedParams] = useState(SharedWithSupplierFilterMap.all)\n const [ratings, setRatings] = useState(AllReviewRatingSelectors)\n\n const handleReplyFilterChange = (selection: ReplySelectionMapKey): void => {\n const replySelection = (selection in ReplyFilterMap) ? selection : 'all'\n setReplyParams(ReplyFilterMap[replySelection])\n }\n\n const handleSharedWithSupplierFilterChange = (selection: SharedWithSupplierSelectionMapKey): void => {\n const shareSelection = (selection in SharedWithSupplierFilterMap) ? selection : 'all'\n setSharedParams(SharedWithSupplierFilterMap[shareSelection])\n }\n\n const handleRatingFilterChange = (selections: RatingSelections): void => {\n setRatings(selections.length === 0 ? AllReviewRatingSelectors : selections)\n }\n\n const authContext = useContext(AuthContext)\n\n const agencyUserSharedWithSupplierFilter = verifiedAgencyUser(authContext)\n ? ()\n : null\n\n const dropdownFilters = [\n ,\n agencyUserSharedWithSupplierFilter,\n \n ].filter(Boolean) as React.ReactElement[]\n\n const reviewFilterParams = (): ReviewFilterContainerParams => {\n return { ...replyParams, ...sharedParams, ...ratingSelectionsToParam(ratings) }\n }\n\n useEffect(() => {\n handleFiltersQuery(reviewFilterParams())\n }, [replyParams, sharedParams, ratings])\n\n return (\n
\n \n
\n )\n}\n\nReviewFiltersContainer.propTypes = {\n handleFiltersQuery: PropTypes.func.isRequired\n}\n","import React from 'react'\n\ninterface CalloutProps {\n callout?: string\n}\n\nexport const Callout: React.FC = (props) => {\n const calloutTextPresent = props.callout !== null && props.callout !== ''\n\n const calloutText = (): string => {\n if (calloutTextPresent) {\n return props.callout as string\n } else {\n return 'NOT PROVIDED'\n }\n }\n\n const calloutClasses = (): string => {\n if (calloutTextPresent) {\n return 'color-pro-steel-grey-600 font-bold'\n } else {\n return 'color-pro-steel-grey-500'\n }\n }\n\n return (\n
\n {calloutText()}\n
\n )\n}\n","import React from 'react'\nimport { businessInfoReviewCollectionPath } from 'components/routes/path'\n\ninterface GetMoreReviewsButtonProps {\n slug: string\n}\n\nexport const GetMoreReviewsButton: React.FC = ({ slug }) => {\n const buttonText: string = 'Get More Reviews'\n\n return (\n \n \n {buttonText}\n \n \n )\n}\n","import React, { useContext } from 'react'\nimport { AuthContext, AuthState, isSupplierOwner } from 'components/common/auth/AuthContext'\nimport { GetMoreReviewsButton } from 'components/common/button/GetMoreReviewsButton'\n\ninterface ReviewVisibilityCalloutProps {\n proSupplier: boolean\n slug: string\n}\n\nexport const ReviewVisibilityCallout: React.FC = ({ proSupplier, slug }) => {\n const context: AuthState = useContext(AuthContext)\n\n const tooltipContent: string = `\n
\n Where are the reviews?\n
\n
\n
\n An individual review appears on your view of your supplier profile when the author explicitly chooses to make \n their review visible to you. This option creates a space where buyers can feel comfortable sharing their honest experiences\n with each other, and consider this as a channel to share praise and actionable feedback with you. For more on why \n we do this, check out The Procurated Promise.\n
\n `\n\n return (\n <>\n
\n \n Where are the reviews? \n \n {isSupplierOwner(context) && }\n
\n \n )\n}\n\nReviewVisibilityCallout.defaultProps = {\n proSupplier: false\n}\n","import PropTypes from 'prop-types'\nimport { SingleStarRating } from 'components/common/rating/types'\n\nexport default PropTypes.shape({\n overall_rating: PropTypes.number.isRequired,\n price_rating: PropTypes.number.isRequired,\n quality_rating: PropTypes.number.isRequired,\n service_rating: PropTypes.number.isRequired,\n timeliness_rating: PropTypes.number.isRequired\n})\n\nexport interface StarRatings {\n overall_rating: SingleStarRating\n price_rating: SingleStarRating\n quality_rating: SingleStarRating\n service_rating: SingleStarRating\n timeliness_rating: SingleStarRating\n}\n","import PropTypes from 'prop-types'\nimport StarRatingsShape from './star_ratings'\nimport type { StarRatings } from './star_ratings'\n\ninterface Author {\n contribution_count: number\n name: string\n organization?: string\n thumbnail: string\n}\n\ninterface ExternalId {\n source: string\n external_id: string\n}\n\nexport interface ReviewReply {\n id: number\n text: string\n updatedAt?: Date\n}\n\ntype ReviewStatus =\n | 'archived'\n | 'draft'\n | 'published'\n | 'quarantined'\n | 'submitted'\n | 'unknown_author'\n | 'unpublished'\n\ninterface SupplierExternalId {\n external_id: string\n source: string\n}\n\nexport interface Review {\n author: Author\n auto_published: boolean\n body: string\n can_direct_message: boolean\n can_edit: boolean\n contract?: string\n contract_vehicle?: string\n external_ids: ExternalId[]\n id: number\n net_promoter: number\n overall_rating: number\n price_rating: number\n quality_rating: number\n review_date: string\n review_reply?: ReviewReply\n service_rating: number\n share_with_supplier: boolean\n source: string\n star_ratings: StarRatings\n supplier_external_ids: SupplierExternalId[]\n supplier_id?: number\n supplier_logo_url?: string\n supplier_name?: string\n supplier_slug?: string\n status: ReviewStatus\n timeliness_rating: number\n title: string\n tracking?: string\n}\n\nconst authorShape = PropTypes.shape({\n contribution_count: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n organization: PropTypes.string,\n thumbnail: PropTypes.string.isRequired\n})\n\nconst supplierExternalIdsShape = PropTypes.shape({\n external_id: PropTypes.string.isRequired,\n source: PropTypes.string.isRequired\n})\n\nexport default PropTypes.shape({\n id: PropTypes.number.isRequired,\n title: PropTypes.string.isRequired,\n body: PropTypes.string.isRequired,\n author: authorShape.isRequired,\n auto_published: PropTypes.bool.isRequired,\n can_direct_message: PropTypes.bool.isRequired,\n can_edit: PropTypes.bool.isRequired,\n contract: PropTypes.string,\n contract_vehicle: PropTypes.string,\n net_promoter: PropTypes.number.isRequired,\n overall_rating: PropTypes.number.isRequired,\n price_rating: PropTypes.number.isRequired,\n quality_rating: PropTypes.number.isRequired,\n review_date: PropTypes.string.isRequired,\n service_rating: PropTypes.number.isRequired,\n share_with_supplier: PropTypes.bool.isRequired,\n source: PropTypes.string.isRequired,\n star_ratings: StarRatingsShape.isRequired,\n supplier_external_ids: PropTypes.arrayOf(supplierExternalIdsShape.isRequired),\n supplier_id: PropTypes.number,\n supplier_name: PropTypes.string,\n supplier_slug: PropTypes.string,\n supplier_logo_url: PropTypes.string,\n timeliness_rating: PropTypes.number.isRequired,\n tracking: PropTypes.string,\n external_ids: PropTypes.array.isRequired\n})\n"],"names":["toExpandIcon","jsx","toCollapseIcon","DropdownPill","id","labelText","children","onClick","canClickOnContent","isExpanded","style","icon","handleClick","contentToggle","dropdownContent","jsxs","ProCheckbox","isChecked","setIsChecked","name","handleChange","PropTypes","ReviewRating","AllReviewRatingSelectors","sortReviewSelections","ratings","a","b","RatingFilter","props","onChange","isAllSelected","setIsAllSelected","useState","selections","setSelections","syncProps","sortedSelections","toggleAllChecked","wasAllSelected","updatedSelection","updateSelection","selectedItem","updatedSelections","i","rating5","rating4","rating3","rating2","rating1","ratingsFilterLabel","lastValue","rest","ReviewFilters","dropdownFilters","expandedFilterKey","setExpandedFilterKey","handleShouldOpen","handleShouldClose","_id","reviewFilters","filter","index","filterId","React","InvisibleRadioButton","label","optionValue","selectedValue","groupName","group","isActive","itemClass","withRadioGroup","SharedWithSupplierSelectionMap","ShareFilterItem","SharedWithSupplierFilter","dropdownProps","selection","setSelection","authContext","useContext","AuthContext","isAgencyUser","verifiedAgencyUser","e","Fragment","ReplySelectionMap","ReplyFilterItem","SupplierReplyFilter","ReplyFilterMap","SharedWithSupplierFilterMap","ratingSelectionsToParam","ReviewFiltersContainer","handleFiltersQuery","replyParams","setReplyParams","sharedParams","setSharedParams","setRatings","handleReplyFilterChange","replySelection","handleSharedWithSupplierFilterChange","shareSelection","handleRatingFilterChange","agencyUserSharedWithSupplierFilter","reviewFilterParams","useEffect","Callout","calloutTextPresent","calloutText","calloutClasses","GetMoreReviewsButton","slug","businessInfoReviewCollectionPath","ReviewVisibilityCallout","proSupplier","context","isSupplierOwner","StarRatingsShape","authorShape","supplierExternalIdsShape","ReviewShape"],"mappings":"uMAkBA,MAAMA,EAAeC,EAAAA,IAAC,IAAE,CAAA,UAAU,0BAA2B,CAAA,EACvDC,EAAiBD,EAAAA,IAAC,IAAE,CAAA,UAAU,wBAAyB,CAAA,EAYhDE,EAA4C,CAAC,CACxD,GAAAC,EAAK,KACL,UAAAC,EACA,SAAAC,EACA,QAAAC,EAAU,IAAM,CAAC,EACjB,kBAAAC,EAAoB,GACpB,WAAAC,EAAa,GACb,MAAAC,CACF,IAAM,CACE,MAAAC,EAAOF,EAAaP,EAAiBF,EAErCY,EAAc,IAAY,CAC9BL,EAAQH,CAAE,CACZ,EAEMS,EAAgB,IAAY,CAC5BL,GACUI,EAAA,CAEhB,EAEME,EAAkBL,EACnBR,EAAAA,IAAA,MAAA,CAAI,QAASY,EAAgB,SAAAP,CAAS,CAAA,EACtCL,EAAA,IAAA,MAAA,CAAI,UAAU,SAAU,SAAAK,EAAS,EAGpC,OAAAS,EAAA,KAAC,MAAI,CAAA,UAAWL,EACd,SAAA,CAAAK,EAAA,KAAC,SAAO,CAAA,UAAU,uBAAuB,QAASH,EAAc,SAAA,CAAAP,EAAWM,CAAA,EAAK,EAC/EV,EAAA,IAAA,MAAA,CAAI,UAAU,yBACZ,SACHa,CAAA,CAAA,CAAA,EACF,CAEJ,EC7DaE,EAAc,CAAC,CAAE,SAAAV,EAAU,UAAAW,EAAW,aAAA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