{"version":3,"sources":["webpack:///./Scripts/constants.js","webpack:///./Scripts/Components/Modal.js","webpack:///../node_modules/redux-form/es/createFieldProps.js","webpack:///../node_modules/redux-form/es/events/getValue.js","webpack:///../node_modules/redux-form/es/isReactNative.js","webpack:///../node_modules/redux-form/es/events/onChangeValue.js","webpack:///../node_modules/redux-form/es/util/eventConsts.js","webpack:///../node_modules/redux-form/es/util/validateComponentProp.js","webpack:///../node_modules/redux-form/es/ConnectedField.js","webpack:///../node_modules/redux-form/es/util/shallowCompare.js","webpack:///../node_modules/redux-form/es/util/prefixName.js","webpack:///../node_modules/redux-form/es/createField.js","webpack:///../node_modules/redux-form/es/Field.js","webpack:///./Scripts/Components/Cart.js","webpack:///./Scripts/Components/CheckoutInput.js","webpack:///./Scripts/Components/CheckoutSelect.js","webpack:///./Scripts/Components/Checkout.PrivateCustomerInfo.js","webpack:///./Scripts/Components/Checkout.BusinessCustomerInfo.js","webpack:///./Scripts/Components/Checkout.DeliveryMethods.js","webpack:///./Scripts/Components/Checkout.PaymentMethods.js","webpack:///./Scripts/Components/Checkout.OrderNote.js","webpack:///./Scripts/Components/Checkout.OrderInfo.js","webpack:///./Scripts/Components/Checkout.CampaignCode.js","webpack:///./Scripts/Components/Payments/PaymentWidget.js","webpack:///./Scripts/Components/AddCampaignCodeForm.js","webpack:///./Scripts/Containers/Checkout.container.js"],"names":["window","__litium","Modal","props","_classCallCheck","this","_possibleConstructorReturn","_getPrototypeOf","call","Component","undefined","onAccept","react__WEBPACK_IMPORTED_MODULE_0___default","a","createElement","className","onClick","translate","onCancel","__html","React","Children","map","children","child","type","displayName","id","isOpen","dangerouslySetInnerHTML","renderBody","renderAcceptButton","renderCancelButton","Header","Body","es_createFieldProps","_ref","name","_ref2","getIn","toJS","deepEqual","asyncError","asyncValidating","onBlur","onChange","onDrop","onDragStart","dirty","dispatch","onFocus","form","format","initial","pristine","parse","state","submitError","submitFailed","submitting","syncError","syncWarning","value","validate","_value","custom","warn","objectWithoutPropertiesLoose_default","error","warning","formattedFieldValue","defaultFormattedValue","formatFieldValue","input","extends_default","checked","createFieldProps_processProps","meta","active","autofilled","invalid","touched","valid","visited","events_getValue","event","isReactNative","Object","isEvent","nativeEvent","text","detypedEvent","_detypedEvent$target","target","files","dataTransfer","options","result","index","length","option","selected","push","getSelectedValues","es_isReactNative","navigator","product","events_onChangeValue","normalize","dataKey","util_validateComponentProp","propName","componentName","react_is","Error","propsToNotUpdateFor","isObject","entity","isFunction","eventPreventDefault","preventDefault","eventDataTransferGetData","key","getData","eventDataTransferSetData","setData","es_ConnectedField","structure","ConnectedField","_Component","_this","_len","arguments","args","Array","_key","apply","concat","ref","react_default","createRef","isPristine","getValue","handleChange","_this$props","_reduxForm","previousValue","newValue","defaultPrevented","change","asyncValidate","handleFocus","_this$props2","focus","handleBlur","_this$props3","blur","handleDragStart","_this$props4","handleDrop","_this$props5","inheritsLoose_default","_proto","prototype","shouldComponentUpdate","nextProps","_this2","nextPropsKeys","keys","thisPropsKeys","some","prop","immutableProps","indexOf","getRenderedComponent","current","render","_this$props6","component","forwardRef","rest","_createFieldProps","react","propTypes","prop_types_default","object","es","ownProps","_ownProps$_reduxForm","initialValues","formState","getFormState","initialState","syncErrors","plain","_error","getSyncError","syncWarnings","_warning","getSyncWarning","connector","customizer","objectValue","otherValue","indexOrkey","other","stack","util_shallowCompare","instance","nextState","propsEqual","isEqualWith_default","stateEqual","prefixName","sectionPrefix","es_createField","setIn","Field","previousValues","getValues","componentDidMount","register","UNSAFE_componentWillReceiveProps","oldName","newName","unregister","componentWillUnmount","browser_default","createClass_default","get","string","isRequired","func","oneOfType","arrayOf","bool","react_lifecycles_compat_es","ReduxFormContext","__webpack_exports__","Cart","editingComment","editingQuantity","removingRow","buyMinimumQuanityIsOpen","deleteRowModalIsOpen","minQuantity","wantedQuantity","quantity","rowSystemId","currentComment","showUpdate","isDesktop","toggleBuyMinimumQuanityIsOpen","bind","_assertThisInitialized","toggleDeleteRowModalIsOpen","deleteRow","acceptNewQuantity","update","updateScreen","addEventListener","removeEventListener","setState","innerWidth","show","previousState","_objectSpread","_defineProperty","removeOrderRow","deleteCartRowSystemId","then","quantityToAdd","newQuantity","parseInt","onQuantityChange","updateOrderRowQuantity","comment","showDeleteButton","currentQuantity","originalQuantity","originalComment","test","_this$state","_this$state2","totalActionClass","replace","orderRows","order","src","image","alt","href","url","brand","articleNumber","isFreeGift","title","campaignPrice","price","style","display","tabIndex","min","max","errorMessage","onKeyPress","toLocaleLowerCase","handleUpdateClick","message","width","padding","unitOfMeasurement","totalPrice","allowOrderRowComment","placeholder","onCommentChange","orderTotal","CheckoutInput","updateFieldValue","stateKey","cssClass","autoComplete","errors","uniqId","htmlFor","toLowerCase","data-error-for","defaultProps","CheckoutSelect","_this$props$customerD","customerDetails","alternativeAddress","signUp","authenticated","onSignUpChange","country","disabled","constants","countries","CheckoutPrivateCustomerInfo","Components_CheckoutInput","_extends","Components_CheckoutSelect","CheckoutBusinessCustomerInfo","_useState2","_slicedToArray","useState","hideLogin","setHideLogin","_props$customerDetail","_props$companyAddress","companyAddresses","companyName","selectedCompanyAddressId","selectedCreditSafeCompanyAddressId","setSelectedCompanyAddress","setSelectedDeliveryCreditSafeCompanyAddress","setSelectedBillingCreditSafeCompanyAddress","_props$errors","doCreditSafeLookup","externalLink","contactPageLink","forgottenPasswordLink","uniqueId","fieldValue","selectedAddress","find","address","systemId","getCountry","addressCountry","classOfCustomerinfo","registrationNumber","creditSafeAddresses","JSON","stringify","address1","zip","city","address2","zipCode","LoginForm","newCustomerInformation","CheckoutDeliveryMethods","deliveryMethods","selectedId","method","description","CheckoutPaymentMethods","paymentMethods","CheckoutOrderNote","orderNote","CheckoutOrderInfo","cart","discount","deliveryCost","fees","formattedPrice","grandTotal","vat","CheckoutCampaignCode","onCampaignCodeChange","onSubmitCampaignCode","campaignCodeIsActive","marginTop","scriptPattern","PaymentWidget","PureComponent","responseString","renderKlarna","paymentSession","KlarnaCheckout","DynamicComponent","loader","__webpack_require__","e","extractScripts","executeScript","domString","matches","html","scripts","exec","domId","scriptContent","script","document","appendChild","createTextNode","getElementById","renderField","label","_ref$meta","AddCampaignCodeForm_extends","AddCampaignCodeForm","handleSubmit","onSubmit","reduxForm","values","userCompanySchema","shape","email","required","firstName","phoneNumber","acceptTermsOfCondition","boolean","oneOf","selectedBillingAddressId","notOneOf","selectedDeliveryAddressId","userPrivateSchema","lastName","businessCustomerDetailsSchema","mixed","selectedDeliveryMethod","CheckoutContainer","Checkout_container_classCallCheck","Checkout_container_possibleConstructorReturn","Checkout_container_getPrototypeOf","onError","Checkout_container_assertThisInitialized","currentcheckoutstatus","checkout","setCustomerType","selectedPaymentMethod","payload","checkoutSnapshot","chosenPaymentMethod","setPayment","chosenDeliveryMethod","setDelivery","_this$props$checkout$","deliveryAddress","billingAddress","onCustomerDetailsChange","sessionTime","sessionStorage","getItem","Date","getTime","modelError","removeItem","prevProps","prevState","redirectUrl","location","checkstatus","isSubmitting","errorKeys","errorNode","querySelector","inputNode","parentElement","setTimeout","scrollIntoView","behavior","addressPath","notCustomerDetailFields","inner","path","x","params","_this$props$checkout$2","isBusinessCustomer","submitRequest","Checkout_container_objectSpread","abortEarly","setItem","toLocaleString","submit","catch","includeVat","clearCart","toggleVat","_this3","_checkout$errors","freeDelivery","punchoutData","Components_Cart","isLoggedIn","setCustomerCompany","defaultChecked","marginLeft","cursor","setCustomerPrivate","_this4","_checkout$errors2","checkoutMode","forEach","privateCustomerInfoComponent","Checkout_PrivateCustomerInfo","businessCustomerInfoComponent","Checkout_BusinessCustomerInfo","both","setBusinessCustomer","companyCustomers","_checkout$errors3","Checkout_DeliveryMethods","_checkout$errors4","Checkout_PaymentMethods","credithold","creditHold","status","clearTime","loadingTitle","class","loadingTextEditor","_this5","setOrderNote","_checkout$errors5","paymentWidget","allowOrderComment","canCreateOrganizationFavoriteList","hasErrors","renderCartSection","submitPunchout","renderCurrentStatus","paymentError","isChangeable","CartToWishList_container","renderCustomerDetailsSection","Checkout_OrderNote","renderDeliveryMethodsSection","renderPaymentMethodsSection","Payments_PaymentWidget","Checkout_container_extends","verify","Checkout_CampaignCode","setCampaignCode","submitCampaignCode","Checkout_OrderInfo","termsUrl","placeOrder","connect","clearSnapshot","code","setChosenDeliveryMethod","setChosenPaymentMethod","note","setSnapshotOrderNote","accept","orderId","setSignUp","submitDone","companyId","submitCompanyAddress","setCompanyDeliveryAddress","setCustomerDetails","setSnapshotCustomerDetails","setAlternativeAddress","setBillingAddress","setDeliveryAddress","rowId","reloadPayment","orgNumber","fetchCompanyAddress","toggleIncludeVat","reloadPaymentMethods"],"mappings":"0FAAeA,WAAOC,SAAtB,86BCIA,IAGMC,cACJ,SAAAA,EAAYC,GAAO,mGAAAC,CAAAC,KAAAH,GAAAI,EAAAD,KAAAE,EAAAL,GAAAM,KAAAH,KACXF,gPAFUM,6GAMhB,YAA+BC,IAAxBL,KAAKF,MAAMQ,SAChBC,EAAAC,EAAAC,cAAA,KAAGC,UAAU,+DAA+DC,QAASX,KAAKF,MAAMQ,UAAWM,YAAU,oBACrH,kDAIF,YAA+BP,IAAxBL,KAAKF,MAAMe,SAChBN,EAAAC,EAAAC,cAAA,KAAGC,UAAU,mEAAmEC,QAASX,KAAKF,MAAMe,UAAWD,YAAU,wBACzH,0CAIF,OACEE,OAAQC,IAAMC,SAASC,IAAIjB,KAAKF,MAAMoB,SAAU,SAAAC,GAC9C,MAtBgB,eAsBRA,EAAMC,KAAKC,YAAmCF,EAAQ,OAC7D,GAAGrB,MAAMoB,2CAKd,OACEX,EAAAC,EAAAC,cAAA,OAAKa,GAAG,UAAUZ,UAAWV,KAAKF,MAAMyB,OAAS,aAAe,cAC9DhB,EAAAC,EAAAC,cAAA,OAAKC,UAAU,iBACbH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,gBACbH,EAAAC,EAAAC,cAAA,QAAMC,UAAU,QAAQC,QAASX,KAAKF,MAAMe,UAA5C,KAGEE,IAAMC,SAASC,IAAIjB,KAAKF,MAAMoB,SAAU,SAAAC,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1BxhB,EAASkT,YAA0BsO,IACnCxhB,EAASyhB,eACTzhB,EAAS0hB,aAA0BF,KAErCrO,4CAA6C,SAACW,GAC5C9T,EAASmT,YAA4CW,KAEvDV,2CAA4C,SAACU,GAC3C9T,EAASoT,YAA2CU,KAGtD4G,wBAAyB,SAAC5J,EAAUhN,EAAUjD,GAE5C,OAAQiQ,GACN,IAAK,kBACH9Q,EAAS2hB,YAAmB7d,EAAUjD,IACtCb,EAAS4hB,aAA2B9d,EAAUjD,IAC9C,MACF,IAAK,qBACHb,EAAS6hB,YAAsB/d,EAAUjD,IACzC,MACF,IAAK,iBACHb,EAAS8hB,YAAkBhe,EAAUjD,IACrC,MACF,IAAK,kBACHb,EAAS+hB,YAAmBje,EAAUjD,MAK5CqN,uBAAwB,SAAC8T,EAAO1V,EAAU6D,GAAlB,OAA8BnQ,EAASkO,YAAuB8T,EAAO1V,EAAU6D,IAAUtC,KAAK,kBAAM7N,EAASiiB,kBACrItU,eAAgB,SAACqU,GAAD,OAAWhiB,EAASkO,YAAuB8T,EAAO,IAAInU,KAAK,kBAAM7N,EAASiiB,kBAC1FtC,eAAgB,kBAAM3f,EAAS2f,gBAC/BrM,mBAAoB,SAAC4O,GACnBliB,EAASmiB,YAAoBD,KAE/BjF,UAAW,SAACF,GAAD,OAAgB/c,EAASoiB,YAAiBrF,IAAalP,KAAK,kBAAM7N,EAASqiB,kBACtFrF,UAAW,kBAAMhd,EAASgd,kBAIf6D,CAA6CtH","file":"9.b55f7d2e708e90fc6f15.js","sourcesContent":["export default window.__litium.constants;","import React, { Component } from 'react';\r\nimport { translate } from '../Services/translation';\r\n\r\n\r\nconst MODAL_HEADER_NAME = \"Modal.Header\"\r\nconst MODAL_BODY_NAME = \"Modal.Body\"\r\n\r\nclass Modal extends Component {\r\n  constructor(props) {\r\n    super(props)\r\n  }\r\n\r\n  renderAcceptButton() {\r\n    return this.props.onAccept !== undefined ?\r\n      <a className=\"button buy-button product-detail__buy-button modal-ok-button\" onClick={this.props.onAccept}>{translate('modal.ok.button')}</a> :\r\n      null;\r\n  }\r\n\r\n  renderCancelButton() {\r\n    return this.props.onCancel !== undefined ?\r\n      <a className=\"button buy-button product-detail__buy-button modal-cancel-button\" onClick={this.props.onCancel}>{translate('modal.cancel.button')}</a> :\r\n      null;\r\n  }\r\n\r\n  renderBody() {\r\n    return {\r\n      __html: React.Children.map(this.props.children, child => {\r\n        return (child.type.displayName === MODAL_BODY_NAME) ? child : null\r\n      })[0].props.children\r\n    }\r\n  }\r\n\r\n  render() {\r\n    return (\r\n      <div id=\"myModal\" className={this.props.isOpen ? 'modal show' : 'modal hide'}>\r\n        <div className=\"modal-content\">\r\n          <div className=\"modal-header\">\r\n            <span className=\"close\" onClick={this.props.onCancel}>&times;</span>\r\n\r\n            {\r\n              React.Children.map(this.props.children, child => {\r\n                return (child.type.displayName === MODAL_HEADER_NAME) ? child : null\r\n              })\r\n            }\r\n\r\n          </div>\r\n          <div className=\"modal-body\" dangerouslySetInnerHTML={this.renderBody()} />\r\n          <div className=\"modal-footer row-inner\">\r\n            <div className=\"columns small-12\">\r\n              {this.renderAcceptButton()}\r\n              {this.renderCancelButton()}\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    )\r\n  }\r\n}\r\n\r\n\r\n\r\nexport const Header = (props) => {\r\n  return (props.children)\r\n}\r\nHeader.displayName = MODAL_HEADER_NAME\r\n\r\nexport const Body = (props) => {\r\n  return (props.children)\r\n}\r\nBody.displayName = MODAL_BODY_NAME\r\n\r\nexport default Modal;\r\n\r\n","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/extends\";\n\nvar processProps = function processProps(type, props, _value, deepEqual) {\n  var value = props.value;\n\n  if (type === 'checkbox') {\n    return _extends({}, props, {\n      checked: !!value\n    });\n  }\n\n  if (type === 'radio') {\n    return _extends({}, props, {\n      checked: deepEqual(value, _value),\n      value: _value\n    });\n  }\n\n  if (type === 'select-multiple') {\n    return _extends({}, props, {\n      value: value || []\n    });\n  }\n\n  if (type === 'file') {\n    return _extends({}, props, {\n      value: value || undefined\n    });\n  }\n\n  return props;\n};\n\nvar createFieldProps = function createFieldProps(_ref, name, _ref2) {\n  var getIn = _ref.getIn,\n      toJS = _ref.toJS,\n      deepEqual = _ref.deepEqual;\n\n  var asyncError = _ref2.asyncError,\n      asyncValidating = _ref2.asyncValidating,\n      onBlur = _ref2.onBlur,\n      onChange = _ref2.onChange,\n      onDrop = _ref2.onDrop,\n      onDragStart = _ref2.onDragStart,\n      dirty = _ref2.dirty,\n      dispatch = _ref2.dispatch,\n      onFocus = _ref2.onFocus,\n      form = _ref2.form,\n      format = _ref2.format,\n      initial = _ref2.initial,\n      parse = _ref2.parse,\n      pristine = _ref2.pristine,\n      props = _ref2.props,\n      state = _ref2.state,\n      submitError = _ref2.submitError,\n      submitFailed = _ref2.submitFailed,\n      submitting = _ref2.submitting,\n      syncError = _ref2.syncError,\n      syncWarning = _ref2.syncWarning,\n      validate = _ref2.validate,\n      value = _ref2.value,\n      _value = _ref2._value,\n      warn = _ref2.warn,\n      custom = _objectWithoutPropertiesLoose(_ref2, [\"asyncError\", \"asyncValidating\", \"onBlur\", \"onChange\", \"onDrop\", \"onDragStart\", \"dirty\", \"dispatch\", \"onFocus\", \"form\", \"format\", \"initial\", \"parse\", \"pristine\", \"props\", \"state\", \"submitError\", \"submitFailed\", \"submitting\", \"syncError\", \"syncWarning\", \"validate\", \"value\", \"_value\", \"warn\"]);\n\n  var error = syncError || asyncError || submitError;\n  var warning = syncWarning;\n\n  var formatFieldValue = function formatFieldValue(value, format) {\n    if (format === null) {\n      return value;\n    }\n\n    var defaultFormattedValue = value == null ? '' : value;\n    return format ? format(value, name) : defaultFormattedValue;\n  };\n\n  var formattedFieldValue = formatFieldValue(value, format);\n  return {\n    input: processProps(custom.type, {\n      name: name,\n      onBlur: onBlur,\n      onChange: onChange,\n      onDragStart: onDragStart,\n      onDrop: onDrop,\n      onFocus: onFocus,\n      value: formattedFieldValue\n    }, _value, deepEqual),\n    meta: _extends({}, toJS(state), {\n      active: !!(state && getIn(state, 'active')),\n      asyncValidating: asyncValidating,\n      autofilled: !!(state && getIn(state, 'autofilled')),\n      dirty: dirty,\n      dispatch: dispatch,\n      error: error,\n      form: form,\n      initial: initial,\n      warning: warning,\n      invalid: !!error,\n      pristine: pristine,\n      submitting: !!submitting,\n      submitFailed: !!submitFailed,\n      touched: !!(state && getIn(state, 'touched')),\n      valid: !error,\n      visited: !!(state && getIn(state, 'visited'))\n    }),\n    custom: _extends({}, custom, props)\n  };\n};\n\nexport default createFieldProps;","import isEvent from './isEvent';\n\nvar getSelectedValues = function getSelectedValues(options) {\n  var result = [];\n\n  if (options) {\n    for (var index = 0; index < options.length; index++) {\n      var option = options[index];\n\n      if (option.selected) {\n        result.push(option.value);\n      }\n    }\n  }\n\n  return result;\n};\n\nvar getValue = function getValue(event, isReactNative) {\n  if (isEvent(event)) {\n    if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) {\n      return event.nativeEvent.text;\n    }\n\n    if (isReactNative && event.nativeEvent !== undefined) {\n      return event.nativeEvent.text;\n    }\n\n    var detypedEvent = event;\n    var _detypedEvent$target = detypedEvent.target,\n        type = _detypedEvent$target.type,\n        value = _detypedEvent$target.value,\n        checked = _detypedEvent$target.checked,\n        files = _detypedEvent$target.files,\n        dataTransfer = detypedEvent.dataTransfer;\n\n    if (type === 'checkbox') {\n      return !!checked;\n    }\n\n    if (type === 'file') {\n      return files || dataTransfer && dataTransfer.files;\n    }\n\n    if (type === 'select-multiple') {\n      return getSelectedValues(event.target.options);\n    }\n\n    return value;\n  }\n\n  return event;\n};\n\nexport default getValue;","var isReactNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative';\nexport default isReactNative;","import getValue from './getValue';\nimport isReactNative from '../isReactNative';\n\nvar onChangeValue = function onChangeValue(event, _ref) {\n  var name = _ref.name,\n      parse = _ref.parse,\n      normalize = _ref.normalize;\n  // read value from input\n  var value = getValue(event, isReactNative); // parse value if we have a parser\n\n  if (parse) {\n    value = parse(value, name);\n  } // normalize value\n\n\n  if (normalize) {\n    value = normalize(name, value);\n  }\n\n  return value;\n};\n\nexport default onChangeValue;","export var dataKey = 'text';","import { isValidElementType } from 'react-is';\n\nvar validateComponentProp = function validateComponentProp(props, propName, componentName) {\n  if (!isValidElementType(props[propName])) {\n    return new Error('Invalid prop `' + propName + '` supplied to' + ' `' + componentName + '`.');\n  }\n\n  return null;\n};\n\nexport default validateComponentProp;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\nimport React, { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport createFieldProps from './createFieldProps';\nimport onChangeValue from './events/onChangeValue';\nimport { dataKey } from './util/eventConsts';\nimport plain from './structure/plain';\nimport isReactNative from './isReactNative';\nimport validateComponentProp from './util/validateComponentProp';\nimport isEvent from './events/isEvent';\nvar propsToNotUpdateFor = ['_reduxForm'];\n\nvar isObject = function isObject(entity) {\n  return entity && typeof entity === 'object';\n};\n\nvar isFunction = function isFunction(entity) {\n  return entity && typeof entity === 'function';\n};\n\nvar eventPreventDefault = function eventPreventDefault(event) {\n  if (isObject(event) && isFunction(event.preventDefault)) {\n    event.preventDefault();\n  }\n};\n\nvar eventDataTransferGetData = function eventDataTransferGetData(event, key) {\n  if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.getData)) {\n    return event.dataTransfer.getData(key);\n  }\n};\n\nvar eventDataTransferSetData = function eventDataTransferSetData(event, key, value) {\n  if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.setData)) {\n    event.dataTransfer.setData(key, value);\n  }\n};\n\nvar createConnectedField = function createConnectedField(structure) {\n  var deepEqual = structure.deepEqual,\n      getIn = structure.getIn;\n\n  var getSyncError = function getSyncError(syncErrors, name) {\n    var error = plain.getIn(syncErrors, name); // Because the error for this field might not be at a level in the error structure where\n    // it can be set directly, it might need to be unwrapped from the _error property\n\n    return error && error._error ? error._error : error;\n  };\n\n  var getSyncWarning = function getSyncWarning(syncWarnings, name) {\n    var warning = getIn(syncWarnings, name); // Because the warning for this field might not be at a level in the warning structure where\n    // it can be set directly, it might need to be unwrapped from the _warning property\n\n    return warning && warning._warning ? warning._warning : warning;\n  };\n\n  var ConnectedField =\n  /*#__PURE__*/\n  function (_Component) {\n    _inheritsLoose(ConnectedField, _Component);\n\n    function ConnectedField() {\n      var _this;\n\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n      _this.ref = React.createRef();\n\n      _this.isPristine = function () {\n        return _this.props.pristine;\n      };\n\n      _this.getValue = function () {\n        return _this.props.value;\n      };\n\n      _this.handleChange = function (event) {\n        var _this$props = _this.props,\n            name = _this$props.name,\n            dispatch = _this$props.dispatch,\n            parse = _this$props.parse,\n            normalize = _this$props.normalize,\n            onChange = _this$props.onChange,\n            _reduxForm = _this$props._reduxForm,\n            previousValue = _this$props.value;\n        var newValue = onChangeValue(event, {\n          name: name,\n          parse: parse,\n          normalize: normalize\n        });\n        var defaultPrevented = false;\n\n        if (onChange) {\n          // Can't seem to find a way to extend Event in React Native,\n          // thus I simply avoid adding preventDefault() in a RN environment\n          // to prevent the following error:\n          // `One of the sources for assign has an enumerable key on the prototype chain`\n          // Reference: https://github.com/facebook/react-native/issues/5507\n          if (!isReactNative && isEvent(event)) {\n            onChange(_extends({}, event, {\n              preventDefault: function preventDefault() {\n                defaultPrevented = true;\n                return eventPreventDefault(event);\n              }\n            }), newValue, previousValue, name);\n          } else {\n            defaultPrevented = onChange(event, newValue, previousValue, name);\n          }\n        }\n\n        if (!defaultPrevented) {\n          // dispatch change action\n          dispatch(_reduxForm.change(name, newValue)); // call post-change callback\n\n          if (_reduxForm.asyncValidate) {\n            _reduxForm.asyncValidate(name, newValue, 'change');\n          }\n        }\n      };\n\n      _this.handleFocus = function (event) {\n        var _this$props2 = _this.props,\n            name = _this$props2.name,\n            dispatch = _this$props2.dispatch,\n            onFocus = _this$props2.onFocus,\n            _reduxForm = _this$props2._reduxForm;\n        var defaultPrevented = false;\n\n        if (onFocus) {\n          if (!isReactNative) {\n            onFocus(_extends({}, event, {\n              preventDefault: function preventDefault() {\n                defaultPrevented = true;\n                return eventPreventDefault(event);\n              }\n            }), name);\n          } else {\n            defaultPrevented = onFocus(event, name);\n          }\n        }\n\n        if (!defaultPrevented) {\n          dispatch(_reduxForm.focus(name));\n        }\n      };\n\n      _this.handleBlur = function (event) {\n        var _this$props3 = _this.props,\n            name = _this$props3.name,\n            dispatch = _this$props3.dispatch,\n            parse = _this$props3.parse,\n            normalize = _this$props3.normalize,\n            onBlur = _this$props3.onBlur,\n            _reduxForm = _this$props3._reduxForm,\n            _value = _this$props3._value,\n            previousValue = _this$props3.value;\n        var newValue = onChangeValue(event, {\n          name: name,\n          parse: parse,\n          normalize: normalize\n        }); // for checkbox and radio, if the value property of checkbox or radio equals\n        // the value passed by blur event, then fire blur action with previousValue.\n\n        if (newValue === _value && _value !== undefined) {\n          newValue = previousValue;\n        }\n\n        var defaultPrevented = false;\n\n        if (onBlur) {\n          if (!isReactNative) {\n            onBlur(_extends({}, event, {\n              preventDefault: function preventDefault() {\n                defaultPrevented = true;\n                return eventPreventDefault(event);\n              }\n            }), newValue, previousValue, name);\n          } else {\n            defaultPrevented = onBlur(event, newValue, previousValue, name);\n          }\n        }\n\n        if (!defaultPrevented) {\n          // dispatch blur action\n          dispatch(_reduxForm.blur(name, newValue)); // call post-blur callback\n\n          if (_reduxForm.asyncValidate) {\n            _reduxForm.asyncValidate(name, newValue, 'blur');\n          }\n        }\n      };\n\n      _this.handleDragStart = function (event) {\n        var _this$props4 = _this.props,\n            name = _this$props4.name,\n            onDragStart = _this$props4.onDragStart,\n            value = _this$props4.value;\n        eventDataTransferSetData(event, dataKey, value == null ? '' : value);\n\n        if (onDragStart) {\n          onDragStart(event, name);\n        }\n      };\n\n      _this.handleDrop = function (event) {\n        var _this$props5 = _this.props,\n            name = _this$props5.name,\n            dispatch = _this$props5.dispatch,\n            onDrop = _this$props5.onDrop,\n            _reduxForm = _this$props5._reduxForm,\n            previousValue = _this$props5.value;\n        var newValue = eventDataTransferGetData(event, dataKey);\n        var defaultPrevented = false;\n\n        if (onDrop) {\n          onDrop(_extends({}, event, {\n            preventDefault: function preventDefault() {\n              defaultPrevented = true;\n              return eventPreventDefault(event);\n            }\n          }), newValue, previousValue, name);\n        }\n\n        if (!defaultPrevented) {\n          // dispatch change action\n          dispatch(_reduxForm.change(name, newValue));\n          eventPreventDefault(event);\n        }\n      };\n\n      return _this;\n    }\n\n    var _proto = ConnectedField.prototype;\n\n    _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n      var _this2 = this;\n\n      var nextPropsKeys = Object.keys(nextProps);\n      var thisPropsKeys = Object.keys(this.props); // if we have children, we MUST update in React 16\n      // https://twitter.com/erikras/status/915866544558788608\n\n      return !!(this.props.children || nextProps.children || nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) {\n        if (~(nextProps.immutableProps || []).indexOf(prop)) {\n          return _this2.props[prop] !== nextProps[prop];\n        }\n\n        return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]);\n      }));\n    };\n\n    _proto.getRenderedComponent = function getRenderedComponent() {\n      return this.ref.current;\n    };\n\n    _proto.render = function render() {\n      var _this$props6 = this.props,\n          component = _this$props6.component,\n          forwardRef = _this$props6.forwardRef,\n          name = _this$props6.name,\n          _reduxForm = _this$props6._reduxForm,\n          normalize = _this$props6.normalize,\n          onBlur = _this$props6.onBlur,\n          onChange = _this$props6.onChange,\n          onFocus = _this$props6.onFocus,\n          onDragStart = _this$props6.onDragStart,\n          onDrop = _this$props6.onDrop,\n          immutableProps = _this$props6.immutableProps,\n          rest = _objectWithoutPropertiesLoose(_this$props6, [\"component\", \"forwardRef\", \"name\", \"_reduxForm\", \"normalize\", \"onBlur\", \"onChange\", \"onFocus\", \"onDragStart\", \"onDrop\", \"immutableProps\"]);\n\n      var _createFieldProps = createFieldProps(structure, name, _extends({}, rest, {\n        form: _reduxForm.form,\n        onBlur: this.handleBlur,\n        onChange: this.handleChange,\n        onDrop: this.handleDrop,\n        onDragStart: this.handleDragStart,\n        onFocus: this.handleFocus\n      })),\n          custom = _createFieldProps.custom,\n          props = _objectWithoutPropertiesLoose(_createFieldProps, [\"custom\"]);\n\n      if (forwardRef) {\n        custom.ref = this.ref;\n      }\n\n      if (typeof component === 'string') {\n        var input = props.input,\n            meta = props.meta; // eslint-disable-line no-unused-vars\n        // flatten input into other props\n\n        return createElement(component, _extends({}, input, custom));\n      } else {\n        return createElement(component, _extends({}, props, custom));\n      }\n    };\n\n    return ConnectedField;\n  }(Component);\n\n  ConnectedField.propTypes = {\n    component: validateComponentProp,\n    props: PropTypes.object\n  };\n  var connector = connect(function (state, ownProps) {\n    var name = ownProps.name,\n        _ownProps$_reduxForm = ownProps._reduxForm,\n        initialValues = _ownProps$_reduxForm.initialValues,\n        getFormState = _ownProps$_reduxForm.getFormState;\n    var formState = getFormState(state);\n    var initialState = getIn(formState, \"initial.\" + name);\n    var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name);\n    var value = getIn(formState, \"values.\" + name);\n    var submitting = getIn(formState, 'submitting');\n    var syncError = getSyncError(getIn(formState, 'syncErrors'), name);\n    var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name);\n    var pristine = deepEqual(value, initial);\n    return {\n      asyncError: getIn(formState, \"asyncErrors.\" + name),\n      asyncValidating: getIn(formState, 'asyncValidating') === name,\n      dirty: !pristine,\n      pristine: pristine,\n      state: getIn(formState, \"fields.\" + name),\n      submitError: getIn(formState, \"submitErrors.\" + name),\n      submitFailed: getIn(formState, 'submitFailed'),\n      submitting: submitting,\n      syncError: syncError,\n      syncWarning: syncWarning,\n      initial: initial,\n      value: value,\n      _value: ownProps.value // save value passed in (for radios)\n\n    };\n  }, undefined, undefined, {\n    forwardRef: true\n  });\n  return connector(ConnectedField);\n};\n\nexport default createConnectedField;","import _isEqualWith from \"lodash/isEqualWith\";\n\nvar customizer = function customizer(objectValue, otherValue, indexOrkey, object, other, stack) {\n  // https://lodash.com/docs/4.17.4#isEqualWith\n  if (stack) {\n    // Shallow compares\n    // For 1st level, stack === undefined.\n    //   -> Do nothing (and implicitly return undefined so that it goes to compare 2nd level)\n    // For 2nd level and up, stack !== undefined.\n    //   -> Compare by === operator\n    return objectValue === otherValue;\n  }\n};\n\nvar shallowCompare = function shallowCompare(instance, nextProps, nextState) {\n  var propsEqual = _isEqualWith(instance.props, nextProps, customizer);\n\n  var stateEqual = _isEqualWith(instance.state, nextState, customizer);\n\n  return !propsEqual || !stateEqual;\n};\n\nexport default shallowCompare;","var formatName = function formatName(_ref, name) {\n  var sectionPrefix = _ref._reduxForm.sectionPrefix;\n  return sectionPrefix ? sectionPrefix + \".\" + name : name;\n};\n\nexport default formatName;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\nimport React, { Component, createElement } from 'react';\nimport { polyfill } from 'react-lifecycles-compat';\nimport PropTypes from 'prop-types';\nimport invariant from 'invariant';\nimport createConnectedField from './ConnectedField';\nimport shallowCompare from './util/shallowCompare';\nimport prefixName from './util/prefixName';\nimport plain from './structure/plain';\nimport { withReduxForm } from './ReduxFormContext';\nimport validateComponentProp from './util/validateComponentProp';\n\nvar createField = function createField(structure) {\n  var ConnectedField = createConnectedField(structure);\n  var setIn = structure.setIn;\n\n  var Field =\n  /*#__PURE__*/\n  function (_Component) {\n    _inheritsLoose(Field, _Component);\n\n    function Field(props) {\n      var _this;\n\n      _this = _Component.call(this, props) || this;\n      _this.ref = React.createRef();\n      _this.ref = React.createRef();\n\n      _this.normalize = function (name, value) {\n        var normalize = _this.props.normalize;\n\n        if (!normalize) {\n          return value;\n        }\n\n        var previousValues = _this.props._reduxForm.getValues();\n\n        var previousValue = _this.value;\n        var nextValues = setIn(previousValues, name, value);\n        return normalize(value, previousValue, nextValues, previousValues, name);\n      };\n\n      if (!props._reduxForm) {\n        throw new Error('Field must be inside a component decorated with reduxForm()');\n      }\n\n      return _this;\n    }\n\n    var _proto = Field.prototype;\n\n    _proto.componentDidMount = function componentDidMount() {\n      var _this2 = this;\n\n      this.props._reduxForm.register(this.name, 'Field', function () {\n        return _this2.props.validate;\n      }, function () {\n        return _this2.props.warn;\n      });\n    };\n\n    _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {\n      return shallowCompare(this, nextProps, nextState);\n    };\n\n    _proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) {\n      var oldName = prefixName(this.props, this.props.name);\n      var newName = prefixName(nextProps, nextProps.name);\n\n      if (oldName !== newName || // use deepEqual here because they could be a function or an array of functions\n      !plain.deepEqual(this.props.validate, nextProps.validate) || !plain.deepEqual(this.props.warn, nextProps.warn)) {\n        // unregister old name\n        this.props._reduxForm.unregister(oldName); // register new name\n\n\n        this.props._reduxForm.register(newName, 'Field', function () {\n          return nextProps.validate;\n        }, function () {\n          return nextProps.warn;\n        });\n      }\n    };\n\n    _proto.componentWillUnmount = function componentWillUnmount() {\n      this.props._reduxForm.unregister(this.name);\n    };\n\n    _proto.getRenderedComponent = function getRenderedComponent() {\n      invariant(this.props.forwardRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a forwardRef prop to Field');\n      return this.ref.current ? this.ref.current.getRenderedComponent() : undefined;\n    };\n\n    _proto.render = function render() {\n      return createElement(ConnectedField, _extends({}, this.props, {\n        name: this.name,\n        normalize: this.normalize,\n        ref: this.ref\n      }));\n    };\n\n    _createClass(Field, [{\n      key: \"name\",\n      get: function get() {\n        return prefixName(this.props, this.props.name);\n      }\n    }, {\n      key: \"dirty\",\n      get: function get() {\n        return !this.pristine;\n      }\n    }, {\n      key: \"pristine\",\n      get: function get() {\n        return !!(this.ref.current && this.ref.current.isPristine());\n      }\n    }, {\n      key: \"value\",\n      get: function get() {\n        return this.ref.current && this.ref.current.getValue();\n      }\n    }]);\n\n    return Field;\n  }(Component);\n\n  Field.propTypes = {\n    name: PropTypes.string.isRequired,\n    component: validateComponentProp,\n    format: PropTypes.func,\n    normalize: PropTypes.func,\n    onBlur: PropTypes.func,\n    onChange: PropTypes.func,\n    onFocus: PropTypes.func,\n    onDragStart: PropTypes.func,\n    onDrop: PropTypes.func,\n    parse: PropTypes.func,\n    props: PropTypes.object,\n    validate: PropTypes.oneOfType([PropTypes.func, PropTypes.arrayOf(PropTypes.func)]),\n    warn: PropTypes.oneOfType([PropTypes.func, PropTypes.arrayOf(PropTypes.func)]),\n    forwardRef: PropTypes.bool,\n    immutableProps: PropTypes.arrayOf(PropTypes.string),\n    _reduxForm: PropTypes.object\n  };\n  polyfill(Field);\n  return withReduxForm(Field);\n};\n\nexport default createField;","import createField from './createField';\nimport plain from './structure/plain';\nexport default createField(plain);","import React, { Component, Fragment } from 'react';\r\nimport { translate } from '../Services/translation';\r\nimport Modal, { Header, Body } from '../Components/Modal';\r\n\r\n\r\nclass Cart extends Component {\r\n  constructor(props) {\r\n    super(props);\r\n    this.state = {\r\n      editingComment: {},\r\n      editingQuantity: {},\r\n      removingRow: {},\r\n      buyMinimumQuanityIsOpen: false,\r\n      deleteRowModalIsOpen: false,\r\n      minQuantity: 1,\r\n      wantedQuantity: 0,\r\n      quantity: 0,\r\n      rowSystemId: 0,\r\n      currentComment: '',\r\n      showUpdate: false,\r\n      isDesktop: true\r\n    };\r\n\r\n    this.toggleBuyMinimumQuanityIsOpen = this.toggleBuyMinimumQuanityIsOpen.bind(this);\r\n    this.toggleDeleteRowModalIsOpen = this.toggleDeleteRowModalIsOpen.bind(this);\r\n    this.deleteRow = this.deleteRow.bind(this);\r\n    this.acceptNewQuantity = this.acceptNewQuantity.bind(this)\r\n    this.update = this.update.bind(this)\r\n    this.updateScreen = this.updateScreen.bind(this);\r\n  }\r\n\r\n  componentDidMount() {\r\n    this.updateScreen();\r\n    window.addEventListener(\"resize\", this.updateScreen);\r\n  }\r\n\r\n  componentWillUnmount() {\r\n    window.removeEventListener(\"resize\", this.updateScreen);\r\n  }\r\n\r\n  updateScreen() {\r\n    this.setState({ isDesktop: window.innerWidth > 650 });\r\n  }\r\n\r\n  update(rowSystemId, show) {\r\n    this.setState(previousState => ({\r\n      ...previousState,\r\n      showUpdate: {\r\n        ...previousState.showUpdate,\r\n        [rowSystemId]: show,\r\n      }, \r\n    }))\r\n  }\r\n\r\n  deleteRow() {\r\n    this.props.removeOrderRow(this.state.deleteCartRowSystemId).then(this.toggleDeleteRowModalIsOpen)\r\n  }\r\n\r\n  toggleDeleteRowModalIsOpen(rowSystemId) {\r\n\r\n    if (rowSystemId) {\r\n      this.setState({\r\n        deleteCartRowSystemId: rowSystemId\r\n      });\r\n    }\r\n    this.setState({\r\n      deleteRowModalIsOpen: !this.state.deleteRowModalIsOpen\r\n    });\r\n  }\r\n\r\n  toggleBuyMinimumQuanityIsOpen(wantedQuantity, minQuantity, rowSystemId, currentComment) {\r\n    const quantityToAdd = minQuantity - (wantedQuantity % minQuantity)\r\n    const newQuantity = (parseInt(wantedQuantity) + quantityToAdd)\r\n\r\n    this.setState({\r\n      buyMinimumQuanityIsOpen: !this.state.buyMinimumQuanityIsOpen,\r\n      wantedQuantity: wantedQuantity,\r\n      quantity: newQuantity,\r\n      rowSystemId,\r\n      currentComment\r\n    })\r\n  }\r\n  \r\n  acceptNewQuantity() {\r\n    if (this.state) {\r\n      if (this.state.wantedQuantity) {\r\n        this.onQuantityChange(this.state.rowSystemId, this.state.quantity)\r\n        this.setState({ buyMinimumQuanityIsOpen: false, wantedQuantity: 0, quantity: 0 })\r\n        this.props.updateOrderRowQuantity(this.state.rowSystemId, this.state.quantity, this.state.currentComment);\r\n      }\r\n    }\r\n  }\r\n\r\n  onQuantityChange(rowSystemId, quantity) {\r\n    this.setState(previousState => ({\r\n      ...previousState,\r\n      editingQuantity: {\r\n        ...previousState.editingQuantity,\r\n        [rowSystemId]: quantity,\r\n      }, \r\n    })),\r\n    this.update(rowSystemId,  true);\r\n  }\r\n\r\n  onCommentChange(rowSystemId, comment) {\r\n    this.setState(previousState => ({\r\n      ...previousState,\r\n      editingComment: {\r\n        ...previousState.editingComment,\r\n        [rowSystemId]: comment,\r\n      }\r\n    }));\r\n  }\r\n  \r\n  onDeleteRequest(rowSystemId, showDeleteButton) {\r\n    this.setState(previousState => ({\r\n      ...previousState,\r\n      removingRow: {\r\n        ...previousState.removingRow,\r\n        [rowSystemId]: showDeleteButton,\r\n      }\r\n    }));\r\n  }\r\n  \r\n  handleUpdateClick(rowSystemId, currentQuantity, originalQuantity, minQuantity, currentComment, originalComment) {\r\n    if (this.state.deleteRowModalIsOpen) {\r\n      return;\r\n    }\r\n    \r\n    currentQuantity = this.state.editingQuantity[rowSystemId] || currentQuantity;\r\n    \r\n    if (/^[-]?\\d+$/.test(currentQuantity) && currentQuantity == 0) {\r\n      this.toggleDeleteRowModalIsOpen(rowSystemId);\r\n      return;\r\n    }\r\n    \r\n    if (!/^[-]?\\d+$/.test(currentQuantity)) {\r\n      this.onQuantityChange(rowSystemId, originalQuantity);\r\n      return;\r\n    }\r\n    \r\n    if (currentQuantity == originalQuantity && currentComment == originalComment) {\r\n      return;\r\n    }\r\n    \r\n    if (currentQuantity % minQuantity != 0) {\r\n      this.setState({ minQuantity });\r\n      this.setState({ quantity: currentQuantity });\r\n      this.toggleBuyMinimumQuanityIsOpen(currentQuantity, minQuantity, rowSystemId, currentComment);\r\n      this.onQuantityChange(rowSystemId, originalQuantity);\r\n      \r\n      return;\r\n    }\r\n    \r\n    this.props.updateOrderRowQuantity(rowSystemId, currentQuantity, currentComment);\r\n\r\n    this.update(rowSystemId,  false);\r\n  }\r\n  \r\n  render() {\r\n    const { buyMinimumQuanityIsOpen, deleteRowModalIsOpen } = this.state;\r\n    const { editingQuantity, editingComment, removingRow } = this.state;\r\n    const productHeaderClass = \"columns small-12 medium-4 large-6\"; /* = productContentClass */\r\n    const priceHeaderClass = \"columns small-3 medium-2 large-1\" + \" headerOrder1\"; /* = priceContentClass */\r\n    const quantityHeaderClass = \"columns small-4 medium-3 large-2\" + \" headerOrder2\"; /* = quantityInputClass + quantityActionClass  */\r\n    const totalHeaderClass = \"columns small-5 medium-3 large-2\" + \" headerOrder3\"; /* = totalContentClass + totalActionClass  */\r\n    const productContentClass = \"columns small-12 medium-4 large-6\" + \" checkout-cart__image-container\";\r\n    const priceQuantityRowClass = \"columns small-12 medium-8 large-6\" + \" checkout-cart__priceQuantityRow-container\";\r\n    const priceContentClass = \"columns small-4 medium-3 large-2\" + \" simple-table__cell--no-break-word\"  + \" order1\";\r\n    const quantityInputClass = \"columns small-4 medium-3 large-4\" + \" order2\";\r\n    const quantityActionClass = \"columns small-4 medium-3 large-3\" + \" order3\";\r\n    const totalContentClass = \"columns small-4 medium-3 large-3\" + \" simple-table__cell--no-break-word\" + \" order3\";\r\n    const totalActionClass = \"columns small-2 medium-1 large-2\" + \" checkout-cart__delete-icon\";\r\n    let {showUpdate} = this.state;\r\n    const isDesktop = this.state.isDesktop;\r\n \r\n    return (<div className=\"row checkout__container\">\r\n      <Modal\r\n        isOpen={buyMinimumQuanityIsOpen}\r\n        onCancel={this.toggleBuyMinimumQuanityIsOpen}\r\n        onAccept={this.acceptNewQuantity}\r\n      >\r\n        <Header>{translate('modal.minquantity.title')}</Header>\r\n        <Body>{translate('modal.minquantity.text').replace(\"minQuantity\", this.state.minQuantity).replace(\"addThis\", this.state.minQuantity - (this.state.wantedQuantity % this.state.minQuantity))}</Body>\r\n\r\n      </Modal>\r\n\r\n      <Modal\r\n        isOpen={deleteRowModalIsOpen}\r\n        onCancel={this.toggleDeleteRowModalIsOpen}\r\n        onAccept={this.deleteRow}\r\n      >\r\n        <Header><b>{translate('checkout.modal.remove.item.title')}</b></Header>\r\n        <Body>{translate('checkout.modal.remove.item.text')}</Body>\r\n\r\n      </Modal>\r\n\r\n      <div className=\"small-12 simple-table\">\r\n        <div className=\"row small-unstack no-margin\">\r\n          <div className={productHeaderClass}></div>\r\n          <div className={priceHeaderClass}>{translate('checkout.cart.header.price')}</div>\r\n          <div className={quantityHeaderClass}>{translate('checkout.cart.header.quantity')}</div>\r\n          <div className={totalHeaderClass}>{translate('checkout.cart.header.total')}</div>\r\n        </div>\r\n        {this.props.orderRows && this.props.orderRows.map((order, index) => {\r\n\r\n          return (\r\n            <div className=\"row small-unstack no-margin checkout-cart__row\" key={order.rowSystemId}>\r\n              <div className={productContentClass}>\r\n                <div className=\"checkout-cart__image-wrapper\">\r\n                  <img className=\"checkout-cart__image\" src={order.image} alt={order.name} />\r\n                </div>\r\n                <div className=\"checkout-cart__image-info\">\r\n                  <a href={order.url}>{order.name}</a>\r\n                  <span className=\"checkout-cart__brand-name\" >{order.brand}</span>\r\n                  <span className=\"checkout-cart__brand-name\" >{translate('product.articlenumber')}: {order.articleNumber}</span>\r\n                </div>\r\n                {!isDesktop ? (\r\n                  <div className={totalActionClass}>\r\n                    {!order.isFreeGift && !removingRow[order.rowSystemId] && <a className=\"table__icon table__icon--delete\" onClick={() => this.toggleDeleteRowModalIsOpen(order.rowSystemId)} title={translate('general.remove')}></a>}\r\n                  </div>\r\n                ) : (\r\n                  null\r\n                )}\r\n              </div>\r\n              <div className={priceQuantityRowClass}>\r\n                <div className={priceContentClass}>\r\n                  {order.campaignPrice ? (\r\n                    <Fragment>\r\n                      <div className='checkout-cart__campaign-price'>{order.campaignPrice}</div>\r\n                      <div className='checkout-cart__original-price'> ({order.price})</div>\r\n                    </Fragment>\r\n                  ) : order.price}\r\n                </div>\r\n                <div className={quantityInputClass}>\r\n                  {order.isFreeGift ? (<div>{order.quantity}</div>) : (\r\n                    <div style={{ display: \"flex\" }}> <input tabIndex={index} className=\"checkout-cart__input\" type=\"number\" min=\"0\" max=\"999\"\r\n                      value={editingQuantity[order.rowSystemId] == undefined || order.errorMessage ? order.quantity : editingQuantity[order.rowSystemId]}\r\n                      onChange={event => this.onQuantityChange(order.rowSystemId, event.target.value)}\r\n                      // onBlur={event => {\r\n                      //   this.handleUpdateClick(order.rowSystemId, editingQuantity[order.rowSystemId] == undefined ? order.quantity : editingQuantity[order.rowSystemId] || order.quantity, order.quantity, order.minQuantity, editingComment[order.rowSystemId] || order.message, order.message)\r\n                      // }}\r\n                      onKeyPress={event => {\r\n                        if (event.key.toLocaleLowerCase() == 'enter') {\r\n                          this.handleUpdateClick(order.rowSystemId, editingQuantity[order.rowSystemId] == undefined ? order.quantity : editingQuantity[order.rowSystemId] || order.quantity, order.quantity, order.minQuantity, editingComment[order.rowSystemId] || order.message, order.message)\r\n                        }\r\n                      }}\r\n                    />\r\n\r\n                      <input className=\"hide\" type=\"text\" tabIndex={index + 1} />\r\n\r\n                      <span style={{ width: \"60px\", padding: \"7px 0px 0px 6px\" }}> {order.unitOfMeasurement}</span>\r\n                    </div>\r\n                  )\r\n                  }\r\n                </div>\r\n                {showUpdate && showUpdate[order.rowSystemId] ?\r\n                  <div className={quantityActionClass}>\r\n                    {!order.isFreeGift &&\r\n                      <a className=\"table__icon table__icon--reorder\" onClick={(event) => this.handleUpdateClick(order.rowSystemId, editingQuantity[order.rowSystemId] || order.quantity, order.quantity, order.minQuantity, editingComment[order.rowSystemId] || order.message, order.message)}></a>\r\n                    }\r\n                  </div>\r\n                :\r\n                  <div className={`checkout-cart__total-price ${totalContentClass}`}>\r\n                    {order.totalPrice}\r\n                  </div>\r\n                }\r\n                {isDesktop ? (\r\n                  <div className={totalActionClass}>\r\n                    {!order.isFreeGift && !removingRow[order.rowSystemId] && <a className=\"table__icon table__icon--delete\" onClick={() => this.toggleDeleteRowModalIsOpen(order.rowSystemId)} title={translate('general.remove')}></a>}\r\n                    {/* {!order.isFreeGift && removingRow[order.rowSystemId] && (\r\n                                        <Fragment>\r\n                                            <a className=\"table__icon table__icon--accept\" onClick={() => this.props.removeOrderRow(order.rowSystemId)} title={translate('general.ok')}></a>\r\n                                            <a className=\"table__icon table__icon--cancel\" onClick={() => this.onDeleteRequest(order.rowSystemId, false)} title={translate('general.cancel')}></a>\r\n                                        </Fragment>\r\n                                    )} */}\r\n                  </div>\r\n                ) : (\r\n                  null\r\n                )}\r\n              </div>\r\n\r\n              {this.props.allowOrderRowComment && <div className=\"columns small-12 medium-6 medium-offset-6\">\r\n                <input className=\"checkout-cart__input\" type=\"text\" tabIndex={index + 2}\r\n                  placeholder={translate('checkout.orderrow.comment.placeholder')}\r\n                  value={editingComment[order.rowSystemId] || order.message}\r\n                  onChange={event => this.onCommentChange(order.rowSystemId, event.target.value)}\r\n                  onBlur={(event) => this.handleUpdateClick(order.rowSystemId, editingQuantity[order.rowSystemId] || order.quantity, order.quantity, order.minQuantity, editingComment[order.rowSystemId] || order.message, order.message)}\r\n                />\r\n              </div>\r\n              }\r\n              <div className=\"checkout__validator--error\">{order.errorMessage}</div>\r\n            </div>\r\n          )\r\n        })}\r\n        <div className=\"row small-unstack no-margin checkout-cart__row\">\r\n          <div className=\"columns\">\r\n            <h3 className=\"text--right\">{translate('checkout.cart.total')}: {this.props.orderTotal}</h3>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>);\r\n  }\r\n}\r\n\r\nexport default Cart;","import React, { Component } from 'react';\r\nimport { translate } from '../Services/translation';\r\n\r\nclass CheckoutInput extends Component {\r\n  componentDidMount() {\r\n    this.updateFieldValue();\r\n  }\r\n\r\n  updateFieldValue() {\r\n    const { stateKey, id, onChange } = this.props;\r\n    onChange(stateKey, id, (this.props[stateKey] || {})[id] || '');\r\n  }\r\n\r\n  render() {\r\n    const { cssClass, stateKey, id, autoComplete, placeholder, type, errors, onChange } = this.props;\r\n    const uniqId = `${stateKey}-${id}`; // Create unique ID\r\n    \r\n    return (\r\n      <div className={cssClass}>\r\n        <label className=\"form__label\" htmlFor={uniqId}>\r\n          {translate(`checkout.customerinfo.${id.toLowerCase()}`)}&#8203;\r\n        </label>\r\n        <input\r\n          className=\"form__input\"\r\n          id={uniqId} // Use unique ID\r\n          name={uniqId} // Use unique ID \r\n          type={type}\r\n          value={(this.props[stateKey] || {})[id] || ''}\r\n          placeholder={placeholder}\r\n          autoComplete={autoComplete}\r\n          onChange={(event) => onChange(stateKey, id, event.target.value)}\r\n        />\r\n        {errors[uniqId] && ( // Access error using unique ID\r\n          <span\r\n            className=\"form__validator--error form__validator--top-narrow\"\r\n            data-error-for={uniqId}\r\n          >\r\n            {errors[uniqId][0]}\r\n          </span>\r\n        )}\r\n      </div>\r\n    );\r\n  }\r\n}\r\n\r\nCheckoutInput.defaultProps = {\r\n  autoComplete: 'on',\r\n  placeholder: null,\r\n  type: 'text',\r\n  errors: {},\r\n};\r\n\r\nexport default CheckoutInput;\r\n","import React, {Component} from 'react';\r\nimport {translate} from \"../Services/translation\";\r\nimport constants from \"../constants\";\r\n\r\nclass CheckoutSelect extends Component {\r\n    componentDidMount() {\r\n        this.props.onChange(this.props.stateKey, this.props.id, (this.props[this.props.stateKey] || {})[this.props.id] || '')\r\n    }\r\n\r\n    render() {\r\n        const {\r\n            customerDetails = {},\r\n            alternativeAddress = [],\r\n            signUp,\r\n            authenticated,\r\n            onChange,\r\n            onSignUpChange,\r\n            errors = {}\r\n        } = this.props;\r\n        return (\r\n            <div className=\"small-12 columns\">\r\n                <label className=\"form__label\" htmlFor=\"country\">{translate('checkout.customerinfo.country')}</label>\r\n                <select className=\"form__input\" id=\"country\" value={customerDetails.country}\r\n                        onChange={(event) => onChange('customerDetails', 'country', event.target.value)}>\r\n                    <option value='' disabled>{translate('checkout.customerinfo.country.placeholder')}</option>\r\n                    {constants.countries && constants.countries.map(({text, value,}) =>\r\n                        <option value={value} key={`country-${value}`}>{text}</option>\r\n                    )}\r\n                </select>\r\n            </div>\r\n        );\r\n    }\r\n}\r\n\r\nexport default CheckoutSelect;","import React from 'react';\r\nimport CheckoutInput from \"./CheckoutInput\";\r\nimport CheckoutSelect from \"./CheckoutSelect\";\r\n\r\nconst CheckoutPrivateCustomerInfo = (props) => {\r\n    return (\r\n        <div className=\"row checkout-info__container\">\r\n            <div className=\"small-12 medium-6 columns\">\r\n                <div className=\"row-inner\">\r\n                    <CheckoutInput {...props} cssClass=\"small-6 columns\" stateKey=\"customerDetails\" id=\"firstName\"\r\n                                   autoComplete=\"billing given-name\"></CheckoutInput>\r\n                    <CheckoutInput {...props} cssClass=\"small-6 columns\" stateKey=\"customerDetails\" id=\"lastName\"\r\n                                   autoComplete=\"billing family-name\"></CheckoutInput>\r\n                    <CheckoutInput {...props} cssClass=\"small-12 columns\" stateKey=\"customerDetails\" id=\"address\"\r\n                                   autoComplete=\"billing street-address\"></CheckoutInput>\r\n                    <CheckoutInput {...props} cssClass=\"small-6 columns\" stateKey=\"customerDetails\" id=\"zipCode\"\r\n                                   autoComplete=\"billing postal-code\"></CheckoutInput>\r\n                    <CheckoutInput {...props} cssClass=\"small-6 columns\" stateKey=\"customerDetails\" id=\"city\"\r\n                                   autoComplete=\"billing address-level2\"></CheckoutInput>\r\n                    <CheckoutSelect {...props}></CheckoutSelect>\r\n                    <CheckoutInput {...props} cssClass=\"small-12 columns\" stateKey=\"customerDetails\" id=\"phoneNumber\"\r\n                                   autoComplete=\"billing tel\"></CheckoutInput>\r\n                </div>\r\n            </div>\r\n            {/*<div className=\"small-12 medium-6 columns\">*/}\r\n            {/*    <div className=\"row-inner\">*/}\r\n            {/*        {input('small-6 columns', 'alternativeAddress', 'firstName', 'shipping given-name')}*/}\r\n            {/*        {input('small-6 columns', 'alternativeAddress', 'lastName', 'shipping family-name')}*/}\r\n            {/*        {input('small-12 columns', 'alternativeAddress', 'careOf')}*/}\r\n            {/*        {input('small-12 columns', 'alternativeAddress', 'address', 'shipping street-address')}*/}\r\n            {/*        {input('small-6 columns', 'alternativeAddress', 'zipCode', 'shipping postal-code')}*/}\r\n            {/*        {input('small-6 columns', 'alternativeAddress', 'city', 'shipping address-level2')}*/}\r\n            {/*        <div className=\"small-12 columns\">*/}\r\n            {/*            <label className=\"form__label\" htmlFor=\"country2\">{translate('checkout.customerinfo.country')}</label>*/}\r\n            {/*            <select className=\"form__input\" id=\"country2\" value={alternativeAddress.country || ''}*/}\r\n            {/*                onChange={(event) => onChange('alternativeAddress', 'country', event.target.value)}>*/}\r\n            {/*                <option value='' disabled>{translate('checkout.customerinfo.country.placeholder')}</option>*/}\r\n            {/*                {constants.countries && constants.countries.map(({text, value}) =>*/}\r\n            {/*                    <option value={value} key={`country2-${value}`}>{text}</option>*/}\r\n            {/*                )}*/}\r\n            {/*            </select>*/}\r\n            {/*        </div>*/}\r\n            {/*        {input('small-12 columns', 'alternativeAddress', 'phoneNumber', 'shipping tel')}*/}\r\n            {/*    </div>*/}\r\n            {/*</div>*/}\r\n            <div className=\"small-12 columns\">\r\n                <div className=\"row-inner\">\r\n                    <CheckoutInput {...props} cssClass=\"small-6 columns\" stateKey=\"customerDetails\" id=\"email\"\r\n                                   autoComplete=\"email\"></CheckoutInput>\r\n                </div>\r\n            </div>\r\n            {/*{!authenticated && (<div className=\"small-12 columns\">*/}\r\n            {/*    <div className=\"row-inner\">*/}\r\n            {/*        <div className=\"small-12 columns\">*/}\r\n            {/*            <input className=\"checkout-info__checkbox-input\" type=\"checkbox\" id=\"signupandlogin\" */}\r\n            {/*                checked={signUp}*/}\r\n            {/*                onChange={(event) => onSignUpChange(event.target.checked)}/>*/}\r\n            {/*            <label className=\"checkout-info__checkbox-label\" htmlFor=\"signupandlogin\">*/}\r\n            {/*                {translate('checkout.customerinfo.signupandlogin')}*/}\r\n            {/*            </label>*/}\r\n            {/*        </div>*/}\r\n            {/*    </div>*/}\r\n            {/*</div>)}*/}\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default CheckoutPrivateCustomerInfo;","import React, { useState } from 'react';\r\nimport { translate } from '../Services/translation';\r\nimport constants from '../constants';\r\nimport CheckoutContainer from '../Containers/Checkout.container';\r\nimport LoginForm from './LoginForm';\r\n\r\nconst CheckoutBusinessCustomerInfo = (props) => {\r\n    const [hideLogin, setHideLogin] = useState(false);\r\n\r\n    const handleButtonClick = () => {\r\n        setHideLogin(true);\r\n        doCreditSafeLookup(customerDetails.registrationNumber);\r\n    }\r\n\r\n    const { customerDetails = {}, companyAddresses = [], companyName, authenticated, selectedCreditSafeCompanyAddressId, selectedCompanyAddressId, onChange, setSelectedCompanyAddress, setSelectedDeliveryCreditSafeCompanyAddress, setSelectedBillingCreditSafeCompanyAddress, errors = {}, doCreditSafeLookup, externalLink, contactPageLink, forgottenPasswordLink} = props;\r\n    const input = (cssClass, stateKey, id, autoComplete = null, placeholder = null, type = 'text', disabled = false) => {\r\n        const uniqueId = `${stateKey}-${id}`;\r\n        const fieldValue = (props[stateKey] || {})[id] || ''; // Get field value from props\r\n    \r\n        return (\r\n            <div className={cssClass}>\r\n                <label className=\"form__label\" htmlFor={uniqueId}>{translate(`checkout.customerinfo.${id.toLowerCase()}`)}&#8203;</label>\r\n                <input className=\"form__input\" id={uniqueId} name={uniqueId} type={type}\r\n                    value={fieldValue} placeholder={placeholder} autoComplete={autoComplete} disabled={disabled}\r\n                    onChange={(event) => onChange(stateKey, id, event.target.value)} />\r\n                {errors[uniqueId] && // Access error using uniqueId\r\n                    <span className=\"form__validator--error form__validator--top-narrow\" data-error-for={uniqueId}>{errors[uniqueId][0]}</span>\r\n                }\r\n            </div>\r\n        );\r\n    };\r\n    \r\n\r\n    const selectedAddress = selectedCompanyAddressId && companyAddresses ? companyAddresses.find(address => address.systemId === selectedCompanyAddressId) : null;\r\n\r\n    const getCountry = (address) => {\r\n        const addressCountry = constants.countries ? constants.countries.find(country => country.value === address.country) : null;\r\n        return addressCountry ? addressCountry.text : address.country;\r\n    };\r\n\r\n    const classOfCustomerinfo = !props.authenticated ? 'small-12 medium-6 columns customer-info' : 'small-12 medium-6 columns combined first';\r\n\r\n    return (\r\n        <div className=\"row checkout-info__container forms\">\r\n            <div className={classOfCustomerinfo}>\r\n                {!props.authenticated &&\r\n                    <div className=\"row-inner\">\r\n                        <div className=\"small-12 columns\">{translate('checkout.customerinfo.reference')}</div>\r\n                    </div>\r\n                }\r\n                <div className=\"row-inner\">\r\n                    {input('small-6 columns', 'customerDetails', 'firstName')}\r\n                    {input('small-6 columns', 'customerDetails', 'lastName')}\r\n                </div>\r\n                <div className=\"row-inner\">\r\n                    {input('small-12 columns', 'customerDetails', 'email')}\r\n                </div>\r\n\r\n                {!props.authenticated &&\r\n                    <div className=\"row-inner\">\r\n                        <div className=\"small-12 columns\">{translate('checkout.customerinfo.company')}</div>\r\n                    </div>\r\n                }\r\n\r\n                {!props.authenticated &&\r\n                    <div className=\"row-inner\">\r\n                        {input('small-6 columns', 'customerDetails', 'registrationNumber')}\r\n                        <div className='small-6 columns'>\r\n                            <button type=\"submit\" className=\"credit-lookup-button green-button checkout__submit-button\" onClick={handleButtonClick}>{translate('checkout.creditsafe.dolookup')}</button>\r\n                        </div>\r\n                    </div>\r\n                }\r\n                {!props.authenticated &&\r\n                    <div className=\"row-inner\">\r\n                        {input('small-12 columns', 'customerDetails', 'companyName', null, null, 'text', true)}\r\n                    </div>\r\n                }\r\n                \r\n                {!props.authenticated &&\r\n                    <div className=\"row-inner\">\r\n                        {input('small-12 columns', 'customerDetails', 'billingEmail')} \r\n                    </div>\r\n                }\r\n\r\n                <div className=\"row-inner\">\r\n                    {input('small-12 columns', 'customerDetails', 'phoneNumber')}\r\n                </div>\r\n                <div className=\"row-inner\">\r\n                    {input('small-6 columns', 'customerDetails', 'customerOrderNumber', 'billing customerOrderNumber')}\r\n                    {input('small-6 columns', 'customerDetails', 'goodsLabel', 'billing goods-label')}\r\n\r\n\r\n\r\n                </div>\r\n            </div>\r\n\r\n            {props.creditSafeAddresses && <div className=\"small-12 medium-6 columns\">\r\n                <div className=\"row-inner\">\r\n                    <div className=\"small-12 columns\">{translate('checkout.customerinfo.address')}</div>\r\n                    <div className=\"small-12 columns\">\r\n                        <label className=\"form__label\" htmlFor=\"address\">&#8203;</label>\r\n                        <select className=\"form__input\" \r\n                            onChange={(event) => setSelectedDeliveryCreditSafeCompanyAddress(event.target.value)}\r\n                        >\r\n                            <option value=''>{translate('checkout.customerinfo.companyaddress.placeholder')}</option>\r\n                            {props.creditSafeAddresses.map((address, index) =>\r\n                                <option value={JSON.stringify(address)} key={`companyAddress-${index}`}>{`${address.address1}, ${address.zip}, ${address.city}, ${getCountry(address)}`}</option>\r\n                            )}\r\n                        </select>\r\n                        {errors[`customerDetails-selectedDeliveryAddressId`] &&\r\n                            <span className=\"form__validator--error form__validator--top-narrow\" data-error-for='customerDetails-selectedDeliveryAddressId'>{errors[`customerDetails-selectedDeliveryAddressId`][0]}</span>}\r\n                    </div>\r\n                </div>\r\n                <div className=\"row-inner\">\r\n                    <div className=\"small-12 columns\">{translate('checkout.customerinfo.billing')}</div>\r\n                    <div className=\"small-12 columns\">\r\n                        <label className=\"form__label\" htmlFor=\"address\">&#8203;</label>\r\n                        <select className=\"form__input\" \r\n                            onChange={(event) => setSelectedBillingCreditSafeCompanyAddress(event.target.value)}\r\n                        >\r\n                            <option value=''>{translate('checkout.customerinfo.companyaddress.placeholder')}</option>\r\n                            {props.creditSafeAddresses.map((address, index) =>\r\n                                <option value={JSON.stringify(address)} key={`companyAddress-${index}`}>{`${address.address1}, ${address.zip}, ${address.city}, ${getCountry(address)}`}</option>\r\n                            )}\r\n                        </select>\r\n                        {errors[`customerDetails-selectedBillingAddressId`] &&\r\n                            <span className=\"form__validator--error form__validator--top-narrow\" data-error-for='selectedBillingAddressId'>{errors['customerDetails-selectedBillingAddressId'][0]}</span>}\r\n                    </div>\r\n                </div>\r\n            </div>}\r\n\r\n            {authenticated ? (\r\n                <div className=\"small-12 medium-6 columns combined second\">\r\n                    <div className=\"row-inner\">\r\n                        <div className=\"small-12 columns\">{translate('checkout.customerinfo.address')}</div>\r\n                        <div className=\"small-12 columns\">\r\n                            <label className=\"form__label\" htmlFor=\"address\">&#8203;</label>\r\n                            <select className=\"form__input\" value={selectedCompanyAddressId || ''} disabled={!authenticated}\r\n                                onChange={(event) => setSelectedCompanyAddress(event.target.value)}>\r\n                                <option value='' disabled>{translate('checkout.customerinfo.companyaddress.placeholder')}</option>\r\n                                {companyAddresses && companyAddresses.map((address) =>\r\n                                    <option value={address.systemId} key={`companyAddress-${address.systemId}`}>{`${address.address}, ${address.address2}, ${address.zipCode}, ${address.city}`}</option>\r\n                                )}\r\n                            </select>\r\n                            {errors[`customerDetails-selectedCompanyAddressId`] &&\r\n                                <span className=\"form__validator--error form__validator--top-narrow\" data-error-for='customerDetails-selectedCompanyAddressId'>{errors[`customerDetails-selectedCompanyAddressId`][0]}</span>\r\n                            }\r\n                        </div>\r\n                    </div>\r\n                    {selectedAddress &&\r\n                        <div className=\"row-inner\">\r\n                            <div className=\"small-12 columns\">{selectedAddress.address}</div>\r\n                            <div className=\"small-12 columns\">{selectedAddress.address2}</div>\r\n                            <div className=\"small-12 columns\">\r\n                                <span>{selectedAddress.zipCode}</span>&nbsp;\r\n                            <span>{selectedAddress.city}</span>\r\n                            </div>\r\n                        </div>\r\n                    }\r\n                </div>\r\n            ) : ( !authenticated && \r\n                    <div className=\"small-12 medium-6 columns login\">\r\n                    <div className={`checkout-info__login ${hideLogin ? 'hide-login' : ''}`}>\r\n                            <div className='row top'> \r\n                                <div className='login__side__title'>\r\n                                    {translate('login.loginbuttontext')}\r\n                                </div>\r\n                                <div className=\"checkout-info login__external-link\">\r\n                                    <a href={props.externalLink} target='_blank'> \r\n                                        {translate('login.externallink')}\r\n                                        <span className='login__icon'>\r\n                                            <img src='../../../ui/images/icons/white/pacson-signin.svg' alt='Login icon'></img>\r\n                                        </span>\r\n                                    </a>\r\n                                </div>\r\n                            </div>\r\n                            <div className=\"checkout-info__login-container\">\r\n                                <LoginForm></LoginForm>\r\n                                <div className=\"login__new-password__mobile\">\r\n                                    <a className='login__new-password__text' href={props.forgottenPasswordLink}>\r\n                                        {translate('login.clicktogotoforgotpasswordpage')}\r\n                                    </a>\r\n                                </div>\r\n                                <div className='checkout-info__login__text' dangerouslySetInnerHTML={{__html: props.newCustomerInformation}}></div>\r\n                                <div className=\"login__external-link\"> \r\n                                    <a href={props.contactPageLink} target='_blank'>\r\n                                        {translate('checkout.contactpacson')}\r\n                                    </a>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                )}\r\n\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default CheckoutBusinessCustomerInfo;","import React from 'react';\r\n\r\nconst CheckoutDeliveryMethods = ({ deliveryMethods, selectedId, onChange }) => (\r\n    <section className=\"row checkout-info__container\">\r\n        <div className=\"columns small-12\">\r\n            { deliveryMethods && deliveryMethods.map(method => (\r\n                <label className=\"row no-margin\" key={method.id}>\r\n                    <input type=\"radio\" name=\"deliveryMethods\" className=\"checkout-info__checkbox-radio\"\r\n                        value={method.id} checked={method.id === selectedId} onChange={() => onChange(method.id)} />\r\n                    <span className=\"columns\">\r\n                        <b> {method.name} </b> <br/> {method.description}\r\n                    </span>\r\n                </label>\r\n            ))}\r\n        </div>\r\n    </section>\r\n)\r\n\r\nexport default CheckoutDeliveryMethods;","import React, { Fragment } from 'react';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutPaymentMethods = ({ paymentMethods, selectedId, onChange }) => {\r\n    return (\r\n        <section className=\"row checkout-info__container\">\r\n            <div className=\"columns small-12\">\r\n                {paymentMethods && paymentMethods.map(method => (\r\n                    <Fragment key={method.id} >\r\n                        {method.disabled && <span className=\"row no-margin form__validator--error\">{translate('checkout.payment.credithold')}</span>}\r\n                        <label className=\"row no-margin\" key={method.id}>\r\n                            <input disabled={method.disabled} type=\"radio\" name=\"paymentMethods\" className=\"checkout-info__checkbox-radio\"\r\n                                value={method.id} checked={method.id === selectedId} onChange={() => onChange(method.id)} />\r\n                            <span className=\"columns\">\r\n                                <b> {method.name} </b> <br /> {method.description}\r\n                            </span>\r\n                        </label>\r\n                    </Fragment>\r\n                ))}\r\n            </div>\r\n        </section>\r\n    )\r\n}\r\n\r\nexport default CheckoutPaymentMethods;","import React, { Fragment } from 'react';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutOrderNote = ({ orderNote, onChange }) => (\r\n    <Fragment>\r\n        <div className=\"row\">\r\n            <h3 className=\"checkout__section-title\">{translate('checkout.order.message')}</h3>\r\n        </div>\r\n        <section className=\"row checkout-info__container\">\r\n            <div className=\"columns small-12 medium-6 \">\r\n                <textarea className=\"form__input checkout-info__messages\" value={orderNote} onChange={(event) => onChange(event.target.value)}></textarea>\r\n            </div>\r\n        </section>\r\n    </Fragment>\r\n)\r\n\r\nexport default CheckoutOrderNote;\r\n\r\n\r\n","import React from 'react';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutOrderInfo = ({ cart }) => {\r\n    return (\r\n        <div className=\"columns small-12 medium-6 checkout-info__summary--full-row\">\r\n            <div>{translate('checkout.order.total')} <span className=\"checkout-info__summary--expand\"></span> {cart.orderTotal}</div>\r\n            {cart.discount != \"0,00 kr\" && <div>{translate('checkout.order.discount')} <span className=\"checkout-info__summary--expand\"></span> - {cart.discount}</div>}\r\n            <div>{translate('checkout.order.deliverycost')} <span className=\"checkout-info__summary--expand\"></span> {cart.deliveryCost}</div>\r\n            {/* <div>{translate('checkout.order.paymentcost')} <span className=\"checkout-info__summary--expand\"></span> {cart.paymentCost}</div> */}\r\n    \r\n            {cart.fees && cart.fees.map(method => (\r\n                <div key={method.id}>\r\n                    {method.description} \r\n                    <span className=\"checkout-info__summary--expand\"></span> {method.formattedPrice}\r\n                </div> \r\n            ))}\r\n    \r\n            \r\n            <h3>{translate('checkout.order.grandTotal')} <span className=\"checkout-info__summary--expand\"></span> {cart.grandTotal}</h3>\r\n            <div>{translate('checkout.order.vat')} <span className=\"checkout-info__summary--expand\"></span> {cart.vat}</div>\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default CheckoutOrderInfo;","import React, { Fragment } from 'react';\r\nimport { translate } from '../Services/translation';\r\n\r\nconst CheckoutCampaignCode = ({ onCampaignCodeChange, onSubmitCampaignCode, errors, campaignCodeIsActive }) => {\r\n\r\n    if (!campaignCodeIsActive) return null;\r\n\r\n    return (<section className=\"row add-cart-to-wishlist\">\r\n        <div className=\"columns small-12\">\r\n            <h3>{translate('checkout.campaigncode')}</h3>\r\n        </div>\r\n        <div className=\"columns small-6 medium-3\">\r\n            <input className=\"form__input\" id=\"campaign-code\" placeholder={translate('checkout.campaigncode')}\r\n                onChange={(event) => onCampaignCodeChange(event.target.value)} />\r\n            {errors && errors['campaignCode'] &&\r\n                <span className=\"form__validator--error form__validator--top-narrow\" data-error-for=\"campaign-code\">{errors['campaignCode'][0]}</span>\r\n            }\r\n        </div>\r\n        <div className=\"columns small-6 medium-3\">\r\n            <button className=\"button show-button product__buy-button\" style={{ marginTop: 0 }} onClick={() => onSubmitCampaignCode()}>\r\n                {translate('checkout.usecampaigncode')}\r\n            </button>\r\n        </div>\r\n\r\n    </section>)\r\n}\r\n\r\nexport default CheckoutCampaignCode;","import React, { PureComponent } from 'react';\r\nimport DynamicComponent from '../DynamicComponent';\r\nconst scriptPattern = /<script\\b[^>]*>([\\s\\S]*?)<\\/script>/gi;\r\n\r\nclass PaymentWidget extends PureComponent {\r\n    render() {\r\n        const { id, responseString } = this.props;\r\n        if (id === 'KlarnaCheckout' || id === \"KLARNA_CHECKOUT\") {\r\n            return this.renderKlarna(responseString);\r\n        }\r\n        return <span />;\r\n    }\r\n\r\n    renderKlarna(paymentSession) {\r\n        const KlarnaCheckout = DynamicComponent({\r\n            loader: () => import('./KlarnaCheckout')\r\n        });\r\n        const args = { paymentSession, extractScripts: this.extractScripts, executeScript: this.executeScript };\r\n        return (\r\n            <KlarnaCheckout { ...args } />\r\n        );\r\n    }\r\n\r\n    extractScripts(domString) {\r\n        var matches, html = domString;\r\n        const scripts = [];\r\n        while ((matches = scriptPattern.exec(domString)) !== null) {\r\n            html = html.replace(matches[0], '');\r\n            scripts.push(matches[1]);\r\n        }\r\n        return {\r\n            html,\r\n            scripts,\r\n        };\r\n    }\r\n\r\n    executeScript(domId, scriptContent) {\r\n        const script = document.createElement(\"script\");\r\n        script.type = \"text/javascript\";\r\n        try {\r\n            script.appendChild(document.createTextNode(scriptContent));      \r\n        } catch(e) {\r\n            // to support IE\r\n            script.text = scriptContent;\r\n        }\r\n        document.getElementById(domId).appendChild(script);\r\n    }\r\n}\r\n\r\nexport default PaymentWidget;","import React from 'react';\r\nimport { Field, reduxForm } from 'redux-form'\r\nimport { translate } from \"../Services/translation\";\r\n\r\nconst renderField = ({\r\n    input,\r\n    label,\r\n    type,\r\n    className,\r\n    meta: { touched, error, warning } }) => (\r\n        <div>\r\n            <input className={className} {...input} placeholder={label} type={type} />\r\n            {touched &&\r\n                ((error && <span>{error}</span>) ||\r\n                    (warning && <span>{warning}</span>))}\r\n        </div>\r\n\r\n    )\r\n\r\n\r\nlet AddCampaignCodeForm = ({ handleSubmit, errorMessage }) => {\r\n    return (\r\n        <form onSubmit={handleSubmit} className=\"row add-cart-to-wishlist\">\r\n            <div className=\"columns small-12\">\r\n                <h3>{translate('checkout.addCampaignCodeForm.header')}</h3>\r\n            </div>\r\n            <div className=\"columns small-6 medium-3\">\r\n                <Field name=\"campaignCode\" component={renderField} type=\"text\" label={translate('checkout.addCampaignCodeForm.form.name')} className=\"form__input\" />\r\n            </div>\r\n            <div className=\"columns small-6 medium-3\">\r\n                <a id=\"add_cart_to_wishlist\" className=\"button show-button product__buy-button\" onClick={handleSubmit} style={{ marginTop: 0 }}>{translate('checkout.addCampaignCodeForm.button.text')}</a>\r\n            </div>\r\n            {errorMessage && <div className=\"columns small-12\">\r\n                <p className=\"checkout__validator--error\">{errorMessage}</p>\r\n            </div>}\r\n\r\n        </form>\r\n    )\r\n}\r\n\r\nAddCampaignCodeForm = reduxForm({\r\n    form: 'addCampaignCodeForm',\r\n    validate: (values) => {\r\n        const errors = {}\r\n\r\n        if (!values.name || (!values.name || 0 === values.name.length) || (!values.name || /^\\s*$/.test(values.name))) {\r\n            errors.name = translate('wishlist.addCartToWishList.name.error.message');\r\n        }\r\n\r\n        return errors\r\n    }\r\n})(AddCampaignCodeForm)\r\n\r\nexport default AddCampaignCodeForm;\r\n\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\nimport CartToWishListContainer from './CartToWishList.container'\r\n\r\nimport Cart from '../Components/Cart';\r\nimport CheckoutPrivateCustomerInfo from '../Components/Checkout.PrivateCustomerInfo';\r\nimport CheckoutBusinessCustomerInfo from '../Components/Checkout.BusinessCustomerInfo';\r\nimport CheckoutDeliveryMethods from '../Components/Checkout.DeliveryMethods';\r\nimport CheckoutPaymentMethods from '../Components/Checkout.PaymentMethods';\r\nimport CheckoutOrderNote from '../Components/Checkout.OrderNote';\r\nimport CheckoutOrderInfo from '../Components/Checkout.OrderInfo';\r\nimport CheckoutCampaignCode from '../Components/Checkout.CampaignCode';\r\nimport PaymentWidget from '../Components/Payments/PaymentWidget';\r\n\r\nimport constants from '../constants';\r\n\r\nimport {\r\n  acceptTermsOfCondition,\r\n  setBusinessCustomer,\r\n  setCampaignCode,\r\n  setDelivery,\r\n  setPayment,\r\n  setOrderNote,\r\n  submit,\r\n  verify,\r\n  setCustomerDetails,\r\n  setAlternativeAddress,\r\n  setBillingAddress,\r\n  setDeliveryAddress,\r\n  setSignUp,\r\n  setSelectedCompanyAddress,\r\n  setSelectedDeliveryCreditSafeCompanyAddress,\r\n  setSelectedBillingCreditSafeCompanyAddress,\r\n  submitError,\r\n  reloadPayment,\r\n  submitCampaignCode,\r\n  submitRequest,\r\n  submitDone,\r\n  submitCompanyAddress,\r\n  submitCreditSafeCompanyAddress,\r\n  submitPunchout,\r\n  fetchCompanyAddress,\r\n  reloadDeliveryMethods,\r\n  reloadPaymentMethods\r\n} from '../Actions/Checkout.action';\r\nimport { update as updateOrderRowQuantity, toggleIncludeVat, clear as clearCart } from '../Actions/Cart.action';\r\n\r\nimport { translate } from '../Services/translation';\r\nimport { string, object, boolean, mixed, date } from 'yup';\r\nimport AddCampaignCodeForm from '../Components/AddCampaignCodeForm';\r\nimport {\r\n  setChosenDeliveryMethod,\r\n  setChosenPaymentMethod,\r\n  setCompanyDeliveryAddress,\r\n  setCustomerDetails as setSnapshotCustomerDetails,\r\n  clear as clearSnapshot,\r\n  setOrderNote as setSnapshotOrderNote\r\n} from \"../Actions/CheckoutSnapshot.action\";\r\n\r\nconst userCompanySchema = object().shape({\r\n  email: string().required(translate(`validation.required`)).email(translate(`validation.email`)),\r\n  firstName: string().required(translate(`validation.required`)),\r\n  phoneNumber: string().required(translate(`validation.required`)),\r\n  registrationNumber: string().required(translate(`validation.required`)),\r\n  companyName: string().required(translate(`validation.required`)),\r\n  acceptTermsOfCondition: boolean().required(translate(`validation.checkrequired`)).oneOf([true], translate(`validation.checkrequired`)),\r\n  selectedBillingAddressId: string().required(translate(`validation.required`)).notOneOf([''], translate('validation.required')),\r\n  selectedDeliveryAddressId: string().required(translate(`validation.required`)).notOneOf([''], translate('validation.required')),\r\n});\r\n\r\nconst userPrivateSchema = object().shape({\r\n  email: string().required(translate(`validation.required`)).email(translate(`validation.email`)),\r\n  firstName: string().required(translate(`validation.required`)),\r\n  lastName: string().required(translate(`validation.required`)),\r\n  address: string().required(translate(`validation.required`)),\r\n  zipCode: string().required(translate(`validation.required`)),\r\n  city: string().required(translate(`validation.required`)),\r\n  phoneNumber: string().required(translate(`validation.required`)),\r\n  acceptTermsOfCondition: boolean().required(translate(`validation.checkrequired`)).oneOf([true], translate(`validation.checkrequired`)),\r\n});\r\n\r\nconst addressSchema = object().shape({\r\n  country: mixed().required(translate(`validation.required`)).notOneOf([''], translate('validation.required')),\r\n  city: string().required(translate(`validation.required`)),\r\n  zipCode: string().required(translate(`validation.required`)),\r\n  address: string().required(translate(`validation.required`)),\r\n});\r\n\r\nconst businessCustomerDetailsSchema = object().shape({\r\n  acceptTermsOfCondition: boolean().required(translate(`validation.checkrequired`)).oneOf([true], translate(`validation.checkrequired`)),\r\n  selectedDeliveryMethod: string().required(translate(`validation.required`)),\r\n  email: string().required(translate(`validation.required`)).email(translate(`validation.email`)),\r\n  phoneNumber: string().required(translate(`validation.required`)),\r\n  firstName: string().required(translate(`validation.required`)),\r\n  selectedCompanyAddressId: string().required(translate(`validation.required`)),\r\n});\r\n\r\nclass CheckoutContainer extends Component {\r\n\r\n  constructor(props) {\r\n    super(props);\r\n\r\n    this.onError = this.onError.bind(this);\r\n    this.state = {\r\n      currentcheckoutstatus: 0\r\n    }\r\n  }\r\n\r\n  componentDidMount() {\r\n    if (!this.props || !this.props.checkout) {\r\n      return;\r\n    }\r\n\r\n    this.setCustomerType();\r\n\r\n    // set selected value for payment method on load.\r\n    let { selectedPaymentMethod } = this.props.checkout.payload;\r\n    if (this.props.checkoutSnapshot.chosenPaymentMethod) {\r\n      selectedPaymentMethod = this.props.checkoutSnapshot.chosenPaymentMethod;\r\n    }\r\n    selectedPaymentMethod && this.props.setPayment(selectedPaymentMethod);\r\n\r\n    // set selected value for delivery method on load.\r\n    let { selectedDeliveryMethod } = this.props.checkout.payload;\r\n    if (this.props.checkoutSnapshot.chosenDeliveryMethod) {\r\n      selectedDeliveryMethod = this.props.checkoutSnapshot.chosenDeliveryMethod;\r\n    }\r\n    selectedDeliveryMethod && this.props.setDelivery(selectedDeliveryMethod);\r\n\r\n    // fill default select value to the state\r\n    const { customerDetails, alternativeAddress, deliveryAddress, billingAddress } = this.props.checkout.payload;\r\n    (!customerDetails || !customerDetails.country) && constants.countries && constants.countries[0] && this.props.onCustomerDetailsChange('customerDetails', 'country', constants.countries[0].value);\r\n    (!alternativeAddress || !alternativeAddress.country) && constants.countries && constants.countries[0] && this.props.onCustomerDetailsChange('alternativeAddress', 'country', constants.countries[0].value);\r\n    (!deliveryAddress || !deliveryAddress.country) && constants.countries && constants.countries[0] && this.props.onCustomerDetailsChange('deliveryAddress', 'country', constants.countries[0].value);\r\n    (!billingAddress || !billingAddress.country) && constants.countries && constants.countries[0] && this.props.onCustomerDetailsChange('billingAddress', 'country', constants.countries[0].value);\r\n\r\n  }\r\n\r\n  checkstatus() {\r\n    let sessionTime = window.sessionStorage.getItem('lastOrderTime');\r\n    if (sessionTime != null) {\r\n      let difference = (new Date().getTime() - new Date(sessionTime).getTime()) / 1000;\r\n      if (difference <= 30) {\r\n        this.setState({ currentcheckoutstatus: 1 });\r\n      }\r\n    }\r\n  }\r\n  clearTime() {\r\n\r\n    if (this.props.checkout.payload.modelError == true) {\r\n      window.sessionStorage.removeItem('lastOrderTime');\r\n      this.setState({ currentcheckoutstatus: 0 });\r\n    }\r\n  }\r\n  componentDidUpdate(prevProps, prevState) {\r\n\r\n\r\n    if (this.props.checkout.result && this.props.checkout.result.redirectUrl) {\r\n      window.location = this.props.checkout.result.redirectUrl;\r\n      return;\r\n    }\r\n\r\n    // console.log(\"P\"+ prevProps.checkout.payload.modelError);\r\n    // console.log(\"C\"+this.props.checkout.payload.modelError);\r\n\r\n    // if(prevProps.checkout.payload.modelError==this.props.checkout.payload.modelError)\r\n    //     {\r\n    //         if(this.props.checkout.payload.modelError)\r\n    //         {\r\n    //             window.sessionStorage.removeItem('lastOrderTime');\r\n    //             this.setState({ currentcheckoutstatus: 0 });\r\n    //             return;\r\n    //         }\r\n\r\n    //     }  \r\n\r\n    if (prevState.currentcheckoutstatus == 0) {\r\n      this.checkstatus();\r\n    }\r\n    // if (this.props.checkout.result==null && this.props.checkout.isSubmitting==false) {            \r\n    //     return;\r\n    // }\r\n    const { checkout } = this.props;\r\n    if (!checkout.isSubmitting || !checkout.errors) {\r\n      return;\r\n    }\r\n\r\n    const errorKeys = Object.keys(checkout.errors);\r\n    if (!errorKeys || errorKeys.length < 1) {\r\n      return;\r\n    }\r\n\r\n    const errorNode = document.querySelector(`[data-error-for=\"${errorKeys[0]}\"]`);\r\n    if (!errorNode) {\r\n      return;\r\n    }\r\n\r\n    const inputNode = errorNode.parentElement.querySelector('input');\r\n    if (inputNode) {\r\n      setTimeout(() => inputNode.focus(), 1000);\r\n      inputNode.scrollIntoView({ behavior: 'smooth' });\r\n    } else {\r\n      errorNode.scrollIntoView({ behavior: 'smooth' });\r\n    }\r\n  }\r\n\r\n  onError(error, addressPath = 'customerDetails') {\r\n\r\n    const notCustomerDetailFields = ['selectedPaymentMethod', 'selectedDeliveryMethod', 'acceptTermsOfCondition'];\r\n\r\n    if (error.inner.length == 0) {\r\n      error.path = notCustomerDetailFields.indexOf(error.path) >= 0 ? error.path : `${addressPath}-${error.path}`;\r\n      error.inner.push(error)\r\n    } else {\r\n      error.inner.map(x => {\r\n        x.path = notCustomerDetailFields.indexOf(x.path) >= 0 ? x.path : `${addressPath}-${x.params.path}`;\r\n      });\r\n    }\r\n    this.props.submitError(error.inner)\r\n  };\r\n\r\n  placeOrder() {\r\n    const { payload } = this.props.checkout,\r\n      { authenticated, isBusinessCustomer, selectedCompanyAddressId, acceptTermsOfCondition,\r\n        selectedPaymentMethod, selectedDeliveryMethod } = this.props.checkout.payload;\r\n\r\n    this.props.submitRequest();\r\n\r\n\r\n    if (isBusinessCustomer) {\r\n\r\n      businessCustomerDetailsSchema.validate({\r\n        ...payload.customerDetails,\r\n        selectedCompanyAddressId,\r\n        selectedPaymentMethod,\r\n        selectedDeliveryMethod,\r\n        acceptTermsOfCondition\r\n      }, { abortEarly: false })\r\n        .then(() => {\r\n          if (payload.selectedPaymentMethod == 'DirectPay:Invoice') {\r\n            window.sessionStorage.setItem('lastOrderTime', Date().toLocaleString());\r\n            this.props.submit();\r\n            this.setState({ currentcheckoutstatus: 1 });\r\n\r\n          }\r\n          else {\r\n            this.props.submit();\r\n          }\r\n        })\r\n        .catch(this.onError)\r\n      {\r\n\r\n      };\r\n\r\n\r\n    }\r\n    else if (this.props.cart.includeVat) {\r\n      userPrivateSchema.validate({\r\n        ...payload.customerDetails,\r\n        acceptTermsOfCondition\r\n      }, { abortEarly: false }).then(() => {\r\n        if (payload.selectedPaymentMethod == 'DirectPay:Invoice') {\r\n          window.sessionStorage.setItem('lastOrderTime', Date().toLocaleString());\r\n          this.props.submit();\r\n          this.setState({ currentcheckoutstatus: 1 });\r\n\r\n        }\r\n        else {\r\n          this.props.submit();\r\n        }\r\n      }).catch(this.onError)\r\n      {\r\n\r\n      };\r\n    }\r\n    else {\r\n      userCompanySchema.validate({\r\n        ...payload.customerDetails,\r\n        acceptTermsOfCondition\r\n      }, { abortEarly: false }).then(() => {\r\n        if (payload.selectedPaymentMethod == 'DirectPay:Invoice') {\r\n          window.sessionStorage.setItem('lastOrderTime', Date().toLocaleString());\r\n          this.props.submit();\r\n          this.setState({ currentcheckoutstatus: 1 });\r\n\r\n        }\r\n        else {\r\n          this.props.submit();\r\n        }\r\n      }).catch(this.onError)\r\n      {\r\n\r\n      };\r\n    }\r\n  }\r\n\r\n  clearCart() {\r\n    this.props.clearCart();\r\n  }\r\n\r\n  setCustomerType() {\r\n    this.props.toggleVat(this.props.cart.includeVat);\r\n  }\r\n\r\n  setCustomerPrivate() {\r\n    if (!this.props.cart.includeVat) {\r\n      this.props.toggleVat(true);\r\n    }\r\n  }\r\n\r\n  setCustomerCompany() {\r\n    if (this.props.cart.includeVat) {\r\n      this.props.toggleVat(false);\r\n    }\r\n  }\r\n\r\n  renderCartSection() {\r\n    const { checkout, cart } = this.props,\r\n      { errors = {} } = checkout;\r\n    return (\r\n      <Fragment>\r\n\r\n        {cart.freeDelivery && !cart.punchoutData &&\r\n          <div className=\"row\">\r\n            <div className=\"small-12 callout primary freedelivery-text\">\r\n              {cart.freeDelivery}\r\n            </div>\r\n          </div>\r\n        }\r\n\r\n        <div className=\"row\">\r\n          <div className=\"small-12\">\r\n            <h2 className=\"checkout__title\">{translate('checkout.title')}</h2>\r\n          </div>\r\n        </div>\r\n        <div className=\"row checkout__section-title\">\r\n          <div className=\"small-6 medium-10 large-10\">\r\n            <h3>{translate('checkout.cart.title')}</h3>\r\n          </div>\r\n          <div className=\"small-6 medium-2 large-2\">\r\n            <button type=\"button\" className=\"button show-button product__buy-button\" onClick={() => this.clearCart()}>{translate('checkout.cart.clear')}</button>\r\n          </div>\r\n        </div>\r\n        <div className=\"row\">\r\n          {errors && errors['cart'] && <p className=\"checkout__validator--error\">{errors['cart'][0]}</p>}\r\n        </div>\r\n        <Cart {...{\r\n          ...this.props.cart,\r\n          allowOrderRowComment: checkout.payload.allowOrderRowComment,\r\n          updateOrderRowQuantity: this.props.updateOrderRowQuantity,\r\n          removeOrderRow: this.props.removeOrderRow,\r\n        }} />\r\n        \r\n        {!cart.isLoggedIn &&\r\n          <div className=\"row checkout-info__container\">\r\n            <div className=\"columns small-12\">\r\n              <div className=\"row\">\r\n                <div className=\"columns shrink display-inline-block\">\r\n                  <h3 className=\"checkout__section-title no-margin display-inline-block\">{translate(\"checkout.buyingas\")}</h3>\r\n                </div>\r\n                <div className=\"columns shrink display-inline-block\">\r\n                  <input type=\"radio\"\r\n                    id=\"includeVatCompany\"\r\n                    name=\"includeVat\"\r\n                    onClick={() => this.setCustomerCompany()}\r\n                    defaultChecked={!cart.includeVat} />\r\n                  <label style={{ \"marginLeft\": \"15px\", \"cursor\": \"pointer\" }} htmlFor=\"includeVatCompany\"><b>{translate(\"checkout.company\")}</b></label>\r\n                </div>\r\n                <div className=\"columns shrink display-inline-block\">\r\n                  <input type=\"radio\"\r\n                    id=\"includeVatPrivate\"\r\n                    name=\"includeVat\"\r\n                    onClick={() => this.setCustomerPrivate()}\r\n                    defaultChecked={cart.includeVat} />\r\n                  <label style={{ \"marginLeft\": \"15px\", \"cursor\": \"pointer\" }} htmlFor=\"includeVatPrivate\"><b>{translate(\"checkout.private\")}</b></label>\r\n                </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        }\r\n      </Fragment>\r\n    );\r\n  }\r\n\r\n  renderCustomerDetailsSection() {\r\n    const { checkout, onCustomerDetailsChange, onSignUpChange, setSelectedCompanyAddress, setSelectedDeliveryCreditSafeCompanyAddress, setSelectedBillingCreditSafeCompanyAddress, doCreditSafeLookup, checkoutSnapshot } = this.props,\r\n      { payload, errors = {} } = checkout,\r\n      { companyName, authenticated, customerDetails, alternativeAddress, companyAddresses, selectedCompanyAddressId,\r\n        isBusinessCustomer, signUp, checkoutMode, billingAddress, deliveryAddress, externalLink, contactPageLink, forgottenPasswordLink } = payload;\r\n\r\n    // Update customer details from localStorage snapshot\r\n    Object.keys(checkoutSnapshot.customerDetails).forEach(key => {\r\n      if(checkoutSnapshot.customerDetails[key] && customerDetails[key] !== checkoutSnapshot.customerDetails[key])\r\n      {\r\n        onCustomerDetailsChange('customerDetails', key, checkoutSnapshot.customerDetails[key]);\r\n      }\r\n    });\r\n\r\n    const privateCustomerInfoComponent = <CheckoutPrivateCustomerInfo {...{ customerDetails, alternativeAddress, authenticated, onChange: onCustomerDetailsChange, signUp, onSignUpChange, errors }} />;\r\n    const businessCustomerInfoComponent = <CheckoutBusinessCustomerInfo {...{ creditSafeAddresses: checkout.creditSafeAddresses, customerDetails, doCreditSafeLookup, companyAddresses, companyName, billingAddress, deliveryAddress, authenticated, selectedCompanyAddressId: this.props.checkoutSnapshot.selectedCompanyAddressId || selectedCompanyAddressId, setSelectedDeliveryCreditSafeCompanyAddress, setSelectedBillingCreditSafeCompanyAddress, onChange: onCustomerDetailsChange, setSelectedCompanyAddress, errors, newCustomerInformation: payload.newCustomerInformation,  externalLink, contactPageLink, forgottenPasswordLink, }} />;\r\n\r\n    if (!authenticated) {\r\n      return (\r\n        <Fragment>\r\n          <div className=\"row\">\r\n            <h3 className=\"checkout__section-title\">{translate('checkout.customerinfo.title')}</h3>\r\n            {!this.props.cart.includeVat &&\r\n              <Fragment>\r\n                {!isBusinessCustomer && checkoutMode === constants.checkoutMode.both && <a onClick={() => this.props.setBusinessCustomer(true)} className=\"checkout__link\">{translate('checkout.customerinfo.businesscustomer')}</a>}\r\n              </Fragment>\r\n            }\r\n            {isBusinessCustomer && checkoutMode === constants.checkoutMode.both && <a onClick={() => this.props.setBusinessCustomer(false)} className=\"checkout__link\">{translate('checkout.customerinfo.privatecustomer')}</a>}\r\n          </div>\r\n          {((!isBusinessCustomer && checkoutMode !== constants.checkoutMode.companyCustomers) || this.props.cart.includeVat) && privateCustomerInfoComponent}\r\n          {((isBusinessCustomer || checkoutMode === constants.checkoutMode.companyCustomers) && !this.props.cart.includeVat) && businessCustomerInfoComponent}\r\n        </Fragment>\r\n      );\r\n    }\r\n    if (isBusinessCustomer) {\r\n      return (\r\n        <Fragment>\r\n          <div className=\"row\">\r\n            <h3 className=\"checkout__section-title\">{translate('checkout.customerinfo.title')}</h3>\r\n          </div>\r\n          {authenticated && businessCustomerInfoComponent}\r\n        </Fragment>\r\n      );\r\n    }\r\n\r\n    return (\r\n      <Fragment>\r\n        <div className=\"row\">\r\n          <h3 className=\"checkout__section-title\">{translate('checkout.customerinfo.title')}</h3>\r\n        </div>\r\n        {privateCustomerInfoComponent}\r\n      </Fragment>\r\n    );\r\n  }\r\n\r\n  renderDeliveryMethodsSection() {\r\n    const { checkout, checkoutSnapshot } = this.props,\r\n      { payload, errors = {} } = checkout,\r\n      { deliveryMethods } = payload;\r\n\r\n    return (\r\n      <Fragment>\r\n        <div className=\"row\">\r\n          <h3 className=\"checkout__section-title\">{translate('checkout.delivery.title')}</h3>\r\n        </div>\r\n        <CheckoutDeliveryMethods deliveryMethods={deliveryMethods} selectedId={checkoutSnapshot.chosenDeliveryMethod || payload.selectedDeliveryMethod} onChange={this.props.setDelivery} />\r\n        {errors['selectedDeliveryMethod'] &&\r\n          <span className=\"form__validator--error form__validator--top-narrow\">{errors['selectedDeliveryMethod'][0]}</span>\r\n        }\r\n      </Fragment>\r\n    );\r\n  }\r\n\r\n  renderPaymentMethodsSection() {\r\n    const { checkout, checkoutSnapshot } = this.props,\r\n      { payload, errors = {} } = checkout,\r\n      { paymentMethods } = payload;\r\n      // console.log('payment methods', paymentMethods);\r\n      // console.log('checkout', checkout);\r\n    return (\r\n      <Fragment>\r\n        <div className=\"row\">\r\n          <h3 className=\"checkout__section-title\">{translate('checkout.payment.title')}</h3>\r\n        </div>\r\n\r\n        <CheckoutPaymentMethods paymentMethods={paymentMethods}\r\n          selectedId={checkoutSnapshot.chosenPaymentMethod || payload.selectedPaymentMethod}\r\n          onChange={this.props.setPayment}\r\n          credithold={payload.creditHold} />\r\n        {errors['selectedPaymentMethod'] &&\r\n          <span className=\"form__validator--error form__validator--top-narrow\">{errors['selectedPaymentMethod'][0]}</span>\r\n        }\r\n      </Fragment>\r\n    );\r\n  }\r\n\r\n  renderCurrentStatus(status) {\r\n    this.clearTime();\r\n    if (status == 1) {\r\n      return (<Fragment>\r\n\r\n        <div className=\"orderloading\">\r\n          <div className=\"orderloading__content\">\r\n            <h2>{this.props.checkout.payload.loadingTitle}</h2>\r\n            <div className=\"loadingio-spinner-bars-kfo7zd0661k\"><div class=\"ldio-xg2anifw9bi\">\r\n              <div></div><div></div><div></div><div></div>\r\n            </div></div>\r\n            <div className=\"orderloading__info\">\r\n              <div dangerouslySetInnerHTML={{ __html: this.props.checkout.payload.loadingTextEditor }}></div>\r\n            </div>\r\n\r\n          </div>\r\n        </div>\r\n\r\n      </Fragment>)\r\n    }\r\n    else {\r\n      return null;\r\n    }\r\n\r\n  }\r\n  render() {\r\n    const { cart } = this.props;\r\n\r\n    if (!cart || !cart.orderRows || cart.orderRows.length < 1) {\r\n      return (\r\n        <div className=\"row\">\r\n          <div className=\"small-12\">\r\n            <h2 className=\"checkout__title\">{translate(`checkout.cart.empty`)}</h2>\r\n          </div>\r\n        </div>\r\n      );\r\n    }\r\n\r\n    const { checkout, setOrderNote, checkoutSnapshot } = this.props,\r\n      { payload, errors = {} } = checkout,\r\n      { orderNote, paymentWidget, paymentMethods, authenticated, isBusinessCustomer, checkoutMode, allowOrderComment, canCreateOrganizationFavoriteList } = payload;\r\n\r\n    var hasErrors = errors && Object.keys(errors).length > 0 && !errors[\"campaignCode\"];\r\n\r\n    if (!cart.punchoutData) {\r\n      if (this.state.currentcheckoutstatus == 0) {\r\n        return (\r\n          <Fragment>\r\n\r\n            {errors.paymentError && <div id=\"paymentError\">{errors.paymentError[0]}</div>}\r\n\r\n            {(!paymentWidget || paymentWidget.isChangeable) && this.renderCartSection()}\r\n\r\n            {authenticated && <CartToWishListContainer  canCreateOrganizationFavoriteList = {canCreateOrganizationFavoriteList}/>}\r\n\r\n            {/* <AddCampaignCodeForm onSubmit={(props) => {\r\n                            this.props.setCampaignCode(props.campaignCode);\r\n                            this.props.submitCampaignCode();\r\n                        }} errorMessage={campaignCodeError} /> */}\r\n\r\n            {!paymentWidget && this.renderCustomerDetailsSection()}\r\n\r\n            {allowOrderComment && !this.props.cart.includeVat && <CheckoutOrderNote onChange={setOrderNote} orderNote={checkoutSnapshot.orderNote || orderNote} />}\r\n\r\n            {this.renderDeliveryMethodsSection()}\r\n            {(paymentMethods && (paymentMethods.length > 1 || cart.includeVat) && (!paymentWidget || paymentWidget.isChangeable)) && this.renderPaymentMethodsSection()}\r\n            <PaymentWidget {...paymentWidget} verify={this.props.verify} />\r\n\r\n            <CheckoutCampaignCode errors={errors}\r\n                onCampaignCodeChange={this.props.setCampaignCode}\r\n                onSubmitCampaignCode={this.props.submitCampaignCode}\r\n                campaignCodeIsActive={checkout.payload.campaignCodeIsActive} />\r\n\r\n            {!paymentWidget && (\r\n              <Fragment>\r\n                <div className=\"row\">\r\n                  <h3 className=\"checkout__section-title\">{translate('checkout.order.title')}</h3>\r\n                </div>\r\n\r\n                <section className=\"row checkout-info__container checkout-info__summary\">\r\n                  <CheckoutOrderInfo cart={cart} />\r\n\r\n                  <div className=\"small-12 columns\">\r\n                    <input className=\"checkout-info__checkbox-input\" type=\"checkbox\" id=\"acceptTermsOfCondition\" checked={payload.acceptTermsOfCondition} onChange={(event) => this.props.acceptTermsOfCondition(event.target.checked)} />\r\n                    <label className=\"checkout-info__checkbox-label\" htmlFor=\"acceptTermsOfCondition\">\r\n                      {translate('checkout.terms.acceptTermsOfCondition')} <a className=\"checkout__link\" href={payload.termsUrl} target=\"_blank\">{translate('checkout.terms.link')}</a>\r\n                    </label>\r\n                    {errors['acceptTermsOfCondition'] &&\r\n                      <span className=\"form__validator--error form__validator--top-narrow\" data-error-for=\"acceptTermsOfCondition\">{errors['acceptTermsOfCondition'][0]}</span>\r\n                    }\r\n                  </div>\r\n\r\n                  {hasErrors && <div className=\"columns small-12\">\r\n                    <p className=\"checkout__validator--error   text-center\">\r\n                      {translate('checkout.general.errormessage')}\r\n                    </p>\r\n                  </div>}\r\n\r\n                  <div className=\"columns small-12\">\r\n                    <button type=\"submit\" className=\"green-button checkout__submit-button\" disabled={payload.isSubmitting} onClick={() => this.placeOrder()} >{translate('checkout.placeorder')}</button>\r\n                  </div>\r\n                </section>\r\n\r\n              </Fragment>\r\n            )}\r\n\r\n\r\n            <div className=\"row\">\r\n              {errors && errors['general'] && <p className=\"checkout__validator--error\">{errors['general'][0]}</p>}\r\n            </div>\r\n          </Fragment>\r\n        );\r\n      }\r\n      else {\r\n        { return this.renderCurrentStatus(this.state.currentcheckoutstatus) }\r\n      }\r\n\r\n    } else {\r\n      if (this.state.currentcheckoutstatus == 0) {\r\n        return (\r\n          <Fragment>\r\n            {this.renderCartSection()}\r\n\r\n            <Fragment>\r\n              <div className=\"row\">\r\n                {hasErrors && <div className=\"columns small-12\">\r\n                  <p className=\"checkout__validator--error    text-center\">\r\n                    {translate('checkout.general.errormessage')}\r\n                  </p>\r\n                </div>}\r\n                <button type=\"submit\" className=\"checkout__submit-button\" disabled={payload.isSubmitting} onClick={() => this.props.submitPunchout()} >{translate('checkout.placeorder')}</button>\r\n              </div>\r\n            </Fragment>\r\n\r\n            <div className=\"row\">\r\n              {errors && errors['general'] && <p className=\"checkout__validator--error\">{errors['general'][0]}</p>}\r\n            </div>\r\n          </Fragment>\r\n        );\r\n      }\r\n      else {\r\n        { return this.renderCurrentStatus(this.state.currentcheckoutstatus) }\r\n      }\r\n\r\n\r\n    }\r\n\r\n  }\r\n}\r\n\r\nconst mapStateToProps = state => {\r\n  const { cart, checkout, checkoutSnapshot } = state;\r\n  var errors = checkout.errors;\r\n  return {\r\n    cart,\r\n    checkout,\r\n    checkoutSnapshot\r\n  }\r\n}\r\n\r\nconst mapDispatchToProps = (dispatch, ownProps) => {\r\n  return {\r\n    submit: () => {\r\n      dispatch(submit());\r\n      dispatch(clearSnapshot());\r\n    },\r\n    setBusinessCustomer: (value) => dispatch(setBusinessCustomer(value)),\r\n    setCampaignCode: (code) => {\r\n      return dispatch(setCampaignCode(code));\r\n    },\r\n    setDelivery: (systemId) => {\r\n      dispatch(setDelivery(systemId));\r\n      dispatch(setChosenDeliveryMethod(systemId));\r\n    },\r\n    setPayment: (systemId) => {\r\n      dispatch(setPayment(systemId));\r\n      dispatch(setChosenPaymentMethod(systemId));\r\n    },\r\n    setOrderNote: (note) => {\r\n      dispatch(setOrderNote(note));\r\n      dispatch(setSnapshotOrderNote(note));\r\n    },\r\n    acceptTermsOfCondition: (accept) => dispatch(acceptTermsOfCondition(accept)),\r\n    verify: (url, orderId, payload) => dispatch(verify(url, orderId, payload)),\r\n    onSignUpChange: (signUp) => dispatch(setSignUp(signUp)),\r\n    submitCampaignCode: () => dispatch(submitCampaignCode()),\r\n    submitRequest: () => dispatch(submitRequest()),\r\n    submitError: (error) => {\r\n      dispatch(submitError(error));\r\n      dispatch(submitDone(null));\r\n    },\r\n    setSelectedCompanyAddress: (companyId) => {\r\n      dispatch(setSelectedCompanyAddress(companyId))\r\n      dispatch(submitCompanyAddress())\r\n      dispatch(setCompanyDeliveryAddress(companyId));\r\n    },\r\n    setSelectedDeliveryCreditSafeCompanyAddress: (address) => {\r\n      dispatch(setSelectedDeliveryCreditSafeCompanyAddress(address))\r\n    },\r\n    setSelectedBillingCreditSafeCompanyAddress: (address) => {\r\n      dispatch(setSelectedBillingCreditSafeCompanyAddress(address))\r\n    },\r\n\r\n    onCustomerDetailsChange: (stateKey, propName, value) => {\r\n\r\n      switch (stateKey) {\r\n        case 'customerDetails':\r\n          dispatch(setCustomerDetails(propName, value));\r\n          dispatch(setSnapshotCustomerDetails(propName, value));\r\n          break;\r\n        case 'alternativeAddress':\r\n          dispatch(setAlternativeAddress(propName, value));\r\n          break;\r\n        case 'billingAddress':\r\n          dispatch(setBillingAddress(propName, value));\r\n          break;\r\n        case 'deliveryAddress':\r\n          dispatch(setDeliveryAddress(propName, value));\r\n          break;\r\n      }\r\n    },\r\n\r\n    updateOrderRowQuantity: (rowId, quantity, message) => dispatch(updateOrderRowQuantity(rowId, quantity, message)).then(() => dispatch(reloadPayment())),\r\n    removeOrderRow: (rowId) => dispatch(updateOrderRowQuantity(rowId, 0)).then(() => dispatch(reloadPayment())),\r\n    submitPunchout: () => dispatch(submitPunchout()),\r\n    doCreditSafeLookup: (orgNumber) => {\r\n      dispatch(fetchCompanyAddress(orgNumber))\r\n    },\r\n    toggleVat: (includeVat) => dispatch(toggleIncludeVat(includeVat)).then(() => dispatch(reloadPaymentMethods())),\r\n    clearCart: () => dispatch(clearCart())\r\n  }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(CheckoutContainer);"],"sourceRoot":""}