{"version":3,"sources":["webpack:///./src/components/molecules/card-result/cardResult.tsx","webpack:///./src/components/molecules/search-slider/searchSlider.tsx","webpack:///./src/components/molecules/recentSearchs/recentSearchs.tsx","webpack:///./src/components/molecules/filter-content/filterSearchMobile.tsx","webpack:///./src/components/organisms/body-search-results/bodySearchResults.tsx","webpack:///./src/pages/resultados-busqueda.tsx","webpack:///./src/assets/images/logos/comfama/logo_3x2.png"],"names":["CardResult","props","infoType","title","description","imageSrc","imageAlt","imageType","date","gtmMark","linkTo","window","useBrowserMode","goToLink","_link","open","React","createElement","className","href","target","findTarget","rel","findRel","loading","onClick","src","OptimizeImage","defaultImage","alt","Button","type","classname","text","isDisabled","SearchSlider","goNext","goBack","totalPages","paginator","goToPage","todos","Array","fill","slider","setSlider","useState","goTop","useCallback","searchResultsWrapper","document","querySelector","header","scrollTo","offsetTop","offsetHeight","useEffect","disabled","map","_","index","key","RecentSearch","currentOrganization","changeOrganization","setContenByDate","change_org","currentData","changeCurrentData","setCurrentData","idx","activeButton","ButtonPressed","PressedButton","state","order","setOrder","FilterSearchMobile","isOpenModal","setOpenModal","iOrder","setIOrder","applyChangeTemp","value","doFilter","Mobilefilter","id","name","defaultChecked","htmlFor","onClickAction","BodySearchResults","filterPage","doSearch","filterSearch","setLimit","useMetaSearch","isBrowser","searchWord","setSearchWord","isScrollActive","refElement","useScrollDetect","searchByUrlParams","screen","width","url","URL","location","jsonUrlParams","getJsonFromUrl","search","sort","ga_debug","trace","dataLayer","push","label","query","substr","result","split","forEach","part","item","decodeURIComponent","error","Breadcrumb","content","ref","Searcher","compact","defaultPlaceholder","Fragment","length","i","_value$image$file","_value$image$file2","tipoContenido","titulo","descripcion","json","documentToReactComponents","image","file","contentType","dateToRelativeFormat","fecha","normalizeTwoWords","slug","ResultsPage","Layout","hideHeaderDesktop","hideHeaderMobile","isNotRoot","showPlayer","SEO","lang","module","exports"],"mappings":"iVAyFeA,MAlFKC,IAEnB,MAAM,SACLC,EAAQ,MACJC,EAAK,Y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,aAAezD,EAAMyD,YAAYC,KAAKb,SACtHc,oCAA0B3D,EAAMyD,YAAYC,MAC5CxI,SAAU8E,EAAM4D,QAAyB,QAApBP,EAAIrD,EAAM4D,MAAMC,YAAI,IAAAR,OAAA,EAAhBA,EAAkB9B,MAAO,GAClDnG,UAAW4E,EAAM4D,QAAyB,QAApBN,EAAItD,EAAM4D,MAAMC,YAAI,IAAAP,OAAA,EAAhBA,EAAkBQ,cAAe,GAC3D3I,SAAU6E,EAAM4D,OAAS5D,EAAM4D,MAAM5I,OAAS,GAC9CK,KAAM0I,YAAqB/D,EAAMgE,OACjC1I,QAAS,wBAAwB2I,YAAkBjE,EAAMuD,iBAAiBU,YAAkBjE,EAAMwD,UAClGjI,OAAQyE,EAAMkE,UAKtBzD,EAAW0C,OAAS,GAClBtH,IAAAC,cAACkB,EAAY,CACVG,WAAYA,EACZE,SAAUA,EACVJ,OAAQA,EACRC,OAAQA,EACRE,UAAWA,MC5IX+G,UAVKA,IAGdtI,IAAAC,cAACsI,IAAM,CAACC,mBAAmB,EAAMC,kBAAkB,EAAMC,WAAW,EAAMC,YAAY,GACnF3I,IAAAC,cAAC2I,IAAG,CAACzJ,MAAM,cAAc0J,KAAK,OAC9B7I,IAAAC,cAAC0E,EAAiB,Q,qBCX3BmE,EAAOC,QAAU,IAA0B,wD","file":"component---src-pages-resultados-busqueda-tsx-467c93835778a1ce6dd6.js","sourcesContent":["import React from \"react\";\r\nimport './cardResult.scss';\r\nimport Button from \"../../../components/atoms/button/button\";\r\nimport defaultImage from \"../../../assets/images/logos/comfama/logo_3x2.png\";\r\nimport useBrowserMode from \"../../../shared/hooks/useBrowserMode\";\r\nimport { findTarget, findRel, OptimizeImage } from \"../../../shared/utils/stringUtilities\";\r\n\r\nconst CardResult = (props: CardResultInterface) => {\r\n\r\n\tconst {\r\n\t\tinfoType,\r\n title,\r\n description,\r\n imageSrc,\r\n imageAlt,\r\n imageType,\r\n date,\r\n gtmMark,\r\n linkTo\r\n } = props;\r\n \r\n const { window } = useBrowserMode();\r\n\r\n const goToLink = (_link) => {\r\n window.open(_link, '_self');\r\n }\r\n\r\n\treturn (\r\n\t\t
\r\n \r\n\t\t\t
\r\n { goToLink(linkTo) } } \r\n\t\t\t\t\tclassName={`${gtmMark}`} \r\n\t\t\t\t\tsrc= { OptimizeImage(imageSrc, imageType, 300) || defaultImage } \r\n\t\t\t\t\talt= { imageAlt || 'Imagen resultado búsqueda' }\r\n\t\t\t\t/>\r\n\t\t\t
\r\n\t\t\t
\r\n
\r\n \r\n { infoType } \r\n \r\n
{ goToLink(linkTo) } } \r\n className={`m-card-result__title ${gtmMark}`} > \r\n { title } \r\n
\r\n
\r\n { description }\r\n
\r\n
\r\n
\r\n \r\n { date }\r\n \r\n
\r\n\t\t\t
\r\n
\r\n\t\t
\r\n\t)\r\n}\r\n\r\ninterface CardResultInterface {\r\n\tinfoType: string,\r\n\ttitle: string,\r\n\tdescription: any,\r\n\timageSrc: string,\r\n\timageAlt: string,\r\n imageType: string,\r\n\tdate?: string,\r\n\tgtmMark?: string,\r\n\tlinkTo: string\r\n}\r\n\r\nexport default CardResult\r\n","import React, { useState, useEffect, useCallback } from \"react\"\r\nimport \"./searchSlider.scss\";\r\n\r\n\r\ninterface SliderReference {\r\n goNext: () => void;\r\n goBack: () => void;\r\n goToPage: (value: number) => void;\r\n totalPages: number;\r\n paginator: number;\r\n}\r\n\r\n\r\nconst SearchSlider = (props: SliderReference) => {\r\n\r\n const { goNext, goBack, totalPages, paginator, goToPage } = props\r\n const limitPages = 7;\r\n const todos = Array(limitPages >= totalPages ? totalPages : limitPages ).fill('*');\r\n const [slider, setSlider] = useState(0);\r\n\r\n const goTop = useCallback(() => {\r\n const searchResultsWrapper: any = document.querySelector(\r\n \".o-search-res__cont\"\r\n );\r\n const header: any = document.querySelector(\".m-header\");\r\n if (searchResultsWrapper) {\r\n window.scrollTo(\r\n 0,\r\n searchResultsWrapper.offsetTop - header?.offsetHeight || 100\r\n );\r\n }\r\n }, []);\r\n \r\n \r\n useEffect(() => {\r\n setSlider(paginator >= limitPages ? paginator + 1 - limitPages : 0);\r\n goTop();\r\n }, [paginator]);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
    \r\n {todos.map((_, index) => (\r\n
  • paginator == index+slider ? null : goToPage(index+slider) } \r\n key={index}\r\n >{index+1+slider}
  • \r\n ))}\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
    \r\n
  • {paginator+1}
  • \r\n
  • de
  • \r\n
  • {totalPages}
  • \r\n
\r\n \r\n
\r\n
\r\n\r\n )\r\n}\r\n\r\n\r\nexport default SearchSlider\r\n","import React, { useState } from 'react';\r\nimport './recentSearchs.scss'\r\n\r\ninterface IRecentSearch {\r\n order: 'ASC' | 'DESC',\r\n setOrder: (value:'ASC' | 'DESC' ) => void\r\n}\r\n\r\nconst RecentSearch = (props: IRecentSearch) => {\r\n\r\n const [currentOrganization, changeOrganization] = useState('Más reciente');\r\n const setContenByDate = (change_org: string) => {\r\n changeOrganization(change_org === currentOrganization ? currentOrganization : change_org)\r\n }\r\n\r\n const [currentData, changeCurrentData] = useState(0)\r\n const setCurrentData = (idx: number) => {\r\n changeCurrentData(idx === currentData ? currentData: idx)\r\n }\r\n\r\n const [activeButton, ButtonPressed] = useState('off')\r\n const PressedButton = (state: string) => {\r\n ButtonPressed(state === 'on' ? 'on' : 'off')\r\n }\r\n\r\n\r\n return (\r\n
\r\n \r\n\r\n
\r\n
    \r\n
  • { setContenByDate('Más reciente')\r\n setCurrentData(0)\r\n PressedButton('off')\r\n props.setOrder('ASC')\r\n }}>\r\n Más reciente\r\n \r\n
  • \r\n\r\n
  • {\r\n setContenByDate('Más antiguo')\r\n setCurrentData(1)\r\n PressedButton('off')\r\n props.setOrder('DESC')\r\n }}>\r\n Más antiguo\r\n \r\n
  • \r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default RecentSearch;\r\n","import React, { useState, useEffect } from 'react';\r\nimport './filterSearchMobile.scss'\r\nimport Button from '../../atoms/button/button';\r\n\r\ninterface IRecentSearch {\r\n order: 'ASC' | 'DESC',\r\n setOrder: (value:'ASC' | 'DESC' ) => void\r\n}\r\n\r\nconst FilterSearchMobile = (props: IRecentSearch) => {\r\n\r\n const [isOpenModal, setOpenModal] = useState(false)\r\n \r\n const [currentOrganization, changeOrganization] = useState('Más reciente');\r\n\r\n const [iOrder, setIOrder] = useState<'ASC' | 'DESC'>(props.order);\r\n\r\n useEffect( () => {\r\n setIOrder(props.order)\r\n }, [isOpenModal])\r\n\r\n const applyChangeTemp = (value: string, order:'ASC' | 'DESC' ) => {\r\n changeOrganization(value);\r\n setIOrder(order);\r\n }\r\n\r\n const doFilter = () => {\r\n setOpenModal(false);\r\n currentOrganization === 'Más reciente' ? props.setOrder('ASC') : props.setOrder('DESC');\r\n }\r\n\r\n const Mobilefilter = () => {\r\n return (\r\n
\r\n\r\n
\r\n
\r\n Filtrar por:
\r\n
\r\n
\r\n Ordenar por:\r\n
    \r\n
  • \r\n applyChangeTemp('Más reciente', 'ASC') }/>\r\n
  • \r\n
  • \r\n applyChangeTemp('Más antiguo', 'DESC') }/>\r\n
  • \r\n
\r\n
\r\n\r\n
\r\n { \r\n applyChangeTemp('Más reciente', \"ASC\");\r\n doFilter();\r\n }}\r\n isDisabled={false}\r\n />\r\n \r\n \r\n \r\n
\r\n
\r\n )\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n )\r\n}\r\nexport default FilterSearchMobile;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport \"./bodySearchResults.scss\";\r\nimport Breadcrumb from \"../../atoms/breadcrumb/breadcrumb\";\r\nimport CardResult from \"../../molecules/card-result/cardResult\";\r\nimport { documentToReactComponents } from \"@contentful/rich-text-react-renderer\";\r\nimport { getFormatDate } from \"../../../shared/utils/dateUtilities\";\r\nimport useMetaSearch from \"../../../shared/hooks/useMetaSearch\";\r\nimport Searcher from \"../../molecules/searcher/searcher\";\r\nimport SearchSlider from \"../../molecules/search-slider/searchSlider\";\r\nimport RecentSearch from \"../../molecules/recentSearchs/recentSearchs\";\r\nimport FilterSearchMobile from \"../../molecules/filter-content/filterSearchMobile\";\r\nimport useBrowserMode from \"../../../shared/hooks/useBrowserMode\";\r\nimport useScrollDetect from \"../../../shared/hooks/useScrollDetect\";\r\nimport { normalizeTwoWords } from \"../../../shared/utils/stringUtilities\";\r\nimport { dateToRelativeFormat } from \"../../../utils/dateToRelativeFormat\";\r\n\r\nconst BodySearchResults = () => {\r\n const {\r\n filterPage,\r\n paginator,\r\n totalPages,\r\n doSearch,\r\n goNext,\r\n goBack,\r\n goToPage,\r\n order,\r\n setOrder,\r\n filterSearch,\r\n setLimit\r\n } = useMetaSearch();\r\n\r\n const { isBrowser, window } = useBrowserMode();\r\n const [searchWord, setSearchWord] = useState(\"\");\r\n const { isScrollActive, refElement } = useScrollDetect();\r\n\r\n useEffect(() => {\r\n searchByUrlParams();\r\n if(isBrowser && window.screen.width <= 960) setLimit(4) \r\n }, []);\r\n\r\n const searchByUrlParams = () => {\r\n let url = new URL(window.location.href);\r\n let jsonUrlParams = getJsonFromUrl(url.search);\r\n if (jsonUrlParams) {\r\n setSearchWord(jsonUrlParams.search);\r\n setOrder(jsonUrlParams.sort);\r\n }\r\n doSearch(jsonUrlParams.search);\r\n window.ga_debug = {trace: true};\r\n window.dataLayer = window.dataLayer || [];\r\n window.dataLayer.push({'event': 'ClicBusca', 'category':'Busqueda', 'action': 'Clic', label: jsonUrlParams.search}); \r\n };\r\n\r\n const getJsonFromUrl = (url: string) => {\r\n let query = url.substr(1);\r\n let result: { search: string; sort: \"ASC\" | \"DESC\" } = {\r\n search: \"\",\r\n sort: \"ASC\",\r\n };\r\n query.split(\"&\").forEach(function (part) {\r\n let item = part.split(\"=\");\r\n try {\r\n result[item[0]] =\r\n decodeURIComponent(item[1]) === \"null\"\r\n ? null\r\n : decodeURIComponent(item[1]);\r\n } catch (error) {\r\n result.search = item[1]\r\n return result;\r\n }\r\n });\r\n return result;\r\n };\r\n\r\n return (\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 {filterSearch ? (\r\n <>\r\n

\r\n {filterSearch.length > 0 ? (\r\n <>Resultados para {`\"${searchWord}\"`} \r\n ) : (\r\n <>\r\n {\" \"}\r\n No encontramos resultados para {`\"${searchWord}\"`}{\" \"}\r\n \r\n )}\r\n

\r\n \r\n {filterSearch.length > 0 && (\r\n <>\r\n {\" \"}\r\n Mostrando {filterSearch.length}{\" \"}\r\n {filterSearch.length === 1\r\n ? \"resultado\"\r\n : \"resultados\"}{\" \"}\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 {filterPage.map((value, i) => (\r\n \r\n ))}\r\n
\r\n\r\n {filterPage.length > 0 && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default BodySearchResults;\r\n","import React from \"react\"\r\nimport Layout from \"../components/organisms/layout/layout\"\r\nimport SEO from \"../shared/seo\"\r\nimport BodySearchResults from '../components/organisms/body-search-results/bodySearchResults'\r\n\r\n\r\nconst ResultsPage = () => {\r\n \r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default ResultsPage;","module.exports = __webpack_public_path__ + \"static/logo_3x2-7c587a459c81f7d13631ead786fd055b.png\";"],"sourceRoot":""}