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AEkE,cAAe,MACxB/I,EAAAA,cAAC8B,EAAc,CACbM,GAAG,eACHM,WAAS,EACTR,eACsB,YAApBqD,EAAK6C,WAA2BlG,EAAiBiE,OAMzDgC,KAAmC,OAAbhI,GACtBH,EAAAA,cAAA,OAAKC,UAAU,4BACbD,EAAAA,cAAA,OAAKC,UAAU,oBACbD,EAAAA,cAACgI,EAAAA,GAAM,CACLF,WAAW,iBACXI,KAAM,IAAM9C,EAAK6E,mBAAmBxE,MAAM,GAAG7E,MAC7CsJ,WAAS,OAMnBlK,EAAAA,cAACmK,EAAAA,EAAY,CACXC,WAAS,EACTlB,QACe,OAAb/I,EAAoB4F,EAAiBmD,QAAUtD,EAAesD,QAEhEmB,MACe,OAAblK,EAAoB4F,EAAiBsE,MAAQzE,EAAeyE,MAE9DC,QACe,OAAbnK,EAAoB4F,EAAiBuE,QAAU1E,EAAe0E,UAG3D,C","sources":["webpack://gatsby-starter-default/./src/components/carousel/ImageCaption.js","webpack://gatsby-starter-default/./src/components/CTA/GetStarted.js","webpack://gatsby-starter-default/./src/components/carousel/SingleSlide.js","webpack://gatsby-starter-default/./src/components/carousel/ReviewCarousel.js","webpack://gatsby-starter-default/./src/templates/singleReview.js"],"sourcesContent":["import React from \"react\"\nimport classNames from \"classnames\"\nimport PropTypes from \"prop-types\"\nimport { getMonthYearFromStrings } from \"../../utils/utils\"\nimport { Text } from \"../Core\"\n\nfunction ImageCaption(props) {\n let nameClasses = classNames(\"image-caption staff fixed-facewall-name\", {\n last: !props.procedure && !props.monthYear\n })\n let procedureClasses = classNames(\n \"image-caption staff fixed-facewall-procedure\",\n {\n last: !props.monthYear\n }\n )\n let timeClasses = classNames(\"image-caption staff fixed-facewall-time\", {\n last: true\n })\n return (\n
\n {props.reviewerName && (\n
\n {props.language === \"es\" ? \"Conoce a\" : \"Meet\"} {props.reviewerName}\n
\n )}\n {props.language === \"es\"\n ? props.procedureEs &&\n !props.hideProcedureNames && (\n \n )\n : props.procedure &&\n !props.hideProcedureNames && (\n \n )}\n {props.monthYear && (\n
\n {getMonthYearFromStrings(props.monthYear.year, props.monthYear.month)}\n
\n )}\n
\n )\n}\n\nImageCaption.propTypes = {\n reviewerName: PropTypes.string,\n language: PropTypes.string,\n procedure: PropTypes.string,\n procedureEs: PropTypes.string,\n hideProcedureNames: PropTypes.bool,\n monthYear: PropTypes.object\n}\n\nexport default ImageCaption\n","import PropTypes from \"prop-types\"\nimport classNames from \"classnames\"\nimport React from \"react\"\nimport CTA from \"./CTA\"\nimport { Text } from \"../Core\"\nimport { Button, ButtonGroupMap } from \"../Button\"\n\nclass GetStarted extends React.Component {\n constructor(props) {\n super(props)\n }\n\n render() {\n let buttonColumns\n // One or multiple buttons\n if (this.props.buttons) {\n buttonColumns = (\n
\n \n
\n )\n } else {\n buttonColumns = (\n
\n \n
\n )\n }\n\n // CSS classes\n let headingClasses = classNames(\"column\", {\n \"has-text-centered\": this.props.centerHeading\n })\n let textClasses = classNames(\"column\", {\n \"has-text-centered\": this.props.centerText\n })\n\n return (\n \n {this.props.subheading &&

{this.props.subheading}

}\n

{this.props.heading}

\n \n }\n textColumns={\n \n }\n buttonColumns={buttonColumns}\n />\n )\n }\n}\n\nGetStarted.propTypes = {\n className: PropTypes.string,\n centerHeading: PropTypes.bool,\n heading: PropTypes.string,\n subheading: PropTypes.string,\n centerText: PropTypes.bool,\n paragraph: PropTypes.element,\n buttons: PropTypes.array,\n buttonUrl: PropTypes.string,\n buttonText: PropTypes.string,\n sideColumnIs: PropTypes.number,\n headingSideColumnIs: PropTypes.number\n}\n\nexport default GetStarted\n","import React from \"react\"\n\nimport { Transformation } from \"cloudinary-react\"\nimport { Link } from \"gatsby\"\nimport { Image } from \"../Core\"\n\nimport ImageCaption from \"./ImageCaption\"\n\nfunction SingleSlide(props) {\n let title = props.title\n if (title.charAt(0) !== \"/\") title = \"/\" + title\n\n return (\n \n \n \n \n \n \n )\n}\n\nexport default SingleSlide\n","import React, { Component } from \"react\"\nimport Slider from \"react-slick\"\nimport PropTypes from \"prop-types\"\nimport { shuffleArray } from \"../../utils/utils\"\n\nimport { SamplePrevArrow, SampleNextArrow } from \"./ChevronArrows\"\n\nimport SingleSlide from \"./SingleSlide\"\n\nclass ReviewCarousel extends Component {\n constructor(props) {\n super(props)\n this.state = {\n relatedReviews: props.relatedReviews,\n slideID: props.id\n }\n }\n\n // Shuffle on mount, shuffling in render causes multiple shuffles\n componentDidMount() {\n if (this.props.noShuffle === false) {\n let relatedReviews = this.state.relatedReviews\n shuffleArray(relatedReviews)\n this.setState({\n relatedReviews: relatedReviews\n })\n }\n }\n\n render() {\n const settings = {\n className: \"desktop-slider-375x375\",\n accessibility: true,\n adaptiveHeight: true,\n infinite: this.props.relatedReviews.length <= 3 ? false : true,\n centerPadding: \"0px\",\n slidesToShow: 5,\n swipeToSlide: true,\n focusOnSelect: false,\n draggable: false,\n rows: 1,\n speed: 500,\n nextArrow: ,\n prevArrow: ,\n initialSlide: 0,\n responsive: [\n {\n breakpoint: 1125,\n settings: {\n slidesToShow: this.props.relatedReviews.length < 3 ? 2 : 3,\n infinite: true,\n className:\n this.props.relatedReviews.length < 3\n ? \"desktop-slider-375x375 slide-count-2\"\n : \"desktop-slider-375x375\"\n }\n },\n {\n breakpoint: 750,\n settings: {\n slidesToShow: 2,\n infinite: true\n }\n },\n {\n breakpoint: 375,\n settings: {\n slidesToShow: 1,\n infinite: true\n }\n }\n ]\n }\n\n const sliderStyle = {\n width: \"auto\",\n height: \"auto\",\n margin: \"0px auto\"\n }\n\n const sliderCopy = {\n carouselName: \"Hear From Our Patients\",\n carouselTime: \"December 2019\",\n carouselLanguage: \"ENG\",\n carouselTypeTextTitle: \"Patients\"\n }\n\n var slides = this.state.relatedReviews.map(review => {\n return (\n \n )\n })\n\n return (\n
\n {this.state.relatedReviews.length > 0 && (\n \n {slides}\n \n )}\n
\n )\n }\n}\n\nReviewCarousel.propTypes = {\n relatedReviews: PropTypes.array\n}\n\nexport default ReviewCarousel\n","import React from \"react\"\nimport classNames from \"classnames\"\nimport { graphql } from \"gatsby\"\nimport TheaterVideo from \"@components/Theater/TheaterVideo\"\nimport Layout from \"../components/layout\"\nimport GetStarted from \"../components/CTA/GetStarted\"\nimport { CallToAction } from \"../components/CTA\"\nimport ReviewCarousel from \"../components/carousel/ReviewCarousel\"\nimport SEO from \"../components/seo\"\nimport { sortReviewsByDate, getPostObj, pluralizeName } from \"../utils/utils\"\nimport { Image, Text } from \"../components/Core\"\nimport { Button, ButtonGroup } from \"../components/Button\"\n\nconst SingleReview = ({ data, pageContext, location }) => {\n const post = data.singleReview.nodes[0]\n const { metaTitle, metaDescription, language } = pageContext\n\n const getStartedData = data.allTemplateSettingsJson.nodes[0].getStarted\n const getStartedDataEs =\n data.allTemplateSettingsJson.nodes[0].getStartedSpanish\n\n const reviewTitle = post.title\n const reviewPool = data.relatedReviews.nodes\n let referrerPool = data.relatedReviewsProviders.nodes\n\n let relatedReviews = getRelatedReviews(post, reviewPool)\n\n relatedReviews = sortReviewsByDate(relatedReviews)\n referrerPool = sortReviewsByDate(referrerPool)\n\n function getRelatedReviews(singleReview, allReviews) {\n const thisReviewProcedures = getReviewProceduresNames(singleReview)\n\n // Get an array of the patient's procedures\n function getReviewProceduresNames(review) {\n const thisReviewProcedures = []\n\n for (let i = 0; i < review.proceduresDone.length; i++) {\n thisReviewProcedures.push(\n review.proceduresDone[i].procedureDone.procedureName\n )\n }\n return thisReviewProcedures\n }\n\n const reviewPoolWithProceduresNamesArray =\n addProceduresDoneArrayTo(allReviews)\n\n // Add array of procedures done names to all review objects\n function addProceduresDoneArrayTo(reviews) {\n const reviewPoolWithProceduresNamesArray = []\n // Make an array of just the names of the procedures done\n for (let i = 0; i < reviews.length; i++) {\n const relatedProceduresDone = []\n for (let j = 0; j < reviews[i].proceduresDone.length; j++) {\n relatedProceduresDone.push(\n reviews[i].proceduresDone[j].procedureDone.procedureName\n )\n }\n const patientInfo = reviews[i]\n patientInfo.allProceduresJustNames = relatedProceduresDone\n reviewPoolWithProceduresNamesArray.push(patientInfo)\n }\n return reviewPoolWithProceduresNamesArray\n }\n\n const relatedReviews = getReviewsWithAnyMatchingProcedures(\n thisReviewProcedures,\n reviewPoolWithProceduresNamesArray\n )\n\n // Compare patients to see if any of their procedures done match, if so, add to array and return it\n function getReviewsWithAnyMatchingProcedures(\n thisReviewProcedureNamesArray,\n allReviewsWithProcedureNamesArray\n ) {\n const relatedReviews = []\n // Compares the single review's procedures done names with all the reviews' procedures done names, then pushes matches into another array\n let found = false\n\n for (let i = 0; i < allReviewsWithProcedureNamesArray.length; i++) {\n if (reviewTitle !== allReviewsWithProcedureNamesArray[i].title) {\n found = false\n\n found = thisReviewProcedureNamesArray.some(r =>\n allReviewsWithProcedureNamesArray[\n i\n ].allProceduresJustNames.includes(r)\n )\n if (found === true) {\n relatedReviews.push(allReviewsWithProcedureNamesArray[i])\n continue\n }\n }\n }\n return relatedReviews\n }\n\n return relatedReviews\n }\n\n const relatedProcedures = post.proceduresDone.map((procedure, i) => {\n let buttonText = procedure.procedureDone.procedureName\n\n // Full-Arch\n // Impacted Teeth\n // Cleft Treatment\n // DO\n // Jaw Surgery\n // TMJ Disorders\n // Extractions\n // Wisdom Teeth\n\n if (procedure.procedureDone.procedureShortName) {\n buttonText = procedure.procedureDone.procedureShortName\n }\n\n return (\n \n )\n })\n\n const showOtherReviews = function () {\n if (post.reviewType === \"Patient\") {\n return hasOtherPatientReviews()\n }\n if (post.reviewType === \"Provider\") {\n return hasOtherReferrerReviews()\n }\n }\n\n var hasOtherPatientReviews = function () {\n if (relatedReviews.length > 0) {\n return true\n }\n return false\n }\n var hasOtherReferrerReviews = function () {\n if (referrerPool.length > 0) {\n return true\n }\n return false\n }\n\n const reviewCarouselHeading = classNames({\n \"review-carousel-heading\": true\n })\n\n let backUrl = \"\"\n\n if (data.allUniquePagesJson?.nodes[0]?.title) {\n backUrl = `/${data.allUniquePagesJson.nodes[0].title}`\n }\n\n const esCTAClass =\n language === \"es\" ? \"patient-review-cta-es\" : \"patient-review-cta\"\n\n return (\n \n \n \n \n
\n
\n
\n

{post.heading}

\n
\n
\n {language === \"es\" ? \"Revisión de Video\" : \"Video Review\"}\n
\n\n \n {post.language.toUpperCase()}\n \n
\n \n \n
\n
\n
\n\n {post.youtube && (\n
\n
\n
\n \n \n \n
\n
\n
\n )}\n\n {language !== \"es\" && (\n
\n
\n
\n

{pluralizeName(post.reviewerName)} Story

\n {language === \"en\" && (\n

\n \"\"\n

\n )}\n {post.reviewType !== \"Provider\" &&\n post.proceduresDone.length > 0 && (\n
\n
\n Learn More About\n
\n \n {relatedProcedures}\n \n
\n )}\n
\n
\n
\n )}\n\n {showOtherReviews() && language !== \"es\" && (\n <>\n
\n
\n
\n

\n Watch Other Reviews Like {pluralizeName(post.reviewerName)}\n

\n
\n
\n \n \n
\n \n )}\n {!showOtherReviews() && language !== \"es\" && (\n
\n
\n \n
\n
\n )}\n \n \n \n )\n}\n\nexport default SingleReview\n\nexport const query = graphql`\n query ($id: String!, $language: String!, $title: String!) {\n procedureQueryPage: allUniquePagesJson(\n filter: { template: { eq: \"procedures\" }, language: { eq: $language } }\n ) {\n nodes {\n title\n }\n }\n allUniquePagesJson(\n filter: {\n template: { eq: \"patient-stories\" }\n language: { eq: $language }\n }\n ) {\n nodes {\n title\n }\n }\n allTemplateSettingsJson(filter: { templateType: { eq: \"single-review\" } }) {\n nodes {\n getStarted {\n blurb\n buttonText\n heading\n href\n subheading\n buttons {\n button {\n appearance\n destination\n href\n buttonText\n }\n }\n }\n getStartedSpanish {\n blurb\n buttonText\n heading\n href\n subheading\n buttons {\n button {\n appearance\n destination\n href\n buttonText\n }\n }\n }\n }\n }\n singleReview: allReviewsJson(filter: { id: { eq: $id } }) {\n nodes {\n id\n title\n metaTitle\n metaDescription\n mainProcedureDone\n proceduresDone {\n procedureDone {\n procedureName\n procedureUrl\n otherProcedure\n procedureShortName\n }\n }\n heading\n quote\n language\n reviewType\n reviewerName\n subheading\n thumbnailPublicId\n mainPhotoPublicId\n youtube\n }\n }\n relatedReviews: allReviewsJson(\n filter: {\n reviewType: { eq: \"Patient\" }\n language: { eq: \"en\" }\n title: { ne: $title }\n }\n ) {\n nodes {\n thumbnailPublicId\n title\n reviewerName\n reviewType\n mainProcedureDone\n otherProcedureName\n monthYear {\n month\n year\n }\n proceduresDone {\n procedureDone {\n procedureName\n procedureUrl\n }\n }\n }\n }\n relatedReviewsProviders: allReviewsJson(\n filter: {\n reviewType: { eq: \"Provider\" }\n language: { eq: \"en\" }\n title: { ne: $title }\n }\n ) {\n nodes {\n thumbnailPublicId\n title\n reviewerName\n reviewType\n otherProcedureName\n mainProcedureDone\n monthYear {\n month\n year\n }\n proceduresDone {\n procedureDone {\n procedureName\n procedureUrl\n }\n }\n }\n }\n }\n`\n"],"names":["props","nameClasses","classNames","last","procedure","monthYear","procedureClasses","timeClasses","React","className","reviewerName","language","procedureEs","hideProcedureNames","Text","as","text","getMonthYearFromStrings","year","month","title","charAt","Link","to","toLowerCase","Image","useAR","publicId","thumbnailPublicId","responsiveUseBreakpoints","Transformation","quality","fetchFormat","crop","height","ImageCaption","otherProcedureName","_Component","ReviewCarousel","_this","call","state","relatedReviews","slideID","id","_inheritsLoose","_proto","prototype","componentDidMount","this","noShuffle","shuffleArray","setState","render","settings","accessibility","adaptiveHeight","infinite","length","centerPadding","slidesToShow","swipeToSlide","focusOnSelect","draggable","rows","speed","nextArrow","SampleNextArrow","targetID","prevArrow","SamplePrevArrow","initialSlide","responsive","breakpoint","slides","map","review","SingleSlide","key","mainProcedureDone","mainProcedureDoneEs","reviewLanguage","Slider","Object","assign","style","width","margin","Component","_ref","_data$allUniquePagesJ","_data$allUniquePagesJ2","data","pageContext","location","post","singleReview","nodes","metaTitle","metaDescription","getStartedData","allTemplateSettingsJson","getStarted","getStartedDataEs","getStartedSpanish","reviewTitle","reviewPool","referrerPool","relatedReviewsProviders","allReviews","thisReviewProcedures","i","proceduresDone","push","procedureDone","procedureName","getReviewProceduresNames","reviewPoolWithProceduresNamesArray","reviews","relatedProceduresDone","j","patientInfo","allProceduresJustNames","addProceduresDoneArrayTo","thisReviewProcedureNamesArray","allReviewsWithProcedureNamesArray","found","some","r","includes","getReviewsWithAnyMatchingProcedures","getRelatedReviews","sortReviewsByDate","relatedProcedures","buttonText","procedureShortName","Button","procedureUrl","href","showOtherReviews","reviewType","hasOtherPatientReviews","hasOtherReferrerReviews","reviewCarouselHeading","backUrl","allUniquePagesJson","Layout","SEO","description","pathname","lang","paddingBottom","goBack","marginTop","heading","toUpperCase","subheading","TheaterVideo","videoUrl","youtube","playing","hasWatchVideo","buttonClass","mainPhotoPublicId","pluralizeName","quote","ButtonGroup","alignLeft","noReverse","procedureQueryPage","contained","CallToAction","colorBack","blurb","buttons"],"sourceRoot":""}