{"version":3,"sources":["../node_modules/query-string/index.js","../node_modules/strict-uri-encode/index.js","pages/shop/ShopGridFullWidth.js"],"names":["strictUriEncode","objectAssign","encode","value","opts","strict","encodeURIComponent","exports","extract","str","split","parse","formatter","result","arrayFormat","key","accumulator","exec","replace","undefined","concat","parserForArrayFormat","ret","Object","create","trim","forEach","param","parts","shift","val","length","join","decodeURIComponent","keys","sort","reduce","Boolean","Array","isArray","keysSorter","input","a","b","Number","map","stringify","obj","index","encoderForArrayFormat","slice","val2","push","filter","x","module","c","charCodeAt","toString","toUpperCase","parseCurrentQuery","currentQuery","query","genders","category","sizes","colors","brands","page","retailers","product","filters","highPrice","lowPrice","highWeigh","lowWeigh","highDrop","lowDrop","shopType","multilanguage","location","origin","useState","layout","setLayout","initialProducts","setInitialProducts","isSmallScreen","setSmallScreen","partnerName","setPartnerName","productType","qs","search","ignoreQueryPrefix","useEffect","gender","keywords","window","matchMedia","matches","fetchInitialData","inputQuery","axios","get","then","res","products","console","log","data","r","name","bestPrice","price","substr","shuffled","prerenderReady","post","Math","random","isMobileOnly","isTablet","className","style","padding","textAlign","marginTop","marginBottom","animation","role"],"mappings":"kHAEA,IAAIA,EAAkB,EAAQ,KAE1BC,EAAe,EAAQ,KAsE3B,SAASC,EAAOC,EAAOC,GACrB,OAAIA,EAAKF,OACAE,EAAKC,OAASL,EAAgBG,GAASG,mBAAmBH,GAG5DA,EAiBTI,EAAQC,QAAU,SAAUC,GAC1B,OAAOA,EAAIC,MAAM,KAAK,IAAM,IAG9BH,EAAQI,MAAQ,SAAUF,EAAKL,GAI7B,IAAIQ,EA/EN,SAA8BR,GAC5B,IAAIS,EAEJ,OAAQT,EAAKU,aACX,IAAK,QACH,OAAO,SAAUC,EAAKZ,EAAOa,GAC3BH,EAAS,aAAaI,KAAKF,GAC3BA,EAAMA,EAAIG,QAAQ,WAAY,IAEzBL,QAKoBM,IAArBH,EAAYD,KACdC,EAAYD,GAAO,IAGrBC,EAAYD,GAAKF,EAAO,IAAMV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,MAE/CJ,EADD7B,EACY6B,EAASlE,MAAM,EAAG,GAElBkE,EAASlE,MAAM,EAAGoD,GAAwC,WAA1BA,EAAWb,YAA2B,EAAI,GAEzFH,EAAmB8B,OAqBnC,OAfArB,qBAAU,WACcG,OAAOC,WAAW,sBACtBC,QACZZ,GAAe,GAEfA,GAAe,KAEpB,IAEHO,qBAAU,YACF0B,gBAAgBC,aAChBtC,EAAU,qBAEf,CAACqC,eAAcC,aAGd,kBAAC,WAAD,KACI,yBAAKC,UAAU,aACX,yBAAKA,UAAU,kBAAkBC,MAAO,CAACC,QAAUtC,EAAoB,SAAJ,IACnE,yBAAKoC,UAAS,cAAwB,WAAflC,EAA2B,GAAK,wDAC/C,yBAAKkC,UAAU,+BAGPtC,GAAmBA,EAAgBtD,OAAS,EACxC,kBAAC,IAAD,CAAcoD,OAAQA,EAAQwB,SAAUtB,EAAiBI,YAAaA,IACpE,yBACEmC,MAAO,CAACE,UAAW,SAAUC,UAAW,OAAQC,aAAc,SAC9D,kBAAC,IAAD,CAASC,UAAU,SAASC,KAAK,UAC7B,0BAAMP,UAAU","file":"static/js/3.e2696f63.chunk.js","sourcesContent":["'use strict';\n\nvar strictUriEncode = require('strict-uri-encode');\n\nvar objectAssign = require('object-assign');\n\nfunction encoderForArrayFormat(opts) {\n switch (opts.arrayFormat) {\n case 'index':\n return function (key, value, index) {\n return value === null ? [encode(key, opts), '[', index, ']'].join('') : [encode(key, opts), '[', encode(index, opts), ']=', encode(value, opts)].join('');\n };\n\n case 'bracket':\n return function (key, value) {\n return value === null ? encode(key, opts) : [encode(key, opts), '[]=', encode(value, opts)].join('');\n };\n\n default:\n return function (key, value) {\n return value === null ? encode(key, opts) : [encode(key, opts), '=', encode(value, opts)].join('');\n };\n }\n}\n\nfunction parserForArrayFormat(opts) {\n var result;\n\n switch (opts.arrayFormat) {\n case 'index':\n return function (key, value, accumulator) {\n result = /\\[(\\d*)\\]$/.exec(key);\n key = key.replace(/\\[\\d*\\]$/, '');\n\n if (!result) {\n accumulator[key] = value;\n return;\n }\n\n if (accumulator[key] === undefined) {\n accumulator[key] = {};\n }\n\n accumulator[key][result[1]] = value;\n };\n\n case 'bracket':\n return function (key, value, accumulator) {\n result = /(\\[\\])$/.exec(key);\n key = key.replace(/\\[\\]$/, '');\n\n if (!result) {\n accumulator[key] = value;\n return;\n } else if (accumulator[key] === undefined) {\n accumulator[key] = [value];\n return;\n }\n\n accumulator[key] = [].concat(accumulator[key], value);\n };\n\n default:\n return function (key, value, accumulator) {\n if (accumulator[key] === undefined) {\n accumulator[key] = value;\n return;\n }\n\n accumulator[key] = [].concat(accumulator[key], value);\n };\n }\n}\n\nfunction encode(value, opts) {\n if (opts.encode) {\n return opts.strict ? strictUriEncode(value) : encodeURIComponent(value);\n }\n\n return value;\n}\n\nfunction keysSorter(input) {\n if (Array.isArray(input)) {\n return input.sort();\n } else if (typeof input === 'object') {\n return keysSorter(Object.keys(input)).sort(function (a, b) {\n return Number(a) - Number(b);\n }).map(function (key) {\n return input[key];\n });\n }\n\n return input;\n}\n\nexports.extract = function (str) {\n return str.split('?')[1] || '';\n};\n\nexports.parse = function (str, opts) {\n opts = objectAssign({\n arrayFormat: 'none'\n }, opts);\n var formatter = parserForArrayFormat(opts); // Create an object with no prototype\n // https://github.com/sindresorhus/query-string/issues/47\n\n var ret = Object.create(null);\n\n if (typeof str !== 'string') {\n return ret;\n }\n\n str = str.trim().replace(/^(\\?|#|&)/, '');\n\n if (!str) {\n return ret;\n }\n\n str.split('&').forEach(function (param) {\n var parts = param.replace(/\\+/g, ' ').split('='); // Firefox (pre 40) decodes `%3D` to `=`\n // https://github.com/sindresorhus/query-string/pull/37\n\n var key = parts.shift();\n var val = parts.length > 0 ? parts.join('=') : undefined; // missing `=` should be `null`:\n // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\n val = val === undefined ? null : decodeURIComponent(val);\n formatter(decodeURIComponent(key), val, ret);\n });\n return Object.keys(ret).sort().reduce(function (result, key) {\n var val = ret[key];\n\n if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) {\n // Sort object keys, not values\n result[key] = keysSorter(val);\n } else {\n result[key] = val;\n }\n\n return result;\n }, Object.create(null));\n};\n\nexports.stringify = function (obj, opts) {\n var defaults = {\n encode: true,\n strict: true,\n arrayFormat: 'none'\n };\n opts = objectAssign(defaults, opts);\n var formatter = encoderForArrayFormat(opts);\n return obj ? Object.keys(obj).sort().map(function (key) {\n var val = obj[key];\n\n if (val === undefined) {\n return '';\n }\n\n if (val === null) {\n return encode(key, opts);\n }\n\n if (Array.isArray(val)) {\n var result = [];\n val.slice().forEach(function (val2) {\n if (val2 === undefined) {\n return;\n }\n\n result.push(formatter(key, val2, result.length));\n });\n return result.join('&');\n }\n\n return encode(key, opts) + '=' + encode(val, opts);\n }).filter(function (x) {\n return x.length > 0;\n }).join('&') : '';\n};","'use strict';\n\nmodule.exports = function (str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase();\n });\n};","import PropTypes from \"prop-types\";\nimport React, { Fragment, useState, useEffect } from 'react';\nimport ShopProducts from '../../wrappers/product/ShopProducts';\nimport axios from \"axios\";\nimport {multilanguage} from \"redux-multilanguage\";\nimport {isTablet, isMobileOnly} from 'react-device-detect';\nimport {Spinner} from \"react-bootstrap\";\nimport qs from \"query-string\";\n\nconst ShopGridFullWidth = ({location, origin}) => {\n const [layout, setLayout] = useState('grid three-column');\n const [initialProducts, setInitialProducts] = useState([]);\n const [isSmallScreen, setSmallScreen] = useState(false);\n const [partnerName, setPartnerName] = useState(\"unknown\");\n let productType = \"/products/shoes\";\n\n const query = qs.parse(location.search, {\n ignoreQueryPrefix: true\n });\n\n useEffect(()=> {\n let isSmallScreen = false\n let gender = null\n let shopType = \"running\"\n let keywords = null\n let category = \"\"\n\n const matchResult = window.matchMedia(\"(max-width: 992px)\");\n if (matchResult.matches) {\n isSmallScreen = true\n } else {\n isSmallScreen = false\n }\n\n if(query){\n if(query.partnerName){\n setPartnerName(query.partnerName)\n }\n if(query.gender){\n if (query.gender == \"men\"){\n gender = \"Men\"\n } else if (query.gender == \"unisex\"){\n gender = \"Unisex\"\n } else {\n gender = \"Women\"\n }\n }\n if(query.shopType){\n shopType = query.shopType\n }\n if(query.productType){\n productType = \"/products/\" + query.productType\n }\n if(query.keywords){\n keywords = query.keywords\n }\n if(query.category){\n category = query.category\n }\n }\n fetchInitialData(isSmallScreen, gender, shopType, productType, query, keywords, category)\n }, [])\n\n const fetchInitialData = (isSmallScreen, gender, shopType, productType, inputQuery, keywords, category) => {\n let query = 'https://public-front-api.therunningcollective.fr/products?lang='+origin+'&page=1'\n\n if (shopType && shopType == \"running\") {\n query = query + '&shopType=' + shopType\n }\n\n if (productType) {\n query = query + '&productType=' + productType\n }\n\n if (shopType == \"running\"){\n category = \"Compétitions\"\n if (category) {\n query = query + '&subCategory=' + category\n }\n } else if (shopType == \"athletisme\"){\n if (category) {\n query = query + '&subCategory=' + category\n } else {\n category = \"Demi-fond\"\n query = query + '&subCategory=' + category\n }\n }\n\n if (gender) {\n query = query + '&genders=' + gender\n }\n\n\n if (keywords) {\n query = 'https://public-front-api.therunningcollective.fr/search-products?keywords='+keywords\n axios\n .get(query)\n .then((res) => {\n if(inputQuery.partnerName == \"blog\"){\n var products = []\n console.log(res.data)\n\n if (res.data && res.data.length > 0) {\n res.data. map(r => {\n if (r.name.length < 40 && r.bestPrice > 0 && r.price > 0){\n products.push(r)\n } else if(r.name.length >= 40 && r.bestPrice > 0 && r.price > 0){\n r.name = r.name.substr(0, 40) + \"...\";\n products.push(r)\n }\n })\n }\n let shuffled = products\n if(isSmallScreen){\n shuffled = shuffled.slice(0, 2);\n } else {\n shuffled = shuffled.slice(0, 3);\n }\n setInitialProducts(shuffled);\n window.prerenderReady = true\n } else {\n setInitialProducts(res.data ? res.data : []);\n window.prerenderReady = true\n }\n })\n } else {\n axios\n .post(query)\n .then((res) => {\n var products = []\n if (res.data && res.data.products && res.data.products.length > 0) {\n res.data.products. map(r => {\n if (r.name.length < 40 && r.bestPrice > 0 && r.price > 0){\n products.push(r)\n }\n })\n }\n let shuffled = products.sort(() => Math.random() - 0.5)\n if(isSmallScreen){\n shuffled = shuffled.slice(0, 4);\n } else {\n shuffled = shuffled.slice(0, inputQuery && inputQuery.partnerName == \"klikego\" ? 3 : 6);\n }\n setInitialProducts(shuffled);\n })\n }\n\n };\n\n useEffect(() => {\n const matchResult = window.matchMedia(\"(max-width: 992px)\");\n if (matchResult.matches) {\n setSmallScreen(true)\n } else {\n setSmallScreen(false)\n }\n }, [])\n\n useEffect(() => {\n if (isMobileOnly || isTablet){\n setLayout('grid two-column')\n }\n }, [isMobileOnly, isTablet])\n\n return (\n \n
\n
\n
\n
\n\n {\n initialProducts && initialProducts.length > 0 ?\n \n : \n \n \n \n
\n }\n
\n
\n
\n \n
\n )\n}\n\nexport function parseCurrentQuery(currentQuery) {\n let query = \"\"\n if ((currentQuery && (currentQuery.genders ||\n currentQuery.category || currentQuery.sizes ||\n currentQuery.colors || currentQuery.brands || currentQuery.page || currentQuery.retailers || currentQuery.product\n || currentQuery.filters || currentQuery.highPrice || currentQuery.lowPrice\n || currentQuery.highWeigh || currentQuery.lowWeigh\n || currentQuery.highDrop || currentQuery.lowDrop))) {\n query = \"?\"\n if (currentQuery.genders) {\n query = query + \"genders=\" + currentQuery.genders + \"&\"\n }\n if (currentQuery.category) {\n query = query + \"category=\" + currentQuery.category + \"&\"\n }\n if (currentQuery.sizes) {\n query = query + \"sizes=\" + currentQuery.sizes + \"&\"\n }\n if (currentQuery.brands) {\n query = query + \"brands=\" + currentQuery.brands + \"&\"\n }\n if (currentQuery.colors) {\n query = query + \"colors=\" + currentQuery.colors + \"&\"\n }\n if (currentQuery.retailers) {\n query = query + \"retailers=\" + currentQuery.retailers + \"&\"\n }\n if (currentQuery.shopType) {\n query = query + \"shopType=\" + currentQuery.shopType + \"&\"\n }\n if (currentQuery.product) {\n query = query + \"product=\" + currentQuery.product + \"&\"\n }\n if (currentQuery.filters) {\n query = query + \"filters=\" + currentQuery.filters + \"&\"\n }\n if (currentQuery.highPrice) {\n query = query + \"highPrice=\" + currentQuery.highPrice + \"&\"\n }\n if (currentQuery.lowPrice) {\n query = query + \"lowPrice=\" + currentQuery.lowPrice + \"&\"\n }\n if (currentQuery.highWeigh) {\n query = query + \"highWeigh=\" + currentQuery.highWeigh + \"&\"\n }\n if (currentQuery.lowWeigh) {\n query = query + \"lowWeigh=\" + currentQuery.lowWeigh + \"&\"\n }\n if (currentQuery.highDrop) {\n query = query + \"highDrop=\" + currentQuery.highDrop + \"&\"\n }\n if (currentQuery.lowDrop) {\n query = query + \"lowDrop=\" + currentQuery.lowDrop + \"&\"\n }\n if (currentQuery.page) {\n query = query + \"page=\" + currentQuery.page + \"&\"\n }\n\n query = query.slice(0, -1);\n }\n\n return query\n}\n\nShopGridFullWidth.propTypes = {\n location: PropTypes.object,\n}\n\nexport default multilanguage(ShopGridFullWidth);\n"],"sourceRoot":""}