{ "version": 3, "sources": ["../../../node_modules/lodash/_isKey.js", "../../../node_modules/lodash/memoize.js", "../../../node_modules/lodash/_memoizeCapped.js", "../../../node_modules/lodash/_stringToPath.js", "../../../node_modules/lodash/_castPath.js", "../../../node_modules/lodash/_toKey.js", "../../../node_modules/lodash/_baseGet.js", "../../../node_modules/lodash/_matchesStrictComparable.js", "../../../node_modules/lodash/_baseMatches.js", "../../../node_modules/lodash/get.js", "../../../node_modules/lodash/_baseHasIn.js", "../../../node_modules/lodash/_hasPath.js", "../../../node_modules/lodash/hasIn.js", "../../../node_modules/lodash/_baseMatchesProperty.js", "../../../node_modules/lodash/_basePropertyDeep.js", "../../../node_modules/lodash/property.js", "../../../node_modules/lodash/_baseIteratee.js", "../../../node_modules/lodash/_createBaseFor.js", "../../../node_modules/lodash/_baseFor.js", "../../../node_modules/lodash/_baseForOwn.js", "../../../node_modules/lodash/_createBaseEach.js", "../../../node_modules/lodash/_baseEach.js", "../../../node_modules/lodash/_baseMap.js", "../../../node_modules/lodash/_baseSortBy.js", "../../../node_modules/lodash/_compareAscending.js", "../../../node_modules/lodash/_compareMultiple.js", "../../../node_modules/lodash/_baseOrderBy.js", "../../../node_modules/lodash/_isIterateeCall.js", "../../../node_modules/lodash/sortBy.js", "../../../node_modules/lodash/uniqBy.js", "../../../node_modules/lodash/_arrayEvery.js", "../../../node_modules/lodash/_baseEvery.js", "../../../node_modules/lodash/every.js", "../../../node_modules/lodash/_baseAssignValue.js", "../../../node_modules/lodash/_assignValue.js", "../../../node_modules/lodash/_baseSet.js", "../../../node_modules/lodash/_basePickBy.js", "../../../node_modules/lodash/_basePick.js", "../../../node_modules/lodash/flatten.js", "../../../node_modules/lodash/_flatRest.js", "../../../node_modules/lodash/pick.js", "../../../node_modules/lodash/_baseSome.js", "../../../node_modules/lodash/some.js", "../../../node_modules/lodash/_baseValues.js", "../../../node_modules/lodash/values.js", "../../../node_modules/lodash/fromPairs.js", "../../../node_modules/lodash/_baseIntersection.js", "../../../node_modules/lodash/_castArrayLikeObject.js", "../../../node_modules/lodash/intersection.js", "../../../node_modules/lodash/_baseExtremum.js", "../../../node_modules/lodash/_baseLt.js", "../../../node_modules/lodash/minBy.js", "../../../node_modules/lodash/_baseGt.js", "../../../node_modules/lodash/maxBy.js", "../../javascript/entrypoints/ComplexProduct.tsx", "../../javascript/ComplexProduct/App.tsx", "../../javascript/ComplexProduct/components/ColourPicker/ColourPicker.tsx", "../../javascript/ComplexProduct/components/ColourPicker/ColourCategory.tsx", "../../javascript/ComplexProduct/components/ColourPicker/CursorProvider.tsx", "../../javascript/ComplexProduct/components/FullPageTransition.tsx", "../../javascript/components/ShopNow.tsx", "../../javascript/ComplexProduct/components/ProductHeroInfo.tsx", "../../javascript/ComplexProduct/components/Products.tsx", "../../javascript/ComplexProduct/components/ShowAllProducts.tsx", "../../javascript/ComplexProduct/components/VariantListing.tsx", "../../javascript/ComplexProduct/components/VariantLightbox.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/Header.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/Body.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/MultiVariantInfoTab.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/ProductProperty.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/VariantTypeSelector.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/VariantType.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/VariantTypeDropdownSelector.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/VariantTypeDropdown.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/InfoTab.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/OffersTab.tsx", "../../javascript/components/ProductCardCarousel.tsx", "../../javascript/components/ProductCard.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/RelatedTab.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/TabSection.tsx", "../../javascript/ComplexProduct/components/VariantLightbox/VariantLightboxTab.tsx", "../../javascript/ComplexProduct/api.ts", "../../javascript/ComplexProduct/components/VariantLightbox/Footer.tsx", "../../javascript/ComplexProduct/components/VariantListingItem.tsx", "../../javascript/ComplexProduct/components/ThreadFacts.tsx", "../../javascript/ComplexProduct/components/FilterBar.tsx", "../../javascript/ComplexProduct/components/FilterDropdown.tsx", "../../javascript/ComplexProduct/components/FilterDropdownOption.tsx", "../../javascript/ComplexProduct/components/SearchBar.tsx", "../../javascript/ComplexProduct/computeColourTiles.ts", "../../javascript/ComplexProduct/filterTypes.ts", "../../javascript/ComplexProduct/components/BottomDrawer.tsx", "../../javascript/ComplexProduct/components/FilterCollapsible.tsx", "../../javascript/ComplexProduct/components/FilterCollapsibleOption.tsx", "../../javascript/ComplexProduct/components/Breadcrumbs.tsx"], "sourcesContent": ["var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n", "var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n", "var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n", "var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n", "var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n", "var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n", "var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n", "var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n", "var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n", "var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n", "var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n", "var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n", "var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n", "var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n", "var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n", "var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n", "var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n", "var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n", "var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n", "var baseEach = require('./_baseEach'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n", "/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}\n\nmodule.exports = baseSortBy;\n", "var isSymbol = require('./isSymbol');\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n}\n\nmodule.exports = compareAscending;\n", "var compareAscending = require('./_compareAscending');\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n}\n\nmodule.exports = compareMultiple;\n", "var arrayMap = require('./_arrayMap'),\n baseGet = require('./_baseGet'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n baseSortBy = require('./_baseSortBy'),\n baseUnary = require('./_baseUnary'),\n compareMultiple = require('./_compareMultiple'),\n identity = require('./identity'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n}\n\nmodule.exports = baseOrderBy;\n", "var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n", "var baseFlatten = require('./_baseFlatten'),\n baseOrderBy = require('./_baseOrderBy'),\n baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nmodule.exports = sortBy;\n", "var baseIteratee = require('./_baseIteratee'),\n baseUniq = require('./_baseUniq');\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\n}\n\nmodule.exports = uniqBy;\n", "/**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\nfunction arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n}\n\nmodule.exports = arrayEvery;\n", "var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\nfunction baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n}\n\nmodule.exports = baseEvery;\n", "var arrayEvery = require('./_arrayEvery'),\n baseEvery = require('./_baseEvery'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\nfunction every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = every;\n", "var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n", "var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n", "var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n", "var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n", "var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n", "var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n", "var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n", "var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n", "var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n}\n\nmodule.exports = baseSome;\n", "var arraySome = require('./_arraySome'),\n baseIteratee = require('./_baseIteratee'),\n baseSome = require('./_baseSome'),\n isArray = require('./isArray'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\nfunction some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = some;\n", "var arrayMap = require('./_arrayMap');\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n}\n\nmodule.exports = baseValues;\n", "var baseValues = require('./_baseValues'),\n keys = require('./keys');\n\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\nfunction values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n}\n\nmodule.exports = values;\n", "/**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\nfunction fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n}\n\nmodule.exports = fromPairs;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\nfunction baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseIntersection;\n", "var isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\nfunction castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n}\n\nmodule.exports = castArrayLikeObject;\n", "var arrayMap = require('./_arrayMap'),\n baseIntersection = require('./_baseIntersection'),\n baseRest = require('./_baseRest'),\n castArrayLikeObject = require('./_castArrayLikeObject');\n\n/**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\nvar intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n});\n\nmodule.exports = intersection;\n", "var isSymbol = require('./isSymbol');\n\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\nfunction baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseExtremum;\n", "/**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\nfunction baseLt(value, other) {\n return value < other;\n}\n\nmodule.exports = baseLt;\n", "var baseExtremum = require('./_baseExtremum'),\n baseIteratee = require('./_baseIteratee'),\n baseLt = require('./_baseLt');\n\n/**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nfunction minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)\n : undefined;\n}\n\nmodule.exports = minBy;\n", "/**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\nfunction baseGt(value, other) {\n return value > other;\n}\n\nmodule.exports = baseGt;\n", "var baseExtremum = require('./_baseExtremum'),\n baseGt = require('./_baseGt'),\n baseIteratee = require('./_baseIteratee');\n\n/**\n * This method is like `_.max` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\nfunction maxBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt)\n : undefined;\n}\n\nmodule.exports = maxBy;\n", "// FIXME: This file should be named complex-product.jsx, as it is not a React\n// component.\n\nimport ReactDOM from \"react-dom\"\nimport React from \"react\"\n\nimport parseJSONData from \"../utilities/parseJSONData\"\n\nimport TranslationContext from \"../components/TranslationContext\"\nimport BrowsingOutOfRegionContext from \"../components/BrowsingOutOfRegionContext\"\nimport MarketContext from \"../components/MarketContext\"\n\nimport ComplexProductApp from \"../ComplexProduct/App\"\n\nconst node = document.getElementById(\"complex_product_data\")\n\nif (node) {\n const complexProduct = parseJSONData(node.dataset, \"complexProduct\")\n const products = parseJSONData(node.dataset, \"products\")\n const lineItems = parseJSONData(node.dataset, \"lineItems\")\n const translations = parseJSONData(node.dataset, \"translations\")\n const locale = node.dataset.locale || \"\"\n const stockLocationId: number = Number(node.dataset.stockLocationId)\n const countryIso = node.dataset.countryIso || \"\"\n const subFamily = node.dataset.subFamily\n const browsingOutOfRegion = node.dataset.browsingOutOfRegion === \"true\"\n\n ReactDOM.render(\n \n \n \n \n \n \n ,\n document.getElementById(\"react-complex-product\")\n )\n} else {\n console.error(\"Failed to initialize Complex Product app.\")\n}\n", "import React, { useEffect, useState } from \"react\"\n\nimport ColourPicker from \"./components/ColourPicker/ColourPicker\"\nimport FullPageTransition from \"./components/FullPageTransition\"\nimport ProductHeroInfo from \"./components/ProductHeroInfo\"\nimport Products from \"./components/Products\"\nimport ShowAllProducts from \"./components/ShowAllProducts\"\nimport VariantListing from \"./components/VariantListing\"\nimport TranslationContext, {\n Translations\n} from \"../components/TranslationContext\"\nimport getAssetPaths from \"../utilities/railsAssetPath\"\nimport AssetsContext, { Assets } from \"../components/AssetsContext\"\nimport ThreadFacts from \"./components/ThreadFacts\"\n\nimport { fetchProductData, ProductData } from \"./api\"\nimport FilterBar from \"./components/FilterBar\"\nimport BottomDrawer from \"./components/BottomDrawer\"\nimport Breadcrumbs from \"./components/Breadcrumbs\"\n\nimport computeColourTiles, { Filters } from \"./computeColourTiles\"\n\ninterface ComplexProductAppProps {\n complexProduct: any\n products: any[]\n lineItems: any[]\n subFamily: string | undefined\n}\n\nconst ComplexProductApp: React.FC = ({\n complexProduct,\n products,\n lineItems,\n subFamily\n}) => {\n const defaultProductId = products.find((product) => {\n return product.slug === subFamily\n })?.id\n\n const [assets, setAssets] = useState({})\n useEffect(() => {\n getAssetPaths({\n chevron: \"dmc/icons/chevron.svg\",\n colours: \"dmc/icons/colours.svg\",\n cross: \"dmc/icons/cross.svg\",\n filter: \"dmc/icons/filter.svg\",\n heart: \"dmc/icons/heart.svg\",\n leaves: \"dmc/icons/leaves.svg\",\n mail: \"dmc/icons/mail.svg\",\n needle: \"dmc/icons/needle.svg\",\n needlework: \"dmc/icons/needlework.svg\",\n ruler: \"dmc/icons/ruler.svg\",\n search: \"dmc/icons/search.svg\",\n skein: \"dmc/icons/skein.svg\",\n swatches: \"dmc/icons/swatches.svg\",\n tick: \"dmc/icons/tick.svg\",\n wash: \"dmc/icons/wash.svg\"\n }).then((fingerprintedAssetPaths) => setAssets(fingerprintedAssetPaths))\n }, [])\n\n const [productData, setProductData] = useState({\n products: [],\n optionTypes: [],\n variants: [],\n rgbs: [],\n colourCategories: [],\n optionValues: [],\n colourCodes: []\n })\n\n const [filters, setFilters] = useState({\n productIds: defaultProductId ? [defaultProductId] : [],\n sizeIds: [],\n lengthIds: [],\n colourCategoryIds: [],\n searchQuery: \"\",\n sortType: null\n })\n\n useEffect(() => {\n fetchProductData(complexProduct.id).then((json) => {\n setProductData(json)\n })\n }, [complexProduct.id])\n\n /* The idea behind this is that it will only ever be triggered once on page\n * load. If a subFamily is present, this will handle the firing of the initial\n * view_item event in the case that a subFamily is already set on page load.\n * If no subFamily is set, it does nothing.\n */\n useEffect(() => {\n if (subFamily) {\n const initialProductId = products.find((p) => p.slug == subFamily)?.id\n\n if (initialProductId) {\n trackEvent(initialProductId)\n }\n }\n }, [subFamily])\n\n const resetProductFilters = () =>\n setFilters((previousFilters) => ({\n ...previousFilters,\n productIds: []\n }))\n\n const selectProduct = (productId: number) => {\n setFilters((previousFilters) => ({\n ...previousFilters,\n productIds: [productId]\n }))\n\n trackEvent(productId)\n }\n\n // This handles the Google Tag Manager view_item event tracking.\n const trackEvent = (productId: number) => {\n const eventData = products.find(\n (p) => p.id == productId\n )?.gtm_view_item_event_data\n\n if (eventData) {\n window.dataLayer = window.dataLayer || []\n window.dataLayer.push(eventData)\n }\n }\n\n let colourTiles = computeColourTiles(productData, filters)\n\n const oneProductIsSelected = filters.productIds.length === 1\n\n const headerProduct = oneProductIsSelected\n ? products.find((product) => product.id === filters.productIds[0])\n : complexProduct\n\n const productHero = (translations: Translations) => (\n
\n \n
\n )\n\n const productsSection = oneProductIsSelected ? (\n \n ) : (\n \n )\n\n return (\n \n {(translations) => (\n <>\n \n \n\n {productHero(translations)}\n\n \n \n\n \n {productsSection}\n \n\n \n \n\n \n\n \n \n\n \n \n \n\n \n \n \n )}\n \n )\n}\n\nexport default ComplexProductApp\n", "import React from \"react\"\nimport sortBy from \"lodash/sortBy\"\n\nimport ColourCategoryComponent from \"./ColourCategory\"\n\nimport TranslationContext from \"../../../components/TranslationContext\"\nimport Cursor from \"./CursorProvider\"\n\nimport { ProductData, ColourCategory } from \"../../api\"\nimport { Filters } from \"../../computeColourTiles\"\n\ninterface ColourPickerProps {\n currentFilters: Filters\n setFilters: React.Dispatch>\n productData: ProductData\n}\n\nconst ColourPicker: React.FC = ({\n currentFilters,\n setFilters,\n productData\n}) => {\n const colourCategories = sortBy(\n productData.colourCategories,\n ({ position }) => position\n )\n\n const handleClick = (category: ColourCategory) => {\n setFilters((previousFilters) => ({\n ...previousFilters,\n colourCategoryIds: [category.id]\n }))\n }\n\n return (\n \n {(translations) => {\n return (\n
\n \n
\n

\n {translations.colour_picker_overlay_long}\n

\n

\n {translations.colour_picker_overlay_short}\n

\n
\n {colourCategories.map((category) => (\n handleClick(category)}\n />\n ))}\n
\n
\n )\n }}\n
\n )\n}\n\nexport default ColourPicker\n", "import React from \"react\"\n\nimport { CursorContext } from \"./CursorProvider\"\n\nconst ColourCategory = ({ colour = \"\", handleClick = () => {} }) => {\n return (\n \n {({ onCursor, updateCursorText }) => {\n return (\n {\n onCursor(\"pointer\")\n updateCursorText(colour)\n }}\n onMouseLeave={() => {\n onCursor(false)\n updateCursorText()\n }}\n />\n )\n }}\n \n )\n}\n\nexport default ColourCategory\n", "import React, { useEffect, useState, ReactNode } from \"react\"\nimport cx from \"classnames\"\n\ninterface CursorContextValue {\n // FIXME: Swap string for explicit possible values.\n onCursor: (cursorType: string | false) => void\n updateCursorText: (cursorText?: string) => void\n}\n\nexport const CursorContext = React.createContext({\n onCursor: (cursorType) => {},\n updateCursorText: (cursorText) => {}\n})\n\ninterface CursorProvider {\n children: ReactNode\n}\n\nconst CursorProvider: React.FC = ({ children }) => {\n const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 })\n const [cursor, setCursor] = useState<\"pointer\" | false>(false)\n const [text, setText] = useState(undefined)\n\n const onMouseMove = (event: MouseEvent) => {\n const { pageX: x, offsetY: y } = event\n setMousePosition({ x, y })\n }\n\n useEffect(() => {\n document.addEventListener(\"mousemove\", onMouseMove)\n\n return () => {\n document.removeEventListener(\"mousemove\", onMouseMove)\n }\n })\n\n const { x, y } = mousePosition\n const CURSOR_OFFSET = 15\n\n const onCursor = (cursorType: string | false) => {\n /* FIXME: is this just a complicated way of calling\n * `setCursor(cursorType)`?\n */\n if (cursorType === \"pointer\") {\n setCursor(\"pointer\")\n } else {\n setCursor(false)\n }\n }\n\n const updateCursorText = (updatedText: string | undefined = undefined) => {\n setText(updatedText)\n }\n\n return (\n \n \n \n \n \n \n \n {text}\n \n \n \n {children}\n \n )\n}\n\nexport default CursorProvider\n", "import CircleType from \"circletype\"\nimport React, { useEffect, useState } from \"react\"\n\nimport ShopNow from \"../../components/ShopNow\"\n\nimport TranslationContext from \"../../components/TranslationContext\"\n\ninterface FullPageTransitionProps {\n heroImage: string\n heading: string\n slug: string\n}\n\nconst FullPageTransition: React.FC = ({\n heroImage = \"\",\n heading,\n slug\n}) => {\n const [transitionOpen, setTransitionOpen] = useState(true)\n\n const transitionState = transitionOpen ? \"open\" : \"closed\"\n\n const closeTransition = () => {\n // Animate the transition from open to closed.\n setTransitionOpen(false)\n\n // After the animation, hide the full-page transition from the DOM so it\n // cannot be interacted with by users.\n setTimeout(() => {\n const container = document.getElementById(\n \"complex-product-full-page-transition\"\n )\n\n if (container) {\n container.classList.add(\n \"complex-product--full-page-transition__disabled\"\n )\n }\n }, 300)\n }\n\n useEffect(() => {\n const arch = document.getElementById(\n \"complex-product-full-page-transition-decorative-welcome\"\n )\n\n arch && new CircleType(arch).radius(250)\n }, [])\n\n return (\n \n \n \n {(translations) => translations.decorative_welcome}\n \n \n\n
\n

{heading}

\n
\n\n \n \n )\n}\n\nexport default FullPageTransition\n", "import React from \"react\"\n\nimport TranslationContext from \"./TranslationContext\"\nimport ActionButton from \"./ActionButton\"\n\ninterface ShopNowProps {\n onClick: () => void\n}\n\nconst ShopNow: React.FC = ({ onClick }) => {\n return (\n \n {(translations) => {\n return (\n
\n \n
\n )\n }}\n
\n )\n}\n\nexport default ShopNow\n", "import React from \"react\"\n\nimport ShopNow from \"../../components/ShopNow\"\nimport TranslationContext from \"../../components/TranslationContext\"\nimport BrowsingOutOfRegionContext from \"../../components/BrowsingOutOfRegionContext\"\n\ninterface ProductHeroInfo {\n product: any\n taxonName: string\n}\n\nconst ProductHeroInfo: React.FC = ({ product, taxonName }) => {\n let priceRange: JSX.Element | undefined\n\n if (product.min_price === product.max_price) {\n priceRange = (\n \n {(translations) => {\n let priceRangeString = translations.single_price_range.replace(\n \"$js_price\",\n product.min_price\n )\n return (\n \n )\n }}\n \n )\n } else if (!!product.min_price && !!product.max_price) {\n priceRange = (\n \n {(translations) => {\n let priceRangeString = translations.price_range\n .replace(\"$js_min_price\", product.min_price)\n .replace(\"$js_max_price\", product.max_price)\n return (\n \n )\n }}\n \n )\n }\n\n const scrollToVariants = () => {\n document\n .getElementById(\"complex-product-variant-listing\")\n ?.scrollIntoView({ behavior: \"smooth\" })\n }\n\n const imageSection = !!product?.header_product_selected_image ? (\n
\n \n
\n ) : undefined\n\n const productImage = product?.header_product_selected_image || \"\"\n\n return (\n
\n \n \n

{taxonName}

\n

\n {product.name}\n

\n\n \n {(browsingOutOfRegion) => {\n return !!browsingOutOfRegion ? \"\" : priceRange\n }}\n \n \n {product.product_description}\n

\n \n \n \n
\n )\n}\n\nexport default ProductHeroInfo\n", "import React from \"react\"\n\nimport TranslationContext, {\n Translations\n} from \"../../components/TranslationContext\"\nimport { Filters } from \"../computeColourTiles\"\n\ninterface ProductsProps {\n products: any[]\n selectProduct: (productId: number) => void\n}\n\nconst Products: React.FC = ({ products, selectProduct }) => {\n const productImage = (product: any, translations: Translations) =>\n product.header_product_image ? (\n \n ) : undefined\n\n const productList = (translations: Translations) =>\n products.map((product) => (\n selectProduct(product.id)}\n title={product.name}\n >\n

{product.name}

\n

\n {product.unique_selling_proposition}\n

\n {productImage(product, translations)}\n \n ))\n\n return (\n \n {(translations: Translations) => (\n
\n {productList(translations)}\n
\n )}\n
\n )\n}\n\nexport default Products\n", "import React from \"react\"\nimport TranslationContext from \"../../components/TranslationContext\"\n\ninterface ShowAllProductsProps {\n productName: string\n resetProductFilters: () => void\n}\n\nconst ShowAllProducts: React.FC = ({\n productName,\n resetProductFilters\n}) => {\n return (\n \n {(translations) => {\n return (\n
\n
\n \n \n \u2191\n
\n

\n {translations.see_all.toUpperCase()}{\" \"}\n {productName.toUpperCase()}\n

\n \n
\n \n )\n }}\n
\n )\n}\n\nexport default ShowAllProducts\n", "import React, { useState } from \"react\"\nimport VariantLightbox from \"./VariantLightbox\"\nimport VariantListingItem from \"./VariantListingItem\"\n\nimport { ColourTile } from \"../computeColourTiles\"\n\ninterface VariantListingProps {\n colourTiles: ColourTile[]\n products: any[]\n lineItems: any[]\n}\n\n/* FIXME: This component is misnamed. The tiles in this component represent\n * colours which may be available in one or multiple variants.\n */\nconst VariantListing: React.FC = ({\n colourTiles,\n products,\n lineItems\n}) => {\n const [selectedColourCode, setSelectedColourCode] = useState<\n string | undefined\n >()\n\n const [displayOutOfStock, setDisplayOutOfStock] = useState(false)\n\n const setColourCodeForLightbox = (colourCode = \"\") => {\n setSelectedColourCode(colourCode)\n }\n\n const getLightboxImageForVariantCode = (colourTile: ColourTile) => {\n return products.find(\n (product) => product.name === colourTile.variants[0].product.name\n )?.lightbox_image\n }\n\n const getProductDescriptionForVariantCode = (colourTile: ColourTile) => {\n return products.find(\n (product) => product.name === colourTile.variants[0].product.name\n )?.product_description\n }\n\n const variantLightboxIfSelected = (colourTile: ColourTile) => {\n return colourTile.colourCode === selectedColourCode ? (\n \n ) : undefined\n }\n\n const idForSingleVariantCode = (\n colourTile: ColourTile\n ): number | undefined => {\n if (isMultiVariant(colourTile)) return undefined\n\n return colourTile.variants[0].id\n }\n\n const isMultiVariant = (colourTile: ColourTile) =>\n colourTile.variants.length !== 1\n\n const outOfStock = (colourTile: ColourTile, isSelected: boolean) => {\n if (!isMultiVariant(colourTile)) {\n return !colourTile.variants[0].inStock\n } else if (isSelected && displayOutOfStock) {\n return displayOutOfStock\n } else {\n return false\n }\n }\n\n const variantListingItems = () =>\n colourTiles.map((colourTile) => {\n return (\n \n \n {variantLightboxIfSelected(colourTile)}\n \n )\n })\n\n return (\n \n {variantListingItems()}\n \n )\n}\n\nexport default VariantListing\n", "import React, { useState, useEffect } from \"react\"\n\nimport uniqBy from \"lodash/uniqBy\"\nimport every from \"lodash/every\"\nimport pick from \"lodash/pick\"\n\nimport Header from \"./VariantLightbox/Header\"\nimport Body from \"./VariantLightbox/Body\"\nimport Footer from \"./VariantLightbox/Footer\"\n\nimport TranslationContext, {\n Translations\n} from \"../../components/TranslationContext\"\n\nimport { ColourTile, OptionValue, Variant } from \"../computeColourTiles\"\nimport OutOfStock from \"../../components/OutOfStock\"\nimport { Image } from \"../api\"\n\ninterface SelectedOptions {\n shape?: OptionValue\n length?: OptionValue\n size?: OptionValue\n}\n\ntype SelectVariant = (variant: Variant) => void\n\ntype SelectOption = (\n optionType: \"shape\" | \"length\" | \"size\",\n optionValue: OptionValue\n) => void\n\ninterface VariantLightboxProps {\n colourTile: ColourTile\n lightboxImage: any\n productDescription: string\n closeLightbox: () => void\n displayOutOfStock: boolean\n setDisplayOutOfStock: (displayOutOfStock: boolean) => void\n lineItems: any[]\n}\n\n/* This function filters the given variants by the given selected options,\n * returning only the variants that fit the selected options.\n */\nconst filterVariants = (\n variants: Variant[],\n selectedOptions: SelectedOptions\n): Variant[] => {\n let filteredVariants = variants\n\n const shape = selectedOptions.shape\n if (shape) {\n filteredVariants = filteredVariants.filter(\n (variant) => variant.optionValues.shape?.id === shape.id\n )\n }\n\n const size = selectedOptions.size\n if (size) {\n filteredVariants = filteredVariants.filter(\n (variant) => variant.optionValues.size?.id === size.id\n )\n }\n\n const length = selectedOptions.length\n if (length) {\n filteredVariants = filteredVariants.filter(\n (variant) => variant.optionValues.length?.id === length.id\n )\n }\n\n return filteredVariants\n}\n\nconst getSelectedVariant = (\n selectedOptions: SelectedOptions,\n variants: Variant[]\n): Variant | null => {\n if (variants.length === 1) return variants[0]\n return (\n variants.find((variant) =>\n every(\n Object.entries(variantOptions(variant)),\n ([optionType, optionValue]) =>\n selectedOptions[optionType as \"shape\" | \"length\" | \"size\"]?.id ===\n optionValue.id\n )\n ) || null\n )\n}\n\nconst getVariantImage = (\n selectedOptions: SelectedOptions,\n variants: Variant[]\n): Image => {\n let filteredVariants = variants\n\n const shapeOption = selectedOptions.shape\n if (shapeOption) {\n filteredVariants = variants.filter(\n (variant) => variantOptions(variant).shape?.id === shapeOption.id\n )\n }\n\n const sizeOption = selectedOptions.size\n if (sizeOption) {\n filteredVariants = variants.filter(\n (variant) => variantOptions(variant).size?.id === sizeOption.id\n )\n }\n\n const lengthOption = selectedOptions.length\n if (lengthOption) {\n filteredVariants = variants.filter(\n (variant) => variantOptions(variant).length?.id === lengthOption.id\n )\n }\n\n return filteredVariants[0]?.images[0]\n}\n\nconst defaultSelection = (variants: Variant[]) => {\n if (variants.length === 1) {\n return variantOptions(variants[0])\n }\n\n const uniqueById = (optionValues: OptionValue[]) =>\n uniqBy(optionValues, \"id\").filter((v) => v)\n\n const shapes: OptionValue[] = uniqueById(\n variants.map((variant) => variant.optionValues.shape)\n )\n\n if (shapes.length === 1) {\n return {\n shape: shapes[0]\n }\n } else {\n return {}\n }\n}\n\nconst variantOptions = (variant: Variant): SelectedOptions =>\n pick(variant.optionValues, [\"shape\", \"size\", \"length\"])\n\nconst VariantLightbox: React.FC = ({\n colourTile,\n lightboxImage,\n productDescription,\n closeLightbox = () => {},\n displayOutOfStock,\n setDisplayOutOfStock = (displayOutOfStock) => {},\n lineItems\n}) => {\n const isMultiVariant = colourTile.variants.length != 1\n\n const [selectedOptions, setSelectedOptions] = useState(\n defaultSelection(colourTile.variants)\n )\n\n const selectOption: SelectOption = (optionType, optionValue) => {\n setSelectedOptions((previousState) => {\n let newSelectedOptions: SelectedOptions\n\n switch (optionType) {\n case \"shape\":\n newSelectedOptions = {\n shape: optionValue\n }\n break\n case \"size\":\n newSelectedOptions = {\n ...previousState,\n size: optionValue,\n length: undefined\n }\n break\n case \"length\":\n newSelectedOptions = {\n ...previousState,\n length: optionValue\n }\n break\n }\n\n /* At this level we should verify if there's only one possible selection\n * and select it.\n */\n const filteredVariants = filterVariants(\n colourTile.variants,\n newSelectedOptions\n )\n if (filteredVariants.length === 1) {\n newSelectedOptions = variantOptions(filteredVariants[0])\n }\n\n return newSelectedOptions\n })\n }\n\n const selectVariant: SelectVariant = (variant) => {\n setSelectedOptions(variantOptions(variant))\n }\n\n const selectedVariant = getSelectedVariant(\n selectedOptions,\n colourTile.variants\n )\n\n const variantImage = getVariantImage(selectedOptions, colourTile.variants)\n\n useEffect(() => {\n setDisplayOutOfStock((selectedVariant && !selectedVariant.inStock) || false)\n }, [selectedVariant])\n\n const displayVariantImage = variantImage ? (\n \n ) : (\n
\n )\n\n const priceSection = selectedVariant?.price\n ? selectedVariant.price\n : colourTile.minimumPrice\n\n const priceTranslation = (translations: Translations) => {\n if (priceSection == undefined) return\n\n return isMultiVariant && !selectedVariant?.price\n ? translations.minimum_price.replace(\"$js_minimum_price\", priceSection)\n : priceSection\n }\n\n return (\n
\n \n\n
\n \n {(translations) => {\n return (\n
\n
\n {displayVariantImage}\n
\n\n
\n {priceTranslation(translations)}\n
\n
\n )\n }}\n
\n\n
\n {selectedVariant && !selectedVariant?.inStock && (\n \n )}\n \n {displayOutOfStock ? null : (\n \n )}\n
\n
\n
\n )\n}\n\nexport {\n VariantLightbox as default,\n SelectedOptions,\n SelectOption,\n SelectVariant\n}\n", "import React from \"react\"\nimport AssetsContext from \"../../../components/AssetsContext\"\nimport TranslationContext, {\n Translations\n} from \"../../../components/TranslationContext\"\nimport BrowsingOutOfRegionContext from \"../../../components/BrowsingOutOfRegionContext\"\n\ninterface HeaderProps {\n productName: string\n colourCode: string\n colourPresentation: string | null\n masterSku: string\n selectedSku: string | undefined\n price: string\n selectedPrice?: string\n isMultiVariant: boolean\n inStock: boolean | undefined\n closeLightbox: () => void\n}\n\nconst Header: React.FC = ({\n productName,\n colourCode,\n colourPresentation,\n masterSku,\n selectedSku,\n price,\n selectedPrice,\n isMultiVariant,\n inStock,\n closeLightbox = () => {}\n}) => {\n const priceSection = (translations: Translations) => {\n if (price == undefined) return\n if (isMultiVariant && !selectedPrice) {\n price = translations.minimum_price.replace(\"$js_minimum_price\", price)\n } else if (selectedPrice && !inStock) {\n price = translations.out_of_stock\n }\n return

{price}

\n }\n\n return (\n \n {(translations: Translations) => {\n return (\n \n {(assets) => {\n return (\n
\n closeLightbox()}\n >\n \n
\n
\n
\n

\n {productName}\n

\n
\n
\n
\n
\n

\n {colourCode}\n

\n {!!colourPresentation ? (\n <>\n

\n \u00B7\n

\n

\n {colourPresentation}\n

\n \n ) : null}\n

\u00B7

\n

\n {selectedSku ?? masterSku}\n

\n
\n
\n \n {(browsingOutOfRegion) =>\n browsingOutOfRegion ? \"\" : priceSection(translations)\n }\n \n
\n
\n )\n }}\n
\n )\n }}\n
\n )\n}\n\nexport default Header\n", "import React, { useEffect, useState } from \"react\"\nimport MultiVariantInfoTab from \"./MultiVariantInfoTab\"\n\nimport InfoTab from \"./InfoTab\"\nimport OffersTab from \"./OffersTab\"\nimport RelatedTab from \"./RelatedTab\"\nimport TabSection from \"./TabSection\"\n\nimport { fetchRelatedProducts } from \"../../api\"\nimport { ColourTile, Variant } from \"../../computeColourTiles\"\nimport {\n SelectedOptions,\n SelectOption,\n SelectVariant\n} from \"../VariantLightbox\"\n\nconst fetchRelation = ({\n relationName,\n productSlug,\n callback\n}: {\n relationName: string\n productSlug: string\n callback: (data: any) => void\n}) => {\n fetchRelatedProducts({\n productSlug,\n relationName,\n page: 1\n }).then((json) => {\n if (json.error) {\n throw json.error\n }\n\n callback(json.related_products)\n })\n}\n\ninterface BodyParams {\n colourTile: ColourTile\n lightboxImage: string\n productDescription: string\n isMultiVariant: boolean\n selectOption: SelectOption\n selectedOptions: SelectedOptions\n selectVariant: SelectVariant\n selectedVariant: Variant | null\n}\n\nconst Body: React.FC = ({\n colourTile,\n lightboxImage,\n productDescription,\n isMultiVariant,\n selectOption,\n selectedOptions,\n selectVariant,\n selectedVariant\n}) => {\n const [selectedTab, setSelectedTab] = useState(\"info\")\n const [relatedProducts, setRelatedProducts] = useState([])\n const [productsWithOffers, setProductsWithOffers] = useState([])\n\n const loadProducts = () => {\n fetchRelation({\n productSlug: colourTile.variants[0].product.slug,\n relationName: \"related_products\",\n callback: setRelatedProducts\n })\n\n fetchRelation({\n productSlug: colourTile.variants[0].product.slug,\n relationName: \"products_with_offers\",\n callback: setProductsWithOffers\n })\n }\n\n useEffect(() => loadProducts(), [])\n\n let visibleTab\n\n switch (selectedTab) {\n case \"offers\":\n visibleTab = \n break\n case \"related\":\n visibleTab = \n break\n case \"info\":\n default:\n visibleTab = isMultiVariant ? (\n \n ) : (\n \n )\n }\n\n return (\n
\n \n {visibleTab}\n
\n )\n}\n\nexport default Body\n", "import React, { useState } from \"react\"\n\nimport ProductProperty from \"./ProductProperty\"\nimport VariantTypeSelector from \"./VariantTypeSelector\"\nimport VariantTypeDropdownSelector from \"./VariantTypeDropdownSelector\"\n\nimport AssetsContext from \"../../../components/AssetsContext\"\nimport TranslationContext from \"../../../components/TranslationContext\"\n\nimport { ColourTile, Variant } from \"../../computeColourTiles\"\nimport {\n SelectedOptions,\n SelectOption,\n SelectVariant\n} from \"../VariantLightbox\"\n\ninterface MultiVariantInfoTabProps {\n colourTile: ColourTile\n productDescription: string\n selectOption: SelectOption\n selectedOptions: SelectedOptions\n selectVariant: SelectVariant\n selectedVariant: Variant | null\n}\n\nconst MultiVariantInfoTab: React.FC = ({\n colourTile,\n productDescription,\n selectOption,\n selectedOptions,\n selectVariant,\n selectedVariant\n}) => {\n const [readMore, setReadMore] = useState(false)\n\n const colourDescription = colourTile.description\n\n return (\n \n {(translations) => {\n return (\n \n {(assets) => {\n return (\n
\n
\n
\n
\n {colourDescription || productDescription}\n
\n \n
\n
\n {colourDescription || productDescription ? (\n
\n {readMore\n ? colourDescription || productDescription\n : (\n colourDescription || productDescription\n )?.substring(0, 130)}\n  \n {readMore ? (\n setReadMore(false)}\n >\n {translations.read_less}\n
\n ) : (\n setReadMore(true)}\n >\n {translations.read_more}\n
\n )}\n
\n ) : null}\n \n
\n \n
\n {/* FIXME: When we have the correct data for this section this\n can be uncommented and 'text' section will need to be\n updated. */}\n \n {/* */}\n
\n \n )\n }}\n
\n )\n }}\n
\n )\n}\n\nexport default MultiVariantInfoTab\n", "import React from \"react\"\n\nconst ProductProperty = ({ text = \"\", iconSrc = \"\" }) => {\n return (\n // FIXME: When we have the correct data for this section this can be uncommented\n // and 'text' section will need to be updated as it is currently a hard coded\n // translation representing false data.\n
\n \n
\n )\n}\n\nexport default ProductProperty\n", "import React from \"react\"\nimport uniqBy from \"lodash/uniqBy\"\n\nimport VariantType from \"./VariantType\"\n\nimport TranslationContext from \"../../../components/TranslationContext\"\nimport AssetsContext from \"../../../components/AssetsContext\"\n\nimport { SelectedOptions, SelectOption } from \"../VariantLightbox\"\nimport { ColourTile, Variant, OptionValue } from \"../../computeColourTiles\"\n\nconst uniqueById = (optionValues: OptionValue[]) =>\n uniqBy(optionValues, \"id\").filter((v) => v)\n\nconst TypeSelector = ({\n title,\n children\n}: {\n title: string\n children: React.ReactNode\n}) => (\n
\n

{title}

\n
{children}
\n
\n)\n\nconst ShapeSelector: React.FC<{\n title: string\n values: OptionValue[]\n selectedOptions: SelectedOptions\n selectOption: SelectOption\n}> = ({ title, values, selectedOptions, selectOption }) => {\n return (\n \n {values.map((option) => (\n selectOption(\"shape\", option)}\n />\n ))}\n \n )\n}\n\nconst SizeSelector: React.FC<{\n title: string\n values: OptionValue[]\n selectedOptions: SelectedOptions\n selectOption: SelectOption\n}> = ({ title, values, selectedOptions, selectOption }) => {\n return (\n \n {values.map((option) => (\n selectOption(\"size\", option)}\n />\n ))}\n \n )\n}\n\nconst LengthSelector: React.FC<{\n title: string\n values: OptionValue[]\n selectedOptions: SelectedOptions\n selectOption: SelectOption\n}> = ({ title, values, selectedOptions, selectOption }) => {\n return (\n \n {values.map((option) => (\n selectOption(\"length\", option)}\n />\n ))}\n \n )\n}\n\ninterface VariantTypeSelectorProps {\n colourTile: ColourTile\n selectedOptions: SelectedOptions\n selectOption: SelectOption\n}\n\nconst VariantTypeSelector: React.FC = ({\n colourTile,\n selectedOptions,\n selectOption\n}) => {\n let filteredVariants = colourTile.variants\n\n const shapes: OptionValue[] = uniqueById(\n filteredVariants.map((variant) => variant.optionValues.shape)\n )\n\n if (selectedOptions.shape) {\n filteredVariants = filteredVariants.filter(\n (variant) => variant.optionValues.shape?.id === selectedOptions.shape!.id\n )\n }\n\n let sizes: OptionValue[] = uniqueById(\n filteredVariants.map((variant) => variant.optionValues.size)\n )\n\n if (selectedOptions.size) {\n filteredVariants = filteredVariants.filter(\n (variant) => variant.optionValues.size?.id === selectedOptions.size!.id\n )\n }\n\n let lengths: OptionValue[] = uniqueById(\n filteredVariants.map((variant) => variant.optionValues.length)\n )\n\n /* FIXME: There is a glaring issue with the display logic below. It will not\n * work if a product has only a shape and length.\n */\n return (\n \n {(translations) => (\n \n {(assets) => (\n
\n {shapes.length > 0 ? (\n \n ) : null}\n {shapes.length === 0 || selectedOptions.shape ? (\n \n ) : null}\n {(shapes.length === 0 && sizes.length === 0) ||\n selectedOptions.size ? (\n \n ) : null}\n
\n )}\n
\n )}\n
\n )\n}\n\nexport { VariantTypeSelectorProps, VariantTypeSelector as default }\n", "import React from \"react\"\n\nimport AssetsContext from \"../../../components/AssetsContext\"\n\nimport { OptionValue, Variant } from \"../../computeColourTiles\"\n\ninterface VariantTypeProps {\n id: number | string\n type: string\n imageSrc?: string\n text: string\n variant?: Variant | null\n selected: boolean\n handleChange: () => void\n}\n\nconst VariantType: React.FC = ({\n id,\n type,\n imageSrc = \"\",\n text,\n variant = null,\n selected = false,\n handleChange\n}) => {\n const image =\n imageSrc !== \"\" ? (\n \n ) : (\n \"\"\n )\n\n const variantTypeClassName =\n imageSrc !== \"\"\n ? \"variant-lightbox__variant-type\"\n : \"variant-lightbox__variant-type-sizing\"\n\n const inputId = `option-${type}-${id}`\n\n return (\n \n {(assets) => {\n return (\n \n )\n }}\n \n )\n}\n\nexport default VariantType\n", "import React from \"react\"\nimport uniqBy from \"lodash/uniqBy\"\n\nimport VariantType from \"./VariantType\"\nimport VariantTypeDropdown from \"./VariantTypeDropdown\"\n\nimport { VariantTypeSelectorProps } from \"./VariantTypeSelector\"\nimport { SelectVariant } from \"../VariantLightbox\"\nimport { OptionValue, Variant } from \"../../computeColourTiles\"\n\nconst uniqueById = (optionValues: OptionValue[]) =>\n uniqBy(optionValues, \"id\").filter((v) => v)\n\ninterface VariantTypeDropdownSelectorProps extends VariantTypeSelectorProps {\n selectVariant: SelectVariant\n selectedVariant: Variant | null\n}\n\nconst VariantTypeDropdownSelector: React.FC<\n VariantTypeDropdownSelectorProps\n> = ({\n colourTile,\n selectOption,\n selectedOptions,\n selectVariant,\n selectedVariant\n}) => {\n let filteredVariants = colourTile.variants\n\n const shapes: OptionValue[] = uniqueById(\n filteredVariants.map((variant) => variant.optionValues.shape)\n )\n\n if (selectedOptions.shape) {\n filteredVariants = filteredVariants.filter(\n (variant) => variant.optionValues.shape?.id === selectedOptions.shape!.id\n )\n }\n\n const variantValues = filteredVariants.map((variant) => ({\n label: variant.mobileDescription,\n value: variant.id.toString(10)\n }))\n\n return (\n
\n
\n
\n {shapes.map((option) => {\n return (\n selectOption(\"shape\", option)}\n />\n )\n })}\n
\n
\n {(shapes.length === 0 || selectedOptions.shape !== undefined) && (\n {\n if (value) {\n selectVariant(\n colourTile.variants.find(\n ({ id }) => id === parseInt(value, 10)\n )!\n )\n } else {\n /* FIXME: This is a hack. The goal here is to just unselect\n * all the other options.\n */\n selectOption(\"shape\", selectedOptions.shape!)\n }\n }}\n />\n )}\n
\n )\n}\n\nexport default VariantTypeDropdownSelector\n", "import React, { useState } from \"react\"\n\nimport TranslationContext from \"../../../components/TranslationContext\"\n\ninterface VariantTypeDropdownProps {\n selectedValue: string | undefined\n values: { label: string; value: string }[]\n handleChange: (value: string) => void\n}\n\nconst VariantTypeDropdown: React.FC = ({\n selectedValue,\n values,\n handleChange\n}) => {\n const selectedValueLabel = values.find(\n ({ value }) => value === selectedValue\n )?.label\n\n return (\n \n {(translations) => (\n
\n {\n // The variant-type-dropdown-select class is displayed visually\n // instead of the select tag to allow styling to match Figma\n // design.\n }\n
\n
{`${translations.size_label}/${translations.length_label}`}
\n
\n {selectedValueLabel || translations.select}\n
\n
\n
\n\n {\n handleChange(e.target.value)\n }}\n >\n \n {values.map((value) => (\n \n ))}\n \n
\n )}\n
\n )\n}\n\nexport default VariantTypeDropdown\n", "import React, { useState } from \"react\"\n\nimport ProductProperty from \"./ProductProperty\"\n\nimport AssetsContext from \"../../../components/AssetsContext\"\nimport TranslationContext, {\n Translations\n} from \"../../../components/TranslationContext\"\n\ninterface InfoTabProps {\n colourDescription: string | null\n productDescription: string\n lightboxImage: string\n}\n\nconst InfoTab: React.FC = ({\n colourDescription = \"\",\n productDescription,\n lightboxImage\n}) => {\n const [readMore, setReadMore] = useState(false)\n\n return (\n \n {(translations: Translations) => {\n return (\n \n {(assets) => {\n return (\n
\n
\n
\n
\n {colourDescription || productDescription}\n
\n
\n
\n {colourDescription || productDescription ? (\n
\n {readMore\n ? colourDescription || productDescription\n : (\n colourDescription || productDescription\n )?.substring(0, 130)}\n  \n {readMore ? (\n setReadMore(false)}\n >\n {translations.read_less}\n
\n ) : (\n setReadMore(true)}\n >\n {translations.read_more}\n
\n )}\n
\n ) : null}\n
\n
\n {/* FIXME: When we have the correct data for this section this\n can be uncommented and 'text' section will need to be\n updated. */}\n \n {/* */}\n
\n \n
\n \n
\n \n )\n }}\n
\n )\n }}\n
\n )\n}\n\nexport default InfoTab\n", "import React from \"react\"\n\nimport ProductCardCarousel from \"../../../components/ProductCardCarousel\"\n\nimport TranslationContext from \"../../../components/TranslationContext\"\n\nconst OffersTab = ({ productsWithOffers = [] }) => {\n return (\n \n {(translations) => {\n return (\n
\n
\n {translations.offers_tab_intro}\n
\n \n
\n )\n }}\n
\n )\n}\n\nexport default OffersTab\n", "import React, { useEffect } from \"react\"\n\nimport Flickity from \"flickity\"\n\nimport ProductCard from \"./ProductCard\"\n\nimport BrowsingOutOfRegionContext from \"../components/BrowsingOutOfRegionContext\"\n\ninterface ProductCardCarouselProps {\n products: any[]\n}\n\nconst ProductCardCarousel: React.FC = ({\n products = []\n}) => {\n let flkty\n let flktyDots\n\n useEffect(() => {\n flkty = new Flickity(\".gallery\", {\n wrapAround: true,\n imagesLoaded: true,\n prevNextButtons: true,\n freeScroll: false,\n pageDots: false,\n draggable: false,\n groupCells: 4,\n initialIndex: 0,\n cellAlign: \"center\"\n })\n\n flktyDots = new Flickity(\".gallery-mobile\", {\n wrapAround: true,\n imagesLoaded: true,\n prevNextButtons: false,\n freeScroll: false,\n pageDots: true,\n draggable: true,\n groupCells: 2,\n initialIndex: 0,\n cellAlign: \"left\"\n })\n }, [])\n\n const extraInfo = (product: any) => {\n if (!product.colourPresentation || !product.colourCode) return\n return `${product.colourPresentation} ${product.colourCode}`\n }\n\n const getImage = (product: any) => {\n if (product.image) return product.image\n if (product.skein) return product.skein\n return\n }\n\n return (\n \n {(browsingOutOfRegion) => (\n
\n
\n
\n {products.map((product, idx) => (\n
\n \n
\n ))}\n
\n
\n
\n
\n {products.map((product, idx) => (\n
\n \n
\n ))}\n
\n
\n
\n )}\n
\n )\n}\n\nexport default ProductCardCarousel\n", "import React from \"react\"\n\ninterface ProductCardProps {\n image?: any\n productName: string\n extraInfo?: string\n price: string\n salePrice?: string\n slug?: string\n}\n\nconst ProductCard: React.FC = ({\n image = {},\n productName,\n extraInfo = \"\",\n price,\n salePrice = \"\",\n slug = \"\"\n}) => {\n const productPath = `/products/${slug}`\n\n const headerSection =\n extraInfo !== \"\" ? (\n
\n

{productName}

\n

{extraInfo}

\n
\n ) : (\n
\n

{productName}

\n
\n )\n\n const imageSection =\n Object.keys(image).length !== 0 ? (\n
\n \n
\n ) : (\n
\n )\n\n const priceSection =\n salePrice !== \"\" ? (\n
\n {price}\n {salePrice}\n
\n ) : (\n
\n {price}\n
\n )\n\n return (\n
  • \n \n {imageSection}\n {headerSection}\n {priceSection}\n \n
  • \n )\n}\n\nexport default ProductCard\n", "import React from \"react\"\n\nimport ProductCardCarousel from \"../../../components/ProductCardCarousel\"\n\nimport TranslationContext from \"../../../components/TranslationContext\"\n\nconst RelatedTab = ({ relatedProducts = [] }) => {\n return (\n \n {(translations) => {\n return (\n
    \n
    \n {translations.related_tab_intro}\n
    \n \n
    \n )\n }}\n
    \n )\n}\n\nexport default RelatedTab\n", "import React from \"react\"\n\nimport TranslationContext, {\n Translations\n} from \"../../../components/TranslationContext\"\nimport AssetsContext from \"../../../components/AssetsContext\"\n\nimport VariantLightboxTab from \"./VariantLightboxTab\"\n\ninterface VariantLightboxTabSectionProps {\n selectedTab: string\n setSelectedTab: React.Dispatch\n}\n\nconst VariantLightboxTabSection: React.FC = ({\n selectedTab,\n setSelectedTab\n}) => {\n const isTabSelected = (name: string) => name === selectedTab\n\n const tabs = (translations: Translations) => {\n return {\n info: translations.info,\n related: translations.related,\n offers: translations.offers\n }\n }\n\n // FIXME: Until we start implementing the functionality with the SVG\n // we are commenting out its img tag. As soon as we implement the functionality\n // this tag should be uncommented and the SVG should be styled accordingly.\n // See: DMC-341 for discussion.\n return (\n \n {(translations: Translations) => {\n return (\n \n {(assets) => {\n return (\n
    \n
    \n {Object.entries(tabs(translations)).map((tab, idx) => {\n return (\n \n )\n })}\n
    \n
    \n {/* */}\n
    \n
    \n )\n }}\n
    \n )\n }}\n
    \n )\n}\n\nexport default VariantLightboxTabSection\n", "import React from \"react\"\n\ninterface VariantLightboxTab {\n name: any\n text: string\n isSelected: boolean\n setSelectedTab: (name: any) => void\n}\n\nconst VariantLightboxTab: React.FC = ({\n name,\n text,\n isSelected,\n setSelectedTab\n}) => {\n return (\n
    \n \n
    \n )\n}\n\nexport default VariantLightboxTab\n", "import some from \"lodash/some\"\nimport values from \"lodash/values\"\nimport debounce from \"lodash/debounce\"\nimport aa from \"search-insights\"\n\nimport { handleErrors } from \"@warp/utilities/errors\"\nimport getLocaleParams from \"../utilities/localeParams\"\n\ndeclare global {\n interface Window {\n miniCartAdded: any\n }\n}\n\n/* IMPORTANT: This type must be kept in sync with whatever is returned by the\n * product data API endpoint. Failure to do so may result in production bugs.\n */\ninterface ProductData {\n products: Product[]\n optionTypes: OptionType[]\n variants: Variant[]\n rgbs: RGB[]\n colourCategories: ColourCategory[]\n optionValues: OptionValue[]\n colourCodes: ColourCode[]\n}\n\ninterface Product {\n id: number\n name: string\n slug: string\n sku: string\n}\n\ninterface OptionType {\n id: number\n name: string\n presentation: string\n position: number\n}\n\ninterface OptionValue {\n id: number\n name: string\n presentation: string\n displayName: string\n position: string\n optionTypeId: number\n imageSrc?: string\n}\n\ninterface Variant {\n id: number\n complexColourId: number\n sku: string\n images: Image[]\n price: string\n priceCents: number\n inStock: boolean\n productId: number\n optionValueIds: number[]\n mobileDescription: string\n recommendation: number\n originalPrice: string | null\n}\n\ninterface RGB {\n id: number\n colourCategoryIds: number[]\n}\n\ninterface ColourCategory {\n id: number\n position: number\n name: string\n presentation: string\n hexCode: string | null\n}\n\ninterface ColourCode {\n id: number\n code: string\n rgbIds: number[]\n swatch?: Image\n presentation: string\n description: string\n colourCategoryIds: number[]\n}\n\ninterface Image {\n url: string\n srcsets: string\n sizes: string\n alt: string\n}\n\nconst [countryIso, locale] = getLocaleParams()\n\nconst isProductDataLoaded = (productData: ProductData): boolean =>\n some(values(productData), (data) =>\n Array.isArray(data) ? !!data.length : !!Object.keys(data).length\n )\n\nconst fetchProductData = (complexProductId: string): Promise => {\n const spreeApiUrl = `/api/quilt/complex_products/${complexProductId}/product_data`\n\n return fetch(spreeApiUrl).then((response) => response.json())\n}\n\nconst fetchRelatedProducts = ({\n productSlug,\n page,\n relationName\n}: {\n productSlug: string\n page: number\n relationName: string\n}) => {\n const spreeApiUrl = `/api/quilt/products/${productSlug}/related_products?`\n\n let queryParameters = new URLSearchParams({\n page: page.toString(10),\n locale: locale,\n country_iso: countryIso\n })\n queryParameters.append(\"relation_name\", relationName)\n\n return fetch(spreeApiUrl + queryParameters).then((response) =>\n response.json()\n )\n}\n\nconst alterCart = ({\n quantity,\n variantId\n}: {\n quantity: number\n variantId: number\n}) => {\n const spreeApiUrl = `/api/quilt/complex_products/alter_cart?`\n let queryParameters = new URLSearchParams({\n quantity: quantity.toString(10),\n variant_id: variantId.toString(10),\n locale: locale,\n country_iso: countryIso\n })\n\n const csrfToken = document\n .querySelector(\"meta[name=csrf-token]\")\n ?.getAttribute(\"content\")\n\n return fetch(spreeApiUrl + queryParameters, {\n method: \"POST\",\n headers: {\n \"X-CSRF-Token\": csrfToken ?? \"\"\n }\n })\n .then((response) => {\n return response.ok\n ? response.json()\n : Promise.reject(handleErrors(response))\n })\n .then((json) => {\n if (json[\"error\"]) {\n window.alert(\"Unable to process your request. Please try again later.\")\n } else if (window.miniCartAdded) {\n window.miniCartAdded(json.miniCartAdded, json.miniCart, json.itemCount)\n\n window.dataLayer = window.dataLayer || []\n\n // Clear the previous ecommerce object.\n window.dataLayer.push({ ecommerce: null })\n window.dataLayer.push(json.gtmOrder)\n\n // We send Algolia data through the Insights API.\n if (!!json.algoliaData?.insightsData?.userToken) {\n aa(\"init\", {\n appId: json.algoliaData.appId,\n apiKey: json.algoliaData.apiKey,\n region: \"de\",\n // The user token will only be present in the DOM if the user\n // has consented through Cookiebot.\n useCookie: true\n })\n\n aa(json.algoliaData.methodName, json.algoliaData.insightsData)\n }\n }\n\n return json\n })\n}\n\nconst debouncedAlterCart = debounce(alterCart, 1000)\n\nexport {\n ProductData,\n Product,\n Variant,\n ColourCode,\n OptionType,\n OptionValue,\n Image,\n ColourCategory,\n isProductDataLoaded,\n fetchProductData,\n fetchRelatedProducts,\n alterCart,\n debouncedAlterCart\n}\n", "import React, { useState } from \"react\"\n\nimport QuantityPicker from \"../../../components/QuantityPicker\"\nimport AddToBasket from \"../../../components/AddToBasket\"\n\nimport BrowsingOutOfRegionContext from \"../../../components/BrowsingOutOfRegionContext\"\nimport { alterCart } from \"../../api\"\n\nimport { SelectedOptions } from \"../VariantLightbox\"\nimport { Variant } from \"../../computeColourTiles\"\n\ndeclare global {\n interface Window {\n dataLayer: undefined | any[]\n }\n}\n\ninterface FooterProps {\n isMultiVariant: boolean\n selectedOptions: SelectedOptions\n selectedVariant: Variant | null\n lineItems: any[]\n}\n\nconst Footer: React.FC = ({\n selectedVariant,\n isMultiVariant,\n selectedOptions,\n lineItems\n}) => {\n const lineItem = selectedVariant\n ? lineItems.find((lineItem) => lineItem.variant_id === selectedVariant.id)\n : null\n const existingQuantity = lineItem ? lineItem.quantity : 0\n console.log(existingQuantity)\n const [quantity, setQuantity] = useState(1)\n\n const addToBasketOnClick = () => {\n if (selectedVariant)\n alterCart({\n quantity: quantity + existingQuantity,\n variantId: selectedVariant.id\n })\n }\n\n const updateQuantity = (amount: number) => {\n setQuantity(amount >= 1 ? amount : 1)\n }\n\n const optionInfoSection = () => {\n if (!isMultiVariant || !selectedVariant) {\n return\n }\n\n return (\n
    \n {selectedOptions.shape ? (\n <>\n

    \n {selectedOptions.shape.displayName}\n

    \n\n

    \u00B7

    \n \n ) : null}\n\n {selectedOptions.size ? (\n <>\n

    \n {selectedOptions.size.displayName}\n

    \n\n

    \u00B7

    \n \n ) : null}\n\n {selectedOptions.length ? (\n

    \n {selectedOptions.length.displayName}\n

    \n ) : null}\n
    \n )\n }\n\n return (\n \n {(browsingOutOfRegion) => (\n <>\n
    \n {optionInfoSection()}\n

    \n {browsingOutOfRegion ? \"\" : selectedVariant?.price}\n

    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n )}\n
    \n )\n}\n\nexport default Footer\n", "import React, { useState } from \"react\"\nimport AssetsContext from \"../../components/AssetsContext\"\nimport QuantityPicker from \"../../components/QuantityPicker\"\n\nimport TranslationContext, {\n Translations\n} from \"../../components/TranslationContext\"\nimport BrowsingOutOfRegionContext from \"../../components/BrowsingOutOfRegionContext\"\nimport { debouncedAlterCart, Image } from \"../api\"\n\ninterface VariantListingItemProps {\n swatch?: Image\n colourCode: string\n onSale: boolean\n numberOfOptions: number\n variantId: number | undefined\n isSelected: boolean\n isMultiVariant: boolean\n displayOutOfStock: boolean\n openLightboxForColourCode?: (colourCode: string) => void\n lineItems: any[]\n}\n\nconst VariantListingItem: React.FC = ({\n swatch,\n colourCode,\n onSale,\n numberOfOptions,\n variantId = null,\n isSelected,\n isMultiVariant,\n displayOutOfStock,\n openLightboxForColourCode = (colourCode) => {},\n lineItems\n}) => {\n const lineItem = lineItems.find(\n (lineItem) => lineItem.variant_id === variantId\n )\n const [quantity, setQuantity] = useState(lineItem ? lineItem.quantity : 0)\n\n const swatchImage =\n swatch != undefined ? (\n \n ) : (\n
    \n )\n\n const selectedTriangle = isSelected ? (\n
    \n ) : undefined\n\n const itemInteractionSection = (translations: Translations) => {\n if (displayOutOfStock) {\n return (\n

    \n {translations.notify_me}\n

    \n )\n }\n if (isSelected) {\n return (\n

    \n {translations.number_of_options.replace(\n \"$js_number_of_options\",\n numberOfOptions.toString(10)\n )}\n

    \n )\n } else if (!isMultiVariant) {\n return (\n \n {(browsingOutOfRegion) => (\n
    \n {\n if (variantId) {\n debouncedAlterCart({\n quantity: quantityValue,\n variantId: variantId\n })\n }\n }}\n />\n
    \n )}\n
    \n )\n } else {\n return (\n
    \n openLightboxForColourCode(colourCode)}\n >\n {translations.select.toUpperCase()}\n \n
    \n )\n }\n }\n\n return (\n \n {(translations) => (\n \n {(assets) => (\n \n openLightboxForColourCode(colourCode)}\n >\n {onSale ? (\n
    \n {translations.sale}\n
    \n ) : (\n \"\"\n )}\n \n \n \n \n {colourCode}\n \n \n \n
    \n {displayOutOfStock ? (\n <>\n
    \n \n \n ) : null}\n {swatchImage}\n
    \n \n {itemInteractionSection(translations)}\n {selectedTriangle}\n
    \n )}\n \n )}\n \n )\n}\n\nexport default VariantListingItem\n", "import React from \"react\"\n\nimport TranslationContext from \"../../components/TranslationContext\"\n\n/* FIXME: Terrible name for this type, but the data is structured in a way that\n * makes absolutely no sense to me.\n */\ninterface PropertyInfo {\n id: string\n value: string\n}\n\ninterface ProductProperty {\n icon_path: string\n property: PropertyInfo\n}\n\ninterface ThreadFactsProps {\n currentProductProperties: ProductProperty[]\n}\n\nconst ThreadFacts: React.FC = ({\n currentProductProperties = []\n}) => {\n const threadFactsGrid = () => {\n return currentProductProperties.map((productProperty) => {\n return (\n
    \n
    \n \"\"\n
    \n

    {productProperty.property.value}

    \n
    \n )\n })\n }\n\n return (\n \n {(translations) => {\n return (\n
    \n {currentProductProperties.length > 0 && (\n \n )}\n
    {threadFactsGrid()}
    \n
    \n )\n }}\n
    \n )\n}\n\nexport default ThreadFacts\n", "import React from \"react\"\n\nimport FilterDropdown from \"./FilterDropdown\"\nimport SearchBar from \"./SearchBar\"\n\nimport { ProductData } from \"../api\"\nimport { Filters } from \"../computeColourTiles\"\nimport getFilterOptions from \"../filterTypes\"\n\nimport TranslationContext, {\n Translations\n} from \"../../components/TranslationContext\"\n\ninterface FilterBarProps {\n currentFilters: Filters\n setFilters: React.Dispatch>\n productData: ProductData\n trackEvent: (productId: number) => void\n}\n\nconst FilterBar: React.FC = ({\n currentFilters,\n setFilters,\n productData,\n trackEvent\n}) => (\n \n {(translations) => {\n const clearOptions = () => {\n setFilters({\n productIds: [],\n sizeIds: [],\n lengthIds: [],\n colourCategoryIds: [],\n searchQuery: \"\",\n sortType: null\n })\n }\n\n const setQuery = (query: string) => {\n setFilters((previousQuery) => ({\n ...previousQuery,\n searchQuery: query,\n productIds: [],\n sizeIds: [],\n lengthIds: [],\n colourCategoryIds: []\n }))\n }\n\n const productOptions = getFilterOptions(\n productData,\n currentFilters,\n \"product\"\n )\n const sizeOptions = getFilterOptions(productData, currentFilters, \"size\")\n const lengthOptions = getFilterOptions(\n productData,\n currentFilters,\n \"length\"\n )\n const colourCategoryOptions = getFilterOptions(\n productData,\n currentFilters,\n \"colourCategory\"\n )\n\n const labelForOptionTypeName = (optionTypeName: String) => {\n return productData.optionTypes.find(\n ({ name }) => name === optionTypeName\n )?.presentation\n }\n\n return (\n
    \n
    \n {productOptions.length > 0 ? (\n {\n if (checked) {\n // Add the productId to the current filters.\n setFilters((previousFilters) => ({\n ...previousFilters,\n productIds: [...previousFilters.productIds, id]\n }))\n trackEvent(id)\n } else {\n // Remove the productId to the current filters.\n setFilters((previousFilters) => ({\n ...previousFilters,\n productIds: previousFilters.productIds.filter(\n (productId) => productId !== id\n )\n }))\n }\n }}\n />\n ) : null}\n\n {sizeOptions.length > 0 ? (\n {\n if (checked) {\n // Add the productId to the current filters.\n setFilters((previousFilters) => ({\n ...previousFilters,\n sizeIds: [...previousFilters.sizeIds, id]\n }))\n } else {\n // Remove the productId to the current filters.\n setFilters((previousFilters) => ({\n ...previousFilters,\n sizeIds: previousFilters.sizeIds.filter(\n (sizeId) => sizeId !== id\n )\n }))\n }\n }}\n />\n ) : null}\n\n {lengthOptions.length > 0 ? (\n {\n if (checked) {\n // Add the lengthId to the current filters.\n setFilters((previousFilters) => ({\n ...previousFilters,\n lengthIds: [...previousFilters.lengthIds, id]\n }))\n } else {\n // Remove the lengthId to the current filters.\n setFilters((previousFilters) => ({\n ...previousFilters,\n lengthIds: previousFilters.lengthIds.filter(\n (lengthId) => lengthId !== id\n )\n }))\n }\n }}\n />\n ) : null}\n\n {colourCategoryOptions.length > 0 ? (\n {\n if (checked) {\n // Add the productId to the current filters.\n setFilters((previousFilters) => ({\n ...previousFilters,\n colourCategoryIds: [\n ...previousFilters.colourCategoryIds,\n id\n ]\n }))\n } else {\n // Remove the productId to the current filters.\n setFilters((previousFilters) => ({\n ...previousFilters,\n colourCategoryIds:\n previousFilters.colourCategoryIds.filter(\n (colourCategoryId) => colourCategoryId !== id\n )\n }))\n }\n }}\n />\n ) : null}\n\n \n {translations.clear_all}\n \n
    \n\n
    \n setQuery(searchQuery)}\n />\n\n {\n if (checked) {\n setFilters((previousFilters) => ({\n ...previousFilters,\n sortType: id\n }))\n } else {\n setFilters((previousFilters) => ({\n ...previousFilters,\n sortType: null\n }))\n }\n }}\n />\n
    \n
    \n )\n }}\n
    \n)\n\nexport default FilterBar\n", "import React, { useRef, useState, useEffect } from \"react\"\n\nimport AssetsContext from \"../../components/AssetsContext\"\n\nimport { FilterOption } from \"../filterTypes\"\n\nimport FilterDropdownOption from \"./FilterDropdownOption\"\n\ninterface FilterDropdownProps {\n filterType: string\n label: string\n options: FilterOption[]\n selectedOptionIds: number[]\n handleChange: (checked: boolean, id: number) => void\n}\n\nconst FilterDropdown: React.FC = ({\n filterType,\n label,\n options,\n selectedOptionIds,\n handleChange\n}) => {\n const [dropdownOpen, setDropdownOpen] = useState(false)\n\n const isOptionSelected = (id: number) =>\n !!selectedOptionIds.find((option) => option === id)\n\n const currentDropdownState = dropdownOpen ? \"open\" : \"closed\"\n\n const dropdownLabel = () => {\n const selectedOption = options.find((option) => isOptionSelected(option.id))\n\n /* FIXME: This really should be done in CSS.\n */\n const labelText = label.toUpperCase()\n\n if (!selectedOption) return labelText\n\n if (selectedOptionIds.length === 1) {\n if (selectedOption.shortLabel) {\n return `${labelText} ${selectedOption.shortLabel}`\n } else {\n return selectedOption.label\n }\n }\n\n return `${labelText} (${selectedOptionIds.length})`\n }\n\n const ref = useRef(null)\n useEffect(() => {\n const handleClickOutside = ({ target }: MouseEvent) => {\n if (ref.current && !ref.current.contains(target as Node))\n setDropdownOpen(false)\n }\n\n document.addEventListener(\"mousedown\", handleClickOutside)\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside)\n }\n }, [ref])\n\n return (\n \n {(assets) => (\n \n setDropdownOpen(!dropdownOpen)}\n >\n \n \n {dropdownLabel()}\n \n\n \n \n \n\n
      \n {options.map((option) => (\n \n ))}\n
    \n \n )}\n
    \n )\n}\n\nexport { FilterDropdown as default }\n", "import React from \"react\"\n\nimport AssetsContext from \"../../components/AssetsContext\"\n\ninterface FilterDropdownOptionProps {\n id: number\n icon: \"skein\" | undefined\n hexCode?: string | null\n label: string\n subLabel: string\n handleChange: (checked: boolean, id: number) => void\n selected: boolean\n}\n\nconst FilterDropdownOption: React.FC = ({\n id,\n icon,\n hexCode,\n label,\n subLabel,\n handleChange,\n selected\n}) => (\n \n {(assets) => {\n const getIconOrColour = () => {\n if (hexCode) {\n return (\n \n )\n } else if (icon === \"skein\") {\n return (\n \n \n\n
    {subLabel}
    \n
    \n )\n } else {\n return undefined\n }\n }\n\n const htmlId = `filter-dropdown-option-${id}`\n\n return (\n
  • \n \n
  • \n )\n }}\n
    \n)\n\nexport default FilterDropdownOption\n", "import React from \"react\"\n\nimport AssetsContext from \"../../components/AssetsContext\"\nimport TranslationContext from \"../../components/TranslationContext\"\n\ninterface SearchBarProps {\n searchQuery: string\n setSearchQuery: (searchQuery: string) => void\n}\n\nconst SearchBar: React.FC = ({\n searchQuery,\n setSearchQuery\n}) => {\n return (\n \n {(translations) => (\n \n {(assets) => (\n
    \n \n setSearchQuery(event.target.value.toString().toUpperCase())\n }\n />\n \n
    \n )}\n
    \n )}\n
    \n )\n}\n\nexport default SearchBar\n", "import fromPairs from \"lodash/fromPairs\"\nimport intersection from \"lodash/intersection\"\nimport uniq from \"lodash/uniq\"\nimport sortBy from \"lodash/sortBy\"\nimport minBy from \"lodash/minBy\"\nimport maxBy from \"lodash/maxBy\"\nimport some from \"lodash/some\"\n\nimport {\n ProductData,\n Product,\n Variant as ApiVariant,\n OptionValue as ApiOptionValue,\n OptionType,\n ColourCode,\n Image\n} from \"./api\"\n\ninterface Variant extends ApiVariant {\n product: Product\n optionValues: { [key: string]: OptionValue }\n}\n\ninterface OptionValue extends ApiOptionValue {\n optionType: OptionType\n}\n\ninterface ColourTile {\n colourCode: string\n presentation: string\n description: string\n swatch?: Image\n minimumPrice: string\n variants: Variant[]\n onSale: boolean\n}\n\ninterface Filters {\n productIds: number[]\n searchQuery: string\n sizeIds: number[]\n lengthIds: number[]\n colourCategoryIds: number[]\n sortType: number | null\n}\n\nconst computeColourTiles = (\n productData: ProductData,\n filters: Filters\n): ColourTile[] => {\n let filteredVariants: ApiVariant[] = productData.variants.filter(\n (variant) => {\n if (\n filters.productIds.length &&\n !filters.productIds.includes(variant.productId)\n ) {\n return false\n }\n\n if (\n filters.sizeIds.length &&\n !intersection(filters.sizeIds, variant.optionValueIds).length\n ) {\n return false\n }\n\n if (\n filters.lengthIds.length &&\n !intersection(filters.lengthIds, variant.optionValueIds).length\n ) {\n return false\n }\n\n const complexColour = productData.colourCodes.find(\n ({ id }) => id === variant.complexColourId\n )!\n\n if (\n filters.searchQuery &&\n !complexColour.code.includes(filters.searchQuery)\n ) {\n return false\n }\n\n if (filters.colourCategoryIds.length) {\n const rgbIds = complexColour.rgbIds\n\n /* This wont work */\n const colourCategoryIds = uniq(\n productData.rgbs\n .filter(({ id }) => rgbIds.includes(id))\n .flatMap(({ colourCategoryIds }) => colourCategoryIds)\n )\n\n if (\n !intersection(colourCategoryIds, filters.colourCategoryIds).length\n ) {\n return false\n }\n }\n\n return true\n }\n )\n\n const visibleColourIds: Set = new Set(\n filteredVariants.map(({ complexColourId }) => complexColourId)\n )\n\n // FIXME: Don't forget to sort them too.\n const visibleColours: ColourCode[] = productData.colourCodes.filter(\n ({ id }) => visibleColourIds.has(id)\n )\n\n const getOptionType = (optionTypeId: number): OptionType =>\n productData.optionTypes.find(({ id }) => id === optionTypeId)!\n\n const getOptionValue = (optionValueId: number): OptionValue => {\n const optionValue = productData.optionValues.find(\n ({ id }) => id === optionValueId\n )!\n\n return {\n optionType: getOptionType(optionValue.optionTypeId),\n ...optionValue\n }\n }\n\n const getProduct = (productId: number): Product =>\n productData.products.find(({ id }) => id === productId)!\n\n const byColour =\n (complexColour: ColourCode) =>\n ({ complexColourId }: ApiVariant) =>\n complexColourId === complexColour.id\n\n const expandVariant = (variant: ApiVariant): Variant => ({\n product: getProduct(variant.productId),\n optionValues: fromPairs(\n variant.optionValueIds\n .map(getOptionValue)\n .map((optionValue) => [optionValue.optionType.name, optionValue])\n ),\n ...variant\n })\n\n const minimumPrice = (variants: Variant[]): string =>\n minBy(variants, ({ priceCents }) => priceCents)?.price || \"\"\n\n const minimumPriceCents = (variants: Variant[]): number =>\n minBy(variants, ({ priceCents }) => priceCents)?.priceCents || 0\n\n const maximumPriceCents = (variants: Variant[]): number =>\n minBy(variants, ({ priceCents }) => priceCents)?.priceCents || 0\n\n const someVariantOnSale = (variants: Variant[]): boolean =>\n some(variants, ({ originalPrice }) => !!originalPrice)\n\n const recommendation = (variants: Variant[]): number =>\n maxBy(variants, ({ priceCents }) => priceCents)?.recommendation || 0\n\n return sortBy(\n visibleColours.map((complexColour) => {\n const variants = filteredVariants\n .filter(byColour(complexColour))\n .map(expandVariant)\n\n return {\n colourCode: complexColour.code,\n presentation: complexColour.presentation,\n description: complexColour.description,\n swatch: complexColour.swatch,\n minimumPrice: minimumPrice(variants),\n variants: variants,\n onSale: someVariantOnSale(variants)\n }\n }),\n (colourTile: ColourTile): number => {\n /* FIXME: The IDs of the sort methods are currently hardcoded. We should\n * extract them into constants or something.\n */\n if (filters.sortType === 1) {\n // High to low\n return -maximumPriceCents(colourTile.variants)\n } else if (filters.sortType === 2) {\n // Low to high\n return minimumPriceCents(colourTile.variants)\n } else if (filters.sortType === 3) {\n // Recommended\n return -recommendation(colourTile.variants)\n } else {\n return 0\n }\n }\n )\n}\n\nexport {\n ColourTile,\n OptionValue,\n Variant,\n Filters,\n computeColourTiles as default\n}\n", "import { ProductData } from \"./api\"\n\nimport computeColourTiles, { Filters } from \"./computeColourTiles\"\n\ninterface FilterOption {\n id: number\n label: string\n /* This value is for filters that have a shortened form that fits alongside\n * the filterlabel in the drop down.\n */\n shortLabel?: string\n icon?: \"skein\" | undefined\n hexCode?: string | null\n}\n\nconst getFilterOptions = (\n productData: ProductData,\n filters: Filters,\n filterType: \"product\" | \"length\" | \"size\" | \"colourCategory\"\n): FilterOption[] => {\n if (filterType === \"product\") {\n return productData.products\n .map((product) => ({\n id: product.id,\n label: product.name\n }))\n .filter(({ id }) => {\n // Never filter out options that are currently selected.\n if (filters.productIds.includes(id)) {\n return true\n }\n\n const projectedFilters: Filters = {\n ...filters,\n productIds: [id]\n }\n\n return !!computeColourTiles(productData, projectedFilters).length\n })\n }\n\n if (filterType === \"size\") {\n const sizeOptionTypeId = productData.optionTypes.find(\n ({ name }) => name === \"size\"\n )?.id\n\n if (!sizeOptionTypeId) return []\n\n return productData.optionValues\n .filter(({ optionTypeId }) => optionTypeId === sizeOptionTypeId)\n .filter(({ id }) => {\n // Never filter out options that are currently selected.\n if (filters.sizeIds.includes(id)) {\n return true\n }\n\n const projectedFilters: Filters = {\n ...filters,\n sizeIds: [id]\n }\n\n return !!computeColourTiles(productData, projectedFilters).length\n })\n .map((optionValue) => ({\n id: optionValue.id,\n label: optionValue.presentation,\n shortLabel: optionValue.presentation,\n icon: \"skein\"\n }))\n }\n\n if (filterType === \"length\") {\n const sizeOptionTypeId = productData.optionTypes.find(\n ({ name }) => name === \"length\"\n )?.id\n\n if (!sizeOptionTypeId) return []\n\n return productData.optionValues\n .filter(({ optionTypeId }) => optionTypeId === sizeOptionTypeId)\n .map((optionValue) => ({\n id: optionValue.id,\n label: optionValue.displayName,\n shortLabel: optionValue.displayName\n }))\n .filter(({ id }) => {\n // Never filter out options that are currently selected.\n if (filters.lengthIds.includes(id)) {\n return true\n }\n\n const projectedFilters: Filters = {\n ...filters,\n lengthIds: [id]\n }\n\n return !!computeColourTiles(productData, projectedFilters).length\n })\n }\n\n if (filterType === \"colourCategory\") {\n return productData.colourCategories\n .map((colourCategory) => ({\n id: colourCategory.id,\n label: colourCategory.presentation,\n hexCode: colourCategory.hexCode\n }))\n .filter(({ id }) => {\n // Never filter out options that are currently selected.\n if (filters.colourCategoryIds.includes(id)) {\n return true\n }\n\n const projectedFilters: Filters = {\n ...filters,\n colourCategoryIds: [id]\n }\n\n return !!computeColourTiles(productData, projectedFilters).length\n })\n }\n\n return []\n}\n\nexport { FilterOption, getFilterOptions as default }\n", "import React, { useState } from \"react\"\nimport isEqual from \"lodash/isEqual\"\n\nimport ActionButton from \"../../components/ActionButton\"\nimport AssetsContext from \"../../components/AssetsContext\"\nimport TranslationContext from \"../../components/TranslationContext\"\n\nimport FilterCollapsible from \"./FilterCollapsible\"\n\nimport getFilterOptions from \"../filterTypes\"\n\nimport { ProductData, isProductDataLoaded } from \"../api\"\nimport { Filters } from \"../computeColourTiles\"\n\ninterface BottomDrawerProps {\n currentFilters: Filters\n setFilters: React.Dispatch>\n productData: ProductData\n trackEvent: (productId: number) => void\n}\n\nconst BottomDrawer: React.FC = ({\n currentFilters,\n setFilters,\n productData,\n trackEvent\n}) => {\n const [drawerOpen, setDrawerOpen] = useState(false)\n const [stagedFilters, setStagedFilters] = useState(currentFilters)\n\n if (!isProductDataLoaded(productData)) {\n return null\n }\n\n return (\n \n {(translations) => (\n \n {(assets) => {\n const openDrawer = () => {\n setStagedFilters(currentFilters)\n setDrawerOpen(true)\n }\n\n const applyStagedFilters = () => {\n setFilters(stagedFilters)\n closeDrawer()\n }\n\n const closeDrawer = () => setDrawerOpen(false)\n\n const currentDrawerState = drawerOpen ? \"open\" : \"closed\"\n\n const clearOptions = () => {\n const noFilters = {\n productIds: [],\n searchQuery: \"\",\n sizeIds: [],\n lengthIds: [],\n colourCategoryIds: [],\n sortType: null\n }\n\n setFilters(noFilters)\n setStagedFilters(noFilters)\n }\n\n const stagedFiltersDiffer = !isEqual(currentFilters, stagedFilters)\n\n const productOptions = getFilterOptions(\n productData,\n stagedFilters,\n \"product\"\n )\n const sizeOptions = getFilterOptions(\n productData,\n stagedFilters,\n \"size\"\n )\n const lengthOptions = getFilterOptions(\n productData,\n stagedFilters,\n \"length\"\n )\n const colourCategoryOptions = getFilterOptions(\n productData,\n stagedFilters,\n \"colourCategory\"\n )\n\n const totalFiltersSet =\n currentFilters.productIds.length +\n currentFilters.sizeIds.length +\n currentFilters.lengthIds.length +\n currentFilters.colourCategoryIds.length\n\n return (\n \n \n \n {totalFiltersSet > 0 ? (\n \n {totalFiltersSet}\n \n ) : undefined}\n \n\n \n
    \n
    \n \n \u2715\n \n\n

    \n {translations.filter_and_sort}\n

    \n
    \n\n {\n if (checked) {\n // Add the productId to the current filters.\n setStagedFilters(\n (previousStagedFilters: Filters) => ({\n ...previousStagedFilters,\n productIds: [\n ...previousStagedFilters.productIds,\n id\n ]\n })\n )\n trackEvent(id)\n } else {\n // Remove the productId to the current filters.\n setStagedFilters(\n (previousStagedFilters: Filters) => ({\n ...previousStagedFilters,\n productIds:\n previousStagedFilters.productIds.filter(\n (productId) => productId !== id\n )\n })\n )\n }\n }}\n />\n\n {sizeOptions.length > 0 ? (\n {\n if (checked) {\n // Add the sizeId to the current filters.\n setStagedFilters(\n (previousStagedFilters: Filters) => ({\n ...previousStagedFilters,\n sizeIds: [...previousStagedFilters.sizeIds, id]\n })\n )\n } else {\n // Remove the sizeId to the current filters.\n setStagedFilters(\n (previousStagedFilters: Filters) => ({\n ...previousStagedFilters,\n sizeIds: previousStagedFilters.sizeIds.filter(\n (sizeId) => sizeId !== id\n )\n })\n )\n }\n }}\n />\n ) : null}\n\n {lengthOptions.length > 0 ? (\n {\n if (checked) {\n // Add the lengthId to the current filters.\n setStagedFilters(\n (previousStagedFilters: Filters) => ({\n ...previousStagedFilters,\n lengthIds: [\n ...previousStagedFilters.lengthIds,\n id\n ]\n })\n )\n } else {\n // Remove the lengthId to the current filters.\n setStagedFilters(\n (previousStagedFilters: Filters) => ({\n ...previousStagedFilters,\n lengthIds:\n previousStagedFilters.lengthIds.filter(\n (lengthId) => lengthId !== id\n )\n })\n )\n }\n }}\n />\n ) : null}\n\n {colourCategoryOptions.length > 0 ? (\n {\n if (checked) {\n // Add the productId to the current filters.\n setStagedFilters((previousFilters: Filters) => ({\n ...previousFilters,\n colourCategoryIds: [\n ...previousFilters.colourCategoryIds,\n id\n ]\n }))\n } else {\n // Remove the productId to the current filters.\n setStagedFilters((previousFilters: Filters) => ({\n ...previousFilters,\n colourCategoryIds:\n previousFilters.colourCategoryIds.filter(\n (colourCategoryId) => colourCategoryId !== id\n )\n }))\n }\n }}\n />\n ) : null}\n\n {\n if (checked) {\n setStagedFilters((previousFilters: Filters) => ({\n ...previousFilters,\n sortType: id\n }))\n } else {\n setStagedFilters((previousFilters: Filters) => ({\n ...previousFilters,\n sortType: null\n }))\n }\n }}\n />\n
    \n\n
    \n \n\n \n
    \n \n
    \n )\n }}\n
    \n )}\n
    \n )\n}\n\nexport default BottomDrawer\n", "import React, { useRef, useState, useEffect } from \"react\"\n\nimport FilterCollapsibleOption from \"./FilterCollapsibleOption\"\n\nimport { FilterOption } from \"../filterTypes\"\n\ninterface FilterCollapsibleProps {\n filterType: string\n label: string\n options: FilterOption[]\n selectedOptionIds: number[]\n handleChange: (checked: boolean, id: number) => void\n}\n\nconst FilterCollapsible: React.FC = ({\n filterType,\n label,\n options,\n selectedOptionIds,\n handleChange\n}) => {\n const [collapsibleOpen, setCollapsibleOpen] = useState(false)\n\n const toggleCollapsible = () => setCollapsibleOpen(!collapsibleOpen)\n\n const isOptionSelected = (id: number) =>\n !!selectedOptionIds?.find((optionId) => optionId === id)\n\n const currentCollapsibleState = collapsibleOpen ? \"open\" : \"closed\"\n\n const ref = useRef(null)\n\n useEffect(() => {\n const handleClickOutside = ({ target }: MouseEvent) => {\n if (ref.current && !ref.current.contains(target as Node))\n setCollapsibleOpen(false)\n }\n\n document.addEventListener(\"mousedown\", handleClickOutside)\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside)\n }\n }, [ref])\n\n let selectedOptionNames\n\n if (selectedOptionIds.length > 0) {\n /* For products, we want to display the first selected product name, but\n * for colours, we want to display the first two selected colour names.\n */\n const sliceAmount = filterType === \"product\" ? 1 : 2\n\n selectedOptionNames = selectedOptionIds\n .slice(0, sliceAmount)\n .map((id, index) => {\n let option = options.find((option) => option.id === id)\n\n return (\n \n {index === 0 ? \"/ \" : \"\"}\n {option?.label}\n {filterType !== \"product\" &&\n index === 0 &&\n selectedOptionIds.length > 1\n ? \", \"\n : \"\"}\n \n )\n })\n }\n\n const numOfRemainingSelectedOptions = () => {\n // The remaining selected options need to display as integer amount.\n\n let optionsAmount = filterType === \"product\" ? 1 : 2\n\n return selectedOptionIds.length > optionsAmount ? (\n

    \n +{selectedOptionIds.length - optionsAmount}\n

    \n ) : undefined\n }\n\n return (\n
    \n \n

    {label}

    \n {selectedOptionNames} {numOfRemainingSelectedOptions()}\n

    +

    \n

    -

    \n \n\n
      \n {options.map((option) => (\n \n ))}\n
    \n
    \n )\n}\n\nexport default FilterCollapsible\n", "import React from \"react\"\n\nimport AssetsContext from \"../../components/AssetsContext\"\n\ninterface FilterCollapsibleOptionProps {\n id: number\n icon: \"skein\" | undefined\n hexCode?: string | null\n label: string\n subLabel: string\n handleChange: (checked: boolean, id: number) => void\n selected: boolean\n}\n\nconst FilterCollapsibleOption: React.FC = ({\n id,\n icon,\n hexCode,\n label,\n subLabel,\n handleChange,\n selected\n}) => (\n \n {(assets) => {\n let iconOrColour\n\n if (hexCode) {\n iconOrColour = (\n \n )\n } else if (icon === \"skein\") {\n iconOrColour = (\n \n \n\n
    {subLabel}
    \n
    \n )\n }\n\n const htmlId = `filter-collapsible-option-${id}`\n\n return (\n
  • \n \n
  • \n )\n }}\n
    \n)\n\nexport default FilterCollapsibleOption\n", "import React from \"react\"\n\nimport TranslationContext from \"../../components/TranslationContext\"\n\ninterface BreadcrumpsProps {\n complexProduct: any\n selectedProduct: any\n}\n\nconst Breadcrumbs: React.FC = ({\n complexProduct,\n selectedProduct\n}) => {\n const selectedProductBreadcrumb = () => {\n if (selectedProduct == complexProduct) return\n return selectedProduct ? (\n <>\n
  • /
  • \n
  • \n \n {selectedProduct?.name}\n \n
  • \n \n ) : undefined\n }\n return (\n \n {(translations) => {\n return (\n
    \n \n
    \n )\n }}\n
    \n )\n}\n\nexport default Breadcrumbs\n"], "mappings": "+/CAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,KAAIC,GAAU,KACVC,GAAW,KAGXC,GAAe,mDACfC,GAAgB,QAUpB,SAASC,GAAMC,EAAOC,EAAQ,CAC5B,GAAIN,GAAQK,CAAK,EACf,MAAO,GAET,IAAIE,EAAO,OAAOF,EAClB,OAAIE,GAAQ,UAAYA,GAAQ,UAAYA,GAAQ,WAChDF,GAAS,MAAQJ,GAASI,CAAK,EAC1B,GAEFF,GAAc,KAAKE,CAAK,GAAK,CAACH,GAAa,KAAKG,CAAK,GACzDC,GAAU,MAAQD,KAAS,OAAOC,CAAM,CAC7C,CAEAP,GAAO,QAAUK,KC5BjB,IAAAI,GAAAC,EAAA,CAAAC,GAAAC,KAAA,KAAIC,GAAW,KAGXC,GAAkB,sBA8CtB,SAASC,GAAQC,EAAMC,EAAU,CAC/B,GAAI,OAAOD,GAAQ,YAAeC,GAAY,MAAQ,OAAOA,GAAY,WACvE,MAAM,IAAI,UAAUH,EAAe,EAErC,IAAII,EAAW,UAAW,CACxB,IAAIC,EAAO,UACPC,EAAMH,EAAWA,EAAS,MAAM,KAAME,CAAI,EAAIA,EAAK,GACnDE,EAAQH,EAAS,MAErB,GAAIG,EAAM,IAAID,CAAG,EACf,OAAOC,EAAM,IAAID,CAAG,EAEtB,IAAIE,EAASN,EAAK,MAAM,KAAMG,CAAI,EAClC,OAAAD,EAAS,MAA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AK,QAAS,cAAc,EACzDM,EAASN,GAAK,QAAQ,QAAU,GAChCO,EAA0B,OAAOP,GAAK,QAAQ,eAAe,EAC7DQ,EAAaR,GAAK,QAAQ,YAAc,GACxCS,EAAYT,GAAK,QAAQ,UACzBU,EAAsBV,GAAK,QAAQ,sBAAwB,OAEjE,GAAAW,QAAS,OACP,GAAAC,QAAA,cAACC,EAAmB,SAAnB,CAA4B,MAAOR,GAClC,GAAAO,QAAA,cAACE,EAA2B,SAA3B,CAAoC,MAAOJ,GAC1C,GAAAE,QAAA,cAACG,GAAc,SAAd,CACC,MAAO,CACL,WAAYP,EACZ,OAAQF,EACR,gBAAiBC,CACnB,GAEA,GAAAK,QAAA,cAACI,GAAA,CACC,eAAgBf,EAChB,SAAUE,EACV,UAAWC,EACX,UAAWK,EACb,CACF,CACF,CACF,EACA,SAAS,eAAe,uBAAuB,CACjD,CACF,MACE,QAAQ,MAAM,2CAA2C", "names": ["require_isKey", "__commonJSMin", "exports", "module", "isArray", "isSymbol", "reIsDeepProp", "reIsPlainProp", "isKey", "value", "object", "type", "require_memoize", "__commonJSMin", "exports", "module", "MapCache", "FUNC_ERROR_TEXT", "memoize", "func", "resolver", "memoized", "args", "key", "cache", "result", "require_memoizeCapped", "__commonJSMin", "exports", "module", "memoize", "MAX_MEMOIZE_SIZE", "memoizeCapped", "func", "result", "key", "cache", "require_stringToPath", "__commonJSMin", "exports", "module", "memoizeCapped", "rePropName", "reEscapeChar", "stringToPath", "string", "result", "match", "number", "quote", "subString", "require_castPath", "__commonJSMin", "exports", "module", "isArray", "isKey", "stringToPath", "toString", "castPath", "value", "object", "require_toKey", "__commonJSMin", "exports", "module", "isSymbol", "INFINITY", "toKey", "value", "result", "require_baseGet", "__commonJSMin", "exports", "module", "castPath", "toKey", "baseGet", "object", "path", "index", "length", "require_matchesStrictComparable", "__commonJSMin", "exports", "module", "matchesStrictComparable", "key", "srcValue", "object", "require_baseMatches", "__commonJSMin", "exports", "module", "baseIsMatch", "getMatchData", "matchesStrictComparable", "baseMatches", "source", "matchData", "object", "require_get", "__commonJSMin", "exports", "module", "baseGet", "get", "object", "path", "defaultValue", "result", "require_baseHasIn", "__commonJSMin", "exports", "module", "baseHasIn", "object", "key", "require_hasPath", "__commonJSMin", "exports", "module", "castPath", "isArguments", "isArray", "isIndex", "isLength", "toKey", "hasPath", "object", "path", "hasFunc", "index", "length", "result", "key", "require_hasIn", "__commonJSMin", "exports", "module", "baseHasIn", "hasPath", "hasIn", "object", "path", "require_baseMatchesProperty", "__commonJSMin", "exports", "module", "baseIsEqual", "get", "hasIn", "isKey", "isStrictComparable", "matchesStrictComparable", "toKey", "COMPARE_PARTIAL_FLAG", "COMPARE_UNORDERED_FLAG", "baseMatchesProperty", "path", "srcValue", "object", "objValue", "require_basePropertyDeep", "__commonJSMin", "exports", "module", "baseGet", "basePropertyDeep", "path", "object", "require_property", "__commonJSMin", "exports", "module", "baseProperty", "basePropertyDeep", "isKey", "toKey", "property", "path", "require_baseIteratee", "__commonJSMin", "exports", "module", "baseMatches", "baseMatchesProperty", "identity", "isArray", "property", "baseIteratee", "value", "require_createBaseFor", "__commonJSMin", "exports", "module", "createBaseFor", "fromRight", "object", "iteratee", "keysFunc", "index", "iterable", "props", "length", "key", "require_baseFor", "__commonJSMin", "exports", "module", "createBaseFor", "baseFor", "require_baseForOwn", "__commonJSMin", "exports", "module", "baseFor", "keys", "baseForOwn", "object", "iteratee", "require_createBaseEach", "__commonJSMin", "exports", "module", "isArrayLike", "createBaseEach", "eachFunc", "fromRight", "collection", "iteratee", "length", "index", "iterable", "require_baseEach", "__commonJSMin", "exports", "module", "baseForOwn", "createBaseEach", "baseEach", "require_baseMap", "__commonJSMin", "exports", "module", "baseEach", "isArrayLike", "baseMap", "collection", "iteratee", "index", "result", "value", "key", "require_baseSortBy", "__commonJSMin", "exports", "module", "baseSortBy", "array", "comparer", "length", "require_compareAscending", "__commonJSMin", "exports", "module", "isSymbol", "compareAscending", "value", "other", "valIsDefined", "valIsNull", "valIsReflexive", "valIsSymbol", "othIsDefined", "othIsNull", "othIsReflexive", "othIsSymbol", "require_compareMultiple", "__commonJSMin", "exports", "module", "compareAscending", "compareMultiple", "object", "other", "orders", "index", "objCriteria", "othCriteria", "length", "ordersLength", "result", "order", "require_baseOrderBy", "__commonJSMin", "exports", "module", "arrayMap", "baseGet", "baseIteratee", "baseMap", "baseSortBy", "baseUnary", "compareMultiple", "identity", "isArray", "baseOrderBy", "collection", "iteratees", "orders", "iteratee", "value", "index", "result", "key", "criteria", "object", "other", "require_isIterateeCall", "__commonJSMin", "exports", "module", "eq", "isArrayLike", "isIndex", "isObject", "isIterateeCall", "value", "index", "object", "type", "require_sortBy", "__commonJSMin", "exports", "module", "baseFlatten", "baseOrderBy", "baseRest", "isIterateeCall", "sortBy", "collection", "iteratees", "length", "require_uniqBy", "__commonJSMin", "exports", "module", "baseIteratee", "baseUniq", "uniqBy", "array", "iteratee", "require_arrayEvery", "__commonJSMin", "exports", "module", "arrayEvery", "array", "predicate", "index", "length", "require_baseEvery", "__commonJSMin", "exports", "module", "baseEach", "baseEvery", "collection", "predicate", "result", "value", "index", "require_every", "__commonJSMin", "exports", "module", "arrayEvery", "baseEvery", "baseIteratee", "isArray", "isIterateeCall", "every", "collection", "predicate", "guard", "func", "require_baseAssignValue", "__commonJSMin", "exports", "module", "defineProperty", "baseAssignValue", "object", "key", "value", "require_assignValue", "__commonJSMin", "exports", "module", "baseAssignValue", "eq", "objectProto", "hasOwnProperty", "assignValue", "object", "key", "value", "objValue", "require_baseSet", "__commonJSMin", "exports", "module", "assignValue", "castPath", "isIndex", "isObject", "toKey", "baseSet", "object", "path", "value", "customizer", "index", "length", "lastIndex", "nested", "key", "newValue", "objValue", "require_basePickBy", "__commonJSMin", "exports", "module", "baseGet", "baseSet", "castPath", "basePickBy", "object", "paths", "predicate", "index", "length", "result", "path", "value", "require_basePick", "__commonJSMin", "exports", "module", "basePickBy", "hasIn", "basePick", "object", "paths", "value", "path", "require_flatten", "__commonJSMin", "exports", "module", "baseFlatten", "flatten", "array", "length", "require_flatRest", "__commonJSMin", "exports", "module", "flatten", "overRest", "setToString", "flatRest", "func", "require_pick", "__commonJSMin", "exports", "module", "basePick", "flatRest", "pick", "object", "paths", "require_baseSome", "__commonJSMin", "exports", "module", "baseEach", "baseSome", "collection", "predicate", "result", "value", "index", "require_some", "__commonJSMin", "exports", "module", "arraySome", "baseIteratee", "baseSome", "isArray", "isIterateeCall", "some", "collection", "predicate", "guard", "func", "require_baseValues", "__commonJSMin", "exports", "module", "arrayMap", "baseValues", "object", "props", "key", "require_values", "__commonJSMin", "exports", "module", "baseValues", "keys", "values", "object", "require_fromPairs", "__commonJSMin", "exports", "module", "fromPairs", "pairs", "index", "length", "result", "pair", "require_baseIntersection", "__commonJSMin", "exports", "module", "SetCache", "arrayIncludes", "arrayIncludesWith", "arrayMap", "baseUnary", "cacheHas", "nativeMin", "baseIntersection", "arrays", "iteratee", "comparator", "includes", "length", "othLength", "othIndex", "caches", "maxLength", "result", "array", "index", "seen", "outer", "value", "computed", "cache", "require_castArrayLikeObject", "__commonJSMin", "exports", "module", "isArrayLikeObject", "castArrayLikeObject", "value", "require_intersection", "__commonJSMin", "exports", "module", "arrayMap", "baseIntersection", "baseRest", "castArrayLikeObject", "intersection", "arrays", "mapped", "require_baseExtremum", "__commonJSMin", "exports", "module", "isSymbol", "baseExtremum", "array", "iteratee", "comparator", "index", "length", "value", "current", "computed", "result", "require_baseLt", "__commonJSMin", "exports", "module", "baseLt", "value", "other", "require_minBy", "__commonJSMin", "exports", "module", "baseExtremum", "baseIteratee", "baseLt", "minBy", "array", "iteratee", "require_baseGt", "__commonJSMin", "exports", "module", "baseGt", "value", "other", "require_maxBy", "__commonJSMin", "exports", "module", "baseExtremum", "baseGt", "baseIteratee", "maxBy", "array", "iteratee", "import_react_dom", "import_react", "import_react", "import_react", "import_sortBy", "import_react", "import_react", "import_classnames", "CursorContext", "React", "cursorType", "cursorText", "CursorProvider", "children", "mousePosition", "setMousePosition", "cursor", "setCursor", "text", "setText", "onMouseMove", "event", "x", "y", "CURSOR_OFFSET", "onCursor", "updateCursorText", "updatedText", "cx", "CursorProvider_default", "ColourCategory", "colour", "handleClick", "React", "CursorContext", "onCursor", "updateCursorText", "ColourCategory_default", "ColourPicker", "currentFilters", "setFilters", "productData", "colourCategories", "sortBy", "position", "handleClick", "category", "previousFilters", "__spreadProps", "__spreadValues", "React", "TranslationContext", "translations", "CursorProvider_default", "ColourCategory_default", "ColourPicker_default", "import_circletype", "import_react", "import_react", "ShopNow", "onClick", "React", "TranslationContext", "translations", "ActionButton_default", "ShopNow_default", "FullPageTransition", "heroImage", "heading", "slug", "transitionOpen", "setTransitionOpen", "transitionState", "closeTransition", "container", "arch", "CircleType", "React", "TranslationContext", "translations", "ShopNow_default", "FullPageTransition_default", "import_react", "ProductHeroInfo", "product", "taxonName", "priceRange", "React", "TranslationContext", "translations", "priceRangeString", "scrollToVariants", "_a", "imageSection", "productImage", "BrowsingOutOfRegionContext", "browsingOutOfRegion", "ShopNow_default", "ProductHeroInfo_default", "import_react", "Products", "products", "selectProduct", "productImage", "product", "translations", "React", "productList", "TranslationContext", "Products_default", "import_react", "ShowAllProducts", "productName", "resetProductFilters", "React", "TranslationContext", "translations", "ShowAllProducts_default", "import_react", "import_react", "import_uniqBy", "import_every", "import_pick", "import_react", "Header", "productName", "colourCode", "colourPresentation", "masterSku", "selectedSku", "price", "selectedPrice", "isMultiVariant", "inStock", "closeLightbox", "priceSection", "translations", "React", "TranslationContext", "AssetsContext", "assets", "e", "BrowsingOutOfRegionContext", "browsingOutOfRegion", "Header_default", "import_react", "import_react", "import_react", "ProductProperty", "text", "iconSrc", "React", "ProductProperty_default", "import_react", "import_uniqBy", "import_react", "VariantType", "id", "type", "imageSrc", "text", "variant", "selected", "handleChange", "image", "React", "variantTypeClassName", "inputId", "AssetsContext", "assets", "VariantType_default", "uniqueById", "optionValues", "uniqBy", "v", "TypeSelector", "title", "children", "React", "ShapeSelector", "values", "selectedOptions", "selectOption", "option", "_a", "VariantType_default", "SizeSelector", "LengthSelector", "VariantTypeSelector", "colourTile", "filteredVariants", "shapes", "variant", "sizes", "lengths", "TranslationContext", "translations", "AssetsContext", "assets", "import_react", "import_uniqBy", "import_react", "VariantTypeDropdown", "selectedValue", "values", "handleChange", "_a", "selectedValueLabel", "value", "React", "TranslationContext", "translations", "e", "VariantTypeDropdown_default", "uniqueById", "optionValues", "uniqBy", "v", "VariantTypeDropdownSelector", "colourTile", "selectOption", "selectedOptions", "selectVariant", "selectedVariant", "_a", "filteredVariants", "shapes", "variant", "variantValues", "React", "option", "VariantType_default", "VariantTypeDropdown_default", "value", "id", "VariantTypeDropdownSelector_default", "MultiVariantInfoTab", "colourTile", "productDescription", "selectOption", "selectedOptions", "selectVariant", "selectedVariant", "readMore", "setReadMore", "colourDescription", "React", "TranslationContext", "translations", "AssetsContext", "assets", "_a", "VariantTypeSelector", "VariantTypeDropdownSelector_default", "ProductProperty_default", "MultiVariantInfoTab_default", "import_react", "InfoTab", "colourDescription", "productDescription", "lightboxImage", "readMore", "setReadMore", "React", "TranslationContext", "translations", "AssetsContext", "assets", "_a", "ProductProperty_default", "InfoTab_default", "import_react", "import_react", "import_flickity", "import_react", "ProductCard", "image", "productName", "extraInfo", "price", "salePrice", "slug", "productPath", "headerSection", "React", "imageSection", "ProductCard_default", "ProductCardCarousel", "products", "flkty", "flktyDots", "Flickity", "extraInfo", "product", "getImage", "React", "BrowsingOutOfRegionContext", "browsingOutOfRegion", "idx", "ProductCard_default", "ProductCardCarousel_default", "OffersTab", "productsWithOffers", "React", "TranslationContext", "translations", "ProductCardCarousel_default", "OffersTab_default", "import_react", "RelatedTab", "relatedProducts", "React", "TranslationContext", "translations", "ProductCardCarousel_default", "RelatedTab_default", "import_react", "import_react", "VariantLightboxTab", "name", "text", "isSelected", "setSelectedTab", "React", "e", "VariantLightboxTab_default", "VariantLightboxTabSection", "selectedTab", "setSelectedTab", "isTabSelected", "name", "tabs", "translations", "React", "TranslationContext", "AssetsContext", "assets", "tab", "idx", "VariantLightboxTab_default", "TabSection_default", "import_some", "import_values", "import_debounce", "import_search_insights", "countryIso", "locale", "localeParams_default", "isProductDataLoaded", "productData", "some", "values", "data", "fetchProductData", "complexProductId", "spreeApiUrl", "response", "fetchRelatedProducts", "productSlug", "page", "relationName", "queryParameters", "alterCart", "quantity", "variantId", "_a", "csrfToken", "handleErrors", "json", "_b", "aa", "debouncedAlterCart", "debounce", "fetchRelation", "relationName", "productSlug", "callback", "fetchRelatedProducts", "json", "Body", "colourTile", "lightboxImage", "productDescription", "isMultiVariant", "selectOption", "selectedOptions", "selectVariant", "selectedVariant", "selectedTab", "setSelectedTab", "relatedProducts", "setRelatedProducts", "productsWithOffers", "setProductsWithOffers", "loadProducts", "visibleTab", "React", "OffersTab_default", "RelatedTab_default", "MultiVariantInfoTab_default", "InfoTab_default", "TabSection_default", "Body_default", "import_react", "Footer", "selectedVariant", "isMultiVariant", "selectedOptions", "lineItems", "lineItem", "existingQuantity", "quantity", "setQuantity", "addToBasketOnClick", "alterCart", "updateQuantity", "amount", "optionInfoSection", "React", "BrowsingOutOfRegionContext", "browsingOutOfRegion", "QuantityPicker_default", "AddToBasket_default", "Footer_default", "filterVariants", "variants", "selectedOptions", "filteredVariants", "shape", "variant", "_a", "size", "length", "getSelectedVariant", "every", "variantOptions", "optionType", "optionValue", "getVariantImage", "shapeOption", "sizeOption", "lengthOption", "defaultSelection", "shapes", "optionValues", "uniqBy", "v", "pick", "VariantLightbox", "colourTile", "lightboxImage", "productDescription", "closeLightbox", "displayOutOfStock", "setDisplayOutOfStock", "lineItems", "isMultiVariant", "setSelectedOptions", "selectOption", "previousState", "newSelectedOptions", "__spreadProps", "__spreadValues", "selectVariant", "selectedVariant", "variantImage", "displayVariantImage", "React", "priceSection", "priceTranslation", "translations", "Header_default", "TranslationContext", "OutOfStock_default", "Body_default", "Footer_default", "import_react", "VariantListingItem", "swatch", "colourCode", "onSale", "numberOfOptions", "variantId", "isSelected", "isMultiVariant", "displayOutOfStock", "openLightboxForColourCode", "lineItems", "lineItem", "quantity", "setQuantity", "swatchImage", "React", "selectedTriangle", "itemInteractionSection", "translations", "e", "BrowsingOutOfRegionContext", "browsingOutOfRegion", "QuantityPicker_default", "quantityValue", "debouncedAlterCart", "TranslationContext", "AssetsContext", "assets", "VariantListingItem_default", "VariantListing", "colourTiles", "products", "lineItems", "selectedColourCode", "setSelectedColourCode", "displayOutOfStock", "setDisplayOutOfStock", "setColourCodeForLightbox", "colourCode", "getLightboxImageForVariantCode", "colourTile", "_a", "product", "getProductDescriptionForVariantCode", "variantLightboxIfSelected", "React", "VariantLightbox", "idForSingleVariantCode", "isMultiVariant", "outOfStock", "isSelected", "VariantListingItem_default", "VariantListing_default", "import_react", "ThreadFacts", "currentProductProperties", "threadFactsGrid", "productProperty", "React", "TranslationContext", "translations", "ThreadFacts_default", "import_react", "import_react", "import_react", "FilterDropdownOption", "id", "icon", "hexCode", "label", "subLabel", "handleChange", "selected", "React", "AssetsContext", "assets", "getIconOrColour", "htmlId", "e", "FilterDropdownOption_default", "FilterDropdown", "filterType", "label", "options", "selectedOptionIds", "handleChange", "dropdownOpen", "setDropdownOpen", "isOptionSelected", "id", "option", "currentDropdownState", "dropdownLabel", "selectedOption", "labelText", "ref", "handleClickOutside", "target", "React", "AssetsContext", "assets", "FilterDropdownOption_default", "import_react", "SearchBar", "searchQuery", "setSearchQuery", "React", "TranslationContext", "translations", "AssetsContext", "assets", "event", "SearchBar_default", "import_fromPairs", "import_intersection", "import_uniq", "import_sortBy", "import_minBy", "import_maxBy", "import_some", "computeColourTiles", "productData", "filters", "filteredVariants", "variant", "intersection", "complexColour", "id", "rgbIds", "colourCategoryIds", "uniq", "visibleColourIds", "complexColourId", "visibleColours", "getOptionType", "optionTypeId", "getOptionValue", "optionValueId", "optionValue", "__spreadValues", "getProduct", "productId", "byColour", "expandVariant", "fromPairs", "minimumPrice", "variants", "_a", "minBy", "priceCents", "minimumPriceCents", "maximumPriceCents", "someVariantOnSale", "some", "originalPrice", "recommendation", "maxBy", "sortBy", "colourTile", "getFilterOptions", "productData", "filters", "filterType", "_a", "_b", "product", "id", "projectedFilters", "__spreadProps", "__spreadValues", "computeColourTiles", "sizeOptionTypeId", "name", "optionTypeId", "optionValue", "colourCategory", "FilterBar", "currentFilters", "setFilters", "productData", "trackEvent", "React", "TranslationContext", "translations", "clearOptions", "setQuery", "query", "previousQuery", "__spreadProps", "__spreadValues", "productOptions", "getFilterOptions", "sizeOptions", "lengthOptions", "colourCategoryOptions", "labelForOptionTypeName", "optionTypeName", "_a", "name", "FilterDropdown", "checked", "id", "previousFilters", "productId", "sizeId", "lengthId", "colourCategoryId", "SearchBar_default", "searchQuery", "FilterBar_default", "import_react", "import_isEqual", "import_react", "import_react", "FilterCollapsibleOption", "id", "icon", "hexCode", "label", "subLabel", "handleChange", "selected", "React", "AssetsContext", "assets", "iconOrColour", "htmlId", "e", "FilterCollapsibleOption_default", "FilterCollapsible", "filterType", "label", "options", "selectedOptionIds", "handleChange", "collapsibleOpen", "setCollapsibleOpen", "toggleCollapsible", "isOptionSelected", "id", "optionId", "currentCollapsibleState", "ref", "handleClickOutside", "target", "selectedOptionNames", "sliceAmount", "index", "option", "React", "numOfRemainingSelectedOptions", "optionsAmount", "FilterCollapsibleOption_default", "FilterCollapsible_default", "BottomDrawer", "currentFilters", "setFilters", "productData", "trackEvent", "drawerOpen", "setDrawerOpen", "stagedFilters", "setStagedFilters", "isProductDataLoaded", "React", "TranslationContext", "translations", "AssetsContext", "assets", "openDrawer", "applyStagedFilters", "closeDrawer", "currentDrawerState", "clearOptions", "noFilters", "stagedFiltersDiffer", "isEqual", "productOptions", "getFilterOptions", "sizeOptions", "lengthOptions", "colourCategoryOptions", "totalFiltersSet", "FilterCollapsible_default", "checked", "id", "previousStagedFilters", "__spreadProps", "__spreadValues", "productId", "sizeId", "lengthId", "previousFilters", "colourCategoryId", "ActionButton_default", "BottomDrawer_default", "import_react", "Breadcrumbs", "complexProduct", "selectedProduct", "selectedProductBreadcrumb", "React", "TranslationContext", "translations", "_a", "_b", "Breadcrumbs_default", "ComplexProductApp", "complexProduct", "products", "lineItems", "subFamily", "_a", "defaultProductId", "product", "assets", "setAssets", "railsAssetPath_default", "fingerprintedAssetPaths", "productData", "setProductData", "filters", "setFilters", "fetchProductData", "json", "initialProductId", "p", "trackEvent", "resetProductFilters", "previousFilters", "__spreadProps", "__spreadValues", "selectProduct", "productId", "eventData", "colourTiles", "computeColourTiles", "oneProductIsSelected", "headerProduct", "productHero", "translations", "React", "productsSection", "ShowAllProducts_default", "Products_default", "TranslationContext", "AssetsContext", "FullPageTransition_default", "Breadcrumbs_default", "ProductHeroInfo_default", "ColourPicker_default", "FilterBar_default", "BottomDrawer_default", "VariantListing_default", "ThreadFacts_default", "App_default", "node", "complexProduct", "parseJSONData_default", "products", "lineItems", "translations", "locale", "stockLocationId", "countryIso", "subFamily", "browsingOutOfRegion", "ReactDOM", "React", "TranslationContext", "BrowsingOutOfRegionContext", "MarketContext", "App_default"] }