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,WACLgF,EAAE,uCAAuCC,YAAY,YACvD,GACC,CACDxE,IAAK,SACLT,MAAO,WACL,OAAoB,gBAAoB,MAAO,CAC7CyC,UAAW,iCACG,gBAAoB,KAAM,CACxCA,UAAW,oBACV,cAA4B,gBAAoB,MAAO,CACxDA,UAAW,mBACG,gBAAoB,MAAO,CACzCA,UAAW,iBACG,gBAAoB,IAAQ,CAC1CiB,KAAMd,KAAKY,MAAME,KACjBwB,QAAS,KACTC,YAAa,KACbC,gBAAiB,KACjBC,sBAAsB,GACrBzC,KAAKY,MAAMC,iBAA+B,gBAAoB,MAAO,CACtEhB,UAAW,oBACG,gBAAoB,IAAK,CACvCA,UAAW,cACV,uBAAqC,gBAAoB,IAAK,CAC/DA,UAAW,YACV,kCAAgD,gBAAoB,MAAO,CAC5EA,UAAW,yBACG,gBAAoB,IAAK,CACvCA,UAAW,SACX6C,KAAM,sEACL,uBACL,IAEJ,CA/F0C,CA+FxC,cACF,IAAI/C,GAA4BgD,K","sources":["webpack://oticon_us/./react/feature/wdh-mybusiness/src/js/wdh-warranties-expiring-spot.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { WDHComponent } from '../../../../../../../wdh-foundation/wdh';\nimport Loader from 'react-loader-advanced';\nimport { loaderBackgroundStyle, loaderOpacity, spinner } from './views/Spinner';\nimport ApiClient from '../../../../../../../wdh-feature/wdh-feature-b2b-us/src/js/infrastructure/api/api-client';\nimport SessionStorageManager from '../../../../../../../wdh-feature/wdh-feature-b2b-us/src/js/infrastructure/session-storage-manager';\nimport { EventTypes, SSMKeys } from '../../../../../../../wdh-feature/wdh-feature-b2b-us/src/js/infrastructure/const';\nimport ConfigurationManager from '../../../../../../../wdh-feature/wdh-feature-b2b-us/src/js/infrastructure/configuration-manager';\nvar EventBus = window.DGS.Event.getInstance();\n\n/**\n * @memberOf module:wdh-warranties-expiring-spot\n */\nvar WDHWarrantiesExpiringSpot = /*#__PURE__*/function (_WDHComponent) {\n /**\n * @param {String} className - The unique css selector that triggers the component\n * @constructor\n * @augments WDHComponent\n * @inheritDoc\n */\n function WDHWarrantiesExpiringSpot() {\n var className = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'warranties-expiring-spot';\n _classCallCheck(this, WDHWarrantiesExpiringSpot);\n return _callSuper(this, WDHWarrantiesExpiringSpot, [className]);\n }\n _inherits(WDHWarrantiesExpiringSpot, _WDHComponent);\n return _createClass(WDHWarrantiesExpiringSpot, [{\n key: \"init\",\n value: function init(component) {\n var _this = this;\n // Check that shop initialization has executed\n if (!ConfigurationManager.validateConfigurationLoaded(this.constructor.name)) {\n // if not, we can wait for the shop init event.\n EventBus.on(EventTypes.SHOP_INIT_READY, function () {\n if (!ConfigurationManager.validateConfigurationLoaded(_this.constructor.name)) {\n return;\n }\n ReactDOM.render(/*#__PURE__*/React.createElement(WarrantiesExpiringSpot, null), component.querySelector('.warranties-expiring-spot .component-content'));\n });\n return;\n }\n ReactDOM.render(/*#__PURE__*/React.createElement(WarrantiesExpiringSpot, null), component.querySelector('.warranties-expiring-spot .component-content'));\n }\n }]);\n}(WDHComponent);\nexport default WDHWarrantiesExpiringSpot;\nvar WarrantiesExpiringSpot = /*#__PURE__*/function (_React$Component) {\n function WarrantiesExpiringSpot(props) {\n var _this2;\n _classCallCheck(this, WarrantiesExpiringSpot);\n _this2 = _callSuper(this, WarrantiesExpiringSpot, [props]);\n _this2.state = {\n totalWeekCount: '',\n show: true\n };\n return _this2;\n }\n _inherits(WarrantiesExpiringSpot, _React$Component);\n return _createClass(WarrantiesExpiringSpot, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.overrideParentComponent();\n this.getTotalWeekCount();\n }\n\n /**\n * Gets the number of expiring warranties.\n */\n }, {\n key: \"getTotalWeekCount\",\n value: function getTotalWeekCount() {\n var _this3 = this;\n if (!SessionStorageManager.hasData(SSMKeys.WarrantyExpiringSoon)) {\n // get information from our API\n\n ApiClient.warranty.getExpiringSoon().then(function (response) {\n var tempData = {};\n if (response.status === 200) {\n tempData = _objectSpread({}, response.data);\n } else if (response.status === 204) {\n // no content assume count of 0\n tempData = {\n count: 0\n };\n }\n SessionStorageManager.setData(SSMKeys.WarrantyExpiringSoon, tempData, 'eod');\n _this3.setState({\n show: false,\n totalWeekCount: tempData.count\n });\n });\n } else {\n // valid data is available, load from cache.\n\n var response = SessionStorageManager.getData(SSMKeys.WarrantyExpiringSoon);\n this.setState({\n show: false,\n totalWeekCount: response.data.count\n });\n }\n }\n\n /**\n * removes rich-text class from component. used because an appropriate component wasn't available in Sitecore.\n */\n }, {\n key: \"overrideParentComponent\",\n value: function overrideParentComponent() {\n $('.rich-text.warranties-expiring-spot').removeClass('rich-text');\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"warranties-expiring-container\"\n }, /*#__PURE__*/React.createElement(\"h3\", {\n className: \"component-header\"\n }, \"Warranties\"), /*#__PURE__*/React.createElement(\"div\", {\n className: \"inner-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"expiring-week\"\n }, /*#__PURE__*/React.createElement(Loader, {\n show: this.state.show,\n message: spinner,\n contentBlur: loaderOpacity,\n backgroundStyle: loaderBackgroundStyle,\n disableDefaultStyles: true\n }, this.state.totalWeekCount)), /*#__PURE__*/React.createElement(\"div\", {\n className: \"expiring-details\"\n }, /*#__PURE__*/React.createElement(\"p\", {\n className: \"box-header\"\n }, \"Expiring warranties\"), /*#__PURE__*/React.createElement(\"p\", {\n className: \"box-text\"\n }, \"Warranties expiring this week\")), /*#__PURE__*/React.createElement(\"div\", {\n className: \"extend-warranties-btn\"\n }, /*#__PURE__*/React.createElement(\"a\", {\n className: \"button\",\n href: \"/myoticon/myaccount/warranties/warranty-report?tab=extend-warranty\"\n }, \"Extend warranties\"))));\n }\n }]);\n}(React.Component);\nnew WDHWarrantiesExpiringSpot().run();"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_defineProperty","_toPropertyKey","defineProperty","value","configurable","writable","_classCallCheck","a","n","TypeError","_defineProperties","length","key","_createClass","i","toPrimitive","call","String","Number","_toPrimitive","_callSuper","_getPrototypeOf","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","Boolean","valueOf","setPrototypeOf","getPrototypeOf","bind","__proto__","_inherits","create","_setPrototypeOf","EventBus","window","DGS","Event","getInstance","WDHWarrantiesExpiringSpot","_WDHComponent","className","arguments","undefined","this","component","_this","validateConfigurationLoaded","name","WarrantiesExpiringSpot","querySelector","on","SHOP_INIT_READY","_React$Component","props","_this2","state","totalWeekCount","show","overrideParentComponent","getTotalWeekCount","_this3","hasData","WarrantyExpiringSoon","response","getData","setState","data","count","A","warranty","getExpiringSoon","then","tempData","status","forEach","getOwnPropertyDescriptors","defineProperties","_objectSpread","setData","$","removeClass","message","contentBlur","backgroundStyle","disableDefaultStyles","href","run"],"sourceRoot":""}