{"version":3,"sources":["components/ErrorPage/style.module.scss","components/common/SkeletonProvider/styles.module.scss","zoid-definitions/mockXprops.ts","utils/gtmHelper.ts","configs/environments.ts","utils/logger.ts","utils/urlResolver.ts","services/ApplicationConfig.ts","enums/ExternalEvent.ts","api/index.ts","enums/gtm/GTMEventAction.ts","components/LayoutProvider/index.tsx","icons/ErrorIcon/index.tsx","components/ErrorPage/index.tsx","components/ErrorProvider/index.tsx","components/GlobalConfig/ErrorBoundary/index.tsx","components/GlobalConfig/index.tsx","components/common/PageSkeleton/index.tsx","components/common/SkeletonProvider/index.tsx","hooks/useCarVariantColors.ts","api/carVariants.ts","components/common/ColorChooser/ColorOption/index.tsx","enums/gtm/GTMEventCategory.ts","components/common/ColorChooser/index.tsx","utils/gtmEvents.ts","pages/CarColorViewer/index.tsx","App.tsx","index.tsx","icons/ErrorIcon/styles.module.scss","components/common/ColorChooser/ColorOption/styles.module.scss","components/LayoutProvider/styles.module.scss","components/common/PageSkeleton/styles.module.scss","components/common/ColorChooser/styles.module.scss"],"names":["module","exports","window","xprops","variantCode","isWidgetMode","environment","Event","APP_INSIGHTS_INSTRUMENTATION_KEY","process","GTM_ID","appInsights","trackValue","value","properties","severityLevel","route","location","href","SeverityLevel","Critical","Error","trackException","error","trackTrace","message","console","Warning","warn","info","init","ApplicationInsights","config","instrumentationKey","loadAppInsights","trackError","trackCriticalError","trackInfo","Information","trackWarning","URLResolver","searchParams","URLSearchParams","search","parseUrlSearchParams","name","get","_variantCode","_backgroundColor","_urlResolver","UrlResolver","_resolveValue","this","ExternalEvent","defaultDimension","utmSource","utmMedium","utmCampaign","trackingClickId","trackingId","ApplicationConfig","originalLocation","applicationName","currentDimension","emitGTMEvent","dataLayer","TagManager","initialize","gtmId","updateDimension","dimension","event","CustomDimensionsUpdate","emitEvent","category","action","label","Default","eventLabel","eventCategory","eventAction","GTMEventAction","LayoutProvider","children","isDesktop","useDeviceType","useEffect","document","documentElement","classList","add","styles","widgetLayout","autoCalculateSpacers","backgroundColor","style","setProperty","observer","ResizeObserver","payload","msgType","ChildHeightChanged","height","body","clientHeight","parent","postMessage","observe","disconnect","className","root","ErrorIcon","width","viewBox","fill","xmlns","gray40","d","gray20","white","ErrorPage","container","ErrorProvider","hasError","ErrorBoundary","state","logger","catcher","props","Component","cloudinaryConfig","cloudName","handleError","src","GlobalConfig","PageSkeleton","rest","wrapper","classNames","skeletonBase","speed","rx","y","SkeletonProvider","showLoader","wrap","apiClient","axios","create","baseURL","useCarVariantColors","useState","areLoading","setAreLoading","list","setList","setError","getCarVariantColors","a","code","data","useMemo","ColorOption","color","isSelected","onSelect","handleClick","useCallback","colorOption","selected","onClick","OptimizedImage","variant","colorIcon","publicId","iconToken","GTMEventCategory","ColorChooser","colors","activeColor","setActiveColor","handleSelect","imageToken","gtmHelper","ColorIcon","Click","mainImage","optionsContainer","map","CarColorViewer","App","render","getElementById"],"mappings":"yHACAA,EAAOC,QAAU,CAAC,UAAY,2B,oBCA9BD,EAAOC,QAAU,CAAC,KAAO,uB,kFCDpBC,OAAOC,SACVD,OAAOC,OAAS,CACdC,YAAa,aACbC,cAAc,EACdC,YAAa,gB,ICKZC,E,yBCTQC,EAAmCC,qDAGnCC,EAASD,2BC2EP,M,iDAxELE,YAA0C,K,KAE1CC,WAAa,SAACC,EAAYC,EAA0CC,GAC1E,GAAI,EAAKJ,YAGP,OAFAG,EAAWE,MAAQd,OAAOe,SAASC,KAE/BH,IAAkBI,IAAcC,UAAYL,IAAkBI,IAAcE,WAC9E,EAAKV,YAAYW,eAAe,CAC9BR,aACAC,gBACAQ,MAAOV,SAMX,EAAKF,YAAYa,WAAW,CAC1BV,aACAC,gBACAU,QAASZ,IAMb,OAAQE,GACN,KAAKI,IAAcC,SACnB,KAAKD,IAAcE,MACjBK,QAAQH,MAAMV,GACd,MAEF,KAAKM,IAAcQ,QACjBD,QAAQE,KAAKf,GACb,MAEF,QACEa,QAAQG,KAAKhB,K,KAKZiB,KAAO,WACR,EAAKnB,cAIT,EAAK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cAAC,GAAD,CAEEE,SAAUgB,EACVjB,WAAYD,EAAMY,YAAcI,EAAYJ,UAC5CZ,MAAOA,GAHFA,EAAMmB,qBEfRO,GAZQ,WACrB,MAAuCvC,KAA/BI,EAAR,EAAQA,KAAMF,EAAd,EAAcA,WAAY7B,EAA1B,EAA0BA,SAE1B,OACE,cAAC,EAAD,CAAkBqB,WAAYQ,EAA9B,SACE,cAAC,EAAD,CAAe7B,SAAUA,EAAzB,SACE,cAAC,GAAD,CAAcuD,OAAQxB,SCFfoC,GANH,kBACV,cAAC,EAAD,UACE,cAAC,GAAD,O,OCIJhE,EAAOhG,OACPyJ,EAAUzJ,OAEViK,iBACE,cAAC,aAAD,UACE,cAAC,GAAD,MAEFxG,SAASyG,eAAe,U,mBCjB1BhM,EAAOC,QAAU,CAAC,OAAS,uBAAuB,OAAS,uBAAuB,MAAQ,wB,mBCA1FD,EAAOC,QAAU,CAAC,YAAc,4BAA4B,SAAW,yBAAyB,UAAY,4B,mBCA5GD,EAAOC,QAAU,CAAC,KAAO,qBAAqB,aAAe,+B,mBCA7DD,EAAOC,QAAU,CAAC,QAAU,wBAAwB,aAAe,+B,mBCAnED,EAAOC,QAAU,CAAC,iBAAmB,iCAAiC,UAAY,6B","file":"main.b7b60d350bac18976649.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"style_container__1X7FX\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrap\":\"styles_wrap__3G64y\"};","if (!window.xprops) {\n window.xprops = {\n variantCode: 'P1SYRNPK03',\n isWidgetMode: false,\n environment: 'development',\n };\n}\n\nexport default {};\n","import TagManager from 'react-gtm-module';\n\nimport { GTM_ID } from '^configs/environments';\nimport IGTMEvent from '^types/gtm/IGTMEvent';\nimport GTMEventCategory from '^enums/gtm/GTMEventCategory';\nimport IGTMDimension from '^types/gtm/IGTMDimension';\nimport TGTMDataLayer from '^types/gtm/TGTMDataLayer';\nimport ApplicationConfig from '^services/ApplicationConfig';\n\nenum Event {\n Default = 'GAEvent',\n CustomDimensionsUpdate = 'CustomDimensionsUpdate',\n}\n\nconst APPLICATION_NAME = 'CarColorViewer';\nconst defaultDimension: IGTMDimension = {\n utmSource: window.xprops.utmSource,\n utmMedium: window.xprops.utmMedium,\n utmCampaign: window.xprops.utmCampaign,\n trackingClickId: window.xprops.trackingClickId,\n trackingId: window.xprops.trackingId,\n variantCode: ApplicationConfig.variantCode,\n originalLocation: window.location.href,\n applicationName: APPLICATION_NAME,\n};\n\nclass GTMHelper {\n private currentDimension: IGTMDimension = defaultDimension;\n\n private emitGTMEvent = (dataLayer: Partial): void => {\n TagManager.dataLayer({\n dataLayer,\n });\n };\n\n public init = (): void => {\n if (!GTM_ID) {\n return;\n }\n\n TagManager.initialize({\n gtmId: GTM_ID,\n });\n\n this.updateDimension(defaultDimension);\n };\n\n public updateDimension = (dimension: IGTMDimension): void => {\n this.currentDimension = {\n ...this.currentDimension,\n ...dimension,\n };\n\n this.emitGTMEvent({\n event: Event.CustomDimensionsUpdate,\n ...this.currentDimension,\n });\n };\n\n public emitEvent = (category: GTMEventCategory, action: string, label: string = ''): void => {\n const dataLayer: IGTMEvent = {\n event: Event.Default,\n eventLabel: label,\n eventCategory: category,\n eventAction: action,\n ...this.currentDimension,\n };\n\n this.emitGTMEvent(dataLayer);\n };\n}\n\nexport default new GTMHelper();\n","export const APP_INSIGHTS_INSTRUMENTATION_KEY = process.env.CAR_COLOR_VIEWER_APP_INSIGHTS_INSTRUMENTATION_KEY || '';\nexport const API = process.env.CAR_COLOR_VIEWER_API || '';\nexport const CLOUD_NAME = process.env.CAR_COLOR_VIEWER_CLOUD_NAME || '';\nexport const GTM_ID = process.env.CAR_COLOR_VIEWER_GTM_ID || '';\nexport const WIDGET_URL = process.env.CAR_COLOR_VIEWER_WIDGET_URL || '';\n","import { ApplicationInsights, SeverityLevel } from '@microsoft/applicationinsights-web';\n\nimport { APP_INSIGHTS_INSTRUMENTATION_KEY } from '^configs/environments';\nimport IAppInsightsCustomProperties from '^types/IAppInsightsCustomProperties';\n\nclass Logger {\n private appInsights: ApplicationInsights | null = null;\n\n private trackValue = (value: any, properties: IAppInsightsCustomProperties, severityLevel: SeverityLevel): void => {\n if (this.appInsights) {\n properties.route = window.location.href;\n\n if (severityLevel === SeverityLevel.Critical || severityLevel === SeverityLevel.Error) {\n this.appInsights.trackException({\n properties,\n severityLevel,\n error: value,\n });\n\n return;\n }\n\n this.appInsights.trackTrace({\n properties,\n severityLevel,\n message: value,\n });\n\n return;\n }\n\n switch (severityLevel) {\n case SeverityLevel.Critical:\n case SeverityLevel.Error:\n console.error(value);\n break;\n\n case SeverityLevel.Warning:\n console.warn(value);\n break;\n\n default:\n console.info(value);\n break;\n }\n };\n\n public init = (): void => {\n if (this.appInsights || !APP_INSIGHTS_INSTRUMENTATION_KEY) {\n return;\n }\n\n this.appInsights = new ApplicationInsights({\n config: {\n instrumentationKey: APP_INSIGHTS_INSTRUMENTATION_KEY,\n },\n });\n\n this.appInsights.loadAppInsights();\n };\n\n public trackError = (error: Error, properties: IAppInsightsCustomProperties): void => {\n this.trackValue(error, properties, SeverityLevel.Error);\n };\n\n public trackCriticalError = (error: Error, properties: IAppInsightsCustomProperties): void => {\n this.trackValue(error, properties, SeverityLevel.Critical);\n };\n\n public trackInfo = (message: string, properties: IAppInsightsCustomProperties): void => {\n this.trackValue(message, properties, SeverityLevel.Information);\n };\n\n public trackWarning = (message: string, properties: IAppInsightsCustomProperties): void => {\n this.trackValue(message, properties, SeverityLevel.Warning);\n };\n}\n\nexport default new Logger();\n","class URLResolver {\n private searchParams = new URLSearchParams(window.location.search);\n\n public parseUrlSearchParams = (name: string): ResultType => (\n this.searchParams.get(name) as unknown as ResultType\n );\n}\n\nexport default URLResolver;\n","import IApplicationConfig from '^types/IApplicationConfig';\nimport UrlResolver from '^utils/urlResolver';\n\nclass ApplicationConfig implements IApplicationConfig {\n private readonly _variantCode: string;\n private readonly _backgroundColor?: string;\n\n private _urlResolver = new UrlResolver();\n\n private _resolveValue = (name: keyof IApplicationConfig): string => {\n const value = window.xprops.isWidgetMode\n ? window.xprops[name]\n : this._urlResolver.parseUrlSearchParams(name);\n\n return value ?? '';\n };\n\n public get variantCode(): string {\n return this._variantCode;\n }\n public get backgroundColor(): string | undefined {\n return this._backgroundColor;\n }\n\n public constructor() {\n this._variantCode = this._resolveValue('variantCode');\n this._backgroundColor = this._resolveValue('backgroundColor');\n }\n}\n\nexport default new ApplicationConfig();\n","enum ExternalEvent {\n ChildHeightChanged = 'childHeightChanged',\n}\n\nexport default ExternalEvent;\n","import axios, { AxiosRequestConfig, AxiosInstance } from 'axios';\n\nimport { API as baseURL } from '^configs/environments';\n\nconst createClient = (config?: AxiosRequestConfig): AxiosInstance => axios.create({\n baseURL,\n ...config,\n});\n\nexport const apiClient = createClient();\n","enum GTMEventAction {\n Click = 'click',\n}\n\nexport default GTMEventAction;\n","import { useDeviceType } from '@interdan/public-ui';\nimport { ReactElement, ReactNode, useEffect } from 'react';\n\nimport ExternalEvent from '^enums/ExternalEvent';\nimport ApplicationConfig from '^services/ApplicationConfig';\nimport IChildHeightChangeEventPayload from '^types/externalEvents/IChildHeightChangeEventPayload';\n\nimport styles from './styles.module.scss';\n\nconst BACKGROUND_COLOR_CSS_VARIABLE_NAME = '--background-color';\nconst CHILD_HEIGHT_CHANGE_EVENT_TARGET_ORIGIN = '*';\n\nexport interface ILayoutProviderProps {\n children: ReactNode;\n}\n\nconst LayoutProvider = ({ children }: ILayoutProviderProps): ReactElement => {\n const { isDesktop } = useDeviceType();\n\n useEffect(\n (): (() => void) | void => {\n if (!window.xprops.isWidgetMode) {\n return;\n }\n\n document.documentElement.classList.add(styles.widgetLayout);\n\n if (isDesktop) {\n return;\n }\n\n if (typeof window.xprops.autoCalculateSpacers === 'function') {\n void window.xprops.autoCalculateSpacers();\n }\n },\n [isDesktop],\n );\n\n useEffect(\n (): (() => void) | void => {\n const backgroundColor = ApplicationConfig.backgroundColor;\n\n if (backgroundColor) {\n document.documentElement.style.setProperty(BACKGROUND_COLOR_CSS_VARIABLE_NAME, backgroundColor);\n }\n\n if (window.xprops.isWidgetMode) {\n return;\n }\n\n // Emit height change event in non-widget environment\n const observer = new ResizeObserver((): void => {\n const payload: IChildHeightChangeEventPayload = {\n msgType: ExternalEvent.ChildHeightChanged,\n height: document.body.clientHeight,\n };\n\n window.parent.postMessage(payload, CHILD_HEIGHT_CHANGE_EVENT_TARGET_ORIGIN);\n });\n\n observer.observe(document.body);\n\n return (): void => observer.disconnect();\n },\n [],\n );\n\n return (\n
\n {children}\n
\n );\n};\n\nexport default LayoutProvider;\n","import React, { ReactElement } from 'react';\n\nimport styles from './styles.module.scss';\n\nconst ErrorIcon = (): ReactElement => (\n \n \n\n \n\n \n \n);\n\nexport default ErrorIcon;\n","import React, { ReactElement } from 'react';\n\nimport ErrorIcon from '^icons/ErrorIcon';\n\nimport styles from './style.module.scss';\n\nconst ErrorPage = (): ReactElement => (\n
\n \n
\n);\n\nexport default ErrorPage;\n","import React, { ReactElement, ReactNode } from 'react';\n\nimport ErrorPage from '^components/ErrorPage';\n\ninterface IErrorProviderProps {\n hasError: boolean;\n children: ReactNode | ReactNode[];\n}\n\nconst ErrorProvider = ({ hasError, children }: IErrorProviderProps): ReactElement => hasError\n ? \n : (\n <>\n {children}\n \n );\n\nexport default ErrorProvider;\n","import React, { Component, ReactNode } from 'react';\n\nimport logger from '^utils/logger';\nimport ErrorProvider from '^components/ErrorProvider';\n\nexport interface IErrorBoundaryProps {\n children: ReactNode;\n}\n\ninterface IErrorBoundaryState {\n hasError: boolean;\n}\n\nclass ErrorBoundary extends Component {\n public state: IErrorBoundaryState = {\n hasError: false,\n };\n\n public static getDerivedStateFromError(): IErrorBoundaryState {\n return {\n hasError: true,\n };\n }\n\n public componentDidCatch(error: Error, info: Record): void {\n logger.trackCriticalError(error, {\n info,\n catcher: 'ErrorBoundary',\n });\n }\n\n public render(): ReactNode {\n const { children } = this.props;\n const { hasError } = this.state;\n\n return (\n \n {children}\n \n );\n }\n}\n\nexport default ErrorBoundary;\n","import { ReactElement, ReactNode } from 'react';\nimport { ICloudinaryConfig } from '@interdan/media-utils';\nimport { GlobalConfig as GlobalConfigBase } from '@interdan/public-ui';\n\nimport { CLOUD_NAME } from '^configs/environments';\nimport logger from '^utils/logger';\n\nimport LayoutProvider from '../LayoutProvider';\n\nimport ErrorBoundary from './ErrorBoundary';\n\nexport interface IGlobalConfigProps {\n children: ReactNode;\n}\n\nconst cloudinaryConfig: ICloudinaryConfig = {\n cloudName: CLOUD_NAME,\n handleError: ((src: string): void => {\n logger.trackError(new Error(`Failed load ${src}`), {\n catcher: 'cloudinary',\n });\n }),\n};\n\nconst GlobalConfig = ({ children }: IGlobalConfigProps): ReactElement => (\n \n \n \n {children}\n \n \n \n);\n\nexport default GlobalConfig;\n","import React, { ReactElement } from 'react';\nimport ContentLoader, { IContentLoaderProps } from 'react-content-loader';\nimport classNames from 'classnames';\n\nimport styles from './styles.module.scss';\n\nexport const DEFAULT_SKELETON_ANIMATION_SPEED = 0.75;\n\nconst PageSkeleton = ({ className, ...rest }: IContentLoaderProps): ReactElement => (\n
\n \n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n \n
\n);\n\nexport default PageSkeleton;\n","import React, { ReactElement, ReactNode } from 'react';\nimport classNames from 'classnames';\n\nimport PageSkeleton from '^components/common/PageSkeleton';\n\nimport styles from './styles.module.scss';\n\nexport interface ISkeletonProviderProps {\n className?: string;\n showLoader?: boolean;\n children: ReactNode;\n}\n\nconst SkeletonProvider = ({ showLoader = false, className, children }: ISkeletonProviderProps): ReactElement => (\n
\n {showLoader\n ? \n : (\n <>\n { children }\n \n )}\n
\n);\n\nexport default SkeletonProvider;\n","import { useEffect, useMemo, useState } from 'react';\n\nimport { requestCarVariantColors } from '^api/carVariants';\nimport ApplicationConfig from '^services/ApplicationConfig';\nimport ICarColor from '^types/ICarColor';\nimport logger from '^utils/logger';\n\ninterface IUseCarVariantColorsResponse {\n list: ICarColor[];\n hasError: boolean;\n areLoading: boolean;\n}\n\nconst useCarVariantColors = (): IUseCarVariantColorsResponse => {\n const [areLoading, setAreLoading] = useState(false);\n const [list, setList] = useState([]);\n const [hasError, setError] = useState(false);\n\n useEffect(\n (): void => {\n const getCarVariantColors = async (): Promise => {\n setAreLoading(true);\n\n try {\n const { data: { list } } = await requestCarVariantColors(ApplicationConfig.variantCode);\n setList(list);\n } catch (error) {\n logger.trackError(error as Error, {\n catcher: 'useCarVariantColors',\n });\n setError(true);\n } finally {\n setAreLoading(false);\n }\n };\n\n void getCarVariantColors();\n },\n [],\n );\n\n return useMemo(\n (): IUseCarVariantColorsResponse => ({\n list,\n areLoading,\n hasError,\n }),\n [areLoading, hasError, list],\n );\n};\n\nexport default useCarVariantColors;\n","import { AxiosResponse } from 'axios';\n\nimport IListResponse from '^types/IListResponse';\nimport ICarColor from '^types/ICarColor';\n\nimport { apiClient } from '.';\n\nexport const requestCarVariantColors = (code: string): Promise>> =>\n apiClient.get(`/Variants/${code}/Colors`);\n","import React, { ReactElement, useCallback } from 'react';\nimport { OptimizedImage } from '@interdan/media-utils';\nimport classNames from 'classnames';\n\nimport ICarColor from '^types/ICarColor';\n\nimport styles from './styles.module.scss';\n\ninterface IColorOptionProps {\n isSelected: boolean;\n color: ICarColor;\n onSelect: (color: ICarColor) => void;\n}\n\nconst ColorOption = ({ color, isSelected, onSelect }: IColorOptionProps): ReactElement => {\n const handleClick = useCallback(\n (): void => {\n onSelect(color);\n },\n [color, onSelect],\n );\n\n return (\n \n \n \n );\n};\n\nexport default ColorOption;\n","enum GTMEventCategory {\n ColorIcon = 'color-icon',\n}\n\nexport default GTMEventCategory;\n","import React, { ReactElement, useCallback, useState } from 'react';\nimport { OptimizedImage } from '@interdan/media-utils';\n\nimport ICarColor from '^types/ICarColor';\nimport ColorOption from '^components/common/ColorChooser/ColorOption';\nimport { emitChangeColorClick } from '^utils/gtmEvents';\n\nimport styles from './styles.module.scss';\n\ninterface IColorChooserProps {\n colors: ICarColor[];\n}\n\nconst ColorChooser = ({ colors }: IColorChooserProps): ReactElement => {\n const [activeColor, setActiveColor] = useState(colors[0]);\n\n const handleSelect = useCallback(\n (color: ICarColor): void => {\n setActiveColor(color);\n emitChangeColorClick(color.imageToken);\n },\n [setActiveColor],\n );\n\n return (\n
\n \n\n
\n {colors.map((color: ICarColor): ReactElement => (\n \n ))}\n
\n
\n );\n};\n\nexport default ColorChooser;\n","import GTMEventAction from '^enums/gtm/GTMEventAction';\nimport GTMEventCategory from '^enums/gtm/GTMEventCategory';\n\nimport gtmHelper from './gtmHelper';\n\nexport const emitChangeColorClick = (imageToken: string): void =>\n gtmHelper.emitEvent(GTMEventCategory.ColorIcon, GTMEventAction.Click, imageToken);\n","import React, { ReactElement } from 'react';\n\nimport SkeletonProvider from '^components/common/SkeletonProvider';\nimport useCarVariantColors from '^hooks/useCarVariantColors';\nimport ColorChooser from '^components/common/ColorChooser';\nimport ErrorProvider from '^components/ErrorProvider';\n\nconst CarColorViewer = (): ReactElement => {\n const { list, areLoading, hasError } = useCarVariantColors();\n\n return (\n \n \n \n \n \n );\n};\n\nexport default CarColorViewer;\n","import { ReactElement } from 'react';\n\nimport GlobalConfig from '^components/GlobalConfig';\nimport CarColorViewer from '^pages/CarColorViewer';\n\nconst App = (): ReactElement => (\n \n \n \n);\n\nexport default App;\n","import React, { StrictMode } from 'react';\nimport { render } from 'react-dom';\n\nimport '^zoid-definitions/mockXprops';\nimport logger from '^utils/logger';\nimport gtmHelper from '^utils/gtmHelper';\n\nimport App from './App';\n\nimport '^scss-global';\n\nlogger.init();\ngtmHelper.init();\n\nrender(\n \n \n ,\n document.getElementById('root'),\n);\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"gray20\":\"styles_gray20__1Rm1b\",\"gray40\":\"styles_gray40__3uXgb\",\"white\":\"styles_white__2WcQr\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"colorOption\":\"styles_colorOption__d44o0\",\"selected\":\"styles_selected__3KAEI\",\"colorIcon\":\"styles_colorIcon___6kCk\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"root\":\"styles_root__a_IBj\",\"widgetLayout\":\"styles_widgetLayout__2CcIt\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapper\":\"styles_wrapper__3zF0C\",\"skeletonBase\":\"styles_skeletonBase__1vxwF\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"optionsContainer\":\"styles_optionsContainer__NEDSr\",\"mainImage\":\"styles_mainImage__3xnjG\"};"],"sourceRoot":""}