@crystaldesign/web-planner-logic 25.10.0-beta.9 → 25.10.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/build/cjs/{DivaBoxPlanner-04bf6318.js → DivaBoxPlanner-ab72c374.js} +6 -5
  2. package/build/cjs/{DivaStandardPlanner-77476193.js → DivaStandardPlanner-a35a2184.js} +2 -2
  3. package/build/cjs/{DoorPlanner-f5c079a9.js → DoorPlanner-b3deb85e.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-57e23024.js → Host3DSignalR-062ed34e.js} +1 -1
  5. package/build/cjs/{LiviqueWWSHandler-47a27ec7.js → LiviqueWWSHandler-8e0bf61c.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-e44293f5.js → PfisterWWSHandler-036e9844.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-be01ece6.js → PlannerHandler2D-04a31da5.js} +1 -1
  8. package/build/cjs/{SeriousBasketHandler-6934e260.js → SeriousBasketHandler-26ca142e.js} +1 -1
  9. package/build/cjs/{ShelfPlanner-d409ac3e.js → ShelfPlanner-02c23e5a.js} +1 -1
  10. package/build/cjs/{StandardWWSHandler-5dd8d94a.js → StandardWWSHandler-0e718668.js} +1 -1
  11. package/build/cjs/{index-a366532b.js → index-b4cac17d.js} +1042 -1317
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-b09f2e76.js → DivaBoxPlanner-67c08b94.js} +6 -5
  14. package/build/esm/{DivaStandardPlanner-a186b727.js → DivaStandardPlanner-76627de9.js} +2 -2
  15. package/build/esm/{DoorPlanner-5bdbe66c.js → DoorPlanner-bb580288.js} +1 -1
  16. package/build/esm/{Host3DSignalR-b3bc2b02.js → Host3DSignalR-61f6fb99.js} +1 -1
  17. package/build/esm/{LiviqueWWSHandler-1a326919.js → LiviqueWWSHandler-962b5822.js} +1 -1
  18. package/build/esm/{PfisterWWSHandler-fd75b316.js → PfisterWWSHandler-bc7dd1da.js} +1 -1
  19. package/build/esm/{PlannerHandler2D-35519ef0.js → PlannerHandler2D-9fb1802d.js} +1 -1
  20. package/build/esm/{SeriousBasketHandler-def7e867.js → SeriousBasketHandler-0205a0d5.js} +1 -1
  21. package/build/esm/{ShelfPlanner-ffbf54ca.js → ShelfPlanner-467314ca.js} +1 -1
  22. package/build/esm/{StandardWWSHandler-91ba6b7c.js → StandardWWSHandler-5304778e.js} +1 -1
  23. package/build/esm/{index-949457fc.js → index-dabb6172.js} +1042 -1317
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +1 -1
  26. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/interface/ArticleOptionStateType.d.ts +6 -2
  28. package/build/types/web-planner-logic/src/interface/ArticleOptionStateType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +7 -2
  30. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +1 -1
  32. package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/ViewTypes/index.d.ts +1 -1
  34. package/build/types/web-planner-logic/src/interface/ViewTypes/index.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +12 -4
  36. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +5 -3
  38. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +1 -1
  40. package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts +0 -1
  42. package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
  44. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
  46. package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts +1 -1
  47. package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts +3 -1
  48. package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +6 -2
  51. package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
  52. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +6 -2
  53. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
  54. package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-prod.d.ts.map +1 -1
  56. package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-dev.d.ts.map +1 -1
  57. package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-prod-IDM.d.ts.map +1 -1
  58. package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-test.d.ts.map +1 -1
  59. package/package.json +2 -2
@@ -43,8 +43,8 @@ var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
43
43
  })();
44
44
 
45
45
  var _excluded = ["type"];
46
- function ownKeys$j(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; }
47
- function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
46
+ function ownKeys$l(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; }
47
+ function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
48
48
  var LOG$p = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
49
49
  var JsonDataCache = /*#__PURE__*/function () {
50
50
  function JsonDataCache() {
@@ -255,8 +255,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
255
255
  if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig2 = this.apiConfig) !== null && _this$apiConfig2 !== void 0 && _this$apiConfig2.api2.web) {
256
256
  api2Url = this.apiConfig.api2.web;
257
257
  }
258
- _context2.t0 = _objectSpread$j;
259
- _context2.t1 = _objectSpread$j({}, init.config.headers);
258
+ _context2.t0 = _objectSpread$l;
259
+ _context2.t1 = _objectSpread$l({}, init.config.headers);
260
260
  _context2.t2 = {};
261
261
  _context2.next = 21;
262
262
  return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
@@ -16498,9 +16498,6 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16498
16498
  }]);
16499
16499
  }();
16500
16500
 
16501
- function _createForOfIteratorHelper$b(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$b(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
16502
- function _unsupportedIterableToArray$b(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$b(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$b(r, a) : void 0; } }
16503
- function _arrayLikeToArray$b(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
16504
16501
  //kaufmännischer Artikel
16505
16502
  var CatalogArticleData = /*#__PURE__*/function () {
16506
16503
  function CatalogArticleData(catalogArticle) {
@@ -17213,25 +17210,14 @@ var CatalogArticleData = /*#__PURE__*/function () {
17213
17210
  value: function getOptionValueFromOption(opt, opv) {
17214
17211
  if (this._catalogArticle.articleOptions[opt] && this._catalogArticle.articleOptions[opt].hasOPG) {
17215
17212
  var myOPGs = this._catalogArticle.articleOptions[opt].articleOptionValues;
17216
- var _iterator = _createForOfIteratorHelper$b(myOPGs),
17217
- _step;
17218
- try {
17219
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
17220
- var _step$value = _slicedToArray__default["default"](_step.value, 2),
17221
- _key2 = _step$value[0],
17222
- value = _step$value[1];
17223
- var myOPVs = value.articleOptionValues;
17224
- if (myOPVs && myOPVs.get(opv)) {
17225
- return myOPVs.get(opv);
17226
- }
17213
+ for (var _key2 in myOPGs) {
17214
+ var myOPVs = myOPGs[_key2].articleOptionValues;
17215
+ if (myOPVs && myOPVs[opv]) {
17216
+ return myOPVs[opv];
17227
17217
  }
17228
- } catch (err) {
17229
- _iterator.e(err);
17230
- } finally {
17231
- _iterator.f();
17232
17218
  }
17233
17219
  } else {
17234
- return this._catalogArticle.articleOptions[opt].articleOptionValues.get(opv);
17220
+ return this._catalogArticle.articleOptions[opt].articleOptionValues[opv];
17235
17221
  }
17236
17222
  return null;
17237
17223
  }
@@ -17266,11 +17252,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
17266
17252
  key: "getOptionCodexFromOptionsValue",
17267
17253
  value: function getOptionCodexFromOptionsValue(opv) {
17268
17254
  if (this._catalogArticle.articleOptions) {
17269
- for (var _i = 0, _Object$entries = Object.entries(this._catalogArticle.articleOptions); _i < _Object$entries.length; _i++) {
17270
- var _Object$entries$_i = _slicedToArray__default["default"](_Object$entries[_i], 2),
17271
- _key3 = _Object$entries$_i[0],
17272
- value = _Object$entries$_i[1];
17273
- if (value.articleOptionValues.get(opv)) {
17255
+ for (var _key3 in this._catalogArticle.articleOptions) {
17256
+ if (this._catalogArticle.articleOptions[_key3].articleOptionValues[opv]) {
17274
17257
  return _key3;
17275
17258
  }
17276
17259
  }
@@ -18235,9 +18218,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
18235
18218
  }]);
18236
18219
  }();
18237
18220
 
18238
- function _createForOfIteratorHelper$a(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$a(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
18239
- function _unsupportedIterableToArray$a(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$a(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$a(r, a) : void 0; } }
18240
- function _arrayLikeToArray$a(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
18241
18221
  var ArticleOptionData = /*#__PURE__*/function () {
18242
18222
  function ArticleOptionData(opt) {
18243
18223
  var _this$tabGroup;
@@ -18256,6 +18236,24 @@ var ArticleOptionData = /*#__PURE__*/function () {
18256
18236
  key: "initOPVsInOPT",
18257
18237
  value: function initOPVsInOPT(articleOptionValues) {
18258
18238
  this.opt.articleOptionValues = articleOptionValues;
18239
+ for (var key in articleOptionValues) {
18240
+ if (this.opt.hasOPG) {
18241
+ var opg = articleOptionValues[key];
18242
+ for (var key2 in opg.articleOptionValues) {
18243
+ var opv = opg.articleOptionValues[key2];
18244
+ if (opv.image || opv.hexColor) {
18245
+ this.opt.hasImages = true;
18246
+ break;
18247
+ }
18248
+ }
18249
+ } else {
18250
+ var _opv = articleOptionValues[key];
18251
+ if (_opv.image || _opv.hexColor) {
18252
+ this.opt.hasImages = true;
18253
+ }
18254
+ }
18255
+ if (this.opt.hasImages) break;
18256
+ }
18259
18257
  }
18260
18258
  /**************************************************GETTER ************************************************** */
18261
18259
  }, {
@@ -18332,28 +18330,17 @@ var ArticleOptionData = /*#__PURE__*/function () {
18332
18330
  }, {
18333
18331
  key: "getOpvByOcd",
18334
18332
  value: function getOpvByOcd(codex) {
18335
- var _iterator = _createForOfIteratorHelper$a(this.opt.articleOptionValues),
18336
- _step;
18337
- try {
18338
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
18339
- var _step$value = _slicedToArray__default["default"](_step.value, 2),
18340
- key = _step$value[0],
18341
- value = _step$value[1];
18342
- var opv = value;
18343
- if (opv.ocd == codex) {
18344
- return opv;
18345
- }
18346
- if (opv.isOPVG) {
18347
- var _opv$articleOptionVal, _opv$articleOptionVal2;
18348
- return Array.from((_opv$articleOptionVal = (_opv$articleOptionVal2 = opv.articleOptionValues) === null || _opv$articleOptionVal2 === void 0 ? void 0 : _opv$articleOptionVal2.values()) !== null && _opv$articleOptionVal !== void 0 ? _opv$articleOptionVal : []).find(function (v) {
18349
- return v.ocd === codex;
18350
- });
18351
- }
18333
+ for (var key in this.opt.articleOptionValues) {
18334
+ var opv = this.opt.articleOptionValues[key];
18335
+ if (opv.ocd == codex) {
18336
+ return opv;
18337
+ }
18338
+ if (opv.isOPVG) {
18339
+ var _opv$articleOptionVal;
18340
+ return Object.values((_opv$articleOptionVal = opv.articleOptionValues) !== null && _opv$articleOptionVal !== void 0 ? _opv$articleOptionVal : {}).find(function (v) {
18341
+ return v.ocd === codex;
18342
+ });
18352
18343
  }
18353
- } catch (err) {
18354
- _iterator.e(err);
18355
- } finally {
18356
- _iterator.f();
18357
18344
  }
18358
18345
  return undefined;
18359
18346
  }
@@ -18365,13 +18352,7 @@ var ArticleOptionData = /*#__PURE__*/function () {
18365
18352
  }, {
18366
18353
  key: "hasImages",
18367
18354
  get: function get() {
18368
- var _this$opt$articleOpti, _this$opt$articleOpti2;
18369
- return ((_this$opt$articleOpti = (_this$opt$articleOpti2 = this.opt.articleOptionValues) === null || _this$opt$articleOpti2 === void 0 ? void 0 : _this$opt$articleOpti2.values()) !== null && _this$opt$articleOpti !== void 0 ? _this$opt$articleOpti : []).some(function (v) {
18370
- var _v$articleOptionValue;
18371
- return (_v$articleOptionValue = v.articleOptionValues) === null || _v$articleOptionValue === void 0 ? void 0 : _v$articleOptionValue.values().some(function (v2) {
18372
- return v2.image || v2.hexColor;
18373
- });
18374
- });
18355
+ return this.opt.hasImages;
18375
18356
  }
18376
18357
  }, {
18377
18358
  key: "parentOptionCodex",
@@ -18567,8 +18548,8 @@ function addSupplierColors(catalogArticleData, allOPVsOfOPT, supplierColors, cat
18567
18548
  var articleOPG = new ArticleOptionValueData(getArticleOptionValueType('OPVSUPPLIER_COLORS', {
18568
18549
  RUL: rule
18569
18550
  }, catalogOPG, catalogArticleData, false, newOPT, catalog.multiselectOptions));
18570
- allOPVsOfOPT.set('OPVSUPPLIER_COLORS', articleOPG);
18571
- var supplierColorsOpvs = new Map();
18551
+ allOPVsOfOPT['OPVSUPPLIER_COLORS'] = articleOPG;
18552
+ var supplierColorsOpvs = {};
18572
18553
  for (var i = 0; i < supplierColors.length; i++) {
18573
18554
  var col = supplierColors[i];
18574
18555
  var colorCatalogOpv = new OptionValueCatalogData(getCatalogOptionValueDataType('OPV' + col.OptionValueCodex, {
@@ -18577,7 +18558,7 @@ function addSupplierColors(catalogArticleData, allOPVsOfOPT, supplierColors, cat
18577
18558
  HexColor: col.HexColor,
18578
18559
  GroupName: 'Lieferantenfarben'
18579
18560
  }, catalog), catalog);
18580
- supplierColorsOpvs.set('OPV' + col.OptionValueCodex, new ArticleOptionValueData(getArticleOptionValueType('OPV' + col.OptionValueCodex, {}, colorCatalogOpv, catalogArticleData, true, articleOPG, catalog.multiselectOptions)));
18561
+ supplierColorsOpvs['OPV' + col.OptionValueCodex] = new ArticleOptionValueData(getArticleOptionValueType('OPV' + col.OptionValueCodex, {}, colorCatalogOpv, catalogArticleData, true, articleOPG, catalog.multiselectOptions));
18581
18562
  }
18582
18563
  articleOPG.initOPVsInOPG(supplierColorsOpvs);
18583
18564
  }
@@ -18657,7 +18638,7 @@ function _loadMoreFromDivaArticle() {
18657
18638
  jsonPrices = _yield$Promise$all2[0];
18658
18639
  jsonOption = _yield$Promise$all2[1];
18659
18640
  loadPrices(jsonPrices, catalogArticleData, catalog);
18660
- loadArticleOptions(jsonOption, catalogArticleData, set, set.onlyRunLogic);
18641
+ loadArticleOptions(jsonOption, catalogArticleData, set);
18661
18642
  case 31:
18662
18643
  catalogArticle.areOptionsLoaded = true;
18663
18644
  case 32:
@@ -18722,7 +18703,7 @@ function initArticleRelations(articleRelations, catalogArticleData, catalog) {
18722
18703
  }
18723
18704
  }
18724
18705
  }
18725
- function loadArticleOptions(json, catalogArticleData, set, onlyRunLogic) {
18706
+ function loadArticleOptions(json, catalogArticleData, set) {
18726
18707
  var catalogArticle = catalogArticleData.catalogArticle;
18727
18708
  var multiselectOptions = json.OPT.filter(function (o) {
18728
18709
  var _o$OCD;
@@ -18733,26 +18714,26 @@ function loadArticleOptions(json, catalogArticleData, set, onlyRunLogic) {
18733
18714
  if (json.OPT && json.OPT.length != 0) {
18734
18715
  for (var i = 0; i < json.OPT.length; i++) {
18735
18716
  var myOPT = json.OPT[i];
18736
- var allOPVsOfOPT = new Map();
18717
+ var allOPVsOfOPT = {};
18737
18718
  var newOPT = new ArticleOptionData(getArticleOptionType(myOPT, set));
18738
18719
 
18739
18720
  //Items initalisieren
18740
18721
  if (newOPT.hasOPG) {
18741
18722
  var _myOPT$OPV;
18742
18723
  for (var j = 0; j < myOPT.OPG.length; j++) {
18743
- var allOPVsOfOPG = new Map();
18724
+ var allOPVsOfOPG = {};
18744
18725
  var tmpOPG = myOPT.OPG[j],
18745
18726
  catOPG = set.CatalogData.getOptionValue(tmpOPG.OCD ? tmpOPG.OCD : tmpOPG.Codex);
18746
18727
  if (catOPG) {
18747
18728
  var newOPG = new ArticleOptionValueData(getArticleOptionValueType(tmpOPG.Codex, tmpOPG, catOPG, catalogArticleData, false, newOPT, multiselectOptions));
18748
- allOPVsOfOPT.set(tmpOPG.Codex, newOPG);
18729
+ allOPVsOfOPT[tmpOPG.Codex] = newOPG;
18749
18730
  for (var m = 0; m < tmpOPG.OPV.length; m++) {
18750
18731
  var tmpOPV = tmpOPG.OPV[m],
18751
18732
  catOPV = set.CatalogData.getOptionValue(tmpOPV.OCD ? tmpOPV.OCD : tmpOPV.Codex);
18752
18733
  if (catOPV) {
18753
18734
  if (!(catOPV !== null && catOPV !== void 0 && catOPV.groupName) && catOPG) catOPV.groupName = catOPG.name;
18754
18735
  var myOPV = new ArticleOptionValueData(getArticleOptionValueType(tmpOPV.Codex, tmpOPV, catOPV, catalogArticleData, true, newOPG, multiselectOptions));
18755
- allOPVsOfOPG.set(tmpOPV.Codex, myOPV);
18736
+ allOPVsOfOPG[tmpOPV.Codex] = myOPV;
18756
18737
  }
18757
18738
  }
18758
18739
  newOPG.initOPVsInOPG(allOPVsOfOPG);
@@ -18760,16 +18741,16 @@ function loadArticleOptions(json, catalogArticleData, set, onlyRunLogic) {
18760
18741
  }
18761
18742
  if ((_myOPT$OPV = myOPT.OPV) !== null && _myOPT$OPV !== void 0 && _myOPT$OPV.length) {
18762
18743
  for (var _j = 0; _j < myOPT.OPV.length; _j++) {
18763
- var _allOPVsOfOPG = new Map();
18744
+ var _allOPVsOfOPG = {};
18764
18745
  var _tmpOPG = myOPT.OPV[_j],
18765
18746
  _catOPG = set.CatalogData.getOptionValue(_tmpOPG.OCD ? _tmpOPG.OCD : _tmpOPG.Codex);
18766
18747
  if (_catOPG) {
18767
18748
  var _newOPG = new ArticleOptionValueData(getArticleOptionValueType(_tmpOPG.Codex, _tmpOPG, _catOPG, catalogArticleData, false, newOPT, multiselectOptions));
18768
- allOPVsOfOPT.set(_tmpOPG.Codex, _newOPG);
18749
+ allOPVsOfOPT[_tmpOPG.Codex] = _newOPG;
18769
18750
  var _catOPV = set.CatalogData.getOptionValue(_tmpOPG.OCD ? _tmpOPG.OCD : _tmpOPG.Codex);
18770
18751
  if (_catOPV) {
18771
18752
  var _myOPV = new ArticleOptionValueData(getArticleOptionValueType(_tmpOPG.Codex, _tmpOPG, _catOPV, catalogArticleData, true, _newOPG, multiselectOptions));
18772
- _allOPVsOfOPG.set(_tmpOPG.Codex, _myOPV);
18753
+ _allOPVsOfOPG[_tmpOPG.Codex] = _myOPV;
18773
18754
  }
18774
18755
  _newOPG.initOPVsInOPG(_allOPVsOfOPG);
18775
18756
  }
@@ -18781,12 +18762,12 @@ function loadArticleOptions(json, catalogArticleData, set, onlyRunLogic) {
18781
18762
  _catOPV2 = set.CatalogData.getOptionValue(_tmpOPV.OCD ? _tmpOPV.OCD : _tmpOPV.Codex);
18782
18763
  if (_catOPV2) {
18783
18764
  var _myOPV2 = new ArticleOptionValueData(getArticleOptionValueType(_tmpOPV.Codex, _tmpOPV, _catOPV2, catalogArticleData, true, newOPT, multiselectOptions));
18784
- allOPVsOfOPT.set(_tmpOPV.Codex, _myOPV2);
18765
+ allOPVsOfOPT[_tmpOPV.Codex] = _myOPV2;
18785
18766
  }
18786
18767
  }
18787
18768
  }
18788
18769
  if (set.supplierColors) {
18789
- var supplierColorFound = Array.from(allOPVsOfOPT.values()).find(function (item) {
18770
+ var supplierColorFound = Object.values(allOPVsOfOPT).find(function (item) {
18790
18771
  var _item$codex;
18791
18772
  return (_item$codex = item.codex) === null || _item$codex === void 0 ? void 0 : _item$codex.endsWith('OPV_FARBE_BASIS');
18792
18773
  });
@@ -18895,14 +18876,16 @@ function initDecisions(catalog, catalogArticleData) {
18895
18876
  }
18896
18877
  }
18897
18878
  function getArticleOptionType(myOPT, set) {
18879
+ var _set$CatalogData$cata, _set$CatalogData$cata2, _set$CatalogData$cata3, _optionMask$hidden;
18898
18880
  var OP = myOPT.OCD ? myOPT.OCD : myOPT.Codex;
18899
18881
  var catOPT = set.CatalogData.getOption(OP);
18882
+ var optionMask = (_set$CatalogData$cata = (_set$CatalogData$cata2 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata2 === void 0 || (_set$CatalogData$cata2 = _set$CatalogData$cata2.options) === null || _set$CatalogData$cata2 === void 0 ? void 0 : _set$CatalogData$cata2[OP]) !== null && _set$CatalogData$cata !== void 0 ? _set$CatalogData$cata : OP.startsWith('OPT') ? (_set$CatalogData$cata3 = set.CatalogData.catalogMask) === null || _set$CatalogData$cata3 === void 0 || (_set$CatalogData$cata3 = _set$CatalogData$cata3.options) === null || _set$CatalogData$cata3 === void 0 ? void 0 : _set$CatalogData$cata3[OP.substring(3)] : undefined;
18900
18883
  if (!catOPT) throw new Error('Option: ' + OP + ' not in CatalogData');
18901
18884
  var optHasOpg = myOPT.OPG && myOPT.OPG.length > 0;
18902
18885
  return {
18903
18886
  codex: myOPT.Codex,
18904
18887
  catalogOPT: catOPT,
18905
- articleOptionValues: new Map(),
18888
+ articleOptionValues: {},
18906
18889
  pos: Number(myOPT.POS),
18907
18890
  tabGroup: myOPT.TabGroup,
18908
18891
  tabGroup_locales: myOPT.TabGroup_locales,
@@ -18911,7 +18894,8 @@ function getArticleOptionType(myOPT, set) {
18911
18894
  sendToSAP: myOPT.SendToSAP && myOPT.SendToSAP != '-1' ? myOPT.SendToSAP : undefined,
18912
18895
  articlePlaceholder: myOPT.ArticlePlaceholder,
18913
18896
  hasOPG: optHasOpg,
18914
- invisible: myOPT.Invisible == 'True' ? true : myOPT.Invisible == 'False' ? false : undefined,
18897
+ hasImages: false,
18898
+ invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : myOPT.Invisible == 'True' ? true : myOPT.Invisible == 'False' ? false : undefined,
18915
18899
  parentOptionCodex: myOPT.ParentOptionCodex
18916
18900
  };
18917
18901
  }
@@ -19010,8 +18994,8 @@ function getArticleOptionValueType(codex, jsonOPV, catalogOPV, myArticle, isPare
19010
18994
  return opv;
19011
18995
  }
19012
18996
 
19013
- function ownKeys$i(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; }
19014
- function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18997
+ function ownKeys$k(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; }
18998
+ function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19015
18999
  var LOG$k = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
19016
19000
  function loadMoreFromIDMArticles(_x, _x2) {
19017
19001
  return _loadMoreFromIDMArticles.apply(this, arguments);
@@ -19295,11 +19279,11 @@ var getPriceFeatureGroups = function getPriceFeatureGroups(catalogArticleDatas,
19295
19279
  var initializeDecision = function initializeDecision(decision, idmOptionGroups) {
19296
19280
  var _decision$optionCombi;
19297
19281
  var optionCombinations = (_decision$optionCombi = decision.optionCombinations) === null || _decision$optionCombi === void 0 ? void 0 : _decision$optionCombi.map(function (c) {
19298
- return _objectSpread$i(_objectSpread$i({}, c), {}, {
19282
+ return _objectSpread$k(_objectSpread$k({}, c), {}, {
19299
19283
  projectOptionsSetRefs: parseOptionSetRef(c.projectOptionsSetRefs, idmOptionGroups)
19300
19284
  });
19301
19285
  });
19302
- return _objectSpread$i(_objectSpread$i({}, decision), {}, {
19286
+ return _objectSpread$k(_objectSpread$k({}, decision), {}, {
19303
19287
  optionCombinations: optionCombinations === null || optionCombinations === void 0 ? void 0 : optionCombinations.sort(function (a, b) {
19304
19288
  return a.sequence - b.sequence;
19305
19289
  })
@@ -19308,11 +19292,11 @@ var initializeDecision = function initializeDecision(decision, idmOptionGroups)
19308
19292
  var initializePriceFeatureGroups = function initializePriceFeatureGroups(priceFeatureGroup, idmOptionGroups) {
19309
19293
  var _priceFeatureGroup$pr;
19310
19294
  var finishes = (_priceFeatureGroup$pr = priceFeatureGroup.projectFinishes) === null || _priceFeatureGroup$pr === void 0 ? void 0 : _priceFeatureGroup$pr.map(function (c) {
19311
- return _objectSpread$i(_objectSpread$i({}, c), {}, {
19295
+ return _objectSpread$k(_objectSpread$k({}, c), {}, {
19312
19296
  projectOptionsSetRefs: c.optionsSetRef ? parseOptionSetRef(c.optionsSetRef, idmOptionGroups) : []
19313
19297
  });
19314
19298
  });
19315
- return _objectSpread$i(_objectSpread$i({}, priceFeatureGroup), {}, {
19299
+ return _objectSpread$k(_objectSpread$k({}, priceFeatureGroup), {}, {
19316
19300
  projectFinishes: finishes === null || finishes === void 0 ? void 0 : finishes.sort(function (a, b) {
19317
19301
  return a.sequence - b.sequence;
19318
19302
  })
@@ -19393,8 +19377,9 @@ var initFeature = function initFeature(feature, catalogArticleData, set) {
19393
19377
  catalogArticleData.articleOptions[newArticleFeature.codex] = newArticleFeature;
19394
19378
  };
19395
19379
  function getCatalogFeatureType(feature, catalogArticleData, set) {
19396
- var _feature$detailInfos, _ref, _feature$properties, _feature$options$;
19380
+ var _set$CatalogData$cata, _feature$detailInfos, _ref, _feature$properties, _feature$options$, _optionMask$hidden;
19397
19381
  var featureClass = set.CatalogData.getFeatureClass(catalogArticleData.featureClassRefNo);
19382
+ var optionMask = (_set$CatalogData$cata = set.CatalogData.catalogMask) === null || _set$CatalogData$cata === void 0 || (_set$CatalogData$cata = _set$CatalogData$cata.options) === null || _set$CatalogData$cata === void 0 ? void 0 : _set$CatalogData$cata[feature.featureNo];
19398
19383
  return {
19399
19384
  name: DivaUtils__default["default"].getLocals(feature.featureText, set.api.getLanguageLowercase()),
19400
19385
  origName: DivaUtils__default["default"].getLocals(feature.featureText, set.api.getLanguageLowercase()),
@@ -19413,7 +19398,7 @@ function getCatalogFeatureType(feature, catalogArticleData, set) {
19413
19398
  })) === null || _feature$properties === void 0 ? void 0 : _feature$properties.value) !== null && _ref !== void 0 ? _ref : (_feature$options$ = feature.options[0]) !== null && _feature$options$ !== void 0 && (_feature$options$ = _feature$options$.detailInfos) !== null && _feature$options$ !== void 0 && _feature$options$.find(function (d) {
19414
19399
  return d.functionType == 'OPV';
19415
19400
  }) ? 'IMAGE' : 'TEXT',
19416
- invisible: !!(featureClass !== null && featureClass !== void 0 && featureClass.featureRefs[feature.featureNo])
19401
+ invisible: (_optionMask$hidden = optionMask === null || optionMask === void 0 ? void 0 : optionMask.hidden) !== null && _optionMask$hidden !== void 0 ? _optionMask$hidden : !!(featureClass !== null && featureClass !== void 0 && featureClass.featureRefs[feature.featureNo])
19417
19402
  };
19418
19403
  }
19419
19404
  function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
@@ -19428,10 +19413,11 @@ function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
19428
19413
  var opt = {
19429
19414
  codex: feature.featureNo,
19430
19415
  catalogOPT: catOPT,
19431
- articleOptionValues: new Map(),
19416
+ articleOptionValues: {},
19432
19417
  pos: feature.sequenceNo,
19433
19418
  articlePlaceholder: false,
19434
19419
  hasOPG: false,
19420
+ hasImages: false,
19435
19421
  invisible: !!(featureClass !== null && featureClass !== void 0 && featureClass.featureRefs[feature.featureNo]),
19436
19422
  tabGroup: tabgroup !== null && tabgroup !== void 0 && tabgroup.name ? DivaUtils__default["default"].getLocals(tabgroup.name, set.api.getLanguage()) : undefined,
19437
19423
  tabGroup_locales: tabgroup === null || tabgroup === void 0 ? void 0 : tabgroup.name
@@ -19457,7 +19443,7 @@ function getArticleFeatureType(feature, catalogArticleData, catOPT, set) {
19457
19443
  //option in IDM language so in Diva World its OptionValue
19458
19444
  function initOption(feature, articleFeature, catalogArticle, set) {
19459
19445
  var options = feature.options;
19460
- var allOptionsOfFeature = new Map();
19446
+ var allOptionsOfFeature = {};
19461
19447
  //Items initalisieren
19462
19448
  var _loop2 = function _loop2() {
19463
19449
  var option = options[j];
@@ -19466,7 +19452,7 @@ function initOption(feature, articleFeature, catalogArticle, set) {
19466
19452
  });
19467
19453
  if (!catOption) catOption = getCatalogOptionType(option, set);
19468
19454
  var articleIDMOption = new ArticleOptionValueData(getArticleOption(option, catOption, articleFeature, catalogArticle));
19469
- allOptionsOfFeature.set(articleIDMOption.codex, articleIDMOption);
19455
+ allOptionsOfFeature[articleIDMOption.codex] = articleIDMOption;
19470
19456
  };
19471
19457
  for (var j = 0; j < options.length; j++) {
19472
19458
  _loop2();
@@ -19849,8 +19835,8 @@ function initCatalogPlannerArticleView(catalogData, catPlanArticle, catalogProps
19849
19835
  });
19850
19836
  }
19851
19837
 
19852
- function ownKeys$h(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; }
19853
- function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19838
+ function ownKeys$j(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; }
19839
+ function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19854
19840
 
19855
19841
  /*
19856
19842
  Diese KLasse enthält Inforamtion zu einem Catalog (C)
@@ -20889,7 +20875,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
20889
20875
  }, {
20890
20876
  key: "setVariantsPriceByHash",
20891
20877
  value: function setVariantsPriceByHash(hash, data) {
20892
- this.variantsPriceHashObj[hash] = _objectSpread$h(_objectSpread$h({}, data), {}, {
20878
+ this.variantsPriceHashObj[hash] = _objectSpread$j(_objectSpread$j({}, data), {}, {
20893
20879
  calcTime: -1
20894
20880
  });
20895
20881
  }
@@ -21154,12 +21140,12 @@ var DivaCatalogData = /*#__PURE__*/function () {
21154
21140
  break;
21155
21141
  case 'SHOW_PRICEPREVIEW_ON_OPTIONS':
21156
21142
  _this5.catalogProps.showPricePreviewOnlyOnOptions = item.Value.split(';').map(function (t) {
21157
- return 'OPT' + t;
21143
+ return t;
21158
21144
  });
21159
21145
  break;
21160
21146
  case 'HIDE_PRICEPREVIEW_ON_OPTIONS':
21161
21147
  _this5.catalogProps.hidePricePreviewOnlyOnOptions = item.Value.split(';').map(function (t) {
21162
- return 'OPT' + t;
21148
+ return t;
21163
21149
  });
21164
21150
  break;
21165
21151
  case 'INIT_OPTIONTREE_TWICE':
@@ -21388,7 +21374,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
21388
21374
  var mapMask = function mapMask(mask) {
21389
21375
  var _mappedMask$catalog;
21390
21376
  if (!mask) return undefined;
21391
- var mappedMask = _objectSpread$h({}, mask);
21377
+ var mappedMask = _objectSpread$j({}, mask);
21392
21378
  var mapProperties = function mapProperties(props) {
21393
21379
  if (Array.isArray(props)) return props;
21394
21380
  var mappedProps = [];
@@ -21417,8 +21403,8 @@ var mapMask = function mapMask(mask) {
21417
21403
  return mappedMask;
21418
21404
  };
21419
21405
 
21420
- function ownKeys$g(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; }
21421
- function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21406
+ function ownKeys$i(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; }
21407
+ function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21422
21408
  //import IDMCatalogData from '../model/Catalog/IDMCatalogData';
21423
21409
 
21424
21410
  var LOG$h = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
@@ -21636,7 +21622,7 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
21636
21622
  }
21637
21623
  throw new Error('Serie not found: ' + serieNo);
21638
21624
  case 11:
21639
- catalogData = new DivaCatalogData(_objectSpread$g(_objectSpread$g({}, serieData[0]), {}, {
21625
+ catalogData = new DivaCatalogData(_objectSpread$i(_objectSpread$i({}, serieData[0]), {}, {
21640
21626
  catalogData: catalogApiData
21641
21627
  }), serieNo, orderSet, state.api, itemsList, undefined, true, additionalModelInfos);
21642
21628
  return _context4.abrupt("return", catalogData);
@@ -21683,11 +21669,8 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
21683
21669
  }();
21684
21670
  var catalogHandlerInstance = new DivaCatalogHandler();
21685
21671
 
21686
- function ownKeys$f(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; }
21687
- function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21688
- function _createForOfIteratorHelper$9(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$9(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
21689
- function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$9(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$9(r, a) : void 0; } }
21690
- function _arrayLikeToArray$9(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
21672
+ function ownKeys$h(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; }
21673
+ function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21691
21674
  var ArticleOptionStateData = /*#__PURE__*/function () {
21692
21675
  function ArticleOptionStateData(option, getIsConfigSingle, defaultOPV, useIsOptionDefinedWarning) {
21693
21676
  _classCallCheck__default["default"](this, ArticleOptionStateData);
@@ -21699,9 +21682,9 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
21699
21682
  name: '',
21700
21683
  origName: '',
21701
21684
  imageOPVs: {},
21702
- visibleOPVs: new Map(),
21685
+ visibleOPVs: {},
21703
21686
  visibleOPVKeys: [],
21704
- visibleOPVsImages: new Map(),
21687
+ visibleOPVsImages: {},
21705
21688
  favoriteOPVs: {},
21706
21689
  disabled: false,
21707
21690
  doShow: false,
@@ -21789,44 +21772,23 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
21789
21772
  return opv.codex;
21790
21773
  })) !== null && _this$articleOptionSt !== void 0 ? _this$articleOptionSt : [];
21791
21774
  var option = this.option;
21792
- var _iterator = _createForOfIteratorHelper$9(option.articleOptionValues),
21793
- _step;
21794
- try {
21795
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
21796
- var _step$value = _slicedToArray__default["default"](_step.value, 2),
21797
- key = _step$value[0],
21798
- value = _step$value[1];
21799
- if (value.isOPVG) {
21775
+ for (var key in option.articleOptionValues) {
21776
+ if (option.articleOptionValues[key].isOPVG) {
21777
+ var _option$articleOption;
21778
+ var opg = (_option$articleOption = option.articleOptionValues) === null || _option$articleOption === void 0 ? void 0 : _option$articleOption[key];
21779
+ for (var opvCodex in (_opg$articleOptionVal = opg.articleOptionValues) !== null && _opg$articleOptionVal !== void 0 ? _opg$articleOptionVal : {}) {
21800
21780
  var _opg$articleOptionVal;
21801
- var opg = value;
21802
- var _iterator2 = _createForOfIteratorHelper$9((_opg$articleOptionVal = opg.articleOptionValues) !== null && _opg$articleOptionVal !== void 0 ? _opg$articleOptionVal : new Map()),
21803
- _step2;
21804
- try {
21805
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
21806
- var _step2$value = _slicedToArray__default["default"](_step2.value, 2),
21807
- opvCodex = _step2$value[0],
21808
- opvValue = _step2$value[1];
21809
- var found = opvKeys.includes(opvCodex);
21810
- if (found) {
21811
- values.push(opvValue);
21812
- }
21813
- }
21814
- } catch (err) {
21815
- _iterator2.e(err);
21816
- } finally {
21817
- _iterator2.f();
21818
- }
21819
- } else {
21820
- var _found = opvKeys.includes(key);
21821
- if (_found) {
21822
- values.push(value);
21781
+ var found = opvKeys.includes(opvCodex);
21782
+ if (found) {
21783
+ values.push(opg.articleOptionValues[opvCodex]);
21823
21784
  }
21824
21785
  }
21786
+ } else {
21787
+ var _found = opvKeys.includes(key);
21788
+ if (_found) {
21789
+ values.push(option.articleOptionValues[key]);
21790
+ }
21825
21791
  }
21826
- } catch (err) {
21827
- _iterator.e(err);
21828
- } finally {
21829
- _iterator.f();
21830
21792
  }
21831
21793
  return values;
21832
21794
  }
@@ -21937,7 +21899,7 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
21937
21899
  key: "updateVisibleOptionValues",
21938
21900
  value: function updateVisibleOptionValues(visibleOPVs) {
21939
21901
  this.articleOptionState.visibleOPVs = visibleOPVs;
21940
- this.articleOptionState.visibleOPVKeys = Array.from(visibleOPVs.keys());
21902
+ this.articleOptionState.visibleOPVKeys = Object.keys(visibleOPVs);
21941
21903
  }
21942
21904
  }, {
21943
21905
  key: "visibleOPVKeys",
@@ -21947,19 +21909,19 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
21947
21909
  }, {
21948
21910
  key: "getVisibleOptionValue",
21949
21911
  value: function getVisibleOptionValue(codex) {
21950
- var searchValues = Array.from(this.visibleOptionValues.values());
21912
+ var searchValues = Object.values(this.visibleOptionValues);
21951
21913
  if (this.option.hasOPG) {
21952
21914
  var opgs = searchValues;
21953
21915
  for (var i = 0; i < opgs.length; i++) {
21954
- var _opgs$i$articleOption, _opgs$i$articleOption2;
21955
- var valuesInOpg = Array.from((_opgs$i$articleOption = (_opgs$i$articleOption2 = opgs[i].articleOptionValues) === null || _opgs$i$articleOption2 === void 0 ? void 0 : _opgs$i$articleOption2.values()) !== null && _opgs$i$articleOption !== void 0 ? _opgs$i$articleOption : []);
21916
+ var _opgs$i$articleOption;
21917
+ var valuesInOpg = Object.values((_opgs$i$articleOption = opgs[i].articleOptionValues) !== null && _opgs$i$articleOption !== void 0 ? _opgs$i$articleOption : {});
21956
21918
  var found = valuesInOpg.find(function (opv) {
21957
21919
  return opv.codex == codex || opv.ocd === codex;
21958
21920
  });
21959
21921
  if (found) return found;
21960
21922
  }
21961
21923
  } else {
21962
- var visibleValues = Array.from(this.visibleOptionValues.values());
21924
+ var visibleValues = Object.values(this.visibleOptionValues);
21963
21925
  var _found2 = visibleValues.find(function (opv) {
21964
21926
  return opv.codex == codex || opv.ocd === codex;
21965
21927
  });
@@ -21976,9 +21938,9 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
21976
21938
  key: "editVisibleOPVsImages",
21977
21939
  value: function editVisibleOPVsImages(codex, image) {
21978
21940
  if (image) {
21979
- this.visibleOPVsImages.set(codex, image);
21941
+ this.visibleOPVsImages[codex] = image;
21980
21942
  } else {
21981
- this.visibleOPVsImages["delete"](codex);
21943
+ delete this.visibleOPVsImages[codex];
21982
21944
  }
21983
21945
  }
21984
21946
  }, {
@@ -21989,7 +21951,7 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
21989
21951
  if (this.option.hasOPG) {
21990
21952
  return this.visibleOPVKeys.reduce(function (acc, key) {
21991
21953
  var _this$visibleOptionVa, _this$visibleOptionVa2, _this$visibleOptionVa3;
21992
- return acc + ((_this$visibleOptionVa = _this.visibleOptionValues.get(key)) !== null && _this$visibleOptionVa !== void 0 && _this$visibleOptionVa.isOPVG ? (_this$visibleOptionVa2 = (_this$visibleOptionVa3 = _this.visibleOptionValues.get(key)) === null || _this$visibleOptionVa3 === void 0 || (_this$visibleOptionVa3 = _this$visibleOptionVa3.articleOptionValues) === null || _this$visibleOptionVa3 === void 0 ? void 0 : _this$visibleOptionVa3.size) !== null && _this$visibleOptionVa2 !== void 0 ? _this$visibleOptionVa2 : 0 : 1);
21954
+ return acc + ((_this$visibleOptionVa = _this.visibleOptionValues[key]) !== null && _this$visibleOptionVa !== void 0 && _this$visibleOptionVa.isOPVG ? Object.keys((_this$visibleOptionVa2 = (_this$visibleOptionVa3 = _this.visibleOptionValues[key]) === null || _this$visibleOptionVa3 === void 0 ? void 0 : _this$visibleOptionVa3.articleOptionValues) !== null && _this$visibleOptionVa2 !== void 0 ? _this$visibleOptionVa2 : {}).length : 1);
21993
21955
  }, 0);
21994
21956
  }
21995
21957
  return this.visibleOPVKeys.length;
@@ -22265,23 +22227,13 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
22265
22227
  get: function get() {
22266
22228
  if (!this.option.onlyVisibleIfNotDocked) return undefined;
22267
22229
  var ret = {};
22268
- var _iterator3 = _createForOfIteratorHelper$9(this.visibleOptionValues.keys()),
22269
- _step3;
22270
- try {
22271
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
22272
- var _this$visibleOptionVa4;
22273
- var key = _step3.value;
22274
- var dockingPoints = (_this$visibleOptionVa4 = this.visibleOptionValues.get(key)) === null || _this$visibleOptionVa4 === void 0 ? void 0 : _this$visibleOptionVa4.onlyVisibleIfNotDocked;
22275
- if (dockingPoints) {
22276
- ret[key] = dockingPoints.split(';');
22277
- } else {
22278
- ret[key] = [];
22279
- }
22230
+ for (var key in this.visibleOptionValues) {
22231
+ var dockingPoints = this.visibleOptionValues[key].onlyVisibleIfNotDocked;
22232
+ if (dockingPoints) {
22233
+ ret[key] = dockingPoints.split(';');
22234
+ } else {
22235
+ ret[key] = [];
22280
22236
  }
22281
- } catch (err) {
22282
- _iterator3.e(err);
22283
- } finally {
22284
- _iterator3.f();
22285
22237
  }
22286
22238
  return Object.entries(ret).length ? ret : undefined;
22287
22239
  }
@@ -22421,17 +22373,19 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
22421
22373
  key: "cloneOptionState",
22422
22374
  value: function cloneOptionState(getIsConfigSingle) {
22423
22375
  var clonedOps = new ArticleOptionStateData(this.option, getIsConfigSingle);
22424
- clonedOps.articleOptionState = _objectSpread$f(_objectSpread$f({}, this.articleOptionState), {}, {
22425
- imageOPVs: _objectSpread$f({}, this.articleOptionState.imageOPVs),
22426
- visibleOPVs: new Map(this.articleOptionState.visibleOPVs),
22427
- visibleOPVsImages: new Map(this.articleOptionState.visibleOPVsImages),
22428
- favoriteOPVs: _objectSpread$f({}, this.articleOptionState.favoriteOPVs)
22376
+ clonedOps.articleOptionState = _objectSpread$h(_objectSpread$h({}, this.articleOptionState), {}, {
22377
+ imageOPVs: _objectSpread$h({}, this.articleOptionState.imageOPVs),
22378
+ visibleOPVs: _objectSpread$h({}, this.articleOptionState.visibleOPVs),
22379
+ visibleOPVsImages: _objectSpread$h({}, this.articleOptionState.visibleOPVsImages),
22380
+ favoriteOPVs: _objectSpread$h({}, this.articleOptionState.favoriteOPVs)
22429
22381
  });
22430
22382
  return clonedOps;
22431
22383
  }
22432
22384
  }]);
22433
22385
  }();
22434
22386
 
22387
+ function ownKeys$g(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; }
22388
+ function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
22435
22389
  function _createForOfIteratorHelper$8(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$8(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
22436
22390
  function _unsupportedIterableToArray$8(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$8(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$8(r, a) : void 0; } }
22437
22391
  function _arrayLikeToArray$8(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -22453,7 +22407,7 @@ var DivaEngine = /*#__PURE__*/function () {
22453
22407
  var maxPriceOfGroup = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
22454
22408
  var maxPriceOfGroupCodex = ['', '', '', '', '', '', '', '', '', ''];
22455
22409
  var previousVaraintValues = this.article.VariantValues;
22456
- var _iterator = _createForOfIteratorHelper$8(this.article.articleOptionStates.values()),
22410
+ var _iterator = _createForOfIteratorHelper$8(this.article.articleOptionStates),
22457
22411
  _step;
22458
22412
  try {
22459
22413
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -22468,79 +22422,48 @@ var DivaEngine = /*#__PURE__*/function () {
22468
22422
 
22469
22423
  var foundFirstItem = false;
22470
22424
  var setDefaultOPV = ops.defaultOPV;
22471
- ops.updateVisibleOptionValues(new Map());
22472
- var visibleOptionValues = new Map();
22425
+ ops.updateVisibleOptionValues({});
22426
+ var visibleOptionValues = {};
22473
22427
  if (myOpt.hasOPG) {
22474
22428
  var myOPGs = myOpt.articleOptionValues;
22475
- var _iterator2 = _createForOfIteratorHelper$8(myOPGs),
22476
- _step2;
22477
- try {
22478
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
22479
- var _step2$value = _slicedToArray__default["default"](_step2.value, 2),
22480
- lKey = _step2$value[0],
22481
- value = _step2$value[1];
22482
- var myOPVsInOPG = value.articleOptionValues;
22483
- if (this.checkItemVisibility(value, ops) && myOPVsInOPG) {
22484
- visibleOptionValues.set(value.codex, value);
22485
- var _iterator3 = _createForOfIteratorHelper$8(myOPVsInOPG),
22486
- _step3;
22487
- try {
22488
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
22489
- var _step3$value = _slicedToArray__default["default"](_step3.value, 2),
22490
- opvCodex = _step3$value[0],
22491
- tmpOPV = _step3$value[1];
22492
- if (tmpOPV.hiddenByMask) continue;
22493
- visibleItems[OP + '#' + opvCodex] = tmpOPV;
22494
- if (!ops.getConstructionRulesIsDisablingByOPVCodex(opvCodex)) {
22495
- if (setDefaultOPV && setDefaultOPV == opvCodex) {
22496
- firstVisibleItem = tmpOPV;
22497
- foundFirstItem = true;
22498
- } else if (!foundFirstItem) {
22499
- firstVisibleItem = tmpOPV;
22500
- foundFirstItem = true;
22501
- }
22502
- }
22429
+ for (var lKey in myOPGs) {
22430
+ var myOPVsInOPG = myOPGs[lKey].articleOptionValues;
22431
+ if (this.checkItemVisibility(myOPGs[lKey], ops) && myOPVsInOPG) {
22432
+ visibleOptionValues[myOPGs[lKey].codex] = myOPGs[lKey];
22433
+ for (var opvCodex in myOPVsInOPG) {
22434
+ var tmpOPV = myOPVsInOPG[opvCodex];
22435
+ if (tmpOPV.hiddenByMask) continue;
22436
+ visibleItems[OP + '#' + opvCodex] = tmpOPV;
22437
+ if (!ops.getConstructionRulesIsDisablingByOPVCodex(opvCodex)) {
22438
+ if (setDefaultOPV && setDefaultOPV == opvCodex) {
22439
+ firstVisibleItem = tmpOPV;
22440
+ foundFirstItem = true;
22441
+ } else if (!foundFirstItem) {
22442
+ firstVisibleItem = tmpOPV;
22443
+ foundFirstItem = true;
22503
22444
  }
22504
- } catch (err) {
22505
- _iterator3.e(err);
22506
- } finally {
22507
- _iterator3.f();
22508
22445
  }
22509
22446
  }
22510
22447
  }
22511
- } catch (err) {
22512
- _iterator2.e(err);
22513
- } finally {
22514
- _iterator2.f();
22515
22448
  }
22516
22449
  } else {
22517
22450
  var myOPVs = myOpt.articleOptionValues;
22518
22451
  if (myOPVs) {
22519
- var _iterator4 = _createForOfIteratorHelper$8(myOPVs),
22520
- _step4;
22521
- try {
22522
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
22523
- var _step4$value = _slicedToArray__default["default"](_step4.value, 2),
22524
- _opvCodex = _step4$value[0],
22525
- _tmpOPV = _step4$value[1];
22526
- if (!_tmpOPV.hiddenByMask && this.checkItemVisibility(_tmpOPV, ops)) {
22527
- visibleOptionValues.set(_tmpOPV.codex, _tmpOPV);
22528
- visibleItems[OP + '#' + _opvCodex] = _tmpOPV;
22529
- if (!ops.getConstructionRulesIsDisablingByOPVCodex(_opvCodex)) {
22530
- if (setDefaultOPV && setDefaultOPV == _opvCodex) {
22531
- firstVisibleItem = _tmpOPV;
22532
- foundFirstItem = true;
22533
- } else if (!foundFirstItem) {
22534
- firstVisibleItem = _tmpOPV;
22535
- foundFirstItem = true;
22536
- }
22452
+ for (var opvCodex in myOPVs) {
22453
+ var tmpOPV = myOPVs[opvCodex];
22454
+ if (!tmpOPV.hiddenByMask && this.checkItemVisibility(tmpOPV, ops)) {
22455
+ visibleOptionValues[tmpOPV.codex] = tmpOPV;
22456
+ visibleItems[OP + '#' + opvCodex] = tmpOPV;
22457
+ if (!ops.getConstructionRulesIsDisablingByOPVCodex(opvCodex)) {
22458
+ if (setDefaultOPV && setDefaultOPV == opvCodex) {
22459
+ firstVisibleItem = tmpOPV;
22460
+ foundFirstItem = true;
22461
+ } else if (!foundFirstItem) {
22462
+ firstVisibleItem = tmpOPV;
22463
+ foundFirstItem = true;
22537
22464
  }
22538
22465
  }
22539
22466
  }
22540
- } catch (err) {
22541
- _iterator4.e(err);
22542
- } finally {
22543
- _iterator4.f();
22544
22467
  }
22545
22468
  }
22546
22469
  }
@@ -22583,7 +22506,7 @@ var DivaEngine = /*#__PURE__*/function () {
22583
22506
  if (_ops !== null && _ops !== void 0 && _ops.valCodex) {
22584
22507
  var foundItem = _this.article.checkOptionAndOptionValue(_ops.optionCodex, _ops.valCodex);
22585
22508
  if ((foundItem === null || foundItem === void 0 ? void 0 : foundItem.opv) instanceof ArticleOptionValueData) {
22586
- if (_ops.visibleOptionValues.get(foundItem.opv.codex) || _ops.visibleOptionValues.get(foundItem.opv.parentCodex)) {
22509
+ if (_ops.visibleOptionValues[foundItem.opv.codex] || _ops.visibleOptionValues[foundItem.opv.parentCodex]) {
22587
22510
  myItem = foundItem.opv;
22588
22511
  }
22589
22512
  }
@@ -22598,8 +22521,8 @@ var DivaEngine = /*#__PURE__*/function () {
22598
22521
  //sonst myItem aus default sibling option versuchen zu verwenden
22599
22522
  if (myItem == null && ops.option.isDefaultSiblingOption) {
22600
22523
  var siblingsPreviousOpv = previousVaraintValues['OPT' + ops.option.isDefaultSiblingOption];
22601
- if (siblingsPreviousOpv && ops.visibleOptionValues.get(siblingsPreviousOpv)) {
22602
- myItem = ops.visibleOptionValues.get(siblingsPreviousOpv);
22524
+ if (siblingsPreviousOpv && ops.visibleOptionValues[siblingsPreviousOpv]) {
22525
+ myItem = ops.visibleOptionValues[siblingsPreviousOpv];
22603
22526
  }
22604
22527
  }
22605
22528
  if (myItem == null && !ops.defaultOPV) {
@@ -22682,19 +22605,8 @@ var DivaEngine = /*#__PURE__*/function () {
22682
22605
  //R (Anschlusstyp R) - AVR
22683
22606
  var newAVRFilter = [],
22684
22607
  visibleOPVs = ops.visibleOptionValues;
22685
- var _iterator5 = _createForOfIteratorHelper$8(visibleOPVs),
22686
- _step5;
22687
- try {
22688
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
22689
- var _step5$value = _slicedToArray__default["default"](_step5.value, 2),
22690
- key = _step5$value[0],
22691
- value = _step5$value[1];
22692
- newAVRFilter.push(value.codex.substring(3));
22693
- }
22694
- } catch (err) {
22695
- _iterator5.e(err);
22696
- } finally {
22697
- _iterator5.f();
22608
+ for (var key in visibleOPVs) {
22609
+ newAVRFilter.push(visibleOPVs[key].codex.substring(3));
22698
22610
  }
22699
22611
  this.article.newPossibleAVRFilters = newAVRFilter;
22700
22612
  }
@@ -22702,19 +22614,8 @@ var DivaEngine = /*#__PURE__*/function () {
22702
22614
  //L (Anschlusstyp L) - AVL
22703
22615
  var newAVLFilter = [],
22704
22616
  _visibleOPVs = ops.visibleOptionValues;
22705
- var _iterator6 = _createForOfIteratorHelper$8(_visibleOPVs),
22706
- _step6;
22707
- try {
22708
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
22709
- var _step6$value = _slicedToArray__default["default"](_step6.value, 2),
22710
- _key = _step6$value[0],
22711
- _value = _step6$value[1];
22712
- newAVLFilter.push(_value.codex.substring(3));
22713
- }
22714
- } catch (err) {
22715
- _iterator6.e(err);
22716
- } finally {
22717
- _iterator6.f();
22617
+ for (var key in _visibleOPVs) {
22618
+ newAVLFilter.push(_visibleOPVs[key].codex.substring(3));
22718
22619
  }
22719
22620
  this.article.newPossibleAVLFilters = newAVLFilter;
22720
22621
  }
@@ -22933,18 +22834,18 @@ var DivaEngine = /*#__PURE__*/function () {
22933
22834
  myDecisions[i].disableHistory = [];
22934
22835
  myDecisions[i].activeCombination = undefined;
22935
22836
  }
22936
- var _iterator7 = _createForOfIteratorHelper$8(this.article.articleOptionStates.values()),
22937
- _step7;
22837
+ var _iterator2 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
22838
+ _step2;
22938
22839
  try {
22939
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
22940
- var ops = _step7.value;
22941
- ops.updateVisibleOptionValues(ops.option.articleOptionValues);
22840
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
22841
+ var ops = _step2.value;
22842
+ ops.updateVisibleOptionValues(_objectSpread$g({}, ops.option.articleOptionValues));
22942
22843
  ops.definedBySetFeatureFixed = false;
22943
22844
  }
22944
22845
  } catch (err) {
22945
- _iterator7.e(err);
22846
+ _iterator2.e(err);
22946
22847
  } finally {
22947
- _iterator7.f();
22848
+ _iterator2.f();
22948
22849
  }
22949
22850
  this.decisionDebugStack = [];
22950
22851
  var beforeSnapshot = this.article.set.logDecisions ? this.article.snapshot : undefined;
@@ -23072,18 +22973,18 @@ var DivaEngine = /*#__PURE__*/function () {
23072
22973
  key: "updateIDMSpecificFeatures",
23073
22974
  value: function updateIDMSpecificFeatures() {
23074
22975
  //updaten idm planner specific options
23075
- var _iterator8 = _createForOfIteratorHelper$8(this.article.articleOptionStates.values()),
23076
- _step8;
22976
+ var _iterator3 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
22977
+ _step3;
23077
22978
  try {
23078
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
23079
- var ops = _step8.value;
22979
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
22980
+ var ops = _step3.value;
23080
22981
  //when an option has no decisions the first visible optionValue has to be selected per default
23081
22982
  if (ops.val === undefined && ops.visibleCount && !this.article.CatalogData.useDiomexConfigLogic) {
23082
22983
  this.assignOptionValue(ops.optionCodex, ops.visibleOPVKeys[0]);
23083
22984
  }
23084
22985
  if (ops.visibleCount && ops.IsIDMSpecialFeature) {
23085
22986
  var _validOpv;
23086
- var validOpvs = Array.from(ops.visibleOptionValues.values());
22987
+ var validOpvs = Object.values(ops.visibleOptionValues);
23087
22988
  if (ops.val) validOpvs.unshift(ops.val);
23088
22989
  var validOpv = undefined;
23089
22990
  for (var i = 0; i < validOpvs.length; i++) {
@@ -23097,9 +22998,9 @@ var DivaEngine = /*#__PURE__*/function () {
23097
22998
  }
23098
22999
  }
23099
23000
  } catch (err) {
23100
- _iterator8.e(err);
23001
+ _iterator3.e(err);
23101
23002
  } finally {
23102
- _iterator8.f();
23003
+ _iterator3.f();
23103
23004
  }
23104
23005
  }
23105
23006
  }, {
@@ -23262,219 +23163,201 @@ var DivaEngine = /*#__PURE__*/function () {
23262
23163
  }, {
23263
23164
  key: "evalType1Decision",
23264
23165
  value: function evalType1Decision(myDecision) {
23265
- var _this2 = this;
23266
23166
  var validOPVs = {};
23267
23167
  var doAlsoCheckOPTs = [];
23268
- if (myDecision.Options && myDecision.DOC) {
23269
- var _loop2 = function _loop2() {
23270
- var OPT = myDecision.Options[p];
23271
- var ops = _this2.article.getArticleOptionStateFlat(OPT);
23272
- if (!ops) return 1; // break
23273
- if (!validOPVs[OPT]) validOPVs[OPT] = new Map();
23274
- var possibleOPVs = new Map(ops.visibleOptionValues);
23275
- //welche Optionen sind auch zu prüfen?
23168
+ if (myDecision.Options && myDecision.DOC) for (var p = 0; p < myDecision.Options.length; p++) {
23169
+ var OPT = myDecision.Options[p];
23170
+ var ops = this.article.getArticleOptionStateFlat(OPT);
23171
+ if (!ops) break;
23172
+ if (!validOPVs[OPT]) validOPVs[OPT] = {};
23173
+ var possibleOPVs = ops.visibleOptionValues;
23174
+ //welche Optionen sind auch zu prüfen?
23276
23175
 
23277
- for (var j = 0; j < myDecision.DOC.length; j++) {
23278
- //DecisionOptionCombination
23279
- //wenn diese Row mehrere Optionen hat, dann müssen die bisher gesetzten schon übereinstimmen
23176
+ for (var j = 0; j < myDecision.DOC.length; j++) {
23177
+ //DecisionOptionCombination
23178
+ //wenn diese Row mehrere Optionen hat, dann müssen die bisher gesetzten schon übereinstimmen
23280
23179
 
23281
- var myDoc = myDecision.DOC[j];
23282
- var doUseDoc = _this2.checkIfDocIsValid(myDoc, doAlsoCheckOPTs);
23283
- if (doUseDoc) {
23180
+ var doUseDoc = true;
23181
+ var myDoc = myDecision.DOC[j];
23182
+ if (doAlsoCheckOPTs.length > 0) {
23183
+ for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
23284
23184
  var _myDoc$Row;
23285
- myDecision.activeCombination = j;
23286
- if ((_myDoc$Row = myDoc.Row) !== null && _myDoc$Row !== void 0 && _myDoc$Row[OPT]) {
23287
- var ruleWasValidOnce = false;
23288
- for (var m = 0; m < myDoc.Row[OPT].length; m++) {
23289
- var opvCodex = myDoc.Row[OPT][m];
23290
- if (opvCodex.startsWith('!')) {
23291
- //this should only delete the value when all the following options match the values
23292
- //https://app.asana.com/0/search?q=nin&child=1203078926793962
23293
- //https://app.asana.com/0/1203759050701666/1203780404115819
23185
+ var checkOptX = doAlsoCheckOPTs[f];
23186
+ var _ops3 = this.article.getArticleOptionState(checkOptX);
23187
+ if (_ops3 && (_myDoc$Row = myDoc.Row) !== null && _myDoc$Row !== void 0 && _myDoc$Row[checkOptX] && _ops3.valCodex && !myDoc.Row[checkOptX].includes(_ops3.valCodex)) {
23188
+ if (!myDoc.Row[checkOptX].find(function (o) {
23189
+ return !o.startsWith('!');
23190
+ })) {
23191
+ //all is inverted
23192
+ if (myDoc.Row[checkOptX].includes('!' + _ops3.valCodex)) {
23193
+ doUseDoc = false;
23194
+ break;
23195
+ }
23196
+ } else {
23197
+ doUseDoc = false;
23198
+ break;
23199
+ }
23200
+ }
23201
+ }
23202
+ }
23203
+ if (doUseDoc) {
23204
+ var _myDoc$Row2;
23205
+ myDecision.activeCombination = j;
23206
+ if ((_myDoc$Row2 = myDoc.Row) !== null && _myDoc$Row2 !== void 0 && _myDoc$Row2[OPT]) {
23207
+ var ruleWasValidOnce = false;
23208
+ for (var m = 0; m < myDoc.Row[OPT].length; m++) {
23209
+ var opvCodex = myDoc.Row[OPT][m];
23210
+ if (opvCodex.startsWith('!')) {
23211
+ //this should only delete the value when all the following options match the values
23212
+ //https://app.asana.com/0/search?q=nin&child=1203078926793962
23213
+ //https://app.asana.com/0/1203759050701666/1203780404115819
23214
+
23215
+ var ruleValid = true;
23216
+ var _loop2 = function _loop2() {
23217
+ if (key === OPT) return 0; // continue
23294
23218
 
23295
- var ruleValid = true;
23296
- for (var key in myDoc.Row) {
23297
- if (key === OPT) continue;
23219
+ // Cache the row values array
23220
+ var rowValues = myDoc.Row[key];
23298
23221
 
23299
- // Converting array to Set is O(n) but only done once. Then each lookup is O(1) instead of O(n) for includes() (total O(n))
23300
- var rowValuesSet = new Set(myDoc.Row[key]);
23301
- var hasMatch = _toConsumableArray__default["default"](rowValuesSet).some(function (v) {
23302
- return ops.visibleOptionValues.has(v);
23222
+ // Use some() to break early when match found
23223
+ var hasMatch = ops.visibleOPVKeys.some(function (opv) {
23224
+ return rowValues.includes(opv);
23303
23225
  });
23304
23226
  if (!hasMatch) {
23305
23227
  ruleValid = false;
23306
- break;
23228
+ return 1; // break
23307
23229
  }
23308
- }
23309
- if (ruleValid) {
23310
- ruleWasValidOnce = true;
23311
- if (m == 0) validOPVs[OPT] = new Map(possibleOPVs);
23312
- opvCodex = opvCodex.slice(1);
23313
- if (possibleOPVs.get(opvCodex)) validOPVs[OPT]["delete"](opvCodex);
23314
- }
23315
- } else {
23230
+ },
23231
+ _ret;
23232
+ for (var key in myDoc.Row) {
23233
+ _ret = _loop2();
23234
+ if (_ret === 0) continue;
23235
+ if (_ret === 1) break;
23236
+ }
23237
+ if (ruleValid) {
23316
23238
  ruleWasValidOnce = true;
23317
- var opv = possibleOPVs.get(opvCodex);
23318
- if (opv) validOPVs[OPT].set(opvCodex, opv);
23239
+ if (m == 0) validOPVs[OPT] = _objectSpread$g({}, possibleOPVs);
23240
+ opvCodex = opvCodex.slice(1);
23241
+ if (possibleOPVs[opvCodex] != null) delete validOPVs[OPT][opvCodex];
23319
23242
  }
23243
+ } else {
23244
+ ruleWasValidOnce = true;
23245
+ if (possibleOPVs[opvCodex] != null) validOPVs[OPT][opvCodex] = possibleOPVs[opvCodex];
23320
23246
  }
23321
- if (!ruleWasValidOnce) {
23322
- //add the rest
23323
- if (myDoc.Row[OPT][0].includes('!')) {
23324
- var negatedValues = new Set(myDoc.Row[OPT].map(function (v) {
23325
- return v.slice(1);
23326
- })); // remove the '!' from the value
23327
- var _iterator9 = _createForOfIteratorHelper$8(ops.visibleOptionValues),
23328
- _step9;
23329
- try {
23330
- for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
23331
- var _step9$value = _slicedToArray__default["default"](_step9.value, 2),
23332
- opvKey = _step9$value[0],
23333
- _opv = _step9$value[1];
23334
- if (!negatedValues.has(opvKey)) {
23335
- validOPVs[OPT].set(opvKey, _opv);
23336
- }
23337
- }
23338
- } catch (err) {
23339
- _iterator9.e(err);
23340
- } finally {
23341
- _iterator9.f();
23342
- }
23343
- } else {
23344
- validOPVs[OPT] = new Map(ops.visibleOptionValues);
23247
+ }
23248
+ if (!ruleWasValidOnce) {
23249
+ //add the rest
23250
+ if (myDoc.Row[OPT][0].includes('!')) {
23251
+ for (var opv in ops.visibleOptionValues) {
23252
+ var doesNotExists = myDoc.Row[OPT].includes('!' + opv);
23253
+ if (!doesNotExists) validOPVs[OPT][opv] = ops.visibleOptionValues[opv];
23345
23254
  }
23255
+ } else {
23256
+ validOPVs[OPT] = Object.assign({}, ops.visibleOptionValues);
23346
23257
  }
23347
- } else {
23348
- validOPVs[OPT] = possibleOPVs;
23349
23258
  }
23350
- }
23351
- }
23352
- var schnittmenge = new Map(Array.from(possibleOPVs).filter(function (_ref2) {
23353
- var _ref3 = _slicedToArray__default["default"](_ref2, 1),
23354
- key = _ref3[0];
23355
- return validOPVs[OPT].has(key);
23356
- }));
23357
- ops.updateVisibleOptionValues(new Map(schnittmenge));
23358
- var valCodex = ops.valCodex;
23359
- if ((!valCodex || !schnittmenge.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
23360
- if (_this2.article.CatalogData.useDiomexConfigLogic) {
23361
- _this2.clearOP(OPT, true);
23362
23259
  } else {
23363
- _this2.updateArtOPV(_this2.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
23260
+ validOPVs[OPT] = possibleOPVs;
23364
23261
  }
23365
23262
  }
23366
- doAlsoCheckOPTs.push(OPT);
23367
- //Hier führende Optionen prüfen
23368
- };
23369
- for (var p = 0; p < myDecision.Options.length; p++) {
23370
- if (_loop2()) break;
23371
23263
  }
23372
- }
23373
- }
23374
- }, {
23375
- key: "checkIfDocIsValid",
23376
- value: function checkIfDocIsValid(myDoc, doAlsoCheckOPTs) {
23377
- if (doAlsoCheckOPTs.length === 0) return true;
23378
- for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
23379
- var _myDoc$Row2;
23380
- var checkOptX = doAlsoCheckOPTs[f];
23381
- var ops = this.article.getArticleOptionState(checkOptX);
23382
- if (ops && (_myDoc$Row2 = myDoc.Row) !== null && _myDoc$Row2 !== void 0 && _myDoc$Row2[checkOptX] && ops.valCodex && !myDoc.Row[checkOptX].includes(ops.valCodex)) {
23383
- if (!myDoc.Row[checkOptX].find(function (o) {
23384
- return !o.startsWith('!');
23385
- })) {
23386
- //all is inverted
23387
- if (myDoc.Row[checkOptX].includes('!' + ops.valCodex)) {
23388
- return false;
23389
- }
23264
+ var schnittmenge = {};
23265
+ for (var _key in possibleOPVs) {
23266
+ if (validOPVs[OPT][_key]) {
23267
+ schnittmenge[_key] = possibleOPVs[_key];
23268
+ }
23269
+ }
23270
+ ops.updateVisibleOptionValues(_objectSpread$g({}, schnittmenge));
23271
+ var valCodex = ops.valCodex;
23272
+ if ((!valCodex || !schnittmenge[valCodex]) && ops.visibleOPVKeys.length > 0) {
23273
+ if (this.article.CatalogData.useDiomexConfigLogic) {
23274
+ this.clearOP(OPT, true);
23390
23275
  } else {
23391
- return false;
23276
+ this.updateArtOPV(this.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
23392
23277
  }
23393
23278
  }
23279
+ doAlsoCheckOPTs.push(OPT);
23280
+ //Hier führende Optionen prüfen
23394
23281
  }
23395
- return true;
23396
23282
  }
23397
23283
  }, {
23398
23284
  key: "evalType0Decision",
23399
23285
  value: function evalType0Decision(myDecision) {
23400
- var _this3 = this;
23401
23286
  var invalidOPVs = {},
23402
23287
  doAlsoCheckOPTs = [];
23403
- if (myDecision.Options && myDecision.Options.length > 1 && myDecision.DOC) {
23404
- var _loop3 = function _loop3() {
23405
- var OPT = myDecision.Options[p];
23406
- var ops = _this3.article.getArticleOptionStateFlat(OPT);
23407
- if (!ops) return 1; // break
23408
- if (!invalidOPVs[OPT]) invalidOPVs[OPT] = new Map();
23409
- var possibleOPVs = ops.visibleOptionValues;
23410
- //Erste Option ist immer eine Bedingung!
23411
- if (p === myDecision.Options.length - 1 && myDecision.DOC) {
23412
- for (var j = 0; j < myDecision.DOC.length; j++) {
23413
- //DecisionOptionCombination
23414
- //wenn diese Row mehrere Optionen hat, dann müssen die bisher gesetzten schon übereinstimmen
23415
- // z.B. bei OPT2 muss OPT1 stimmen
23416
- // und bei OPT3 muss OPT1 und OPT2 stimmen
23417
- var doUseDoc = true,
23418
- myDoc = myDecision.DOC[j];
23419
- if (doAlsoCheckOPTs.length > 0) {
23420
- for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
23421
- var _myDoc$Row3;
23422
- var checkOptX = doAlsoCheckOPTs[f];
23423
- var _ops3 = _this3.article.getArticleOptionState(checkOptX);
23424
- if (_ops3 && (_myDoc$Row3 = myDoc.Row) !== null && _myDoc$Row3 !== void 0 && _myDoc$Row3[checkOptX] && _ops3.valCodex && !myDoc.Row[checkOptX].includes(_ops3.valCodex)) {
23425
- doUseDoc = false;
23426
- break;
23427
- }
23288
+ if (myDecision.Options && myDecision.Options.length > 1 && myDecision.DOC) for (var p = 0; p < myDecision.Options.length; p++) {
23289
+ var OPT = myDecision.Options[p];
23290
+ var ops = this.article.getArticleOptionStateFlat(OPT);
23291
+ if (!ops) break;
23292
+ if (!invalidOPVs[OPT]) invalidOPVs[OPT] = {};
23293
+ var possibleOPVs = ops.visibleOptionValues;
23294
+ //Erste Option ist immer eine Bedingung!
23295
+ if (p === myDecision.Options.length - 1 && myDecision.DOC) {
23296
+ for (var j = 0; j < myDecision.DOC.length; j++) {
23297
+ //DecisionOptionCombination
23298
+ //wenn diese Row mehrere Optionen hat, dann müssen die bisher gesetzten schon übereinstimmen
23299
+ // z.B. bei OPT2 muss OPT1 stimmen
23300
+ // und bei OPT3 muss OPT1 und OPT2 stimmen
23301
+ var doUseDoc = true,
23302
+ myDoc = myDecision.DOC[j];
23303
+ if (doAlsoCheckOPTs.length > 0) {
23304
+ for (var f = 0; f < doAlsoCheckOPTs.length; f++) {
23305
+ var _myDoc$Row3;
23306
+ var checkOptX = doAlsoCheckOPTs[f];
23307
+ var _ops4 = this.article.getArticleOptionState(checkOptX);
23308
+ if (_ops4 && (_myDoc$Row3 = myDoc.Row) !== null && _myDoc$Row3 !== void 0 && _myDoc$Row3[checkOptX] && _ops4.valCodex && !myDoc.Row[checkOptX].includes(_ops4.valCodex)) {
23309
+ doUseDoc = false;
23310
+ break;
23428
23311
  }
23429
23312
  }
23430
- if (doUseDoc && myDoc.Row) {
23431
- myDecision.activeCombination = j;
23432
- if (myDoc.Row[OPT]) {
23433
- for (var m = 0; m < myDoc.Row[OPT].length; m++) {
23434
- var opvCodex = myDoc.Row[OPT][m];
23435
- var myOPVData = possibleOPVs.get(opvCodex);
23436
- if (myOPVData != null) {
23437
- invalidOPVs[OPT].set(opvCodex, myOPVData); //wenn es eine DecisionType 0 ist muss ich diese OPV von den gültigen entfernen
23438
- }
23313
+ }
23314
+ if (doUseDoc && myDoc.Row) {
23315
+ myDecision.activeCombination = j;
23316
+ if (myDoc.Row[OPT]) {
23317
+ for (var m = 0; m < myDoc.Row[OPT].length; m++) {
23318
+ var opvCodex = myDoc.Row[OPT][m];
23319
+ var myOPVData = possibleOPVs[opvCodex];
23320
+ if (myOPVData != null) {
23321
+ invalidOPVs[OPT][opvCodex] = myOPVData; //wenn es eine DecisionType 0 ist muss ich diese OPV von den gültigen entfernen
23439
23322
  }
23440
23323
  }
23441
23324
  }
23442
23325
  }
23443
- var schnittmenge = new Map(Array.from(possibleOPVs).filter(function (_ref4) {
23444
- var _ref5 = _slicedToArray__default["default"](_ref4, 1),
23445
- key = _ref5[0];
23446
- return !invalidOPVs[OPT].has(key);
23447
- }));
23448
- ops.updateVisibleOptionValues(schnittmenge);
23449
- var valCodex = ops.valCodex;
23450
- if ((!valCodex || !schnittmenge.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
23451
- if (_this3.article.CatalogData.useDiomexConfigLogic) {
23452
- _this3.clearOP(OPT, true);
23453
- } else {
23454
- _this3.updateArtOPV(_this3.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
23455
- }
23326
+ }
23327
+ var schnittmenge = {};
23328
+ for (var key in possibleOPVs) {
23329
+ if (!invalidOPVs[OPT][key]) {
23330
+ schnittmenge[key] = possibleOPVs[key];
23456
23331
  }
23457
- } else if (p < myDecision.Options.length - 1) {
23458
- doAlsoCheckOPTs.push(OPT);
23459
23332
  }
23460
- };
23461
- for (var p = 0; p < myDecision.Options.length; p++) {
23462
- if (_loop3()) break;
23333
+ // someDecisionExistsForOption = true;
23334
+
23335
+ ops.updateVisibleOptionValues(_objectSpread$g({}, schnittmenge));
23336
+ var valCodex = ops.valCodex;
23337
+ if ((!valCodex || !schnittmenge[valCodex]) && ops.visibleOPVKeys.length > 0) {
23338
+ if (this.article.CatalogData.useDiomexConfigLogic) {
23339
+ this.clearOP(OPT, true);
23340
+ } else {
23341
+ this.updateArtOPV(this.article.getDefaultOpv(schnittmenge), OPT, ops, undefined);
23342
+ }
23343
+ }
23344
+ } else if (p < myDecision.Options.length - 1) {
23345
+ doAlsoCheckOPTs.push(OPT);
23463
23346
  }
23464
23347
  }
23465
23348
  }
23466
23349
  }, {
23467
23350
  key: "evalShowOnlyWhenHasPrice",
23468
23351
  value: function evalShowOnlyWhenHasPrice() {
23469
- var _iterator10 = _createForOfIteratorHelper$8(this.article.articleOptionStates.values()),
23470
- _step10;
23352
+ var _iterator4 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
23353
+ _step4;
23471
23354
  try {
23472
- for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
23473
- var ops = _step10.value;
23355
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
23356
+ var ops = _step4.value;
23474
23357
  for (var jKey in ops.visibleOptionValues) {
23475
- var opv = ops.visibleOptionValues.get(jKey);
23358
+ var opv = ops.visibleOptionValues[jKey];
23476
23359
  if (opv.showOnlyWhenHasPrice && opv.price == 0) {
23477
- ops.visibleOptionValues["delete"](opv.codex);
23360
+ delete ops.visibleOptionValues[opv.codex];
23478
23361
  if (ops.valCodex === opv.codex) {
23479
23362
  this.assignOptionValue(ops.optionCodex, ops.visibleOPVKeys[0]);
23480
23363
  }
@@ -23482,9 +23365,9 @@ var DivaEngine = /*#__PURE__*/function () {
23482
23365
  }
23483
23366
  }
23484
23367
  } catch (err) {
23485
- _iterator10.e(err);
23368
+ _iterator4.e(err);
23486
23369
  } finally {
23487
- _iterator10.f();
23370
+ _iterator4.f();
23488
23371
  }
23489
23372
  }
23490
23373
 
@@ -23599,8 +23482,8 @@ var DivaEngine = /*#__PURE__*/function () {
23599
23482
  firstItem = null;
23600
23483
  if (this.article.getArticleOptionState(checkOPT)) {
23601
23484
  var ops = this.article.getArticleOptionState(checkOPT);
23602
- firstItem = ops === null || ops === void 0 ? void 0 : ops.visibleOptionValues.get(ops.visibleOPVKeys[0]); //hole ersten eintrag für aus den Dictionary
23603
- if (checkOPV && ops !== null && ops !== void 0 && ops.visibleOptionValues.get(checkOPV)) foundItem = ops.visibleOptionValues.get(checkOPV);
23485
+ firstItem = ops === null || ops === void 0 ? void 0 : ops.visibleOptionValues[ops.visibleOPVKeys[0]]; //hole ersten eintrag für aus den Dictionary
23486
+ if (checkOPV && ops !== null && ops !== void 0 && ops.visibleOptionValues[checkOPV]) foundItem = ops.visibleOptionValues[checkOPV];
23604
23487
  }
23605
23488
  return {
23606
23489
  foundItem: foundItem,
@@ -23726,20 +23609,20 @@ var DivaEngine = /*#__PURE__*/function () {
23726
23609
  key: "addPartilstToPartlistArticlesToLoad",
23727
23610
  value: function addPartilstToPartlistArticlesToLoad(myPartListPos, partlistArticlesToLoad, partlistGroup, newConfigValues, myDecisionVal, groupDecisionVal, decisionNumber) {
23728
23611
  var _myPartListPos$Option,
23729
- _this4 = this;
23612
+ _this2 = this;
23730
23613
  var allDecisions = this.article.catalogArticle.articleDecisions;
23731
23614
  var decisions = myPartListPos.PartListPosDecisionsAndPosCounts;
23732
23615
  var optionsForPrint = (_myPartListPos$Option = myPartListPos.OptionsForPrint) === null || _myPartListPos$Option === void 0 ? void 0 : _myPartListPos$Option.split(';');
23733
23616
  var optionImgForPrint = myPartListPos.OptionImgForPrint ? 'OPT' + myPartListPos.OptionImgForPrint : undefined;
23734
- var _loop4 = function _loop4() {
23617
+ var _loop3 = function _loop3() {
23735
23618
  var myRuleDesc = '';
23736
23619
  var myRuleDesc_locales = undefined;
23737
23620
  var articleCodex = myPartListPos.ItemRefArticles[d].ArticleCodex;
23738
23621
  var catalogCodex = myPartListPos.ItemRefArticles[d].CatalogCodex;
23739
23622
  var retailArticleNr = myPartListPos.RetailArticleNr && myPartListPos.RetailArticleNr != '' ? myPartListPos.RetailArticleNr : undefined;
23740
- if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' && _this4.article.CatalogData.doUseRuleDescForPartListArticles() || myPartListPos.RetailArticleNr == 'CUST')) {
23741
- myRuleDesc = DivaUtils__default["default"].getRuleDescription(myDecisionVal.Rule, _this4.article.articleOptionStates, _this4.article.set.api.ruleDescSeperator());
23742
- myRuleDesc_locales = DivaUtils__default["default"].getRuleDescription_locales(myDecisionVal.Rule, _this4.article.articleOptionStates, _this4.article.set.api.ruleDescSeperator());
23623
+ if (myDecisionVal && (myDecisionVal.Rule && myDecisionVal.Rule != '' && _this2.article.CatalogData.doUseRuleDescForPartListArticles() || myPartListPos.RetailArticleNr == 'CUST')) {
23624
+ myRuleDesc = DivaUtils__default["default"].getRuleDescription(myDecisionVal.Rule, _this2.article.articleOptionStates, _this2.article.set.api.ruleDescSeperator());
23625
+ myRuleDesc_locales = DivaUtils__default["default"].getRuleDescription_locales(myDecisionVal.Rule, _this2.article.articleOptionStates, _this2.article.set.api.ruleDescSeperator());
23743
23626
  }
23744
23627
  var initDecisions = decisions.filter(function (decision) {
23745
23628
  return decision.RelationType !== 'PosCount';
@@ -23749,7 +23632,7 @@ var DivaEngine = /*#__PURE__*/function () {
23749
23632
  });
23750
23633
  });
23751
23634
  var quanitity = 1;
23752
- if (_this4.article.CatalogData.useDecisionPosCountValue) {
23635
+ if (_this2.article.CatalogData.useDecisionPosCountValue) {
23753
23636
  var _decision$DOC;
23754
23637
  // get SetPosCountValue from decsion action if defined and else use myPartListPos.PosCountValue;
23755
23638
  var decision = decisionNumber ? allDecisions.find(function (d) {
@@ -23764,13 +23647,13 @@ var DivaEngine = /*#__PURE__*/function () {
23764
23647
  return a.SetPosCountValue !== undefined;
23765
23648
  })) === null || _decision$DOC === void 0 ? void 0 : _decision$DOC.SetPosCountValue;
23766
23649
  quanitity = setPosCountValue !== undefined ? setPosCountValue : myPartListPos.PosCountValue;
23767
- } else if (_this4.article.CatalogData.usePosCountValue) {
23650
+ } else if (_this2.article.CatalogData.usePosCountValue) {
23768
23651
  quanitity = myPartListPos.PosCountValue;
23769
23652
  }
23770
- quanitity = quanitity * _this4.article.quantity;
23771
- var previousPartlistArticle = _this4.article.getPreviousPartlistArticle(articleCodex);
23653
+ quanitity = quanitity * _this2.article.quantity;
23654
+ var previousPartlistArticle = _this2.article.getPreviousPartlistArticle(articleCodex);
23772
23655
  var initDecisionsFiltered = [];
23773
- var _loop5 = function _loop5(i) {
23656
+ var _loop4 = function _loop4(i) {
23774
23657
  if (initDecisions[i] && !initDecisionsFiltered.find(function (d) {
23775
23658
  return d.Number == initDecisions[i].Number;
23776
23659
  })) {
@@ -23778,18 +23661,18 @@ var DivaEngine = /*#__PURE__*/function () {
23778
23661
  }
23779
23662
  };
23780
23663
  for (var i = 0; i < initDecisions.length; i++) {
23781
- _loop5(i);
23664
+ _loop4(i);
23782
23665
  }
23783
23666
  if (quanitity >= 1) {
23784
23667
  var _myDecisionVal$Rule;
23785
23668
  partlistArticlesToLoad.push({
23786
- CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex : _this4.article.catalogCodex,
23669
+ CatalogCodex: catalogCodex !== null && catalogCodex !== void 0 ? catalogCodex : _this2.article.catalogCodex,
23787
23670
  BasketID: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.basketId,
23788
23671
  ArticleCodex: articleCodex,
23789
23672
  RetailArticleNr: retailArticleNr,
23790
23673
  RetailPrefix: myPartListPos.RetailPrefix,
23791
23674
  Quantity: quanitity,
23792
- PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? DivaUtils__default["default"].getOptionValuePairsByRule((_myDecisionVal$Rule = myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule) !== null && _myDecisionVal$Rule !== void 0 ? _myDecisionVal$Rule : '', _this4.article.VariantValues) : undefined,
23675
+ PartlistRule: (groupDecisionVal ? groupDecisionVal.Rule + ' && ' : '') + myDecisionVal ? DivaUtils__default["default"].getOptionValuePairsByRule((_myDecisionVal$Rule = myDecisionVal === null || myDecisionVal === void 0 ? void 0 : myDecisionVal.Rule) !== null && _myDecisionVal$Rule !== void 0 ? _myDecisionVal$Rule : '', _this2.article.VariantValues) : undefined,
23793
23676
  partlistDecisionNo: decisionNumber,
23794
23677
  SupplierOrderCodex: myPartListPos.SupplierOrderCodex,
23795
23678
  initDecisions: initDecisionsFiltered,
@@ -23798,7 +23681,7 @@ var DivaEngine = /*#__PURE__*/function () {
23798
23681
  RuleDesc_locales: myRuleDesc_locales,
23799
23682
  PosInvisibility: myPartListPos.PosInvisibility,
23800
23683
  ConfigurationMode: myPartListPos.ConfigurationMode,
23801
- VariantValues: _this4.article.variantValuesForPla(myPartListPos.ConfigurationMode, previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues, newConfigValues),
23684
+ VariantValues: _this2.article.variantValuesForPla(myPartListPos.ConfigurationMode, previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues, newConfigValues),
23802
23685
  VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
23803
23686
  optionImgForPrint: optionImgForPrint,
23804
23687
  optionsForPrint: optionsForPrint
@@ -23807,7 +23690,7 @@ var DivaEngine = /*#__PURE__*/function () {
23807
23690
  }
23808
23691
  };
23809
23692
  for (var d = 0; d < myPartListPos.ItemRefArticles.length; d++) {
23810
- _loop4();
23693
+ _loop3();
23811
23694
  }
23812
23695
  return partlistArticlesToLoad;
23813
23696
  }
@@ -23846,7 +23729,7 @@ var DivaEngine = /*#__PURE__*/function () {
23846
23729
  }, {
23847
23730
  key: "calcConfigPrice",
23848
23731
  value: function calcConfigPrice(maxPriceOfGroupCodex, digits) {
23849
- var _this5 = this,
23732
+ var _this3 = this,
23850
23733
  _this$article$catalog4;
23851
23734
  //Wenn im Planer für dieses Shape mehere Rules gibt, müssen wir diese jetzt prüfen, ob jetzt ein anderes shape gültig ist.
23852
23735
  //wenn ja, hier neues shape übergeben
@@ -23879,12 +23762,12 @@ var DivaEngine = /*#__PURE__*/function () {
23879
23762
  }
23880
23763
 
23881
23764
  //mengen und größenabhängige Preisberechungn.
23882
- var _iterator11 = _createForOfIteratorHelper$8(this.article.articleOptionStates.values()),
23883
- _step11;
23765
+ var _iterator5 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
23766
+ _step5;
23884
23767
  try {
23885
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
23768
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
23886
23769
  var _ops$addToMeasure;
23887
- var ops = _step11.value;
23770
+ var ops = _step5.value;
23888
23771
  var OP = ops.optionCodex;
23889
23772
  var mUnit = ops.measureUnit;
23890
23773
  var pUnit = ops.priceUnit;
@@ -23967,61 +23850,61 @@ var DivaEngine = /*#__PURE__*/function () {
23967
23850
  }
23968
23851
  //jetzt nochmal prozentuelle Preise mit TargetOption berechnen
23969
23852
  } catch (err) {
23970
- _iterator11.e(err);
23853
+ _iterator5.e(err);
23971
23854
  } finally {
23972
- _iterator11.f();
23855
+ _iterator5.f();
23973
23856
  }
23974
- var _iterator12 = _createForOfIteratorHelper$8(this.article.articleOptionStates.values()),
23975
- _step12;
23857
+ var _iterator6 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
23858
+ _step6;
23976
23859
  try {
23977
- for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
23978
- var _ops4 = _step12.value;
23979
- var targetPPGPrefixes = _ops4.targetPPGPrefixes;
23860
+ for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
23861
+ var _ops5 = _step6.value;
23862
+ var targetPPGPrefixes = _ops5.targetPPGPrefixes;
23980
23863
  if (!targetPPGPrefixes) continue;
23981
- var _loop7 = function _loop7() {
23864
+ var _loop6 = function _loop6() {
23982
23865
  var targetPrefix = targetPPGPrefixes[_i6];
23983
- var priceRef = _this5.article.priceRefs.find(function (item) {
23866
+ var priceRef = _this3.article.priceRefs.find(function (item) {
23984
23867
  var _item$PPG;
23985
23868
  return ((_item$PPG = item.PPG) === null || _item$PPG === void 0 ? void 0 : _item$PPG.split('_')[0]) == targetPrefix;
23986
23869
  });
23987
23870
  if (priceRef) {
23988
- if (_ops4.isPercentage) {
23989
- priceRef.calcPrice = priceRef.Price * (1 + _ops4.calcPrice);
23871
+ if (_ops5.isPercentage) {
23872
+ priceRef.calcPrice = priceRef.Price * (1 + _ops5.calcPrice);
23990
23873
  }
23991
23874
  }
23992
23875
  };
23993
23876
  for (var _i6 = 0; _i6 < targetPPGPrefixes.length; _i6++) {
23994
- _loop7();
23877
+ _loop6();
23995
23878
  }
23996
23879
  }
23997
23880
  } catch (err) {
23998
- _iterator12.e(err);
23881
+ _iterator6.e(err);
23999
23882
  } finally {
24000
- _iterator12.f();
23883
+ _iterator6.f();
24001
23884
  }
24002
23885
  for (var _i3 = 0; _i3 < this.article.priceRefs.length; _i3++) {
24003
23886
  var basePriceRef = this.article.priceRefs[_i3];
24004
23887
  if (!basePriceRef.TargetPPGPrefixes) continue;
24005
- var _loop6 = function _loop6() {
23888
+ var _loop5 = function _loop5() {
24006
23889
  var targetPrefix = basePriceRef.TargetPPGPrefixes[_j];
24007
23890
  var myArtOpv;
24008
- var priceRef = _this5.article.priceRefs.find(function (item) {
23891
+ var priceRef = _this3.article.priceRefs.find(function (item) {
24009
23892
  return item.PPG && item.PPG.split('_')[0] == targetPrefix;
24010
23893
  });
24011
23894
  if (!priceRef) {
24012
- var _iterator13 = _createForOfIteratorHelper$8(_this5.article.articleOptionStates.values()),
24013
- _step13;
23895
+ var _iterator7 = _createForOfIteratorHelper$8(_this3.article.articleOptionStates),
23896
+ _step7;
24014
23897
  try {
24015
- for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
24016
- var ops = _step13.value;
23898
+ for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
23899
+ var ops = _step7.value;
24017
23900
  if (ops.ppg && ops.ppg.split('_')[0] == targetPrefix) {
24018
23901
  myArtOpv = ops;
24019
23902
  }
24020
23903
  }
24021
23904
  } catch (err) {
24022
- _iterator13.e(err);
23905
+ _iterator7.e(err);
24023
23906
  } finally {
24024
- _iterator13.f();
23907
+ _iterator7.f();
24025
23908
  }
24026
23909
  }
24027
23910
 
@@ -24037,7 +23920,7 @@ var DivaEngine = /*#__PURE__*/function () {
24037
23920
  }
24038
23921
  };
24039
23922
  for (var _j = 0; _j < basePriceRef.TargetPPGPrefixes.length; _j++) {
24040
- _loop6();
23923
+ _loop5();
24041
23924
  }
24042
23925
  }
24043
23926
  for (var _i4 = 0; _i4 < this.article.priceRefs.length; _i4++) {
@@ -24047,36 +23930,36 @@ var DivaEngine = /*#__PURE__*/function () {
24047
23930
  myArticleBasePrice += priceRef.Price ? DivaUtils__default["default"].decimalAdjust('round', (_priceRef$calcPrice = priceRef.calcPrice) !== null && _priceRef$calcPrice !== void 0 ? _priceRef$calcPrice : priceRef.Price, digits) : 0.0;
24048
23931
  }
24049
23932
  var articleUsedCalcPrice = myArticleBasePrice;
24050
- var _iterator14 = _createForOfIteratorHelper$8(this.article.articleOptionStates.values()),
24051
- _step14;
23933
+ var _iterator8 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
23934
+ _step8;
24052
23935
  try {
24053
- for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
24054
- var tmpOps = _step14.value;
23936
+ for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
23937
+ var tmpOps = _step8.value;
24055
23938
  articleUsedCalcPrice = this.getOptionPrice(articleUsedCalcPrice, tmpOps.option, digits);
24056
23939
  }
24057
23940
 
24058
23941
  //jetzt nochmal prozentuelle Preise mit GLOBAL tarbetoption berechnen
24059
23942
  /* TODO ABklären mit Franz - ops hat nie die Optionen - targetPPGPrefixes - ich glaube hier sollte article.priceRefs durchlaufen werden. */
24060
23943
  } catch (err) {
24061
- _iterator14.e(err);
23944
+ _iterator8.e(err);
24062
23945
  } finally {
24063
- _iterator14.f();
23946
+ _iterator8.f();
24064
23947
  }
24065
- var _iterator15 = _createForOfIteratorHelper$8(this.article.articleOptionStates.values()),
24066
- _step15;
23948
+ var _iterator9 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
23949
+ _step9;
24067
23950
  try {
24068
- for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
24069
- var _ops5$targetPPGPrefix, _ops5$targetPPGPrefix2;
24070
- var _ops5 = _step15.value;
24071
- var targetOption = (_ops5$targetPPGPrefix = (_ops5$targetPPGPrefix2 = _ops5.targetPPGPrefixes) === null || _ops5$targetPPGPrefix2 === void 0 ? void 0 : _ops5$targetPPGPrefix2[0]) !== null && _ops5$targetPPGPrefix !== void 0 ? _ops5$targetPPGPrefix : _ops5.targetOption;
24072
- if (_ops5.isPercentage && targetOption == 'GLOBAL') {
24073
- articleUsedCalcPrice = articleUsedCalcPrice * (1 + _ops5.calcPrice);
23951
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
23952
+ var _ops6$targetPPGPrefix, _ops6$targetPPGPrefix2;
23953
+ var _ops6 = _step9.value;
23954
+ var targetOption = (_ops6$targetPPGPrefix = (_ops6$targetPPGPrefix2 = _ops6.targetPPGPrefixes) === null || _ops6$targetPPGPrefix2 === void 0 ? void 0 : _ops6$targetPPGPrefix2[0]) !== null && _ops6$targetPPGPrefix !== void 0 ? _ops6$targetPPGPrefix : _ops6.targetOption;
23955
+ if (_ops6.isPercentage && targetOption == 'GLOBAL') {
23956
+ articleUsedCalcPrice = articleUsedCalcPrice * (1 + _ops6.calcPrice);
24074
23957
  }
24075
23958
  }
24076
23959
  } catch (err) {
24077
- _iterator15.e(err);
23960
+ _iterator9.e(err);
24078
23961
  } finally {
24079
- _iterator15.f();
23962
+ _iterator9.f();
24080
23963
  }
24081
23964
  for (var _i5 = 0; _i5 < this.article.priceRefs.length; _i5++) {
24082
23965
  var _priceRef = this.article.priceRefs[_i5];
@@ -24218,22 +24101,22 @@ var DivaEngine = /*#__PURE__*/function () {
24218
24101
  if (a[i].trim() != '') {
24219
24102
  var searchOpt = 'OPT' + a[i].trim();
24220
24103
  //Optionsbaum des Artikels durchsuchen
24221
- var _iterator16 = _createForOfIteratorHelper$8(this.article.articleOptionStates.values()),
24222
- _step16;
24104
+ var _iterator10 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
24105
+ _step10;
24223
24106
  try {
24224
- for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
24225
- var _ops6 = _step16.value;
24226
- if (_ops6.ocd == searchOpt || _ops6.optionCodex == searchOpt) {
24227
- if (_ops6 && _ops6.price > 0) {
24228
- myPercBasePrice += _ops6.price * _ops6.quantity;
24107
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
24108
+ var _ops7 = _step10.value;
24109
+ if (_ops7.ocd == searchOpt || _ops7.optionCodex == searchOpt) {
24110
+ if (_ops7 && _ops7.price > 0) {
24111
+ myPercBasePrice += _ops7.price * _ops7.quantity;
24229
24112
  break;
24230
24113
  }
24231
24114
  }
24232
24115
  }
24233
24116
  } catch (err) {
24234
- _iterator16.e(err);
24117
+ _iterator10.e(err);
24235
24118
  } finally {
24236
- _iterator16.f();
24119
+ _iterator10.f();
24237
24120
  }
24238
24121
  }
24239
24122
  }
@@ -24253,7 +24136,7 @@ var DivaEngine = /*#__PURE__*/function () {
24253
24136
  value: function updateConfigDependentMedia() {
24254
24137
  var _this$article$catalog5,
24255
24138
  _this$article$catalog6,
24256
- _this6 = this;
24139
+ _this4 = this;
24257
24140
  var catalogData = this.article.CatalogData;
24258
24141
  //articlebild berechnung
24259
24142
 
@@ -24279,48 +24162,38 @@ var DivaEngine = /*#__PURE__*/function () {
24279
24162
  }
24280
24163
 
24281
24164
  // this functions updates the images of OPVs that depend on rules
24282
- var _iterator17 = _createForOfIteratorHelper$8(this.article.articleOptionStates.values()),
24283
- _step17;
24165
+ var _iterator11 = _createForOfIteratorHelper$8(this.article.articleOptionStates),
24166
+ _step11;
24284
24167
  try {
24285
- for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
24286
- var ops = _step17.value;
24287
- var _iterator18 = _createForOfIteratorHelper$8(ops.visibleOptionValues),
24288
- _step18;
24289
- try {
24290
- for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
24291
- var _step18$value = _slicedToArray__default["default"](_step18.value, 2),
24292
- jKey = _step18$value[0],
24293
- opv = _step18$value[1];
24294
- if (opv.images) {
24295
- var imageFound = false;
24296
- for (var _i8 = 0; _i8 < opv.images.length; _i8++) {
24297
- var image = opv.images[_i8];
24298
- var rule = image.jsFormula;
24299
- if (rule.includes('ARTICLECODEX')) {
24300
- rule = rule.replace(/ARTICLECODEX/g, "'" + this.article.articleCodex + "'");
24301
- }
24302
- if (rule && this.article.evalRule(rule)) {
24303
- ops.editVisibleOPVsImages(opv.codex, catalogData.getCatImageURL(image.fileName, ''));
24304
- imageFound = true;
24305
- break;
24306
- }
24168
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
24169
+ var ops = _step11.value;
24170
+ for (var jKey in ops.visibleOptionValues) {
24171
+ var opv = ops.visibleOptionValues[jKey];
24172
+ if (opv.images) {
24173
+ var imageFound = false;
24174
+ for (var _i8 = 0; _i8 < opv.images.length; _i8++) {
24175
+ var image = opv.images[_i8];
24176
+ var rule = image.jsFormula;
24177
+ if (rule.includes('ARTICLECODEX')) {
24178
+ rule = rule.replace(/ARTICLECODEX/g, "'" + this.article.articleCodex + "'");
24179
+ }
24180
+ if (rule && this.article.evalRule(rule)) {
24181
+ ops.editVisibleOPVsImages(opv.codex, catalogData.getCatImageURL(image.fileName, ''));
24182
+ imageFound = true;
24183
+ break;
24307
24184
  }
24308
- if (!imageFound) ops.editVisibleOPVsImages(opv.codex);
24309
24185
  }
24186
+ if (!imageFound) ops.editVisibleOPVsImages(opv.codex);
24310
24187
  }
24311
- } catch (err) {
24312
- _iterator18.e(err);
24313
- } finally {
24314
- _iterator18.f();
24315
24188
  }
24316
24189
  }
24317
24190
 
24318
24191
  // this function calculates an Svg to the current configuration if neccessary (SVG Tausch)
24319
24192
  // if the Article has no SVG Tausch nothing is done
24320
24193
  } catch (err) {
24321
- _iterator17.e(err);
24194
+ _iterator11.e(err);
24322
24195
  } finally {
24323
- _iterator17.f();
24196
+ _iterator11.f();
24324
24197
  }
24325
24198
  var newSVGFile = null;
24326
24199
  var svgChangedViaSvgTausch = false;
@@ -24382,7 +24255,7 @@ var DivaEngine = /*#__PURE__*/function () {
24382
24255
  code: 'WC_0011',
24383
24256
  custom: {
24384
24257
  formulas: (_plannerCatArt$topSvg = plannerCatArt.topSvgsWithFormula) === null || _plannerCatArt$topSvg === void 0 ? void 0 : _plannerCatArt$topSvg.map(function (item) {
24385
- return DivaUtils__default["default"].getRuleByFormula(item.JsFormula, _this6.article.catalogCodex, catalogData.multiselectOptions);
24258
+ return DivaUtils__default["default"].getRuleByFormula(item.JsFormula, _this4.article.catalogCodex, catalogData.multiselectOptions);
24386
24259
  }),
24387
24260
  catalogName: catalogData.catalogName,
24388
24261
  catalogCodex: this.article.catalogCodex,
@@ -24407,8 +24280,8 @@ var DivaEngine = /*#__PURE__*/function () {
24407
24280
  }]);
24408
24281
  }();
24409
24282
 
24410
- function ownKeys$e(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; }
24411
- function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24283
+ function ownKeys$f(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; }
24284
+ function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24412
24285
  function _createForOfIteratorHelper$7(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$7(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
24413
24286
  function _unsupportedIterableToArray$7(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$7(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$7(r, a) : void 0; } }
24414
24287
  function _arrayLikeToArray$7(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -24463,12 +24336,12 @@ var IDMEngine = /*#__PURE__*/function () {
24463
24336
  decisions[i].disableHistory = [];
24464
24337
  decisions[i].activeCombination = undefined;
24465
24338
  }
24466
- var _iterator = _createForOfIteratorHelper$7(this.article.articleOptionStates.values()),
24339
+ var _iterator = _createForOfIteratorHelper$7(this.article.articleOptionStates),
24467
24340
  _step;
24468
24341
  try {
24469
24342
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
24470
24343
  var ops = _step.value;
24471
- ops.updateVisibleOptionValues(ops.option.articleOptionValues);
24344
+ ops.updateVisibleOptionValues(_objectSpread$f({}, ops.option.articleOptionValues));
24472
24345
  if (!ops.val) this.updateArtOPV(this.article.getDefaultOpv(ops.visibleOptionValues), ops.optionCodex, ops, undefined);
24473
24346
  ops.definedBySetFeatureFixed = false;
24474
24347
  }
@@ -24534,15 +24407,14 @@ var IDMEngine = /*#__PURE__*/function () {
24534
24407
  value: function sortFeatures(featureNos) {
24535
24408
  var _this = this;
24536
24409
  return featureNos.sort(function (a, b) {
24537
- var opsArray = Array.from(_this.article.articleOptionStates.values());
24538
- var aIndex = opsArray.findIndex(function (ops) {
24410
+ var aIndex = _this.article.articleOptionStates.findIndex(function (ops) {
24539
24411
  return ops.optionCodex == a;
24540
24412
  });
24541
- var bIndex = opsArray.findIndex(function (ops) {
24413
+ var bIndex = _this.article.articleOptionStates.findIndex(function (ops) {
24542
24414
  return ops.optionCodex == b;
24543
24415
  });
24544
- if (aIndex == -1) aIndex = opsArray.length;
24545
- if (bIndex == -1) bIndex = opsArray.length;
24416
+ if (aIndex == -1) aIndex = _this.article.articleOptionStates.length;
24417
+ if (bIndex == -1) bIndex = _this.article.articleOptionStates.length;
24546
24418
  return aIndex - bIndex;
24547
24419
  });
24548
24420
  }
@@ -24558,7 +24430,7 @@ var IDMEngine = /*#__PURE__*/function () {
24558
24430
  var _loop = function _loop() {
24559
24431
  var featureNo = sortedDeatureRefs[p];
24560
24432
  var ops = _this2.article.getArticleOptionState(featureNo);
24561
- if (!validOptions[featureNo]) validOptions[featureNo] = new Map();
24433
+ if (!validOptions[featureNo]) validOptions[featureNo] = {};
24562
24434
  if (!ops) return 1; // break
24563
24435
  var possibleOPVs = ops.visibleOptionValues;
24564
24436
 
@@ -24620,12 +24492,12 @@ var IDMEngine = /*#__PURE__*/function () {
24620
24492
  }
24621
24493
  if (ruleValid) {
24622
24494
  ruleWasValidOnce = true;
24623
- validOptions[featureNo] = new Map(possibleOPVs);
24624
- if (possibleOPVs.get(optionNo) != null) validOptions[featureNo]["delete"](optionNo);
24495
+ validOptions[featureNo] = _objectSpread$f({}, possibleOPVs);
24496
+ if (possibleOPVs[optionNo] != null) delete validOptions[featureNo][optionNo];
24625
24497
  }
24626
24498
  } else {
24627
24499
  ruleWasValidOnce = true;
24628
- if (possibleOPVs.get(optionNo) != null) validOptions[featureNo].set(optionNo, possibleOPVs.get(optionNo));
24500
+ if (possibleOPVs[optionNo] != null) validOptions[featureNo][optionNo] = possibleOPVs[optionNo];
24629
24501
  }
24630
24502
  }
24631
24503
  if (!ruleWasValidOnce) {
@@ -24633,7 +24505,7 @@ var IDMEngine = /*#__PURE__*/function () {
24633
24505
  for (var x = 0; x < ops.visibleOPVKeys.length; x++) {
24634
24506
  var _opv = ops.visibleOPVKeys[x];
24635
24507
  var doesNotExists = !!(ref.options.includes(_opv) && (ref.operator == 1 || ref.operator == 3));
24636
- if (!doesNotExists) validOptions[featureNo].set(_opv, ops.visibleOptionValues.get(_opv));
24508
+ if (!doesNotExists) validOptions[featureNo][_opv] = ops.visibleOptionValues[_opv];
24637
24509
  }
24638
24510
  }
24639
24511
  } else {
@@ -24641,15 +24513,16 @@ var IDMEngine = /*#__PURE__*/function () {
24641
24513
  }
24642
24514
  }
24643
24515
  }
24644
- var schnittmenge = new Map(Array.from(possibleOPVs).filter(function (_ref) {
24645
- var _ref2 = _slicedToArray__default["default"](_ref, 1),
24646
- key = _ref2[0];
24647
- return validOptions[featureNo].has(key);
24648
- }));
24516
+ var schnittmenge = {};
24517
+ for (var _key in possibleOPVs) {
24518
+ if (validOptions[featureNo][_key]) {
24519
+ schnittmenge[_key] = possibleOPVs[_key];
24520
+ }
24521
+ }
24649
24522
  possibleOPVs = schnittmenge;
24650
- ops.updateVisibleOptionValues(possibleOPVs);
24523
+ ops.updateVisibleOptionValues(Object.assign({}, possibleOPVs));
24651
24524
  var valCodex = ops.valCodex;
24652
- if ((!valCodex || !ops.visibleOptionValues.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
24525
+ if ((!valCodex || !ops.visibleOptionValues[valCodex]) && ops.visibleOPVKeys.length > 0) {
24653
24526
  if (_this2.article.CatalogData.useDiomexConfigLogic) {
24654
24527
  _this2.clearOP(featureNo, true);
24655
24528
  } else {
@@ -24678,7 +24551,7 @@ var IDMEngine = /*#__PURE__*/function () {
24678
24551
  var featureNo = sortedDeatureRefs[p];
24679
24552
  var ops = _this3.article.getArticleOptionStateFlat(featureNo);
24680
24553
  if (!ops) return 1; // break
24681
- if (!invalidOptions[featureNo]) invalidOptions[featureNo] = new Map();
24554
+ if (!invalidOptions[featureNo]) invalidOptions[featureNo] = {};
24682
24555
  var possibleOPVs = ops.visibleOptionValues;
24683
24556
  //Erste Option ist immer eine Bedingung!
24684
24557
  if (p === sortedDeatureRefs.length - 1) {
@@ -24716,23 +24589,25 @@ var IDMEngine = /*#__PURE__*/function () {
24716
24589
  if (ref) {
24717
24590
  for (var i = 0; i < ref.options.length; i++) {
24718
24591
  var optionNo = ref.options[i];
24719
- var myOPVData = possibleOPVs.get(optionNo);
24592
+ var myOPVData = possibleOPVs[optionNo];
24720
24593
  if (myOPVData != null) {
24721
- invalidOptions[featureNo].set(optionNo, myOPVData); //wenn es eine DecisionType 0 ist muss ich diese OPV von den gültigen entfernen
24594
+ invalidOptions[featureNo][optionNo] = myOPVData; //wenn es eine DecisionType 0 ist muss ich diese OPV von den gültigen entfernen
24722
24595
  }
24723
24596
  }
24724
24597
  }
24725
24598
  }
24726
24599
  }
24727
- var schnittmenge = new Map(Array.from(possibleOPVs).filter(function (_ref3) {
24728
- var _ref4 = _slicedToArray__default["default"](_ref3, 1),
24729
- key = _ref4[0];
24730
- return !invalidOptions[featureNo].has(key);
24731
- }));
24600
+ var schnittmenge = {};
24601
+ for (var key in possibleOPVs) {
24602
+ if (!invalidOptions[featureNo][key]) {
24603
+ schnittmenge[key] = possibleOPVs[key];
24604
+ }
24605
+ }
24606
+ // someDecisionExistsForOption = true;
24732
24607
  possibleOPVs = schnittmenge;
24733
- ops.updateVisibleOptionValues(possibleOPVs);
24608
+ ops.updateVisibleOptionValues(Object.assign({}, possibleOPVs));
24734
24609
  var valCodex = ops.valCodex;
24735
- if ((!valCodex || !ops.visibleOptionValues.get(valCodex)) && ops.visibleOPVKeys.length > 0) {
24610
+ if ((!valCodex || !ops.visibleOptionValues[valCodex]) && ops.visibleOPVKeys.length > 0) {
24736
24611
  if (_this3.article.CatalogData.useDiomexConfigLogic) {
24737
24612
  _this3.clearOP(featureNo, true);
24738
24613
  } else {
@@ -24750,22 +24625,11 @@ var IDMEngine = /*#__PURE__*/function () {
24750
24625
  }, {
24751
24626
  key: "evalValueWithOperator",
24752
24627
  value: function evalValueWithOperator(op, value, check) {
24753
- switch (op) {
24754
- case 0:
24755
- case 2:
24756
- return value.includes(check);
24757
- case 1:
24758
- case 3:
24759
- return !value.includes(check);
24760
- case 4:
24761
- case 5:
24762
- throw new Error('gt and lt not implemented');
24763
- case 6:
24764
- case 7:
24765
- throw new Error('ge and le not implemented');
24766
- default:
24767
- throw new Error('decisions operator ' + op + ' not implemented');
24768
- }
24628
+ if (op == 0 || op == 2) return value.includes(check);
24629
+ if (op == 1 || op == 3) return !value.includes(check);
24630
+ if (op == 4 || op == 5) throw new Error('gt and lt not implemented');
24631
+ if (op == 6 || op == 7) throw new Error('ge and le not implemented');
24632
+ throw new Error('decisions operator ' + op + ' not implemented');
24769
24633
  }
24770
24634
  }, {
24771
24635
  key: "evalType2Decision",
@@ -24773,9 +24637,9 @@ var IDMEngine = /*#__PURE__*/function () {
24773
24637
  var _decision$optionCombi2;
24774
24638
  var hasSetFeatureInvisible = {};
24775
24639
  if (!((_decision$optionCombi2 = decision.optionCombinations) !== null && _decision$optionCombi2 !== void 0 && _decision$optionCombi2.length)) return;
24776
- var _ref5 = this.getMatchingOptionCombination(decision.optionCombinations),
24777
- _ref6 = _slicedToArray__default["default"](_ref5, 1),
24778
- combination = _ref6[0];
24640
+ var _ref = this.getMatchingOptionCombination(decision.optionCombinations),
24641
+ _ref2 = _slicedToArray__default["default"](_ref, 1),
24642
+ combination = _ref2[0];
24779
24643
  if (combination) decision.activeCombination = combination.sequence;
24780
24644
  if (combination !== null && combination !== void 0 && combination.projectActions) {
24781
24645
  if (combination.projectActions.disableDecision) this.evalDisableDecision(combination.projectActions.disableDecision, decision, allDecisions, true);
@@ -24916,7 +24780,7 @@ var IDMEngine = /*#__PURE__*/function () {
24916
24780
  value: function assignOptionValue(featureNo, optionNo, setBy, freeText) {
24917
24781
  var ops = this.article.getArticleOptionState(featureNo);
24918
24782
  if (!ops) throw new Error('myOptionState ' + featureNo + ' is undefined');
24919
- var option = ops.visibleOptionValues.get(optionNo);
24783
+ var option = ops.visibleOptionValues[optionNo];
24920
24784
  if (option) {
24921
24785
  if (setBy == 'fix') ops.definedBySetFeatureFixed = true;
24922
24786
  ops.valueWasSet = true;
@@ -25022,7 +24886,7 @@ var IDMEngine = /*#__PURE__*/function () {
25022
24886
  nr: priceFeatureGroup.priceFeatureGroupNo,
25023
24887
  variantValues: this.article.VariantValues,
25024
24888
  text: DivaUtils__default["default"].getLocals(priceFeatureGroup.priceFeatureGroupText, this.article.set.api.getLanguage()) + ' ' + (finish ? (_this$article$catalog3 = this.article.catalogArticle.idmPrices) === null || _this$article$catalog3 === void 0 || (_this$article$catalog3 = _this$article$catalog3.prices['PRFG' + priceFeatureGroup.priceFeatureGroupNo + '_' + finish.priceField]) === null || _this$article$catalog3 === void 0 ? void 0 : _this$article$catalog3.toString() : ''),
25025
- priceFeatureGroup: _objectSpread$e(_objectSpread$e({}, priceFeatureGroup), {}, {
24889
+ priceFeatureGroup: _objectSpread$f(_objectSpread$f({}, priceFeatureGroup), {}, {
25026
24890
  activeCombination: finish === null || finish === void 0 ? void 0 : finish.sequence
25027
24891
  })
25028
24892
  });
@@ -25129,9 +24993,9 @@ var IDMEngine = /*#__PURE__*/function () {
25129
24993
  if (myPartListPos.decisionPosCount) {
25130
24994
  // get SetPosCountValue from decsion action if defined and else use myPartListPos.PosCountValue;
25131
24995
  var decision = this.article.CatalogData.getDecisionsByNo([myPartListPos.decisionPosCount])[0];
25132
- var _ref7 = this.getMatchingOptionCombination(decision.optionCombinations),
25133
- _ref8 = _slicedToArray__default["default"](_ref7, 1),
25134
- combination = _ref8[0];
24996
+ var _ref3 = this.getMatchingOptionCombination(decision.optionCombinations),
24997
+ _ref4 = _slicedToArray__default["default"](_ref3, 1),
24998
+ combination = _ref4[0];
25135
24999
  if (combination) {
25136
25000
  var _combination$projectA;
25137
25001
  var posCountValueAction = (_combination$projectA = combination.projectActions) === null || _combination$projectA === void 0 ? void 0 : _combination$projectA.setPosCountValue;
@@ -25250,7 +25114,7 @@ var IDMEngine = /*#__PURE__*/function () {
25250
25114
  key: "updateIDMSpecificFeatures",
25251
25115
  value: function updateIDMSpecificFeatures() {
25252
25116
  //updaten idm planner specific options
25253
- var _iterator6 = _createForOfIteratorHelper$7(this.article.articleOptionStates.values()),
25117
+ var _iterator6 = _createForOfIteratorHelper$7(this.article.articleOptionStates),
25254
25118
  _step6;
25255
25119
  try {
25256
25120
  for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
@@ -25261,7 +25125,7 @@ var IDMEngine = /*#__PURE__*/function () {
25261
25125
  }
25262
25126
  if (ops.visibleCount && ops.IsIDMSpecialFeature) {
25263
25127
  var _validOpv;
25264
- var validOpvs = Array.from(ops.visibleOptionValues.values());
25128
+ var validOpvs = Object.values(ops.visibleOptionValues);
25265
25129
  if (ops.val) validOpvs.unshift(ops.val);
25266
25130
  var validOpv = undefined;
25267
25131
  for (var i = 0; i < validOpvs.length; i++) {
@@ -25295,27 +25159,27 @@ var IDMEngine = /*#__PURE__*/function () {
25295
25159
  }
25296
25160
  if ([97, 1097].includes((_myArtOPS$option$idmV3 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV3 !== void 0 ? _myArtOPS$option$idmV3 : 0)) {
25297
25161
  try {
25298
- var _ref9, _myArtOPS$measureValu;
25162
+ var _ref5, _myArtOPS$measureValu;
25299
25163
  this.article.doUpdatePlannerSize = true;
25300
- this.article.calcHeight = Math.round((Number((_ref9 = (_myArtOPS$measureValu = myArtOPS.measureValue) !== null && _myArtOPS$measureValu !== void 0 ? _myArtOPS$measureValu : myArtOPS.value) !== null && _ref9 !== void 0 ? _ref9 : myArtOPS.valueFromName) + Number.EPSILON) * 100) / 100;
25164
+ this.article.calcHeight = Math.round((Number((_ref5 = (_myArtOPS$measureValu = myArtOPS.measureValue) !== null && _myArtOPS$measureValu !== void 0 ? _myArtOPS$measureValu : myArtOPS.value) !== null && _ref5 !== void 0 ? _ref5 : myArtOPS.valueFromName) + Number.EPSILON) * 100) / 100;
25301
25165
  } catch (e) {
25302
25166
  LOG$f.warn('Invalid Planungdepth - IDMVariantenArt 97: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
25303
25167
  }
25304
25168
  }
25305
25169
  if ([96, 1096].includes((_myArtOPS$option$idmV4 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV4 !== void 0 ? _myArtOPS$option$idmV4 : 0) || myArtOPS.option.diameter) {
25306
25170
  try {
25307
- var _ref10, _myArtOPS$measureValu2;
25171
+ var _ref6, _myArtOPS$measureValu2;
25308
25172
  this.article.doUpdatePlannerSize = true;
25309
- this.article.calcDepth = Math.round((Number((_ref10 = (_myArtOPS$measureValu2 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu2 !== void 0 ? _myArtOPS$measureValu2 : myArtOPS.value) !== null && _ref10 !== void 0 ? _ref10 : myArtOPS.valueFromName) + Number.EPSILON) * 100) / 100;
25173
+ this.article.calcDepth = Math.round((Number((_ref6 = (_myArtOPS$measureValu2 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu2 !== void 0 ? _myArtOPS$measureValu2 : myArtOPS.value) !== null && _ref6 !== void 0 ? _ref6 : myArtOPS.valueFromName) + Number.EPSILON) * 100) / 100;
25310
25174
  } catch (e) {
25311
25175
  LOG$f.warn('Invalid Planungdepth - IDMVariantenArt 96: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
25312
25176
  }
25313
25177
  }
25314
25178
  if ([95, 1095].includes((_myArtOPS$option$idmV5 = myArtOPS.option.idmVariantenArt) !== null && _myArtOPS$option$idmV5 !== void 0 ? _myArtOPS$option$idmV5 : 0) || myArtOPS.option.diameter) {
25315
25179
  try {
25316
- var _ref11, _myArtOPS$measureValu3;
25180
+ var _ref7, _myArtOPS$measureValu3;
25317
25181
  this.article.doUpdatePlannerSize = true;
25318
- this.article.calcWidth = Math.round((Number((_ref11 = (_myArtOPS$measureValu3 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu3 !== void 0 ? _myArtOPS$measureValu3 : myArtOPS.value) !== null && _ref11 !== void 0 ? _ref11 : myArtOPS.valueFromName) + Number.EPSILON) * 100) / 100;
25182
+ this.article.calcWidth = Math.round((Number((_ref7 = (_myArtOPS$measureValu3 = myArtOPS.measureValue) !== null && _myArtOPS$measureValu3 !== void 0 ? _myArtOPS$measureValu3 : myArtOPS.value) !== null && _ref7 !== void 0 ? _ref7 : myArtOPS.valueFromName) + Number.EPSILON) * 100) / 100;
25319
25183
  } catch (e) {
25320
25184
  LOG$f.warn('Invalid Planungdepth - IDMVariantenArt 95: ' + myArtOPS.option.name + ' ' + myArtOPS.valName, e);
25321
25185
  }
@@ -25380,9 +25244,9 @@ var IDMEngine = /*#__PURE__*/function () {
25380
25244
  while (allKeys.find(function (key) {
25381
25245
  return formula.includes(key);
25382
25246
  })) {
25383
- var _key = allKeys.shift();
25384
- if (_key === undefined) break;
25385
- origFormula = origFormula.replaceAll(_key, keysMap[_key].toString());
25247
+ var _key2 = allKeys.shift();
25248
+ if (_key2 === undefined) break;
25249
+ origFormula = origFormula.replaceAll(_key2, keysMap[_key2].toString());
25386
25250
  }
25387
25251
  try {
25388
25252
  return eval(origFormula);
@@ -25434,50 +25298,40 @@ var IDMEngine = /*#__PURE__*/function () {
25434
25298
  }
25435
25299
 
25436
25300
  // this functions updates the images of OPVs that depend on rules
25437
- var _iterator8 = _createForOfIteratorHelper$7(this.article.articleOptionStates.values()),
25301
+ var _iterator8 = _createForOfIteratorHelper$7(this.article.articleOptionStates),
25438
25302
  _step8;
25439
25303
  try {
25440
25304
  for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
25441
25305
  var ops = _step8.value;
25442
- var _iterator9 = _createForOfIteratorHelper$7(ops.visibleOptionValues),
25443
- _step9;
25444
- try {
25445
- for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
25446
- var _step9$value = _slicedToArray__default["default"](_step9.value, 2),
25447
- jKey = _step9$value[0],
25448
- opv = _step9$value[1];
25449
- if (opv.images) {
25450
- var imageFound = false;
25451
- for (var _i2 = 0; _i2 < opv.images.length; _i2++) {
25452
- var _image$decisionNos2, _image$decisionNos3;
25453
- var _image = opv.images[_i2];
25454
- var _doUse = !((_image$decisionNos2 = _image.decisionNos) !== null && _image$decisionNos2 !== void 0 && _image$decisionNos2.length);
25455
- if ((_image$decisionNos3 = _image.decisionNos) !== null && _image$decisionNos3 !== void 0 && _image$decisionNos3.length) {
25456
- for (var _j2 = 0; _j2 < _image.decisionNos.length; _j2++) {
25457
- var _decision2 = catalogData.getDecisionByNo(_image.decisionNos[_j2]);
25458
- if (!_decision2) throw new Error('decision ' + _image.decisionNos[_j2] + ' not found');
25459
- var _this$getMatchingOpti9 = this.getMatchingOptionCombination(_decision2.optionCombinations),
25460
- _this$getMatchingOpti10 = _slicedToArray__default["default"](_this$getMatchingOpti9, 1),
25461
- _combination2 = _this$getMatchingOpti10[0];
25462
- if (_combination2) {
25463
- _doUse = true;
25464
- break;
25465
- }
25306
+ for (var jKey in ops.visibleOptionValues) {
25307
+ var opv = ops.visibleOptionValues[jKey];
25308
+ if (opv.images) {
25309
+ var imageFound = false;
25310
+ for (var _i2 = 0; _i2 < opv.images.length; _i2++) {
25311
+ var _image$decisionNos2, _image$decisionNos3;
25312
+ var _image = opv.images[_i2];
25313
+ var _doUse = !((_image$decisionNos2 = _image.decisionNos) !== null && _image$decisionNos2 !== void 0 && _image$decisionNos2.length);
25314
+ if ((_image$decisionNos3 = _image.decisionNos) !== null && _image$decisionNos3 !== void 0 && _image$decisionNos3.length) {
25315
+ for (var _j2 = 0; _j2 < _image.decisionNos.length; _j2++) {
25316
+ var _decision2 = catalogData.getDecisionByNo(_image.decisionNos[_j2]);
25317
+ if (!_decision2) throw new Error('decision ' + _image.decisionNos[_j2] + ' not found');
25318
+ var _this$getMatchingOpti9 = this.getMatchingOptionCombination(_decision2.optionCombinations),
25319
+ _this$getMatchingOpti10 = _slicedToArray__default["default"](_this$getMatchingOpti9, 1),
25320
+ _combination2 = _this$getMatchingOpti10[0];
25321
+ if (_combination2) {
25322
+ _doUse = true;
25323
+ break;
25466
25324
  }
25467
25325
  }
25468
- if (_doUse) {
25469
- ops.editVisibleOPVsImages(opv.codex, _image.url);
25470
- imageFound = true;
25471
- break;
25472
- }
25473
25326
  }
25474
- if (!imageFound) ops.editVisibleOPVsImages(opv.codex);
25327
+ if (_doUse) {
25328
+ ops.editVisibleOPVsImages(opv.codex, _image.url);
25329
+ imageFound = true;
25330
+ break;
25331
+ }
25475
25332
  }
25333
+ if (!imageFound) ops.editVisibleOPVsImages(opv.codex);
25476
25334
  }
25477
- } catch (err) {
25478
- _iterator9.e(err);
25479
- } finally {
25480
- _iterator9.f();
25481
25335
  }
25482
25336
  }
25483
25337
 
@@ -25583,8 +25437,8 @@ var IDMEngine = /*#__PURE__*/function () {
25583
25437
  function _createForOfIteratorHelper$6(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
25584
25438
  function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$6(r, a) : void 0; } }
25585
25439
  function _arrayLikeToArray$6(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
25586
- function ownKeys$d(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; }
25587
- function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
25440
+ function ownKeys$e(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; }
25441
+ function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
25588
25442
  var LOG$e = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
25589
25443
  var DivaArticle = /*#__PURE__*/function () {
25590
25444
  function DivaArticle(set, _basketId, initParams, articleData, catalogData) {
@@ -25675,7 +25529,7 @@ var DivaArticle = /*#__PURE__*/function () {
25675
25529
  this.doorPlannerData = this.shelfPlanData.DoorPlannerData;
25676
25530
  }
25677
25531
  this.initPlannerData(articleData);
25678
- this.articleOptionStatesData = new Map(); //Dieses Objekt speichert den aktuellen Werte, Zustand eines Optionsbaumes und Preise
25532
+ this.articleOptionStatesData = []; //Dieses Objekt speichert den aktuellen Werte, Zustand eines Optionsbaumes und Preise
25679
25533
  }
25680
25534
  return _createClass__default["default"](DivaArticle, [{
25681
25535
  key: "initEngine",
@@ -25824,7 +25678,7 @@ var DivaArticle = /*#__PURE__*/function () {
25824
25678
  var partlistArticle = this.partlistArticles[basketId];
25825
25679
  if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree || !excludeStandalonePla && partlistArticle.partlistArticleStandalone) partlistArticles[basketId] = partlistArticle;
25826
25680
  if (partlistArticle.hasPartlistArticle) {
25827
- partlistArticles = _objectSpread$d(_objectSpread$d({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible, excludeStandalonePla));
25681
+ partlistArticles = _objectSpread$e(_objectSpread$e({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible, excludeStandalonePla));
25828
25682
  }
25829
25683
  }
25830
25684
  return partlistArticles;
@@ -25833,8 +25687,8 @@ var DivaArticle = /*#__PURE__*/function () {
25833
25687
  key: "variantValuesForPla",
25834
25688
  value: function variantValuesForPla(configurationMode, previousPartlistArticleVariantValues, newConfigValues) {
25835
25689
  //if configurationMode is true its previous values are more important than the values of the parentelement because its standalone configurable
25836
- if (configurationMode) return _objectSpread$d(_objectSpread$d({}, newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}), previousPartlistArticleVariantValues !== null && previousPartlistArticleVariantValues !== void 0 ? previousPartlistArticleVariantValues : {});
25837
- return _objectSpread$d(_objectSpread$d({}, previousPartlistArticleVariantValues !== null && previousPartlistArticleVariantValues !== void 0 ? previousPartlistArticleVariantValues : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {});
25690
+ if (configurationMode) return _objectSpread$e(_objectSpread$e({}, newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}), previousPartlistArticleVariantValues !== null && previousPartlistArticleVariantValues !== void 0 ? previousPartlistArticleVariantValues : {});
25691
+ return _objectSpread$e(_objectSpread$e({}, previousPartlistArticleVariantValues !== null && previousPartlistArticleVariantValues !== void 0 ? previousPartlistArticleVariantValues : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {});
25838
25692
  }
25839
25693
  }, {
25840
25694
  key: "partlistArticlesAsArray",
@@ -26066,7 +25920,7 @@ var DivaArticle = /*#__PURE__*/function () {
26066
25920
  key: "getTabgroupsAsString",
26067
25921
  get: function get() {
26068
25922
  var ret = '';
26069
- var _iterator = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
25923
+ var _iterator = _createForOfIteratorHelper$6(this.articleOptionStates),
26070
25924
  _step;
26071
25925
  try {
26072
25926
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -26088,7 +25942,7 @@ var DivaArticle = /*#__PURE__*/function () {
26088
25942
  key: "articleVariantValues",
26089
25943
  get: function get() {
26090
25944
  var ret = '';
26091
- var _iterator2 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
25945
+ var _iterator2 = _createForOfIteratorHelper$6(this.articleOptionStates),
26092
25946
  _step2;
26093
25947
  try {
26094
25948
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -26164,18 +26018,26 @@ var DivaArticle = /*#__PURE__*/function () {
26164
26018
  }, {
26165
26019
  key: "getArticleOptionStatesWithOptionsForPrint",
26166
26020
  value: function getArticleOptionStatesWithOptionsForPrint() {
26167
- var opsMap = new Map(this.articleOptionStates);
26021
+ var _this2 = this;
26022
+ var opsArray = _toConsumableArray__default["default"](this.articleOptionStates);
26168
26023
  var optionsForPrint = this.optionsForPrint;
26169
26024
  if (optionsForPrint) {
26170
- for (var i = 0; i < optionsForPrint.length; i++) {
26171
- var ops = this.getArticleOptionState(optionsForPrint[i]);
26025
+ var _loop = function _loop() {
26026
+ var ops = _this2.getArticleOptionState(optionsForPrint[i]);
26172
26027
  if (ops) {
26173
- if (opsMap.has(ops.optionCodex)) opsMap["delete"](ops.optionCodex);
26174
- opsMap.set(ops.optionCodex, ops);
26028
+ if (opsArray.find(function (o) {
26029
+ return o.optionCodex == ops.optionCodex;
26030
+ })) opsArray.splice(opsArray.findIndex(function (o) {
26031
+ return o.optionCodex == ops.optionCodex;
26032
+ }));
26033
+ opsArray.push(ops);
26175
26034
  }
26035
+ };
26036
+ for (var i = 0; i < optionsForPrint.length; i++) {
26037
+ _loop();
26176
26038
  }
26177
26039
  }
26178
- return opsMap;
26040
+ return opsArray;
26179
26041
  }
26180
26042
  }, {
26181
26043
  key: "articleVariantDesc",
@@ -26183,7 +26045,7 @@ var DivaArticle = /*#__PURE__*/function () {
26183
26045
  var newLine = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ', ';
26184
26046
  var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
26185
26047
  var ret = '';
26186
- var _iterator3 = _createForOfIteratorHelper$6(articleOptions.values()),
26048
+ var _iterator3 = _createForOfIteratorHelper$6(articleOptions),
26187
26049
  _step3;
26188
26050
  try {
26189
26051
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -26216,7 +26078,7 @@ var DivaArticle = /*#__PURE__*/function () {
26216
26078
  value: function articleVariantDesc_locales() {
26217
26079
  var newLine = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ', ';
26218
26080
  var ret = {};
26219
- var _iterator4 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
26081
+ var _iterator4 = _createForOfIteratorHelper$6(this.articleOptionStates),
26220
26082
  _step4;
26221
26083
  try {
26222
26084
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
@@ -26422,7 +26284,8 @@ var DivaArticle = /*#__PURE__*/function () {
26422
26284
  }, {
26423
26285
  key: "hasArticleOptionStates",
26424
26286
  get: function get() {
26425
- return this.articleOptionStatesData.size > 0;
26287
+ var _this$articleOptionSt;
26288
+ return !!((_this$articleOptionSt = this.articleOptionStatesData) !== null && _this$articleOptionSt !== void 0 && _this$articleOptionSt.length);
26426
26289
  }
26427
26290
  }, {
26428
26291
  key: "articleOptionStates",
@@ -26432,23 +26295,25 @@ var DivaArticle = /*#__PURE__*/function () {
26432
26295
  }, {
26433
26296
  key: "articleOptionStatesKeys",
26434
26297
  get: function get() {
26435
- return Array.from(this.articleOptionStatesData.keys());
26298
+ return this.articleOptionStatesData.map(function (ops) {
26299
+ return ops.optionCodex;
26300
+ });
26436
26301
  }
26437
26302
  }, {
26438
26303
  key: "articleOptionStatesWithParents",
26439
26304
  get: function get() {
26440
- return [].concat(_toConsumableArray__default["default"](this.getReqursiveArticleOptionStates()), _toConsumableArray__default["default"](this.articleOptionStates.values()));
26305
+ return [].concat(_toConsumableArray__default["default"](this.getReqursiveArticleOptionStates()), _toConsumableArray__default["default"](this.articleOptionStatesData));
26441
26306
  }
26442
26307
  }, {
26443
26308
  key: "getReqursiveArticleOptionStates",
26444
26309
  value: function getReqursiveArticleOptionStates() {
26445
26310
  var _this$partListParentA5, _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
26446
- return [].concat(_toConsumableArray__default["default"]((_this$partListParentA5 = (_this$partListParentA6 = this.partListParentArticle) === null || _this$partListParentA6 === void 0 ? void 0 : _this$partListParentA6.articleOptionStates.values()) !== null && _this$partListParentA5 !== void 0 ? _this$partListParentA5 : []), _toConsumableArray__default["default"]((_this$partListParentA7 = (_this$partListParentA8 = this.partListParentArticle) === null || _this$partListParentA8 === void 0 ? void 0 : _this$partListParentA8.getReqursiveArticleOptionStates()) !== null && _this$partListParentA7 !== void 0 ? _this$partListParentA7 : []), _toConsumableArray__default["default"]((_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStates.values()) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : []), _toConsumableArray__default["default"]((_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : []));
26311
+ return [].concat(_toConsumableArray__default["default"]((_this$partListParentA5 = (_this$partListParentA6 = this.partListParentArticle) === null || _this$partListParentA6 === void 0 ? void 0 : _this$partListParentA6.articleOptionStatesData) !== null && _this$partListParentA5 !== void 0 ? _this$partListParentA5 : []), _toConsumableArray__default["default"]((_this$partListParentA7 = (_this$partListParentA8 = this.partListParentArticle) === null || _this$partListParentA8 === void 0 ? void 0 : _this$partListParentA8.getReqursiveArticleOptionStates()) !== null && _this$partListParentA7 !== void 0 ? _this$partListParentA7 : []), _toConsumableArray__default["default"]((_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : []), _toConsumableArray__default["default"]((_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : []));
26447
26312
  }
26448
26313
  }, {
26449
26314
  key: "getAllArticleOptionsStates",
26450
26315
  value: function getAllArticleOptionsStates() {
26451
- var opss = _toConsumableArray__default["default"](this.articleOptionStates.values());
26316
+ var opss = _toConsumableArray__default["default"](this.articleOptionStates);
26452
26317
  for (var key in this.partlistArticles) {
26453
26318
  opss = [].concat(_toConsumableArray__default["default"](opss), _toConsumableArray__default["default"](this.partlistArticles[key].getAllArticleOptionsStates()));
26454
26319
  }
@@ -26457,7 +26322,7 @@ var DivaArticle = /*#__PURE__*/function () {
26457
26322
  }, {
26458
26323
  key: "clearArticleOptionStates",
26459
26324
  value: function clearArticleOptionStates() {
26460
- this.articleOptionStatesData.clear();
26325
+ this.articleOptionStatesData = [];
26461
26326
  }
26462
26327
  }, {
26463
26328
  key: "articleGUID",
@@ -26472,13 +26337,17 @@ var DivaArticle = /*#__PURE__*/function () {
26472
26337
  }, {
26473
26338
  key: "getArticleOptionStateFlat",
26474
26339
  value: function getArticleOptionStateFlat(codex) {
26475
- return this.articleOptionStatesData.get(codex);
26340
+ return this.articleOptionStatesData.find(function (ops) {
26341
+ return ops.optionCodex == codex;
26342
+ });
26476
26343
  }
26477
26344
  }, {
26478
26345
  key: "getArticleOptionState",
26479
26346
  value: function getArticleOptionState(codex, from, checkOnAccessoireParent) {
26480
26347
  var _this$partlistArticle3;
26481
- var firstMatch = this.articleOptionStatesData.get(codex);
26348
+ var firstMatch = this.articleOptionStatesData.find(function (ops) {
26349
+ return ops.optionCodex == codex;
26350
+ });
26482
26351
  if (firstMatch) return firstMatch;
26483
26352
  var parentArticle = this.partListParentArticle;
26484
26353
  if (from !== (parentArticle === null || parentArticle === void 0 ? void 0 : parentArticle.basketId) && parentArticle !== null && parentArticle !== void 0 && parentArticle.getArticleOptionState(codex, undefined, checkOnAccessoireParent)) {
@@ -26493,7 +26362,7 @@ var DivaArticle = /*#__PURE__*/function () {
26493
26362
  if (_ops) return _ops;
26494
26363
  }
26495
26364
  }
26496
- var _iterator5 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
26365
+ var _iterator5 = _createForOfIteratorHelper$6(this.articleOptionStatesData),
26497
26366
  _step5;
26498
26367
  try {
26499
26368
  for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
@@ -26525,7 +26394,7 @@ var DivaArticle = /*#__PURE__*/function () {
26525
26394
  }, {
26526
26395
  key: "getValueByMeasureKey",
26527
26396
  value: function getValueByMeasureKey(measureKey) {
26528
- var _iterator6 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
26397
+ var _iterator6 = _createForOfIteratorHelper$6(this.articleOptionStates),
26529
26398
  _step6;
26530
26399
  try {
26531
26400
  for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
@@ -26550,7 +26419,10 @@ var DivaArticle = /*#__PURE__*/function () {
26550
26419
  }, {
26551
26420
  key: "uploadOptionState",
26552
26421
  value: function uploadOptionState(articleOptionState) {
26553
- this.articleOptionStatesData.set(articleOptionState.optionCodex, articleOptionState);
26422
+ var oldIndex = this.articleOptionStatesData.findIndex(function (ops) {
26423
+ return ops.optionCodex == articleOptionState.optionCodex;
26424
+ });
26425
+ if (oldIndex !== -1) this.articleOptionStatesData[oldIndex] = articleOptionState;else this.articleOptionStatesData.push(articleOptionState);
26554
26426
  }
26555
26427
  }, {
26556
26428
  key: "partlistArticlesRules",
@@ -26609,7 +26481,7 @@ var DivaArticle = /*#__PURE__*/function () {
26609
26481
  key: "typeNr",
26610
26482
  get: function get() {
26611
26483
  if (this.supplierOrderCodex) return this.supplierOrderCodex;
26612
- var _iterator7 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
26484
+ var _iterator7 = _createForOfIteratorHelper$6(this.articleOptionStates),
26613
26485
  _step7;
26614
26486
  try {
26615
26487
  for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
@@ -27177,7 +27049,7 @@ var DivaArticle = /*#__PURE__*/function () {
27177
27049
  key: "VariantValues",
27178
27050
  get: function get() {
27179
27051
  var ret = {};
27180
- var _iterator8 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27052
+ var _iterator8 = _createForOfIteratorHelper$6(this.articleOptionStates),
27181
27053
  _step8;
27182
27054
  try {
27183
27055
  for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
@@ -27200,7 +27072,7 @@ var DivaArticle = /*#__PURE__*/function () {
27200
27072
  key: "snapshot",
27201
27073
  get: function get() {
27202
27074
  var ret = {};
27203
- var _iterator9 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27075
+ var _iterator9 = _createForOfIteratorHelper$6(this.articleOptionStates),
27204
27076
  _step9;
27205
27077
  try {
27206
27078
  for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
@@ -27278,7 +27150,7 @@ var DivaArticle = /*#__PURE__*/function () {
27278
27150
  key: "VariantValuesWithoutFreetext",
27279
27151
  get: function get() {
27280
27152
  var ret = {};
27281
- var _iterator12 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27153
+ var _iterator12 = _createForOfIteratorHelper$6(this.articleOptionStates),
27282
27154
  _step12;
27283
27155
  try {
27284
27156
  for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
@@ -27298,7 +27170,7 @@ var DivaArticle = /*#__PURE__*/function () {
27298
27170
  key: "VariantValuesParentOption",
27299
27171
  get: function get() {
27300
27172
  var ret = {};
27301
- var _iterator13 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27173
+ var _iterator13 = _createForOfIteratorHelper$6(this.articleOptionStates),
27302
27174
  _step13;
27303
27175
  try {
27304
27176
  for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
@@ -27333,7 +27205,7 @@ var DivaArticle = /*#__PURE__*/function () {
27333
27205
  }, {
27334
27206
  key: "setDifferentOptions",
27335
27207
  value: function setDifferentOptions(options) {
27336
- var _iterator14 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27208
+ var _iterator14 = _createForOfIteratorHelper$6(this.articleOptionStates),
27337
27209
  _step14;
27338
27210
  try {
27339
27211
  for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
@@ -27367,7 +27239,7 @@ var DivaArticle = /*#__PURE__*/function () {
27367
27239
  get: function get() {
27368
27240
  var hash = this.catalogCodex + '_' + this.articleCodex + '_' + this.quantity + '_';
27369
27241
  var variantValues = [];
27370
- var _iterator15 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27242
+ var _iterator15 = _createForOfIteratorHelper$6(this.articleOptionStates),
27371
27243
  _step15;
27372
27244
  try {
27373
27245
  for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
@@ -27388,7 +27260,7 @@ var DivaArticle = /*#__PURE__*/function () {
27388
27260
  key: "VariantValuesWithoutOPTandOPV",
27389
27261
  get: function get() {
27390
27262
  var ret = {};
27391
- var _iterator16 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27263
+ var _iterator16 = _createForOfIteratorHelper$6(this.articleOptionStates),
27392
27264
  _step16;
27393
27265
  try {
27394
27266
  for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
@@ -27422,7 +27294,7 @@ var DivaArticle = /*#__PURE__*/function () {
27422
27294
  key: "getVariantValuesTillOPT",
27423
27295
  value: function getVariantValuesTillOPT(opt) {
27424
27296
  var ret = {};
27425
- var _iterator17 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27297
+ var _iterator17 = _createForOfIteratorHelper$6(this.articleOptionStates),
27426
27298
  _step17;
27427
27299
  try {
27428
27300
  for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
@@ -27446,14 +27318,14 @@ var DivaArticle = /*#__PURE__*/function () {
27446
27318
  key: "areAllOptionsDefined",
27447
27319
  get: function get() {
27448
27320
  if (this.CatalogData.ignoreIsDefinedCheck) return true;
27449
- return !Array.from(this.articleOptionStates.values()).find(function (ops) {
27321
+ return !this.articleOptionStates.find(function (ops) {
27450
27322
  return !ops.isDefined;
27451
27323
  });
27452
27324
  }
27453
27325
  }, {
27454
27326
  key: "optionStatesWithAddToMeasure",
27455
27327
  value: function optionStatesWithAddToMeasure(opt) {
27456
- return Array.from(this.articleOptionStates.values()).filter(function (ops) {
27328
+ return this.articleOptionStates.filter(function (ops) {
27457
27329
  var _ops$addToMeasure, _ops$addToMeasure2;
27458
27330
  return ((_ops$addToMeasure = ops.addToMeasure) === null || _ops$addToMeasure === void 0 ? void 0 : _ops$addToMeasure.find(function (o) {
27459
27331
  return o.opt == opt;
@@ -27464,7 +27336,7 @@ var DivaArticle = /*#__PURE__*/function () {
27464
27336
  key: "requiredUserInputOptions",
27465
27337
  get: function get() {
27466
27338
  var options = [];
27467
- var _iterator18 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27339
+ var _iterator18 = _createForOfIteratorHelper$6(this.articleOptionStates),
27468
27340
  _step18;
27469
27341
  try {
27470
27342
  for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
@@ -27564,7 +27436,7 @@ var DivaArticle = /*#__PURE__*/function () {
27564
27436
  key: "getMetaData",
27565
27437
  value: function getMetaData(locales) {
27566
27438
  var metaDatas = locales ? this.article.catalogArticle.metaData_locales : this.article.catalogArticle.metaData;
27567
- var _iterator19 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27439
+ var _iterator19 = _createForOfIteratorHelper$6(this.articleOptionStates),
27568
27440
  _step19;
27569
27441
  try {
27570
27442
  for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
@@ -27636,67 +27508,46 @@ var DivaArticle = /*#__PURE__*/function () {
27636
27508
  opvDoesExist = false;
27637
27509
  var opvsInOption = refOptData.articleOptionValues;
27638
27510
  if (refOptData.hasOPG && opvsInOption) {
27639
- var _iterator20 = _createForOfIteratorHelper$6(opvsInOption),
27640
- _step20;
27641
- try {
27642
- for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
27643
- var _step20$value = _slicedToArray__default["default"](_step20.value, 2),
27644
- iKey = _step20$value[0],
27645
- opg = _step20$value[1];
27646
- if (opvIsValid && anyDoShowFound) break;
27647
- var opvsFromOpg = opg.articleOptionValues;
27648
- if (!opvsFromOpg) continue;
27649
- if (refOps.visibleOptionValues.get(iKey)) {
27650
- anyDoShowFound = true;
27511
+ for (var iKey in opvsInOption) {
27512
+ if (opvIsValid && anyDoShowFound) break;
27513
+ var opg = opvsInOption[iKey];
27514
+ var opvsFromOpg = opg.articleOptionValues;
27515
+ if (!opvsFromOpg) continue;
27516
+ if (refOps.visibleOptionValues[iKey]) {
27517
+ anyDoShowFound = true;
27518
+ }
27519
+ for (var jKey in opvsFromOpg) {
27520
+ if (refOps.visibleOptionValues[iKey]) {
27521
+ var parentName = opvsFromOpg[jKey].parentName;
27522
+ if (parentName) {
27523
+ alternativeOPV[jKey] = parentName;
27524
+ } else {
27525
+ alternativeOPV[jKey] = opvsFromOpg[jKey].name;
27526
+ }
27651
27527
  }
27652
- var _iterator21 = _createForOfIteratorHelper$6(opvsFromOpg),
27653
- _step21;
27654
- try {
27655
- for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
27656
- var _step21$value = _slicedToArray__default["default"](_step21.value, 2),
27657
- jKey = _step21$value[0],
27658
- opv = _step21$value[1];
27659
- if (refOps.visibleOptionValues.get(iKey)) {
27660
- var parentName = opv.parentName;
27661
- if (parentName) {
27662
- alternativeOPV[jKey] = parentName;
27663
- } else {
27664
- alternativeOPV[jKey] = opv.name;
27665
- }
27666
- }
27667
- if (jKey == curOpvValue) {
27668
- //Der Artikel darf den Optionswert von der BaseOption übernehmen
27669
- opvDoesExist = true;
27670
- if (refOps.visibleOptionValues.get(iKey)) {
27671
- refOps.defaultOPV = curOpvValue;
27672
- optToChange[refOptCodex] = curOpvValue;
27673
- opvIsValid = true;
27674
- }
27675
- break;
27676
- }
27528
+ if (jKey == curOpvValue) {
27529
+ //Der Artikel darf den Optionswert von der BaseOption übernehmen
27530
+ opvDoesExist = true;
27531
+ if (refOps.visibleOptionValues[iKey]) {
27532
+ refOps.defaultOPV = curOpvValue;
27533
+ optToChange[refOptCodex] = curOpvValue;
27534
+ opvIsValid = true;
27677
27535
  }
27678
- } catch (err) {
27679
- _iterator21.e(err);
27680
- } finally {
27681
- _iterator21.f();
27536
+ break;
27682
27537
  }
27683
27538
  }
27684
- } catch (err) {
27685
- _iterator20.e(err);
27686
- } finally {
27687
- _iterator20.f();
27688
27539
  }
27689
27540
  } else if (opvsInOption) {
27690
27541
  for (var _iKey in opvsInOption) {
27691
27542
  if (opvIsValid && anyDoShowFound) break;
27692
- if (refOps.visibleOptionValues.get(_iKey)) {
27543
+ if (refOps.visibleOptionValues[_iKey]) {
27693
27544
  anyDoShowFound = true;
27694
- alternativeOPV[_iKey] = opvsInOption.get(_iKey).name;
27545
+ alternativeOPV[_iKey] = opvsInOption[_iKey].name;
27695
27546
  }
27696
27547
  if (_iKey == curOpvValue || this.hasType1Dependencies && curOpvValue.replace('OPV' + opt.substring(3), '') == _iKey.replace('OPV' + refOps.optionCodex.substring(3), '')) {
27697
27548
  //Der Artikel darf den Optionswert von der BaseOption übernehmen
27698
27549
  opvDoesExist = true;
27699
- if (refOps.visibleOptionValues.get(_iKey)) {
27550
+ if (refOps.visibleOptionValues[_iKey]) {
27700
27551
  refOps.defaultOPV = _iKey;
27701
27552
  optToChange[refOptCodex] = _iKey;
27702
27553
  if (optToChange[opt + '_val']) {
@@ -27755,11 +27606,11 @@ var DivaArticle = /*#__PURE__*/function () {
27755
27606
  for (var _i3 = 0; _i3 < articles.length; _i3++) {
27756
27607
  var variantValues = {};
27757
27608
  var accessoire = articles[_i3];
27758
- var _iterator22 = _createForOfIteratorHelper$6(accessoire.articleOptionStates.values()),
27759
- _step22;
27609
+ var _iterator20 = _createForOfIteratorHelper$6(accessoire.articleOptionStates),
27610
+ _step20;
27760
27611
  try {
27761
- for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
27762
- var ops = _step22.value;
27612
+ for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
27613
+ var ops = _step20.value;
27763
27614
  if (singleOpts.includes(ops.optionCodex)) {
27764
27615
  if (accessoire.hasType1Dependencies) {
27765
27616
  variantValues[ops.optionCodex] = curOpvValue.replace('OPV' + opt.substring(3), 'OPV' + ops.optionCodex.substring(3));
@@ -27769,9 +27620,9 @@ var DivaArticle = /*#__PURE__*/function () {
27769
27620
  }
27770
27621
  }
27771
27622
  } catch (err) {
27772
- _iterator22.e(err);
27623
+ _iterator20.e(err);
27773
27624
  } finally {
27774
- _iterator22.f();
27625
+ _iterator20.f();
27775
27626
  }
27776
27627
  if (Object.entries(variantValues).length > 0) accessoiresToUpdate[accessoire.basketId] = {
27777
27628
  accessoire: accessoire,
@@ -27787,11 +27638,11 @@ var DivaArticle = /*#__PURE__*/function () {
27787
27638
  value: function getGlobalOptions() {
27788
27639
  var ret = {};
27789
27640
  var opss = this.articleOptionStatesWithParents;
27790
- var _iterator23 = _createForOfIteratorHelper$6(opss),
27791
- _step23;
27641
+ var _iterator21 = _createForOfIteratorHelper$6(opss),
27642
+ _step21;
27792
27643
  try {
27793
- for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
27794
- var ops = _step23.value;
27644
+ for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
27645
+ var ops = _step21.value;
27795
27646
  var value = ops.option.isDefaultValueForOptions;
27796
27647
  if (value) {
27797
27648
  var entires = value.split(';');
@@ -27800,9 +27651,9 @@ var DivaArticle = /*#__PURE__*/function () {
27800
27651
  }
27801
27652
  }
27802
27653
  } catch (err) {
27803
- _iterator23.e(err);
27654
+ _iterator21.e(err);
27804
27655
  } finally {
27805
- _iterator23.f();
27656
+ _iterator21.f();
27806
27657
  }
27807
27658
  return ret;
27808
27659
  }
@@ -27842,34 +27693,34 @@ var DivaArticle = /*#__PURE__*/function () {
27842
27693
  }
27843
27694
  if (Object.keys(ret.opt).length === 0) {
27844
27695
  //nicht gefunden - jetzt OCD kontrollieren
27845
- var _iterator24 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27846
- _step24;
27696
+ var _iterator22 = _createForOfIteratorHelper$6(this.articleOptionStates),
27697
+ _step22;
27847
27698
  try {
27848
- for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
27849
- var _ops4 = _step24.value;
27699
+ for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
27700
+ var _ops4 = _step22.value;
27850
27701
  if (_ops4.option.ocd == optionCodex && _ops4.isDoShow && (parentOptionCodex == '' || parentOptionCodex == _ops4.option.parentOptionCodex)) {
27851
27702
  ret = this.checkOptionSearchOPV(_ops4.option, optionValueCodex, ret);
27852
27703
  }
27853
27704
  }
27854
27705
  //fallback for pfister classification usecase
27855
27706
  } catch (err) {
27856
- _iterator24.e(err);
27707
+ _iterator22.e(err);
27857
27708
  } finally {
27858
- _iterator24.f();
27709
+ _iterator22.f();
27859
27710
  }
27860
- var _iterator25 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27861
- _step25;
27711
+ var _iterator23 = _createForOfIteratorHelper$6(this.articleOptionStates),
27712
+ _step23;
27862
27713
  try {
27863
- for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
27864
- var _ops5 = _step25.value;
27714
+ for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
27715
+ var _ops5 = _step23.value;
27865
27716
  if (_ops5.option.ocd == optionCodex && optionCodex !== null && optionCodex !== void 0 && optionCodex.startsWith('OPTOPT') && (parentOptionCodex == '' || parentOptionCodex == _ops5.option.parentOptionCodex)) {
27866
27717
  return this.checkOptionSearchOPV(_ops5.option, optionValueCodex, ret);
27867
27718
  }
27868
27719
  }
27869
27720
  } catch (err) {
27870
- _iterator25.e(err);
27721
+ _iterator23.e(err);
27871
27722
  } finally {
27872
- _iterator25.f();
27723
+ _iterator23.f();
27873
27724
  }
27874
27725
  }
27875
27726
  }
@@ -27885,89 +27736,46 @@ var DivaArticle = /*#__PURE__*/function () {
27885
27736
  }
27886
27737
  if (myOPT.hasOPG) {
27887
27738
  var myOPGs = myOPT.articleOptionValues;
27888
- var _iterator26 = _createForOfIteratorHelper$6(myOPGs),
27889
- _step26;
27890
- try {
27891
- for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {
27892
- var _step26$value = _slicedToArray__default["default"](_step26.value, 2),
27893
- iKey = _step26$value[0],
27894
- opg = _step26$value[1];
27895
- var myOPVs = opg.articleOptionValues;
27896
- if (myOPVs && myOPVs.get(optionValueCodex)) {
27897
- ret.opv = myOPVs.get(optionValueCodex);
27898
- found = true;
27899
- }
27900
- if (!found) {
27901
- var _iterator27 = _createForOfIteratorHelper$6(myOPVs),
27902
- _step27;
27903
- try {
27904
- for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
27905
- var _step27$value = _slicedToArray__default["default"](_step27.value, 2),
27906
- jKey = _step27$value[0],
27907
- opv = _step27$value[1];
27908
- if (opv.ocd == optionValueCodex || opv.codex == optionValueCodex || optionValueCodex === 'OPVOPV_NICHT_RELEVANT' && jKey.startsWith('OPVOPV_NICHT_RELEVANT')) {
27909
- ret.opv = opv;
27910
- found = true;
27911
- break;
27912
- }
27913
- }
27914
- } catch (err) {
27915
- _iterator27.e(err);
27916
- } finally {
27917
- _iterator27.f();
27739
+ for (var iKey in myOPGs) {
27740
+ var myOPVs = myOPGs[iKey].articleOptionValues;
27741
+ if (myOPVs && myOPVs[optionValueCodex]) {
27742
+ ret.opv = myOPVs[optionValueCodex];
27743
+ found = true;
27744
+ }
27745
+ if (!found) {
27746
+ for (var jKey in myOPVs) {
27747
+ if (myOPVs[jKey].ocd == optionValueCodex || myOPVs[jKey].codex == optionValueCodex || optionValueCodex === 'OPVOPV_NICHT_RELEVANT' && jKey.startsWith('OPVOPV_NICHT_RELEVANT')) {
27748
+ ret.opv = myOPVs[jKey];
27749
+ found = true;
27750
+ break;
27918
27751
  }
27919
27752
  }
27920
- if (!found && myOPT.parentOptionCodex) {
27921
- var _iterator28 = _createForOfIteratorHelper$6(myOPVs),
27922
- _step28;
27923
- try {
27924
- for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {
27925
- var _step28$value = _slicedToArray__default["default"](_step28.value, 2),
27926
- _jKey = _step28$value[0],
27927
- _opv = _step28$value[1];
27928
- if (_opv.ocd && _opv.ocd.startsWith(optionValueCodex) || _opv.codex.startsWith(optionValueCodex)) {
27929
- ret.opv = _opv;
27930
- found = true;
27931
- break;
27932
- }
27933
- }
27934
- } catch (err) {
27935
- _iterator28.e(err);
27936
- } finally {
27937
- _iterator28.f();
27753
+ }
27754
+ if (!found && myOPT.parentOptionCodex) {
27755
+ for (var _jKey in myOPVs) {
27756
+ var opv = myOPVs[_jKey];
27757
+ if (opv.ocd && opv.ocd.startsWith(optionValueCodex) || opv.codex.startsWith(optionValueCodex)) {
27758
+ ret.opv = myOPVs[_jKey];
27759
+ found = true;
27760
+ break;
27938
27761
  }
27939
27762
  }
27940
- if (ret.opv && Object.entries(ret.opv).length != 0) break;
27941
27763
  }
27942
- } catch (err) {
27943
- _iterator26.e(err);
27944
- } finally {
27945
- _iterator26.f();
27764
+ if (ret.opv && Object.entries(ret.opv).length != 0) break;
27946
27765
  }
27947
27766
  } else {
27948
27767
  var _myOPVs = myOPT.articleOptionValues;
27949
- if (_myOPVs && _myOPVs.get(optionValueCodex)) {
27950
- ret.opv = _myOPVs.get(optionValueCodex);
27768
+ if (_myOPVs && _myOPVs[optionValueCodex]) {
27769
+ ret.opv = _myOPVs[optionValueCodex];
27951
27770
  found = true;
27952
27771
  }
27953
27772
  if (!found) {
27954
- var _iterator29 = _createForOfIteratorHelper$6(_myOPVs),
27955
- _step29;
27956
- try {
27957
- for (_iterator29.s(); !(_step29 = _iterator29.n()).done;) {
27958
- var _step29$value = _slicedToArray__default["default"](_step29.value, 2),
27959
- _jKey2 = _step29$value[0],
27960
- _opv2 = _step29$value[1];
27961
- if (_opv2.ocd == optionValueCodex || optionValueCodex === 'OPVOPV_NICHT_RELEVANT' && _jKey2.startsWith('OPVOPV_NICHT_RELEVANT')) {
27962
- ret.opv = _opv2;
27963
- found = true;
27964
- break;
27965
- }
27773
+ for (var _jKey2 in _myOPVs) {
27774
+ if (_myOPVs[_jKey2].ocd == optionValueCodex || optionValueCodex === 'OPVOPV_NICHT_RELEVANT' && _jKey2.startsWith('OPVOPV_NICHT_RELEVANT')) {
27775
+ ret.opv = _myOPVs[_jKey2];
27776
+ found = true;
27777
+ break;
27966
27778
  }
27967
- } catch (err) {
27968
- _iterator29.e(err);
27969
- } finally {
27970
- _iterator29.f();
27971
27779
  }
27972
27780
  }
27973
27781
  }
@@ -27977,11 +27785,11 @@ var DivaArticle = /*#__PURE__*/function () {
27977
27785
  key: "getArticleJsonVariantValues",
27978
27786
  value: function getArticleJsonVariantValues() {
27979
27787
  var retval = {};
27980
- var _iterator30 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
27981
- _step30;
27788
+ var _iterator24 = _createForOfIteratorHelper$6(this.articleOptionStates),
27789
+ _step24;
27982
27790
  try {
27983
- for (_iterator30.s(); !(_step30 = _iterator30.n()).done;) {
27984
- var ops = _step30.value;
27791
+ for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
27792
+ var ops = _step24.value;
27985
27793
  if (ops.valCodex) {
27986
27794
  retval[ops.optionCodex] = ops.valCodex;
27987
27795
  var opsVal = this.getArticleOptionStateFlat(ops.optionCodex + '_val');
@@ -27994,9 +27802,9 @@ var DivaArticle = /*#__PURE__*/function () {
27994
27802
  }
27995
27803
  }
27996
27804
  } catch (err) {
27997
- _iterator30.e(err);
27805
+ _iterator24.e(err);
27998
27806
  } finally {
27999
- _iterator30.f();
27807
+ _iterator24.f();
28000
27808
  }
28001
27809
  return retval;
28002
27810
  }
@@ -28014,13 +27822,13 @@ var DivaArticle = /*#__PURE__*/function () {
28014
27822
  }, {
28015
27823
  key: "handleMultiselect",
28016
27824
  value: function handleMultiselect(ops, newConfigValues, key) {
28017
- var _this2 = this;
27825
+ var _this3 = this;
28018
27826
  var _this$parentOptionCod3 = this.parentOptionCodex(key),
28019
27827
  optionCodex = _this$parentOptionCod3.optionCodex,
28020
27828
  partenOptionCodex = _this$parentOptionCod3.partenOptionCodex;
28021
27829
  var codexes = newConfigValues[key].split(';');
28022
27830
  var values = codexes.map(function (c) {
28023
- return _this2.checkOptionAndOptionValue(optionCodex, c, partenOptionCodex);
27831
+ return _this3.checkOptionAndOptionValue(optionCodex, c, partenOptionCodex);
28024
27832
  }).filter(function (c) {
28025
27833
  return Object.keys(c.opv).length;
28026
27834
  });
@@ -28043,11 +27851,10 @@ var DivaArticle = /*#__PURE__*/function () {
28043
27851
  if (codexes[0] === 'EMPTY_MULTISELECT') {
28044
27852
  var firstOPV;
28045
27853
  if (ops.option.hasOPG) {
28046
- var _opg$articleOptionVal, _opg$articleOptionVal2;
28047
- var opg = Array.from(ops.option.articleOptionValues.values())[0];
28048
- firstOPV = Array.from((_opg$articleOptionVal = (_opg$articleOptionVal2 = opg.articleOptionValues) === null || _opg$articleOptionVal2 === void 0 ? void 0 : _opg$articleOptionVal2.values()) !== null && _opg$articleOptionVal !== void 0 ? _opg$articleOptionVal : [])[0];
27854
+ var opg = ops.option.articleOptionValues[Object.keys(ops.option.articleOptionValues)[0]];
27855
+ firstOPV = opg.articleOptionValues[Object.keys(opg.articleOptionValues)[0]];
28049
27856
  } else {
28050
- firstOPV = Array.from(ops.option.articleOptionValues.values())[0];
27857
+ firstOPV = ops.option.articleOptionValues[Object.keys(ops.option.articleOptionValues)[0]];
28051
27858
  }
28052
27859
  ops.multiSelects = [firstOPV];
28053
27860
  newConfigValues[ops.option.codex] = firstOPV.codex;
@@ -28081,47 +27888,28 @@ var DivaArticle = /*#__PURE__*/function () {
28081
27888
  var _this$checkOptionAndO = this.checkOptionAndOptionValue(optionCodex, newConfigValues[key], partenOptionCodex),
28082
27889
  opv = _this$checkOptionAndO.opv;
28083
27890
  if (!Object.keys(opv).length) {
28084
- var _opv3 = this.findFreeTextOpv(ops);
28085
- if (_opv3) newConfigValues[key] = _opv3.codex;
27891
+ var _opv = this.findFreeTextOpv(ops);
27892
+ if (_opv) newConfigValues[key] = _opv.codex;
28086
27893
  }
28087
27894
  }
28088
27895
  }
28089
27896
  }, {
28090
27897
  key: "findFreeTextOpv",
28091
27898
  value: function findFreeTextOpv(ops) {
28092
- var _iterator31 = _createForOfIteratorHelper$6(ops.visibleOptionValues),
28093
- _step31;
28094
- try {
28095
- for (_iterator31.s(); !(_step31 = _iterator31.n()).done;) {
28096
- var _step31$value = _slicedToArray__default["default"](_step31.value, 2),
28097
- key = _step31$value[0],
28098
- opv = _step31$value[1];
28099
- if (opv.isFreeText) {
28100
- return opv;
28101
- }
27899
+ for (var key in ops.visibleOptionValues) {
27900
+ var opv = ops.visibleOptionValues[key];
27901
+ if (opv.isFreeText) {
27902
+ return opv;
28102
27903
  }
28103
- } catch (err) {
28104
- _iterator31.e(err);
28105
- } finally {
28106
- _iterator31.f();
28107
27904
  }
28108
27905
  return undefined;
28109
27906
  }
28110
27907
  }, {
28111
27908
  key: "defineAllOptions",
28112
27909
  value: function defineAllOptions() {
28113
- var _iterator32 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
28114
- _step32;
28115
- try {
28116
- for (_iterator32.s(); !(_step32 = _iterator32.n()).done;) {
28117
- var ops = _step32.value;
28118
- ops.isDefined = true;
28119
- }
28120
- } catch (err) {
28121
- _iterator32.e(err);
28122
- } finally {
28123
- _iterator32.f();
28124
- }
27910
+ this.articleOptionStates.map(function (ops) {
27911
+ return ops.isDefined = true;
27912
+ });
28125
27913
  }
28126
27914
  }, {
28127
27915
  key: "defineOP",
@@ -28132,32 +27920,22 @@ var DivaArticle = /*#__PURE__*/function () {
28132
27920
  }, {
28133
27921
  key: "getDefaultOpv",
28134
27922
  value: function getDefaultOpv(visibleOptionValues) {
28135
- var _iterator33 = _createForOfIteratorHelper$6(visibleOptionValues),
28136
- _step33;
28137
- try {
28138
- for (_iterator33.s(); !(_step33 = _iterator33.n()).done;) {
28139
- var _step33$value = _slicedToArray__default["default"](_step33.value, 2),
28140
- iKey = _step33$value[0],
28141
- opv = _step33$value[1];
28142
- if (opv.isOPVG) {
28143
- var _opv$articleOptionVal, _opv$articleOptionVal2;
28144
- var defaultOPV = Array.from((_opv$articleOptionVal = (_opv$articleOptionVal2 = opv.articleOptionValues) === null || _opv$articleOptionVal2 === void 0 ? void 0 : _opv$articleOptionVal2.values()) !== null && _opv$articleOptionVal !== void 0 ? _opv$articleOptionVal : []).find(function (opv) {
28145
- return opv.defaultValue;
28146
- });
28147
- if (defaultOPV) {
28148
- return defaultOPV;
28149
- }
28150
- }
28151
- if (opv.defaultValue) {
28152
- return opv;
27923
+ for (var iKey in visibleOptionValues) {
27924
+ var opv = visibleOptionValues[iKey];
27925
+ if (opv.isOPVG) {
27926
+ var _opv$articleOptionVal;
27927
+ var defaultOPV = Object.values((_opv$articleOptionVal = opv.articleOptionValues) !== null && _opv$articleOptionVal !== void 0 ? _opv$articleOptionVal : {}).find(function (opv) {
27928
+ return opv.defaultValue;
27929
+ });
27930
+ if (defaultOPV) {
27931
+ return defaultOPV;
28153
27932
  }
28154
27933
  }
28155
- } catch (err) {
28156
- _iterator33.e(err);
28157
- } finally {
28158
- _iterator33.f();
27934
+ if (opv.defaultValue) {
27935
+ return opv;
27936
+ }
28159
27937
  }
28160
- return Array.from(visibleOptionValues.values())[0];
27938
+ return visibleOptionValues[Object.keys(visibleOptionValues)[0]];
28161
27939
  }
28162
27940
  }, {
28163
27941
  key: "getVariantValuesInfluencingOptions",
@@ -28184,7 +27962,7 @@ var DivaArticle = /*#__PURE__*/function () {
28184
27962
  var newVvs2 = this.engine.getValuesInfluencingOPT(key, vv[key]);
28185
27963
  if (newVvs2.length) {
28186
27964
  for (var j = 0; j < newVvs2.length; j++) {
28187
- newVvs[j] = _objectSpread$d(_objectSpread$d({}, vv), newVvs2[j]);
27965
+ newVvs[j] = _objectSpread$e(_objectSpread$e({}, vv), newVvs2[j]);
28188
27966
  }
28189
27967
  }
28190
27968
  }
@@ -28263,7 +28041,7 @@ var DivaArticle = /*#__PURE__*/function () {
28263
28041
  break;
28264
28042
  }
28265
28043
  _context.next = 4;
28266
- return Promise.resolve().then(function () { return require('./ShelfPlanner-d409ac3e.js'); });
28044
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-02c23e5a.js'); });
28267
28045
  case 4:
28268
28046
  _yield$import = _context.sent;
28269
28047
  ShelfPlanner = _yield$import["default"];
@@ -28340,19 +28118,11 @@ var DivaArticle = /*#__PURE__*/function () {
28340
28118
  value: function afterInit() {
28341
28119
  if (!this.CatalogData.useDiomexConfigLogic) return {};
28342
28120
  var variantValues = {};
28343
- var _iterator34 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
28344
- _step34;
28345
- try {
28346
- for (_iterator34.s(); !(_step34 = _iterator34.n()).done;) {
28347
- var ops = _step34.value;
28348
- if (ops.val === undefined && ops.visibleOPVKeys.length && !ops.isInvisible) {
28349
- variantValues[ops.optionCodex] = ops.visibleOPVKeys[0];
28350
- }
28121
+ for (var i = 0; i < this.articleOptionStates.length; i++) {
28122
+ var ops = this.articleOptionStates[i];
28123
+ if (ops.val === undefined && ops.visibleOPVKeys.length && !ops.isInvisible) {
28124
+ variantValues[ops.optionCodex] = ops.visibleOPVKeys[0];
28351
28125
  }
28352
- } catch (err) {
28353
- _iterator34.e(err);
28354
- } finally {
28355
- _iterator34.f();
28356
28126
  }
28357
28127
  return variantValues;
28358
28128
  }
@@ -28376,40 +28146,30 @@ var DivaArticle = /*#__PURE__*/function () {
28376
28146
  for (var _key in myValues) {
28377
28147
  var ops = this.getArticleOptionState(_key);
28378
28148
  if (!ops) continue;
28379
- var opv = ops === null || ops === void 0 ? void 0 : ops.visibleOptionValues.get(myValues[_key]);
28149
+ var opv = ops === null || ops === void 0 ? void 0 : ops.visibleOptionValues[myValues[_key]];
28380
28150
  if (opv) {
28381
28151
  var value = opv.setConfig;
28382
28152
  if (value) {
28383
28153
  for (var _i4 = 0; _i4 < value.split(';').length; _i4++) {
28384
28154
  var opt = (!this.CatalogData.isIDMFormat ? 'OPT' : '') + value.split(';')[_i4].split(':')[0];
28385
- var _opv4 = (!this.CatalogData.isIDMFormat ? 'OPV' : '') + value.split(';')[_i4].split(':')[1];
28155
+ var _opv2 = (!this.CatalogData.isIDMFormat ? 'OPV' : '') + value.split(';')[_i4].split(':')[1];
28386
28156
  if (!myValues[opt] || setConfigDoesOverWrite) {
28387
- myValues[opt] = _opv4;
28157
+ myValues[opt] = _opv2;
28388
28158
  }
28389
28159
  }
28390
28160
  }
28391
28161
  }
28392
- var catalogopv = ops.option.articleOptionValues.get(myValues[_key]);
28162
+ var catalogopv = ops.option.articleOptionValues[myValues[_key]];
28393
28163
  if (catalogopv !== null && catalogopv !== void 0 && catalogopv.sameopv) {
28394
28164
  var opvs = ops.option.articleOptionValues;
28395
- var _iterator35 = _createForOfIteratorHelper$6(opvs),
28396
- _step35;
28397
- try {
28398
- for (_iterator35.s(); !(_step35 = _iterator35.n()).done;) {
28399
- var _step35$value = _slicedToArray__default["default"](_step35.value, 2),
28400
- opvKey = _step35$value[0],
28401
- checkingOpv = _step35$value[1];
28402
- if (opvKey === catalogopv.codex) continue;
28403
- if (checkingOpv !== null && checkingOpv !== void 0 && checkingOpv.sameopv && catalogopv.sameopv == checkingOpv.sameopv) {
28404
- if (!ops.visibleOptionValues.get(catalogopv.codex) && ops.visibleOptionValues.get(checkingOpv.codex)) {
28405
- myValues[_key] = checkingOpv.codex;
28406
- }
28165
+ for (var opvKey in opvs) {
28166
+ var checkingOpv = opvs[opvKey];
28167
+ if (opvKey === catalogopv.codex) continue;
28168
+ if (checkingOpv !== null && checkingOpv !== void 0 && checkingOpv.sameopv && catalogopv.sameopv == checkingOpv.sameopv) {
28169
+ if (!ops.visibleOptionValues[catalogopv.codex] && ops.visibleOptionValues[checkingOpv.codex]) {
28170
+ myValues[_key] = checkingOpv.codex;
28407
28171
  }
28408
28172
  }
28409
- } catch (err) {
28410
- _iterator35.e(err);
28411
- } finally {
28412
- _iterator35.f();
28413
28173
  }
28414
28174
  }
28415
28175
  }
@@ -28420,20 +28180,20 @@ var DivaArticle = /*#__PURE__*/function () {
28420
28180
  } else if (_key2.endsWith('_val') && this.getArticleOptionState(_key2.replace(/_val/g, ''))) {
28421
28181
  validValues[_key2] = myValues[_key2];
28422
28182
  } else {
28423
- var _iterator36 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
28424
- _step36;
28183
+ var _iterator25 = _createForOfIteratorHelper$6(this.articleOptionStates),
28184
+ _step25;
28425
28185
  try {
28426
- for (_iterator36.s(); !(_step36 = _iterator36.n()).done;) {
28427
- var _ops7 = _step36.value;
28186
+ for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
28187
+ var _ops7 = _step25.value;
28428
28188
  if (_ops7.optionOcd == _key2) {
28429
28189
  var values = this.checkOptionSearchOPV(_ops7.option, myValues[_key2], {});
28430
28190
  if (values !== null && values !== void 0 && values.opv) validValues[_ops7.optionCodex] = values.opv.codex;
28431
28191
  }
28432
28192
  }
28433
28193
  } catch (err) {
28434
- _iterator36.e(err);
28194
+ _iterator25.e(err);
28435
28195
  } finally {
28436
- _iterator36.f();
28196
+ _iterator25.f();
28437
28197
  }
28438
28198
  }
28439
28199
  //for classification usecase when suboption and option have the same name like OPTOPT_MATERIAL_1_00 and OPTOPT_MATERIAL_1_00.OPTOPT_MATERIAL_1_00
@@ -28497,17 +28257,17 @@ var DivaArticle = /*#__PURE__*/function () {
28497
28257
  key: "addOptionStateFromArticleToPlannerData",
28498
28258
  value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo) {
28499
28259
  var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
28500
- var _iterator37 = _createForOfIteratorHelper$6(articleOptions.values()),
28501
- _step37;
28260
+ var _iterator26 = _createForOfIteratorHelper$6(articleOptions),
28261
+ _step26;
28502
28262
  try {
28503
- for (_iterator37.s(); !(_step37 = _iterator37.n()).done;) {
28504
- var ops = _step37.value;
28263
+ for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {
28264
+ var ops = _step26.value;
28505
28265
  this.addOptionStateToPlannerData(ret, ops, alternateRenderInfo);
28506
28266
  }
28507
28267
  } catch (err) {
28508
- _iterator37.e(err);
28268
+ _iterator26.e(err);
28509
28269
  } finally {
28510
- _iterator37.f();
28270
+ _iterator26.f();
28511
28271
  }
28512
28272
  for (var key in this.article.partlistArticles) {
28513
28273
  var partlistArticle = this.article.partlistArticles[key];
@@ -28559,11 +28319,11 @@ var DivaArticle = /*#__PURE__*/function () {
28559
28319
  key: "getAccessoireMATData",
28560
28320
  value: function getAccessoireMATData(onString) {
28561
28321
  var MAT = [];
28562
- var _iterator38 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
28563
- _step38;
28322
+ var _iterator27 = _createForOfIteratorHelper$6(this.articleOptionStates),
28323
+ _step27;
28564
28324
  try {
28565
- for (_iterator38.s(); !(_step38 = _iterator38.n()).done;) {
28566
- var ops = _step38.value;
28325
+ for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
28326
+ var ops = _step27.value;
28567
28327
  var opt = void 0;
28568
28328
  if (!ops.val) continue;
28569
28329
  opt = ops.optionCodex;
@@ -28576,9 +28336,9 @@ var DivaArticle = /*#__PURE__*/function () {
28576
28336
  });
28577
28337
  }
28578
28338
  } catch (err) {
28579
- _iterator38.e(err);
28339
+ _iterator27.e(err);
28580
28340
  } finally {
28581
- _iterator38.f();
28341
+ _iterator27.f();
28582
28342
  }
28583
28343
  return MAT;
28584
28344
  }
@@ -28620,11 +28380,11 @@ var DivaArticle = /*#__PURE__*/function () {
28620
28380
  value: function getVariantBasketData() {
28621
28381
  var variantBasketData = [];
28622
28382
  var articleOptions = this.getArticleOptionStatesWithOptionsForPrint();
28623
- var _iterator39 = _createForOfIteratorHelper$6(articleOptions.values()),
28624
- _step39;
28383
+ var _iterator28 = _createForOfIteratorHelper$6(articleOptions),
28384
+ _step28;
28625
28385
  try {
28626
- for (_iterator39.s(); !(_step39 = _iterator39.n()).done;) {
28627
- var ops = _step39.value;
28386
+ for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {
28387
+ var ops = _step28.value;
28628
28388
  var OP = ops.optionCodex;
28629
28389
  if (ops) {
28630
28390
  var _ops$idmVariantenArt2;
@@ -28691,9 +28451,9 @@ var DivaArticle = /*#__PURE__*/function () {
28691
28451
  }
28692
28452
  }
28693
28453
  } catch (err) {
28694
- _iterator39.e(err);
28454
+ _iterator28.e(err);
28695
28455
  } finally {
28696
- _iterator39.f();
28456
+ _iterator28.f();
28697
28457
  }
28698
28458
  return variantBasketData;
28699
28459
  }
@@ -28862,19 +28622,19 @@ var DivaArticle = /*#__PURE__*/function () {
28862
28622
  }, {
28863
28623
  key: "cloneArticle",
28864
28624
  value: function cloneArticle(set) {
28865
- var clonedArticle = new DivaArticle(set, this.basketId, _objectSpread$d({}, this.article), this.article.catalogArticle, set.CatalogData);
28866
- clonedArticle.articleOptionStatesData = new Map();
28867
- var _iterator40 = _createForOfIteratorHelper$6(this.articleOptionStates.values()),
28868
- _step40;
28625
+ var clonedArticle = new DivaArticle(set, this.basketId, _objectSpread$e({}, this.article), this.article.catalogArticle, set.CatalogData);
28626
+ clonedArticle.articleOptionStatesData = [];
28627
+ var _iterator29 = _createForOfIteratorHelper$6(this.articleOptionStates),
28628
+ _step29;
28869
28629
  try {
28870
- for (_iterator40.s(); !(_step40 = _iterator40.n()).done;) {
28871
- var ops = _step40.value;
28872
- clonedArticle.articleOptionStatesData.set(ops.optionCodex, ops.cloneOptionState(clonedArticle.getIsConfigSingle));
28630
+ for (_iterator29.s(); !(_step29 = _iterator29.n()).done;) {
28631
+ var ops = _step29.value;
28632
+ clonedArticle.articleOptionStatesData.push(ops.cloneOptionState(clonedArticle.getIsConfigSingle));
28873
28633
  }
28874
28634
  } catch (err) {
28875
- _iterator40.e(err);
28635
+ _iterator29.e(err);
28876
28636
  } finally {
28877
- _iterator40.f();
28637
+ _iterator29.f();
28878
28638
  }
28879
28639
  clonedArticle.initEngine();
28880
28640
  clonedArticle.article.partlistArticles = {};
@@ -28890,8 +28650,8 @@ var DivaArticle = /*#__PURE__*/function () {
28890
28650
  function _createForOfIteratorHelper$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$5(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
28891
28651
  function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$5(r, a) : void 0; } }
28892
28652
  function _arrayLikeToArray$5(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
28893
- function ownKeys$c(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; }
28894
- function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
28653
+ function ownKeys$d(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; }
28654
+ function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
28895
28655
  var LOG$d = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
28896
28656
 
28897
28657
  //Diese Klasse verwaltet den Optionsbaum und ladelogik etc. eines Artikels
@@ -28910,7 +28670,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
28910
28670
  while (1) switch (_context.prev = _context.next) {
28911
28671
  case 0:
28912
28672
  _context.next = 2;
28913
- return this.preLoadArticles(set, [_objectSpread$c(_objectSpread$c({}, initParams), {}, {
28673
+ return this.preLoadArticles(set, [_objectSpread$d(_objectSpread$d({}, initParams), {}, {
28914
28674
  articleCodex: articleCodex
28915
28675
  })]);
28916
28676
  case 2:
@@ -29170,7 +28930,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29170
28930
  return _context6.abrupt("continue", 37);
29171
28931
  case 12:
29172
28932
  if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
29173
- valuesArray[i] = actArticle.getValidValues(_objectSpread$c({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
28933
+ valuesArray[i] = actArticle.getValidValues(_objectSpread$d({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
29174
28934
  }
29175
28935
 
29176
28936
  //only set config if valuesArray are not empty or the article is initializing
@@ -29374,7 +29134,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29374
29134
  for (var key in articles) {
29375
29135
  var checkArticle = articles[key];
29376
29136
  //und jetzt in allen Optionsbäumen nach GroupedUsedOPVs suchen
29377
- var _iterator = _createForOfIteratorHelper$5(checkArticle.articleOptionStates.values()),
29137
+ var _iterator = _createForOfIteratorHelper$5(checkArticle.articleOptionStates),
29378
29138
  _step;
29379
29139
  try {
29380
29140
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -29423,7 +29183,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29423
29183
  for (var i = keys.length - 1; i >= 0; i--) {
29424
29184
  var article = articles[keys[i]];
29425
29185
  if (article.hasArticleOptionStates) {
29426
- var _iterator2 = _createForOfIteratorHelper$5(article.articleOptionStates.values()),
29186
+ var _iterator2 = _createForOfIteratorHelper$5(article.articleOptionStates),
29427
29187
  _step2;
29428
29188
  try {
29429
29189
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
@@ -29452,24 +29212,50 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29452
29212
  var _initCfgValues = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(article, variantValues,
29453
29213
  // Werte aus einem Basiskonfigurat,
29454
29214
  variantItems) {
29455
- var myCatalogArticleOptions, i, _article$set$ViewConf, attr, foundItem, _foundItem$opt, freeText, opss, _i, ops, opv, _iterator3, _step3, _ops, value, optionValueCodex, _i2, variantItem, possibleValues, j, possibleValue, _i3, _variantItem, val;
29456
- return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context10) {
29457
- while (1) switch (_context10.prev = _context10.next) {
29215
+ var myCatalogArticleOptions, _loop2, i, attr, foundItem, _foundItem$opt, freeText, opss, _i, ops, opv, _iterator3, _step3, _ops, value, optionValueCodex, _i2, variantItem, possibleValues, j, possibleValue, _i3, _variantItem, val;
29216
+ return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context11) {
29217
+ while (1) switch (_context11.prev = _context11.next) {
29458
29218
  case 0:
29459
29219
  myCatalogArticleOptions = Object.values(article.catalogArticleOptions).sort(function (a, b) {
29460
29220
  var _a$sequenceNo, _b$sequenceNo;
29461
29221
  return ((_a$sequenceNo = a.sequenceNo) !== null && _a$sequenceNo !== void 0 ? _a$sequenceNo : 0) - ((_b$sequenceNo = b.sequenceNo) !== null && _b$sequenceNo !== void 0 ? _b$sequenceNo : 0);
29462
29222
  });
29463
- if (myCatalogArticleOptions) {
29464
- for (i = 0; i < myCatalogArticleOptions.length; i++) {
29465
- //Hier wird mal geschaut, ob der aktuelle Artikel alle Optionen schon initialisiert hat.
29466
- if (!article.articleOptionStates.has(myCatalogArticleOptions[i].codex)) {
29467
- article.uploadOptionState(new ArticleOptionStateData(myCatalogArticleOptions[i], article.getIsConfigSingle, undefined, (_article$set$ViewConf = article.set.ViewConfig) === null || _article$set$ViewConf === void 0 ? void 0 : _article$set$ViewConf.useIsOptionDefinedWarning)); //alle Optionen erstellen
29223
+ if (!myCatalogArticleOptions) {
29224
+ _context11.next = 9;
29225
+ break;
29226
+ }
29227
+ _loop2 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop2(i) {
29228
+ var _article$set$ViewConf, optionState;
29229
+ return _regeneratorRuntime__default["default"].wrap(function _loop2$(_context10) {
29230
+ while (1) switch (_context10.prev = _context10.next) {
29231
+ case 0:
29232
+ //Hier wird mal geschaut, ob der aktuelle Artikel alle Optionen schon initialisiert hat.
29233
+ if (!article.articleOptionStates.find(function (ops) {
29234
+ return ops.optionCodex == myCatalogArticleOptions[i].codex;
29235
+ })) {
29236
+ optionState = new ArticleOptionStateData(myCatalogArticleOptions[i], article.getIsConfigSingle, undefined, (_article$set$ViewConf = article.set.ViewConfig) === null || _article$set$ViewConf === void 0 ? void 0 : _article$set$ViewConf.useIsOptionDefinedWarning);
29237
+ article.uploadOptionState(optionState); //alle Optionen erstellen
29238
+ }
29239
+ case 1:
29240
+ case "end":
29241
+ return _context10.stop();
29468
29242
  }
29469
- }
29243
+ }, _loop2);
29244
+ });
29245
+ i = 0;
29246
+ case 4:
29247
+ if (!(i < myCatalogArticleOptions.length)) {
29248
+ _context11.next = 9;
29249
+ break;
29470
29250
  }
29471
- if (!article.articleOptionStates.size) {
29472
- _context10.next = 26;
29251
+ return _context11.delegateYield(_loop2(i), "t0", 6);
29252
+ case 6:
29253
+ i++;
29254
+ _context11.next = 4;
29255
+ break;
29256
+ case 9:
29257
+ if (!article.articleOptionStates.length) {
29258
+ _context11.next = 33;
29473
29259
  break;
29474
29260
  }
29475
29261
  //infos eines Basisconfigurats initialisieren
@@ -29498,23 +29284,23 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29498
29284
  }
29499
29285
 
29500
29286
  //defaultValues for FreeText
29501
- _iterator3 = _createForOfIteratorHelper$5(article.articleOptionStates.values());
29502
- _context10.prev = 5;
29287
+ _iterator3 = _createForOfIteratorHelper$5(article.articleOptionStates);
29288
+ _context11.prev = 12;
29503
29289
  _iterator3.s();
29504
- case 7:
29290
+ case 14:
29505
29291
  if ((_step3 = _iterator3.n()).done) {
29506
- _context10.next = 18;
29292
+ _context11.next = 25;
29507
29293
  break;
29508
29294
  }
29509
29295
  _ops = _step3.value;
29510
29296
  if (!variantValues[_ops.optionCodex + '_val']) {
29511
- _context10.next = 11;
29297
+ _context11.next = 18;
29512
29298
  break;
29513
29299
  }
29514
- return _context10.abrupt("continue", 16);
29515
- case 11:
29300
+ return _context11.abrupt("continue", 23);
29301
+ case 18:
29516
29302
  value = undefined;
29517
- optionValueCodex = Array.from(_ops.option.articleOptionValues.values())[0].codex;
29303
+ optionValueCodex = Object.keys(_ops.option.articleOptionValues)[0];
29518
29304
  if (variantItems && _ops.isFreeText && _ops.measureUnit) {
29519
29305
  for (_i2 = 0; _i2 < variantItems.length && value == undefined; _i2++) {
29520
29306
  variantItem = variantItems[_i2];
@@ -29551,28 +29337,28 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29551
29337
  _ops.freeText = val;
29552
29338
  }
29553
29339
  }
29554
- if (value != undefined) article.engine.setOP(_ops.option.codex, _ops.option.articleOptionValues.get(optionValueCodex), value, true);
29555
- case 16:
29556
- _context10.next = 7;
29340
+ if (value != undefined) article.engine.setOP(_ops.option.codex, _ops.option.articleOptionValues[optionValueCodex], value, true);
29341
+ case 23:
29342
+ _context11.next = 14;
29557
29343
  break;
29558
- case 18:
29559
- _context10.next = 23;
29344
+ case 25:
29345
+ _context11.next = 30;
29560
29346
  break;
29561
- case 20:
29562
- _context10.prev = 20;
29563
- _context10.t0 = _context10["catch"](5);
29564
- _iterator3.e(_context10.t0);
29565
- case 23:
29566
- _context10.prev = 23;
29347
+ case 27:
29348
+ _context11.prev = 27;
29349
+ _context11.t1 = _context11["catch"](12);
29350
+ _iterator3.e(_context11.t1);
29351
+ case 30:
29352
+ _context11.prev = 30;
29567
29353
  _iterator3.f();
29568
- return _context10.finish(23);
29569
- case 26:
29354
+ return _context11.finish(30);
29355
+ case 33:
29570
29356
  if (article.plannerData) article.plannerData.varaintValuesInfluencingAVLAVRFilter = article.getVariantValuesInfluencingOptions([(!article.CatalogData.isIDMFormat ? 'OPT' : '') + '89', (!article.CatalogData.isIDMFormat ? 'OPT' : '') + '90']);
29571
- case 27:
29357
+ case 34:
29572
29358
  case "end":
29573
- return _context10.stop();
29359
+ return _context11.stop();
29574
29360
  }
29575
- }, _callee9, null, [[5, 20, 23, 26]]);
29361
+ }, _callee9, null, [[12, 27, 30, 33]]);
29576
29362
  }));
29577
29363
  function initCfgValues(_x24, _x25, _x26) {
29578
29364
  return _initCfgValues.apply(this, arguments);
@@ -29594,8 +29380,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29594
29380
  value: (function () {
29595
29381
  var _updateCfgValues = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(article, newConfigValues, alreadyInitializedValues, dontCalcPrice, dontLoadPartlist, calcVariantPrice, onlyUpdateOnce) {
29596
29382
  var maxPriceOfGroupCodex, setByFeatureVariantValues, key, partlistArticlesToLoad;
29597
- return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context11) {
29598
- while (1) switch (_context11.prev = _context11.next) {
29383
+ return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context12) {
29384
+ while (1) switch (_context12.prev = _context12.next) {
29599
29385
  case 0:
29600
29386
  if (!!article.CatalogData.bundleRules) dontLoadPartlist = true;
29601
29387
  //es wird versucht die neuen Optionswerte zu setzten
@@ -29621,24 +29407,24 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29621
29407
  article.engine.evalDecisions(onlyUpdateOnce);
29622
29408
  }
29623
29409
  if (calcVariantPrice) {
29624
- _context11.next = 9;
29410
+ _context12.next = 9;
29625
29411
  break;
29626
29412
  }
29627
- _context11.next = 9;
29413
+ _context12.next = 9;
29628
29414
  return article.updateShelfPlannerState(newConfigValues);
29629
29415
  case 9:
29630
29416
  if (!(!dontCalcPrice && !calcVariantPrice)) {
29631
- _context11.next = 12;
29417
+ _context12.next = 12;
29632
29418
  break;
29633
29419
  }
29634
- _context11.next = 12;
29420
+ _context12.next = 12;
29635
29421
  return this.updateLastElement(article);
29636
29422
  case 12:
29637
- _context11.next = 14;
29423
+ _context12.next = 14;
29638
29424
  return this.evalAndLoadPartlistArticles(article, dontLoadPartlist, newConfigValues);
29639
29425
  case 14:
29640
- partlistArticlesToLoad = _context11.sent;
29641
- _context11.next = 17;
29426
+ partlistArticlesToLoad = _context12.sent;
29427
+ _context12.next = 17;
29642
29428
  return this.evalOpvsOnOpvsConstructionRules(article);
29643
29429
  case 17:
29644
29430
  //danach Preise berechnen
@@ -29649,10 +29435,10 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29649
29435
  article.engine.updateConfigDependentMedia();
29650
29436
  }
29651
29437
  }
29652
- return _context11.abrupt("return", partlistArticlesToLoad);
29438
+ return _context12.abrupt("return", partlistArticlesToLoad);
29653
29439
  case 19:
29654
29440
  case "end":
29655
- return _context11.stop();
29441
+ return _context12.stop();
29656
29442
  }
29657
29443
  }, _callee10, this);
29658
29444
  }));
@@ -29666,17 +29452,17 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29666
29452
  value: function () {
29667
29453
  var _updateLastElement = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(article) {
29668
29454
  var isIDM, opsLastElement, lastElement, opsLastPlannedAccessoire, opsFirstAccessoire, _article$accessoirePa, _article$accessoirePa2, accessoires, i;
29669
- return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context12) {
29670
- while (1) switch (_context12.prev = _context12.next) {
29455
+ return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context13) {
29456
+ while (1) switch (_context13.prev = _context13.next) {
29671
29457
  case 0:
29672
29458
  isIDM = article.CatalogData.isIDMFormat;
29673
29459
  opsLastElement = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'ELEMENTPOSITION');
29674
29460
  if (opsLastElement) {
29675
29461
  lastElement = setHandlerInstance.getLastElementInGroup(article);
29676
29462
  if (lastElement && lastElement.elementId == article.elementId) {
29677
- opsLastElement.val = opsLastElement.visibleOptionValues.get((!isIDM ? 'OPV' : '') + 'LASTELEMENT');
29463
+ opsLastElement.val = opsLastElement.visibleOptionValues[(!isIDM ? 'OPV' : '') + 'LASTELEMENT'];
29678
29464
  } else {
29679
- opsLastElement.val = opsLastElement.visibleOptionValues.get((!isIDM ? 'OPV' : '') + 'NOTLASTELEMENT');
29465
+ opsLastElement.val = opsLastElement.visibleOptionValues[(!isIDM ? 'OPV' : '') + 'NOTLASTELEMENT'];
29680
29466
  }
29681
29467
  }
29682
29468
  opsLastPlannedAccessoire = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'LASTSTACKEDARTICLE');
@@ -29684,32 +29470,32 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29684
29470
  if (Object.values(article.accessoires).find(function (accessoire) {
29685
29471
  return accessoire.hasCatalogPlannerArticle;
29686
29472
  })) {
29687
- opsLastPlannedAccessoire.val = opsLastPlannedAccessoire.visibleOptionValues.get((!isIDM ? 'OPV' : '') + 'NOTLASTSTACKEDARTICLE');
29473
+ opsLastPlannedAccessoire.val = opsLastPlannedAccessoire.visibleOptionValues[(!isIDM ? 'OPV' : '') + 'NOTLASTSTACKEDARTICLE'];
29688
29474
  } else {
29689
- opsLastPlannedAccessoire.val = opsLastPlannedAccessoire.visibleOptionValues.get((!isIDM ? 'OPV' : '') + 'LASTSTACKEDARTICLE');
29475
+ opsLastPlannedAccessoire.val = opsLastPlannedAccessoire.visibleOptionValues[(!isIDM ? 'OPV' : '') + 'LASTSTACKEDARTICLE'];
29690
29476
  }
29691
29477
  }
29692
29478
  opsFirstAccessoire = article.getArticleOptionState((!isIDM ? 'OPT' : '') + 'FIRSTACCESSOIRE');
29693
29479
  if (!opsFirstAccessoire) {
29694
- _context12.next = 15;
29480
+ _context13.next = 15;
29695
29481
  break;
29696
29482
  }
29697
29483
  accessoires = (_article$accessoirePa = (_article$accessoirePa2 = article.accessoireParentArticle) === null || _article$accessoirePa2 === void 0 ? void 0 : _article$accessoirePa2.getAccessoireByArticleCodex(article.articleCodex)) !== null && _article$accessoirePa !== void 0 ? _article$accessoirePa : [];
29698
29484
  i = 0;
29699
29485
  case 9:
29700
29486
  if (!(i < accessoires.length)) {
29701
- _context12.next = 15;
29487
+ _context13.next = 15;
29702
29488
  break;
29703
29489
  }
29704
- _context12.next = 12;
29490
+ _context13.next = 12;
29705
29491
  return this.updateOption(accessoires[i], (!isIDM ? 'OPT' : '') + 'FIRSTACCESSOIRE', (!isIDM ? 'OPV' : '') + (i + 1).toString(), i === 0 ? (!isIDM ? 'OPV' : '') + 'FIRSTACCESSOIRE' : (!isIDM ? 'OPV' : '') + 'NOTFIRSTACCESSOIRE');
29706
29492
  case 12:
29707
29493
  i++;
29708
- _context12.next = 9;
29494
+ _context13.next = 9;
29709
29495
  break;
29710
29496
  case 15:
29711
29497
  case "end":
29712
- return _context12.stop();
29498
+ return _context13.stop();
29713
29499
  }
29714
29500
  }, _callee11, this);
29715
29501
  }));
@@ -29724,34 +29510,34 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29724
29510
  var _updateOption = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(article, optionCodex, newCodex, fallbackNewCodex) {
29725
29511
  var _ops$val, _ops$visibleOptionVal;
29726
29512
  var ops, oldCodex, newVal;
29727
- return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context13) {
29728
- while (1) switch (_context13.prev = _context13.next) {
29513
+ return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context14) {
29514
+ while (1) switch (_context14.prev = _context14.next) {
29729
29515
  case 0:
29730
29516
  ops = article.getArticleOptionState(optionCodex);
29731
29517
  if (ops) {
29732
- _context13.next = 3;
29518
+ _context14.next = 3;
29733
29519
  break;
29734
29520
  }
29735
- return _context13.abrupt("return");
29521
+ return _context14.abrupt("return");
29736
29522
  case 3:
29737
29523
  oldCodex = (_ops$val = ops.val) === null || _ops$val === void 0 ? void 0 : _ops$val.codex;
29738
- newVal = (_ops$visibleOptionVal = ops.visibleOptionValues.get(newCodex)) !== null && _ops$visibleOptionVal !== void 0 ? _ops$visibleOptionVal : fallbackNewCodex ? ops.visibleOptionValues.get(fallbackNewCodex) : undefined;
29524
+ newVal = (_ops$visibleOptionVal = ops.visibleOptionValues[newCodex]) !== null && _ops$visibleOptionVal !== void 0 ? _ops$visibleOptionVal : fallbackNewCodex ? ops.visibleOptionValues[fallbackNewCodex] : undefined;
29739
29525
  if (!(oldCodex === (newVal === null || newVal === void 0 ? void 0 : newVal.codex))) {
29740
- _context13.next = 7;
29526
+ _context14.next = 7;
29741
29527
  break;
29742
29528
  }
29743
- return _context13.abrupt("return");
29529
+ return _context14.abrupt("return");
29744
29530
  case 7:
29745
29531
  if (!newVal) {
29746
- _context13.next = 11;
29532
+ _context14.next = 11;
29747
29533
  break;
29748
29534
  }
29749
29535
  ops.val = newVal;
29750
- _context13.next = 11;
29536
+ _context14.next = 11;
29751
29537
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(article.set, {}, []);
29752
29538
  case 11:
29753
29539
  case "end":
29754
- return _context13.stop();
29540
+ return _context14.stop();
29755
29541
  }
29756
29542
  }, _callee12);
29757
29543
  }));
@@ -29767,12 +29553,12 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29767
29553
  value: (function () {
29768
29554
  var _evalAndLoadPartlistArticles = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(article, dontLoadPartlist, newConfigValues) {
29769
29555
  var partlistArticlesToLoad;
29770
- return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context14) {
29771
- while (1) switch (_context14.prev = _context14.next) {
29556
+ return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context15) {
29557
+ while (1) switch (_context15.prev = _context15.next) {
29772
29558
  case 0:
29773
29559
  partlistArticlesToLoad = [];
29774
29560
  if (!article.hasPartlistArticle) {
29775
- _context14.next = 9;
29561
+ _context15.next = 9;
29776
29562
  break;
29777
29563
  }
29778
29564
  article.deletePartlistArticles(); //alle aktellen PartlistArticles des Articles löschen!
@@ -29782,10 +29568,10 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29782
29568
  return ((_a$sequenceNo2 = a.sequenceNo) !== null && _a$sequenceNo2 !== void 0 ? _a$sequenceNo2 : 0) - ((_b$sequenceNo2 = b.sequenceNo) !== null && _b$sequenceNo2 !== void 0 ? _b$sequenceNo2 : 0);
29783
29569
  });
29784
29570
  if (dontLoadPartlist) {
29785
- _context14.next = 9;
29571
+ _context15.next = 9;
29786
29572
  break;
29787
29573
  }
29788
- _context14.next = 8;
29574
+ _context15.next = 8;
29789
29575
  return this.loadPartlistArticles(partlistArticlesToLoad, article, article.VariantValues);
29790
29576
  case 8:
29791
29577
  partlistArticlesToLoad = [];
@@ -29794,10 +29580,10 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29794
29580
  partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, article.bundleRules, _defineProperty__default["default"]({}, article.basketId, article));
29795
29581
  }
29796
29582
  article.hasPartlistArticleInitialized = true;
29797
- return _context14.abrupt("return", partlistArticlesToLoad);
29583
+ return _context15.abrupt("return", partlistArticlesToLoad);
29798
29584
  case 12:
29799
29585
  case "end":
29800
- return _context14.stop();
29586
+ return _context15.stop();
29801
29587
  }
29802
29588
  }, _callee13, this);
29803
29589
  }));
@@ -29812,10 +29598,10 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29812
29598
  var _loadPartlistArticles = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(partlistArticlesToLoad, article, newConfigValues) {
29813
29599
  var _this = this;
29814
29600
  var i;
29815
- return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context15) {
29816
- while (1) switch (_context15.prev = _context15.next) {
29601
+ return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context16) {
29602
+ while (1) switch (_context16.prev = _context16.next) {
29817
29603
  case 0:
29818
- _context15.next = 2;
29604
+ _context16.next = 2;
29819
29605
  return this.preLoadArticles(article.set, partlistArticlesToLoad.map(function (p) {
29820
29606
  return _this.partlistArticleInitData(article, p);
29821
29607
  }));
@@ -29823,20 +29609,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29823
29609
  i = 0;
29824
29610
  case 3:
29825
29611
  if (!(i < partlistArticlesToLoad.length)) {
29826
- _context15.next = 9;
29612
+ _context16.next = 9;
29827
29613
  break;
29828
29614
  }
29829
- _context15.next = 6;
29615
+ _context16.next = 6;
29830
29616
  return this.loadPartlistArticle(partlistArticlesToLoad[i], article, newConfigValues);
29831
29617
  case 6:
29832
29618
  i++;
29833
- _context15.next = 3;
29619
+ _context16.next = 3;
29834
29620
  break;
29835
29621
  case 9:
29836
29622
  article.sortPartlistArticles(partlistArticlesToLoad);
29837
29623
  case 10:
29838
29624
  case "end":
29839
- return _context15.stop();
29625
+ return _context16.stop();
29840
29626
  }
29841
29627
  }, _callee14, this);
29842
29628
  }));
@@ -29851,25 +29637,25 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29851
29637
  value: function () {
29852
29638
  var _loadPartlistArticle = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(doLoadItem, article, newConfigValues) {
29853
29639
  var nArticle, _doLoadItem$VariantVa;
29854
- return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context16) {
29855
- while (1) switch (_context16.prev = _context16.next) {
29640
+ return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context17) {
29641
+ while (1) switch (_context17.prev = _context17.next) {
29856
29642
  case 0:
29857
- _context16.next = 2;
29643
+ _context17.next = 2;
29858
29644
  return this.loadArticle(article.set, doLoadItem.ArticleCodex, this.partlistArticleInitData(article, doLoadItem));
29859
29645
  case 2:
29860
- nArticle = _context16.sent;
29646
+ nArticle = _context17.sent;
29861
29647
  if (!nArticle) {
29862
- _context16.next = 8;
29648
+ _context17.next = 8;
29863
29649
  break;
29864
29650
  }
29865
29651
  doLoadItem.BasketID = nArticle.basketId;
29866
- _context16.next = 7;
29652
+ _context17.next = 7;
29867
29653
  return this.toDoAfterArticleLoaded(nArticle, {}, nArticle.variantValuesForPla(nArticle.partlistArticleStandalone, (_doLoadItem$VariantVa = doLoadItem.VariantValues) !== null && _doLoadItem$VariantVa !== void 0 ? _doLoadItem$VariantVa : {}, newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}), 'initializingPartlist', doLoadItem.VariantItemData);
29868
29654
  case 7:
29869
29655
  article.addPartlistArticle(nArticle);
29870
29656
  case 8:
29871
29657
  case "end":
29872
- return _context16.stop();
29658
+ return _context17.stop();
29873
29659
  }
29874
29660
  }, _callee15, this);
29875
29661
  }));
@@ -29915,9 +29701,9 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29915
29701
  value: (function () {
29916
29702
  var _evalOpvsOnOpvsConstructionRules = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(article) {
29917
29703
  var _article$CatalogData$;
29918
- var somethingChanged, previousRules, _key, actRules, item, _iterator4, _step4, ops, myOPVs, _iterator5, _step5, _step5$value, key2, opv, opvGroupName, _article$catalogArtic, _article$catalogArtic2, disable, onOpv, onOpvArr, invaliOPVs, invalidOPVArr, j, opvRule, ops2, i, invalidOpv, ops3, key, constructionRule, notifications, _i4, _item;
29919
- return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context17) {
29920
- while (1) switch (_context17.prev = _context17.next) {
29704
+ var somethingChanged, previousRules, _key, actRules, item, _iterator4, _step4, ops, myOPVs, key2, opv, opvGroupName, _article$catalogArtic, _article$catalogArtic2, disable, onOpv, onOpvArr, invaliOPVs, invalidOPVArr, j, opvRule, ops2, i, invalidOpv, ops3, key, constructionRule, notifications, _i4, _item;
29705
+ return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context18) {
29706
+ while (1) switch (_context18.prev = _context18.next) {
29921
29707
  case 0:
29922
29708
  somethingChanged = false;
29923
29709
  previousRules = {};
@@ -29936,59 +29722,52 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29936
29722
  }
29937
29723
  }
29938
29724
  }
29939
- _iterator4 = _createForOfIteratorHelper$5(article.articleOptionStates.values());
29725
+ _iterator4 = _createForOfIteratorHelper$5(article.articleOptionStates);
29940
29726
  try {
29941
29727
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
29942
29728
  ops = _step4.value;
29943
29729
  if (ops.optionCodex.toUpperCase().endsWith('OPTCONSTRUCTIONRULES')) {
29944
29730
  myOPVs = ops.option.articleOptionValues;
29945
- _iterator5 = _createForOfIteratorHelper$5(myOPVs);
29946
- try {
29947
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
29948
- _step5$value = _slicedToArray__default["default"](_step5.value, 2), key2 = _step5$value[0], opv = _step5$value[1];
29949
- opvGroupName = opv.groupName;
29950
- if (opvGroupName && opvGroupName.startsWith('ON_OPV_SET_OPV')) {
29951
- disable = false;
29952
- if (opvGroupName.endsWith('DISABLE')) {
29953
- disable = true;
29954
- }
29955
- onOpv = (_article$catalogArtic = article.catalogArticle.onConfigOption) !== null && _article$catalogArtic !== void 0 ? _article$catalogArtic : '';
29956
- onOpvArr = onOpv.split(',');
29957
- invaliOPVs = (_article$catalogArtic2 = article.catalogArticle.onSetConfigOtpion) !== null && _article$catalogArtic2 !== void 0 ? _article$catalogArtic2 : '';
29958
- invalidOPVArr = invaliOPVs.split(',');
29959
- for (j = 0; j < onOpvArr.length; j++) {
29960
- //alle OPVs auf welche zu prüfen ist durchlaufen
29961
- opvRule = onOpvArr[j].split(':');
29962
- ops2 = article.getArticleOptionStateFlat(opvRule[0]);
29963
- if (ops2) {
29964
- if (ops2.valCodex == opvRule[1]) {
29965
- for (i = 0; i < invalidOPVArr.length; i++) {
29966
- //alle zu deaktivierende OPVs durchgehen
29967
- invalidOpv = invalidOPVArr[i].split(':');
29968
- ops3 = article.getArticleOptionStateFlat(invalidOpv[0]);
29969
- if (ops3) {
29970
- key = onOpvArr[j];
29971
- constructionRule = {
29972
- message: {
29973
- DE: opv.name,
29974
- IT: opv.name,
29975
- FR: opv.name
29976
- },
29977
- type: disable ? 'DISABLE' : 'WARNING'
29978
- };
29979
- article.addUpdatedOPVbyOPVConstructionRules(key, article.updateOPVConstruction(invalidOpv[0], invalidOpv[1], constructionRule));
29980
- somethingChanged = true;
29981
- }
29731
+ for (key2 in myOPVs) {
29732
+ opv = myOPVs[key2];
29733
+ opvGroupName = opv.groupName;
29734
+ if (opvGroupName && opvGroupName.startsWith('ON_OPV_SET_OPV')) {
29735
+ disable = false;
29736
+ if (opvGroupName.endsWith('DISABLE')) {
29737
+ disable = true;
29738
+ }
29739
+ onOpv = (_article$catalogArtic = article.catalogArticle.onConfigOption) !== null && _article$catalogArtic !== void 0 ? _article$catalogArtic : '';
29740
+ onOpvArr = onOpv.split(',');
29741
+ invaliOPVs = (_article$catalogArtic2 = article.catalogArticle.onSetConfigOtpion) !== null && _article$catalogArtic2 !== void 0 ? _article$catalogArtic2 : '';
29742
+ invalidOPVArr = invaliOPVs.split(',');
29743
+ for (j = 0; j < onOpvArr.length; j++) {
29744
+ //alle OPVs auf welche zu prüfen ist durchlaufen
29745
+ opvRule = onOpvArr[j].split(':');
29746
+ ops2 = article.getArticleOptionStateFlat(opvRule[0]);
29747
+ if (ops2) {
29748
+ if (ops2.valCodex == opvRule[1]) {
29749
+ for (i = 0; i < invalidOPVArr.length; i++) {
29750
+ //alle zu deaktivierende OPVs durchgehen
29751
+ invalidOpv = invalidOPVArr[i].split(':');
29752
+ ops3 = article.getArticleOptionStateFlat(invalidOpv[0]);
29753
+ if (ops3) {
29754
+ key = onOpvArr[j];
29755
+ constructionRule = {
29756
+ message: {
29757
+ DE: opv.name,
29758
+ IT: opv.name,
29759
+ FR: opv.name
29760
+ },
29761
+ type: disable ? 'DISABLE' : 'WARNING'
29762
+ };
29763
+ article.addUpdatedOPVbyOPVConstructionRules(key, article.updateOPVConstruction(invalidOpv[0], invalidOpv[1], constructionRule));
29764
+ somethingChanged = true;
29982
29765
  }
29983
29766
  }
29984
29767
  }
29985
29768
  }
29986
29769
  }
29987
29770
  }
29988
- } catch (err) {
29989
- _iterator5.e(err);
29990
- } finally {
29991
- _iterator5.f();
29992
29771
  }
29993
29772
  }
29994
29773
  }
@@ -29998,26 +29777,26 @@ var DivaArticleHandler = /*#__PURE__*/function () {
29998
29777
  _iterator4.f();
29999
29778
  }
30000
29779
  if (!((_article$CatalogData$ = article.CatalogData.warningRules) !== null && _article$CatalogData$ !== void 0 && _article$CatalogData$.length)) {
30001
- _context17.next = 20;
29780
+ _context18.next = 20;
30002
29781
  break;
30003
29782
  }
30004
29783
  notifications = this.checkNotificationRules(article.CatalogData.warningRules, _defineProperty__default["default"]({}, article.basketId, article), {});
30005
29784
  if (!(notifications !== null && notifications !== void 0 && notifications.length)) {
30006
- _context17.next = 20;
29785
+ _context18.next = 20;
30007
29786
  break;
30008
29787
  }
30009
29788
  _i4 = 0;
30010
29789
  case 11:
30011
29790
  if (!(_i4 < notifications.length)) {
30012
- _context17.next = 19;
29791
+ _context18.next = 19;
30013
29792
  break;
30014
29793
  }
30015
29794
  _item = notifications[_i4];
30016
29795
  if (_item.showAsWarning) {
30017
- _context17.next = 15;
29796
+ _context18.next = 15;
30018
29797
  break;
30019
29798
  }
30020
- return _context17.abrupt("continue", 16);
29799
+ return _context18.abrupt("continue", 16);
30021
29800
  case 15:
30022
29801
  article.addUpdatedOPVbyOPVConstructionRules(_item.showAsWarning.option + ';' + _item.showAsWarning.optionValue, article.updateOPVConstruction((!article.CatalogData.isIDMFormat ? 'OPT' : '') + _item.showAsWarning.option, (!article.CatalogData.isIDMFormat ? 'OPV' : '') + _item.showAsWarning.optionValue, {
30023
29802
  message: _item.message,
@@ -30025,20 +29804,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30025
29804
  }));
30026
29805
  case 16:
30027
29806
  _i4++;
30028
- _context17.next = 11;
29807
+ _context18.next = 11;
30029
29808
  break;
30030
29809
  case 19:
30031
29810
  somethingChanged = true;
30032
29811
  case 20:
30033
29812
  if (!(somethingChanged && JSON.stringify(previousRules) != JSON.stringify(article.updatedOPVbyOPVConstructionRules))) {
30034
- _context17.next = 23;
29813
+ _context18.next = 23;
30035
29814
  break;
30036
29815
  }
30037
- _context17.next = 23;
29816
+ _context18.next = 23;
30038
29817
  return this.updateCfgValues(article, {}, {});
30039
29818
  case 23:
30040
29819
  case "end":
30041
- return _context17.stop();
29820
+ return _context18.stop();
30042
29821
  }
30043
29822
  }, _callee16, this);
30044
29823
  }));
@@ -30077,7 +29856,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30077
29856
  if (ruleValid) break;
30078
29857
  }
30079
29858
  if (ruleValid) {
30080
- returnValue.push(_objectSpread$c(_objectSpread$c({}, entry), {}, {
29859
+ returnValue.push(_objectSpread$d(_objectSpread$d({}, entry), {}, {
30081
29860
  index: i
30082
29861
  }));
30083
29862
  break;
@@ -30150,7 +29929,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30150
29929
  value: function checkIfAllOptionsAreDefined(articles) {
30151
29930
  var articleNames = [];
30152
29931
  var options = [];
30153
- var _loop2 = function _loop2(baksetId) {
29932
+ var _loop3 = function _loop3(baksetId) {
30154
29933
  var article = articles[baksetId];
30155
29934
  if (!article.areAllOptionsDefined) {
30156
29935
  var requiredUserInputOptions = article.requiredUserInputOptions;
@@ -30166,7 +29945,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30166
29945
  }
30167
29946
  };
30168
29947
  for (var baksetId in articles) {
30169
- _loop2(baksetId);
29948
+ _loop3(baksetId);
30170
29949
  }
30171
29950
  return {
30172
29951
  articleNames: articleNames,
@@ -30194,8 +29973,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30194
29973
  var filter = article.plannerData.AVLFilter[i];
30195
29974
  if (dockedToArticle.plannerData.AVRFilter.includes(filter)) {
30196
29975
  var ops = article.getArticleOptionState((!article.CatalogData.isIDMFormat ? 'OPT' : '') + '89');
30197
- if (ops !== null && ops !== void 0 && ops.visibleOptionValues.get((!article.CatalogData.isIDMFormat ? 'OPV' : '') + filter)) {
30198
- article.engine.setOP(ops.optionCodex, ops.visibleOptionValues.get((!article.CatalogData.isIDMFormat ? 'OPV' : '') + filter));
29976
+ if (ops !== null && ops !== void 0 && ops.visibleOptionValues[(!article.CatalogData.isIDMFormat ? 'OPV' : '') + filter]) {
29977
+ article.engine.setOP(ops.optionCodex, ops.visibleOptionValues[(!article.CatalogData.isIDMFormat ? 'OPV' : '') + filter]);
30199
29978
  somethingChanged = true;
30200
29979
  break;
30201
29980
  }
@@ -30207,8 +29986,8 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30207
29986
  var _filter = article.plannerData.AVRFilter[_i5];
30208
29987
  if (dockedToArticle.plannerData.AVLFilter.includes(_filter)) {
30209
29988
  var _ops2 = article.getArticleOptionState((!article.CatalogData.isIDMFormat ? 'OPT' : '') + '90');
30210
- if (_ops2 !== null && _ops2 !== void 0 && _ops2.visibleOptionValues.get((!article.CatalogData.isIDMFormat ? 'OPV' : '') + _filter)) {
30211
- article.engine.setOP(_ops2.optionCodex, _ops2.visibleOptionValues.get((!article.CatalogData.isIDMFormat ? 'OPV' : '') + _filter));
29989
+ if (_ops2 !== null && _ops2 !== void 0 && _ops2.visibleOptionValues[(!article.CatalogData.isIDMFormat ? 'OPV' : '') + _filter]) {
29990
+ article.engine.setOP(_ops2.optionCodex, _ops2.visibleOptionValues[(!article.CatalogData.isIDMFormat ? 'OPV' : '') + _filter]);
30212
29991
  somethingChanged = true;
30213
29992
  break;
30214
29993
  }
@@ -30223,25 +30002,25 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30223
30002
  value: function () {
30224
30003
  var _triggerShelfplannerVisibility = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee17(artices, gridGroup) {
30225
30004
  var key, _artice$shelfPlanner, artice;
30226
- return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context18) {
30227
- while (1) switch (_context18.prev = _context18.next) {
30005
+ return _regeneratorRuntime__default["default"].wrap(function _callee17$(_context19) {
30006
+ while (1) switch (_context19.prev = _context19.next) {
30228
30007
  case 0:
30229
- _context18.t0 = _regeneratorRuntime__default["default"].keys(artices);
30008
+ _context19.t0 = _regeneratorRuntime__default["default"].keys(artices);
30230
30009
  case 1:
30231
- if ((_context18.t1 = _context18.t0()).done) {
30232
- _context18.next = 8;
30010
+ if ((_context19.t1 = _context19.t0()).done) {
30011
+ _context19.next = 8;
30233
30012
  break;
30234
30013
  }
30235
- key = _context18.t1.value;
30014
+ key = _context19.t1.value;
30236
30015
  artice = artices[key];
30237
- _context18.next = 6;
30016
+ _context19.next = 6;
30238
30017
  return (_artice$shelfPlanner = artice.shelfPlanner) === null || _artice$shelfPlanner === void 0 ? void 0 : _artice$shelfPlanner.triggerVisibility(gridGroup);
30239
30018
  case 6:
30240
- _context18.next = 1;
30019
+ _context19.next = 1;
30241
30020
  break;
30242
30021
  case 8:
30243
30022
  case "end":
30244
- return _context18.stop();
30023
+ return _context19.stop();
30245
30024
  }
30246
30025
  }, _callee17);
30247
30026
  }));
@@ -30267,7 +30046,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30267
30046
  var hasFavorites = arguments.length > 3 ? arguments[3] : undefined;
30268
30047
  var ret = [];
30269
30048
  if (Object.values(articles).length == 0) return ret;
30270
- var _loop3 = function _loop3() {
30049
+ var _loop4 = function _loop4() {
30271
30050
  var _article$shelfPlanner3, _article$shelfPlanner4, _article$doorPlanner;
30272
30051
  var article = articles[key];
30273
30052
  var catalogData = article.CatalogData;
@@ -30351,7 +30130,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30351
30130
  ret = ret.concat(_this2.getOptiontreeAccessoiresArr(article.set.getSetId(), article));
30352
30131
  };
30353
30132
  for (var key in articles) {
30354
- _loop3();
30133
+ _loop4();
30355
30134
  }
30356
30135
  return ret;
30357
30136
  }
@@ -30396,11 +30175,11 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30396
30175
  value: function getOptiontreeAccessoiresArr(setId, article) {
30397
30176
  var s = 0;
30398
30177
  var accessoires = [];
30399
- var _iterator6 = _createForOfIteratorHelper$5(article.articleOptionStates.values()),
30400
- _step6;
30178
+ var _iterator5 = _createForOfIteratorHelper$5(article.articleOptionStates),
30179
+ _step5;
30401
30180
  try {
30402
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
30403
- var ops = _step6.value;
30181
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
30182
+ var ops = _step5.value;
30404
30183
  if (ops.option.articlePlaceholder) {
30405
30184
  //ArticlePlaceholder bestimmt, ob Optionswert als eigene SAPOrderline ausgegeben wird
30406
30185
  if (ops.isAccessoirArtNr && ops.isAccessoirArtNr != '') {
@@ -30416,9 +30195,9 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30416
30195
  }
30417
30196
  }
30418
30197
  } catch (err) {
30419
- _iterator6.e(err);
30198
+ _iterator5.e(err);
30420
30199
  } finally {
30421
- _iterator6.f();
30200
+ _iterator5.f();
30422
30201
  }
30423
30202
  return accessoires;
30424
30203
  }
@@ -30517,20 +30296,20 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30517
30296
  key: "correctPartlistArticlesByGlobalRules",
30518
30297
  value: (function () {
30519
30298
  var _correctPartlistArticlesByGlobalRules = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee18(set, partlistArticlesToLoad, bundleRules, doChangeRetailArticleNumbers) {
30520
- var _loop4, i, article;
30521
- return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context20) {
30522
- while (1) switch (_context20.prev = _context20.next) {
30299
+ var _loop5, i, article;
30300
+ return _regeneratorRuntime__default["default"].wrap(function _callee18$(_context21) {
30301
+ while (1) switch (_context21.prev = _context21.next) {
30523
30302
  case 0:
30524
30303
  if (bundleRules) partlistArticlesToLoad = this.bundlePartlistArticles(partlistArticlesToLoad, bundleRules, set.getDivaArticles());
30525
30304
  //Correct RetailArticleNumbers
30526
30305
  if (!(doChangeRetailArticleNumbers !== null && doChangeRetailArticleNumbers !== void 0 && doChangeRetailArticleNumbers.doChange && doChangeRetailArticleNumbers.retailArticleRules)) {
30527
- _context20.next = 9;
30306
+ _context21.next = 9;
30528
30307
  break;
30529
30308
  }
30530
- _loop4 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop4(i) {
30309
+ _loop5 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop5(i) {
30531
30310
  var rule;
30532
- return _regeneratorRuntime__default["default"].wrap(function _loop4$(_context19) {
30533
- while (1) switch (_context19.prev = _context19.next) {
30311
+ return _regeneratorRuntime__default["default"].wrap(function _loop5$(_context20) {
30312
+ while (1) switch (_context20.prev = _context20.next) {
30534
30313
  case 0:
30535
30314
  //Run through articleCodexes to repair:
30536
30315
  rule = doChangeRetailArticleNumbers.retailArticleRules.find(function (item) {
@@ -30542,30 +30321,30 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30542
30321
  }
30543
30322
  case 2:
30544
30323
  case "end":
30545
- return _context19.stop();
30324
+ return _context20.stop();
30546
30325
  }
30547
- }, _loop4);
30326
+ }, _loop5);
30548
30327
  });
30549
30328
  i = 0;
30550
30329
  case 4:
30551
30330
  if (!(i < partlistArticlesToLoad.length)) {
30552
- _context20.next = 9;
30331
+ _context21.next = 9;
30553
30332
  break;
30554
30333
  }
30555
- return _context20.delegateYield(_loop4(i), "t0", 6);
30334
+ return _context21.delegateYield(_loop5(i), "t0", 6);
30556
30335
  case 6:
30557
30336
  i++;
30558
- _context20.next = 4;
30337
+ _context21.next = 4;
30559
30338
  break;
30560
30339
  case 9:
30561
30340
  article = Object.values(set.getDivaArticles()).find(function (article) {
30562
30341
  return article.hasPartlistArticle && !article.deleted;
30563
30342
  });
30564
- _context20.next = 12;
30343
+ _context21.next = 12;
30565
30344
  return this.loadPartlistArticles(partlistArticlesToLoad, article, {});
30566
30345
  case 12:
30567
30346
  case "end":
30568
- return _context20.stop();
30347
+ return _context21.stop();
30569
30348
  }
30570
30349
  }, _callee18, this);
30571
30350
  }));
@@ -30578,7 +30357,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30578
30357
  key: "bundlePartlistArticles",
30579
30358
  value: function bundlePartlistArticles(partlistArticlesToLoad, bundleRules, articles) {
30580
30359
  var partlistArticlesToLoadGrouped = [];
30581
- var _loop5 = function _loop5(i) {
30360
+ var _loop6 = function _loop6(i) {
30582
30361
  var index = partlistArticlesToLoadGrouped.findIndex(function (item, j) {
30583
30362
  if (item.CatalogCodex == partlistArticlesToLoad[i].CatalogCodex && item.ArticleCodex == partlistArticlesToLoad[i].ArticleCodex && item.RetailArticleNr == partlistArticlesToLoad[i].RetailArticleNr && item.RetailPrefix == partlistArticlesToLoad[i].RetailPrefix) {
30584
30363
  return true;
@@ -30592,7 +30371,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
30592
30371
  }
30593
30372
  };
30594
30373
  for (var i = 0; i < partlistArticlesToLoad.length; i++) {
30595
- _loop5(i);
30374
+ _loop6(i);
30596
30375
  }
30597
30376
  //bundle Partlistarticles
30598
30377
  for (var _i6 = 0; _i6 < bundleRules.length; _i6++) {
@@ -31117,7 +30896,10 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
31117
30896
  var paletteType = (_set$api$getViewConfi = (_set$api$getViewConfi2 = set.api.getViewConfig()) === null || _set$api$getViewConfi2 === void 0 ? void 0 : _set$api$getViewConfi2.defaultOptionType) !== null && _set$api$getViewConfi !== void 0 ? _set$api$getViewConfi : 'SMALL';
31118
30897
  if (configStep && optionStep) {
31119
30898
  if (configStep.option == 'OPTVINYL' || configStep.option == 'OPTVINYL_1' || configStep.option == 'OPTFABRIC' || configStep.option == 'OPTBE' || configStep.option == 'OPTBE_AUSSEN' || configStep.option == 'OPTBE_INNEN' || configStep.option == 'OPTBE_PANEELE' || configStep.option == 'OPTMATRATZE_BE' || configStep.option == 'OPTBE_UG' || configStep.option == 'OPTBEZUG' || configStep.option == 'OPTKO' || configStep.option == 'OPTFR' || configStep.option == 'OPTNI' || configStep.option == 'OPTUF_FA' || configStep.option == 'OPTBE_NETZ' || configStep.option == 'OPTBE_AL' || configStep.option == 'OPTKISSEN_BE' || configStep.option == 'OPTKP_BE' || configStep.option == 'OPTARM_BE' || configStep.option == 'OPTBE_KT' || configStep.option == 'OPT3' || configStep.option == 'OPT5' || configStep.option == 'OPTBE_KNOEPFE' || configStep.option == 'OPTSK_FARBE' || configStep.option == 'OPTBANDFARBE' || configStep.option == 'OPTBE_BOX' || configStep.option == 'OPTMA_AF_BE' || configStep.option == 'OPTTOPPER_BE' || optionState !== null && optionState !== void 0 && optionState.option.hasOPG && optionState.hasImages || optionStep.mergesToOPG) {
31120
- paletteType = 'GAL_TEXT';
30899
+ if (!paletteType.includes('GAL_')) paletteType = 'GAL_TEXT';
30900
+ }
30901
+ if (paletteType.includes('GAL_') && !(optionState !== null && optionState !== void 0 && optionState.hasImages)) {
30902
+ paletteType = 'SMALL';
31121
30903
  }
31122
30904
  if (configStep.option == 'OPTBA' && !(optionState !== null && optionState !== void 0 && optionState.option.layout)) {
31123
30905
  paletteType = 'VERY_SMALL';
@@ -31457,8 +31239,8 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
31457
31239
  function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
31458
31240
  function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0; } }
31459
31241
  function _arrayLikeToArray$4(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
31460
- function ownKeys$b(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; }
31461
- function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
31242
+ function ownKeys$c(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; }
31243
+ function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
31462
31244
  var LOG$b = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
31463
31245
  //plz delete me
31464
31246
  var DivaSet = /*#__PURE__*/function () {
@@ -31558,7 +31340,7 @@ var DivaSet = /*#__PURE__*/function () {
31558
31340
  _context.next = 10;
31559
31341
  break;
31560
31342
  }
31561
- validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$b({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
31343
+ validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$c({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
31562
31344
  _context.t0 = partlistArticlesToLoad;
31563
31345
  _context.next = 8;
31564
31346
  return articleHandlerInstance.updateCfgValues(article, repairVariantValuesAndPlanner ? validValues : variantValues, {}, undefined, loadPlas);
@@ -32128,8 +31910,8 @@ var DivaSet = /*#__PURE__*/function () {
32128
31910
  var articles = {};
32129
31911
  for (var basketId in this.divaArticles) {
32130
31912
  articles[basketId] = this.divaArticles[basketId];
32131
- if (allPartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles());
32132
- if (visiblePartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles(true));
31913
+ if (allPartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles());
31914
+ if (visiblePartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles(true));
32133
31915
  }
32134
31916
  return articles;
32135
31917
  }
@@ -32289,7 +32071,7 @@ var DivaSet = /*#__PURE__*/function () {
32289
32071
  var cleanedDimensions = [];
32290
32072
  for (var basketId in articles) {
32291
32073
  var artice = articles[basketId];
32292
- var _iterator3 = _createForOfIteratorHelper$4(artice.articleOptionStates.values()),
32074
+ var _iterator3 = _createForOfIteratorHelper$4(artice.articleOptionStates),
32293
32075
  _step3;
32294
32076
  try {
32295
32077
  var _loop2 = function _loop2() {
@@ -32500,7 +32282,7 @@ var DivaSet = /*#__PURE__*/function () {
32500
32282
  var options = [];
32501
32283
  for (var key in this.divaArticles) {
32502
32284
  var article = this.divaArticles[key];
32503
- var _iterator4 = _createForOfIteratorHelper$4(article.articleOptionStates.values()),
32285
+ var _iterator4 = _createForOfIteratorHelper$4(article.articleOptionStates),
32504
32286
  _step4;
32505
32287
  try {
32506
32288
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
@@ -32761,7 +32543,7 @@ var DivaSet = /*#__PURE__*/function () {
32761
32543
  break;
32762
32544
  }
32763
32545
  _context5.next = 3;
32764
- return Promise.resolve().then(function () { return require('./DoorPlanner-f5c079a9.js'); });
32546
+ return Promise.resolve().then(function () { return require('./DoorPlanner-b3deb85e.js'); });
32765
32547
  case 3:
32766
32548
  _yield$import = _context5.sent;
32767
32549
  DoorPlanner = _yield$import["default"];
@@ -32950,8 +32732,8 @@ var DivaSet = /*#__PURE__*/function () {
32950
32732
  }, {
32951
32733
  key: "cloneSet",
32952
32734
  value: function cloneSet() {
32953
- var clonedSet = new DivaSet(this.CatalogData, this.setId, {}, _objectSpread$b({}, this.setState));
32954
- clonedSet.setData = _objectSpread$b({}, this.setData);
32735
+ var clonedSet = new DivaSet(this.CatalogData, this.setId, {}, _objectSpread$c({}, this.setState));
32736
+ clonedSet.setData = _objectSpread$c({}, this.setData);
32955
32737
  clonedSet.configSingle = this.configSingle;
32956
32738
  clonedSet.logTotalStateForVariants = this.logTotalStateForVariants;
32957
32739
  var articles = this.getDivaArticles();
@@ -32984,7 +32766,7 @@ var SummaryHandler = /*#__PURE__*/function () {
32984
32766
  for (var basketId in articles) {
32985
32767
  //add config Steps
32986
32768
  var article = articles[basketId];
32987
- var _iterator = _createForOfIteratorHelper$3(article.articleOptionStates.values()),
32769
+ var _iterator = _createForOfIteratorHelper$3(article.articleOptionStates),
32988
32770
  _step;
32989
32771
  try {
32990
32772
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -33798,8 +33580,8 @@ var SummaryHandler = /*#__PURE__*/function () {
33798
33580
  }();
33799
33581
  var summaryHandlerInstance = new SummaryHandler();
33800
33582
 
33801
- function ownKeys$a(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; }
33802
- function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
33583
+ function ownKeys$b(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; }
33584
+ function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
33803
33585
  DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
33804
33586
  var DivaFavoritesHandler = /*#__PURE__*/function () {
33805
33587
  function DivaFavoritesHandler() {
@@ -34488,7 +34270,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
34488
34270
  if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
34489
34271
  }
34490
34272
  }
34491
- configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set, dimensions), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
34273
+ configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$b(_objectSpread$b({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set, dimensions), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
34492
34274
  set.basketConfigVariants.push(configVariant);
34493
34275
  case 31:
34494
34276
  case "end":
@@ -34583,6 +34365,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
34583
34365
  }();
34584
34366
  var favoritesHandlerInstance = new DivaFavoritesHandler();
34585
34367
 
34368
+ function ownKeys$a(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; }
34369
+ function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
34586
34370
  function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
34587
34371
  function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
34588
34372
  function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -34682,7 +34466,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
34682
34466
  for (var basketId in optionStatesOfArticles) {
34683
34467
  //hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
34684
34468
  var optionsStates = optionStatesOfArticles[basketId];
34685
- var _iterator = _createForOfIteratorHelper$2(optionsStates.values()),
34469
+ var _iterator = _createForOfIteratorHelper$2(optionsStates),
34686
34470
  _step;
34687
34471
  try {
34688
34472
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -34921,7 +34705,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
34921
34705
  if (o && !!o.isDifferentOption && !((_o$valCodex = o.valCodex) !== null && _o$valCodex !== void 0 && _o$valCodex.includes('OPVSUB'))) {
34922
34706
  return true;
34923
34707
  }
34924
- var rul = (_ops$visibleOptionVal = ops.visibleOptionValues.get(ops.visibleOPVKeys[0])) === null || _ops$visibleOptionVal === void 0 ? void 0 : _ops$visibleOptionVal.rul;
34708
+ var rul = (_ops$visibleOptionVal = ops.visibleOptionValues[ops.visibleOPVKeys[0]]) === null || _ops$visibleOptionVal === void 0 ? void 0 : _ops$visibleOptionVal.rul;
34925
34709
  if (rul) {
34926
34710
  var parentOptions = DivaUtils__default["default"].getOptionsByRule(rul);
34927
34711
  return !!parentOptions.find(function (o) {
@@ -34989,7 +34773,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
34989
34773
  key: "getConifgItemsForView",
34990
34774
  value: function () {
34991
34775
  var _getConifgItemsForView = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(set, configStepKey) {
34992
- var articles, step, retValues, optionCodex, configItems, selectedItems, optionState, _iterator2, _step2, _configItem$parent$oc, key, configItem, configItemsInOPG, retVal, _retVal, totalTime, configStepOPG, configStepOPV, targetArticle, opg, ops, selectedOpv, originalVariantValues, seomethingChanged, variantValues, _iterator3, _step3, _set$favorites$Varian, _set$favorites, _key, startTime, alreadyCalcedVisibleOPVs, _i, _ops$optionOcd2, _retVal2, clonedConfigItemsForView, i, timeDiff;
34776
+ var articles, step, retValues, optionCodex, configItems, selectedItems, optionState, key, _configItem$parent$oc, configItem, configItemsInOPG, retVal, _retVal, totalTime, configStepOPG, configStepOPV, targetArticle, opg, ops, selectedOpv, originalVariantValues, seomethingChanged, variantValues, _key, _set$favorites$Varian, _set$favorites, startTime, alreadyCalcedVisibleOPVs, i, _ops$optionOcd2, _retVal2, clonedConfigItemsForView, _i, timeDiff, _configItems;
34993
34777
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
34994
34778
  while (1) switch (_context.prev = _context.next) {
34995
34779
  case 0:
@@ -34998,7 +34782,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
34998
34782
  retValues = this.getConfigItems(configStepKey, articles, set.configTree);
34999
34783
  optionCodex = undefined;
35000
34784
  if (!(retValues && step != null)) {
35001
- _context.next = 95;
34785
+ _context.next = 65;
35002
34786
  break;
35003
34787
  }
35004
34788
  configItems = [];
@@ -35012,157 +34796,115 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35012
34796
  case 10:
35013
34797
  optionCodex = optionState.optionCodex;
35014
34798
  if (!retValues.isOPG) {
35015
- _context.next = 35;
35016
- break;
35017
- }
35018
- _iterator2 = _createForOfIteratorHelper$2(retValues.configItems.keys());
35019
- _context.prev = 13;
35020
- _iterator2.s();
35021
- case 15:
35022
- if ((_step2 = _iterator2.n()).done) {
35023
- _context.next = 25;
35024
- break;
35025
- }
35026
- key = _step2.value;
35027
- configItem = retValues.configItems.get(key);
35028
- if (configItem) {
35029
- _context.next = 20;
34799
+ _context.next = 15;
35030
34800
  break;
35031
34801
  }
35032
- throw new Error('configItem ' + key + ' not found in retValues.configItems');
35033
- case 20:
35034
- optionCodex = (_configItem$parent$oc = configItem.parent.ocd) !== null && _configItem$parent$oc !== void 0 ? _configItem$parent$oc : configItem.parent.codex;
35035
- configItemsInOPG = configItem.articleOptionValues;
35036
- if (configItemsInOPG) {
35037
- retVal = this.prepareConfigItemsForView(set, optionState, configItemsInOPG, retValues.constructionRules, selectedItems, step.configStep.targetArticles, optionCodex);
35038
- configItems = configItems.concat(retVal.myConfigItemsForView);
34802
+ for (key in retValues.configItems) {
34803
+ configItem = retValues.configItems[key];
34804
+ optionCodex = (_configItem$parent$oc = configItem.parent.ocd) !== null && _configItem$parent$oc !== void 0 ? _configItem$parent$oc : configItem.parent.codex;
34805
+ configItemsInOPG = configItem.articleOptionValues;
34806
+ if (configItemsInOPG) {
34807
+ retVal = this.prepareConfigItemsForView(set, optionState, configItemsInOPG, retValues.constructionRules, selectedItems, step.configStep.targetArticles, optionCodex);
34808
+ configItems = configItems.concat(retVal.myConfigItemsForView);
34809
+ }
35039
34810
  }
35040
- case 23:
35041
- _context.next = 15;
35042
- break;
35043
- case 25:
35044
- _context.next = 30;
35045
- break;
35046
- case 27:
35047
- _context.prev = 27;
35048
- _context.t0 = _context["catch"](13);
35049
- _iterator2.e(_context.t0);
35050
- case 30:
35051
- _context.prev = 30;
35052
- _iterator2.f();
35053
- return _context.finish(30);
35054
- case 33:
35055
- _context.next = 92;
34811
+ _context.next = 62;
35056
34812
  break;
35057
- case 35:
34813
+ case 15:
35058
34814
  if (!(step.optionStep.mergesToOPG == undefined)) {
35059
- _context.next = 40;
34815
+ _context.next = 20;
35060
34816
  break;
35061
34817
  }
35062
34818
  _retVal = this.prepareConfigItemsForView(set, optionState, retValues.configItems, retValues.constructionRules, selectedItems, step.configStep.targetArticles, undefined, undefined, undefined, undefined, retValues.freeTextValue, retValues.freeTextLang);
35063
34819
  configItems = _retVal.myConfigItemsForView;
35064
- _context.next = 92;
34820
+ _context.next = 62;
35065
34821
  break;
35066
- case 40:
34822
+ case 20:
35067
34823
  if (!(typeof step.optionStep.mergesToOPG == 'string' && step.tabGroup.options[step.optionStep.mergesToOPG])) {
35068
- _context.next = 92;
34824
+ _context.next = 62;
35069
34825
  break;
35070
34826
  }
35071
34827
  //IDM Bezugschritte werden zusammengefasst zu OPG und OPV
35072
34828
  totalTime = Date.now();
35073
34829
  configStepOPG = step.configStep, configStepOPV = set.configTree.getConfigStepBasketIdAndOptionCodex(configStepOPG.targetArticles[0], step.optionStep.mergesToOPG); //falls mehrere Artikel im Schritt sind werden trotzdem nur die Values des erster verwendet um die z.B. OPT2 und OPT3 zu vereinen
35074
34830
  if (!configStepOPV) {
35075
- _context.next = 92;
34831
+ _context.next = 62;
35076
34832
  break;
35077
34833
  }
35078
34834
  targetArticle = articles[configStepOPG.targetArticles[0]];
35079
34835
  opg = targetArticle.getArticleOptionState(configStepOPG.option);
35080
34836
  ops = targetArticle.getArticleOptionState(configStepOPV.option);
35081
34837
  if (opg) {
35082
- _context.next = 49;
34838
+ _context.next = 29;
35083
34839
  break;
35084
34840
  }
35085
34841
  throw new Error('myOptionState ' + configStepOPG.option + ' is undefined');
35086
- case 49:
34842
+ case 29:
35087
34843
  if (ops) {
35088
- _context.next = 51;
34844
+ _context.next = 31;
35089
34845
  break;
35090
34846
  }
35091
34847
  throw new Error('myOptionState ' + configStepOPV.option + ' is undefined');
35092
- case 51:
34848
+ case 31:
35093
34849
  selectedOpv = ops.val;
35094
34850
  originalVariantValues = targetArticle.VariantValues;
35095
34851
  seomethingChanged = false;
35096
34852
  variantValues = {};
35097
- _iterator3 = _createForOfIteratorHelper$2(opg.visibleOptionValues.keys());
35098
- _context.prev = 56;
35099
- _iterator3.s();
35100
- case 58:
35101
- if ((_step3 = _iterator3.n()).done) {
35102
- _context.next = 78;
34853
+ _context.t0 = _regeneratorRuntime__default["default"].keys(opg.visibleOptionValues);
34854
+ case 36:
34855
+ if ((_context.t1 = _context.t0()).done) {
34856
+ _context.next = 56;
35103
34857
  break;
35104
34858
  }
35105
- _key = _step3.value;
34859
+ _key = _context.t1.value;
35106
34860
  startTime = Date.now(); //die sichtbaren gruppen werden nun nacheinander beim Artikel gesetzt und die Validen bezüge jeder gruppe geholt -> visibleOptionValues;
35107
- variantValues[opg.optionCodex] = opg.visibleOptionValues.get(_key).codex;
35108
- alreadyCalcedVisibleOPVs = targetArticle.getMergesToOPG(opg.optionCodex + '_' + opg.visibleOptionValues.get(_key).codex, JSON.stringify(targetArticle.getVariantValuesTillOPT(opg.optionCodex)));
34861
+ variantValues[opg.optionCodex] = opg.visibleOptionValues[_key].codex;
34862
+ alreadyCalcedVisibleOPVs = targetArticle.getMergesToOPG(opg.optionCodex + '_' + opg.visibleOptionValues[_key].codex, JSON.stringify(targetArticle.getVariantValuesTillOPT(opg.optionCodex)));
35109
34863
  if (!(alreadyCalcedVisibleOPVs != undefined && Object.keys((_set$favorites$Varian = (_set$favorites = set.favorites) === null || _set$favorites === void 0 ? void 0 : _set$favorites.VariantValues) !== null && _set$favorites$Varian !== void 0 ? _set$favorites$Varian : {}).length == 0)) {
35110
- _context.next = 68;
34864
+ _context.next = 46;
35111
34865
  break;
35112
34866
  }
35113
34867
  //die merged OPG wurde bereist ausgerechnet und kann wiederverwendet werden. nur die Selected value muss repariert werden
35114
- if ((originalVariantValues === null || originalVariantValues === void 0 ? void 0 : originalVariantValues[opg.optionCodex]) == opg.visibleOptionValues.get(_key).codex) {
35115
- for (_i = 0; _i < alreadyCalcedVisibleOPVs.length; _i++) {
35116
- if (alreadyCalcedVisibleOPVs[_i].codex == ops.valCodex) {
35117
- alreadyCalcedVisibleOPVs[_i].sel = true;
34868
+ if ((originalVariantValues === null || originalVariantValues === void 0 ? void 0 : originalVariantValues[opg.optionCodex]) == opg.visibleOptionValues[_key].codex) {
34869
+ for (i = 0; i < alreadyCalcedVisibleOPVs.length; i++) {
34870
+ if (alreadyCalcedVisibleOPVs[i].codex == ops.valCodex) {
34871
+ alreadyCalcedVisibleOPVs[i].sel = true;
35118
34872
  }
35119
34873
  }
35120
34874
  }
35121
34875
  configItems = configItems.concat(alreadyCalcedVisibleOPVs);
35122
- _context.next = 75;
34876
+ _context.next = 53;
35123
34877
  break;
35124
- case 68:
34878
+ case 46:
35125
34879
  seomethingChanged = true;
35126
- _context.next = 71;
34880
+ _context.next = 49;
35127
34881
  return articleHandlerInstance.updateCfgValues(targetArticle, variantValues, {}, true, true, true, true);
35128
- case 71:
35129
- _retVal2 = this.prepareConfigItemsForView(set, optionState, targetArticle.getArticleOptionState(ops.optionCodex).visibleOptionValues, retValues.constructionRules, [], step.configStep.targetArticles, (_ops$optionOcd2 = ops.optionOcd) !== null && _ops$optionOcd2 !== void 0 ? _ops$optionOcd2 : ops.optionCodex, opg.visibleOptionValues.get(_key).name, opg.visibleOptionValues.get(_key).codex, opg.optionCodex);
34882
+ case 49:
34883
+ _retVal2 = this.prepareConfigItemsForView(set, optionState, targetArticle.getArticleOptionState(ops.optionCodex).visibleOptionValues, retValues.constructionRules, [], step.configStep.targetArticles, (_ops$optionOcd2 = ops.optionOcd) !== null && _ops$optionOcd2 !== void 0 ? _ops$optionOcd2 : ops.optionCodex, opg.visibleOptionValues[_key].name, opg.visibleOptionValues[_key].codex, opg.optionCodex);
35130
34884
  configItems = configItems.concat(_retVal2.myConfigItemsForView);
35131
34885
  clonedConfigItemsForView = JSON.parse(JSON.stringify(_retVal2.myConfigItemsForView));
35132
- targetArticle.addMergesToOPG(opg.optionCodex + '_' + opg.visibleOptionValues.get(_key).codex, JSON.stringify(targetArticle.getVariantValuesTillOPT(opg.optionCodex)), clonedConfigItemsForView);
35133
- case 75:
34886
+ targetArticle.addMergesToOPG(opg.optionCodex + '_' + opg.visibleOptionValues[_key].codex, JSON.stringify(targetArticle.getVariantValuesTillOPT(opg.optionCodex)), clonedConfigItemsForView);
34887
+ case 53:
35134
34888
  LOG$a.debug('calculating for merge to opg', _key, Date.now() - startTime + 'ms');
35135
- case 76:
35136
- _context.next = 58;
34889
+ _context.next = 36;
35137
34890
  break;
35138
- case 78:
35139
- _context.next = 83;
35140
- break;
35141
- case 80:
35142
- _context.prev = 80;
35143
- _context.t1 = _context["catch"](56);
35144
- _iterator3.e(_context.t1);
35145
- case 83:
35146
- _context.prev = 83;
35147
- _iterator3.f();
35148
- return _context.finish(83);
35149
- case 86:
34891
+ case 56:
35150
34892
  if (!seomethingChanged) {
35151
- _context.next = 89;
34893
+ _context.next = 59;
35152
34894
  break;
35153
34895
  }
35154
- _context.next = 89;
34896
+ _context.next = 59;
35155
34897
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, originalVariantValues, [targetArticle.basketId], true, 'calcVariant');
35156
- case 89:
35157
- for (i = 0; i < configItems.length; i++) {
35158
- if (configItems[i].codex == (selectedOpv === null || selectedOpv === void 0 ? void 0 : selectedOpv.codex)) {
34898
+ case 59:
34899
+ for (_i = 0; _i < configItems.length; _i++) {
34900
+ if (configItems[_i].codex == (selectedOpv === null || selectedOpv === void 0 ? void 0 : selectedOpv.codex)) {
35159
34901
  selectedItems = [selectedOpv.codex];
35160
- configItems[i].sel = true;
34902
+ configItems[_i].sel = true;
35161
34903
  }
35162
34904
  }
35163
34905
  timeDiff = Date.now() - totalTime;
35164
34906
  LOG$a.debug('calculating for merge to opg', 'totalTime', timeDiff + 'ms');
35165
- case 92:
34907
+ case 62:
35166
34908
  return _context.abrupt("return", {
35167
34909
  configItems: configItems,
35168
34910
  option: optionCodex ? set.CatalogData.getOption(optionCodex) : undefined,
@@ -35173,16 +34915,17 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35173
34915
  }),
35174
34916
  notTotallyMatichingOPVs: !set.CatalogData.articleConfigAll ? retValues.notTotallyMatichingOPVs : undefined
35175
34917
  });
35176
- case 95:
34918
+ case 65:
34919
+ _configItems = [];
35177
34920
  return _context.abrupt("return", {
35178
- configItems: [],
34921
+ configItems: _configItems,
35179
34922
  selectedItems: []
35180
34923
  });
35181
- case 96:
34924
+ case 67:
35182
34925
  case "end":
35183
34926
  return _context.stop();
35184
34927
  }
35185
- }, _callee, this, [[13, 27, 30, 33], [56, 80, 83, 86]]);
34928
+ }, _callee, this);
35186
34929
  }));
35187
34930
  function getConifgItemsForView(_x, _x2) {
35188
34931
  return _getConifgItemsForView.apply(this, arguments);
@@ -35194,7 +34937,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35194
34937
  value: function getConfigItems(key, articles, configTree) {
35195
34938
  var step = configTree.getAllByKey(key);
35196
34939
  if (step != null) {
35197
- var configItems = new Map(),
34940
+ var configItems = {},
35198
34941
  visibleOptionValuesOfArticles = [],
35199
34942
  constructionRules = {},
35200
34943
  selectedVals = [],
@@ -35222,37 +34965,28 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35222
34965
  //get schnittmenge of all the articles
35223
34966
  if (i === 0) {
35224
34967
  constructionRules = myOptionState.constructionRules;
35225
- configItems = new Map(myOptionState.visibleOptionValues);
34968
+ configItems = _objectSpread$a({}, myOptionState.visibleOptionValues);
35226
34969
  } else {
35227
- var _iterator4 = _createForOfIteratorHelper$2(configItems.keys()),
35228
- _step4;
35229
- try {
35230
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
35231
- var _key2 = _step4.value;
35232
- if (!myOptionState.visibleOptionValues.get(_key2)) {
35233
- configItems["delete"](_key2);
35234
- }
34970
+ for (var _key2 in configItems) {
34971
+ if (!myOptionState.visibleOptionValues[_key2]) {
34972
+ delete configItems[_key2];
35235
34973
  }
35236
- } catch (err) {
35237
- _iterator4.e(err);
35238
- } finally {
35239
- _iterator4.f();
35240
34974
  }
35241
34975
  }
35242
34976
  } else if (i == 0 && configStep.targetArticles.length == 1) {
35243
34977
  constructionRules = myOptionState.constructionRules;
35244
- configItems = new Map(myOptionState.visibleOptionValues);
34978
+ configItems = myOptionState.visibleOptionValues;
35245
34979
  } else {
35246
34980
  visibleOptionValuesOfArticles.push(myOptionState.visibleOptionValues);
35247
34981
  }
35248
34982
  }
35249
34983
  if (visibleOptionValuesOfArticles.length > 0) {
35250
- configItems = new Map(visibleOptionValuesOfArticles[0]);
34984
+ configItems = Object.assign({}, visibleOptionValuesOfArticles[0]);
35251
34985
  var _loop4 = function _loop4(_i2) {
35252
34986
  var _articles$configStep$;
35253
34987
  if ((_articles$configStep$ = articles[configStep.targetArticles[_i2]].getArticleOptionStateFlat(configStep.option)) !== null && _articles$configStep$ !== void 0 && _articles$configStep$.definedBySetFeatureFixed) return 1; // continue
35254
- var keys = Array.from(configItems.keys());
35255
- var newKeys = Array.from(visibleOptionValuesOfArticles[_i2].keys());
34988
+ var keys = Object.keys(configItems);
34989
+ var newKeys = Object.keys(visibleOptionValuesOfArticles[_i2]);
35256
34990
  var opvsOnlyInA = keys.filter(function (x) {
35257
34991
  return !newKeys.includes(x);
35258
34992
  });
@@ -35261,11 +34995,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35261
34995
  });
35262
34996
  if (opvsOnlyInA.length && opvsOnlyInB.length) {
35263
34997
  var _loop5 = function _loop5() {
35264
- var opva = configItems.get(opvsOnlyInA[j]);
35265
- if (!opva) return 1; // continue
34998
+ var opva = configItems[opvsOnlyInA[j]];
35266
34999
  var sameOPVExists = opvsOnlyInB.find(function (opvb) {
35267
- var _visibleOptionValuesO;
35268
- return opva.sameopv && opva.sameopv == ((_visibleOptionValuesO = visibleOptionValuesOfArticles[_i2].get(opvb)) === null || _visibleOptionValuesO === void 0 ? void 0 : _visibleOptionValuesO.sameopv);
35000
+ return opva.sameopv && opva.sameopv == visibleOptionValuesOfArticles[_i2][opvb].sameopv;
35269
35001
  });
35270
35002
  if (sameOPVExists) {
35271
35003
  opvsOnlyInA.splice(j, 1);
@@ -35273,15 +35005,14 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35273
35005
  }
35274
35006
  };
35275
35007
  for (var j = opvsOnlyInA.length - 1; j >= 0; j--) {
35276
- if (_loop5()) continue;
35008
+ _loop5();
35277
35009
  }
35278
35010
  } else if (opvsOnlyInA.length) {
35279
35011
  var _loop6 = function _loop6() {
35280
- var opva = configItems.get(opvsOnlyInA[_j]);
35012
+ var opva = configItems[opvsOnlyInA[_j]];
35281
35013
  if (!opva) return 1; // continue
35282
35014
  var sameOPVExists = newKeys.find(function (opvb) {
35283
- var _visibleOptionValuesO2;
35284
- return opva.sameopv && opva.sameopv == ((_visibleOptionValuesO2 = visibleOptionValuesOfArticles[_i2].get(opvb)) === null || _visibleOptionValuesO2 === void 0 ? void 0 : _visibleOptionValuesO2.sameopv);
35015
+ return opva.sameopv && opva.sameopv == visibleOptionValuesOfArticles[_i2][opvb].sameopv;
35285
35016
  });
35286
35017
  if (sameOPVExists) {
35287
35018
  opvsOnlyInA.splice(_j, 1);
@@ -35292,11 +35023,10 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35292
35023
  }
35293
35024
  } else if (opvsOnlyInB.length) {
35294
35025
  var _loop7 = function _loop7() {
35295
- var opva = configItems.get(opvsOnlyInB[_j2]);
35026
+ var opva = configItems[opvsOnlyInB[_j2]];
35296
35027
  if (!opva) return 1; // continue
35297
35028
  var sameOPVExists = keys.find(function (opvb) {
35298
- var _visibleOptionValuesO3;
35299
- return opva.sameopv && opva.sameopv == ((_visibleOptionValuesO3 = visibleOptionValuesOfArticles[_i2].get(opvb)) === null || _visibleOptionValuesO3 === void 0 ? void 0 : _visibleOptionValuesO3.sameopv);
35029
+ return opva.sameopv && opva.sameopv == visibleOptionValuesOfArticles[_i2][opvb].sameopv;
35300
35030
  });
35301
35031
  if (sameOPVExists) {
35302
35032
  opvsOnlyInB.splice(_j2, 1);
@@ -35341,11 +35071,11 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35341
35071
  ret = false;
35342
35072
  var articles = set.getDivaArticles();
35343
35073
  for (var basketId in articles) {
35344
- var _iterator5 = _createForOfIteratorHelper$2(articles[basketId].articleOptionStates.values()),
35345
- _step5;
35074
+ var _iterator2 = _createForOfIteratorHelper$2(articles[basketId].articleOptionStates),
35075
+ _step2;
35346
35076
  try {
35347
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
35348
- var ops = _step5.value;
35077
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
35078
+ var ops = _step2.value;
35349
35079
  if (ops.headerPosVariationType == 'K') {
35350
35080
  if (optionValues[ops.optionCodex] == undefined) {
35351
35081
  optionValues[ops.optionCodex] = ops.valCodex ? ops.valCodex : null;
@@ -35358,9 +35088,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35358
35088
  }
35359
35089
  }
35360
35090
  } catch (err) {
35361
- _iterator5.e(err);
35091
+ _iterator2.e(err);
35362
35092
  } finally {
35363
- _iterator5.f();
35093
+ _iterator2.f();
35364
35094
  }
35365
35095
  if (ret == true) break;
35366
35096
  }
@@ -35372,17 +35102,16 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35372
35102
  //bei einer OPG wird hier dessen hauptoptionCodex Übergeben
35373
35103
  idmOpgGroupName, idmOpgValCodex, idmOpgOptionCodex, freeTextValue, freeTextLang) {
35374
35104
  var myConfigItemsForView = [];
35375
- var objectKeys = Array.from(myConfigItems.keys());
35376
- var groupContentItemIdObject = this.getGroupContentItemIdObject(Array.from(myConfigItems.values()), idmOpgGroupName);
35105
+ var objectKeys = Object.keys(myConfigItems);
35106
+ var groupContentItemIdObject = this.getGroupContentItemIdObject(Object.values(myConfigItems), idmOpgGroupName);
35377
35107
  var _loop8 = function _loop8() {
35378
35108
  var _ops$optionOcd3, _item$images, _item$colorGroups, _item$pdfUrl, _item$url;
35379
- var item = myConfigItems.get(objectKeys[i]);
35380
- if (!item) throw new Error('item ' + objectKeys[i] + ' not found in myConfigItems');
35109
+ var item = myConfigItems[objectKeys[i]];
35381
35110
  var key = objectKeys[i];
35382
35111
  var groupName = item.groupName ? item.groupName : idmOpgGroupName;
35383
35112
  if (!selectedVals.find(function (opv) {
35384
- var _myConfigItems$get, _myConfigItems$get2;
35385
- return opv == item.codex || ((_myConfigItems$get = myConfigItems.get(opv)) === null || _myConfigItems$get === void 0 ? void 0 : _myConfigItems$get.ocd) && ((_myConfigItems$get2 = myConfigItems.get(opv)) === null || _myConfigItems$get2 === void 0 ? void 0 : _myConfigItems$get2.ocd) === item.codex;
35113
+ var _myConfigItems$opv, _myConfigItems$opv2;
35114
+ return opv == item.codex || ((_myConfigItems$opv = myConfigItems[opv]) === null || _myConfigItems$opv === void 0 ? void 0 : _myConfigItems$opv.ocd) && ((_myConfigItems$opv2 = myConfigItems[opv]) === null || _myConfigItems$opv2 === void 0 ? void 0 : _myConfigItems$opv2.ocd) === item.codex;
35386
35115
  }) && (ops.definedBySetFeatureFixed || item.hiddenByMask)) return 1; // continue
35387
35116
  var image = item.image ? set.CatalogData.getCatImageURL(item.image, '_gal') : '';
35388
35117
  var zoomImage = undefined;
@@ -35390,9 +35119,8 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35390
35119
  zoomImage = image;
35391
35120
  image = set.CatalogData.getCatImageURL(item.zoomImage, '_gal');
35392
35121
  }
35393
- var imageFromVisibleOPVsImages = ops.visibleOPVsImages.get(item.codex);
35394
- if (imageFromVisibleOPVsImages) {
35395
- image = imageFromVisibleOPVsImages;
35122
+ if (ops.visibleOPVsImages[item.codex]) {
35123
+ image = ops.visibleOPVsImages[item.codex];
35396
35124
  }
35397
35125
  var isFav = favoritesHandlerInstance.isFavorite(set, targetArticles, item, (_ops$optionOcd3 = ops.optionOcd) !== null && _ops$optionOcd3 !== void 0 ? _ops$optionOcd3 : optionCodex);
35398
35126
  var isSelected = !!selectedVals.find(function (opv) {
@@ -35481,12 +35209,12 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35481
35209
  for (var iKey in optionStatesOfArticles) {
35482
35210
  //hier evtl. die Article mit einer gewissen reihenfolge durchlaufen!
35483
35211
  var optionsStates = optionStatesOfArticles[iKey];
35484
- var _iterator6 = _createForOfIteratorHelper$2(optionsStates.values()),
35485
- _step6;
35212
+ var _iterator3 = _createForOfIteratorHelper$2(optionsStates),
35213
+ _step3;
35486
35214
  try {
35487
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
35215
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
35488
35216
  var _ops$addToMeasure2;
35489
- var ops = _step6.value;
35217
+ var ops = _step3.value;
35490
35218
  var selectionmode = ops.selectionmode;
35491
35219
  if (set.CatalogData.forceConfigSingle && (selectionmode == 1 || selectionmode == 2)) selectionmode = 3;
35492
35220
  if (ops.isInvisible || selectionmode == 0 || !ops.isDoShow || ops.visibleCount == 0 || !!((_ops$addToMeasure2 = ops.addToMeasure) !== null && _ops$addToMeasure2 !== void 0 && _ops$addToMeasure2.length)) {
@@ -35494,9 +35222,9 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
35494
35222
  }
35495
35223
  }
35496
35224
  } catch (err) {
35497
- _iterator6.e(err);
35225
+ _iterator3.e(err);
35498
35226
  } finally {
35499
- _iterator6.f();
35227
+ _iterator3.f();
35500
35228
  }
35501
35229
  }
35502
35230
  return configTree;
@@ -39617,7 +39345,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39617
39345
  var article = set.getDivaArticles()[Object.keys(set.getDivaArticles())[0]];
39618
39346
  var opsKeys = article.articleOptionStatesKeys;
39619
39347
  var sapCount = 0;
39620
- var _iterator = _createForOfIteratorHelper$1(article.articleOptionStates.values()),
39348
+ var _iterator = _createForOfIteratorHelper$1(article.articleOptionStates),
39621
39349
  _step;
39622
39350
  try {
39623
39351
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -39741,7 +39469,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39741
39469
  break;
39742
39470
  case 3:
39743
39471
  _context12.next = 5;
39744
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-e44293f5.js'); });
39472
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-036e9844.js'); });
39745
39473
  case 5:
39746
39474
  _yield$import = _context12.sent;
39747
39475
  PfisterWWSHandler = _yield$import["default"];
@@ -39749,7 +39477,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39749
39477
  return _context12.abrupt("break", 27);
39750
39478
  case 9:
39751
39479
  _context12.next = 11;
39752
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-47a27ec7.js'); });
39480
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-8e0bf61c.js'); });
39753
39481
  case 11:
39754
39482
  _yield$import2 = _context12.sent;
39755
39483
  LiviqueWWSHandler = _yield$import2["default"];
@@ -39757,7 +39485,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39757
39485
  return _context12.abrupt("break", 27);
39758
39486
  case 15:
39759
39487
  _context12.next = 17;
39760
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-6934e260.js'); });
39488
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-26ca142e.js'); });
39761
39489
  case 17:
39762
39490
  _yield$import3 = _context12.sent;
39763
39491
  SeriousWWSHandler = _yield$import3["default"];
@@ -39765,7 +39493,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
39765
39493
  return _context12.abrupt("break", 27);
39766
39494
  case 21:
39767
39495
  _context12.next = 23;
39768
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-5dd8d94a.js'); });
39496
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-0e718668.js'); });
39769
39497
  case 23:
39770
39498
  _yield$import4 = _context12.sent;
39771
39499
  StandardWWSHandler = _yield$import4["default"];
@@ -41194,7 +40922,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
41194
40922
  while (1) switch (_context3.prev = _context3.next) {
41195
40923
  case 0:
41196
40924
  _context3.next = 2;
41197
- return Promise.resolve().then(function () { return require('./Host3DSignalR-57e23024.js'); });
40925
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-062ed34e.js'); });
41198
40926
  case 2:
41199
40927
  _yield$import = _context3.sent;
41200
40928
  Host3DSignalR = _yield$import["default"];
@@ -42752,7 +42480,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
42752
42480
  break;
42753
42481
  case 8:
42754
42482
  _context4.next = 10;
42755
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-77476193.js'); });
42483
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-a35a2184.js'); });
42756
42484
  case 10:
42757
42485
  _yield$import = _context4.sent;
42758
42486
  DivaStandardPlanner = _yield$import["default"];
@@ -42763,7 +42491,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
42763
42491
  return _context4.abrupt("break", 21);
42764
42492
  case 15:
42765
42493
  _context4.next = 17;
42766
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-04bf6318.js'); });
42494
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-ab72c374.js'); });
42767
42495
  case 17:
42768
42496
  _yield$import2 = _context4.sent;
42769
42497
  DivaBoxPlanner = _yield$import2["default"];
@@ -47904,7 +47632,7 @@ var Grid = /*#__PURE__*/function () {
47904
47632
  _context4.next = 18;
47905
47633
  break;
47906
47634
  }
47907
- if (montageOptionState) montageOptionState.val = montageOptionState.visibleOptionValues.get(mitCodex);
47635
+ if (montageOptionState) montageOptionState.val = montageOptionState.visibleOptionValues[mitCodex];
47908
47636
  _context4.next = 15;
47909
47637
  return _this.updateAccessoireMontageOption((!isIDM ? 'OPT' : '') + optionCodex, mitCodex, specificAccessoire);
47910
47638
  case 15:
@@ -47912,7 +47640,7 @@ var Grid = /*#__PURE__*/function () {
47912
47640
  _context4.next = 21;
47913
47641
  break;
47914
47642
  case 18:
47915
- if (montageOptionState) montageOptionState.val = montageOptionState.visibleOptionValues.get(ohneCodex);
47643
+ if (montageOptionState) montageOptionState.val = montageOptionState.visibleOptionValues[ohneCodex];
47916
47644
  _context4.next = 21;
47917
47645
  return _this.updateAccessoireMontageOption((!isIDM ? 'OPT' : '') + optionCodex, ohneCodex, []);
47918
47646
  case 21:
@@ -64060,7 +63788,6 @@ var a$5 = {
64060
63788
  },
64061
63789
  settings: {
64062
63790
  dontLoadAdditionalModelInfos: true,
64063
- dontLoadCatalogEditorLiteMask: true,
64064
63791
  identifier: 'PfisterWebPlanner',
64065
63792
  type: 'DIVA_WEBPLANNER',
64066
63793
  configParams: {
@@ -64131,7 +63858,6 @@ var a$4 = {
64131
63858
  },
64132
63859
  settings: {
64133
63860
  dontLoadAdditionalModelInfos: true,
64134
- dontLoadCatalogEditorLiteMask: true,
64135
63861
  identifier: 'Seller',
64136
63862
  type: 'DIVA_WEBPLANNER',
64137
63863
  configParams: {
@@ -64191,7 +63917,6 @@ var a$3 = {
64191
63917
  },
64192
63918
  settings: {
64193
63919
  dontLoadAdditionalModelInfos: true,
64194
- dontLoadCatalogEditorLiteMask: true,
64195
63920
  configParams: {
64196
63921
  mediaServiceApiKey: '620e074df81de00012ef47ed.wUyoXTbh4tR3DklrzvvdxFveVK9zcj4H',
64197
63922
  // api2devKey: '627b71be68f4c30011dd25e2.I2RdwvdHG4gruMNr6l810tTU5x7afNMm',