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,EAGlBq0B,MAAAA,GACE,MAAM,SAAEh4B,EAAQ,YAAE43B,EAAW,MAAExzB,EAAK,SAAEyzB,EAAQ,iBAAER,EAAgB,MAAE3W,EAAK,SAAE0W,KAAaa,GAAeF,KAAKj4B,MACpG+G,EAAQkxB,KAAKj4B,MAAM+G,OAAS,CAAElD,OAAO,EAAO+E,SAAUA,QACtDA,EAAW1I,OAAWyoB,EAAYsP,KAAKD,aACvCt1B,EAAKu1B,KAAKj4B,MAAM0C,IAAM01B,MAE5B,IAAIZ,EAAUzwB,EAAMlD,QAAS,EAM7B,OAJIk0B,IACFP,GAAWA,GAIX5vB,EAAAA,cAACywB,EAAYF,EACXvwB,EAAAA,cAACywB,EAAQlB,MAAK,CAACz0B,GAAIA,EAAIgG,KAAK,WAAW8uB,QAASA,EAAS5uB,SAAUA,EAAU0vB,SAAUp4B,IACvF0H,EAAAA,cAACywB,EAAQhB,OAAM,CACb,WAAU,UAAU/yB,IACpBwc,UAAU,SACVyX,QAAS71B,EACT80B,QAASA,EACTt3B,SAAUA,EACVo4B,SAAUp4B,EACVq3B,iBAAkBA,EAClB3W,MAAOA,EACP0W,SAAUA,IAEXhzB,GAASsD,EAAAA,cAACywB,EAAQnK,MAAK,CAACsH,QAAS5sB,GAAWtE,GAC5CwzB,GAAelwB,EAAAA,cAACywB,EAAQX,YAAW,KAAEI,GAG5C,EAxDmBb,EAAM9a,YAAA,Q,yECf3B,MAAMqc,EAAMxc,EAAAA,GAAOyc,IAAGvc,WAAA,CAAAC,YAAA,OAAVH,CAAU,SAClB,EAAGuY,YAAYmE,EAAAA,EAAAA,KAAgBnZ,EAAAA,EAAAA,GAAUgV,MAG7C,K","sources":["webpack://booqable/./webpack/back_office/modules/addresses/components/AddressFields.jsx","webpack://booqable/./webpack/back_office/modules/addresses/components/addressFieldsOrder.js","webpack://booqable/./webpack/back_office/v2/redux/actions/country_actions.js","webpack://booqable/./webpack/back_office/modules/addresses/components/fetchCountriesAndProvinces.js","webpack://booqable/./webpack/back_office/modules/addresses/helpers/addressHelper.js","webpack://booqable/./webpack/back_office/v2/redux/actions/item_actions.js","webpack://booqable/./webpack/back_office/v2/redux/actions/line_actions.js","webpack://booqable/./webpack/back_office/v2/redux/models/models.js","webpack://booqable/./webpack/shared/lib/react_css_transition_group.jsx","webpack://booqable/./webpack/shared/utils/optimizeImageUrl.js","webpack://booqable/./webpack/shared/utils/previewUrlComposer.js","webpack://booqable/./webpack/shared/utils/promiseDebounce.js","webpack://booqable/./webpack/shared/utils/useIsMobile.js","webpack://booqable/./webpack/shared/utils/useOpeningHours.js","webpack://booqable/./webpack/shared/utils/usePrevious.js","webpack://booqable/./webpack/ui/blocks/ActionGroup/styles.js","webpack://booqable/./webpack/ui/blocks/AlertBar/styles.js","webpack://booqable/./webpack/ui/blocks/AlertBar/index.js","webpack://booqable/./webpack/ui/blocks/Grid/styles.js","webpack://booqable/./webpack/ui/blocks/Grid/index.js","webpack://booqable/./webpack/ui/blocks/Picker/Location/styles.js","webpack://booqable/./webpack/ui/blocks/Picker/Location/index.js","webpack://booqable/./webpack/ui/blocks/Picker/types/cart/styles.js","webpack://booqable/./webpack/ui/blocks/Picker/types/cart/index.js","webpack://booqable/./webpack/ui/blocks/Picker/types/order/styles.js","webpack://booqable/./webpack/ui/blocks/Picker/types/order/index.js","webpack://booqable/./webpack/ui/components/AlertBar/index.jsx","webpack://booqable/./webpack/ui/components/Picker/Day.jsx","webpack://booqable/./webpack/ui/components/Picker/LocationPicker/Option.jsx","webpack://booqable/./webpack/ui/components/Picker/LocationPicker/SingleValue.jsx","webpack://booqable/./webpack/ui/components/Picker/LocationPicker/Select.jsx","webpack://booqable/./webpack/ui/components/Picker/LocationPicker/useLocationData.js","webpack://booqable/./webpack/ui/components/Picker/LocationPicker/index.jsx","webpack://booqable/./webpack/ui/components/Picker/Provider/index.jsx","webpack://booqable/./webpack/shared/utils/objectDiff.js","webpack://booqable/./webpack/ui/components/Picker/DateTimePicker.jsx","webpack://booqable/./webpack/ui/components/Picker/types/order/Free.jsx","webpack://booqable/./webpack/ui/components/Picker/types/order/Timeslots.jsx","webpack://booqable/./webpack/ui/components/Picker/types/order/Durations.jsx","webpack://booqable/./webpack/ui/components/Picker/types/cart/Free/Picker.jsx","webpack://booqable/./webpack/shared/utils/useWindowSize.js","webpack://booqable/./webpack/ui/components/Picker/types/cart/Free/Desktop.jsx","webpack://booqable/./webpack/ui/blocks/Picker/Drawer/index.js","webpack://booqable/./webpack/ui/components/Picker/Drawer.jsx","webpack://booqable/./webpack/ui/components/Picker/types/cart/Free/Mobile.jsx","webpack://booqable/./webpack/ui/components/Picker/types/cart/Free/index.jsx","webpack://booqable/./webpack/ui/components/Picker/types/cart/Timeslots/Picker.jsx","webpack://booqable/./webpack/ui/components/Picker/types/cart/Timeslots/Mobile.jsx","webpack://booqable/./webpack/ui/components/Picker/types/cart/Timeslots/Desktop.jsx","webpack://booqable/./webpack/ui/components/Picker/types/cart/Timeslots/index.jsx","webpack://booqable/./webpack/ui/components/Picker/types/cart/Durations/Picker.jsx","webpack://booqable/./webpack/ui/components/Picker/types/cart/Durations/Desktop.jsx","webpack://booqable/./webpack/ui/components/Picker/types/cart/Durations/Mobile.jsx","webpack://booqable/./webpack/ui/components/Picker/types/cart/Durations/index.jsx","webpack://booqable/./webpack/ui/components/Picker/index.jsx","webpack://booqable/./webpack/ui/blocks/Switch/styles.js","webpack://booqable/./webpack/ui/blocks/Switch/index.js","webpack://booqable/./webpack/ui/components/Switch/index.jsx","webpack://booqable/./webpack/ui/elements/Img.js"],"sourcesContent":["import { Row, Col } from 'ui/blocks/Grid'\nimport AlertBar from 'ui/components/AlertBar'\nimport { Field } from 'shared/form'\nimport Skeleton from 'ui/blocks/Skeleton'\nimport * as addressHelper from '../helpers/addressHelper'\n\nimport isEmpty from 'lodash/isEmpty'\nimport PropTypes from 'prop-types'\nimport { useFormikContext } from 'formik'\nimport { useTranslation } from 'shared/utils/useTranslation'\nimport React, { useEffect, useState } from 'react'\n\n/**\n * A pure component to render and validate an address.\n *\n * @param {array} countries - A list of countries.\n * @param {array} provinces - A list of provinces.\n * @param {boolean} showFirstAndLastName - Whether to show the first and last name fields.\n * @param {string} addressIdentifier - A suffix for the address fields name.\n * @param {string} defaultCountryId - A fallback country id if the country is not found in the countries list.\n * @param {string} defaultFormLayout - A fallback form layout if the country is invalid. Find an example below\n * with all supported fields.\n * @param {boolean} validateOnChangeOnly - Whether to validate the fields only when they change.\n * @param {boolean} skipValidation - Whether to skip the validation.\n * @param {string} invalidExistingAddressWarning - A warning message to display when an existing address is invalid.\n * @param {boolean} showInvalidExistingAddressWarning - Whether to show the invalid existing address warning.\n * @param {number} addressPropertyIndex - The index of the address property in the properties array.\n * In the customer form for example, it's the index of the address in the customer properties array.\n * @param {object} initialValues - The initial values for the address fields.\n *\n * @example\n * \n */\n\nconst AddressFields = (props) => {\n const {\n autoFocus = false,\n disabled,\n showFirstAndLastName = false,\n defaultCountryId,\n countries,\n provinces,\n addressIdentifier,\n errorKey,\n fieldTranslationPrefix,\n selectPlaceholder,\n invalidExistingAddressWarning,\n showInvalidExistingAddressWarning = true,\n validateOnChangeOnly = false,\n skipValidation = false,\n defaultFormLayout,\n addressPropertyIndex,\n fieldDebounce = 0,\n initialValues\n } = props\n\n const { t } = useTranslation('user')\n const { values, setFieldValue, errors } = useFormikContext()\n\n const [countrySelectOptions, setCountrySelectOptions] = useState([])\n const [provinceSelectOptions, setProvinceSelectOptions] = useState([])\n const [fieldNamesArray, setFieldNamesArray] = useState([])\n const [selectedCountry, setSelectedCountry] = useState({})\n const [isLoading, setIsLoading] = useState(true)\n const [errorMessage, setErrorMessage] = useState('')\n\n const FORM_LAYOUT_FALLBACK = '{first_name}{last_name}\\n{country}\\n{address1}\\n{address2}\\n{zipcode}{city}{province}'\n\n // Hooks\n\n useEffect(() => {\n if (isEmpty(countries) || isEmpty(provinces)) return\n\n setIsLoading(false)\n }, [countries, provinces])\n\n useEffect(() => {\n if (isEmpty(selectedCountry)) return\n\n const countryProvinceOptions = buildProvinceSelectOptions(selectedCountry.id)\n setProvinceSelectOptions(countryProvinceOptions)\n }, [selectedCountry, provinces])\n\n useEffect(() => {\n const countrySelectOptions = buildCountrySelectOptions()\n setCountrySelectOptions(countrySelectOptions)\n }, [countries])\n\n useEffect(() => {\n // Build the field names array based on the selected country\n const formLayout = selectedCountry?.form_layout || defaultFormLayout || FORM_LAYOUT_FALLBACK\n const fieldNames = addressHelper.buildFieldNamesArray(formLayout, showFirstAndLastName)\n setFieldNamesArray(fieldNames)\n }, [selectedCountry, defaultFormLayout])\n\n useEffect(() => {\n let existingCountry = findCountry(valueForFieldWithIdentifier('country_id'))\n\n // Fall back to the default country if both the country_id and the country are not present\n if (isEmpty(existingCountry) && isEmpty(valueForFieldWithIdentifier('country')) && defaultCountryId) {\n existingCountry = findCountry(defaultCountryId)\n setValueToFieldWithIdentifier('country_id', existingCountry?.id)\n }\n\n setSelectedCountry(existingCountry)\n }, [countrySelectOptions, defaultCountryId, initialValues])\n\n useEffect(() => {\n handleErrors()\n }, [errors])\n\n // Event handlers\n\n const handleCountryChange = (countryId) => {\n if (countryId === selectedCountry?.id) return\n\n const newSelectedCountry = findCountry(countryId)\n cleanUpNotVisibleFieldValuesForLayout(selectedCountry, newSelectedCountry)\n\n setSelectedCountry(newSelectedCountry)\n setValueToFieldWithIdentifier('country', newSelectedCountry.name)\n\n // At this point, the province list will be updated with the provinces of the new country.\n // Therefore, it only resets the region value if the province_id (from the previous country) is present.\n // If the province_id is not present, the region can be a string like 'New York' from an old address\n // before the new component, and it should not be reset.\n if (!isEmpty(valueForFieldWithIdentifier('province_id'))) {\n setValueToFieldWithIdentifier('region', '')\n }\n\n setValueToFieldWithIdentifier('province_id', '')\n setValueToFieldWithIdentifier('country_id', countryId)\n }\n\n const handleProvinceChange = (provinceId) => {\n setValueToFieldWithIdentifier('region', provinceId)\n setValueToFieldWithIdentifier('province_id', provinceId)\n }\n\n // Helpers\n\n const setValueToFieldWithIdentifier = (fieldName, value) => {\n setFieldValue(buildFieldNameWithIdentifier(fieldName), value)\n }\n\n const valueForFieldWithIdentifier = (fieldName) => {\n const addressValues = addressHelper.extractValuesForIdentifier(values, addressIdentifier)\n\n return !isEmpty(addressValues) ? addressValues[fieldName] : ''\n }\n\n const findCountry = (countryId) => {\n return countries?.find((country) => country.id === countryId)\n }\n\n const findProvince = (provinceId, countryId) => {\n return provinces?.find((province) => province.country_id === countryId && province.id === provinceId)\n }\n\n // Add the address identifier to the field name if it's present\n const buildFieldNameWithIdentifier = (fieldName) => {\n return isEmpty(addressIdentifier) ? fieldName : `${addressIdentifier}.${fieldName}`\n }\n\n const buildCountrySelectOptions = () => {\n return countries?.map((country) => ({ value: country.id, label: country.name }))\n }\n\n const buildProvinceSelectOptions = (countryId) => {\n return provinces?.filter((province) => province.country_id === countryId)\n .map((province) => ({ value: province.id, label: province.name }))\n }\n\n const buildField = (fieldName) => {\n const validate = (value) => validateField(fieldName, value)\n const onInputHandler = (e) => handleTextFieldChange(fieldName, e)\n const label = addressHelper.buildFieldLabel({\n name: fieldName,\n country: selectedCountry,\n translationPrefix: fieldTranslationPrefix\n })\n const placeholder = addressHelper.buildFieldPlaceholder({\n name: fieldName,\n country: selectedCountry,\n translationPrefix: fieldTranslationPrefix\n })\n const fieldNameWithIdentifier = buildFieldNameWithIdentifier(fieldName)\n const showPlaceholder = !disabled\n\n switch (fieldName) {\n case 'first_name':\n case 'last_name':\n case 'address1':\n case 'address2':\n case 'city':\n return (\n \n )\n case 'zipcode':\n return (\n \n )\n case 'country':\n return (\n \n )\n case 'province': {\n // Use 'region' as the field name to make it backwards compatible with the API\n const regionFieldName = buildFieldNameWithIdentifier('region')\n\n if (provinceSelectOptions?.length > 0) {\n return (\n \n )\n } else {\n // Render a text field if the country does not have provinces\n return (\n \n )\n }\n }\n }\n }\n\n const selectedCountryOption = () => {\n const selectedOption = countrySelectOptions?.find(\n (option) => option.value === selectedCountry?.id\n )\n\n if (!isEmpty(selectedOption)) return selectedOption\n\n const country = valueForFieldWithIdentifier('country')\n\n return !isEmpty(country) ? { label: country, value: country } : null\n }\n\n const selectedProvinceOption = () => {\n const selectedOption = provinceSelectOptions?.find(\n (option) => option.value === valueForFieldWithIdentifier('province_id')\n )\n\n if (!isEmpty(selectedOption)) return selectedOption\n\n const region = valueForFieldWithIdentifier('region')\n\n return !isEmpty(region) ? { label: region, value: region } : null\n }\n\n const handleTextFieldChange = (fieldName, e) => {\n if (fieldName !== 'zipcode') return\n\n e.target.value = e.target.value.toUpperCase()\n }\n\n // Return a validation error message for the field if it's invalid\n const validateField = (fieldName, value) => {\n if (skipValidation) return\n\n if (['first_name', 'last_name', 'address2'].includes(fieldName)) return\n\n if (validateOnChangeOnly && !isDirty) return\n\n if (fieldName === 'country' && findCountry(selectedCountry?.id)) return\n\n if (fieldName === 'address1' && !isEmpty(value?.trim())) return\n\n if (fieldName === 'city' && !isEmpty(value?.trim())) return\n\n // When the province is selected for the first time,\n // the value (which is the region field value) has the province id.\n // When the address is loaded from the backend, the province id is already present in the form.\n if (fieldName === 'province' && validateProvince(value, valueForFieldWithIdentifier('province_id'))) return\n\n if (fieldName === 'zipcode' && validateZipcode(value)) return\n\n return addressHelper.buildFieldError({\n name: fieldName,\n country: selectedCountry,\n t,\n errorKey,\n translationPrefix: fieldTranslationPrefix\n })\n }\n\n const validateProvince = (province, provinceId) => {\n const countryHasNoProvinces = provinceSelectOptions?.length === 0 || false\n const provinceNotRequired = selectedCountry?.province_required !== true\n\n const existingProvince = findProvince(province, selectedCountry?.id) ||\n findProvince(provinceId, selectedCountry?.id)\n\n return !selectedCountry || provinceNotRequired || countryHasNoProvinces || existingProvince\n }\n\n const validateZipcode = (value) => {\n const zipcodeNotRequired = selectedCountry?.zipcode_required !== true\n const noFormatRequired = isEmpty(selectedCountry?.zipcode_format)\n const hasValue = !isEmpty(value?.trim())\n\n const regex = `^${selectedCountry?.zipcode_format}$`\n const matchFormat = value?.match(regex)\n\n return !selectedCountry || zipcodeNotRequired || (noFormatRequired && hasValue) || matchFormat\n }\n\n const cleanUpNotVisibleFieldValuesForLayout = (oldCountry, newCountry) => {\n const fieldsToCleanUp = notVisibleFieldsForLayout(newCountry.form_layout)\n\n if (oldCountry) {\n if (oldCountry.city_autofill) {\n fieldsToCleanUp.push('city')\n }\n if (oldCountry.zipcode_autofill) {\n fieldsToCleanUp.push('zipcode')\n }\n }\n\n cleanUpFields(fieldsToCleanUp)\n }\n\n const notVisibleFieldsForLayout = (formLayout) => {\n const fieldNames = addressHelper.buildFieldNamesArray(formLayout, showFirstAndLastName).flat()\n const visibleFields = fieldNames.map((field) => field === 'province' ? 'region' : field)\n // These fields are the ones that can be hidden by the form layout\n const dynamicFields = ['first_name', 'last_name', 'city', 'region', 'zipcode']\n\n return dynamicFields.filter((fieldName) => !visibleFields.includes(fieldName))\n }\n\n const cleanUpFields = (fields) => {\n fields.forEach((field) => {\n // Using empty string instead of `null` to avoid the warning \"`value` prop on `input` should not be null.\n // Consider using an empty string to clear the component or `undefined` for uncontrolled components\".\n setValueToFieldWithIdentifier(field, '')\n })\n }\n\n const handleErrors = () => {\n const errorMessages = []\n const addressErrorsKey = 'base'\n\n // Example:\n // errors = {\n // properties_attributes: [\n // { base: ['The address is invalid'] },\n // {},\n // {}\n // ]\n // }\n if (errors) {\n Object.keys(errors).forEach((key) => {\n // Check if it can have multiple addresses (ex: customer addresses)\n if (addressIdentifier?.includes(key)) {\n // ex: addressIdentifier = \"properties_attributes[1]\"\n const error = errors[key] && errors[key][addressPropertyIndex]\n const addressErrors = error && error[addressErrorsKey]\n\n if (addressErrors && addressErrors.length > 0) {\n errorMessages.push(addressErrors[0])\n }\n } else {\n // It's a single address (ex: location address)\n // Example:\n // errors = {\n // main_address.base: ['The address is invalid']\n // }\n const error = errors[key]\n const isAddressError = error && error.length > 0 && key.includes(addressErrorsKey)\n\n if (isAddressError) {\n errorMessages.push(error[0])\n }\n }\n })\n }\n\n setErrorMessage(errorMessages.join('. '))\n }\n\n // It replaces the \"dirty\" prop from Formik. It smartly compares the current values with the initial values\n // ignoring missing fields and null values.\n const isDirty = addressHelper.addressDirty(values, initialValues, addressIdentifier, defaultCountryId)\n\n // Only display the warning for existing invalid addresses\n const showInvalidAddressWarning = showInvalidExistingAddressWarning && valueForFieldWithIdentifier('meets_validation_requirements') === false\n\n // Render\n const renderFields = () => (\n \n {fieldNamesArray.map((fields) => {\n return fields.map((field) => (\n \n {buildField(field)}\n \n ))\n })}\n \n )\n\n if (isLoading) {\n return \n } else {\n return (\n <>\n {showInvalidAddressWarning && {invalidExistingAddressWarning}}\n {errorMessage && {errorMessage}}\n {renderFields()}\n \n )\n }\n}\n\nAddressFields.propTypes = {\n disabled: PropTypes.bool,\n countries: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n alpha2: PropTypes.string.isRequired,\n form_layout: PropTypes.string.isRequired,\n zipcode_required: PropTypes.bool.isRequired,\n zipcode_format: PropTypes.string,\n zipcode_type: PropTypes.string,\n zipcode_placeholder: PropTypes.any,\n province_required: PropTypes.bool.isRequired,\n province_type: PropTypes.string\n })\n ).isRequired,\n provinces: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n country_id: PropTypes.string.isRequired\n })\n ).isRequired,\n showFirstAndLastName: PropTypes.bool,\n addressIdentifier: PropTypes.string,\n defaultCountryId: PropTypes.string,\n defaultFormLayout: PropTypes.string,\n errorKey: PropTypes.string,\n fieldTranslationPrefix: PropTypes.string,\n selectPlaceholder: PropTypes.string,\n validateOnChangeOnly: PropTypes.bool,\n skipValidation: PropTypes.bool,\n invalidExistingAddressWarning: PropTypes.any,\n showInvalidExistingAddressWarning: PropTypes.bool,\n addressPropertyIndex: PropTypes.number,\n fieldDebounce: PropTypes.number,\n autoFocus: PropTypes.bool,\n initialValues: PropTypes.shape({\n first_name: PropTypes.string,\n last_name: PropTypes.string,\n country: PropTypes.string,\n address1: PropTypes.string,\n address2: PropTypes.string,\n city: PropTypes.string,\n region: PropTypes.string,\n zipcode: PropTypes.string,\n country_id: PropTypes.string,\n province_id: PropTypes.string,\n meets_validation_requirements: PropTypes.bool\n })\n}\n\nexport default AddressFields\n","import isEmpty from 'lodash/isEmpty'\nimport SettingUtils from 'shared/utils/settings'\nimport { featureEnabled, FeatureFlags } from 'back_office/v2/utils/utils'\n\nexport const addressFieldsOrder = () => {\n if (featureEnabled(FeatureFlags.NEW_ADDRESS_VALIDATION)) {\n return ''\n }\n\n const defaultOrder = SettingUtils.get('address.fields_order')\n\n if (isEmpty(defaultOrder)) return ''\n\n const fields = ['first_name', 'last_name', 'country', 'address1', 'address2', ...defaultOrder]\n\n // Build a string of fields to pass to the AddressFields component.\n // E.g.: \"{first_name}\\n{last_name}\\n{address1}\\n{address2}\\n{city}\\n{country}\\n{zipcode}\"\n return fields.map((field) => `{${field.replace('region', 'province')}}`).join('\\n')\n}\n","import { Country } from 'back_office/v2/redux/models/models'\nexport default Country.actions\n","import CountryActions from 'back_office/v2/redux/actions/country_actions'\n\nexport const fetchCountriesAndProvinces = () => {\n CountryActions.fetchAll({\n page: { size: 300 },\n include: 'provinces'\n })\n}\n","// Libraries\nimport isEmpty from 'lodash/isEmpty'\n\n// Shared\nimport { featureDisabled, FeatureFlags } from 'back_office/v2/utils/utils'\n\n// Build an array of arrays, where each subarray is a row of field names\nconst buildFieldNamesArray = (formLayout, showFirstAndLastName = true) => {\n const fieldsArray = []\n\n if (isEmpty(formLayout)) return fieldsArray\n\n const rows = formLayout.split('\\n')\n\n rows.forEach((row) => {\n const fields = row.match(/({\\w+})/g)\n\n if (!fields) return\n\n // Remove curled braces from the field names\n let fieldNames = fields.map((field) => {\n return field.replace(/[{}]/g, '')\n })\n\n if (!showFirstAndLastName) {\n fieldNames = fieldNames.filter((fieldName) => {\n return !['first_name', 'last_name'].includes(fieldName)\n })\n }\n\n fieldsArray.push(fieldNames)\n })\n\n return fieldsArray\n}\n\nconst buildFieldLabel = ({ name, country, translationPrefix }) => {\n const prefix = translationPrefix || 'common'\n\n switch (name) {\n case 'first_name':\n case 'last_name':\n return `${prefix}.${name}`\n case 'address1':\n return `${prefix}.address_fields.address_line_1`\n case 'address2':\n return `${prefix}.address_fields.address_line_2`\n case 'city':\n case 'country':\n return `${prefix}.address_fields.${name}`\n case 'province': {\n if (country?.province_type) {\n return `${prefix}.address_fields.province_type.${country.province_type}`\n } else {\n return `${prefix}.address_fields.province`\n }\n }\n case 'zipcode': {\n if (country?.zipcode_type) {\n return `${prefix}.address_fields.zipcode_type.${country.zipcode_type}`\n } else {\n return `${prefix}.address_fields.zipcode`\n }\n }\n }\n}\n\nconst buildFieldPlaceholder = ({ name, country, translationPrefix }) => {\n const prefix = translationPrefix || 'common'\n\n switch (name) {\n case 'first_name':\n case 'last_name':\n return `${prefix}.${name}`\n case 'address1':\n return `${prefix}.address_fields.address_line_1_placeholder`\n case 'address2':\n return `${prefix}.address_fields.address_line_2_placeholder`\n case 'city':\n return `${prefix}.address_fields.${name}`\n case 'province': {\n if (country?.province_type) {\n return `${prefix}.address_fields.province_type.${country.province_type}`\n } else {\n return `${prefix}.address_fields.province`\n }\n }\n case 'zipcode': {\n if (country?.zipcode_type) {\n return `${prefix}.address_fields.zipcode_type.${country.zipcode_type}`\n } else {\n return `${prefix}.address_fields.zipcode`\n }\n }\n }\n}\n\nconst buildFieldError = ({ name, country, t, errorKey, translationPrefix }) => {\n const prefix = translationPrefix || 'common'\n\n let fieldLabel = ''\n\n switch (name) {\n case 'first_name':\n case 'last_name':\n fieldLabel = t(`${prefix}.${name}`)\n break\n case 'address1':\n fieldLabel = t(`${prefix}.address_fields.address_line_1`)\n break\n case 'address2':\n fieldLabel = t(`${prefix}.address_fields.address_line_2`)\n break\n case 'city':\n case 'country':\n fieldLabel = t(`${prefix}.address_fields.${name}`)\n break\n case 'province': {\n if (country?.province_type) {\n fieldLabel = t(`${prefix}.address_fields.province_type.${country.province_type}`)\n } else {\n fieldLabel = t(`${prefix}.address_fields.province`)\n }\n break\n }\n case 'zipcode': {\n if (country?.zipcode_type) {\n fieldLabel = t(`${prefix}.address_fields.zipcode_type.${country.zipcode_type}`)\n } else {\n fieldLabel = t(`${prefix}.address_fields.zipcode`)\n }\n break\n }\n }\n\n return `${fieldLabel} ${t(errorKey || 'common.errors.mixed.default')}`\n}\n\n// Check if any of the address field values have been changed.\n// It ignores undefined values and the country if it's the default country.\nconst addressDirty = (values, initialValues, addressIdentifier, defaultCountryId) => {\n values = extractValuesForIdentifier(values, addressIdentifier)\n initialValues = extractValuesForIdentifier(initialValues, addressIdentifier)\n\n if (isEmpty(values)) return false\n\n const countryHasChanged = presence(values.country_id) !== presence(initialValues?.country_id) &&\n values.country_id !== defaultCountryId\n\n if (countryHasChanged) return true\n\n const fields = ['first_name', 'last_name', 'address1', 'address2', 'city', 'zipcode', 'province_id']\n\n const someFieldHasChanged = fields.some((field) => {\n return presence(values[field]) !== presence(initialValues?.[field])\n })\n\n if (someFieldHasChanged) return true\n\n const provinceHasBeenSelected = values.region === values.province_id\n const regionHasChanged = presence(values.region) !== presence(initialValues?.region) && !provinceHasBeenSelected\n\n return regionHasChanged\n}\n\n// Whether the address needs to be persisted.\nconst shouldPersistAddressAttributes = (values) => {\n if (featureDisabled(FeatureFlags.NEW_ADDRESS_VALIDATION)) return true\n\n if (!addressEmpty(values)) return true\n\n const state = window.store.getState()\n const companyId = state.session.currentCompanyId\n const company = state.orm.companies.getById(companyId)\n const defaultCountryId = state.orm.countries.getFirst({ name: company.country })?.id\n\n const isDefaultCountry = values.country_id === defaultCountryId\n const isEmptyCountry = isEmpty(values.country_id)\n\n return !isEmptyCountry && !isDefaultCountry\n}\n\n// Check if all the address fields are empty, except for the country_id\nconst addressEmpty = (values) => {\n // country_id === country when we set the initial value of the country_id with the default country\n if (!isEmpty(values.country_id) && !isEmpty(values.country) && values.country_id !== values.country) {\n return false\n }\n\n const fields = [\n 'first_name', 'last_name', 'address1', 'address2', 'city', 'zipcode', 'province_id', 'region'\n ]\n\n return fields.every((field) => {\n return isEmpty(values[field])\n })\n}\n\nconst extractValuesForIdentifier = (values, addressIdentifier) => {\n if (isEmpty(addressIdentifier)) {\n return values\n } else {\n // Sometimes, the address identifier is a string like `attributes[0]`\n const regexp = /^(?\\w+)\\[(?\\d+)\\]$/\n const match = addressIdentifier.match(regexp)\n if (match) {\n const { identifier, index } = match.groups\n\n return values[identifier][index]\n } else {\n return values[addressIdentifier]\n }\n }\n}\n\nconst setValueForIdentifier = (fieldName, value, initialValues, addressIdentifier) => {\n if (isEmpty(addressIdentifier)) {\n initialValues[fieldName] = value\n } else {\n // Sometimes, the address identifier is a string like `attributes[0]`\n const regexp = /^(?\\w+)\\[(?\\d+)\\]$/\n const match = addressIdentifier.match(regexp)\n if (match) {\n const { identifier, index } = match.groups\n\n if (initialValues[identifier] && initialValues[identifier][index]) {\n initialValues[identifier][index][fieldName] = value\n }\n } else {\n if (initialValues[addressIdentifier]) {\n initialValues[addressIdentifier][fieldName] = value\n }\n }\n }\n}\n\n// Return the value if it's not empty (for strings/null/undefined), otherwise return null.\nconst presence = (string) => {\n return string || null\n}\n\nexport {\n buildFieldNamesArray,\n buildFieldLabel,\n buildFieldPlaceholder,\n buildFieldError,\n addressDirty,\n shouldPersistAddressAttributes,\n addressEmpty,\n extractValuesForIdentifier,\n setValueForIdentifier\n}\n","import { Item } from 'back_office/v2/redux/models/models'\nexport default Item.actions\n","import { Line } from 'back_office/v2/redux/models/models'\nexport default Line.actions\n","/* TODO: switch to 'import ... from' syntax */\n/* global require,module */\n\nconst ReduxModel = require('shared/lib/orm/reduxModel').default\n\nconst Model = {}\n\n// ************************************************************\n// Resources WITH defined associations\n// ************************************************************\n\nconst documentModel = (type) => {\n return ReduxModel(type, {\n defaultValues: { tags: [] },\n hasMany: {\n lines: { namespace: Model },\n taxValues: { namespace: Model }\n },\n belongsTo: {\n customer: { namespace: Model },\n order: { namespace: Model },\n coupon: { namespace: Model }\n }\n })\n}\nModel.Document = documentModel('Document')\nModel.Invoice = documentModel('Invoice')\nModel.Contract = documentModel('Contract')\nModel.Quote = documentModel('Quote')\n\nModel.CheckoutItem = ReduxModel('CheckoutItem', {\n belongsTo: {\n default_property: { namespace: Model, key: 'default_property_id' }\n }\n})\n\nModel.Employee = ReduxModel('Employee', {\n defaultValues: { permissions: [] },\n hasMany: {\n notes: { key: 'employee_id', namespace: Model }\n }\n})\n\nModel.Order = ReduxModel('Order', {\n hasMany: {\n // vcard uses order.lines\n lines: { namespace: Model },\n // orderscreen uses order.tax_values\n taxValues: { namespace: Model }\n }\n})\n\nModel.Note = ReduxModel('Note', {\n belongsTo: {\n employee: { key: 'employee_id', namespace: Model }\n }\n})\n\nModel.Payment = ReduxModel('Payment', {\n belongsTo: {\n order: { namespace: Model, key: 'order_id' },\n employee: { namespace: Model, key: 'employee_id' }\n },\n hasOne: {\n transaction: { namespace: Model, foreignKey: 'payment_id' }\n }\n})\n\nModel.PriceRule = ReduxModel('PriceRule', {\n defaultValues: {},\n belongsTo: {\n price_ruleset: { namespace: Model, key: 'price_ruleset_id' }\n }\n})\n\nModel.PriceRuleset = ReduxModel('PriceRuleset', {\n defaultValues: {},\n hasMany: {\n price_rules: { namespace: Model, foreignKey: 'price_ruleset_id' }\n }\n})\n\nModel.PriceStructure = ReduxModel('PriceStructure', {\n hasMany: {\n price_tiles: { namespace: Model, foreignKey: 'price_id' }\n }\n})\n\nModel.PriceTile = ReduxModel('PriceTile', {\n belongsTo: {\n price_structure: { namespace: Model, key: 'price_id' }\n }\n})\n\nModel.Product = ReduxModel('Product', {\n hasMany: {\n stockItems: { namespace: Model, foreignKey: 'item_id' }\n },\n hasOne: {\n barcode: { namespace: Model }\n },\n belongsTo: {\n photo: { namespace: Model }\n }\n})\n\nModel.ProductGroup = ReduxModel('ProductGroup', {\n hasMany: {\n products: { foreignKey: 'product_group_id', namespace: Model },\n stockItems: { through: 'products', namespace: Model },\n properties: { namespace: Model }\n },\n hasOne: {\n barcode: { namespace: Model },\n photo: { foreignKey: 'owner_id', namespace: Model }\n },\n belongsTo: {\n taxCategory: { namespace: Model }\n }\n})\n\nModel.StockCount = ReduxModel('StockCount', {\n belongsTo: {\n product: { namespace: Model, key: 'item_id' },\n stockItem: { namespace: Model, key: 'stock_item_id' }\n }\n})\n\nModel.StockItem = ReduxModel('StockItem', {\n belongsTo: {\n product: { namespace: Model, key: 'item_id' }\n },\n hasOne: {\n barcode: { namespace: Model }\n },\n hasMany: {\n orders: { namespace: Model }\n }\n})\n\nModel.Transaction = ReduxModel('Transaction', {\n belongsTo: {\n payment: { namespace: Model, key: 'payment_id' }\n }\n})\n\nModel.User = ReduxModel('User', {\n belongsTo: {\n customer: { namespace: Model, key: 'customer_id' }\n }\n})\n\n// ************************************************************\n// Resources without associations\n// ************************************************************\n\nModel.ActivityLog = ReduxModel('ActivityLog')\nModel.App = ReduxModel('App')\nModel.AppPlan = ReduxModel('AppPlan')\nModel.AppSubscription = ReduxModel('AppSubscription')\nModel.AppSubscriptionPlan = ReduxModel('AppSubscriptionPlan')\nModel.AppCarrier = ReduxModel('AppCarrier')\nModel.Asset = ReduxModel('Asset')\nModel.AuthenticationMethod = ReduxModel('AuthenticationMethod')\nModel.Barcode = ReduxModel('Barcode')\nModel.BillingInvoice = ReduxModel('BillingInvoice')\nModel.BulkUpsert = ReduxModel('BulkUpsert')\nModel.Bundle = ReduxModel('Bundle')\nModel.BundleItem = ReduxModel('BundleItem')\nModel.CancellationRequest = ReduxModel('CancellationRequest')\nModel.Cluster = ReduxModel('Cluster')\nModel.Collection = ReduxModel('Collection')\nModel.CollectionItem = ReduxModel('CollectionItem')\nModel.CollectionItemAssociation = ReduxModel('CollectionItemAssociation')\nModel.CollectionTree = ReduxModel('CollectionTree')\nModel.Company = ReduxModel('Company')\nModel.Count = ReduxModel('Count')\nModel.Country = ReduxModel('Country')\nModel.Coupon = ReduxModel('Coupon')\nModel.Creditcard = ReduxModel('Creditcard')\nModel.Customer = ReduxModel('Customer')\nModel.DefaultProperty = ReduxModel('DefaultProperty')\nModel.DepositHold = ReduxModel('DepositHold')\nModel.Email = ReduxModel('Email')\nModel.EmailTemplate = ReduxModel('EmailTemplate')\nModel.EmployeeInvitation = ReduxModel('EmployeeInvitation')\nModel.ExternalImage = ReduxModel('ExternalImage')\nModel.FeatureEnrollment = ReduxModel('FeatureEnrollment')\nModel.Integration = ReduxModel('Integration')\nModel.InventoryBreakdown = ReduxModel('InventoryBreakdown')\nModel.InvoiceFinalization = ReduxModel('InvoiceFinalization')\nModel.InvoiceRevision = ReduxModel('InvoiceRevision')\nModel.IpAddress = ReduxModel('IpAddress')\nModel.Item = ReduxModel('Item')\nModel.ItemPrice = ReduxModel('ItemPrice')\nModel.Line = ReduxModel('Line')\nModel.Locale = ReduxModel('Locale')\nModel.Location = ReduxModel('Location')\nModel.LocationCarrier = ReduxModel('LocationCarrier')\nModel.LoginActivity = ReduxModel('LoginActivity')\nModel.Menu = ReduxModel('Menu')\nModel.MenuItem = ReduxModel('MenuItem')\nModel.Merge = ReduxModel('Merge')\nModel.OperatingRule = ReduxModel('OperatingRule')\nModel.Operation = ReduxModel('Operation')\nModel.OrderAvailability = ReduxModel('OrderAvailability')\nModel.OrderDeliveryRate = ReduxModel('OrderDeliveryRate')\nModel.OrderDeliveryRateRecalculation = ReduxModel('OrderDeliveryRateRecalculation')\nModel.OrderDeliveryRateReset = ReduxModel('OrderDeliveryRateReset')\nModel.OrderDuplication = ReduxModel('OrderDuplication')\nModel.OrderFulfillment = ReduxModel('OrderFulfillment')\nModel.OrderPriceRecalculation = ReduxModel('OrderPriceRecalculation')\nModel.OrderStatusTransition = ReduxModel('OrderStatusTransition')\nModel.Page = ReduxModel('Page')\nModel.PaymentMethod = ReduxModel('PaymentMethod')\nModel.PaymentProfile = ReduxModel('PaymentProfile')\nModel.PaymentAuthorization = ReduxModel('PaymentAuthorization', { stateKey: 'payments' })\nModel.PaymentCharge = ReduxModel('PaymentCharge', { stateKey: 'payments' })\nModel.PaymentRefund = ReduxModel('PaymentRefund', { stateKey: 'payments' })\nModel.Photo = ReduxModel('Photo')\nModel.PlannableItem = ReduxModel('PlannableItem')\nModel.Planning = ReduxModel('Planning')\nModel.PriceWrapper = ReduxModel('PriceWrapper')\nModel.ProductGroupDuplication = ReduxModel('ProductGroupDuplication')\nModel.ProductTrackerActions = ReduxModel('ProductTracker')\nModel.Property = ReduxModel('Property')\nModel.Province = ReduxModel('Province')\nModel.Publication = ReduxModel('Publication')\nModel.RenderedEmail = ReduxModel('RenderedEmail')\nModel.ReportConsumable = ReduxModel('ReportConsumable')\nModel.ReportRental = ReduxModel('ReportRental')\nModel.ReportRentalInterval = ReduxModel('ReportRentalInterval')\nModel.ReportStockItem = ReduxModel('ReportStockItem')\nModel.Session = ReduxModel('Session')\nModel.Signature = ReduxModel('Signature')\nModel.Sorting = ReduxModel('Sorting')\nModel.StockAdjustment = ReduxModel('StockAdjustment')\nModel.StockItemArchivation = ReduxModel('StockItemArchivation')\nModel.StockItemPlanning = ReduxModel('StockItemPlanning')\nModel.StockItemSuggestion = ReduxModel('StockItemSuggestion')\nModel.StockItemTracker = ReduxModel('StockItemTracker')\nModel.Tag = ReduxModel('Tag')\nModel.TaxCategory = ReduxModel('TaxCategory')\nModel.TaxRate = ReduxModel('TaxRate')\nModel.TaxRegion = ReduxModel('TaxRegion')\nModel.TaxValue = ReduxModel('TaxValue')\nModel.Theme = ReduxModel('Theme')\nModel.Transfer = ReduxModel('Transfer')\nModel.UserInvitation = ReduxModel('UserInvitation')\n\nmodule.exports = Model\n","import OriginalReactCSSTransitionGroup from 'react-addons-css-transition-group'\nimport React from 'react'\n\n// Overwrite the original ReactCSSTransitionGroup to automatically disable animation in tests.\n//\nconst ReactCSSTransitionGroup = (props) => {\n if (window.testMode) {\n return (\n \n )\n } else {\n return \n }\n}\n\nexport default ReactCSSTransitionGroup\n","const ALLOWED_FORMATS = ['jpeg', 'png', 'webp']\n\nexport const optimizeImageUrl = (src, options = {}) => {\n if (!src) {\n return ''\n }\n\n const { IMAGE_CDN } = process.env\n\n let imageUrl = src\n\n if (!IMAGE_CDN) {\n return imageUrl\n }\n\n const urlPrefix = IMAGE_CDN.replace(/\\/$/, '')\n\n const parts = []\n\n if (options.keepType) {\n parts.push('keepType')\n }\n\n if (options.width) {\n parts.push(`w${options.width}`)\n }\n\n if (options.height) {\n parts.push(`h${options.height}`)\n }\n\n if (options.quality) {\n parts.push(`q${options.quality}`)\n }\n\n if (options.format && ALLOWED_FORMATS.includes(options.format)) {\n imageUrl += `.${options.format}`\n }\n\n const optionsPrefix = parts.length ? `/${parts.join('/')}` : ''\n\n const uri = new URL(imageUrl)\n\n return `${urlPrefix}${optionsPrefix}${uri.pathname}`\n}\n","/* global process */\n\nexport default ({ slug, key = '', themeId, entityId, extraParams = {} }) => {\n const templates = {\n 'index': '/',\n 'product': `/products/${entityId || 1}`,\n 'search': '/search',\n '404': '/404',\n 'collection': `/collections/${entityId || 1}`,\n 'list-collections': '/collections',\n 'cart': '/carts/1',\n 'accept-invitation': '/customers/invite/accept',\n 'activate-account': '/customers/activate_account',\n 'edit-password': '/customers/reset_password/edit',\n 'login': '/customers/login',\n 'register': '/customers/register',\n 'reset-password': '/customers/reset_password/new',\n 'page': `/pages/${entityId || 'preview-page'}`,\n 'privacy-policy': '/privacy-policy'\n }\n const templateTypes = Object.keys(templates)\n\n const match = key.match(new RegExp(`templates/(${templateTypes.join('|')}).*.(?:json|liquid)`))\n const templateType = match?.[1]\n\n const base =\n {\n production: `${slug}.booqable.com/shop`,\n development: `${slug}.${process.env.PROXY_HOST || 'booqable.test'}/shop`,\n test: `127.0.0.1:${window.testPort || 4000}`,\n staging: `${slug}.staging.booqable.com/shop`,\n feature: `${window.location.host}/shop`,\n snapshots: `${window.location.host}/shop`\n }[window.booqableOptions?.environment ?? window.environment] || '#'\n\n const url = new URL(`${location.protocol}//${base}/preview${templates[templateType] || ''}`)\n\n url.searchParams.append('theme_id', themeId)\n\n if (templateType === 'page') {\n url.searchParams.append('template_key', key)\n }\n\n Object.entries(extraParams).forEach(([key, value]) => {\n url.searchParams.append(key, value)\n })\n\n return url.toString()\n}\n","/**\n * Debounces given function that returns a promise. Lodash does not properly support this.\n */\nexport default (f, interval) => {\n let timer = null\n\n return (...args) => {\n clearTimeout(timer)\n\n return new Promise((resolve) => {\n timer = setTimeout(\n () => resolve(f(...args)),\n interval\n )\n })\n }\n}\n","import { useSyncExternalStore } from 'react'\n\nconst getSnapshot = (breakpoint) => {\n const mobileDevice = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)\n if (mobileDevice) return true\n\n return window.innerWidth < breakpoint\n}\n\nconst subscribe = (callback) => {\n window.addEventListener('resize', callback)\n return () => window.removeEventListener('resize', callback)\n}\n\n// This hook makes it possible to detect if the user is on a \"mobile device\" or not.\n// Together with window width that was required for the theme settings preview\nexport const useIsMobile = (breakpoint = 576) => {\n const isMobile = useSyncExternalStore(\n subscribe,\n () => getSnapshot(breakpoint),\n false\n )\n\n // Return state\n return isMobile\n}\n\nexport default useIsMobile\n","// Libraries\nimport { useSelector } from 'react-redux'\nimport { createSelector } from 'reselect'\n\n// Shared\nimport { equalityFn } from 'shared/utils/useOrm'\n\nconst selector = createSelector(\n [(state) => state.settings, (state) => state.orm.operating_rules],\n (settings, operatingRules) => {\n const types = [settings.get('store.period_type')]\n\n if (settings.get('store.use_business_hours')) {\n types.push('hours')\n }\n\n if (settings.get('store.use_away_mode')) {\n types.push('away')\n }\n\n return operatingRules.getAll({ data_type: types })\n }\n)\n\nexport const useOpeningHours = () => useSelector(selector, equalityFn)\n","// React\nimport { useRef, useEffect } from 'react'\n\nexport const usePrevious = (value) => {\n const ref = useRef()\n\n useEffect(() => {\n ref.current = value\n }, [value])\n\n return ref.current\n}\n","import styled, { css } from 'styled-components'\nimport { size } from 'ui/themes/utils'\n\nimport Div from 'ui/elements/Div'\n\nexport const ActionGroup = styled(Div)`\n text-align: right;\n\n > *:not(:first-child) {\n margin-left: ${size('margin')};\n }\n\n * {\n display: inline-block;\n }\n\n ${(props) => props.float && css`\n float: right;\n `}\n\n ${(props) => props.left && css`\n text-align: left;\n `}\n\n ${({ flex }) => flex && css`\n display: flex;\n `}\n\n ${({ align }) => align && css`\n align-items: ${align};\n `}\n\n ${({ justify }) => justify && css`\n justify-content: ${justify};\n `}\n\n ${({ spacing }) => spacing && css`\n > *:not(:first-child) {\n margin-left: ${size('margin', spacing)};\n }\n `}\n`\n","import styled, { css } from 'styled-components'\nimport { shiftColor, color, size, fontSize } from 'ui/themes/utils'\nimport Div from 'ui/elements/Div'\nimport CIcon from 'ui/components/Icon'\n\nexport const Icon = styled(CIcon)`\n`\n\nexport const AlertBar = styled(Div)`\n display: flex;\n flex-direction: row;\n align-items: center;\n align-self: stretch;\n gap: ${size('padding', 'sm')};\n\n ${({ noBorder }) => !noBorder && css`\n border: ${size('borderWidth')} solid ${color('Misc/Divider')};\n `}\n border-radius: ${size('borderRadius')};\n\n font-size: ${fontSize('md')};\n\n margin-bottom: ${size('margin', 'md')};\n padding: ${size('padding', 'sm')};\n\n ${({ type }) => css`\n color: ${shiftColor(type, 80)};\n background-color: ${shiftColor(type, -85)};\n border-color: ${shiftColor(type, -20)};\n `}\n\n > ${Icon} {\n color: ${(props) => shiftColor(props.type, 20)};\n font-size: ${fontSize('lgplus')};\n }\n`\n","import { AlertBar, Icon } from './styles'\n\nexport default Object.assign(AlertBar, {\n Icon\n})\n","import styled, { css } from 'styled-components'\n\nimport Div from 'ui/elements/Div'\n\nconst COLUMNS_COUNT = 12\n\nconst BREAKPOINTS = {\n xs: '0px',\n sm: '576px',\n md: '768px',\n lg: '992px',\n xl: '1200px'\n}\n\nconst CONTAINER_MAX_WIDTHS = {\n sm: '540px',\n md: '720px',\n lg: '960px',\n xl: '1140px'\n}\n\nconst createMediaQuery = (breakpoint) => {\n if (!BREAKPOINTS[breakpoint]) return ''\n\n return `@media (min-width: ${BREAKPOINTS[breakpoint]})`\n}\n\nconst generateColSpanStyles = (props) => {\n const styles = Object.entries(props).map(([breakpoint, span]) => {\n if (!span) return ''\n\n if (breakpoint === 'xs') {\n return `\n grid-column: span ${span};\n `\n }\n\n return `\n ${createMediaQuery(breakpoint)} {\n grid-column: span ${span};\n }\n `\n })\n\n return styles.join('')\n}\n\nconst generateMediaQueryStyles = (props) => {\n if (props.fluid) return ''\n\n const styles = Object.entries(CONTAINER_MAX_WIDTHS).map(\n ([breakpoint, width]) => `\n ${createMediaQuery(breakpoint)} {\n max-width: ${width};\n }\n `\n )\n\n return styles.join('')\n}\n\nexport const Container = styled(Div)`\n width: 100%;\n\n margin-right: auto;\n margin-left: auto;\n padding-right: 15px;\n padding-left: 15px;\n\n ${(props) => css`${generateMediaQueryStyles(props)}`}\n`\n\nexport const Row = styled(Div)`\n display: grid;\n grid-template-columns: repeat(${COLUMNS_COUNT}, 1fr);\n gap: 15px;\n\n ${({ gap }) => gap && css`\n gap: ${gap}px;\n `}\n\n ${({ noGutter }) => noGutter && css`\n gap: 0;\n `}\n`\n\nexport const Col = styled(Div)`\n grid-column: 1 / -1; // Default full width on mobile\n\n ${(props) => css`${generateColSpanStyles(props)}`}\n`\n","/**\n * A collection of grid layout components for creating responsive layouts.\n * Uses a 12-column grid system with responsive breakpoints.\n * It should be used in environments where `bootstrap-grid` is not available (e.g. shop, shop-components).\n * @module Grid\n */\n\nimport { Container, Row, Col } from './styles'\n\n/**\n * Available breakpoints for responsive design\n * @typedef {Object} Breakpoints\n * @property {string} xs - Extra small devices (< 576px)\n * @property {string} sm - Small devices (≥ 576px)\n * @property {string} md - Medium devices (≥ 768px)\n * @property {string} lg - Large devices (≥ 992px)\n * @property {string} xl - Extra large devices (≥ 1200px)\n */\n\n/**\n * Column span configuration for different breakpoints\n * @typedef {Object} ColSpan\n * @property {number} [xs] - Number of columns to span on extra small devices\n * @property {number} [sm] - Number of columns to span on small devices\n * @property {number} [md] - Number of columns to span on medium devices\n * @property {number} [lg] - Number of columns to span on large devices\n * @property {number} [xl] - Number of columns to span on extra large devices\n */\n\n/**\n * @typedef {Object} GridComponents\n * @property {typeof Container} Container - A container component that provides consistent padding and max-width\n * @property {typeof Row} Row - A row component that creates horizontal groups of columns\n * @property {typeof Col} Col - A column component that specifies content width within a row\n */\n\n/**\n * Grid system components for creating responsive layouts.\n * @type {GridComponents}\n *\n * @example\n * import Grid from './Grid'\n *\n * function Layout() {\n * return (\n * \n * \n * Content\n * \n * \n * )\n * }\n */\nconst Grid = {}\n\nGrid.Container = Container\nGrid.Row = Row\nGrid.Col = Col\n\n/**\n * A container component that provides consistent padding and max-width.\n * Container widths are responsive and determined by breakpoints.\n *\n * @component\n * @property {boolean} [fluid] - If true, the container will be full-width without max-width constraints\n *\n * Default max-widths per breakpoint:\n * - sm: 540px\n * - md: 720px\n * - lg: 960px\n * - xl: 1140px\n *\n * @example\n * // Fixed-width container\n * Content\n *\n * // Fluid container\n * Content\n */\nexport { Container }\n\n/**\n * A row component that creates a 12-column grid layout.\n * Uses CSS Grid under the hood with configurable gap spacing.\n *\n * @component\n * @property {number} [gap] - Custom gap size in pixels between columns\n * @property {boolean} [noGutter] - If true, removes all spacing between columns\n *\n * @example\n * // Default row with 15px gap\n * \n * Content\n * \n *\n * // Row with custom gap\n * \n * Content\n * \n *\n * // Row with no gutters\n * \n * Content\n * \n */\nexport { Row }\n\n/**\n * A column component that specifies content width within a row.\n * Spans full width by default on mobile (xs breakpoint).\n * Column spans can be specified for each breakpoint.\n *\n * @component\n * @property {number} [xs] - Number of columns to span on extra small devices (<576px)\n * @property {number} [sm] - Number of columns to span on small devices (≥576px)\n * @property {number} [md] - Number of columns to span on medium devices (≥768px)\n * @property {number} [lg] - Number of columns to span on large devices (≥992px)\n * @property {number} [xl] - Number of columns to span on extra large devices (≥1200px)\n *\n * @example\n * // Responsive column that spans:\n * // - 12 columns on mobile (<576px)\n * // - 6 columns on medium devices (≥768px)\n * // - 4 columns on large devices (≥992px)\n * Content\n *\n * // Column that spans 6 columns on all breakpoints\n * Content\n */\nexport { Col }\n\nexport default Grid\n","import styled, { css } from 'styled-components'\nimport { color, size, fontWeight, fontSize } from 'ui/themes/utils'\n\nimport I from 'ui/elements/I'\n\nexport const Location = styled.div`\n width: 100%;\n\n .Select__control {\n height: auto !important;\n min-height: 56px !important;\n }\n\n .Select__indicators {\n height: auto;\n min-height: 56px;\n }\n\n .Select__single-value {\n width: 100%;\n\n ${I} {\n /* It doesn't recognize value from fontSize util here */\n font-size: 16px !important;\n }\n }\n`\n\nexport const Control = styled.div`\n display: grid;\n grid-template-columns: min-content 1fr auto;\n align-items: center;\n gap: ${size('margin', 'sm')};\n`\n\nexport const Title = styled.p`\n color: ${color('Text/Primary')};\n\n font-size: ${fontSize('md')};\n font-weight: ${fontWeight('bold')};\n\n ${({ isOption }) =>\n isOption &&\n css`\n font-weight: ${fontWeight('semibold')};\n `}\n\n margin: 0;\n`\n\nexport const Subtitle = styled(Title)`\n font-weight: ${fontWeight('normal')};\n\n ${({ isOption }) =>\n isOption &&\n css`\n color: ${color('Text/Secondary')};\n\n font-size: ${fontSize('sm')};\n `}\n`\n\nexport const Option = styled.div`\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: ${size('margin', 'sm')};\n`\n","import { Location, Control, Title, Subtitle, Option } from './styles'\n\nLocation.Control = Control\nLocation.Title = Title\nLocation.Subtitle = Subtitle\nLocation.Option = Option\n\nexport default Location\n","import styled, { css } from 'styled-components'\nimport { color, unit, size } from 'ui/themes/utils'\n\nimport Div from 'ui/elements/Div'\nimport RadioGroup from 'ui/blocks/RadioGroup'\n\nexport const Picker = styled.div`\n display: flex;\n flex-direction: column;\n\n gap: ${unit('2')};\n\n container-type: inline-size;\n`\n\nexport const Portal = styled.div`\n position: relative;\n\n grid-column: span 1;\n\n @media screen and (max-width: 576px) {\n .DayPicker-NavBar [class*=\"NavigationPrevious\"],\n .DayPicker-NavBar [class*=\"NavigationNext\"] {\n padding: 0 ${size('padding', 'md')};\n }\n }\n`\n\nexport const Section = styled(Div)`\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n gap: ${unit('2')};\n\n padding: ${unit('6')};\n\n background-color: ${color('Background/Primary')};\n\n border-radius: ${unit('2')};\n\n box-shadow: ${size('shadow', 'sm')};\n\n [class^='Field']:not(:first-child) {\n margin-left: auto;\n }\n\n ${({ gap }) => gap && css`\n justify-content: flex-start;\n\n gap: ${unit(gap)};\n `}\n\n ${({ disabled }) => disabled && css`\n pointer-events: none;\n\n background-color: ${color('Secondary/Background1')};\n\n opacity: 0.4;\n `}\n\n ${({ disableStyling }) => disableStyling && css`\n border: none;\n\n padding: 0;\n\n box-shadow: none;\n `}\n`\n\nexport const Durations = styled(Section)`\n display: grid;\n grid-template-columns: 1fr;\n grid-auto-rows: max-content;\n\n column-gap: ${unit('5')};\n\n &.no-times {\n @container (min-width: 490px) {\n grid-template-columns: minmax(150px, 20%) 1fr;\n align-items: end;\n\n ${Portal} {\n grid-column: span 2;\n }\n }\n }\n\n @container (min-width: 690px) {\n grid-template-columns: minmax(200px, 20%) 1fr;\n align-items: end;\n\n ${Portal} {\n grid-column: span 2;\n }\n }\n`\n\nexport const Timeslots = styled(Section)`\n display: grid;\n grid-template-columns: 1fr;\n grid-auto-rows: max-content;\n\n [class^='Field']:not(:first-child) {\n margin-left: 0;\n }\n\n @container (min-width: 450px) {\n grid-template-columns: repeat(2, 1fr);\n\n [class^='Field']:not(:first-child) {\n margin-left: auto;\n }\n\n ${Portal} {\n grid-column: span 2;\n }\n }\n`\n\nexport const Period = styled(Section)`\n display: grid;\n grid-template-columns: 1fr;\n grid-auto-rows: max-content;\n\n [class*='Decorator'] {\n display: none;\n }\n\n [class^='Field']:not(:first-child) {\n margin-left: 0;\n }\n\n &.no-times {\n @container (min-width: 310px) {\n grid-template-columns: 1fr min-content 1fr;\n\n [class*='Decorator'] {\n display: flex;\n }\n\n [class^='Field']:not(:first-child) {\n margin-left: auto;\n }\n\n ${Portal} {\n grid-column: span 3;\n }\n }\n }\n\n @container (min-width: 550px) {\n grid-template-columns: 1fr min-content 1fr;\n\n [class*='Decorator'] {\n display: flex;\n }\n\n [class^='Field']:not(:first-child) {\n margin-left: auto;\n }\n\n ${Portal} {\n grid-column: span 3;\n }\n }\n`\n\nexport const FulfillmentTypeSelect = styled.div`\n width: 100%;\n\n ${RadioGroup} {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n\n gap: ${size('margin')};\n\n ${RadioGroup.Radio} {\n border: 1px solid ${color('Misc/Divider')};\n\n &[data-tid=\"Checked true\"] {\n background-color: ${color('Primary/Background2')};\n border-color: ${color('Primary/Base')};\n\n box-shadow: inset 0 0 0 1px ${color('Primary/Base')};\n }\n }\n }\n`\n\nexport const Error = styled.div`\n display: flex;\n align-items: center;\n\n gap: ${unit('2')};\n\n margin: 0 -${unit('6')};\n margin-top: -${unit('6')};\n /* We don't have a unit for 10px spacing :'( */\n padding: 10px ${unit('4')};\n\n background-color: ${color('Warning/Base')};\n color: ${color('Warning/Foreground1')};\n\n border-top-left-radius: ${unit('2')};\n border-top-right-radius: ${unit('2')};\n\n svg {\n width: 14px;\n\n fill: ${color('Warning/Foreground1')};\n }\n`\n","import { Picker, Section, Period, Durations, Portal, Timeslots, FulfillmentTypeSelect, Error } from './styles'\n\nPicker.Section = Section\nPicker.Period = Period\nPicker.Durations = Durations\nPicker.Timeslots = Timeslots\nPicker.Portal = Portal\nPicker.FulfillmentTypeSelect = FulfillmentTypeSelect\nPicker.Error = Error\n\nexport default Picker\n","import styled, { css } from 'styled-components'\nimport { color, unit, size } from 'ui/themes/utils'\n\nimport Div from 'ui/elements/Div'\n\nexport const Picker = styled.div`\n display: flex;\n flex-direction: column;\n\n gap: ${unit('2')};\n\n container-type: inline-size;\n`\n\nexport const Section = styled(Div)`\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n gap: ${unit('2')};\n\n padding: ${unit('4')};\n\n background-color: ${color('Background/Primary')};\n\n border: ${size('borderWidth')} solid ${color('Misc/Divider')};\n border-radius: ${unit('2')};\n\n ${({ gap }) => gap && css`\n justify-content: flex-start;\n\n gap: ${unit(gap)};\n `}\n\n ${({ disabled }) =>\n disabled &&\n css`\n pointer-events: none;\n\n background-color: ${color('Secondary/Background1')};\n\n opacity: 0.4;\n `}\n\n ${({ disableStyling }) =>\n disableStyling &&\n css`\n border: none;\n\n padding: 0;\n `}\n`\n\nexport const Durations = styled(Section)`\n display: grid;\n grid-template-columns: 1fr;\n grid-auto-rows: max-content;\n\n column-gap: ${unit('5')};\n\n &.no-times {\n @container (min-width: 490px) {\n grid-template-columns: minmax(150px, 20%) 1fr;\n align-items: end;\n }\n }\n\n @container (min-width: 690px) {\n grid-template-columns: minmax(200px, 20%) 1fr;\n align-items: end;\n }\n`\n\nexport const Timeslots = styled(Section)`\n display: grid;\n grid-template-columns: 1fr;\n grid-auto-rows: max-content;\n\n [class^='Field']:not(:first-child) {\n margin-left: 0;\n }\n\n @container (min-width: 450px) {\n grid-template-columns: repeat(2, 1fr);\n\n [class^='Field']:not(:first-child) {\n margin-left: auto;\n }\n }\n`\n\nexport const Period = styled(Section)`\n display: grid;\n grid-template-columns: 1fr;\n grid-auto-rows: max-content;\n\n [class*='Decorator'] {\n display: none;\n }\n\n [class^='Field']:not(:first-child) {\n margin-left: 0;\n }\n\n &.no-times {\n @container (min-width: 310px) {\n grid-template-columns: 1fr min-content 1fr;\n\n [class*='Decorator'] {\n display: flex;\n }\n\n [class^='Field']:not(:first-child) {\n margin-left: auto;\n }\n }\n }\n\n @container (min-width: 550px) {\n grid-template-columns: 1fr min-content 1fr;\n\n [class*='Decorator'] {\n display: flex;\n }\n\n [class^='Field']:not(:first-child) {\n margin-left: auto;\n }\n }\n`\n","import { Picker, Section, Period, Durations, Timeslots } from './styles'\n\nPicker.Section = Section\nPicker.Period = Period\nPicker.Durations = Durations\nPicker.Timeslots = Timeslots\n\nexport default Picker\n","// React\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport BAlertBar from 'ui/blocks/AlertBar'\n\nconst AlertBar = ({ type, icon, noBorder, modifiers, children }) => {\n const nestedModifiers = typeof modifiers === 'object' ? modifiers : { self: modifiers }\n\n const displayIcon = icon || {\n danger: 'times-circle',\n warning: 'exclamation-triangle',\n success: 'check-circle',\n info: 'info-circle'\n }[type]\n\n return (\n \n \n {children}\n \n )\n}\n\nAlertBar.propTypes = {\n type: PropTypes.oneOf(['info', 'warning', 'danger', 'success']).isRequired,\n icon: PropTypes.string,\n noBorder: PropTypes.bool,\n children: PropTypes.node,\n modifiers: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.object\n ])\n}\n\nexport default AlertBar\n","import React, { memo, useRef, useLayoutEffect } from 'react'\nimport PropTypes from 'prop-types'\n\n/**\n * DateTimePickerDay component displays a single day in a date picker.\n * It shows the date and optionally displays availability information.\n *\n * @component\n * @param {Object} props - The component props.\n * @param {Date} props.day - The date to display.\n * @param {('available'|'unavailable'|'partial')} [props.available] - The availability status of the day.\n * @param {number} [props.availableCount] - The count of available slots for the day.\n * @param {(true|false|'count')} [props.showAvailability] - Whether and how to show availability.\n * @param {boolean} [props.showCounts] - Whether to show the availability count.\n * @param {(string|Object)} [props.modifiers] - Modifiers for the day (e.g., 'past', 'future').\n * @param {boolean} [props.showPast] - Whether to show availability for past dates.\n * @returns {React.ReactElement} The rendered DateTimePickerDay component.\n */\nconst DateTimePickerDay = memo(\n ({ day, isMobile, available, availableCount, showAvailability, showCounts, modifiers, showPast }) => {\n const ref = useRef(null)\n\n useLayoutEffect(() => {\n if (!isMobile || modifiers?.from !== true) return\n\n ref.current?.scrollIntoView({ block: 'center', behavior: 'instant' })\n }, [])\n\n const className = [\n 'DayPicker-Day__wrapper',\n ...(!!showAvailability && (showPast || !modifiers?.past) ?\n ['DayPicker-Day__availability', available].filter(Boolean) :\n [])\n ].join(' ')\n\n return (\n
\n
\n
{day.getDate()}
\n {!!showAvailability && (showPast || !modifiers?.past) && showCounts && (\n
\n {typeof availableCount === 'number' ? availableCount : '...'}\n
\n )}\n
\n
\n )\n },\n (prevProps, nextProps) => {\n // Returning prop comparison to understand if the component should be re-rendered\n // true - component should not be re-rendered\n // false - component should be re-rendered\n return (\n prevProps.available === nextProps.available &&\n prevProps.day.getTime() === nextProps.day.getTime() &&\n prevProps.modifiers === nextProps.modifiers\n )\n }\n)\n\nDateTimePickerDay.displayName = 'DateTimePickerDay'\n\nDateTimePickerDay.propTypes = {\n /** The date to display */\n day: PropTypes.instanceOf(Date).isRequired,\n /** The availability status of the day */\n available: PropTypes.oneOf(['available', 'unavailable', 'partial']),\n /** The count of available slots for the day */\n availableCount: PropTypes.number,\n /** Whether and how to show availability */\n showAvailability: PropTypes.oneOf([true, false, 'count']),\n /** Whether to show the availability count */\n showCounts: PropTypes.bool,\n /** Modifiers for the day (e.g., 'past', 'future') */\n modifiers: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n /** Whether to show availability for past dates */\n showPast: PropTypes.bool,\n /** Whether the day is displayed on a mobile device */\n isMobile: PropTypes.bool\n}\n\nexport default DateTimePickerDay\n","// React\nimport React, { memo } from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport BLocationPicker from 'ui/blocks/Picker/Location'\nimport Div from 'ui/elements/Div'\nimport Skeleton from 'ui/blocks/Skeleton'\n\n// Libraries\nimport { components } from 'react-select'\nimport { isEmpty } from 'lodash'\n\nconst LocationPickerOptionComponent = (props) => {\n const location = props.selectProps.locations.toList().find((selectLocation) => {\n return selectLocation.id === props.data?.value\n })\n\n const deliveryDistance = props.selectProps.deliveryDistances?.find((record) => {\n return record.locationId === location.id\n })\n\n return (\n \n \n
\n {location?.name}\n {location?.main_address?.value && (\n {location.main_address.value}\n )}\n
\n {props.selectProps.showDeliveryDistances && isEmpty(deliveryDistance) && }\n {props.selectProps.showDeliveryDistances && !isEmpty(deliveryDistance) &&\n
{deliveryDistance.distance} {deliveryDistance.distance_unit}
}\n
\n
\n )\n}\n\nLocationPickerOptionComponent.propTypes = {\n selectProps: PropTypes.shape({\n locations: PropTypes.object,\n deliveryDistances: PropTypes.any,\n showDeliveryDistances: PropTypes.bool\n }),\n data: PropTypes.shape({\n value: PropTypes.string\n })\n}\n\nexport const LocationPickerOption = memo(LocationPickerOptionComponent)\n\nLocationPickerOption.displayName = 'LocationPicker'\n","// React\nimport React, { memo } from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport BLocationPicker from 'ui/blocks/Picker/Location'\nimport Icon from 'ui/components/Icon'\nimport Div from 'ui/elements/Div'\nimport Skeleton from 'ui/blocks/Skeleton'\n\n// Libraries\nimport { components } from 'react-select'\nimport { isEmpty } from 'lodash'\n\nconst LocationPickerSingleValueComponent = (props) => {\n const location = props.selectProps.locations.toList().find((selectLocation) => {\n return selectLocation.id === props.data?.value\n })\n\n const deliveryDistance = location && props.selectProps.deliveryDistances?.find((record) => {\n return record.locationId === location.id\n })\n\n const locationName = props.selectProps.title ?\n {location?.name} :\n {location?.name}\n\n const showDistanceForLocation = location && props.selectProps.showDeliveryDistances\n\n return (\n \n \n \n
\n {props.selectProps.title && {props.selectProps.title}}\n {locationName}\n {location?.address && props.selectProps.showAddress && (\n {location.address}\n )}\n
\n {showDistanceForLocation && isEmpty(deliveryDistance) && }\n {showDistanceForLocation && !isEmpty(deliveryDistance) && (\n
{deliveryDistance.distance} {deliveryDistance.distance_unit}
\n )}\n
\n
\n )\n}\n\nLocationPickerSingleValueComponent.propTypes = {\n selectProps: PropTypes.shape({\n locations: PropTypes.object,\n title: PropTypes.any,\n icon: PropTypes.string,\n deliveryDistances: PropTypes.any,\n showDeliveryDistances: PropTypes.bool,\n showAddress: PropTypes.bool\n }),\n data: PropTypes.shape({\n value: PropTypes.string\n })\n}\n\nexport const LocationPickerSingleValue = memo(LocationPickerSingleValueComponent)\n\nLocationPickerSingleValue.displayName = 'LocationPicker'\n","// React\nimport React, { memo } from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport BLocationPicker from 'ui/blocks/Picker/Location'\nimport { LocationPickerOption } from 'ui/components/Picker/LocationPicker/Option'\nimport { LocationPickerSingleValue } from 'ui/components/Picker/LocationPicker/SingleValue'\n\n// Shared\nimport { Field } from 'shared/form'\n\nexport const LocationSelect = memo(({\n name,\n options,\n locations,\n onChange,\n 'data-tid': target,\n disabled,\n title,\n icon,\n deliveryDistances,\n showDeliveryDistances,\n label,\n showAddress\n}) => (\n \n \n \n))\n\nLocationSelect.displayName = 'LocationSelect'\n\nLocationSelect.propTypes = {\n 'name': PropTypes.string.isRequired,\n 'options': PropTypes.array.isRequired,\n 'locations': PropTypes.object.isRequired,\n 'onChange': PropTypes.func.isRequired,\n 'data-tid': PropTypes.string,\n 'disabled': PropTypes.bool,\n 'title': PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n 'icon': PropTypes.string,\n 'deliveryDistances': PropTypes.array,\n 'showDeliveryDistances': PropTypes.bool,\n 'showAddress': PropTypes.bool,\n 'label': PropTypes.string\n}\n","// React\nimport { useMemo } from 'react'\n\n// Libraries\nimport { isEmpty } from 'lodash'\n\n// Hooks\nimport { useFormikContext } from 'formik'\nimport { usePicker } from 'ui/components/Picker/hooks'\n\n// Shared\nimport { isLocationInputEnabled, isLocationSelectable as _isLocationSelectable } from 'ui/components/Picker/utils'\nimport { featureEnabled, FeatureFlags } from 'back_office/v2/utils/utils'\n\nexport const useLocationsData = ({\n locations,\n isSingleLocationSelect: singleLocationSelect,\n deliveryDistances,\n showDeliveryDistances: withDeliveryDistances,\n deliveryAddressPresent: withDeliveryAddress\n}) => {\n const picker = usePicker()\n const form = useFormikContext()\n\n const isLocationSelectable = (options) => {\n return _isLocationSelectable({\n ...options,\n openingHours: picker.openingHours,\n values: form.values,\n locations\n })\n }\n\n const hasLocations = locations.size() > 1\n\n const startLocations = locations\n const stopLocations = useMemo(() => {\n return locations\n .filter((location) => {\n return isLocationSelectable({ type: 'stop', location })\n })\n .sort('name')\n }, [locations, isLocationSelectable])\n\n const options = useMemo(() => {\n const showDeliveryDistances =\n withDeliveryDistances && withDeliveryAddress && featureEnabled(FeatureFlags.DELIVERIES)\n\n if (showDeliveryDistances && !isEmpty(deliveryDistances)) {\n const locations = deliveryDistances\n .sort((a, b) => a.distance - b.distance)\n .map((distance) => {\n const location = startLocations.getById(distance.locationId)\n return { label: location.name, value: location.id }\n })\n\n return locations\n }\n\n return startLocations.sort('name').pluckObject({ label: 'name', value: 'id' })\n }, [startLocations, withDeliveryDistances, deliveryDistances, withDeliveryAddress])\n\n const isSingleLocationSelect = useMemo(() => {\n const hasStartInput = hasLocations && isLocationInputEnabled('start', { scope: picker.type })\n const hasStopInput = hasLocations && isLocationInputEnabled('stop', { scope: picker.type })\n\n return (\n singleLocationSelect ||\n (hasStartInput && !hasStopInput) ||\n (hasStartInput && hasStopInput && stopLocations?.size() <= 1)\n )\n }, [hasLocations, picker.type, singleLocationSelect, stopLocations])\n\n return {\n options,\n hasLocations,\n startLocations,\n stopLocations,\n isSingleLocationSelect\n }\n}\n","// React\nimport React, { Fragment } from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport { useFormikContext } from 'formik'\n\n// Components\nimport { LocationSelect } from 'ui/components/Picker/LocationPicker/Select'\n\n// Hooks\nimport { useLocationsData } from 'ui/components/Picker/LocationPicker/useLocationData'\nimport { usePicker } from 'ui/components/Picker/hooks'\n\n// Shared\nimport { isLocationInputEnabled } from 'ui/components/Picker/utils'\nimport { featureEnabled, FeatureFlags } from 'back_office/v2/utils/utils'\n\nexport const LocationPicker = ({ showAddress = true, ...props }) => {\n const picker = usePicker()\n const form = useFormikContext()\n\n const { options, hasLocations, startLocations, stopLocations, isSingleLocationSelect } = useLocationsData({\n ...props,\n locations: props.locations\n })\n\n const Wrapper = props.WrapperComponent || Fragment\n\n const handleLocationChange = (id, type) => {\n if (type === 'both') {\n form.setValues({\n ...form.values,\n start_location_id: id,\n stop_location_id: id\n })\n\n props.onChange?.({\n start_location_id: id,\n stop_location_id: id\n })\n } else {\n const field = `${type}_location_id`\n\n form.setFieldValue(field, id)\n\n props.onChange?.({\n [field]: id\n })\n }\n }\n\n const showDeliveryDistances =\n props.showDeliveryDistances && props.deliveryAddressPresent && featureEnabled(FeatureFlags.DELIVERIES)\n\n if (!hasLocations) return null\n\n if ((props.isSingleLocationSelect || isSingleLocationSelect) && startLocations.size() > 1) {\n return (\n \n handleLocationChange(id, 'both')}\n data-tid=\"Start and stop location dropdown\"\n disabled={props.disable?.start_location_id}\n title={props.locationSelectTitle}\n icon={props.locationSelectIcon}\n deliveryDistances={props.deliveryDistances}\n showDeliveryDistances={showDeliveryDistances}\n label={props.label}\n showAddress={showAddress}\n />\n \n )\n }\n return (\n \n {isLocationInputEnabled('start', { scope: picker.type }) && (\n handleLocationChange(id, 'start')}\n data-tid=\"Start location dropdown\"\n disabled={props.disable?.start_location_id}\n title={props.locationSelectTitle || props.startLocationSelectTitle}\n icon={props.locationSelectIcon || props.startLocationSelectIcon}\n label={props.startLocationLabel || props.label}\n showAddress={showAddress}\n />\n )}\n {isLocationInputEnabled('stop', { scope: picker.type }) && (\n handleLocationChange(id, 'stop')}\n data-tid=\"Stop location dropdown\"\n disabled={props.disable?.stop_location_id}\n title={props.locationSelectTitle || props.stopLocationSelectTitle}\n icon={props.locationSelectIcon || props.stopLocationSelectIcon}\n label={props.stopLocationLabel || props.label}\n showAddress={showAddress}\n />\n )}\n \n )\n}\n\nLocationPicker.propTypes = {\n locations: PropTypes.object,\n disable: PropTypes.shape({\n start_location_id: PropTypes.bool,\n stop_location_id: PropTypes.bool\n }),\n locationSelectTitle: PropTypes.node,\n startLocationSelectTitle: PropTypes.node,\n stopLocationSelectTitle: PropTypes.node,\n locationSelectIcon: PropTypes.string,\n startLocationSelectIcon: PropTypes.string,\n stopLocationSelectIcon: PropTypes.string,\n deliveryDistances: PropTypes.array,\n showDeliveryDistances: PropTypes.bool,\n showAddress: PropTypes.bool,\n deliveryAddressPresent: PropTypes.bool,\n isSingleLocationSelect: PropTypes.bool,\n onChange: PropTypes.func,\n WrapperComponent: PropTypes.any,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n startLocationLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n stopLocationLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node])\n}\n","// React\nimport React, { useEffect } from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport isEqual from 'lodash/isEqual'\nimport isEmpty from 'lodash/isEmpty'\nimport { useFormikContext } from 'formik'\n\n// Providers\nimport { PickerContextProvider } from './Picker'\n\n// Shared\nimport OperatingRulesUtils from 'shared/utils/operating_rules'\nimport {\n isDaySelectable as _isDaySelectable,\n isTimeSelectable as _isTimeSelectable,\n validate,\n getDefaultTime\n} from 'ui/components/Picker/utils'\nimport objectDiff from 'shared/utils/objectDiff'\nimport withForm from 'shared/form'\nimport { useOrm } from 'shared/utils/useOrm'\n\nconst PickerFormComponent = ({\n children,\n mode,\n type,\n openingHours,\n allowPast,\n useTimes,\n minDate,\n onValidate,\n onChange,\n validate\n}) => {\n const form = useFormikContext()\n\n const timeslots = useOrm('operating_rules', (rules) => {\n return rules.getAll({ data_type: 'timeslot_fixed' })\n })\n\n const hasInitialValues = !!form.initialValues.starts_at && !!form.initialValues.stops_at\n\n useEffect(() => {\n const errors = validate(form.values)\n const valid = isEmpty({ ...errors, ...form.errors })\n\n onValidate?.(valid, { ...errors, ...form.errors })\n }, [])\n\n useEffect(() => {\n const errors = validate(form.values)\n const valid = isEmpty({ ...errors, ...form.errors })\n\n onValidate?.(valid, { ...errors, ...form.errors })\n\n if (!isEqual(form.values, form.initialValues)) {\n if (valid) {\n const promise = onChange?.(form.values)\n\n promise?.catch?.(() => {\n const changedKeys = Object.keys(objectDiff(form.values, form.initialValues))\n const fieldErrors = {}\n\n changedKeys.forEach((key) => {\n if (['starts_at', 'stops_at'].includes(key)) {\n fieldErrors[key] = { date: 'invalid', time: 'invalid' }\n } else {\n fieldErrors[key] = 'is invalid'\n }\n })\n\n setTimeout(() => {\n form.setErrors(fieldErrors)\n }, 0)\n })\n }\n\n if (!valid && errors.stop_location_id) {\n // TODO: Understand if we need this\n form.setFieldValue('stop_location_id', form.values.start_location_id)\n\n setTimeout(() => {\n form.setFieldValue('stop_location_id', form.values.start_location_id)\n }, 0)\n }\n }\n }, [form.values, form.initialValues, form.errors])\n\n const isDaySelectable = (options) => {\n return _isDaySelectable({\n ...options,\n openingHours,\n values: form.values,\n minDate,\n allowPast\n })\n }\n\n const isTimeSelectable = (options) => {\n return _isTimeSelectable({\n ...options,\n openingHours,\n values: form.values,\n minDate,\n allowPast\n })\n }\n\n const getSelectableTimeslots = (date) => {\n if (!timeslots?.size && !timeslots?.length) return []\n\n return OperatingRulesUtils.fixedTimeslotsForDate(timeslots, date, {\n useOpeningHours: !!openingHours,\n operatingRules: openingHours,\n allowPast\n })\n }\n\n const setDefaultTime = (options) => {\n return getDefaultTime({\n ...options,\n openingHours,\n allowPast\n })\n }\n\n return (\n \n {children}\n \n )\n}\n\nPickerFormComponent.propTypes = {\n children: PropTypes.node.isRequired,\n mode: PropTypes.oneOf(['freely', 'timeslot_duration', 'timeslot_fixed', 'undefined']),\n type: PropTypes.oneOf(['order', 'cart']).isRequired,\n openingHours: PropTypes.object,\n allowPast: PropTypes.bool,\n useTimes: PropTypes.bool,\n minDate: PropTypes.object,\n validate: PropTypes.func,\n onChange: PropTypes.func,\n onValidate: PropTypes.func\n}\n\nconst PickerForm = withForm()(PickerFormComponent)\n\nexport const PickerProvider = ({\n children,\n mode,\n type,\n openingHours,\n ignoreDirty,\n minDate,\n initialValues = {},\n validateOnChange = true,\n validateOnBlur = false,\n allowPast,\n useTimes,\n onValidate,\n onChange\n}) => {\n const locations = useOrm('locations', (locations) => {\n return locations.getAll({ archived_at: [null, undefined] }).sort('name')\n })\n\n const validateForm = (values) => {\n return validate({ values, locations, openingHours, allowPast })\n }\n\n // Add an empty function for handleSubmit, as it's a required prop but we\n // don't use it here. The props can still overwrite it.\n const handleSubmit = () => {}\n\n const initialTouched = {}\n\n if (initialValues) {\n const { starts_at: startsAt, stops_at: stopsAt } = initialValues\n\n if (startsAt) {\n initialTouched.starts_at = true\n }\n\n if (stopsAt) {\n initialTouched.stops_at = true\n }\n }\n\n return (\n \n {children}\n \n )\n}\n\nPickerProvider.propTypes = {\n children: PropTypes.node,\n mode: PropTypes.oneOf(['freely', 'timeslot_duration', 'timeslot_fixed', 'undefined']),\n type: PropTypes.oneOf(['order', 'cart']).isRequired,\n openingHours: PropTypes.object,\n initialValues: PropTypes.object.isRequired,\n ignoreDirty: PropTypes.bool,\n validateOnChange: PropTypes.bool,\n validateOnBlur: PropTypes.bool,\n minDate: PropTypes.object,\n allowPast: PropTypes.bool,\n useTimes: PropTypes.bool,\n onValidate: PropTypes.func,\n onChange: PropTypes.func\n}\n","import transform from 'lodash/transform'\nimport isEqual from 'lodash/isEqual'\nimport isObject from 'lodash/isObject'\n\n/**\n * Deep diff between two object, using lodash\n * @param {Object} object Object compared\n * @param {Object} base Object to compare with\n * @return {Object} Return a new object who represent the diff\n */\nexport default (object, base) => {\n const changes = (object, base) => {\n return transform(object, (result, value, key) => {\n if (!isEqual(value, base[key])) {\n result[key] = (isObject(value) && isObject(base[key])) ? changes(value, base[key]) : value\n }\n })\n }\n\n return changes(object, base)\n}\n","// React\nimport React, { useMemo, useCallback } from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport { useFormikContext } from 'formik'\n\n// Components\nimport InputField from 'ui/components/InputField'\nimport Day from './Day'\nimport BPicker from 'ui/blocks/Picker'\n\n// Shared\nimport moment from 'shared/lib/moment'\nimport { useTranslation } from 'shared/utils/useTranslation'\nimport { usePicker } from 'ui/components/Picker/hooks'\n\nconst DateTimePicker = ({ field = {}, ...props }) => {\n const { t } = useTranslation('user')\n const form = useFormikContext()\n\n const picker = usePicker()\n\n const timeAvailability = useMemo(() => {\n const date = field.value ? moment(field.value) : null\n\n if (!date || !props.availabilities) return []\n\n return props.availabilities.filter((el) => moment(el.date).isSame(date, 'day'))\n }, [field.value, props.availabilities])\n\n const date = field.value ? moment(field.value) : null\n const time = date ? date.format('HH:mm') : null\n\n const hasDateError = (!!form.errors[field.name]?.date || (!picker.useTimes && !!form.errors[field.name]?.time))\n const hasTimeError = !!form.errors[field.name]?.time\n\n const handleDateChange = (value, dayClick) => {\n const date = moment(field.value)\n const newDate = moment(value).set({ h: date.hours(), m: date.minutes() })\n\n field.onChange?.(newDate.toJSON())\n\n if (!dayClick) return\n\n picker.onChange(props.mode)\n }\n\n const handleDateBlur = (e) => {\n props.onBlur?.(e.target.value || field.value)\n }\n\n const handleTimeChange = (time) => {\n const date = moment(field.value)\n const [hour, minute] = time.split(':')\n\n field.onChange?.(date.set({ hour, minute, second: 0, millisecond: 0 }).toJSON())\n\n picker.onChange(`${props.mode}_time`)\n\n props.onTimeChange?.()\n }\n\n const handleScrollTimeIntoView = () => {\n const tippy = props.inputTimeRef.current?._tippy\n\n const popover =\n tippy?.popper.querySelector('[data-tid=\"Time popover\"]') ||\n document.querySelector(`#tippy-${tippy?.id} [data-tid=\"Time popover\"]`)\n\n if (!popover) return\n\n if (time) {\n const option = popover.querySelector(`[data-value=\"${time}\"]`)\n\n // Scroll to time option element if found\n if (option) {\n const containerRect = popover.getBoundingClientRect()\n const optionRect = option.getBoundingClientRect()\n\n const amPmOffset = props.useAMOrPM ? 45 : 0\n\n const scrollTop =\n optionRect.top -\n containerRect.top +\n popover.scrollTop -\n (containerRect.height - optionRect.height) / 2 -\n amPmOffset\n\n popover.scrollTo({\n left: 0,\n top: Math.max(0, scrollTop)\n })\n }\n } else {\n // Scroll to the middle of the popover\n popover.scrollTo({\n left: 0,\n top: Math.max(0, popover.scrollHeight / 2 - popover.clientHeight / 2)\n })\n }\n }\n\n const handleTimeOpen = () => {\n props.onOpen?.(date)\n\n // Timeout here to allow the popover to render and be attached to the DOM\n setTimeout(handleScrollTimeIntoView, 1)\n }\n\n const renderDay = useCallback(\n (day, modifiers) => {\n let available\n\n if (props.showAvailability && props.lineCount) {\n available = props.availabilities?.getFirst?.({ type: 'date', date: day.toISOString().slice(0, 10) })?.status\n }\n\n return (\n \n )\n },\n [props.showAvailability, props.lineCount, props.availabilityLoading, picker.allowPast, props.availabilities, props.isMobile]\n )\n\n return (\n \n {\n props.inputDateRef.current = ref\n }}\n disabled={props.disabledDate}\n error={hasDateError}\n showIcon={false}\n data-value={date?.format('DD-MM-YYYY')}\n placeholder={\n props.translate ? t('user.store.select_date_placeholder') : t('common.order_picker.date_placeholder')\n }\n paddingHorizontal={!props.inline}\n renderDay={renderDay}\n onOpen={props.onOpen?.bind(null, false)}\n mode={props.mode}\n usePortal={props.usePortal?.date ?? props.usePortal}\n forceUTC\n hideErrorLabel\n />\n {picker.useTimes && (\n {\n props.inputTimeRef.current = ref\n }}\n error={hasTimeError}\n data-tid={`${props['data-tid']} time`}\n data-value={time}\n availabilities={timeAvailability}\n placeholder={\n props.translate ? t('user.store.select_time_placeholder') : t('common.order_picker.time_placeholder')\n }\n paddingHorizontal={!props.inline}\n // Fetch times on focus\n onOpen={handleTimeOpen}\n mode={`${props.mode}_time`}\n usePortal={props.usePortal?.time ?? props.usePortal}\n hideErrorLabel\n />\n )}\n \n )\n}\n\nDateTimePicker.propTypes = {\n 'inline': PropTypes.bool,\n 'label': PropTypes.any,\n 'format': PropTypes.string,\n 'usePortal': PropTypes.oneOfType([\n PropTypes.shape({\n date: PropTypes.bool,\n time: PropTypes.bool\n }),\n PropTypes.bool\n ]),\n 'useAMOrPM': PropTypes.bool,\n 'disabledDate': PropTypes.bool,\n 'disabledTime': PropTypes.bool,\n 'inputDateRef': PropTypes.any.isRequired,\n 'inputTimeRef': PropTypes.any,\n 'error': PropTypes.object,\n 'availabilities': PropTypes.object,\n 'showAvailability': PropTypes.oneOf([true, false, 'count']),\n 'availabilityLoading': PropTypes.bool,\n 'translate': PropTypes.bool,\n 'lineCount': PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),\n 'onOpen': PropTypes.func,\n 'onBlur': PropTypes.func,\n 'onTimeChange': PropTypes.func,\n 'data-tid': PropTypes.string,\n 'mode': PropTypes.oneOf(['from', 'to']),\n 'isMobile': PropTypes.bool,\n // Form\n 'field': PropTypes.shape({\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date), PropTypes.object]),\n onChange: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n onInvalid: PropTypes.func,\n /** Custom validation function should return invalid key or true\n * ex. validate = (date) => 'HH'\n */\n validate: PropTypes.func\n })\n}\n\nexport default DateTimePicker\n","// React\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport { clsx } from 'clsx'\n\n// Components\nimport BOrderPicker from 'ui/blocks/Picker/types/order'\nimport BPicker from 'ui/blocks/Picker'\nimport Icon from 'ui/components/Icon'\nimport DateTimePicker from 'ui/components/Picker/DateTimePicker'\n\n// Hooks\nimport { usePicker } from 'ui/components/Picker/hooks'\nimport { useFormikContext } from 'formik'\n\n// Shared\nimport moment from 'shared/lib/moment'\nimport { useTranslation } from 'shared/utils/useTranslation'\nimport { Field } from 'shared/form'\n\nexport const Free = (props) => {\n const picker = usePicker()\n\n const form = useFormikContext()\n const { t } = useTranslation()\n\n const from = form.values.starts_at ? new Date(form.values.starts_at) : null\n const to = form.values.stops_at ? new Date(form.values.stops_at) : null\n\n const isDelivery = props.fulfillmentType === 'delivery'\n\n const handleChangePeriod = ({ startsAt, stopsAt }) => {\n const date = moment(startsAt || stopsAt)\n\n startsAt = moment(startsAt || form.values.starts_at)\n stopsAt = moment(stopsAt || form.values.stops_at)\n\n if (!form.values.starts_at) {\n startsAt = picker.setDefaultTime({ type: 'start', date })\n }\n\n if (!form.values.stops_at) {\n stopsAt = picker.setDefaultTime({ type: 'stop', date, defaultStartTime: startsAt })\n }\n\n if (startsAt.isAfter(stopsAt)) {\n // starts_at is after stops_at, move the stops_at with the same diff as before\n stopsAt.add(startsAt.diff(moment(form.values.starts_at)))\n }\n\n form.setValues({\n ...form.values,\n starts_at: startsAt.toJSON(),\n stops_at: stopsAt.toJSON()\n })\n }\n\n const handleFieldBlur = (date, type) => {\n if (!picker.isDaySelectable({ type, date })) {\n date = picker.setDefaultTime({ type, date, forceDefaultTime: type === 'start' })\n\n form.setValues({\n ...form.values,\n [`${type}s_at`]: date\n })\n }\n }\n\n const handleChangeStartsAt = (startsAt) => {\n handleChangePeriod({ startsAt })\n }\n\n const handleChangeStopsAt = (stopsAt) => {\n handleChangePeriod({ stopsAt })\n }\n\n const handleBlurStartsAt = (date) => {\n handleFieldBlur(date, 'start')\n }\n\n const handleBlurStopsAt = (date) => {\n handleFieldBlur(date, 'stop')\n }\n\n return (\n \n \n {isDelivery ? t('common.from') : t('common.start.present')}\n picker.isTimeSelectable({ type: 'start', timestring })}\n blockedDays={(date) => !picker.isDaySelectable({ type: 'start', date })}\n inputDateRef={picker.refs.fromDateRef}\n inputTimeRef={picker.refs.fromTimeRef}\n from={from}\n to={to}\n mode=\"from\"\n data-tid=\"Starts at picker\"\n disabledDate={!!props.disable?.starts_at}\n disabledTime={!!props.disable?.starts_at}\n onMonthChange={props.onMonthChange?.bind(null, { type: 'start' })}\n onOpen={props.onOpen?.bind(null, { type: 'start', values: form.values })}\n withAvailability\n hideLabel\n initialError\n />\n \n \n \n \n \n {isDelivery ? t('common.until') : t('common.stop.present')}\n picker.isTimeSelectable({ type: 'stop', timestring })}\n blockedDays={(date) => !picker.isDaySelectable({ type: 'stop', date })}\n from={from}\n to={to}\n inputDateRef={picker.refs.tillDateRef}\n inputTimeRef={picker.refs.tillTimeRef}\n mode=\"to\"\n data-tid=\"Stops at picker\"\n disabledDate={!!props.disable?.stops_at}\n disabledTime={!!props.disable?.stops_at}\n onMonthChange={props.onMonthChange?.bind(null, { type: 'stop', values: form.values })}\n onOpen={props.onOpen?.bind(null, { type: 'stop', values: form.values })}\n withAvailability\n hideLabel\n initialError\n />\n \n \n )\n}\n\nFree.propTypes = {\n disable: PropTypes.shape({\n starts_at: PropTypes.bool,\n stops_at: PropTypes.bool\n }),\n fulfillmentType: PropTypes.oneOf(['pickup', 'delivery']),\n onMonthChange: PropTypes.func,\n onOpen: PropTypes.func,\n disabled: PropTypes.bool\n}\n","// React\nimport React, { useMemo, useState, useEffect } from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport BOrderPicker from 'ui/blocks/Picker/types/order'\nimport BPicker from 'ui/blocks/Picker'\nimport InputField from 'ui/components/InputField'\nimport DateTimePicker from 'ui/components/Picker/DateTimePicker'\n\n// Utils\nimport { getDateTimesForTimeslot } from 'ui/components/Picker/utils'\n\n// Hooks\nimport { usePicker } from 'ui/components/Picker/hooks'\nimport { useTranslation } from 'shared/utils/useTranslation'\nimport { useFormikContext } from 'formik'\n\n// Shared\nimport moment from 'shared/lib/moment'\nimport FormatUtils from 'shared/utils/format'\nimport { Field } from 'shared/form'\n\nexport const Timeslots = (props) => {\n const [selectedTimeslotId, setSelectedTimeslotId] = useState(undefined)\n\n const picker = usePicker()\n\n const form = useFormikContext()\n const { t } = useTranslation()\n\n const from = form.values.starts_at ? new Date(form.values.starts_at) : null\n const timeslots = props.timeslots.sortBy?.((timeslot) => {\n const key = Object.keys(timeslot.data)[0]\n\n return Number(timeslot.data[key].from.replace(':', ''))\n })\n\n const options =\n timeslots?.toArray?.().map((timeslot) => {\n const data = timeslot.data[Object.keys(timeslot.data)[0]]\n const from = FormatUtils.date(moment(data.from, 'HH:mm'), 'time')\n const till = FormatUtils.date(moment(data.till, 'HH:mm'), 'time')\n const label = `${from} - ${till}`\n const value = timeslot.id\n\n return { label, value }\n }) ?? []\n const availability = useMemo(() => {\n const availabilityData = props.availabilities\n .filter((availability) => moment(availability.date).isSame(form.values.starts_at, 'day'))\n .toList()\n\n if (!form.values.starts_at || !availabilityData) return []\n\n return timeslots?.toArray?.().map((timeslot) => {\n const data = timeslot.data[Object.keys(timeslot.data)[0]]\n\n const availabilityFromIndex = availabilityData.findIndex((el) => data.from === `${el.hour}:${el.minute}`)\n const availabilityTillIndex = availabilityData.findIndex((el) => data.till === `${el.hour}:${el.minute}`)\n\n const isTimeslotAvailable =\n availabilityData.slice(availabilityFromIndex, availabilityTillIndex).findIndex((el) => !el.available) === -1\n\n return {\n from: data.from,\n till: data.till,\n value: timeslot.id,\n available: isTimeslotAvailable,\n status: isTimeslotAvailable ? 'available' : 'unavailable',\n type: 'timeslot'\n }\n })\n }, [timeslots, props.availabilities, form.values])\n\n const hasError = !!(\n !!form.errors.starts_at?.date ||\n !!form.errors.starts_at?.time ||\n !!form.errors.stops_at?.date ||\n !!form.errors.stops_at?.time\n )\n\n const isDelivery = props.fulfillmentType === 'delivery'\n\n useEffect(() => {\n const getTimeslotFromDates = (startsAt, stopsAt) => {\n const from = FormatUtils.date(moment(startsAt), 'time')\n const till = FormatUtils.date(moment(stopsAt), 'time')\n const label = `${from} - ${till}`\n const timeslotOption = options.find((option) => option.label === label)\n\n if (!timeslotOption) {\n picker.onValidate(false)\n }\n\n return timeslotOption && props.timeslots.getById?.(timeslotOption.value)\n }\n\n const hasTimeslots = props.timeslots.size?.() > 0\n\n if (!selectedTimeslotId && hasTimeslots && form.values.starts_at) {\n const timeslot = getTimeslotFromDates(form.values.starts_at, form.values.stops_at)\n\n if (timeslot) setSelectedTimeslotId(timeslot.id)\n }\n })\n\n const handleChangeTimeslot = (timeslot, date) => {\n const [startsAt, stopsAt] = getDateTimesForTimeslot(date, timeslot)\n\n form.setValues({\n ...form.values,\n starts_at: startsAt.toJSON(),\n stops_at: stopsAt.toJSON()\n })\n\n setSelectedTimeslotId(timeslot.id)\n }\n\n const handleSelectTimeslot = (timeslotId) => {\n const timeslot = props.timeslots.getById(timeslotId)\n\n handleChangeTimeslot(timeslot, form.values.starts_at)\n }\n\n const handleMoveDay = (date) => {\n const nextDay = moment(date).add(1, 'days')\n\n handleChangeDate(nextDay, true)\n }\n\n const handleChangeDate = (date, move = false) => {\n const selectableTimeslots = picker.getSelectableTimeslots(date)\n const timeslot =\n selectableTimeslots.getById?.(selectedTimeslotId) || selectableTimeslots.first?.() || timeslots.first?.()\n\n // We need to set a value here to have access to it in the blur method\n form.setValues({\n ...form.values,\n starts_at: date\n })\n\n if (!timeslot && move) {\n handleMoveDay(date)\n }\n\n if (timeslot) handleChangeTimeslot(timeslot, date)\n\n picker.onChange('from')\n }\n\n const handleBlurDate = (date) => {\n if (!date) return\n\n if (!picker.isDaySelectable({ type: 'start', date })) {\n date = picker.setDefaultTime({ type: 'start', forceDefaultTime: true })\n\n handleChangeDate(date, true)\n }\n }\n\n return (\n \n \n {t('common.date')}\n !picker.isDaySelectable({ type: 'start', date })}\n inputDateRef={picker.refs.fromDateRef}\n from={from}\n to={from}\n mode=\"from\"\n data-tid=\"Starts at picker\"\n onOpen={props.onOpen?.bind(null, 'start', false)}\n useTimes={false}\n onMonthChange={props.onMonthChange.bind(null, { type: 'start', values: form.values })}\n withAvailability\n hideErrorLabel\n initialError\n // Override default behavior from DayPicker and highlight only hovered day\n selection={({ hover }) => ({ from: hover, to: hover })}\n hideLabel\n />\n \n \n \n {isDelivery ? t('common.from') : t('common.start.present')}\n {isDelivery ? t('common.until') : t('common.stop.present')}\n \n \n \n \n )\n}\n\nTimeslots.propTypes = {\n fulfillmentType: PropTypes.oneOf(['pickup', 'delivery']),\n availabilities: PropTypes.object,\n timeslots: PropTypes.object,\n disabled: PropTypes.bool,\n onOpen: PropTypes.func,\n onMonthChange: PropTypes.func\n}\n","// React\nimport React, { useMemo } from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport { clsx } from 'clsx'\n\n// Components\nimport BOrderPicker from 'ui/blocks/Picker/types/order'\nimport BPicker from 'ui/blocks/Picker'\nimport Icon from 'ui/components/Icon'\nimport DateTimePicker from 'ui/components/Picker/DateTimePicker'\nimport InputField from 'ui/components/InputField'\n\n// Hooks\nimport { useDurations, usePicker } from 'ui/components/Picker/hooks'\nimport { useOrm } from 'shared/utils/useOrm'\nimport { useSettings } from 'shared/utils/useSettings'\nimport { useFormikContext } from 'formik'\n\n// Shared\nimport { Field } from 'shared/form'\nimport { useTranslation } from 'shared/utils/useTranslation'\nimport { parseFixedDefaultTime } from 'shared/utils/time'\nimport { defaultDefaultTimes } from 'ui/components/Picker/utils'\n\nexport const Durations = ({ onChange: _onChange, onOpen, ...props }) => {\n const picker = usePicker()\n\n const { t } = useTranslation()\n const form = useFormikContext()\n\n const durations = useOrm('operating_rules', (rules) => {\n return rules.getAll({ data_type: 'timeslot_duration' })\n })\n const startDefaultTimeSetting = useSettings('orders.start_fixed_at', { default: defaultDefaultTimes.start })\n const stopDefaultTimeSetting = useSettings('orders.stop_fixed_at', { default: defaultDefaultTimes.stop })\n\n const { clearCacheRef, duration, durationObject, onChange, getRange } = useDurations(props.onDurationChange)\n\n const from = form.values.starts_at ? new Date(form.values.starts_at) : null\n const to = form.values.stops_at ? new Date(form.values.stops_at) : null\n\n const options = useMemo(() => {\n return durations\n .sortBy((duration) => duration.data.length)\n .map((duration) => {\n const isPlural = duration.data.duration > 1\n\n return {\n value: duration.id,\n label: t('common.periods.count', {\n count: duration.data.duration,\n period: t(`common.periods.${duration.data.period}${isPlural ? 's' : ''}`)\n })\n }\n })\n .toJS()\n }, [durations])\n\n const isReturnTimeDisabled = durationObject?.data?.period === 'hour'\n const isDelivery = props.fulfillmentType === 'delivery'\n\n const getBlockedDays = (date) => {\n const durationData = durationObject?.data\n const defaultTimes = {\n start: parseFixedDefaultTime(startDefaultTimeSetting),\n stop: parseFixedDefaultTime(stopDefaultTimeSetting)\n }\n\n return !picker.isDaySelectable({ type: 'start', date, durationData, defaultTimes })\n }\n\n const handleChangeStartsAt = (date) => {\n const range = getRange(date, form.values, durationObject)\n\n form.setValues({\n ...form.values,\n starts_at: range.from.toJSON(),\n stops_at: range.to.toJSON(),\n charge_in_seconds: parseInt(duration)\n })\n }\n\n const handleBlurStartsAt = (date) => {\n if (getBlockedDays(date)) {\n date = picker.setDefaultTime({ type: 'start', forceDefaultTime: true })\n\n handleChangeStartsAt(date)\n }\n }\n\n const handleSelectDuration = (durationId) => {\n const durationObject = durations.toArray().find((duration) => duration.id === durationId)\n const duration = durationObject?.data.length\n\n form.setValues({\n ...form.values,\n stops_at: null\n })\n\n onChange({\n duration,\n durationObject,\n changePeriod: true\n })\n\n picker.onChange('duration')\n }\n\n return (\n \n \n {t('common.duration')}\n {\n picker.refs.durationsRef.current = ref\n }}\n data-tid=\"Durations\"\n placeholder={t('common.duration')}\n modifiers=\"display-inline-flex\"\n hideLabel\n />\n \n \n \n {isDelivery ? t('common.from') : t('common.start.present')}\n {\n return picker.isTimeSelectable({\n type: 'start',\n timestring,\n durationData: durationObject?.data,\n allowPast: picker.allowPast\n })\n }}\n blockedDays={getBlockedDays}\n inputDateRef={picker.refs.fromDateRef}\n inputTimeRef={picker.refs.fromTimeRef}\n from={from}\n to={to}\n mode=\"from\"\n selection={({ hover }) => getRange(hover, form.values, durationObject)}\n data-tid=\"Starts at picker\"\n onMonthChange={props.onMonthChange?.bind(null, { type: 'start' })}\n onOpen={onOpen?.bind(null, { type: 'start', values: form.values })}\n duration={duration}\n disabledDate={!durationObject}\n disabledTime={!durationObject}\n clearCacheRef={(ref) => {\n clearCacheRef.current = ref\n }}\n withAvailability\n hideLabel\n initialError\n />\n \n \n \n \n \n {isDelivery ? t('common.until') : t('common.stop.present')}\n {\n return picker.isTimeSelectable({\n type: 'stop',\n timestring,\n allowPast: picker.allowPast\n })\n }}\n from={from}\n to={to}\n inputDateRef={picker.refs.tillDateRef}\n inputTimeRef={picker.refs.tillTimeRef}\n mode=\"to\"\n data-tid=\"Stops at picker\"\n disabledTime={isReturnTimeDisabled || !durationObject}\n onOpen={onOpen?.bind(null, { type: 'stop', values: form.values })}\n disabledDate\n withAvailability\n hideLabel\n initialError\n />\n \n \n \n )\n}\n\nDurations.propTypes = {\n fulfillmentType: PropTypes.oneOf(['pickup', 'delivery']),\n onDurationChange: PropTypes.func,\n disabled: PropTypes.bool,\n onMonthChange: PropTypes.func,\n onChange: PropTypes.func,\n onOpen: PropTypes.func\n}\n","// React\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport { clsx } from 'clsx'\n\n// Components\nimport BCartPicker from 'ui/blocks/Picker/types/cart'\nimport BPicker from 'ui/blocks/Picker'\nimport DateTimePicker from 'ui/components/Picker/DateTimePicker'\nimport Icon from 'ui/components/Icon'\n\n// Hooks\nimport { usePicker } from 'ui/components/Picker/hooks'\nimport { useFormikContext } from 'formik'\n\n// Shared\nimport { Field } from 'shared/form'\nimport { useTranslation } from 'shared/utils/useTranslation'\n\nexport const FreePicker = ({ children, ...props }) => {\n const picker = usePicker()\n\n const form = useFormikContext()\n const { t } = useTranslation('user')\n\n return (\n \n \n {t('user.store.start')}\n picker.isTimeSelectable({ type: 'start', timestring })}\n blockedDays={(date) => !picker.isDaySelectable({ type: 'start', date })}\n inputDateRef={picker.refs.fromDateRef}\n inputTimeRef={picker.refs.fromTimeRef}\n mode=\"from\"\n data-tid=\"Starts at picker\"\n disabledDate={!!props.disable?.starts_at}\n disabledTime={!!props.disable?.starts_at}\n onMonthChange={props.onMonthChange?.bind(null, { type: 'start' })}\n onOpen={props.onOpen?.bind(null, { type: 'start', values: form.values })}\n withAvailability\n hideLabel\n initialError\n />\n \n \n \n \n \n {t('user.store.stop')}\n picker.isTimeSelectable({ type: 'stop', timestring })}\n blockedDays={(date) => !picker.isDaySelectable({ type: 'stop', date })}\n inputDateRef={picker.refs.tillDateRef}\n inputTimeRef={picker.refs.tillTimeRef}\n mode=\"to\"\n data-tid=\"Stops at picker\"\n disabledDate={!!props.disable?.stops_at}\n disabledTime={!!props.disable?.stops_at}\n onMonthChange={props.onMonthChange?.bind(null, { type: 'stop', values: form.values })}\n onOpen={props.onOpen?.bind(null, { type: 'stop', values: form.values })}\n withAvailability\n hideLabel\n initialError\n />\n \n {children}\n \n )\n}\n\nFreePicker.propTypes = {\n children: PropTypes.node,\n isMobile: PropTypes.bool,\n onStartChange: PropTypes.func,\n onStopChange: PropTypes.func,\n onStartBlur: PropTypes.func,\n onStopBlur: PropTypes.func,\n onOpen: PropTypes.func,\n onStopTimeChange: PropTypes.func,\n onMonthChange: PropTypes.func,\n isDaySelectable: PropTypes.func,\n isTimeSelectable: PropTypes.func,\n from: PropTypes.instanceOf(Date),\n to: PropTypes.instanceOf(Date),\n disable: PropTypes.shape({\n starts_at: PropTypes.bool,\n stops_at: PropTypes.bool,\n start_location_id: PropTypes.bool,\n stop_location_id: PropTypes.bool\n }),\n disabled: PropTypes.bool,\n setDefaultTime: PropTypes.func,\n fromDateRef: PropTypes.any,\n tillDateRef: PropTypes.any\n}\n","import { useState, useEffect } from 'react'\n\nconst useWindowSize = () => {\n // Initialize state with undefined width/height so server and client renders match\n // Learn more here: https://joshwcomeau.com/react/the-perils-of-rehydration/\n const [windowSize, setWindowSize] = useState({\n width: undefined,\n height: undefined\n })\n\n useEffect(() => {\n // Handler to call on window resize\n const handleResize = () => {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight\n })\n }\n\n // Add event listener\n window.addEventListener('resize', handleResize)\n // Call handler right away so state gets updated with initial window size\n handleResize()\n\n // Remove event listener on cleanup\n return () => window.removeEventListener('resize', handleResize)\n }, [])\n\n return windowSize\n}\n\nexport default useWindowSize\n","// React\nimport React, { useRef } from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport BCartPicker from 'ui/blocks/Picker/types/cart'\nimport { FreePicker } from './Picker'\n\n// Shared\nimport useWindowSize from 'shared/utils/useWindowSize'\n\nexport const FreeDesktop = (props) => {\n const portalRef = useRef(null)\n\n const { width } = useWindowSize()\n\n // 866px is the breakpoint when the modal is starting to shrink\n const numberOfMonths = (width > 866 && props.inline) ? 2 : 1\n\n return (\n \n \n \n )\n}\n\nFreeDesktop.propTypes = {\n inline: PropTypes.bool\n}\n","import styled from 'styled-components'\nimport { color, size, fontWeight, fontSize } from 'ui/themes/utils'\n\nimport { Drawer } from 'vaul'\n\nimport I from 'ui/elements/I'\n\nexport const Overlay = styled(Drawer.Overlay)`\n position: fixed;\n\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n background: ${color('Accent2/Controlvariant1')}99;\n\n z-index: 1000000000;\n`\n\nexport const Content = styled(Drawer.Content)`\n background-color: ${color('Background/Primary')};\n\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n\n display: flex;\n flex-flow: column nowrap;\n\n border-top-left-radius: ${size('borderRadius')};\n border-top-right-radius: ${size('borderRadius')};\n\n margin-top: 32px;\n\n z-index: 1000000001;\n`\n\nexport const Header = styled.div`\n position: relative;\n\n padding: ${size('padding')};\n padding-right: ${size('padding', 'lgplus')};\n\n border-bottom: ${size('borderWidth')} solid ${color('Misc/Divider')};\n\n container-type: inline-size;\n`\n\nexport const Close = styled.button`\n /* Reset button default styles */\n appearance: none;\n background: transparent;\n border: none;\n padding: 0;\n\n position: absolute;\n\n top: ${size('padding', 'md')};\n right: ${size('padding', 'md')};\n\n ${I} {\n opacity: 0.6;\n\n font-weight: ${fontWeight('bold')};\n font-size: ${fontSize('lg')};\n }\n`\n\nexport const Body = styled.div`\n flex: 1;\n\n overflow-y: auto;\n`\n\nexport const Title = styled(Drawer.Title)`\n margin: 0;\n margin-bottom: ${size('margin', 'sm')};\n\n color: ${color('Text/Primary')};\n\n font-family: ${(props) => props.theme.font.body};\n font-size: ${fontSize('lg')};\n font-weight: ${fontWeight('semibold')};\n\n &:empty {\n visibility: hidden;\n }\n`\n","// React\nimport React, { forwardRef } from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport { Drawer as DrawerPrimitives } from 'vaul'\n\n// Components\nimport * as DrawerBlocks from 'ui/blocks/Picker/Drawer'\nimport Icon from 'ui/components/Icon'\n\nexport const Root = ({ open, onOpenChange, children, ...props }) => (\n \n \n \n {children}\n \n \n)\n\nRoot.propTypes = {\n open: PropTypes.bool,\n onOpenChange: PropTypes.func,\n children: PropTypes.node\n}\n\nRoot.displayName = 'Drawer.Root'\n\nexport const Header = forwardRef(({ children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n))\n\nHeader.propTypes = {\n children: PropTypes.node\n}\n\nHeader.displayName = 'Drawer.Header'\n\nexport const Title = ({ children, ...props }) => {children}\n\nTitle.propTypes = {\n children: PropTypes.node\n}\n\nTitle.displayName = 'Drawer.Title'\n\nexport const Body = forwardRef(({ children, ...props }, ref) => (\n \n {children}\n \n))\n\nBody.propTypes = {\n children: PropTypes.node\n}\n\nBody.displayName = 'Drawer.Body'\n","// React\nimport React, { useRef, useState, useEffect, Fragment } from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport BCartPicker from 'ui/blocks/Picker/types/cart'\nimport BPicker from 'ui/blocks/Picker'\nimport Icon from 'ui/components/Icon'\nimport * as Drawer from 'ui/components/Picker/Drawer'\nimport { FreePicker } from './Picker'\n\n// Libraries\nimport { useFormikContext } from 'formik'\n\n// Hooks\nimport { usePicker } from 'ui/components/Picker/hooks'\n\n// Shared\nimport { useTranslation } from 'shared/utils/useTranslation'\nimport { Format as FormatUtils } from 'back_office/v2/utils/utils'\n\nexport const FreeMobile = (props) => {\n const timeoutRef = useRef(null)\n const portalRef = useRef(null)\n\n const [open, setOpen] = useState(false)\n\n const picker = usePicker()\n const form = useFormikContext()\n const { t } = useTranslation('user')\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n }\n }, [])\n\n const selectWithTimeout = (selection) => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n\n timeoutRef.current = setTimeout(() => {\n picker.setSelection(selection)\n }, 750)\n }\n\n const handleOpen = (e, type) => {\n e.preventDefault()\n\n setOpen(true)\n\n selectWithTimeout(type)\n }\n\n const handleStartChange = (value) => {\n props.onStartChange(value)\n }\n\n const handleStopChange = (value) => {\n props.onStopChange(value)\n\n if (!picker.useTimes && !picker.hasInitialValues) {\n return setOpen(false)\n }\n }\n\n const handleStopTimeChange = () => {\n if (picker.hasInitialValues) return\n\n setOpen(false)\n }\n\n const handleDrawerOpenChange = (open) => {\n // Reset selection on drawer close\n if (!open) {\n picker.setSelection(null)\n }\n\n setOpen(open)\n }\n\n return (\n \n \n \n {t('user.store.start')}\n \n handleOpen(e, 'from')}\n empty={!form.values.starts_at}\n error={(!!form.errors.starts_at?.date || !!form.errors.starts_at?.time)}\n data-tid=\"Starts at picker button\"\n >\n {form.values.starts_at ?\n FormatUtils.date(form.values.starts_at, picker.useTimes ? 'dateTime' : 'date') :\n t(\n picker.useTimes ?\n 'user.store.select_date_and_time_placeholder' :\n 'user.store.select_date_placeholder'\n )}\n \n \n \n \n \n \n \n {t('user.store.stop')}\n \n handleOpen(e, 'to')}\n empty={!form.values.stops_at}\n error={(!!form.errors.stops_at?.date || !!form.errors.stops_at?.time)}\n data-tid=\"Stops at picker button\"\n >\n {form.values.stops_at ?\n FormatUtils.date(form.values.stops_at, picker.useTimes ? 'dateTime' : 'date') :\n t(\n picker.useTimes ?\n 'user.store.select_date_and_time_placeholder' :\n 'user.store.select_date_placeholder'\n )}\n \n \n \n \n \n \n {t('user.store.select_a_period')}\n \n \n \n \n \n \n \n )\n}\n\nFreeMobile.propTypes = {\n from: PropTypes.instanceOf(Date),\n to: PropTypes.instanceOf(Date),\n // Other props\n disable: PropTypes.shape({\n starts_at: PropTypes.bool,\n stops_at: PropTypes.bool,\n start_location_id: PropTypes.bool,\n stop_location_id: PropTypes.bool\n }),\n disabled: PropTypes.bool,\n onStartChange: PropTypes.func,\n onStopChange: PropTypes.func,\n onStartBlur: PropTypes.func,\n onStopBlur: PropTypes.func,\n onMonthChange: PropTypes.func\n}\n","// React\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport { FreeDesktop } from './Desktop'\nimport { FreeMobile } from './Mobile'\n\n// Libraries\nimport { useFormikContext } from 'formik'\n\n// Hooks\nimport { usePicker } from 'ui/components/Picker/hooks'\n\n// Shared\nimport moment from 'shared/lib/moment'\nimport useWindowSize from 'shared/utils/useWindowSize'\n\nexport const Free = (props) => {\n const picker = usePicker()\n const form = useFormikContext()\n const { width } = useWindowSize()\n\n const isMobile = width < 576\n\n const from = form.values.starts_at ? new Date(form.values.starts_at) : null\n const to = form.values.stops_at ? new Date(form.values.stops_at) : null\n\n const handleChangePeriod = ({ startsAt, stopsAt }) => {\n const date = moment(startsAt || stopsAt)\n\n startsAt = moment(startsAt || form.values.starts_at)\n stopsAt = moment(stopsAt || form.values.stops_at)\n\n if (!form.values.starts_at) {\n startsAt = picker.setDefaultTime({ type: 'start', date })\n }\n\n if (!form.values.stops_at) {\n stopsAt = picker.setDefaultTime({ type: 'stop', date, defaultStartTime: startsAt })\n }\n\n if (startsAt.isAfter(stopsAt)) {\n // starts_at is after stops_at, move the stops_at with the same diff as before\n stopsAt.add(startsAt.diff(moment(form.values.starts_at)))\n }\n\n form.setValues({\n ...form.values,\n starts_at: startsAt.toJSON(),\n stops_at: stopsAt.toJSON()\n })\n }\n\n const handleFieldBlur = (date, type) => {\n if (!picker.isDaySelectable({ type, date })) {\n date = picker.setDefaultTime({ type, date, forceDefaultTime: type === 'start' })\n\n form.setValues({\n ...form.values,\n [`${type}s_at`]: date\n })\n }\n }\n\n const handleChangeStartsAt = (startsAt) => {\n handleChangePeriod({ startsAt })\n }\n\n const handleChangeStopsAt = (stopsAt) => {\n handleChangePeriod({ stopsAt })\n }\n\n const handleBlurStartsAt = (date) => {\n handleFieldBlur(date, 'start')\n }\n\n const handleBlurStopsAt = (date) => {\n handleFieldBlur(date, 'stop')\n }\n\n const sharedProps = {\n from,\n to,\n onStartChange: handleChangeStartsAt,\n onStopChange: handleChangeStopsAt,\n onStartBlur: handleBlurStartsAt,\n onStopBlur: handleBlurStopsAt,\n // Prop to control the width of the time picker cleanstate\n width: props.inline ? '100%' : undefined\n }\n\n return isMobile ? : \n}\n\nFree.propTypes = {\n setDefaultTime: PropTypes.func,\n isDaySelectable: PropTypes.func,\n inline: PropTypes.bool\n}\n","// React\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport BCartPicker from 'ui/blocks/Picker/types/cart'\nimport BPicker from 'ui/blocks/Picker'\nimport DateTimePicker from 'ui/components/Picker/DateTimePicker'\nimport InputField from 'ui/components/InputField'\n\n// Hooks\nimport { usePicker } from 'ui/components/Picker/hooks'\nimport { useFormikContext } from 'formik'\n\n// Shared\nimport moment from 'shared/lib/moment'\nimport { Field } from 'shared/form'\nimport { useTranslation } from 'shared/utils/useTranslation'\n\nexport const TimeslotsPicker = ({ children, onChange, onBlur, ...props }) => {\n const picker = usePicker()\n\n const { t } = useTranslation('user')\n const form = useFormikContext()\n\n const handleStartsAtChange = (value) => {\n onChange(value)\n }\n\n return (\n \n \n {t('user.store.start_and_stop_date')}\n !picker.isDaySelectable({ type: 'start', date })}\n inputDateRef={picker.refs.fromDateRef}\n to={props.from}\n mode=\"from\"\n data-tid=\"Starts at picker\"\n onOpen={props.onOpen?.bind(null, 'start', false)}\n useTimes={false}\n onMonthChange={props.onMonthChange.bind(null, { type: 'start', values: form.values })}\n withAvailability\n hideErrorLabel\n initialError\n hideLabel\n />\n \n \n \n {t('user.store.timeslot_from')}\n {t('user.store.timeslot_until')}\n \n \n \n {children}\n \n )\n}\n\nTimeslotsPicker.propTypes = {\n children: PropTypes.node,\n timeslotId: PropTypes.string,\n timeslotsAvailability: PropTypes.array,\n onTimeslotChange: PropTypes.func,\n onOpen: PropTypes.func,\n onChange: PropTypes.func,\n onBlur: PropTypes.func,\n onMonthChange: PropTypes.func,\n onSelectionChange: PropTypes.func,\n isMobile: PropTypes.bool,\n disabled: PropTypes.bool,\n from: PropTypes.instanceOf(Date),\n hasError: PropTypes.bool\n}\n","// React\nimport React, { useRef, useState, useEffect, Fragment } from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport { useFormikContext } from 'formik'\n\n// Components\nimport BCartPicker from 'ui/blocks/Picker/types/cart'\nimport BPicker from 'ui/blocks/Picker'\nimport Icon from 'ui/components/Icon'\nimport { TimeslotsPicker } from './Picker'\nimport * as Drawer from 'ui/components/Picker/Drawer'\n\n// Hooks\nimport { usePicker } from 'ui/components/Picker/hooks'\n\n// Shared\nimport { useTranslation } from 'shared/utils/useTranslation'\nimport { Format as FormatUtils } from 'back_office/v2/utils/utils'\n\nexport const TimeslotsMobile = (props) => {\n const timeoutRef = useRef(null)\n const portalRef = useRef(null)\n\n const [open, setOpen] = useState(false)\n\n const picker = usePicker()\n const { t } = useTranslation('user')\n const form = useFormikContext()\n\n const timeslot = (props.options || []).find((option) => option.value === props.timeslotId)\n\n const hasError =\n !!(form.errors.starts_at?.date || form.errors.stops_at?.date) ||\n !!(form.errors.starts_at?.time || form.errors.stops_at?.time)\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n }\n }, [])\n\n const selectWithTimeout = (selection) => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n\n timeoutRef.current = setTimeout(() => {\n picker.setSelection(selection)\n }, 750)\n }\n\n const handleOpen = (e, type) => {\n e.preventDefault()\n\n setOpen(true)\n\n selectWithTimeout(type)\n }\n\n const handleTimeslotChange = (...args) => {\n props.onTimeslotChange(...args)\n\n if (!picker.hasInitialValues) {\n setOpen(false)\n }\n }\n\n const handleDrawerOpenChange = (open) => {\n // Reset selection on drawer close\n if (!open) {\n picker.setSelection(null)\n }\n\n setOpen(open)\n }\n\n return (\n \n \n \n {t('user.store.start_and_stop_date')}\n handleOpen(e, 'from')}\n empty={!form.values.starts_at}\n error={hasError}\n >\n {form.values.starts_at ?\n FormatUtils.date(form.values.starts_at, 'date') :\n t('user.store.select_date_placeholder')}\n \n \n \n \n {t('user.store.timeslot_from')}\n {t('user.store.timeslot_until')}\n \n handleOpen(e, 'timeslot')} empty={!timeslot} modifiers=\"width-100p\">\n {timeslot && (\n \n {timeslot.label.split(' - ')[0]}\n \n {timeslot.label.split(' - ')[1]}\n \n )}\n {!timeslot && (\n \n {t('user.store.timeslot_from')}\n \n {t('user.store.timeslot_until')}\n \n )}\n \n \n \n \n \n {t('user.store.select_a_period')}\n \n \n \n \n \n \n \n )\n}\n\nTimeslotsMobile.propTypes = {\n timeslotId: PropTypes.string,\n from: PropTypes.instanceOf(Date),\n to: PropTypes.instanceOf(Date),\n options: PropTypes.array,\n disabled: PropTypes.bool,\n onMonthChange: PropTypes.func,\n onBlur: PropTypes.func,\n onTimeslotChange: PropTypes.func\n}\n","// React\nimport React, { useRef } from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport BCartPicker from 'ui/blocks/Picker/types/cart'\nimport { TimeslotsPicker } from './Picker'\n\n// Shared\nimport useWindowSize from 'shared/utils/useWindowSize'\n\nexport const TimeslotsDesktop = (props) => {\n const portalRef = useRef(null)\n\n const { width } = useWindowSize()\n\n // 866px is the breakpoint when the modal is starting to shrink\n const numberOfMonths = (width > 866 && props.inline) ? 2 : 1\n\n return (\n \n \n \n )\n}\n\nTimeslotsDesktop.propTypes = {\n disabled: PropTypes.bool,\n inline: PropTypes.bool\n}\n","// React\nimport React, { useMemo, useState, useEffect } from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport { useFormikContext } from 'formik'\n\n// Components\nimport { TimeslotsMobile } from './Mobile'\nimport { TimeslotsDesktop } from './Desktop'\n\n// Hooks\nimport { usePicker } from 'ui/components/Picker/hooks'\n\n// Shared\nimport moment from 'shared/lib/moment'\nimport FormatUtils from 'shared/utils/format'\nimport { getDateTimesForTimeslot } from 'ui/components/Picker/utils'\nimport useWindowSize from 'shared/utils/useWindowSize'\n\nexport const Timeslots = (props) => {\n const [selectedTimeslotId, setSelectedTimeslotId] = useState(undefined)\n\n const picker = usePicker()\n const form = useFormikContext()\n const { width } = useWindowSize()\n\n const isMobile = width < 576\n\n const from = form.values.starts_at ? new Date(form.values.starts_at) : null\n\n const timeslots = props.timeslots.sortBy?.((timeslot) => {\n const key = Object.keys(timeslot.data)[0]\n\n return Number(timeslot.data[key].from.replace(':', ''))\n })\n const options =\n timeslots?.toArray?.().map((timeslot) => {\n const data = timeslot.data[Object.keys(timeslot.data)[0]]\n const from = FormatUtils.date(moment(data.from, 'HH:mm'), 'time')\n const till = FormatUtils.date(moment(data.till, 'HH:mm'), 'time')\n const label = `${from} - ${till}`\n const value = timeslot.id\n\n return { label, value }\n }) ?? []\n const timeslotsAvailability = useMemo(() => {\n const availabilityData = props.availabilities\n .filter((availability) => moment(availability.date).isSame(form.values.starts_at, 'day'))\n .toList()\n\n if (!form.values.starts_at || !availabilityData) return []\n\n return timeslots?.toArray?.().map((timeslot) => {\n const data = timeslot.data[Object.keys(timeslot.data)[0]]\n\n const availabilityFromIndex = availabilityData.findIndex((el) => data.from === `${el.hour}:${el.minute}`)\n const availabilityTillIndex = availabilityData.findIndex((el) => data.till === `${el.hour}:${el.minute}`)\n\n const isTimeslotAvailable =\n availabilityData.slice(availabilityFromIndex, availabilityTillIndex).findIndex((el) => !el.available) === -1\n\n return {\n from: data.from,\n till: data.till,\n value: timeslot.id,\n available: isTimeslotAvailable,\n status: isTimeslotAvailable ? 'available' : 'unavailable',\n type: 'timeslot'\n }\n })\n }, [timeslots, props.availabilities, form.values])\n\n const hasError = !!(\n !!form.errors.starts_at?.date ||\n !!form.errors.starts_at?.time ||\n !!form.errors.stops_at?.date ||\n !!form.errors.stops_at?.time\n )\n\n useEffect(() => {\n const getTimeslotFromDates = (startsAt, stopsAt) => {\n const from = FormatUtils.date(moment(startsAt), 'time')\n const till = FormatUtils.date(moment(stopsAt), 'time')\n const label = `${from} - ${till}`\n const timeslotOption = options.find((option) => option.label === label)\n\n if (!timeslotOption) {\n picker.onValidate(false)\n }\n\n return timeslotOption && props.timeslots.getById?.(timeslotOption.value)\n }\n\n const hasTimeslots = props.timeslots.size?.() > 0\n\n if (!selectedTimeslotId && hasTimeslots && form.values.starts_at) {\n const timeslot = getTimeslotFromDates(form.values.starts_at, form.values.stops_at)\n\n if (timeslot) setSelectedTimeslotId(timeslot.id)\n }\n })\n\n const handleChangeTimeslot = (timeslot, date) => {\n const [startsAt, stopsAt] = getDateTimesForTimeslot(date, timeslot)\n\n form.setValues({\n ...form.values,\n starts_at: startsAt.toJSON(),\n stops_at: stopsAt.toJSON()\n })\n\n setSelectedTimeslotId(timeslot.id)\n }\n\n const handleSelectTimeslot = (timeslotId) => {\n const timeslot = props.timeslots.getById(timeslotId)\n\n handleChangeTimeslot(timeslot, form.values.starts_at)\n }\n\n const handleMoveDay = (date) => {\n const nextDay = moment(date).add(1, 'days')\n\n handleChangeDate(nextDay, true)\n }\n\n const handleChangeDate = (date, move = false) => {\n const selectableTimeslots = picker.getSelectableTimeslots(date)\n const timeslot =\n selectableTimeslots.getById?.(selectedTimeslotId) || selectableTimeslots.first?.() || props.timeslots.first?.()\n\n // We need to set a value here to have access to it in the blur method\n form.setValues({\n ...form.values,\n starts_at: date\n })\n\n if (!timeslot && move) {\n handleMoveDay(date)\n }\n\n if (timeslot) handleChangeTimeslot(timeslot, date)\n\n picker.onChange('from')\n }\n\n const handleBlurDate = (date) => {\n if (!date) return\n\n if (!picker.isDaySelectable({ type: 'start', date })) {\n date = picker.setDefaultTime({ type: 'start', forceDefaultTime: true })\n\n handleChangeDate(date, true)\n }\n }\n\n const sharedProps = {\n from,\n timeslotId: selectedTimeslotId,\n options,\n timeslotsAvailability,\n hasError,\n onChange: handleChangeDate,\n onBlur: handleBlurDate,\n onTimeslotChange: handleSelectTimeslot\n }\n\n return isMobile ? : \n}\n\nTimeslots.propTypes = {\n availabilities: PropTypes.object,\n timeslots: PropTypes.object,\n disabled: PropTypes.bool,\n onMonthChange: PropTypes.func\n}\n","// React\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport { clsx } from 'clsx'\n\n// Components\nimport BCartPicker from 'ui/blocks/Picker/types/cart'\nimport BPicker from 'ui/blocks/Picker'\nimport DateTimePicker from 'ui/components/Picker/DateTimePicker'\nimport Icon from 'ui/components/Icon'\nimport InputField from 'ui/components/InputField'\n\n// Hooks\nimport { usePicker } from 'ui/components/Picker/hooks'\nimport { useFormikContext } from 'formik'\n\n// Shared\nimport { Field } from 'shared/form'\nimport { useTranslation } from 'shared/utils/useTranslation'\n\nexport const DurationsPicker = ({ children, onOpen, onChange, onBlur, ...props }) => {\n const picker = usePicker()\n\n const form = useFormikContext()\n const { t } = useTranslation('user')\n\n const handleDurationChange = (id) => {\n props.onDurationChange(id)\n }\n\n return (\n \n \n {t('user.store.rental_duration')}\n {\n picker.refs.durationsRef.current = ref\n }}\n data-tid=\"Durations\"\n placeholder={t('user.store.rental_duration')}\n usePortal={props.isMobile}\n preventTargetAssign\n hideLabel\n />\n \n \n \n {t('user.store.start')}\n {\n return picker.isTimeSelectable({\n type: 'start',\n timestring,\n durationData: props.durationObject?.data,\n allowPast: picker.allowPast\n })\n }}\n onChange={onChange}\n onBlur={onBlur}\n blockedDays={props.getBlockedDays}\n inputDateRef={picker.refs.fromDateRef}\n inputTimeRef={picker.refs.fromTimeRef}\n mode=\"from\"\n selection={({ hover }) => props.getRange(hover, form.values, props.durationObject)}\n data-tid=\"Starts at picker\"\n onMonthChange={props.onMonthChange?.bind(null, { type: 'start' })}\n onOpen={onOpen?.bind(null, { type: 'start', values: form.values })}\n disabledDate={!props.durationObject}\n disabledTime={!props.durationObject}\n clearCacheRef={(ref) => {\n props.clearCacheRef.current = ref\n }}\n withAvailability\n hideLabel\n initialError\n />\n \n \n \n \n \n {t('user.store.stop')}\n {\n return picker.isTimeSelectable({ type: 'stop', timestring, allowPast: picker.allowPast })\n }}\n mode=\"to\"\n data-tid=\"Stops at picker\"\n disabledTime={props.isReturnTimeDisabled || !props.durationObject}\n onOpen={onOpen?.bind(null, { type: 'stop', values: form.values })}\n inputDateRef={picker.refs.tillDateRef}\n inputTimeRef={picker.refs.tillTimeRef}\n disabledDate\n withAvailability\n hideLabel\n initialError\n />\n \n \n {children}\n \n )\n}\n\nDurationsPicker.propTypes = {\n children: PropTypes.node,\n onDurationChange: PropTypes.func,\n durationObject: PropTypes.object,\n getRange: PropTypes.func,\n getBlockedDays: PropTypes.func,\n isReturnTimeDisabled: PropTypes.bool,\n onOpen: PropTypes.func,\n onChange: PropTypes.func,\n onStopTimeChange: PropTypes.func,\n onBlur: PropTypes.func,\n onMonthChange: PropTypes.func,\n onSelectionChange: PropTypes.func,\n isMobile: PropTypes.bool,\n from: PropTypes.instanceOf(Date),\n to: PropTypes.instanceOf(Date),\n disable: PropTypes.shape({\n starts_at: PropTypes.bool,\n stops_at: PropTypes.bool,\n start_location_id: PropTypes.bool,\n stop_location_id: PropTypes.bool\n }),\n disabled: PropTypes.bool,\n clearCacheRef: PropTypes.any\n}\n","// React\nimport React, { useRef } from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport BCartPicker from 'ui/blocks/Picker/types/cart'\nimport { DurationsPicker } from './Picker'\n\n// Shared\nimport useWindowSize from 'shared/utils/useWindowSize'\n\nexport const DurationsDesktop = (props) => {\n const portalRef = useRef(null)\n\n const { width } = useWindowSize()\n\n // 866px is the breakpoint when the modal is starting to shrink\n const numberOfMonths = width > 866 && props.inline ? 2 : 1\n\n return (\n \n \n \n )\n}\n\nDurationsDesktop.propTypes = {\n inline: PropTypes.bool\n}\n","// React\nimport React, { useRef, useState, useEffect, Fragment } from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport { useFormikContext } from 'formik'\n\n// Components\nimport BCartPicker from 'ui/blocks/Picker/types/cart'\nimport BPicker from 'ui/blocks/Picker'\nimport Icon from 'ui/components/Icon'\nimport { DurationsPicker } from './Picker'\nimport * as Drawer from 'ui/components/Picker/Drawer'\n\n// Hooks\nimport { usePicker } from 'ui/components/Picker/hooks'\n\n// Shared\nimport { useTranslation } from 'shared/utils/useTranslation'\nimport { Format as FormatUtils } from 'back_office/v2/utils/utils'\n\nexport const DurationsMobile = ({ onChange, ...props }) => {\n const timeoutRef = useRef(null)\n const portalRef = useRef(null)\n\n const [open, setOpen] = useState(false)\n\n const picker = usePicker()\n const form = useFormikContext()\n const { t } = useTranslation('user')\n\n const option = props.options?.find((option) => option.value === props.durationObject?.id)\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n }\n }, [])\n\n const selectWithTimeout = (selection) => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n\n timeoutRef.current = setTimeout(() => {\n picker.setSelection(selection)\n }, 750)\n }\n\n const handleOpen = (e, type) => {\n e.preventDefault()\n\n setOpen(true)\n\n selectWithTimeout(type)\n }\n\n const handleChange = (value) => {\n onChange(value)\n\n if (!picker.useTimes && !picker.hasInitialValues) {\n setOpen(false)\n }\n }\n\n const handleStopTimeChange = () => {\n if (picker.hasInitialValues) return\n\n setOpen(false)\n }\n\n const handleDrawerOpenChange = (open) => {\n // Reset selection on drawer close\n if (!open) {\n picker.setSelection(null)\n }\n\n setOpen(open)\n }\n\n return (\n \n \n \n {t('user.store.rental_duration')}\n handleOpen(e, 'duration')} empty={!props.durationObject}>\n {option?.label || t('user.store.rental_duration')}\n \n \n \n \n {t('user.store.start')}\n handleOpen(e, 'from')}\n empty={!form.values.starts_at}\n error={(!!form.errors.starts_at?.date || !!form.errors.starts_at?.time)}\n >\n {form.values.starts_at ?\n FormatUtils.date(form.values.starts_at, picker.useTimes ? 'dateTime' : 'date') :\n t(\n picker.useTimes ?\n 'user.store.select_date_and_time_placeholder' :\n 'user.store.select_date_placeholder'\n )}\n \n \n \n \n \n \n {t('user.store.stop')}\n handleOpen(e, 'to time')}\n empty={!form.values.stops_at}\n disabled={props.isReturnTimeDisabled || !props.durationObject}\n error={(!!form.errors.stops_at?.date || !!form.errors.stops_at?.time)}\n >\n {form.values.stops_at ?\n FormatUtils.date(form.values.stops_at, picker.useTimes ? 'dateTime' : 'date') :\n t(\n picker.useTimes ?\n 'user.store.select_date_and_time_placeholder' :\n 'user.store.select_date_placeholder'\n )}\n \n \n \n \n \n \n {t('user.store.select_a_period')}\n \n \n \n \n \n \n \n )\n}\n\nDurationsMobile.propTypes = {\n isReturnTimeDisabled: PropTypes.bool,\n options: PropTypes.array,\n durationObject: PropTypes.object,\n disabled: PropTypes.bool,\n onMonthChange: PropTypes.func,\n onChange: PropTypes.func\n}\n","// React\nimport React, { useMemo } from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport { DurationsDesktop } from './Desktop'\nimport { DurationsMobile } from './Mobile'\n\n// Libraries\nimport { useFormikContext } from 'formik'\n\n// Hooks\nimport { useDurations, usePicker } from 'ui/components/Picker/hooks'\nimport { useOrm } from 'shared/utils/useOrm'\nimport { useTranslation } from 'shared/utils/useTranslation'\nimport { useSettings } from 'shared/utils/useSettings'\n\n// Shared\nimport useWindowSize from 'shared/utils/useWindowSize'\nimport { parseFixedDefaultTime } from 'shared/utils/time'\nimport { defaultDefaultTimes } from 'ui/components/Picker/utils'\n\nexport const Durations = ({ onChange: _onChange, ...props }) => {\n const { t } = useTranslation('user')\n const { width } = useWindowSize()\n\n const picker = usePicker()\n const form = useFormikContext()\n const startDefaultTimeSetting = useSettings('orders.start_fixed_at', { default: defaultDefaultTimes.start })\n const stopDefaultTimeSetting = useSettings('orders.stop_fixed_at', { default: defaultDefaultTimes.stop })\n\n const { clearCacheRef, duration, durationObject, onChange, getRange } = useDurations(props.onDurationChange)\n\n const durations = useOrm('operating_rules', (rules) => {\n return rules.getAll({ data_type: 'timeslot_duration' })\n })\n\n const isMobile = width < 576\n\n const from = form.values.starts_at ? new Date(form.values.starts_at) : null\n const to = form.values.stops_at ? new Date(form.values.stops_at) : null\n\n const options = useMemo(() => {\n return durations\n .sortBy((duration) => duration.data.length)\n .map((duration) => {\n const isPlural = duration.data.duration > 1\n\n return {\n value: duration.id,\n label: t('common.periods.count', {\n count: duration.data.duration,\n period: t(`user.store.${duration.data.period}${isPlural ? 's' : ''}`)\n })\n }\n })\n .toJS()\n }, [durations])\n\n const isReturnTimeDisabled = durationObject?.data?.period === 'hour' && duration <= 86400\n\n const getBlockedDays = (date) => {\n const durationData = durationObject?.data\n const defaultTimes = {\n start: parseFixedDefaultTime(startDefaultTimeSetting),\n stop: parseFixedDefaultTime(stopDefaultTimeSetting)\n }\n\n return !picker.isDaySelectable({ type: 'start', date, durationData, defaultTimes })\n }\n\n const handleChangeStartsAt = (date) => {\n const range = getRange(date, form.values, durationObject)\n\n form.setValues({\n ...form.values,\n starts_at: range.from.toJSON(),\n stops_at: range.to.toJSON(),\n charge_in_seconds: parseInt(duration)\n })\n }\n\n const handleBlurStartsAt = (date) => {\n if (getBlockedDays(date)) {\n date = picker.setDefaultTime({ type: 'start', forceDefaultTime: true })\n\n handleChangeStartsAt(date)\n }\n }\n\n const handleSelectDuration = (durationId) => {\n const durationObject = durations.toArray().find((duration) => duration.id === durationId)\n const duration = durationObject?.data.length\n\n onChange({\n duration,\n durationObject,\n changePeriod: true\n })\n\n picker.onChange('duration')\n }\n\n const sharedProps = {\n from,\n to,\n options,\n onChange: handleChangeStartsAt,\n onBlur: handleBlurStartsAt,\n onDurationChange: handleSelectDuration,\n duration,\n durationObject,\n getRange,\n getBlockedDays,\n isReturnTimeDisabled,\n width: props.inline ? '100%' : undefined,\n clearCacheRef\n }\n\n return isMobile ? : \n}\n\nDurations.propTypes = {\n onDurationChange: PropTypes.func,\n onChange: PropTypes.func,\n inline: PropTypes.bool\n}\n","// React\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// Components\nimport { Free as OrderFree } from 'ui/components/Picker/types/order/Free'\nimport { Timeslots as OrderTimeslots } from 'ui/components/Picker/types/order/Timeslots'\nimport { Durations as OrderDurations } from 'ui/components/Picker/types/order/Durations'\nimport { Free as CartFree } from 'ui/components/Picker/types/cart/Free'\nimport { Timeslots as CartTimeslots } from 'ui/components/Picker/types/cart/Timeslots'\nimport { Durations as CartDurations } from 'ui/components/Picker/types/cart/Durations'\nimport { Picker } from 'ui/components/Picker/Picker'\n\nexport const OrderFlowPicker = (props) => (\n \n)\n\nexport const CartFlowPicker = (props) => (\n \n)\n\nCartFlowPicker.propTypes = {\n inline: PropTypes.bool\n}\n","import styled, { css } from 'styled-components'\nimport { color } from 'ui/themes/utils'\n\nimport LabelElement from 'ui/elements/Label'\nimport DescriptionElement from 'ui/elements/Description'\n\nexport const Switch = styled.div`\n position: relative;\n\n min-height: 19px;\n\n padding-top: 4px;\n padding-left: 43px;\n\n ${({ mirror }) => mirror && css`\n display: flex;\n flex-direction: row-reverse;\n\n & > * {\n position: relative !important;\n }\n /* 😭 */\n `}\n`\n\nexport const Input = styled.input`\n position: absolute;\n height: 0 !important;\n width: 0;\n visibility: hidden;\n`\n\nexport const Toggle = styled.label`\n /* Override Booqable css styles */\n /* TODO: Remove this */\n &&& {\n position: ${({ relative }) => relative ? 'relative' : 'absolute'};\n display: ${({ block }) => block ? 'block' : 'inline-block'};\n\n left: 0;\n\n width: 33px;\n height: 19px;\n\n margin: 0%;\n\n background: ${color('Misc/Divider')};\n\n border-radius: 100px;\n transition: background 0.3s, opacity 0.15s;\n\n cursor: pointer;\n\n &:after {\n content: '';\n position: absolute;\n top: 2px;\n left: 2px;\n\n width: 15px;\n height: 15px;\n\n background: ${color('white')};\n\n border-radius: 50%;\n transition: 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);\n }\n\n ${({ withActiveEffect }) => withActiveEffect && css`\n &:active:after {\n width: 17px;\n }\n `}\n\n ${({ checked }) => checked && css`\n background: ${color('Primary/Base')};\n\n &:after {\n left: calc(100% - 2px);\n transform: translateX(-100%);\n }\n `}\n\n ${({ disabled }) => disabled && css`\n cursor: default;\n opacity: 0.6;\n pointer-events: none;\n `}\n }\n`\n\nexport const Label = styled(LabelElement)`\n padding-top: 0.3em;\n`\n\nexport const Description = styled(DescriptionElement)`\n margin: 0;\n`\n","import { Switch, Input, Toggle, Description, Label } from './styles'\n\nSwitch.Input = Input\nSwitch.Toggle = Toggle\nSwitch.Description = Description\nSwitch.Label = Label\n\nexport default Switch\n","// React\nimport React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\n// Libraries\nimport cuid from 'cuid'\n\n// Components\nimport BSwitch from 'ui/blocks/Switch'\n\n// Shared\n\n/**\n * Switch, like a checkbox, but fancier.\n *\n * @example\n * \n */\n\nexport default class Switch extends Component {\n static displayName = 'Switch'\n\n static propTypes = {\n id: PropTypes.string,\n disabled: PropTypes.bool,\n field: PropTypes.object,\n label: PropTypes.any,\n description: PropTypes.any,\n inverted: PropTypes.bool,\n withActiveEffect: PropTypes.bool,\n block: PropTypes.bool,\n relative: PropTypes.bool,\n mirror: PropTypes.bool\n }\n\n static defaultProps = {\n withActiveEffect: true\n }\n\n handleChange = () => {\n const { onChange, value } = this.props.field\n\n onChange(!value)\n }\n\n render () {\n const { disabled, description, label, inverted, withActiveEffect, block, relative, ...otherProps } = this.props\n const field = this.props.field || { value: false, onChange: () => {} }\n const onChange = disabled ? undefined : this.handleChange\n const id = this.props.id || cuid()\n\n let checked = field.value || false\n\n if (inverted) {\n checked = !checked\n }\n\n return (\n \n \n \n {label && {label}}\n {description && {description}}\n \n )\n }\n}\n","import styled from 'styled-components'\nimport { injectModifiers } from 'ui/themes/utils'\nimport modifiers from 'ui/themes/modifiers'\n\nconst Img = styled.img`\n ${({ theme }) => injectModifiers(modifiers(theme))}\n`\n\nexport default Img\n"],"names":["AddressFields","props","autoFocus","disabled","showFirstAndLastName","defaultCountryId","countries","provinces","addressIdentifier","errorKey","fieldTranslationPrefix","selectPlaceholder","invalidExistingAddressWarning","showInvalidExistingAddressWarning","validateOnChangeOnly","skipValidation","defaultFormLayout","addressPropertyIndex","fieldDebounce","initialValues","t","useTranslation","values","setFieldValue","errors","useFormikContext","countrySelectOptions","setCountrySelectOptions","useState","provinceSelectOptions","setProvinceSelectOptions","fieldNamesArray","setFieldNamesArray","selectedCountry","setSelectedCountry","isLoading","setIsLoading","errorMessage","setErrorMessage","useEffect","isEmpty","countryProvinceOptions","buildProvinceSelectOptions","id","buildCountrySelectOptions","formLayout","form_layout","fieldNames","addressHelper","existingCountry","findCountry","valueForFieldWithIdentifier","setValueToFieldWithIdentifier","handleErrors","handleCountryChange","countryId","newSelectedCountry","cleanUpNotVisibleFieldValuesForLayout","name","handleProvinceChange","provinceId","fieldName","value","buildFieldNameWithIdentifier","addressValues","find","country","findProvince","province","country_id","map","label","filter","selectedCountryOption","selectedOption","option","selectedProvinceOption","region","handleTextFieldChange","e","target","toUpperCase","validateField","includes","isDirty","trim","validateProvince","validateZipcode","translationPrefix","countryHasNoProvinces","length","provinceNotRequired","province_required","existingProvince","zipcodeNotRequired","zipcode_required","noFormatRequired","zipcode_format","hasValue","regex","matchFormat","match","oldCountry","newCountry","fieldsToCleanUp","notVisibleFieldsForLayout","city_autofill","push","zipcode_autofill","cleanUpFields","visibleFields","flat","field","fields","forEach","errorMessages","addressErrorsKey","Object","keys","key","error","addressErrors","join","showInvalidAddressWarning","renderFields","React","Row","Col","md","validate","onInputHandler","placeholder","fieldNameWithIdentifier","showPlaceholder","Field","onInput","debounce","fast","zipcode_placeholder","type","options","onChange","forceValue","usePortal","regionFieldName","buildField","Skeleton","width","AlertBar","propTypes","PropTypes","isRequired","alpha2","zipcode_type","province_type","first_name","last_name","address1","address2","city","zipcode","province_id","meets_validation_requirements","addressFieldsOrder","featureEnabled","FeatureFlags","NEW_ADDRESS_VALIDATION","defaultOrder","SettingUtils","replace","Country","fetchCountriesAndProvinces","CountryActions","fetchAll","page","size","include","buildFieldNamesArray","fieldsArray","split","row","buildFieldLabel","prefix","buildFieldPlaceholder","buildFieldError","fieldLabel","addressDirty","extractValuesForIdentifier","presence","some","provinceHasBeenSelected","shouldPersistAddressAttributes","featureDisabled","addressEmpty","state","window","store","getState","companyId","session","currentCompanyId","company","orm","companies","getById","getFirst","isDefaultCountry","every","regexp","identifier","index","groups","setValueForIdentifier","string","Item","Line","ReduxModel","require","Model","documentModel","defaultValues","tags","hasMany","lines","namespace","taxValues","belongsTo","customer","order","coupon","Document","Invoice","Contract","Quote","CheckoutItem","default_property","Employee","permissions","notes","Order","Note","employee","Payment","hasOne","transaction","foreignKey","PriceRule","price_ruleset","PriceRuleset","price_rules","PriceStructure","price_tiles","PriceTile","price_structure","Product","stockItems","barcode","photo","ProductGroup","products","through","properties","taxCategory","StockCount","product","stockItem","StockItem","orders","Transaction","payment","User","ActivityLog","App","AppPlan","AppSubscription","AppSubscriptionPlan","AppCarrier","Asset","AuthenticationMethod","Barcode","BillingInvoice","BulkUpsert","Bundle","BundleItem","CancellationRequest","Cluster","Collection","CollectionItem","CollectionItemAssociation","CollectionTree","Company","Count","Coupon","Creditcard","Customer","DefaultProperty","DepositHold","Email","EmailTemplate","EmployeeInvitation","ExternalImage","FeatureEnrollment","Integration","InventoryBreakdown","InvoiceFinalization","InvoiceRevision","IpAddress","ItemPrice","Locale","Location","LocationCarrier","LoginActivity","Menu","MenuItem","Merge","OperatingRule","Operation","OrderAvailability","OrderDeliveryRate","OrderDeliveryRateRecalculation","OrderDeliveryRateReset","OrderDuplication","OrderFulfillment","OrderPriceRecalculation","OrderStatusTransition","Page","PaymentMethod","PaymentProfile","PaymentAuthorization","stateKey","PaymentCharge","PaymentRefund","Photo","PlannableItem","Planning","PriceWrapper","ProductGroupDuplication","ProductTrackerActions","Property","Province","Publication","RenderedEmail","ReportConsumable","ReportRental","ReportRentalInterval","ReportStockItem","Session","Signature","Sorting","StockAdjustment","StockItemArchivation","StockItemPlanning","StockItemSuggestion","StockItemTracker","Tag","TaxCategory","TaxRate","TaxRegion","TaxValue","Theme","Transfer","UserInvitation","module","exports","testMode","OriginalReactCSSTransitionGroup","_extends","transitionEnterTimeout","transitionAppearTimeout","transitionLeaveTimeout","ALLOWED_FORMATS","optimizeImageUrl","src","IMAGE_CDN","process","env","imageUrl","urlPrefix","parts","keepType","height","quality","format","URL","pathname","slug","themeId","entityId","extraParams","templates","templateTypes","RegExp","templateType","base","production","development","PROXY_HOST","test","testPort","staging","feature","location","host","snapshots","booqableOptions","environment","url","protocol","searchParams","append","entries","toString","f","interval","timer","args","clearTimeout","Promise","resolve","setTimeout","subscribe","callback","addEventListener","removeEventListener","useIsMobile","breakpoint","isMobile","useSyncExternalStore","navigator","userAgent","innerWidth","getSnapshot","selector","createSelector","settings","operating_rules","operatingRules","types","get","getAll","data_type","useOpeningHours","useSelector","equalityFn","usePrevious","ref","useRef","current","ActionGroup","styled","Div","withConfig","displayName","float","css","left","flex","align","justify","spacing","Icon","CIcon","noBorder","color","fontSize","shiftColor","assign","BREAKPOINTS","xs","sm","lg","xl","CONTAINER_MAX_WIDTHS","createMediaQuery","Container","fluid","generateMediaQueryStyles","gap","noGutter","span","generateColSpanStyles","Grid","div","I","Control","Title","p","fontWeight","isOption","Subtitle","Option","Picker","unit","Portal","Section","disableStyling","Durations","Timeslots","Period","FulfillmentTypeSelect","RadioGroup","Radio","Error","icon","modifiers","children","nestedModifiers","self","displayIcon","danger","warning","success","info","BAlertBar","DateTimePickerDay","memo","day","available","availableCount","showAvailability","showCounts","showPast","useLayoutEffect","from","scrollIntoView","block","behavior","className","past","Boolean","getDate","prevProps","nextProps","getTime","Date","LocationPickerOptionComponent","selectProps","locations","toList","selectLocation","data","deliveryDistance","deliveryDistances","record","locationId","components","BLocationPicker","main_address","showDeliveryDistances","distance","distance_unit","LocationPickerOption","LocationPickerSingleValueComponent","locationName","title","showDistanceForLocation","SingleValue","address","showAddress","LocationPickerSingleValue","LocationSelect","renderNativeOnMobile","hideLabel","hideErrorLabel","initialError","openMenuOnFocus","LocationPicker","picker","usePicker","form","hasLocations","startLocations","stopLocations","isSingleLocationSelect","useLocationsData","singleLocationSelect","withDeliveryDistances","deliveryAddressPresent","withDeliveryAddress","isLocationSelectable","_isLocationSelectable","openingHours","useMemo","sort","DELIVERIES","a","b","pluckObject","hasStartInput","isLocationInputEnabled","scope","hasStopInput","Wrapper","WrapperComponent","Fragment","handleLocationChange","setValues","start_location_id","stop_location_id","disable","locationSelectTitle","locationSelectIcon","startLocationSelectTitle","startLocationSelectIcon","startLocationLabel","stopLocationSelectTitle","stopLocationSelectIcon","stopLocationLabel","PickerFormComponent","mode","allowPast","useTimes","minDate","onValidate","timeslots","useOrm","rules","hasInitialValues","starts_at","stops_at","valid","isEqual","promise","catch","changedKeys","object","changes","transform","result","isObject","objectDiff","fieldErrors","date","time","setErrors","PickerContextProvider","isDaySelectable","_isDaySelectable","isTimeSelectable","_isTimeSelectable","setDefaultTime","getDefaultTime","getSelectableTimeslots","OperatingRulesUtils","fixedTimeslotsForDate","PickerForm","withForm","PickerProvider","ignoreDirty","validateOnChange","validateOnBlur","archived_at","undefined","initialTouched","startsAt","stopsAt","handleSubmit","validateOnMount","DateTimePicker","timeAvailability","moment","availabilities","el","isSame","hasDateError","hasTimeError","handleScrollTimeIntoView","tippy","inputTimeRef","_tippy","popover","popper","querySelector","document","containerRect","getBoundingClientRect","optionRect","amPmOffset","useAMOrPM","scrollTop","top","scrollTo","Math","max","scrollHeight","clientHeight","renderDay","useCallback","lineCount","toISOString","slice","status","Day","availabilityLoading","BPicker","PickerWrapper","InputField","handleDateChange","dayClick","newDate","set","h","hours","m","minutes","toJSON","onBlur","innerRef","inputDateRef","disabledDate","showIcon","translate","paddingHorizontal","inline","onOpen","bind","forceUTC","hour","minute","second","millisecond","onTimeChange","disabledTime","handleTimeOpen","onFocus","onInvalid","Free","to","isDelivery","fulfillmentType","handleChangePeriod","defaultStartTime","isAfter","add","diff","handleFieldBlur","forceDefaultTime","BOrderPicker","clsx","Label","component","timestring","blockedDays","refs","fromDateRef","fromTimeRef","onMonthChange","withAvailability","Decorator","tillDateRef","tillTimeRef","selectedTimeslotId","setSelectedTimeslotId","sortBy","timeslot","Number","toArray","FormatUtils","till","availability","availabilityData","availabilityFromIndex","findIndex","availabilityTillIndex","isTimeslotAvailable","hasError","hasTimeslots","getTimeslotFromDates","timeslotOption","handleChangeTimeslot","getDateTimesForTimeslot","handleChangeDate","move","selectableTimeslots","first","nextDay","handleMoveDay","selection","hover","TimeslotLabelWrapper","timeslotId","inputRef","timeslotsRef","availabilityMode","columns","touched","_onChange","durations","startDefaultTimeSetting","useSettings","default","defaultDefaultTimes","start","stopDefaultTimeSetting","stop","clearCacheRef","duration","durationObject","getRange","useDurations","onDurationChange","isPlural","count","period","toJS","isReturnTimeDisabled","getBlockedDays","durationData","defaultTimes","parseFixedDefaultTime","handleChangeStartsAt","range","charge_in_seconds","parseInt","durationId","changePeriod","durationsRef","FreePicker","BCartPicker","onStartChange","onStartBlur","mobile","onStopChange","onStopTimeChange","onStopBlur","useWindowSize","windowSize","setWindowSize","handleResize","innerHeight","FreeDesktop","portalRef","numberOfMonths","Overlay","Drawer","Content","Header","Close","button","Body","theme","font","body","Root","open","onOpenChange","DrawerPrimitives","DrawerBlocks","forwardRef","asChild","FreeMobile","timeoutRef","setOpen","handleOpen","preventDefault","setSelection","Button","onClick","empty","handleStopTimeChange","maxHeight","sharedProps","TimeslotsPicker","onTimeslotChange","timeslotsAvailability","onSelectionChange","TimeslotsMobile","Timeslot","handleTimeslotChange","TimeslotsDesktop","DurationsPicker","preventTargetAssign","DurationsDesktop","DurationsMobile","OrderFlowPicker","OrderFree","OrderTimeslots","OrderDurations","CartFlowPicker","CartFree","CartTimeslots","CartDurations","Switch","mirror","Input","input","Toggle","relative","withActiveEffect","checked","LabelElement","Description","DescriptionElement","Component","static","description","inverted","handleChange","this","render","otherProps","cuid","BSwitch","readOnly","htmlFor","Img","img","injectModifiers"],"sourceRoot":""}