{"version":3,"file":"components-ui-builder-column-with-images-022ea862e1d1b405ac81.js","mappings":"8KAQKA,EAAS,SAATA,GAAS,OAATA,EAAS,gBAATA,EAAS,YAATA,EAAS,cAATA,CAAS,EAATA,GAAS,IAiCd,SAASC,EAAgBC,GACvB,IAAQC,EAA8BD,EAA9BC,UAAWC,EAAmBF,EAAnBE,MAAOC,EAAYH,EAAZG,QAC1B,OACEC,EAAAA,cAAA,OACEH,UAAWA,EACXC,MAAKG,OAAAC,OAAA,GACAJ,EAAM,CACTK,QAAS,OACTC,eAAgB,SAChBC,OAAQ,EACRC,KAAM,mBACNC,IAAK,kBACLC,UAAW,gCAEbT,QAASA,GAGf,CAEA,SAASU,EAAgBb,GACvB,IAAQC,EAA8BD,EAA9BC,UAAWC,EAAmBF,EAAnBE,MAAOC,EAAYH,EAAZG,QAC1B,OACEC,EAAAA,cAAA,OACEH,UAAWA,EACXC,MAAKG,OAAAC,OAAA,GACAJ,EAAM,CACTK,QAAS,OACTC,eAAgB,SAChBC,OAAQ,EACRK,MAAO,mBACPH,IAAK,kBACLC,UAAW,gCAEbT,QAASA,GAGf,CAEA,IAAMY,EAAkB,CACtBC,MAAM,EACNC,UAAU,EACVC,MAAO,IACPC,aAAc,EACdC,eAAgB,EAChBC,UAAWjB,EAAAA,cAACS,EAAe,MAC3BS,UAAWlB,EAAAA,cAACL,EAAe,OAGvBwB,EAAiB,CACrBP,MAAM,EACNC,UAAU,EACVC,MAAO,IACPC,aAAc,EACdC,eAAgB,EAChBC,UAAWjB,EAAAA,cAACS,EAAe,MAC3BS,UAAWlB,EAAAA,cAACL,EAAe,OAyd7B,UAtdyB,SAAHyB,GAYR,IAXZC,EAAeD,EAAfC,gBACAC,EAAKF,EAALE,MACAC,EAA6BH,EAA7BG,8BACAC,EAAwBJ,EAAxBI,yBACAC,EAAaL,EAAbK,cACAC,EAAaN,EAAbM,cAEAC,GADuBP,EAAvBQ,wBACoBR,EAApBO,sBAAoBE,EAAAT,EACpBU,qBAAAA,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AEC,OAAQd,EAAKkB,iBACxCzF,MAAO,CAAEuF,MAAO7D,MAGnBE,IAAiB2C,aAAI,EAAJA,EAAMmB,mBACtBxF,EAAAA,cAAA,WACEA,EAAAA,cAAA,OAAKH,UAAU,eAAeC,MAAO,CAAE2F,aAAc,qBACrDzF,EAAAA,cAAA,OAAKH,UAAU,UACbG,EAAAA,cAACyE,EAAAA,EAAQ,CACPC,IAAK/C,EACLiD,IAAK9C,EACLR,MAAO,CAAC,KACRxB,MAAO,CACLqE,MAAO,QACPW,OAAQ,OACRC,UAAW,OACXC,SAAU,aAiCtBhF,EAAAA,cAAA,OAAKH,UAAU,oBACbG,EAAAA,cAAA,KACEH,UAAS,sDAAwDoD,EAC/DoB,EAAKiB,0BAEPJ,wBAAyB,CAAEC,OAAQd,EAAKqB,sBACxC5F,MAAO,CAAEuF,MAAO7D,OAIlB,OAOhBxB,EAAAA,cAAA,OAAKH,UAAU,6CAA6CC,MAAO,CAAEuB,gBAAAA,IACnErB,EAAAA,cAAC6F,EAAAA,EAAU,CACTC,YAAarE,EAAcqE,YAC3BC,UAAWtE,EAAcsE,UACzBC,WAAYvE,EAAcuE,WAC1BC,mBAAoBxE,EAAcwE,mBAClCC,gBAAiBzE,EAAcyE,gBAC/BC,QAAQ,EACRC,UACE,0HAOd,C","sources":["webpack://www-differentdog-com/./src/components/ui-builder/column-with-images/index.tsx"],"sourcesContent":["import { Builder } from '@builder.io/react'\nimport React, { useEffect } from 'react'\nimport Slider from 'react-slick'\nimport LinkButton, { LinkButtonProp } from '../common/button'\nimport './column-with-images.css'\nimport CdnImage from 'components/util/CdnImage'\n// import CloudinaryImage from 'components/util/CloudinaryImage'\n\nenum Alignment {\n Center = 'center',\n Left = 'left',\n Right = 'right'\n}\ninterface Step {\n // cloudinaryImage: any\n builderImage: any\n imageAltText: string\n descriptionTitleText: string\n descriptionTitleTextAlignment: Alignment\n descriptionText: string\n descriptionTextExtra: string\n descriptionTextAlignment: Alignment\n stepBackgroundColor: string\n optimalImgEnable: boolean\n linkLabel: string\n link: string\n}\ninterface Props {\n backgroundColor: string\n steps: Step[]\n stepDescriptionTitleTextColor: string\n stepDescriptionTextColor: string\n buttonOneProp: LinkButtonProp\n optionalImage: boolean\n cloudinaryOptionalImage: any\n builderOptionalImage: any\n optionalImageAltText: string\n imageProperty: string\n imageOrientation: 'landscape' | 'portrait'\n}\n\nfunction SamplePrevArrow(props: any) {\n const { className, style, onClick } = props\n return (\n \n )\n}\n\nfunction SampleNextArrow(props: any) {\n const { className, style, onClick } = props\n return (\n \n )\n}\n\nconst settingsDesktop = {\n dots: false,\n infinite: false,\n speed: 500,\n slidesToShow: 4,\n slidesToScroll: 1,\n nextArrow: ,\n prevArrow: \n}\n\nconst settingsMobile = {\n dots: false,\n infinite: false,\n speed: 500,\n slidesToShow: 2,\n slidesToScroll: 1,\n nextArrow: ,\n prevArrow: \n}\n\nconst ColumnWithImages = ({\n backgroundColor,\n steps,\n stepDescriptionTitleTextColor,\n stepDescriptionTextColor,\n buttonOneProp,\n optionalImage,\n cloudinaryOptionalImage,\n builderOptionalImage,\n optionalImageAltText = '',\n imageProperty,\n imageOrientation\n}: Props) => {\n useEffect(() => {\n const handleScroll = () => {\n const hash = window.location.hash\n if (hash) {\n const decodedHash = decodeURIComponent(hash.slice(1))\n const targetElement = document.getElementById(decodedHash)\n if (targetElement) {\n targetElement.scrollIntoView({ behavior: 'smooth', block: 'center' })\n }\n }\n }\n\n handleScroll()\n window.addEventListener('load', handleScroll)\n\n return () => {\n window.removeEventListener('load', handleScroll)\n }\n }, [])\n\n const getAlignmentClass = (textAlignment: any) => {\n if (textAlignment === Alignment.Right) {\n return 'text-right'\n }\n if (textAlignment === Alignment.Center) {\n return 'text-center'\n }\n return 'text-left'\n }\n\n function getImgOrientation() {\n if (imageOrientation === 'landscape') {\n return 'h-44'\n }\n return 'h-60'\n }\n\n const handleInputClick = (e: any, linkLabel: string) => {\n try {\n e.preventDefault()\n\n const hash = linkLabel.toLowerCase().replace(/\\s+/g, '-')\n\n if (window.location.href.includes('/treats')) {\n // when on the treats page\n const targetElement = document.getElementById(hash)\n if (targetElement) {\n window.history.pushState(null, '', `#${hash}`)\n targetElement.scrollIntoView({ behavior: 'smooth', block: 'center' })\n } else {\n console.log(`handleInputClick: Element with id \"${hash}\" not found`)\n }\n } else {\n // redirect to treats page with hash\n window.location.href = `/treats#${hash}`\n }\n } catch (error) {\n console.error('Error in handleInputClick:', error)\n window.location.href = '/treats'\n }\n }\n\n return (\n
\n
\n {/* ================= Mobile Slider start */}\n
\n \n {steps?.map((step: Step, i: number) => (\n
\n \n
\n \n {/* {step.builderImage ? (\n \n ) : (\n \n )} */}\n
\n\n
\n
\n {\n handleInputClick(e, step?.linkLabel)\n }}\n >\n

\n \n

\n
\n {optionalImage && step?.optimalImgEnable && (\n
\n
\n
\n \n {/* {builderOptionalImage ? (\n \n ) : (\n \n )} */}\n
\n
\n )}\n
\n
\n

\n
\n
\n
\n ))}\n \n
\n {/* ================= Mobile Slider End*/}\n {steps.length < 5 ? (\n <>\n {/* =================Start Desktop Grid*/}\n
\n
\n {steps?.map((step: Step, i: number) => (\n \n
\n \n {/* {step.builderImage ? (\n \n ) : (\n \n )} */}\n
\n\n
\n
\n {\n handleInputClick(e, step?.linkLabel)\n }}\n >\n

\n \n

\n

\n
\n {optionalImage && step?.optimalImgEnable && (\n
\n
\n
\n \n {/* {builderOptionalImage ? (\n \n ) : (\n \n )} */}\n
\n
\n )}\n
\n
\n ))}\n
\n
\n {/* ====================End Desktop Grid*/}\n \n ) : (\n <>\n {/* ============ Desktop slider for >=5 card Start =============*/}\n
\n \n {steps?.map((step: Step, i: number) => (\n
\n \n
\n \n {/* {step.builderImage ? (\n \n ) : (\n \n )} */}\n
\n
\n
\n {\n handleInputClick(e, step?.linkLabel)\n }}\n >\n

\n \n

\n
\n {optionalImage && step?.optimalImgEnable && (\n
\n
\n
\n \n {/* {builderOptionalImage ? (\n \n ) : (\n \n )} */}\n
\n
\n )}\n
\n\n
\n

\n
\n
\n
\n ))}\n \n \n {/* =============== Desktop slider for >=5 card End =============== */}\n \n )}\n
\n \n
\n \n \n )\n}\n\nexport default ColumnWithImages\n"],"names":["Alignment","SamplePrevArrow","props","className","style","onClick","React","Object","assign","display","justifyContent","zIndex","left","top","transform","SampleNextArrow","right","settingsDesktop","dots","infinite","speed","slidesToShow","slidesToScroll","nextArrow","prevArrow","settingsMobile","_ref","backgroundColor","steps","stepDescriptionTitleTextColor","stepDescriptionTextColor","buttonOneProp","optionalImage","builderOptionalImage","cloudinaryOptionalImage","_ref$optionalImageAlt","optionalImageAltText","imageProperty","imageOrientation","useEffect","handleScroll","hash","window","location","decodedHash","decodeURIComponent","slice","targetElement","document","getElementById","scrollIntoView","behavior","block","addEventListener","removeEventListener","getAlignmentClass","textAlignment","Right","Center","getImgOrientation","handleInputClick","e","linkLabel","preventDefault","toLowerCase","replace","href","includes","history","pushState","error","console","Slider","width","map","step","i","key","stepBackgroundColor","CdnImage","url","builderImage","alt","imageAltText","height","maxHeight","maxWidth","link","dangerouslySetInnerHTML","__html","descriptionTitleText","color","descriptionTextAlignment","descriptionText","optimalImgEnable","borderBottom","descriptionTextExtra","length","descriptionTitleTextAlignment","LinkButton","buttonColor","buttonUrl","buttonText","loggedInButtonText","buttonTextColor","isLink","classList"],"sourceRoot":""}