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,GAC9BmD,oBAAqBL,EAAAA,GAAAA,oBAAmC9C,GACxDoD,oBAAqBN,EAAAA,GAAAA,oBAAmC9C,GACxDqD,kBAAmBP,EAAAA,GAAAA,kBAAiC9C,GACpDsD,qBAAsBR,EAAAA,GAAAA,qBAAoC9C,OAIvC,SAAUuD,GACjC,MAAO,CACHC,IAAKC,SAAAA,GAAWF,OAAAA,EAASG,EAAAA,GAAAA,UAAkBD,KAC3CE,OAAQC,SAAAA,GAAML,OAAAA,EAASG,EAAAA,GAAAA,aAAqBE,KAC5CC,YAAa,SAACD,EAAIE,GAAaP,OAAAA,EAASG,EAAAA,GAAAA,kBAA0B,CAAEE,GAAAA,EAAIE,SAAAA,MACxEC,gBAAiB,SAACH,EAAII,GAAYT,OAAAA,EAASG,EAAAA,GAAAA,sBAA8B,CAAEE,GAAAA,EAAII,QAAAA,MAC/EC,mBAAoB,SAACC,EAAUC,EAASC,GACpCb,OAAAA,EAASG,EAAAA,GAAAA,mBAA2B,CAAEQ,SAAAA,EAAUC,QAAAA,EAASC,OAAAA,MAC7DC,mBAAoB,WAAMd,OAAAA,EAASG,EAAAA,GAAAA,0BAIpCd,CAA6CV","sources":["webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Shared/Constants/breakpoints.js","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Shared/Icons/icon-plus-sign.tsx","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Shared/Icons/icon-minus-sign.tsx","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Shared/FormInputs/amount-input.js","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Shared/Icons/icon-logo-GU.js","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Shared/Icons/icon-logo-HR.js","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Shared/Icons/icon-logo-MG.js","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactComponents/Shared/Icons/icon-logo.js","webpack://gyldendal-uddannelse/./src/Foundation/Frontend/ReactReducers/Basket/basket-composer.js"],"sourcesContent":["export const Breakpoints = {\r\n ant: 0,\r\n cat: 640,\r\n dog: 768,\r\n lion: 920,\r\n horse: 1024,\r\n rhino: 1200,\r\n elephant: 1440,\r\n breakpointNavigation: 1240,\r\n breakpointHeader: 767\r\n};\r\n","import React from \"react\";\r\n\r\nconst IconPlusSign = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default IconPlusSign;\r\n","import React from \"react\";\r\n\r\nconst IconPlusSign = () => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default IconPlusSign;\r\n","import React, { Component } from \"react\";\r\nimport classNames from \"classnames\";\r\nimport IconPlusSign from \"ReactComponents/Shared/Icons/icon-plus-sign\";\r\nimport IconMinusSign from \"ReactComponents/Shared/Icons/icon-minus-sign\";\r\n\r\n/**\r\n * @param {function} onChange - function gets fake changeEvent as param. its just an object with the input element as \"target\" property\r\n * @param {number} value - amount (default 0)\r\n * @param {string} units - units to display (ex. items, cm, usd)\r\n * @param {string} name - name of inputfield\r\n * @param {Number} min - will be cast as int with parseInt()\r\n * @param {Number} max - will be cast as int with parseInt()\r\n * @param {boolean} disabled - if true, the input will be disabled\r\n */\r\n\r\nclass AmountInput extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n min: parseInt(this.props.min) || 0,\r\n max: parseInt(this.props.max) || 9999,\r\n value: this.props.initialValue || this.props.value || this.props.min || 0,\r\n disabled: this.props.disabled || false\r\n };\r\n\r\n this.handleChange = this.handleChange.bind(this);\r\n this.increment = this.increment.bind(this);\r\n this.decrement = this.decrement.bind(this);\r\n this.setValue = this.setValue.bind(this);\r\n this.minMaxContrict = this.minMaxContrict.bind(this);\r\n this.submitToProp = this.debounce(this.submitToProp.bind(this), 500);\r\n this.debounce = this.debounce.bind(this);\r\n }\r\n\r\n UNSAFE_componentWillReceiveProps(props) {\r\n if (props.value != this.state.value && !props.pending) {\r\n this.setState({\r\n value: this.minMaxContrict(props.value)\r\n });\r\n }\r\n }\r\n\r\n debounce(callback, wait, context = this) {\r\n let timeout;\r\n let callbackArgs;\r\n\r\n const later = () => callback.apply(context, callbackArgs);\r\n\r\n return function () {\r\n callbackArgs = arguments;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n };\r\n }\r\n\r\n handleChange(e) {\r\n this.setValue(e.target.value);\r\n }\r\n\r\n increment() {\r\n const val = parseInt(this.state.value) + 1;\r\n this.setValue(val);\r\n }\r\n\r\n decrement() {\r\n const val = parseInt(this.state.value) - 1;\r\n this.setValue(val);\r\n }\r\n\r\n minMaxContrict(v) {\r\n let val = v < this.state.min ? this.state.min : v;\r\n val = val > this.state.max ? this.state.max : val;\r\n return val;\r\n }\r\n\r\n setValue(v) {\r\n const val = this.minMaxContrict(v);\r\n\r\n if (val != this.state.value) {\r\n this.setState({\r\n value: val\r\n });\r\n\r\n this.submitToProp(val);\r\n }\r\n }\r\n\r\n submitToProp(val) {\r\n if (this.props.onChange) {\r\n this.input.value = val;\r\n\r\n this.props.onChange({\r\n target: this.input\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n const valueString = () => {\r\n const amount = this.state.value;\r\n const units = this.props.units;\r\n\r\n if (units) {\r\n return (\r\n \r\n {amount}\r\n {units}\r\n \r\n );\r\n } else {\r\n return {amount};\r\n }\r\n };\r\n const rootClasses = classNames({\r\n \"amount-input\": true,\r\n \"amount-input--fullWidth\": this.props.fullWidth,\r\n \"amount-input--disabled\": this.state.disabled\r\n });\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.props.pending && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default AmountInput;\r\n","import React, { Component } from \"react\";\r\n\r\nclass IconLogoGU extends Component {\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default IconLogoGU;\r\n","import React, { Component } from \"react\";\r\n\r\nclass IconLogoHR extends Component {\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default IconLogoHR;\r\n","import React, { Component } from \"react\";\r\n\r\nclass IconLogoMG extends Component {\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default IconLogoMG;\r\n","import React, { Component } from \"react\";\r\nimport IconLogoGU from \"ReactComponents/Shared/Icons/icon-logo-GU\";\r\nimport IconLogoHR from \"ReactComponents/Shared/Icons/icon-logo-HR\";\r\nimport IconLogoMG from \"ReactComponents/Shared/Icons/icon-logo-MG\";\r\n\r\nclass IconLogo extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n isMounted: false\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.setState({\r\n isMounted: true\r\n });\r\n }\r\n\r\n render() {\r\n if (this.state.isMounted && siteThemeName === \"gu\") return ;\r\n\r\n if (this.state.isMounted && siteThemeName === \"hansreitzel\") return ;\r\n\r\n if (this.state.isMounted && siteThemeName === \"munksgaard\") return ;\r\n\r\n return null;\r\n }\r\n}\r\n\r\nexport default IconLogo;\r\n","// @ts-check\r\nimport { connect } from \"react-redux\";\r\nimport { basketActions as actions, basketSelector } from \"./basket-reducer\";\r\n\r\nexport function basketComposer(Component) {\r\n const mapStateToProps = function (state) {\r\n return {\r\n isAdding: basketSelector.isAdding(state),\r\n isRemoving: basketSelector.isRemoving(state),\r\n isSettingQuatity: basketSelector.isSettingQuatity(state),\r\n isSettingClasses: basketSelector.isSettingClasses(state),\r\n basket: basketSelector.basket(state),\r\n discountCodePending: basketSelector.discountCodePending(state),\r\n discountCodeSuccess: basketSelector.discountCodeSuccess(state),\r\n discountCodeError: basketSelector.discountCodeError(state),\r\n discountCodeComplete: basketSelector.discountCodeComplete(state)\r\n };\r\n };\r\n\r\n const mapDispatchToProps = function (dispatch) {\r\n return {\r\n add: payload => dispatch(actions.basketAdd(payload)),\r\n remove: id => dispatch(actions.basketRemove(id)),\r\n setQuantity: (id, quantity) => dispatch(actions.basketSetQuantity({ id, quantity })),\r\n setClassesValue: (id, classes) => dispatch(actions.basketSetClassesValue({ id, classes })),\r\n discountCodeSubmit: (formInfo, resolve, reject) =>\r\n dispatch(actions.discountCodeSubmit({ formInfo, resolve, reject })),\r\n discountCodeRemove: () => dispatch(actions.discountCodeRemove())\r\n };\r\n };\r\n\r\n return connect(mapStateToProps, mapDispatchToProps)(Component);\r\n}\r\n"],"names":["Breakpoints","ant","cat","dog","lion","horse","rhino","elephant","breakpointNavigation","breakpointHeader","svg","width","height","viewBox","fill","xmlns","role","path","d","stroke","strokeWidth","strokeLinecap","AmountInput","state","max","disabled","increment","decrement","setValue","minMaxContrict","submitToProp","debounce","UNSAFE_componentWillReceiveProps","value","pending","setState","context","arguments","timeout","clearTimeout","handleChange","target","val","this","input","render","aria-label","type","className","onClick","IconMinusSign","ref","props","min","valueString","IconPlusSign","IconLogoGU","Component","IconLogoHR","rect","g","IconLogoMG","IconLogo","isMounted","componentDidMount","siteThemeName","basketComposer","connect","isAdding","basketSelector","isRemoving","isSettingQuatity","isSettingClasses","basket","discountCodePending","discountCodeSuccess","discountCodeError","discountCodeComplete","dispatch","add","payload","actions","remove","id","setQuantity","quantity","setClassesValue","classes","discountCodeSubmit","formInfo","resolve","reject","discountCodeRemove"],"sourceRoot":""}