{"version":3,"sources":["web/api/model/index.ts","web/api/model/searchTrainingsSorting.ts","web/api/model/suggestionFilter.ts","web/utils/axios.ts","web/api/index.ts","web/styles/theme.js","web/components/icons/ArrowIcon.tsx","web/components/icons/CheckboxIcon.tsx","web/components/icons/ChevronDoubleLeftIcon.tsx","web/components/icons/ChevronDownIcon.tsx","web/components/icons/ChevronLeftIcon.tsx","web/components/icons/IndeterminateIcon.tsx","web/components/icons/InfoIcon.tsx","web/components/icons/LocationIcon.tsx","web/components/icons/MailIcon.tsx","web/components/icons/OrderIcon.tsx","web/components/icons/PhoneIcon.tsx","web/components/icons/SearchIcon.tsx","web/components/icons/TagCloseIcon.tsx","web/components/icons/WebIcon.tsx","web/components/Loader.tsx","web/components/sections/Hero/background.svg","web/components/sections/Hero/styles.ts","web/components/sections/Hero/Hero.tsx","web/utils/index.tsx","web/components/sections/SearchBox/styles.ts","web/components/sections/SearchBox/SuggestionInput.tsx","web/components/sections/SearchBox/SuggestionInputSuggestions.tsx","web/components/sections/SearchBox/SearchBoxProviders.tsx","web/components/sections/SearchBox/SearchBoxRegions.tsx","web/components/sections/SearchBox/SearchBoxTrainings.tsx","web/components/sections/SearchBox/SearchBox.tsx","web/components/Pagination/styles.ts","web/components/Pagination/Pagination.tsx","web/components/sections/SearchResults/styles.ts","web/components/sections/SearchResults/TrainingDetails.tsx","web/components/sections/SearchResults/SearchResults.tsx","web/components/UnsupportedBrowserDisplay.tsx","web/App.tsx","web/locales/index.ts","web/index.tsx","index.tsx"],"names":["SearchTrainingsSorting","RANKING","TRAINING_ASC","TRAINING_DESC","PROVIDER_ASC","PROVIDER_DESC","DURATION_ASC","DURATION_DESC","SuggestionFilter","TRAINING","PROVIDER","AXIOS_INSTANCE","Axios","create","baseURL","customInstance","config","source","CancelToken","promise","cancelToken","token","then","data","cancel","useGetGlobalLocations","queryConfig","queryKey","query","useQuery","customAxios","url","method","useGetSuggestions","params","getGetSuggestionsQueryKey","getSuggestions","useGetTrainings","getGetTrainingsQueryKey","getTrainings","useGetTrainingDetail","trainingId","getGetTrainingDetailQueryKey","getTrainingDetail","enabled","colors","sizes","borderRadius","container","sm","md","lg","xl","fontFamilies","fontSizes","bp","medium","large","xlarge","mq","n","Object","keys","map","key","reduce","acc","name","size","customTheme","extendTheme","fonts","body","heading","styles","global","lineHeight","color","ArrowIcon","className","width","height","viewBox","id","data-name","transform","y1","fill","stroke","strokeLinecap","strokeLinejoin","strokeWidth","d","CheckboxIcon","xmlns","ChevronDoubleLeftIcon","ChevronDownIcon","ChevronLeftIcon","IndeterminateIcon","InfoIcon","LocationIcon","cx","cy","r","MailIcon","rx","x","y","OrderIcon","PhoneIcon","SearchIcon","TagCloseIcon","enableBackground","WebIcon","Loader","strokeDasharray","strokeDashoffset","heroBackgroundStyles","display","alignItems","paddingBottom","background","heroStyles","textAlign","h1","fontSize","fontWeight","b","content","margin","p","marginTop","Hero","t","useTranslation","style","css","maxW","centerContent","as","dangerouslySetInnerHTML","__html","INITIAL_PARAMS","pageNumber","sort","getSearchBoxQuery","regions","keyword","regionCode","split","e","find","f","Number","provider","isSelectedRegion","region","some","isCheckedAllRegions","values","suggestions","every","addRegion","deleteRegion","filter","suggestionInputStyles","position","left","right","maxWidth","backgroundColor","borderColor","boxShadow","outline","top","transition","zIndex","svg","flexDirection","minWidth","maxHeight","padding","border","overflowY","minHeight","marginBottom","flexShrink","marginLeft","paddingRight","order","borderWidth","searchBoxStyles","borderLeft","borderRight","opacity","appliedFiltersStyles","marginRight","SuggestionInput","ref","label","icon","children","isOpen","setIsOpen","rest","suggestionsListRef","useRef","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","inputProps","type","autoComplete","SuggestionInputSuggestions","setValue","closeSuggestions","i","match","onClick","preventDefault","SearchBoxProviders","value","useState","isFocus","setIsFocus","isLoading","fetchProviderSuggestions","refetch","length","placeholder","Boolean","maxLength","onFocus","onBlur","onInput","currentTarget","SearchBoxRegions","setValues","toggleValue","isCheckedAll","isIndeterminate","isIndeterminateRegions","join","readOnly","isChecked","onChange","isSelected","SearchBoxTrainings","fetchTrainingSuggestions","SearchBox","queryParams","setQueryParams","formState","setFormState","lastFormState","setLastFormState","openSuggestions","setOpenSuggestions","submit","reg","toString","getTrainingsParams","updateOpenSuggestions","indexOf","item","currentFormState","aria-label","class","allowMultiple","_hover","bg","status","baseStyles","normalStyles","activeStyles","separatorStyles","pointerEvents","paginationStyles","justifyContent","li","Pagination","paginationDirectives","setPageNumber","pagesQuantity","numberOfPages","handlePageChange","nextPage","innerLimit","outerLimit","currentPage","onPageChange","isInline","align","searchResultsStyles","h2","overflow","paddingLeft","resultItemStyles","paddingTop","TrainingDetails","isError","training","address","phoneNumber","emailAddress","websiteUrl","street","houseNumber","postcode","city","country","href","isExternal","SearchResults","trainingsResponse","trainings","numberOfItems","expandedIndex","setExpandedIndex","handleOrderingClick","newSort","currentParams","count","getTrainingSort","getProvidergSort","getdurationSort","allowToggle","expIndexes","newExpandedIndex","index","isExpanded","duration","UnsupportedBrowserDisplay","unsupportedBrowserStyles","App","initialRender","errors","setErrors","locationsData","locationsError","locationsLoading","trainingsData","trainingsLoading","trainingsError","fetchTrainings","currentErrors","window","navigator","userAgent","error","AVAILABLE_LANGUAGES","locales","fr","queryClient","QueryClient","ReactDOM","render","StrictMode","QueryClientProvider","client","I18nextProvider","i18n","use","initReactI18next","init","resources","language","translation","lng","debug","process","keySeparator","interpolation","escapeValue","theme","getElementById","$modalOpeners","Array","from","querySelectorAll","$modalClosers","forEach","opener","ev","querySelector","dataset","uiTarget","closer","closest"],"mappings":"uGAAA,gkD,yECAA,kCAgBO,IAAMA,EAAyB,CACpCC,QAAS,UACTC,aAAc,eACdC,cAAe,gBACfC,aAAc,eACdC,cAAe,gBACfC,aAAc,eACdC,cAAe,kB,uPCvBjB,kCASO,IAAMC,EAAmB,CAC9BC,SAAU,WACVC,SAAU,a,2mGCJNC,EAAiBC,IAAMC,OAAO,CAAEC,QAFhC,oCAkBSC,EAdQ,SAAIC,GACzB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AmB2B,EACnB3F,YAAaA,EACbC,eAAgBA,U,6BCnJxBmG,GAAsB,CADH,MAGnBC,GAAU,CACdC,OCEIC,GAAc,IAAIC,IAMxBC,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAACC,EAAA,EAAD,CAAqBC,OAAQN,GAA7B,SACE,cAACO,EAAA,EAAD,CAAiBC,MDPrBA,KAAKC,IAAIC,MAAkBC,KAAK,CAC9BC,UAAWf,GAAoBnS,QAC7B,SAACC,EAAgDkT,GAAjD,mBAAC,eACIlT,GADL,mBAEGkT,EAAW,CACVC,YAAY,eACNhB,GAAmCe,SAI7C,IAEFE,IApBqB,KAqBrBC,OAAOC,EACPC,cAAc,EACdC,cAAe,CACbC,aAAa,KAIVZ,MCbH,SACE,cAAC,IAAD,CAAgBa,MAAOvT,EAAvB,SACE,cAAC,GAAD,YAKRgJ,SAASwK,eAAe,SCpB1B,IAAMC,GAAgBC,MAAMC,KAC1B3K,SAAS4K,iBAAiB,6BAEtBC,GAAgBH,MAAMC,KAC1B3K,SAAS4K,iBAAiB,2BAG5BH,GAAcK,SAAQ,SAACC,GACrBA,EAAO9K,iBAAiB,SAAS,SAAC+K,GAChCA,EAAGpK,iBACH,IAAMb,EAASC,SAASiL,cAAT,yBACKD,EAAGjL,OAAOmL,QAAQC,WAGlCpL,IACFA,EAAO7E,MAAMjB,QAAU,eAK7B4Q,GAAcC,SAAQ,SAACM,GACrBA,EAAOnL,iBAAiB,SAAS,SAAC+K,GAChC,IAAMjL,EAASiL,EAAGjL,OAAOsL,QAAQ,0BAE7BtL,IACFA,EAAO7E,MAAMjB,QAAU,gB","file":"static/js/main.7ec244b6.chunk.js","sourcesContent":["export * from './locations';\r\nexport * from './suggestionsResponse';\r\nexport * from './searchTrainingsSorting';\r\nexport * from './address';\r\nexport * from './trainingsResponseData';\r\nexport * from './trainingsResponse';\r\nexport * from './suggestion';\r\nexport * from './training';\r\nexport * from './trainingDetailResponse';\r\nexport * from './trainingDetailData';\r\nexport * from './trainingDetail';\r\nexport * from './httpError';\r\nexport * from './errorCode';\r\nexport * from './suggestionFilter';\r\nexport * from './paginationDirectives';\r\nexport * from './badRequestResponse';\r\nexport * from './noContentResponse';\r\nexport * from './notFoundResponse';\r\nexport * from './methodNotAllowedResponse';\r\nexport * from './internalServerErrorResponse';\r\nexport * from './getSuggestionsParams';\r\nexport * from './getTrainingsParams';\r\nexport * from './locationsResponse';\r\nexport * from './region';\r\n","/*\r\n * Generated by orval v4.1.0 🍺\r\n * Do not edit manually.\r\n * Training Catalog Api\r\n * OpenAPI spec version: v1\r\n */\r\n\r\nexport type SearchTrainingsSorting =\r\n | 'RANKING'\r\n | 'TRAINING_ASC'\r\n | 'TRAINING_DESC'\r\n | 'PROVIDER_ASC'\r\n | 'PROVIDER_DESC'\r\n | 'DURATION_ASC'\r\n | 'DURATION_DESC';\r\n\r\nexport const SearchTrainingsSorting = {\r\n RANKING: 'RANKING' as SearchTrainingsSorting,\r\n TRAINING_ASC: 'TRAINING_ASC' as SearchTrainingsSorting,\r\n TRAINING_DESC: 'TRAINING_DESC' as SearchTrainingsSorting,\r\n PROVIDER_ASC: 'PROVIDER_ASC' as SearchTrainingsSorting,\r\n PROVIDER_DESC: 'PROVIDER_DESC' as SearchTrainingsSorting,\r\n DURATION_ASC: 'DURATION_ASC' as SearchTrainingsSorting,\r\n DURATION_DESC: 'DURATION_DESC' as SearchTrainingsSorting,\r\n};\r\n","/*\r\n * Generated by orval v4.1.0 🍺\r\n * Do not edit manually.\r\n * Training Catalog Api\r\n * OpenAPI spec version: v1\r\n */\r\n\r\nexport type SuggestionFilter = 'TRAINING' | 'PROVIDER';\r\n\r\nexport const SuggestionFilter = {\r\n TRAINING: 'TRAINING' as SuggestionFilter,\r\n PROVIDER: 'PROVIDER' as SuggestionFilter,\r\n};\r\n","import Axios, { AxiosRequestConfig } from 'axios';\r\n\r\nconst BASE_URL =\r\n process.env.NODE_ENV === 'development'\r\n ? 'https://localhost:44383'\r\n : '/ChequesFormation/Catalogue/api';\r\n\r\nconst AXIOS_INSTANCE = Axios.create({ baseURL: BASE_URL });\r\n\r\nconst customInstance = (config: AxiosRequestConfig): Promise => {\r\n const source = Axios.CancelToken.source();\r\n const promise = AXIOS_INSTANCE({ ...config, cancelToken: source.token }).then(\r\n ({ data }) => data,\r\n );\r\n\r\n // @ts-ignore\r\n promise.cancel = () => {\r\n source.cancel('Query was cancelled by React Query');\r\n };\r\n\r\n return promise;\r\n};\r\n\r\nexport default customInstance;\r\n","/*\r\n * Generated by orval v4.1.0 🍺\r\n * Do not edit manually.\r\n * Training Catalog Api\r\n * OpenAPI spec version: v1\r\n */\r\nimport { useQuery, UseQueryOptions } from 'react-query';\r\nimport customAxios from '../utils/axios';\r\nimport {\r\n GetSuggestionsParams,\r\n GetTrainingsParams,\r\n LocationsResponse,\r\n SuggestionsResponse,\r\n TrainingDetailResponse,\r\n TrainingsResponse,\r\n} from './model';\r\n\r\ntype AsyncReturnType Promise> = T extends (\r\n ...args: any\r\n) => Promise\r\n ? R\r\n : any;\r\n\r\nexport const getGlobalLocations = () => {\r\n return customAxios({\r\n url: `/v1/locations`,\r\n method: 'get',\r\n });\r\n};\r\n\r\nexport const getGetGlobalLocationsQueryKey = () => [`/v1/locations`];\r\n\r\nexport const useGetGlobalLocations = (\r\n queryConfig?: UseQueryOptions<\r\n AsyncReturnType,\r\n Error\r\n >,\r\n) => {\r\n const queryKey = getGetGlobalLocationsQueryKey();\r\n\r\n const query = useQuery, Error>(\r\n queryKey,\r\n () => getGlobalLocations(),\r\n queryConfig,\r\n );\r\n\r\n return {\r\n queryKey,\r\n ...query,\r\n };\r\n};\r\n\r\nexport const getSuggestions = (params?: GetSuggestionsParams) => {\r\n return customAxios({\r\n url: `/v1/suggestions`,\r\n method: 'get',\r\n params,\r\n });\r\n};\r\n\r\nexport const getGetSuggestionsQueryKey = (params?: GetSuggestionsParams) => [\r\n `/v1/suggestions`,\r\n ...(params ? [params] : []),\r\n];\r\n\r\nexport const useGetSuggestions = (\r\n params?: GetSuggestionsParams,\r\n queryConfig?: UseQueryOptions, Error>,\r\n) => {\r\n const queryKey = getGetSuggestionsQueryKey(params);\r\n\r\n const query = useQuery, Error>(\r\n queryKey,\r\n () => getSuggestions(params),\r\n queryConfig,\r\n );\r\n\r\n return {\r\n queryKey,\r\n ...query,\r\n };\r\n};\r\n\r\nexport const getTrainings = (params?: GetTrainingsParams) => {\r\n return customAxios({\r\n url: `/v1/trainings`,\r\n method: 'get',\r\n params,\r\n });\r\n};\r\n\r\nexport const getGetTrainingsQueryKey = (params?: GetTrainingsParams) => [\r\n `/v1/trainings`,\r\n ...(params ? [params] : []),\r\n];\r\n\r\nexport const useGetTrainings = (\r\n params?: GetTrainingsParams,\r\n queryConfig?: UseQueryOptions, Error>,\r\n) => {\r\n const queryKey = getGetTrainingsQueryKey(params);\r\n\r\n const query = useQuery, Error>(\r\n queryKey,\r\n () => getTrainings(params),\r\n queryConfig,\r\n );\r\n\r\n return {\r\n queryKey,\r\n ...query,\r\n };\r\n};\r\n\r\nexport const getTrainingDetail = (trainingId: string) => {\r\n return customAxios({\r\n url: `/v1/trainings/${trainingId}`,\r\n method: 'get',\r\n });\r\n};\r\n\r\nexport const getGetTrainingDetailQueryKey = (trainingId: string) => [\r\n `/v1/trainings/${trainingId}`,\r\n];\r\n\r\nexport const useGetTrainingDetail = (\r\n trainingId: string,\r\n queryConfig?: UseQueryOptions<\r\n AsyncReturnType,\r\n Error\r\n >,\r\n) => {\r\n const queryKey = getGetTrainingDetailQueryKey(trainingId);\r\n\r\n const query = useQuery, Error>(\r\n queryKey,\r\n () => getTrainingDetail(trainingId),\r\n { enabled: !!trainingId, ...queryConfig },\r\n );\r\n\r\n return {\r\n queryKey,\r\n ...query,\r\n };\r\n};\r\n","import { extendTheme } from '@chakra-ui/react';\r\n\r\nexport const colors = {\r\n primary: '#2c3896',\r\n secondary: '#2c2554',\r\n lightblue: '#e1e4fe',\r\n red: '#ed424a',\r\n darkgrey: '#4d4d4d',\r\n mediumgrey: '#93929a',\r\n lightgrey: '#c3c2cb',\r\n shallowgrey: '#f9f9fa',\r\n text: '#4d4d4d',\r\n border: '#c3c2cb',\r\n borderlight: 'rgba(195, 194, 203, .6)', //#c3c2cb\r\n white: '#fff',\r\n};\r\n\r\nexport const sizes = {\r\n borderRadius: '6px',\r\n container: {\r\n sm: '64rem',\r\n md: '79rem',\r\n lg: '101rem',\r\n xl: '128rem',\r\n },\r\n};\r\n\r\nexport const fontFamilies = {\r\n heading: '\"SansaPro\", Verdana, sans-serif',\r\n body: '\"SansaPro\", Verdana, sans-serif',\r\n};\r\n\r\nexport const fontSizes = {\r\n small: '1.4rem',\r\n medium: '1.6rem',\r\n large: '1.8rem',\r\n xlarge: '2.8rem',\r\n xxlarge: '3.6rem',\r\n};\r\n\r\n// Media queries\r\n\r\nexport const bp = {\r\n medium: '768', // tablet portrait\r\n large: '1024', // tablet landscape\r\n xlarge: '1440', // laptop\r\n};\r\n\r\n// Usage: [mq('medium')]: {...}\r\nexport const mq = (n) => {\r\n const bpArray = Object.keys(bp).map((key) => [key, bp[key]]);\r\n\r\n const [result] = bpArray.reduce((acc, [name, size]) => {\r\n if (n === name) return [...acc, `@media (min-width: ${size}px)`];\r\n return acc;\r\n }, []);\r\n\r\n return result;\r\n};\r\n\r\nexport const customTheme = extendTheme({\r\n fonts: {\r\n body: fontFamilies.body,\r\n heading: fontFamilies.heading,\r\n },\r\n styles: {\r\n global: {\r\n body: {\r\n lineHeight: '1.5',\r\n color: '#4d4d4d',\r\n },\r\n },\r\n },\r\n sizes: {\r\n container: sizes.container,\r\n },\r\n});\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype ArrowIconProps = { color?: string; className?: string };\r\n\r\nexport const ArrowIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: ArrowIconProps) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype CheckboxIconProps = {\r\n color?: string;\r\n className?: string;\r\n};\r\n\r\nexport const CheckboxIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: CheckboxIconProps) => (\r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype ChevronDoubleLeftIconProps = { color?: string; className?: string };\r\n\r\nexport const ChevronDoubleLeftIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: ChevronDoubleLeftIconProps) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype ChevronDownIconProps = { color?: string; className?: string };\r\n\r\nexport const ChevronDownIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: ChevronDownIconProps) => (\r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype ChevronLeftIconProps = { color?: string; className?: string };\r\n\r\nexport const ChevronLeftIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: ChevronLeftIconProps) => (\r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype IndeterminateIconProps = {\r\n color?: string;\r\n className?: string;\r\n};\r\n\r\nexport const IndeterminateIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: IndeterminateIconProps) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype InfoIconProps = { color?: string; className?: string };\r\n\r\nexport const InfoIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: InfoIconProps) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype LocationIconProps = { color?: string; className?: string };\r\n\r\nexport const LocationIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: LocationIconProps) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype MailIconProps = { color?: string; className?: string };\r\n\r\nexport const MailIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: MailIconProps) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype OrderIconProps = { color?: string; className?: string };\r\n\r\nexport const OrderIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: OrderIconProps) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype PhoneIconProps = { color?: string; className?: string };\r\n\r\nexport const PhoneIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: PhoneIconProps) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype SearchIconProps = { color?: string; className?: string };\r\n\r\nexport const SearchIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: SearchIconProps) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype TagCloseIconProps = { color?: string; className?: string };\r\n\r\nexport const TagCloseIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: TagCloseIconProps) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\ntype WebIconProps = { color?: string; className?: string };\r\n\r\nexport const WebIcon = ({\r\n color = colors.white,\r\n className = '',\r\n}: WebIconProps) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n","import { colors } from '@/styles/theme';\r\n\r\nexport const Loader = () => {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n","export default __webpack_public_path__ + \"static/media/background.73dbb848.svg\";","import { colors, fontSizes } from '@/styles/theme';\r\nimport background from './background.svg';\r\n\r\nexport const heroBackgroundStyles = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n height: '44rem',\r\n paddingBottom: '10rem',\r\n background: `${colors.secondary} url(${background}) repeat center / 1427px`,\r\n};\r\n\r\nexport const heroStyles = {\r\n textAlign: 'center',\r\n color: colors.white,\r\n\r\n h1: {\r\n fontSize: fontSizes.xxlarge,\r\n fontWeight: 300,\r\n\r\n b: {\r\n fontWeight: 600,\r\n },\r\n\r\n '&::after': {\r\n content: '\"\"',\r\n display: 'block',\r\n width: '12rem',\r\n height: '0.3rem',\r\n margin: '3rem auto 0',\r\n borderRadius: 2,\r\n background: colors.red,\r\n },\r\n },\r\n\r\n p: {\r\n marginTop: '3rem',\r\n fontSize: fontSizes.large,\r\n },\r\n};\r\n","import { Container, Heading, Text } from '@chakra-ui/react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { heroBackgroundStyles, heroStyles } from './styles';\r\n\r\nexport const Hero = () => {\r\n const { t } = useTranslation();\r\n\r\n return (\r\n
\r\n \r\n \r\n {t('hero.sub')}\r\n \r\n
\r\n );\r\n};\r\n","import {\r\n GetTrainingsParams,\r\n Region,\r\n SearchTrainingsSorting,\r\n} from '@/api/model';\r\nimport { MouseEvent, RefObject, useEffect } from 'react';\r\n\r\nexport type SearchBoxQuery = {\r\n keyword: string;\r\n regions: Region[];\r\n provider: string;\r\n};\r\n\r\nexport const RESULTS_LENGTH_WARNING = 30;\r\n\r\nexport const INITIAL_PARAMS = {\r\n pageNumber: 1,\r\n sort: SearchTrainingsSorting.RANKING,\r\n};\r\n\r\nexport const isUnsupportedBrowser = () => {\r\n const ua = window.navigator.userAgent;\r\n const msie = ua.indexOf('MSIE ');\r\n\r\n return msie > 0 || !!navigator.userAgent.match(/Trident.*rv:11\\./);\r\n};\r\n\r\nexport const getTrainingsParams = ({\r\n regions,\r\n provider,\r\n keyword,\r\n}: SearchBoxQuery): Partial => {\r\n let params = {};\r\n if (provider.length) {\r\n params = { ...params, provider };\r\n }\r\n if (regions.length) {\r\n params = { ...params, regionCode: regions.map((reg) => reg.id).toString() };\r\n }\r\n if (keyword.length) {\r\n params = { ...params, keyword };\r\n }\r\n return params;\r\n};\r\n\r\nexport const getSearchBoxQuery = (\r\n params: GetTrainingsParams,\r\n regions: Region[],\r\n): SearchBoxQuery => ({\r\n keyword: params.keyword || '',\r\n regions: params.regionCode\r\n ? params.regionCode\r\n .split(',')\r\n .map((e) => regions.find((f) => f.id === Number(e)) as Region)\r\n : [],\r\n provider: params.provider || '',\r\n});\r\n\r\nexport const isSelectedRegion = (region: Region, regions: Region[]) =>\r\n regions.some((e) => e.id === region.id);\r\n\r\nexport const isCheckedAllRegions = (values: Region[], suggestions: Region[]) =>\r\n suggestions.every((region) => isSelectedRegion(region, values));\r\n\r\nexport const isIndeterminateRegions = (\r\n values: Region[],\r\n suggestions: Region[],\r\n) =>\r\n suggestions.some((region) => isSelectedRegion(region, values)) &&\r\n !isCheckedAllRegions(values, suggestions);\r\n\r\nexport const addRegion = (region: Region, regions: Region[]): Region[] => [\r\n ...regions,\r\n region,\r\n];\r\n\r\nexport const deleteRegion = (region: Region, regions: Region[]): Region[] =>\r\n regions.filter((r) => r.id !== region.id);\r\n\r\nexport const useClickOutside = (\r\n ref: RefObject,\r\n method: () => void,\r\n) => {\r\n useEffect(() => {\r\n // do something if click outside element\r\n function handleClickOutside(event: MouseEvent) {\r\n if (ref.current && !ref.current.contains(event.target)) {\r\n method();\r\n }\r\n }\r\n // Bind the event listener\r\n document.addEventListener('mousedown', handleClickOutside);\r\n return () => {\r\n // Unbind the event listener on clean up\r\n document.removeEventListener('mousedown', handleClickOutside);\r\n };\r\n }, [ref, method]);\r\n};\r\n","import { colors, fontSizes, mq, sizes } from '@/styles/theme';\r\n\r\nexport const suggestionInputStyles = {\r\n '.chakra-form__label': {\r\n fontSize: fontSizes.large,\r\n color: colors.secondary,\r\n },\r\n\r\n '.input-container': {\r\n position: 'relative',\r\n },\r\n\r\n [mq('large')]: {\r\n '&:nth-of-type(2)': {\r\n '.suggestion-list': {\r\n left: 'calc(50% + 0.7rem)',\r\n transform: 'translateX(-50%)',\r\n },\r\n },\r\n '&:nth-of-type(3)': {\r\n '.suggestion-list': {\r\n left: 'initial',\r\n right: '0',\r\n maxWidth: `calc(${sizes.container.lg} - 13rem)`,\r\n },\r\n },\r\n },\r\n\r\n '.chakra-input': {\r\n height: '5rem',\r\n backgroundColor: colors.white,\r\n\r\n '&[readonly]': {\r\n backgroundColor: colors.white,\r\n color: colors.text,\r\n\r\n '&:focus': {\r\n backgroundColor: colors.lightblue,\r\n borderColor: colors.border,\r\n boxShadow: `0 0 0 0.4rem ${colors.white} inset`,\r\n },\r\n },\r\n\r\n '&:hover': {\r\n borderColor: colors.border,\r\n },\r\n\r\n '&.open, &:focus': {\r\n outline: 'none',\r\n backgroundColor: colors.lightblue,\r\n borderColor: colors.border,\r\n boxShadow: `0 0 0 0.4rem ${colors.white} inset !important`, // overwrite the important in chakra readonly styles\r\n },\r\n },\r\n\r\n '.icon': {\r\n position: 'absolute',\r\n top: 'calc(50% - 0.4rem)',\r\n right: '2rem',\r\n width: '1.4rem',\r\n height: '0.8rem',\r\n transition: 'transform .2s ease-out',\r\n zIndex: 1,\r\n\r\n svg: {\r\n width: '100%',\r\n height: '100%',\r\n },\r\n\r\n '&.open': {\r\n transform: 'rotate(-180deg)',\r\n },\r\n },\r\n\r\n '.suggestion-list': {\r\n position: 'absolute',\r\n top: 'calc(100% + 10px)',\r\n left: 0,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n minWidth: '100%',\r\n maxHeight: '30rem',\r\n padding: '1rem',\r\n border: `1px solid ${colors.border}`,\r\n borderRadius: sizes.borderRadius,\r\n backgroundColor: colors.white,\r\n overflowY: 'auto',\r\n zIndex: 100,\r\n\r\n [mq('large')]: {\r\n maxHeight: '40rem',\r\n width: 'auto', // fallback\r\n // eslint-disable-next-line\r\n width: 'max-content',\r\n maxWidth: `calc(${sizes.container.lg} - 7rem)`,\r\n },\r\n\r\n button: {\r\n minHeight: '4rem',\r\n padding: '0.8rem 1rem',\r\n marginBottom: '0.1rem',\r\n borderRadius: sizes.borderRadius,\r\n textAlign: 'left',\r\n zIndex: 1,\r\n\r\n '&:focus, &:focus-visible, &:hover': {\r\n background: colors.lightblue,\r\n outline: 'none',\r\n },\r\n },\r\n\r\n '.chakra-checkbox': {\r\n flexShrink: 0,\r\n minHeight: '4rem',\r\n padding: '0.8rem 1rem',\r\n marginBottom: '0.1rem',\r\n borderRadius: sizes.borderRadius,\r\n\r\n '&.checked': {\r\n backgroundColor: colors.lightblue,\r\n },\r\n\r\n '&:last-child': {\r\n marginBottom: 0,\r\n },\r\n\r\n '&__label': {\r\n marginLeft: 0,\r\n paddingRight: '1rem',\r\n fontSize: fontSizes.medium,\r\n fontWeight: 400,\r\n color: colors.text,\r\n },\r\n\r\n '&__control': {\r\n order: 3,\r\n width: '2rem',\r\n height: '2rem',\r\n marginLeft: 'auto',\r\n borderWidth: '0.1rem',\r\n borderColor: colors.border,\r\n borderRadius: sizes.borderRadius,\r\n backgroundColor: colors.white,\r\n\r\n '&:hover': {\r\n backgroundColor: colors.white,\r\n },\r\n\r\n svg: {\r\n display: 'none',\r\n },\r\n\r\n '&[data-checked]': {\r\n svg: {\r\n display: 'block',\r\n },\r\n },\r\n\r\n '&[data-indeterminate]': {\r\n svg: {\r\n display: 'block',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport const searchBoxStyles = {\r\n padding: '6rem 3rem',\r\n border: '0.9rem solid rgba(195, 194, 203, .4)',\r\n marginTop: '-10rem',\r\n backgroundColor: colors.shallowgrey,\r\n\r\n '.form-controls': {\r\n flexDirection: 'column',\r\n\r\n '> .chakra-form-control': {\r\n marginBottom: '2rem',\r\n },\r\n\r\n [mq('large')]: {\r\n flexDirection: 'row',\r\n\r\n '> .chakra-form-control': {\r\n marginBottom: 0,\r\n\r\n '&:nth-of-type(1)': {\r\n width: '37%',\r\n },\r\n '&:nth-of-type(2)': {\r\n width: '24%',\r\n },\r\n '&:nth-of-type(3)': {\r\n width: '32%',\r\n },\r\n },\r\n },\r\n },\r\n\r\n '.chakra-input': {\r\n [mq('large')]: {\r\n '&[id=\"formation\"]': {\r\n borderRadius: `${sizes.borderRadius} 0 0 ${sizes.borderRadius}`,\r\n },\r\n\r\n '&[id=\"region\"]': {\r\n borderLeft: 0,\r\n borderRight: 0,\r\n borderRadius: 0,\r\n paddingRight: '4.4rem',\r\n },\r\n\r\n '&[id=\"center\"]': {\r\n borderRadius: 0,\r\n borderRight: 0,\r\n },\r\n },\r\n\r\n '&[id=\"center\"] + .suggestion-list': {\r\n right: 0,\r\n },\r\n },\r\n\r\n '.chakra-button': {\r\n flexShrink: 0,\r\n width: '100%',\r\n height: '5rem',\r\n marginTop: '1rem',\r\n backgroundColor: colors.red,\r\n\r\n '&:hover': {\r\n opacity: 0.8,\r\n },\r\n\r\n '&:disabled': {\r\n backgroundColor: colors.lightgrey,\r\n\r\n '&:hover': {\r\n backgroundColor: colors.lightgrey,\r\n },\r\n },\r\n\r\n [mq('large')]: {\r\n width: '6rem',\r\n borderRadius: `0 ${sizes.borderRadius} ${sizes.borderRadius} 0`,\r\n marginTop: '3.2rem',\r\n },\r\n },\r\n};\r\n\r\nexport const appliedFiltersStyles = {\r\n marginTop: '1rem',\r\n\r\n '.chakra-tag': {\r\n marginRight: '2rem',\r\n marginTop: '2rem',\r\n },\r\n};\r\n","import { useClickOutside } from '@/utils';\r\nimport { FormControl, FormLabel, Input, InputProps } from '@chakra-ui/react';\r\nimport React, { PropsWithChildren, useRef } from 'react';\r\nimport { suggestionInputStyles } from './styles';\r\n\r\ntype SuggestionInputProps = InputProps & {\r\n id: string;\r\n label: string;\r\n suggestions: boolean;\r\n icon?: any;\r\n readOnly?: boolean;\r\n isOpen: boolean;\r\n setIsOpen: (isOpen: boolean, id: string) => void;\r\n};\r\n\r\nexport const SuggestionInput = ({\r\n id,\r\n label,\r\n suggestions = false,\r\n icon,\r\n children,\r\n isOpen,\r\n setIsOpen,\r\n ...rest\r\n}: PropsWithChildren) => {\r\n const suggestionsListRef = useRef(null);\r\n\r\n useClickOutside(suggestionsListRef, () => {\r\n setIsOpen(false, id);\r\n });\r\n\r\n const inputProps = {\r\n type: 'text',\r\n autoComplete: 'off',\r\n ...rest,\r\n };\r\n\r\n return (\r\n \r\n {label}\r\n
\r\n \r\n {icon}\r\n
\r\n {suggestions && isOpen && (\r\n
\r\n {children}\r\n
\r\n )}\r\n
\r\n );\r\n};\r\n","import { Suggestion } from '@/api/model';\r\n\r\ntype SuggestionInputSuggestionsProps = {\r\n suggestions: Suggestion[];\r\n setValue: (value: string) => void;\r\n closeSuggestions: () => void;\r\n};\r\n\r\nexport const SuggestionInputSuggestions = ({\r\n suggestions,\r\n setValue,\r\n closeSuggestions,\r\n}: SuggestionInputSuggestionsProps) => (\r\n <>\r\n {suggestions.map(\r\n ({ match }, i) =>\r\n match && (\r\n {\r\n e.preventDefault();\r\n setValue(match);\r\n closeSuggestions();\r\n }}\r\n >\r\n {match}\r\n \r\n ),\r\n )}\r\n \r\n);\r\n","import { useGetSuggestions } from '@/api';\r\nimport { GetSuggestionsParams, SuggestionFilter } from '@/api/model';\r\nimport { useEffect, useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { SuggestionInput } from './SuggestionInput';\r\nimport { SuggestionInputSuggestions } from './SuggestionInputSuggestions';\r\n\r\ntype SearchBoxProvidersProps = {\r\n isOpen: boolean;\r\n setIsOpen: (isOpen: boolean, id: string) => void;\r\n value: string;\r\n setValue: (value: string) => void;\r\n};\r\n\r\nexport const SearchBoxProviders = ({\r\n value,\r\n setValue,\r\n isOpen,\r\n setIsOpen,\r\n}: SearchBoxProvidersProps) => {\r\n const { t } = useTranslation();\r\n\r\n const [isFocus, setIsFocus] = useState(false);\r\n\r\n const {\r\n data,\r\n isLoading,\r\n refetch: fetchProviderSuggestions,\r\n } = useGetSuggestions(\r\n {\r\n keyword: value,\r\n filter: SuggestionFilter.PROVIDER,\r\n } as GetSuggestionsParams,\r\n {\r\n enabled: false,\r\n },\r\n );\r\n\r\n useEffect(() => {\r\n if (isFocus && value.length > 2) {\r\n fetchProviderSuggestions();\r\n }\r\n }, [fetchProviderSuggestions, value.length, isFocus]);\r\n\r\n const suggestions = data?.data;\r\n const id = 'center';\r\n\r\n return (\r\n {\r\n setIsOpen(true, id);\r\n setIsFocus(true);\r\n }}\r\n onBlur={() => {\r\n setIsFocus(false);\r\n if (!suggestions) {\r\n setIsOpen(false, id);\r\n }\r\n }}\r\n onInput={(e: React.FormEvent) => {\r\n setValue(e.currentTarget.value);\r\n }}\r\n >\r\n {!isLoading && !!suggestions && (\r\n {\r\n setValue(value);\r\n }}\r\n closeSuggestions={() => {\r\n setIsOpen(false, id)\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n","import { Region } from '@/api/model';\r\nimport {\r\n CheckboxIcon,\r\n ChevronDownIcon,\r\n IndeterminateIcon,\r\n} from '@/components/icons';\r\nimport { colors } from '@/styles/theme';\r\nimport {\r\n isCheckedAllRegions,\r\n isIndeterminateRegions,\r\n isSelectedRegion,\r\n} from '@/utils';\r\nimport { Checkbox } from '@chakra-ui/checkbox';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { SuggestionInput } from './SuggestionInput';\r\n\r\ntype SearchBoxRegionsProps = {\r\n isOpen: boolean;\r\n setIsOpen: (isOpen: boolean, id: string) => void;\r\n suggestions: Region[];\r\n values: Region[];\r\n setValues: (value: Region[]) => void;\r\n toggleValue: (value: Region) => void;\r\n};\r\n\r\nexport const SearchBoxRegions = ({\r\n suggestions,\r\n values,\r\n setValues,\r\n isOpen,\r\n setIsOpen,\r\n toggleValue,\r\n}: SearchBoxRegionsProps) => {\r\n const { t } = useTranslation();\r\n\r\n const isCheckedAll = isCheckedAllRegions(values, suggestions);\r\n const isIndeterminate = isIndeterminateRegions(values, suggestions);\r\n\r\n const id = 'region';\r\n\r\n return (\r\n region.name).join(', ')}\r\n icon={}\r\n onFocus={() => {\r\n setIsOpen(true, id);\r\n }}\r\n readOnly\r\n >\r\n \r\n ) : (\r\n \r\n )\r\n }\r\n onChange={() => {\r\n if (suggestions.length === values.length) {\r\n setValues([]);\r\n return;\r\n }\r\n setValues(suggestions);\r\n }}\r\n >\r\n {t('search.region.selectAll')}\r\n \r\n {suggestions.map((region) => {\r\n const { id, name } = region;\r\n const isSelected = isSelectedRegion(region, values);\r\n return (\r\n }\r\n onChange={() => toggleValue(region)}\r\n >\r\n {name}\r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n","import { useGetSuggestions } from '@/api';\r\nimport { GetSuggestionsParams, SuggestionFilter } from '@/api/model';\r\nimport { useEffect, useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { SuggestionInput } from './SuggestionInput';\r\nimport { SuggestionInputSuggestions } from './SuggestionInputSuggestions';\r\n\r\ntype SearchBoxTrainingsProps = {\r\n isOpen: boolean;\r\n setIsOpen: (isOpen: boolean, id: string) => void;\r\n value: string;\r\n setValue: (value: string) => void;\r\n};\r\n\r\nexport const SearchBoxTrainings = ({\r\n value,\r\n setValue,\r\n isOpen,\r\n setIsOpen,\r\n}: SearchBoxTrainingsProps) => {\r\n const { t } = useTranslation();\r\n\r\n const [isFocus, setIsFocus] = useState(false);\r\n\r\n const {\r\n data,\r\n isLoading,\r\n refetch: fetchTrainingSuggestions,\r\n } = useGetSuggestions(\r\n {\r\n keyword: value,\r\n filter: SuggestionFilter.TRAINING,\r\n } as GetSuggestionsParams,\r\n {\r\n enabled: false,\r\n },\r\n );\r\n\r\n const suggestions = data?.data;\r\n const id = 'formation';\r\n\r\n useEffect(() => {\r\n if (isFocus && value.length > 2) {\r\n setIsOpen(false, id);\r\n fetchTrainingSuggestions();\r\n }\r\n }, [fetchTrainingSuggestions, value.length, isFocus]);\r\n\r\n\r\n useEffect(() => {\r\n if(suggestions) {\r\n setIsOpen(true, id);\r\n }\r\n }, [data]);\r\n\r\n return (\r\n {\r\n setIsOpen(true, id);\r\n setIsFocus(true);\r\n }}\r\n onBlur={() => {\r\n setIsFocus(false);\r\n if (!suggestions) {\r\n setIsOpen(false, id);\r\n }\r\n }}\r\n onInput={(e: React.FormEvent) => {\r\n setValue(e.currentTarget.value);\r\n }}\r\n >\r\n {!isLoading && !!suggestions && (\r\n {\r\n setValue(value);\r\n }}\r\n closeSuggestions={() => {\r\n setIsOpen(false, id)\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n","import { GetTrainingsParams, Region } from '@/api/model';\r\nimport { SearchIcon, TagCloseIcon } from '@/components/icons';\r\nimport { colors } from '@/styles/theme';\r\nimport {\r\n addRegion,\r\n deleteRegion,\r\n getSearchBoxQuery,\r\n getTrainingsParams,\r\n INITIAL_PARAMS,\r\n isSelectedRegion,\r\n SearchBoxQuery,\r\n} from '@/utils';\r\nimport { Center, Container, IconButton, Tag, TagLabel,Alert,ListItem,List , Accordion,\r\n AccordionButton,\r\n AccordionItem,\r\n AccordionPanel} from '@chakra-ui/react';\r\n import { InfoIcon } from '@/components/icons';\r\nimport { useEffect, useState } from 'react';\r\nimport { SearchBoxProviders } from './SearchBoxProviders';\r\nimport { SearchBoxRegions } from './SearchBoxRegions';\r\nimport { SearchBoxTrainings } from './SearchBoxTrainings';\r\nimport { appliedFiltersStyles, searchBoxStyles } from './styles';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\n\r\n\r\ntype SearchBoxProps = {\r\n regions: Region[];\r\n queryParams: GetTrainingsParams;\r\n setQueryParams: React.Dispatch>;\r\n};\r\n\r\nexport const SearchBox = ({\r\n regions,\r\n queryParams,\r\n setQueryParams,\r\n}: SearchBoxProps) => {\r\n const [formState, setFormState] = useState(\r\n getSearchBoxQuery(queryParams, regions),\r\n );\r\n const { t } = useTranslation();\r\n\r\n const [lastFormState, setLastFormState] = useState(\r\n getSearchBoxQuery(queryParams, regions),\r\n );\r\n\r\n const [openSuggestions, setOpenSuggestions] = useState([]);\r\n\r\n const submit = (\r\n e: React.MouseEvent,\r\n data: SearchBoxQuery,\r\n ) => {\r\n e.preventDefault();\r\n setQueryParams(() => ({\r\n ...INITIAL_PARAMS,\r\n ...getTrainingsParams(data),\r\n }));\r\n };\r\n\r\n useEffect(() => {\r\n setFormState(() => getSearchBoxQuery(queryParams, regions));\r\n setLastFormState(() => getSearchBoxQuery(queryParams, regions));\r\n }, [queryParams, regions]);\r\n\r\n const updateOpenSuggestions = (isOpen: boolean, id: string) => {\r\n // isOpen represents the state you want\r\n if (isOpen) {\r\n if (openSuggestions.indexOf(id) === -1) {\r\n setOpenSuggestions([...openSuggestions, id]);\r\n }\r\n } else {\r\n setOpenSuggestions(openSuggestions.filter((item) => item !== id));\r\n }\r\n };\r\n\r\n const [show, setShow] = useState(false);\r\n\r\n const handleToggle = () => {\r\n setShow(!show);\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n -1}\r\n setIsOpen={updateOpenSuggestions}\r\n value={formState.keyword}\r\n setValue={(value: string) => {\r\n setFormState((currentFormState) => ({\r\n ...currentFormState,\r\n keyword: value,\r\n }));\r\n }}\r\n />\r\n -1}\r\n setIsOpen={updateOpenSuggestions}\r\n values={formState.regions}\r\n toggleValue={(reg: Region) => {\r\n setFormState((currentFormState) => ({\r\n ...currentFormState,\r\n regions: !isSelectedRegion(reg, currentFormState.regions)\r\n ? addRegion(reg, currentFormState.regions)\r\n : deleteRegion(reg, currentFormState.regions),\r\n }));\r\n }}\r\n setValues={(values: Region[]) => {\r\n setFormState((currentFormState) => ({\r\n ...currentFormState,\r\n regions: values,\r\n }));\r\n }}\r\n />\r\n -1}\r\n setIsOpen={updateOpenSuggestions}\r\n value={formState.provider}\r\n setValue={(value: string) => {\r\n setFormState((currentFormState) => ({\r\n ...currentFormState,\r\n provider: value,\r\n }));\r\n }}\r\n />\r\n submit(e, formState)}\r\n aria-label=\"Search\"\r\n icon={}\r\n type=\"submit\"\r\n />\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('search.form.explaination.title')} \r\n - {t('search.form.explaination.firstElement')}\r\n - {t('search.form.explaination.secondElement')}\r\n - {t('search.form.explaination.thirdElement')}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n {lastFormState.keyword && lastFormState.keyword.length > 1 && (\r\n \r\n {lastFormState.keyword}\r\n \r\n submit(e, {\r\n ...lastFormState,\r\n keyword: '',\r\n })\r\n }\r\n >\r\n \r\n \r\n \r\n )}\r\n {lastFormState.regions.map((reg) => (\r\n \r\n {reg.name}\r\n {\r\n submit(e, {\r\n ...lastFormState,\r\n regions: deleteRegion(reg, lastFormState.regions),\r\n });\r\n }}\r\n >\r\n \r\n \r\n \r\n ))}\r\n {lastFormState.provider && lastFormState.provider.length > 1 && (\r\n \r\n {lastFormState.provider}\r\n \r\n submit(e, {\r\n ...lastFormState,\r\n provider: '',\r\n })\r\n }\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n
\r\n );\r\n};\r\n","import { colors, fontSizes, mq } from '@/styles/theme';\r\nimport { ButtonProps } from '@chakra-ui/react';\r\n\r\nexport const baseStyles: ButtonProps = {\r\n width: '3rem',\r\n height: '3rem',\r\n borderRadius: '50%',\r\n fontSize: fontSizes.small,\r\n};\r\n\r\nexport const normalStyles: ButtonProps = {\r\n ...baseStyles,\r\n background: 'transparent',\r\n color: colors.text,\r\n};\r\n\r\nexport const activeStyles: ButtonProps = {\r\n ...baseStyles,\r\n background: colors.red,\r\n color: colors.white,\r\n};\r\n\r\nexport const separatorStyles: ButtonProps = {\r\n ...baseStyles,\r\n pointerEvents: 'none',\r\n};\r\n\r\nexport const paginationStyles = {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n marginTop: '6rem',\r\n paddingBottom: '9rem',\r\n\r\n '.pagination-btn': {\r\n width: '2rem',\r\n height: '3rem',\r\n padding: 0,\r\n backgroundColor: 'transparent',\r\n\r\n '&--next': {\r\n transform: 'rotate(180deg)',\r\n },\r\n\r\n '&--last': {\r\n transform: 'rotate(180deg)',\r\n },\r\n },\r\n\r\n '.chakra-stack': {\r\n li: {\r\n margin: '0 0.2rem',\r\n\r\n [mq('large')]: {\r\n margin: '0 0.5rem',\r\n },\r\n\r\n '.chakra-button': {},\r\n },\r\n },\r\n};\r\n","import { PaginationDirectives } from '@/api/model';\r\nimport { ChevronDoubleLeftIcon, ChevronLeftIcon } from '@/components/icons';\r\nimport { colors } from '@/styles/theme';\r\nimport { ChakraProvider, Container, IconButton } from '@chakra-ui/react';\r\nimport { Next, PageGroup, Paginator, Previous } from 'chakra-paginator';\r\nimport {\r\n activeStyles,\r\n normalStyles,\r\n paginationStyles,\r\n separatorStyles,\r\n} from './styles';\r\n\r\ntype PaginationProps = {\r\n paginationDirectives: PaginationDirectives;\r\n setPageNumber: (value: number) => void;\r\n};\r\n\r\nexport const Pagination = ({\r\n paginationDirectives,\r\n setPageNumber,\r\n}: PaginationProps) => {\r\n const { pageNumber, numberOfPages } = paginationDirectives;\r\n\r\n // constants\r\n const pagesQuantity: number = numberOfPages || 0;\r\n const outerLimit: number = 1;\r\n const innerLimit: number = 1;\r\n\r\n const handlePageChange = (nextPage: number) => {\r\n setPageNumber(nextPage);\r\n };\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n }\r\n onClick={() => {\r\n handlePageChange(1);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n onClick={() => {\r\n handlePageChange(pagesQuantity);\r\n }}\r\n />\r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n","import { colors, fontSizes, mq, sizes } from '@/styles/theme';\r\n\r\nexport const searchResultsStyles = {\r\n '.chakra-alert': {\r\n marginTop: '5rem',\r\n },\r\n\r\n h2: {\r\n textAlign: 'left',\r\n fontSize: fontSizes.xlarge,\r\n fontWeight: 300,\r\n\r\n '&::after': {\r\n width: '100%',\r\n marginTop: '1rem',\r\n borderRadius: 2,\r\n },\r\n\r\n b: {\r\n fontWeight: 400,\r\n },\r\n },\r\n\r\n '.table-container': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n overflow: 'auto',\r\n width: 'calc(100% + 2rem)',\r\n marginLeft: '-1rem',\r\n paddingLeft: '1rem',\r\n paddingRight: '1rem',\r\n\r\n [mq('large')]: {\r\n overflow: 'hidden',\r\n },\r\n },\r\n\r\n '.table-head': {\r\n display: 'inline-flex',\r\n minWidth: '100%',\r\n\r\n [mq('large')]: {\r\n display: 'flex',\r\n },\r\n\r\n button: {\r\n flexShrink: 0,\r\n justifyContent: 'flex-start',\r\n width: '20rem',\r\n height: 'auto',\r\n padding: '2.5rem 2rem',\r\n borderRadius: 0,\r\n backgroundColor: 'transparent',\r\n fontSize: fontSizes.medium,\r\n textAlign: 'left',\r\n\r\n '&.thead-formation': {\r\n width: '54%',\r\n minWidth: '2.2rem',\r\n },\r\n\r\n '&.thead-center': {\r\n width: '31%',\r\n minWidth: '2.5rem',\r\n },\r\n\r\n '&.thead-duration': {\r\n width: '15%',\r\n minWidth: '1.2rem',\r\n },\r\n\r\n svg: {\r\n flexShrink: 0,\r\n width: '1.8rem',\r\n height: '1.4rem',\r\n marginLeft: '2rem',\r\n\r\n '&.sort-descending': {\r\n transform: 'rotate(180deg)',\r\n },\r\n },\r\n },\r\n },\r\n\r\n '.chakra-accordion': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'flex-start',\r\n minWidth: '100%',\r\n },\r\n};\r\n\r\nexport const resultItemStyles = {\r\n borderColor: colors.border,\r\n transition: 'backgroundColor .3s ease-out',\r\n display: 'inline-flex',\r\n flexDirection: 'column',\r\n minWidth: '100%',\r\n\r\n '.chakra-accordion__button': {\r\n position: 'relative',\r\n minWidth: '100%',\r\n padding: '1rem 0',\r\n fontSize: fontSizes.medium,\r\n textAlign: 'left',\r\n\r\n '&:hover': {\r\n backgroundColor: 'transparent',\r\n },\r\n\r\n '> div': {\r\n display: 'inline-flex',\r\n width: '100%',\r\n\r\n [mq('large')]: {\r\n display: 'flex',\r\n },\r\n\r\n '.chakra-text': {\r\n display: 'inline-block',\r\n flexShrink: 0,\r\n padding: '1.5rem 2rem',\r\n borderLeft: `0.1rem solid ${colors.borderlight}`,\r\n\r\n '&:first-of-type': {\r\n borderLeft: 0,\r\n },\r\n\r\n '&.text-formation': {\r\n width: '54%',\r\n minWidth: '22rem',\r\n color: colors.primary,\r\n },\r\n\r\n '&.text-center': {\r\n width: '31%',\r\n minWidth: '25rem',\r\n },\r\n\r\n '&.text-duration': {\r\n width: '15%',\r\n minWidth: '12rem',\r\n },\r\n },\r\n },\r\n\r\n '.accordion-icon': {\r\n position: 'absolute',\r\n right: '2rem',\r\n transition: 'transform .2s ease-out',\r\n },\r\n\r\n '&.expanded': {\r\n backgroundColor: colors.lightblue,\r\n\r\n '.chakra-text': {\r\n borderColor: colors.white,\r\n },\r\n\r\n '.accordion-icon': {\r\n transform: 'rotate(-180deg)',\r\n },\r\n },\r\n },\r\n\r\n '.chakra-accordion__panel': {\r\n padding: '2rem',\r\n paddingTop: 0,\r\n backgroundColor: colors.lightblue,\r\n\r\n '.container': {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n padding: '2rem',\r\n borderRadius: sizes.borderRadius,\r\n background: colors.white,\r\n\r\n '.loader': {\r\n width: '100%',\r\n\r\n svg: {\r\n width: '3rem',\r\n height: '3rem',\r\n },\r\n },\r\n },\r\n\r\n '.column': {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'space-between',\r\n width: '33.3%',\r\n },\r\n\r\n p: {\r\n display: 'flex',\r\n fontSize: fontSizes.small,\r\n\r\n svg: {\r\n flexShrink: 0,\r\n display: 'inline-block',\r\n height: '2rem',\r\n maxWidth: '2rem',\r\n marginRight: '1rem',\r\n },\r\n },\r\n },\r\n};\r\n","import { useGetTrainingDetail } from '@/api';\r\nimport { LocationIcon, MailIcon, PhoneIcon, WebIcon } from '@/components/icons';\r\nimport { Loader } from '@/components/Loader';\r\nimport { colors } from '@/styles/theme';\r\nimport { AccordionPanel, Link, Text } from '@chakra-ui/react';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\ntype TrainingDetailsProps = {\r\n trainingId: string;\r\n};\r\n\r\nexport const TrainingDetails = ({ trainingId }: TrainingDetailsProps) => {\r\n const { t } = useTranslation();\r\n\r\n const { data, isLoading, isError } = useGetTrainingDetail(trainingId);\r\n\r\n if (isLoading && !data?.data) {\r\n return (\r\n \r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n if (isError || !data?.data) {\r\n return (\r\n \r\n
\r\n {t('results.details.error')}\r\n
\r\n
\r\n );\r\n }\r\n\r\n const { data: training } = data;\r\n const { address, phoneNumber, emailAddress, websiteUrl } = training;\r\n\r\n return (\r\n \r\n
\r\n {address && (\r\n
\r\n \r\n \r\n \r\n {address.street} {address.houseNumber}\r\n
\r\n {address.postcode} {address.city}\r\n
\r\n {address.country}\r\n
\r\n
\r\n
\r\n )}\r\n {(phoneNumber || emailAddress) && (\r\n
\r\n {phoneNumber && (\r\n \r\n \r\n {phoneNumber}\r\n \r\n )}\r\n {emailAddress && (\r\n \r\n \r\n {emailAddress}\r\n \r\n )}\r\n
\r\n )}\r\n {websiteUrl && (\r\n
\r\n \r\n \r\n \r\n {websiteUrl}\r\n \r\n \r\n
\r\n )}\r\n
\r\n
\r\n );\r\n};\r\n","import {\r\n GetTrainingsParams,\r\n SearchTrainingsSorting,\r\n TrainingsResponse,\r\n} from '@/api/model';\r\nimport { ArrowIcon, ChevronDownIcon, OrderIcon } from '@/components/icons';\r\nimport { Pagination } from '@/components/Pagination/Pagination';\r\nimport { colors } from '@/styles/theme';\r\nimport {\r\n Accordion,\r\n AccordionButton,\r\n AccordionItem,\r\n Button,\r\n Container,\r\n Heading,\r\n Text,\r\n} from '@chakra-ui/react';\r\nimport { useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\nimport { resultItemStyles, searchResultsStyles } from './styles';\r\nimport { TrainingDetails } from './TrainingDetails';\r\n\r\ntype SearchResultsProps = {\r\n trainingsResponse: TrainingsResponse;\r\n queryParams: GetTrainingsParams;\r\n setQueryParams: React.Dispatch>;\r\n};\r\n\r\nexport const SearchResults = ({\r\n trainingsResponse,\r\n queryParams,\r\n setQueryParams,\r\n}: SearchResultsProps) => {\r\n const { t } = useTranslation();\r\n\r\n const { data: trainings, ...paginationDirectives } = trainingsResponse;\r\n const { numberOfItems } = paginationDirectives;\r\n\r\n const [expandedIndex, setExpandedIndex] = useState([] as string[]);\r\n\r\n const handleOrderingClick = (newSort: SearchTrainingsSorting) => {\r\n setQueryParams((currentParams) => ({ ...currentParams, sort: newSort }));\r\n };\r\n\r\n const handleAccordionItemToggle = (expIndexes: any) => {\r\n const newExpandedIndex = expIndexes.map(\r\n (index: number) => trainings[index].id,\r\n );\r\n setExpandedIndex(newExpandedIndex);\r\n };\r\n\r\n\r\n const getTrainingSort = ()=>{\r\n switch (sort){\r\n case SearchTrainingsSorting.TRAINING_ASC:\r\n return SearchTrainingsSorting.TRAINING_DESC;\r\n case SearchTrainingsSorting.TRAINING_DESC:\r\n return SearchTrainingsSorting.RANKING;\r\n case SearchTrainingsSorting.RANKING:\r\n return SearchTrainingsSorting.TRAINING_ASC;\r\n default:\r\n return SearchTrainingsSorting.TRAINING_ASC;\r\n }\r\n }\r\n const getProvidergSort = ()=>{\r\n switch (sort){\r\n case SearchTrainingsSorting.PROVIDER_ASC:\r\n return SearchTrainingsSorting.PROVIDER_DESC;\r\n case SearchTrainingsSorting.PROVIDER_DESC:\r\n return SearchTrainingsSorting.RANKING;\r\n case SearchTrainingsSorting.RANKING:\r\n return SearchTrainingsSorting.PROVIDER_ASC;\r\n default:\r\n return SearchTrainingsSorting.PROVIDER_ASC;\r\n }\r\n }\r\n const getdurationSort = ()=>{\r\n switch (sort){\r\n case SearchTrainingsSorting.DURATION_ASC:\r\n return SearchTrainingsSorting.DURATION_DESC;\r\n case SearchTrainingsSorting.DURATION_DESC:\r\n return SearchTrainingsSorting.RANKING;\r\n case SearchTrainingsSorting.RANKING:\r\n return SearchTrainingsSorting.DURATION_ASC;\r\n default:\r\n return SearchTrainingsSorting.DURATION_ASC;\r\n }\r\n }\r\n const { sort } = queryParams;\r\n\r\n return (\r\n <>\r\n
\r\n \r\n \r\n {numberOfItems} \r\n {t('results.title', { count: numberOfItems })}\r\n \r\n
\r\n
\r\n {\r\n handleOrderingClick(\r\n getTrainingSort()\r\n );\r\n }}\r\n >\r\n {t('results.tableHead.formation')}\r\n {sort !== SearchTrainingsSorting.TRAINING_ASC &&\r\n sort !== SearchTrainingsSorting.TRAINING_DESC && (\r\n \r\n )}\r\n {sort === SearchTrainingsSorting.TRAINING_ASC && (\r\n \r\n )}\r\n {sort === SearchTrainingsSorting.TRAINING_DESC && (\r\n \r\n )}\r\n \r\n {\r\n handleOrderingClick(\r\n getProvidergSort()\r\n );\r\n }}\r\n >\r\n {t('results.tableHead.center')}\r\n {sort !== SearchTrainingsSorting.PROVIDER_ASC &&\r\n sort !== SearchTrainingsSorting.PROVIDER_DESC && (\r\n \r\n )}\r\n {sort === SearchTrainingsSorting.PROVIDER_ASC && (\r\n \r\n )}\r\n {sort === SearchTrainingsSorting.PROVIDER_DESC && (\r\n \r\n )}\r\n \r\n {\r\n handleOrderingClick(\r\n getdurationSort()\r\n );\r\n }}\r\n >\r\n {t('results.tableHead.duration')}\r\n {sort !== SearchTrainingsSorting.DURATION_ASC &&\r\n sort !== SearchTrainingsSorting.DURATION_DESC && (\r\n \r\n )}\r\n {sort === SearchTrainingsSorting.DURATION_ASC && (\r\n \r\n )}\r\n {sort === SearchTrainingsSorting.DURATION_DESC && (\r\n \r\n )}\r\n \r\n
\r\n \r\n {trainings.map((training, i) => (\r\n \r\n {({ isExpanded }) => (\r\n <>\r\n \r\n
\r\n \r\n {training.name}\r\n \r\n \r\n {training.provider}\r\n \r\n \r\n {t('results.tableElement.duration', {\r\n count: training.duration,\r\n })}\r\n \r\n
\r\n \r\n
\r\n {expandedIndex.indexOf(training.id) > -1 && (\r\n \r\n )}\r\n \r\n )}\r\n \r\n ))}\r\n \r\n
\r\n
\r\n
\r\n {paginationDirectives && (\r\n \r\n setQueryParams((currentParams) => ({\r\n ...currentParams,\r\n pageNumber: value,\r\n }))\r\n }\r\n />\r\n )}\r\n \r\n );\r\n};\r\n","import { colors, fontSizes } from '@/styles/theme';\r\nimport { Container, Heading, Text } from '@chakra-ui/react';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nexport const UnsupportedBrowserDisplay = () => {\r\n const { t } = useTranslation();\r\n\r\n const unsupportedBrowserStyles = {\r\n h1: {\r\n fontSize: fontSizes.xxlarge,\r\n fontWeight: 400,\r\n marginBottom: '3rem',\r\n color: colors.primary,\r\n },\r\n\r\n p: {\r\n fontSize: fontSizes.large,\r\n color: colors.text,\r\n },\r\n };\r\n\r\n return (\r\n
\r\n \r\n {t('unsupportedBrowser.title')}\r\n {t('unsupportedBrowser.sub')}\r\n \r\n
\r\n );\r\n};\r\n","import { useGetGlobalLocations, useGetTrainings } from '@/api';\r\nimport { GetTrainingsParams } from '@/api/model';\r\nimport { InfoIcon } from '@/components/icons';\r\nimport { Loader } from '@/components/Loader';\r\nimport { Hero } from '@/components/sections/Hero/Hero';\r\nimport { SearchBox } from '@/components/sections/SearchBox/SearchBox';\r\nimport { SearchResults } from '@/components/sections/SearchResults/SearchResults';\r\nimport { UnsupportedBrowserDisplay } from '@/components/UnsupportedBrowserDisplay';\r\nimport { colors } from '@/styles/theme';\r\nimport {\r\n INITIAL_PARAMS,\r\n isUnsupportedBrowser,\r\n RESULTS_LENGTH_WARNING,\r\n} from '@/utils';\r\nimport { Alert, Container } from '@chakra-ui/react';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nexport const App: React.FC = () => {\r\n const { t } = useTranslation();\r\n\r\n const initialRender = useRef(true);\r\n\r\n const [queryParams, setQueryParams] = useState(\r\n INITIAL_PARAMS,\r\n );\r\n\r\n const [errors, setErrors] = useState([]);\r\n\r\n const {\r\n data: locationsData,\r\n isError: locationsError,\r\n isLoading: locationsLoading,\r\n } = useGetGlobalLocations();\r\n\r\n const {\r\n data: trainingsData,\r\n isLoading: trainingsLoading,\r\n isError: trainingsError,\r\n refetch: fetchTrainings,\r\n } = useGetTrainings(queryParams, {\r\n enabled: false,\r\n });\r\n\r\n useEffect(() => {\r\n if (initialRender.current) {\r\n initialRender.current = false;\r\n } else {\r\n setErrors([]);\r\n if (\r\n queryParams.keyword ||\r\n queryParams.provider ||\r\n queryParams.regionCode\r\n ) {\r\n fetchTrainings();\r\n } else {\r\n setErrors((currentErrors) => [\r\n ...currentErrors,\r\n t('search.form.incomplete'),\r\n ]);\r\n }\r\n }\r\n }, [queryParams, fetchTrainings, t]);\r\n\r\n useEffect(() => {\r\n if (trainingsError) {\r\n setErrors((currentErrors) => [...currentErrors, t('results.list.error')]);\r\n }\r\n }, [trainingsError, t]);\r\n\r\n useEffect(() => {\r\n if (trainingsData) {\r\n if (!trainingsData.data.length) {\r\n setErrors((currentErrors) => [\r\n ...currentErrors,\r\n t('results.alert.noResult'),\r\n t('results.alert.contact'),\r\n ]);\r\n }\r\n if (trainingsData.numberOfItems > RESULTS_LENGTH_WARNING) {\r\n setErrors((currentErrors) => [\r\n ...currentErrors,\r\n t('results.alert.tooManyResults'),\r\n t('results.alert.contact'),\r\n ]);\r\n }\r\n if (trainingsData.numberOfItems <= RESULTS_LENGTH_WARNING && trainingsData.numberOfItems > 0) {\r\n setErrors((currentErrors) => [\r\n ...currentErrors,\r\n t('results.alert.contact'),\r\n ]);\r\n }\r\n\r\n }\r\n }, [trainingsData, t]);\r\n\r\n if (isUnsupportedBrowser()) {\r\n return ;\r\n }\r\n\r\n if (locationsLoading && !locationsData) {\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n if (locationsError || !locationsData) {\r\n return (\r\n
\r\n \r\n \r\n \r\n {t('app.error')}\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n const {\r\n data: { regions },\r\n } = locationsData;\r\n\r\n return (\r\n
\r\n \r\n \r\n\r\n {!!errors.length && (\r\n \r\n {errors.map((error, i) => (\r\n \r\n \r\n {error}\r\n \r\n ))}\r\n \r\n )}\r\n {!trainingsLoading ? (\r\n <>\r\n {trainingsData && !!trainingsData.data.length && (\r\n \r\n )}\r\n \r\n ) : (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n","import i18n from 'i18next';\r\nimport { initReactI18next } from 'react-i18next';\r\nimport fr from './fr.json';\r\n\r\nconst DEFAULT_LANGUAGE = 'fr';\r\nconst AVAILABLE_LANGUAGES = [DEFAULT_LANGUAGE];\r\n\r\nconst locales = {\r\n fr,\r\n};\r\n\r\nexport const getI18nInstance = () => {\r\n i18n.use(initReactI18next).init({\r\n resources: AVAILABLE_LANGUAGES.reduce(\r\n (acc: { [key: string]: { [key: string]: any } }, language: string) => ({\r\n ...acc,\r\n [language]: {\r\n translation: {\r\n ...(locales as { [key: string]: any })[language],\r\n },\r\n },\r\n }),\r\n {},\r\n ),\r\n lng: DEFAULT_LANGUAGE,\r\n debug: process.env.NODE_ENV !== 'production',\r\n keySeparator: false,\r\n interpolation: {\r\n escapeValue: false,\r\n },\r\n });\r\n\r\n return i18n;\r\n};\r\n","import '@/styles/index.scss';\r\nimport { ChakraProvider } from '@chakra-ui/react';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { I18nextProvider } from 'react-i18next';\r\nimport { QueryClient, QueryClientProvider } from 'react-query';\r\nimport { App } from './App';\r\nimport { getI18nInstance } from './locales';\r\nimport { customTheme } from './styles/theme';\r\n\r\nconst queryClient = new QueryClient();\r\n\r\nif (process.env.NODE_ENV === 'development') {\r\n require('./mock');\r\n}\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById('root'),\r\n);\r\n","// Workaround necessary to change the default location of the entrypoint, see\r\n// https://github.com/timarney/react-app-rewired#additional-issues-and-options\r\nimport './web/index.tsx';\r\n\r\n// JS interacting with static header & footer\r\n\r\nconst $modalOpeners = Array.from(\r\n document.querySelectorAll('[data-ui-plugin=\"modal\"]'),\r\n);\r\nconst $modalClosers = Array.from(\r\n document.querySelectorAll('[data-ui-type=\"close\"]'),\r\n);\r\n\r\n$modalOpeners.forEach((opener) => {\r\n opener.addEventListener('click', (ev) => {\r\n ev.preventDefault();\r\n const target = document.querySelector(\r\n `[data-ui-type]#${ev.target.dataset.uiTarget}`,\r\n );\r\n\r\n if (target) {\r\n target.style.display = 'block';\r\n }\r\n });\r\n});\r\n\r\n$modalClosers.forEach((closer) => {\r\n closer.addEventListener('click', (ev) => {\r\n const target = ev.target.closest('[data-ui-type=\"modal\"]');\r\n\r\n if (target) {\r\n target.style.display = 'none';\r\n }\r\n });\r\n});\r\n"],"sourceRoot":""}