{"version":3,"file":"Rating-Cx_6f7N9.js","sources":["../../../app/javascript/components/supplier_shared/supplier_icon/PlaceholderIcon.tsx","../../../app/javascript/components/supplier_shared/supplier_icon/SupplierIcon.tsx","../../../app/javascript/components/common/rating/classifyRating.ts","../../../node_modules/lodash-es/_createRound.js","../../../node_modules/lodash-es/round.js","../../../app/javascript/components/common/rating/ratingUtils.ts","../../../app/javascript/components/common/rating/Rating.tsx","../../../app/javascript/components/common/rating/NpsRating.tsx","../../../app/javascript/components/common/rating/RatingNa.tsx","../../../app/javascript/components/common/rating/ReviewCount.tsx","../../../app/javascript/components/Consts.tsx","../../../app/javascript/components/review_ratings/StarRating.tsx","../../../app/javascript/components/review_ratings/OptionalRatingStars.tsx","../../../app/javascript/components/review_ratings/IndividualRating.tsx","../../../app/javascript/components/review_ratings/OverallRating.tsx","../../../app/javascript/components/review_ratings/Rating.tsx"],"sourcesContent":["import React from 'react'\nimport PropTypes from 'prop-types'\n\nexport interface PlaceholderIconProps {\n id: string | number // prefer string, but number is provided for backwards compatibility\n name: string\n}\n\nfunction colorCssClass (id: string | number): string {\n const idStr = id.toString()\n const numericSupplierId = parseInt(idStr, 10)\n // If id was non-numeric, use the length of the string to achieve a bit of deterministic randomness\n const validNumericSupplierId = isNaN(numericSupplierId) ? idStr.length : numericSupplierId\n const cssClasses = ['', 'green', 'orange']\n const index = validNumericSupplierId % cssClasses.length\n return cssClasses[index]\n}\n\nexport default function PlaceholderIcon ({ id, name }: PlaceholderIconProps): React.ReactElement {\n const colorClass = colorCssClass(id)\n const missingIconName = name.length > 0 ? name.trim()[0].toUpperCase() : '?'\n\n return (\n