@crystaldesign/web-planner-logic 26.12.0-beta.27 → 26.12.0-beta.28

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 (39) hide show
  1. package/build/cjs/{DivaBoxPlanner-69dd68ba.js → DivaBoxPlanner-83122797.js} +3 -3
  2. package/build/cjs/{DivaStandardPlanner-1e17ea12.js → DivaStandardPlanner-6091f80a.js} +2 -2
  3. package/build/cjs/{DoorPlanner-602a86f3.js → DoorPlanner-a89651e0.js} +2 -2
  4. package/build/cjs/{Host3DSignalR-09d9efe0.js → Host3DSignalR-d8c102b7.js} +2 -2
  5. package/build/cjs/{LiviqueWWSHandler-9497b33d.js → LiviqueWWSHandler-fcb69b1f.js} +2 -2
  6. package/build/cjs/{PfisterWWSHandler-14686c6d.js → PfisterWWSHandler-82aaa131.js} +2 -2
  7. package/build/cjs/{PlannerHandler2D-a22115ce.js → PlannerHandler2D-baeb12da.js} +5 -272
  8. package/build/cjs/{SeriousBasketHandler-acfb2f40.js → SeriousBasketHandler-a5dccfff.js} +2 -2
  9. package/build/cjs/{ShelfPlanner-bd6038e1.js → ShelfPlanner-a4717a2b.js} +2 -2
  10. package/build/cjs/{StandardWWSHandler-bafafa71.js → StandardWWSHandler-8c3e6f6e.js} +2 -2
  11. package/build/cjs/{index-cca37a97.js → index-298b0760.js} +619 -113
  12. package/build/cjs/index.js +1 -1
  13. package/build/esm/{DivaBoxPlanner-50d29c59.js → DivaBoxPlanner-694ee7c8.js} +3 -3
  14. package/build/esm/{DivaStandardPlanner-e1831308.js → DivaStandardPlanner-cb773ae9.js} +2 -2
  15. package/build/esm/{DoorPlanner-598af141.js → DoorPlanner-15567662.js} +2 -2
  16. package/build/esm/{Host3DSignalR-bc77d0ab.js → Host3DSignalR-9c4f10d3.js} +2 -2
  17. package/build/esm/{LiviqueWWSHandler-ace695dc.js → LiviqueWWSHandler-00904519.js} +2 -2
  18. package/build/esm/{PfisterWWSHandler-ebf67f99.js → PfisterWWSHandler-b9221f28.js} +2 -2
  19. package/build/esm/{PlannerHandler2D-cb6781eb.js → PlannerHandler2D-0d417b8e.js} +3 -268
  20. package/build/esm/{SeriousBasketHandler-14961eb6.js → SeriousBasketHandler-d67b4447.js} +2 -2
  21. package/build/esm/{ShelfPlanner-6f2b92a1.js → ShelfPlanner-bfd3c0d1.js} +2 -2
  22. package/build/esm/{StandardWWSHandler-1c478a3c.js → StandardWWSHandler-ac6342aa.js} +2 -2
  23. package/build/esm/{index-a201dfa2.js → index-a4b13cb9.js} +619 -114
  24. package/build/esm/index.js +1 -1
  25. package/build/types/web-planner-logic/src/interface/Planner/DockingPointDataType.d.ts +10 -0
  26. package/build/types/web-planner-logic/src/interface/Planner/DockingPointDataType.d.ts.map +1 -1
  27. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts +8 -1
  28. package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SVGUtils.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  30. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts +7 -0
  31. package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
  32. package/build/types/web-planner-logic/src/model/Articles/CatalogPlannerArticleData.d.ts +6 -0
  33. package/build/types/web-planner-logic/src/model/Articles/CatalogPlannerArticleData.d.ts.map +1 -1
  34. package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/test/accessoryWithoutDocking.test.d.ts +2 -0
  36. package/build/types/web-planner-logic/src/test/accessoryWithoutDocking.test.d.ts.map +1 -0
  37. package/build/types/web-planner-logic/src/test/countDockingPoints.test.d.ts +2 -0
  38. package/build/types/web-planner-logic/src/test/countDockingPoints.test.d.ts.map +1 -0
  39. package/package.json +3 -3
@@ -10,6 +10,7 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
10
10
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
11
11
  var axios$1 = require('axios');
12
12
  var DivaUtils = require('@crystaldesign/diva-utils');
13
+ var planner2dCore = require('@crystaldesign/planner-2d-core');
13
14
  var basketModel = require('@crystaldesign/basket-model');
14
15
  var _typeof = require('@babel/runtime/helpers/typeof');
15
16
  var fastXmlParser = require('fast-xml-parser');
@@ -19,7 +20,6 @@ var _inherits = require('@babel/runtime/helpers/inherits');
19
20
  var _wrapNativeSuper = require('@babel/runtime/helpers/wrapNativeSuper');
20
21
  var BasketHandler = require('@crystaldesign/basket-handler');
21
22
  var io = require('socket.io-client');
22
- require('@crystaldesign/planner-2d-core');
23
23
 
24
24
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
25
25
 
@@ -165,7 +165,7 @@ function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t
165
165
 
166
166
  // Import types from AI service
167
167
 
168
- var LOG$q = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
168
+ var LOG$r = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
169
169
 
170
170
  /**
171
171
  * Deadline for the optional catalog XML preload. Axios has no default timeout, and planner start-up
@@ -231,7 +231,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
231
231
  if (plannerConfig.settings) {
232
232
  this.initalizeWebConfigData(plannerConfig);
233
233
  } else {
234
- LOG$q.error(new DivaUtils.DivaError('Fehler beim laden der WebConfig', {
234
+ LOG$r.error(new DivaUtils.DivaError('Fehler beim laden der WebConfig', {
235
235
  code: 'WC_0001'
236
236
  }));
237
237
  throw Error('Initalize failed!');
@@ -292,7 +292,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
292
292
  case 0:
293
293
  skip = _args.length > 2 && _args[2] !== undefined ? _args[2] : 0;
294
294
  dontLogError = _args.length > 3 ? _args[3] : undefined;
295
- LOG$q.debug('DivaApiHandler.fetchData ' + url, 'DivaApiHandler, fetchData');
295
+ LOG$r.debug('DivaApiHandler.fetchData ' + url, 'DivaApiHandler, fetchData');
296
296
  if (init) {
297
297
  _context.next = 5;
298
298
  break;
@@ -333,7 +333,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
333
333
  netBytes = typeof data === 'string' ? data.length : Number((_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers['content-length']) || undefined;
334
334
  }
335
335
  if (data !== null && data !== void 0 && data.Error) {
336
- if (dontLogError) LOG$q.warn(data.Error + ' ' + url);else LOG$q.error(new DivaUtils.DivaError(data.Error, {
336
+ if (dontLogError) LOG$r.warn(data.Error + ' ' + url);else LOG$r.error(new DivaUtils.DivaError(data.Error, {
337
337
  code: 'WC_0001',
338
338
  custom: {
339
339
  url: url
@@ -455,7 +455,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
455
455
  return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
456
456
  while (1) switch (_context2.prev = _context2.next) {
457
457
  case 0:
458
- LOG$q.debug('getDataWithoutCache: ', {
458
+ LOG$r.debug('getDataWithoutCache: ', {
459
459
  queryString: queryString,
460
460
  init: init,
461
461
  useWebServiceApi: useWebServiceApi
@@ -533,7 +533,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
533
533
  return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
534
534
  while (1) switch (_context3.prev = _context3.next) {
535
535
  case 0:
536
- LOG$q.debug('getDataCache: ', {
536
+ LOG$r.debug('getDataCache: ', {
537
537
  queryString: queryString,
538
538
  cacheMD5: cacheMD5,
539
539
  accountSessionGuid: accountSessionGuid,
@@ -554,14 +554,14 @@ var DivaApiHandler = /*#__PURE__*/function () {
554
554
  _context3.next = 9;
555
555
  break;
556
556
  }
557
- LOG$q.debug('getDataFromInternalCache: ' + queryString);
557
+ LOG$r.debug('getDataFromInternalCache: ' + queryString);
558
558
  return _context3.abrupt("return", cacheHit);
559
559
  case 9:
560
560
  if (!(cacheMD5 && this.jsonDataCache.get(cacheMD5) && !((_this$divaWebConfigDa2 = this.divaWebConfigData) !== null && _this$divaWebConfigDa2 !== void 0 && _this$divaWebConfigDa2.addOrganizationIdToCacheKey))) {
561
561
  _context3.next = 12;
562
562
  break;
563
563
  }
564
- LOG$q.debug('getDataFromInternalCache: ' + queryString);
564
+ LOG$r.debug('getDataFromInternalCache: ' + queryString);
565
565
  return _context3.abrupt("return", this.jsonDataCache.get(cacheMD5));
566
566
  case 12:
567
567
  if (!addSession) {
@@ -611,7 +611,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
611
611
  // SHOULD have been authenticated against an account, the planner ends up using a
612
612
  // visitor sessionGuid (cached per organization in DataStore). Surface it so we
613
613
  // can spot regressions instead of silently sending the wrong GUID.
614
- LOG$q.warn('[SESSION-GUID][API] visitor fallback used for api2 call (no accountSessionGuid passed)', {
614
+ LOG$r.warn('[SESSION-GUID][API] visitor fallback used for api2 call (no accountSessionGuid passed)', {
615
615
  callTag: "api#".concat(this.instanceId, "/call#").concat(this.apiCallCount),
616
616
  queryString: queryString,
617
617
  organizationId: this.OrganizationId
@@ -633,7 +633,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
633
633
  this.jsonDataCache.set(myQS, result);
634
634
  if (cacheMD5 && !((_this$divaWebConfigDa3 = this.divaWebConfigData) !== null && _this$divaWebConfigDa3 !== void 0 && _this$divaWebConfigDa3.addOrganizationIdToCacheKey)) this.jsonDataCache.set(cacheMD5, result);
635
635
  }
636
- LOG$q.debug('getDataFromApi: ' + queryString);
636
+ LOG$r.debug('getDataFromApi: ' + queryString);
637
637
  return _context3.abrupt("return", result);
638
638
  case 41:
639
639
  case "end":
@@ -669,7 +669,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
669
669
  case 5:
670
670
  _context4.prev = 5;
671
671
  _context4.t0 = _context4["catch"](1);
672
- LOG$q.error(new DivaUtils.DivaError('could not create product in Configurator', {
672
+ LOG$r.error(new DivaUtils.DivaError('could not create product in Configurator', {
673
673
  cause: _context4.t0
674
674
  }));
675
675
  return _context4.abrupt("return", false);
@@ -1654,7 +1654,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1654
1654
  status = _context12.t0 === null || _context12.t0 === void 0 || (_e$response3 = _context12.t0.response) === null || _e$response3 === void 0 ? void 0 : _e$response3.status;
1655
1655
  body = _context12.t0 === null || _context12.t0 === void 0 || (_e$response4 = _context12.t0.response) === null || _e$response4 === void 0 ? void 0 : _e$response4.data;
1656
1656
  apiMessage = typeof (body === null || body === void 0 ? void 0 : body.error) === 'string' ? body.error : _context12.t0 === null || _context12.t0 === void 0 ? void 0 : _context12.t0.message;
1657
- LOG$q.error(new Error("Failed to create lead key for email ".concat(email, ": ").concat(apiMessage)));
1657
+ LOG$r.error(new Error("Failed to create lead key for email ".concat(email, ": ").concat(apiMessage)));
1658
1658
  throw new DivaUtils.DivaError(apiMessage || 'Failed to create lead key', {
1659
1659
  code: 'LEAD_KEY_REQUEST_FAILED',
1660
1660
  custom: {
@@ -1750,7 +1750,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1750
1750
  case 9:
1751
1751
  _context14.prev = 9;
1752
1752
  _context14.t0 = _context14["catch"](4);
1753
- LOG$q.error(new DivaUtils.DivaError('Error Connecting to Support-Service-LivePlanner', {
1753
+ LOG$r.error(new DivaUtils.DivaError('Error Connecting to Support-Service-LivePlanner', {
1754
1754
  cause: _context14.t0
1755
1755
  }));
1756
1756
  case 12:
@@ -1797,7 +1797,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1797
1797
  case 10:
1798
1798
  _context15.prev = 10;
1799
1799
  _context15.t0 = _context15["catch"](3);
1800
- LOG$q.error({
1800
+ LOG$r.error({
1801
1801
  message: 'Could not fetch dimension',
1802
1802
  name: 'get dimension error'
1803
1803
  });
@@ -1855,7 +1855,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1855
1855
  case 9:
1856
1856
  _context16.prev = 9;
1857
1857
  _context16.t0 = _context16["catch"](3);
1858
- LOG$q.error({
1858
+ LOG$r.error({
1859
1859
  message: 'Could not fetch catalogXml',
1860
1860
  name: 'get catalogXml error'
1861
1861
  });
@@ -1934,7 +1934,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1934
1934
  case 14:
1935
1935
  _context17.prev = 14;
1936
1936
  _context17.t0 = _context17["catch"](6);
1937
- LOG$q.error(new DivaUtils.DivaError('Error Connecting to Report Service', {
1937
+ LOG$r.error(new DivaUtils.DivaError('Error Connecting to Report Service', {
1938
1938
  cause: _context17.t0
1939
1939
  }));
1940
1940
  case 17:
@@ -2457,6 +2457,22 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
2457
2457
  }
2458
2458
  return false;
2459
2459
  }
2460
+
2461
+ /**
2462
+ * Overwrites the docking point counts of the top svg. For IDM articles whose detail info delivered no
2463
+ * counts, so their svg was counted instead - without counts an article is not dockable (see isDockable).
2464
+ */
2465
+ }, {
2466
+ key: "applyDockingPointCounts",
2467
+ value: function applyDockingPointCounts(counts) {
2468
+ this.catPlanArt.topAVC = counts.avc;
2469
+ this.catPlanArt.topAVN = counts.avn;
2470
+ this.catPlanArt.topAVO = counts.avo;
2471
+ this.catPlanArt.topAVS = counts.avs;
2472
+ this.catPlanArt.topAVU = counts.avu;
2473
+ this.catPlanArt.topHasAVL = counts.avl > 0;
2474
+ this.catPlanArt.topHasAVR = counts.avr > 0;
2475
+ }
2460
2476
  }, {
2461
2477
  key: "filterType",
2462
2478
  get: function get() {
@@ -2468,7 +2484,7 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
2468
2484
  }]);
2469
2485
  }();
2470
2486
 
2471
- var LOG$p = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
2487
+ var LOG$q = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
2472
2488
  var OptionCatalogData = /*#__PURE__*/function () {
2473
2489
  function OptionCatalogData(opt, catalogData) {
2474
2490
  var _this$opt$property;
@@ -2899,7 +2915,7 @@ var setOptionsProperties = function setOptionsProperties(catalogData, opt, prope
2899
2915
  case 'IsArtName':
2900
2916
  break;
2901
2917
  default:
2902
- LOG$p.debug('implement mapping for these props for options: ' + prop.Codex);
2918
+ LOG$q.debug('implement mapping for these props for options: ' + prop.Codex);
2903
2919
  break;
2904
2920
  }
2905
2921
  }
@@ -16694,7 +16710,7 @@ var ralClassics = [{
16694
16710
  rgb: '#7E8182'
16695
16711
  }];
16696
16712
 
16697
- var LOG$o = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
16713
+ var LOG$p = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
16698
16714
  var OptionValueCatalogData = /*#__PURE__*/function () {
16699
16715
  function OptionValueCatalogData(opv, catalogData) {
16700
16716
  var _this = this,
@@ -17186,7 +17202,7 @@ var setOptionValueProperties = function setOptionValueProperties(catalogData, op
17186
17202
  break;
17187
17203
  default:
17188
17204
  if (key.includes('__')) break;
17189
- LOG$o.debug('implement mapping for these props for optionValue: ' + prop.Codex);
17205
+ LOG$p.debug('implement mapping for these props for optionValue: ' + prop.Codex);
17190
17206
  var values_locales = [];
17191
17207
  if (prop.Value_locales) {
17192
17208
  var _prop$Value_locales;
@@ -17212,9 +17228,9 @@ var setOptionValueProperties = function setOptionValueProperties(catalogData, op
17212
17228
  return metaDatas;
17213
17229
  };
17214
17230
 
17215
- function _createForOfIteratorHelper$l(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$l(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; } } }; }
17216
- function _unsupportedIterableToArray$l(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$l(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$l(r, a) : void 0; } }
17217
- function _arrayLikeToArray$l(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; }
17231
+ function _createForOfIteratorHelper$m(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$m(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; } } }; }
17232
+ function _unsupportedIterableToArray$m(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$m(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$m(r, a) : void 0; } }
17233
+ function _arrayLikeToArray$m(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; }
17218
17234
  //kaufmännischer Artikel
17219
17235
  var CatalogArticleData = /*#__PURE__*/function () {
17220
17236
  function CatalogArticleData(catalogArticle, catalogData) {
@@ -18000,7 +18016,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
18000
18016
  value: function getOptionValueFromOption(opt, opv) {
18001
18017
  if (this._catalogArticle.articleOptions[opt] && this._catalogArticle.articleOptions[opt].hasOPG) {
18002
18018
  var myOPGs = this._catalogArticle.articleOptions[opt].articleOptionValues;
18003
- var _iterator = _createForOfIteratorHelper$l(myOPGs),
18019
+ var _iterator = _createForOfIteratorHelper$m(myOPGs),
18004
18020
  _step;
18005
18021
  try {
18006
18022
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -18067,7 +18083,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
18067
18083
  }]);
18068
18084
  }();
18069
18085
 
18070
- var LOG$n = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
18086
+ var LOG$o = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
18071
18087
  function initDivaCatalogData(json, orderSet, api) {
18072
18088
  var _json$MainCategory;
18073
18089
  var catalogData = {
@@ -18126,7 +18142,7 @@ function initDivaArticles(articleJson, plannerElementsJson, catalogData) {
18126
18142
  }
18127
18143
  } else {
18128
18144
  DivaUtils__default["default"].endSpanOfApm('Catalog initialize');
18129
- LOG$n.error(new DivaUtils.DivaError('Catalog ' + catalogData.catalogName + ' not listed', {
18145
+ LOG$o.error(new DivaUtils.DivaError('Catalog ' + catalogData.catalogName + ' not listed', {
18130
18146
  code: 'WC_0002'
18131
18147
  }));
18132
18148
  throw new Error('Articles of Catalog: ' + catalogData.catalogCodex + ' are empty');
@@ -19149,9 +19165,9 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
19149
19165
  }]);
19150
19166
  }();
19151
19167
 
19152
- function _createForOfIteratorHelper$k(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$k(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; } } }; }
19153
- function _unsupportedIterableToArray$k(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$k(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$k(r, a) : void 0; } }
19154
- function _arrayLikeToArray$k(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; }
19168
+ function _createForOfIteratorHelper$l(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$l(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; } } }; }
19169
+ function _unsupportedIterableToArray$l(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$l(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$l(r, a) : void 0; } }
19170
+ function _arrayLikeToArray$l(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; }
19155
19171
  var ArticleOptionData = /*#__PURE__*/function () {
19156
19172
  function ArticleOptionData(opt, catalogData) {
19157
19173
  var _this$opt$property;
@@ -19251,7 +19267,7 @@ var ArticleOptionData = /*#__PURE__*/function () {
19251
19267
  }, {
19252
19268
  key: "getOpvByOcd",
19253
19269
  value: function getOpvByOcd(codex) {
19254
- var _iterator = _createForOfIteratorHelper$k(this.opt.articleOptionValues),
19270
+ var _iterator = _createForOfIteratorHelper$l(this.opt.articleOptionValues),
19255
19271
  _step;
19256
19272
  try {
19257
19273
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -19592,7 +19608,7 @@ var ArticleOptionData = /*#__PURE__*/function () {
19592
19608
  }]);
19593
19609
  }();
19594
19610
 
19595
- var LOG$m = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
19611
+ var LOG$n = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
19596
19612
  function addSupplierColors(set, catalogArticleData, allOPVsOfOPT, supplierColors, catalog, newOPT, rule) {
19597
19613
  var lang = catalog.api.getLanguage();
19598
19614
  // the palette group shows "<GroupName> (<OPG name>)", so both carry the same translated label
@@ -19799,12 +19815,12 @@ function loadArticleOptions(json, catalogArticleData, set) {
19799
19815
  var myOPV = new ArticleOptionValueData(getArticleOptionValueType(set, tmpOPV.Codex, tmpOPV, catOPV, catalogArticleData, true, newOPG, multiselectOptions), set.CatalogData);
19800
19816
  allOPVsOfOPG.set(tmpOPV.Codex, myOPV);
19801
19817
  } else {
19802
- LOG$m.error(new Error('OPV not found: ' + tmpOPV.Codex));
19818
+ LOG$n.error(new Error('OPV not found: ' + tmpOPV.Codex));
19803
19819
  }
19804
19820
  }
19805
19821
  newOPG.initOPVsInOPG(allOPVsOfOPG);
19806
19822
  } else {
19807
- LOG$m.error(new Error('OPG not found: ' + tmpOPG.Codex));
19823
+ LOG$n.error(new Error('OPG not found: ' + tmpOPG.Codex));
19808
19824
  }
19809
19825
  }
19810
19826
  if ((_myOPT$OPV = myOPT.OPV) !== null && _myOPT$OPV !== void 0 && _myOPT$OPV.length) {
@@ -19820,11 +19836,11 @@ function loadArticleOptions(json, catalogArticleData, set) {
19820
19836
  var _myOPV = new ArticleOptionValueData(getArticleOptionValueType(set, _tmpOPG.Codex, _tmpOPG, _catOPV, catalogArticleData, true, _newOPG, multiselectOptions), set.CatalogData);
19821
19837
  _allOPVsOfOPG.set(_tmpOPG.Codex, _myOPV);
19822
19838
  } else {
19823
- LOG$m.error(new Error('OPV not found: ' + _tmpOPG.Codex));
19839
+ LOG$n.error(new Error('OPV not found: ' + _tmpOPG.Codex));
19824
19840
  }
19825
19841
  _newOPG.initOPVsInOPG(_allOPVsOfOPG);
19826
19842
  } else {
19827
- LOG$m.error(new Error('OPG not found: ' + _tmpOPG.Codex));
19843
+ LOG$n.error(new Error('OPG not found: ' + _tmpOPG.Codex));
19828
19844
  }
19829
19845
  }
19830
19846
  }
@@ -19836,7 +19852,7 @@ function loadArticleOptions(json, catalogArticleData, set) {
19836
19852
  var _myOPV2 = new ArticleOptionValueData(getArticleOptionValueType(set, _tmpOPV.Codex, _tmpOPV, _catOPV2, catalogArticleData, true, newOPT, multiselectOptions), set.CatalogData);
19837
19853
  allOPVsOfOPT.set(_tmpOPV.Codex, _myOPV2);
19838
19854
  } else {
19839
- LOG$m.error(new Error('OPV not found: ' + _tmpOPV.Codex));
19855
+ LOG$n.error(new Error('OPV not found: ' + _tmpOPV.Codex));
19840
19856
  }
19841
19857
  }
19842
19858
  }
@@ -19924,12 +19940,12 @@ function initDecisions(catalog, catalogArticleData, decisionRefs) {
19924
19940
  articleCodex: catalogArticle.articleCodex
19925
19941
  };
19926
19942
  if (myDecision.Type == '0') {
19927
- LOG$m.error(new DivaUtils.DivaError(text, {
19943
+ LOG$n.error(new DivaUtils.DivaError(text, {
19928
19944
  code: 'WC_0011',
19929
19945
  custom: stack
19930
19946
  }));
19931
19947
  } else {
19932
- LOG$m.warn(text, undefined, stack);
19948
+ LOG$n.warn(text, undefined, stack);
19933
19949
  }
19934
19950
  myDecision.Options.splice(m, 1);
19935
19951
  m--;
@@ -20085,6 +20101,313 @@ function getArticleOptionValueType(set, codex, jsonOPV, catalogOPV, myArticle, i
20085
20101
  return opv;
20086
20102
  }
20087
20103
 
20104
+ function _createForOfIteratorHelper$k(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$k(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; } } }; }
20105
+ function _unsupportedIterableToArray$k(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$k(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$k(r, a) : void 0; } }
20106
+ function _arrayLikeToArray$k(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; }
20107
+ var LOG$m = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
20108
+ var COUNT_KEY_BY_DOCKING_TYPE = {
20109
+ AVC: 'avc',
20110
+ AVN: 'avn',
20111
+ AVO: 'avo',
20112
+ AVR: 'avr',
20113
+ AVS: 'avs',
20114
+ AVU: 'avu',
20115
+ AVL: 'avl'
20116
+ };
20117
+ var SVGUtils = /*#__PURE__*/function () {
20118
+ function SVGUtils() {
20119
+ _classCallCheck__default["default"](this, SVGUtils);
20120
+ }
20121
+ /**
20122
+ * This function removes all VIF and OLF information from the SVG. This is used for displaying only the OLT information
20123
+ * @param content The svg with OLF and OLT
20124
+ * @returns SVG with only OLT information
20125
+ */
20126
+ return _createClass__default["default"](SVGUtils, [{
20127
+ key: "removeOLFFromSvg",
20128
+ value: function removeOLFFromSvg(content) {
20129
+ var xmlDocument = planner2dCore.parseXml(content);
20130
+ var vifObjs = xmlDocument.evaluate("//*[starts-with(@id,'VIF')]", xmlDocument, null, 7, null);
20131
+ if (vifObjs.snapshotLength > 0) {
20132
+ for (var i = 0; i < vifObjs.snapshotLength; i++) {
20133
+ var _parentElement;
20134
+ (_parentElement = vifObjs.snapshotItem(i).parentElement) === null || _parentElement === void 0 || _parentElement.removeChild(vifObjs.snapshotItem(i));
20135
+ }
20136
+ }
20137
+ var olfObjs = xmlDocument.evaluate("//*[starts-with(@id,'OLF')]", xmlDocument, null, 7, null);
20138
+ if (olfObjs.snapshotLength > 0) {
20139
+ for (var i = 0; i < olfObjs.snapshotLength; i++) {
20140
+ var _parentElement2;
20141
+ (_parentElement2 = olfObjs.snapshotItem(i).parentElement) === null || _parentElement2 === void 0 || _parentElement2.removeChild(olfObjs.snapshotItem(i));
20142
+ }
20143
+ }
20144
+ return planner2dCore.serializeXml(xmlDocument);
20145
+ }
20146
+
20147
+ /**
20148
+ * This function returns the DPs of an svg
20149
+ * @param content The svg with OLF and OLT
20150
+ * @returns SVG with only OLT information
20151
+ */
20152
+ }, {
20153
+ key: "getDPsInSVG",
20154
+ value: function getDPsInSVG(content) {
20155
+ var dockingpointsSvgLine = [];
20156
+ var xmlDocument = planner2dCore.parseXml(content);
20157
+ var dpObjs = xmlDocument.evaluate("//*[starts-with(@id,'AV')]", xmlDocument, null, 7, null);
20158
+ if (dpObjs.snapshotLength > 0) {
20159
+ for (var i = 0; i < dpObjs.snapshotLength; i++) {
20160
+ var obj = dpObjs.snapshotItem(i);
20161
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'line') {
20162
+ dockingpointsSvgLine.push({
20163
+ x1: Number(obj.getAttribute('x1')),
20164
+ y1: Number(obj.getAttribute('y1')),
20165
+ x2: Number(obj.getAttribute('x2')),
20166
+ y2: Number(obj.getAttribute('y2')),
20167
+ dockingName: obj.getAttribute('id'),
20168
+ dockingType: obj.getAttribute('id').substring(0, 3)
20169
+ });
20170
+ } else {
20171
+ throw new Error('nodename type: ' + obj.nodeName + ' not implemented');
20172
+ }
20173
+ }
20174
+ }
20175
+ dockingpointsSvgLine.sort(function (a, b) {
20176
+ if (a.dockingType === 'AVL') return -1;
20177
+ if (a.dockingType === 'AVR' && ['AVR', 'AVC', 'AVU', 'AVO', 'AVS', 'AVN'].includes(b.dockingType)) return -1;
20178
+ return 0;
20179
+ });
20180
+ return dockingpointsSvgLine;
20181
+ }
20182
+
20183
+ /**
20184
+ * Counts the docking points of an svg per connector type - the numbers an IDM detail info carries
20185
+ * when the media service analyzed the upload. Throws like getDPsInSVG on an AV element that is no line.
20186
+ * @param content The svg
20187
+ * @returns How many AV lines of each type the svg draws
20188
+ */
20189
+ }, {
20190
+ key: "countDockingPoints",
20191
+ value: function countDockingPoints(content) {
20192
+ var counts = {
20193
+ avc: 0,
20194
+ avn: 0,
20195
+ avo: 0,
20196
+ avr: 0,
20197
+ avs: 0,
20198
+ avu: 0,
20199
+ avl: 0
20200
+ };
20201
+ var _iterator = _createForOfIteratorHelper$k(this.getDPsInSVG(content)),
20202
+ _step;
20203
+ try {
20204
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
20205
+ var dockingType = _step.value.dockingType;
20206
+ // getDPsInSVG takes every id starting with 'AV', so an id like 'AVATAR' yields a type without a count
20207
+ var key = COUNT_KEY_BY_DOCKING_TYPE[dockingType];
20208
+ if (key) counts[key]++;
20209
+ }
20210
+ } catch (err) {
20211
+ _iterator.e(err);
20212
+ } finally {
20213
+ _iterator.f();
20214
+ }
20215
+ return counts;
20216
+ }
20217
+
20218
+ /**
20219
+ * This function returns the DPs of an svg
20220
+ * @param content The svg with OLF and OLT
20221
+ * @returns SVG with only OLT information
20222
+ */
20223
+ }, {
20224
+ key: "getPointOfPoligonById",
20225
+ value: function getPointOfPoligonById(content, id) {
20226
+ var points = [];
20227
+ var xmlDocument = planner2dCore.parseXml(content);
20228
+ var dpObjs = xmlDocument.evaluate("//*[starts-with(@id,'" + id + "')]", xmlDocument, null, 7, null);
20229
+ if (dpObjs.snapshotLength > 1 || dpObjs.snapshotLength == 0) return undefined;
20230
+ for (var i = 0; i < dpObjs.snapshotLength; i++) {
20231
+ var obj = dpObjs.snapshotItem(i);
20232
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'polygon') {
20233
+ var pointsAsString = obj.getAttribute('points');
20234
+ if (pointsAsString) {
20235
+ var pointsFromString = pointsAsString.split(' ');
20236
+ for (var j = 0; j < pointsFromString.length; j++) {
20237
+ var xandY = pointsFromString[j].split(',');
20238
+ if (xandY.length !== 2) continue;
20239
+ points.push(new Vector2(Number(xandY[0]), Number(xandY[1])));
20240
+ }
20241
+ } else {
20242
+ return undefined;
20243
+ }
20244
+ }
20245
+ }
20246
+ return points;
20247
+ }
20248
+ }, {
20249
+ key: "getBoundingBoxOfPoints",
20250
+ value: function getBoundingBoxOfPoints(points) {
20251
+ var xArr = points.map(function (c) {
20252
+ return c.x;
20253
+ });
20254
+ var yArr = points.map(function (c) {
20255
+ return c.y;
20256
+ });
20257
+ var minX = Math.min.apply(Math, _toConsumableArray__default["default"](xArr));
20258
+ var maxX = Math.max.apply(Math, _toConsumableArray__default["default"](xArr));
20259
+ var minY = Math.min.apply(Math, _toConsumableArray__default["default"](yArr));
20260
+ var maxY = Math.max.apply(Math, _toConsumableArray__default["default"](yArr));
20261
+ var width = maxX - minX;
20262
+ var height = maxY - minY;
20263
+ return {
20264
+ width: width,
20265
+ height: height,
20266
+ minX: minX,
20267
+ minY: minY
20268
+ };
20269
+ }
20270
+
20271
+ /**
20272
+ * Returns OLF geometry (minX, minY, width, height) from SVG - supports rect and polygon.
20273
+ * Iterates through matches to find first rect/polygon (handles Illustrator group wrappers).
20274
+ */
20275
+ }, {
20276
+ key: "getOLFGeometryFromSvg",
20277
+ value: function getOLFGeometryFromSvg(content) {
20278
+ var xmlDocument = planner2dCore.parseXml(content);
20279
+ var olfObjs = xmlDocument.evaluate("//*[starts-with(@id,'OLF')]", xmlDocument, null, 7, null);
20280
+ for (var i = 0; i < olfObjs.snapshotLength; i++) {
20281
+ var obj = olfObjs.snapshotItem(i);
20282
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'rect') {
20283
+ var _obj$getAttribute, _obj$getAttribute2, _obj$getAttribute3, _obj$getAttribute4;
20284
+ var x = parseFloat((_obj$getAttribute = obj.getAttribute('x')) !== null && _obj$getAttribute !== void 0 ? _obj$getAttribute : '0');
20285
+ var y = parseFloat((_obj$getAttribute2 = obj.getAttribute('y')) !== null && _obj$getAttribute2 !== void 0 ? _obj$getAttribute2 : '0');
20286
+ var width = parseFloat((_obj$getAttribute3 = obj.getAttribute('width')) !== null && _obj$getAttribute3 !== void 0 ? _obj$getAttribute3 : '0');
20287
+ var height = parseFloat((_obj$getAttribute4 = obj.getAttribute('height')) !== null && _obj$getAttribute4 !== void 0 ? _obj$getAttribute4 : '0');
20288
+ return {
20289
+ minX: x,
20290
+ minY: y,
20291
+ width: width,
20292
+ height: height
20293
+ };
20294
+ }
20295
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'polygon') {
20296
+ var pts = obj.getAttribute('points');
20297
+ if (pts) {
20298
+ var points = pts.split(/\s+/).reduce(function (acc, p) {
20299
+ var _p$split = p.split(','),
20300
+ _p$split2 = _slicedToArray__default["default"](_p$split, 2),
20301
+ x = _p$split2[0],
20302
+ y = _p$split2[1];
20303
+ if (x != null && y != null) acc.push(new Vector2(Number(x), Number(y)));
20304
+ return acc;
20305
+ }, []);
20306
+ if (points.length) {
20307
+ var bbox = this.getBoundingBoxOfPoints(points);
20308
+ return {
20309
+ minX: bbox.minX,
20310
+ minY: bbox.minY,
20311
+ width: bbox.width,
20312
+ height: bbox.height
20313
+ };
20314
+ }
20315
+ }
20316
+ }
20317
+ }
20318
+ return undefined;
20319
+ }
20320
+
20321
+ /**
20322
+ * Returns OLT geometry (x, y, width, height) from SVG attributes - untransformed coords.
20323
+ * Iterates through matches to find first rect/polygon (handles Illustrator group wrappers).
20324
+ */
20325
+ }, {
20326
+ key: "getOLTGeometryFromSvg",
20327
+ value: function getOLTGeometryFromSvg(content) {
20328
+ var xmlDocument = planner2dCore.parseXml(content);
20329
+ var oltObjs = xmlDocument.evaluate("//*[starts-with(@id,'OLT')]", xmlDocument, null, 7, null);
20330
+ for (var i = 0; i < oltObjs.snapshotLength; i++) {
20331
+ var obj = oltObjs.snapshotItem(i);
20332
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'rect') {
20333
+ var _obj$getAttribute5, _obj$getAttribute6, _obj$getAttribute7, _obj$getAttribute8;
20334
+ var x = parseFloat((_obj$getAttribute5 = obj.getAttribute('x')) !== null && _obj$getAttribute5 !== void 0 ? _obj$getAttribute5 : '0');
20335
+ var y = parseFloat((_obj$getAttribute6 = obj.getAttribute('y')) !== null && _obj$getAttribute6 !== void 0 ? _obj$getAttribute6 : '0');
20336
+ var width = parseFloat((_obj$getAttribute7 = obj.getAttribute('width')) !== null && _obj$getAttribute7 !== void 0 ? _obj$getAttribute7 : '0');
20337
+ var height = parseFloat((_obj$getAttribute8 = obj.getAttribute('height')) !== null && _obj$getAttribute8 !== void 0 ? _obj$getAttribute8 : '0');
20338
+ return {
20339
+ x: x,
20340
+ y: y,
20341
+ width: width,
20342
+ height: height
20343
+ };
20344
+ }
20345
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'polygon') {
20346
+ var pts = obj.getAttribute('points');
20347
+ if (pts) {
20348
+ var points = pts.split(/\s+/).reduce(function (acc, p) {
20349
+ var _p$split3 = p.split(','),
20350
+ _p$split4 = _slicedToArray__default["default"](_p$split3, 2),
20351
+ x = _p$split4[0],
20352
+ y = _p$split4[1];
20353
+ if (x != null && y != null) acc.push(new Vector2(Number(x), Number(y)));
20354
+ return acc;
20355
+ }, []);
20356
+ if (points.length) {
20357
+ var bbox = this.getBoundingBoxOfPoints(points);
20358
+ return {
20359
+ x: bbox.minX,
20360
+ y: bbox.minY,
20361
+ width: bbox.width,
20362
+ height: bbox.height
20363
+ };
20364
+ }
20365
+ }
20366
+ }
20367
+ }
20368
+ return undefined;
20369
+ }
20370
+
20371
+ /**
20372
+ * This function looks if the svg has a Mask HTML element. If so it removes all masks from SVG
20373
+ * @param content
20374
+ */
20375
+ }, {
20376
+ key: "removeMaskFromSvg",
20377
+ value: function removeMaskFromSvg(content) {
20378
+ return planner2dCore.removeMask(content);
20379
+ }
20380
+
20381
+ /**
20382
+ * Stretches the SVG to the target OLT size and passes the result to the callback.
20383
+ * @param svgSourceUrl optional URL / path of the loaded SVG for diagnostics
20384
+ */
20385
+ }, {
20386
+ key: "ccCheckStretchAreas",
20387
+ value: function ccCheckStretchAreas(content, newWidthCM, newHeightCM, useglobalSvgScale, svgMinBorderXVal, svgMinBorderYVal, callback, svgSourceUrl) {
20388
+ var result = planner2dCore.stretchArticleSvg(content, newWidthCM, newHeightCM, {
20389
+ useGlobalScale: useglobalSvgScale,
20390
+ minBorderX: svgMinBorderXVal,
20391
+ minBorderY: svgMinBorderYVal
20392
+ });
20393
+ var _iterator2 = _createForOfIteratorHelper$k(result.warnings),
20394
+ _step2;
20395
+ try {
20396
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
20397
+ var warning = _step2.value;
20398
+ LOG$m.warn('[SVGUtils] ccCheckStretchAreas: ' + warning + (svgSourceUrl ? ' (svg: ' + svgSourceUrl + ')' : ''));
20399
+ }
20400
+ } catch (err) {
20401
+ _iterator2.e(err);
20402
+ } finally {
20403
+ _iterator2.f();
20404
+ }
20405
+ callback(result.svg);
20406
+ return result.sizes;
20407
+ }
20408
+ }]);
20409
+ }();
20410
+
20088
20411
  function ownKeys$q(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; }
20089
20412
  function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$q(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20090
20413
  function _createForOfIteratorHelper$j(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$j(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; } } }; }
@@ -20154,6 +20477,9 @@ function _loadMoreFromIDMArticles() {
20154
20477
  })), undefined, undefined, 'enricher');
20155
20478
  case 3:
20156
20479
  items = _context8.sent;
20480
+ _context8.next = 6;
20481
+ return fillMissingDockingPointCounts(items, set, catalogData);
20482
+ case 6:
20157
20483
  _loop3 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop3() {
20158
20484
  var catalogArticleData, item;
20159
20485
  return _regeneratorRuntime__default["default"].wrap(function _loop3$(_context4) {
@@ -20180,17 +20506,17 @@ function _loadMoreFromIDMArticles() {
20180
20506
  }, _loop3);
20181
20507
  });
20182
20508
  i = 0;
20183
- case 6:
20509
+ case 8:
20184
20510
  if (!(i < catalogArticleDatas.length)) {
20185
- _context8.next = 11;
20511
+ _context8.next = 13;
20186
20512
  break;
20187
20513
  }
20188
- return _context8.delegateYield(_loop3(), "t0", 8);
20189
- case 8:
20514
+ return _context8.delegateYield(_loop3(), "t0", 10);
20515
+ case 10:
20190
20516
  i++;
20191
- _context8.next = 6;
20517
+ _context8.next = 8;
20192
20518
  break;
20193
- case 11:
20519
+ case 13:
20194
20520
  toLoadDecisionIds = getToLoadDecisionIds(catalogArticleDatas, catalogData);
20195
20521
  toLoadPFGroups = getPriceFeatureGroups(catalogArticleDatas, catalogData);
20196
20522
  toLoadFeatureClassRefNo = _toConsumableArray__default["default"](new Set(catalogArticleDatas.filter(function (a) {
@@ -20199,9 +20525,9 @@ function _loadMoreFromIDMArticles() {
20199
20525
  return a.featureClassRefNo;
20200
20526
  })));
20201
20527
  promises = [set.api.getDataCache(set.api.getIDMFeatureClass(catalogData.accountGuid, toLoadFeatureClassRefNo), undefined, undefined, 'enricher'), toLoadPFGroups.length ? set.api.getDataCache(set.api.getIDMPriceFeatureGroups(catalogData.accountGuid, toLoadPFGroups), undefined, undefined, 'enricher') : undefined, toLoadDecisionIds.length ? fetchDecisions(set, catalogData, toLoadDecisionIds) : undefined];
20202
- _context8.next = 17;
20528
+ _context8.next = 19;
20203
20529
  return Promise.all(promises);
20204
- case 17:
20530
+ case 19:
20205
20531
  _yield$Promise$all = _context8.sent;
20206
20532
  _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
20207
20533
  featureClasses = _yield$Promise$all2[0];
@@ -20213,7 +20539,7 @@ function _loadMoreFromIDMArticles() {
20213
20539
  }
20214
20540
  }
20215
20541
  if (!(toLoadDecisionIds.length !== 0 && toLoadDecisionIds.length != (decisions === null || decisions === void 0 ? void 0 : decisions.length))) {
20216
- _context8.next = 27;
20542
+ _context8.next = 29;
20217
20543
  break;
20218
20544
  }
20219
20545
  loadedIds = new Set((_decisions$map = decisions === null || decisions === void 0 ? void 0 : decisions.map(function (d) {
@@ -20223,17 +20549,17 @@ function _loadMoreFromIDMArticles() {
20223
20549
  return !loadedIds.has(id);
20224
20550
  });
20225
20551
  throw new Error("loading decisions failed \u2013 missing: [".concat(missingIds.join(', '), "]"));
20226
- case 27:
20227
- _context8.next = 29;
20228
- return loadDecisionsReferencedByActions(set, catalogData);
20229
20552
  case 29:
20553
+ _context8.next = 31;
20554
+ return loadDecisionsReferencedByActions(set, catalogData);
20555
+ case 31:
20230
20556
  if (priceFeatureGroups) {
20231
20557
  for (_i6 = 0; _i6 < priceFeatureGroups.length; _i6++) {
20232
20558
  catalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i6], catalogData.idmOptionGroups));
20233
20559
  }
20234
20560
  }
20235
20561
  _iterator6 = _createForOfIteratorHelper$j(toLoadPFGroups);
20236
- _context8.prev = 31;
20562
+ _context8.prev = 33;
20237
20563
  _loop7 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop7() {
20238
20564
  var prfgNo, askedBy;
20239
20565
  return _regeneratorRuntime__default["default"].wrap(function _loop7$(_context5) {
@@ -20262,33 +20588,33 @@ function _loadMoreFromIDMArticles() {
20262
20588
  }, _loop7);
20263
20589
  });
20264
20590
  _iterator6.s();
20265
- case 34:
20591
+ case 36:
20266
20592
  if ((_step6 = _iterator6.n()).done) {
20267
- _context8.next = 40;
20593
+ _context8.next = 42;
20268
20594
  break;
20269
20595
  }
20270
- return _context8.delegateYield(_loop7(), "t1", 36);
20271
- case 36:
20596
+ return _context8.delegateYield(_loop7(), "t1", 38);
20597
+ case 38:
20272
20598
  if (!_context8.t1) {
20273
- _context8.next = 38;
20599
+ _context8.next = 40;
20274
20600
  break;
20275
20601
  }
20276
- return _context8.abrupt("continue", 38);
20277
- case 38:
20278
- _context8.next = 34;
20279
- break;
20602
+ return _context8.abrupt("continue", 40);
20280
20603
  case 40:
20281
- _context8.next = 45;
20604
+ _context8.next = 36;
20282
20605
  break;
20283
20606
  case 42:
20284
- _context8.prev = 42;
20285
- _context8.t2 = _context8["catch"](31);
20607
+ _context8.next = 47;
20608
+ break;
20609
+ case 44:
20610
+ _context8.prev = 44;
20611
+ _context8.t2 = _context8["catch"](33);
20286
20612
  _iterator6.e(_context8.t2);
20287
- case 45:
20288
- _context8.prev = 45;
20613
+ case 47:
20614
+ _context8.prev = 47;
20289
20615
  _iterator6.f();
20290
- return _context8.finish(45);
20291
- case 48:
20616
+ return _context8.finish(47);
20617
+ case 50:
20292
20618
  for (_i7 = 0; _i7 < catalogArticleDatas.length; _i7++) {
20293
20619
  catalogArticleData = catalogArticleDatas[_i7];
20294
20620
  catalogArticleData.articleIDMDecisions = sortDecisions(catalogData.getDecisionsByNo(_toConsumableArray__default["default"](new Set([].concat(_toConsumableArray__default["default"](catalogData.globalDecisions.map(function (g) {
@@ -20300,12 +20626,12 @@ function _loadMoreFromIDMArticles() {
20300
20626
  });
20301
20627
  toLoadFeatures = getFeatures(catalogData, featureClasses);
20302
20628
  if (!toLoadFeatures.length) {
20303
- _context8.next = 62;
20629
+ _context8.next = 64;
20304
20630
  break;
20305
20631
  }
20306
- _context8.next = 54;
20632
+ _context8.next = 56;
20307
20633
  return set.api.getDataCache(set.api.getIDMFeatures(catalogData.accountGuid, toLoadFeatures), undefined, undefined, 'enricher');
20308
- case 54:
20634
+ case 56:
20309
20635
  features = _context8.sent;
20310
20636
  _loop4 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop4() {
20311
20637
  var feature, insertIndex, k, _loop5, j;
@@ -20387,19 +20713,19 @@ function _loadMoreFromIDMArticles() {
20387
20713
  }, _loop4);
20388
20714
  });
20389
20715
  _i8 = 0;
20390
- case 57:
20716
+ case 59:
20391
20717
  if (!(_i8 < features.length)) {
20392
- _context8.next = 62;
20718
+ _context8.next = 64;
20393
20719
  break;
20394
20720
  }
20395
- return _context8.delegateYield(_loop4(), "t3", 59);
20396
- case 59:
20721
+ return _context8.delegateYield(_loop4(), "t3", 61);
20722
+ case 61:
20397
20723
  _i8++;
20398
- _context8.next = 57;
20724
+ _context8.next = 59;
20399
20725
  break;
20400
- case 62:
20726
+ case 64:
20401
20727
  _iterator7 = _createForOfIteratorHelper$j(toLoadFeatures);
20402
- _context8.prev = 63;
20728
+ _context8.prev = 65;
20403
20729
  _loop8 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop8() {
20404
20730
  var featureNo, askedBy;
20405
20731
  return _regeneratorRuntime__default["default"].wrap(function _loop8$(_context6) {
@@ -20429,33 +20755,33 @@ function _loadMoreFromIDMArticles() {
20429
20755
  }, _loop8);
20430
20756
  });
20431
20757
  _iterator7.s();
20432
- case 66:
20758
+ case 68:
20433
20759
  if ((_step7 = _iterator7.n()).done) {
20434
- _context8.next = 72;
20760
+ _context8.next = 74;
20435
20761
  break;
20436
20762
  }
20437
- return _context8.delegateYield(_loop8(), "t4", 68);
20438
- case 68:
20763
+ return _context8.delegateYield(_loop8(), "t4", 70);
20764
+ case 70:
20439
20765
  if (!_context8.t4) {
20440
- _context8.next = 70;
20766
+ _context8.next = 72;
20441
20767
  break;
20442
20768
  }
20443
- return _context8.abrupt("continue", 70);
20444
- case 70:
20445
- _context8.next = 66;
20446
- break;
20769
+ return _context8.abrupt("continue", 72);
20447
20770
  case 72:
20448
- _context8.next = 77;
20771
+ _context8.next = 68;
20449
20772
  break;
20450
20773
  case 74:
20451
- _context8.prev = 74;
20452
- _context8.t5 = _context8["catch"](63);
20774
+ _context8.next = 79;
20775
+ break;
20776
+ case 76:
20777
+ _context8.prev = 76;
20778
+ _context8.t5 = _context8["catch"](65);
20453
20779
  _iterator7.e(_context8.t5);
20454
- case 77:
20455
- _context8.prev = 77;
20780
+ case 79:
20781
+ _context8.prev = 79;
20456
20782
  _iterator7.f();
20457
- return _context8.finish(77);
20458
- case 80:
20783
+ return _context8.finish(79);
20784
+ case 82:
20459
20785
  _loop6 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop6() {
20460
20786
  var catalogArticleData, featureClass, features, j;
20461
20787
  return _regeneratorRuntime__default["default"].wrap(function _loop6$(_context7) {
@@ -20482,25 +20808,25 @@ function _loadMoreFromIDMArticles() {
20482
20808
  }, _loop6);
20483
20809
  });
20484
20810
  _i9 = 0;
20485
- case 82:
20811
+ case 84:
20486
20812
  if (!(_i9 < catalogArticleDatas.length)) {
20487
- _context8.next = 87;
20813
+ _context8.next = 89;
20488
20814
  break;
20489
20815
  }
20490
- return _context8.delegateYield(_loop6(), "t6", 84);
20491
- case 84:
20816
+ return _context8.delegateYield(_loop6(), "t6", 86);
20817
+ case 86:
20492
20818
  _i9++;
20493
- _context8.next = 82;
20819
+ _context8.next = 84;
20494
20820
  break;
20495
- case 87:
20821
+ case 89:
20496
20822
  catalogArticleDatas.map(function (c) {
20497
20823
  return c.areOptionsLoaded = true;
20498
20824
  });
20499
- case 88:
20825
+ case 90:
20500
20826
  case "end":
20501
20827
  return _context8.stop();
20502
20828
  }
20503
- }, _callee2, null, [[31, 42, 45, 48], [63, 74, 77, 80]]);
20829
+ }, _callee2, null, [[33, 44, 47, 50], [65, 76, 79, 82]]);
20504
20830
  }));
20505
20831
  return _loadMoreFromIDMArticles.apply(this, arguments);
20506
20832
  }
@@ -20624,7 +20950,179 @@ function initIDMArticleRelations(item, catalogArticleData, catalog) {
20624
20950
  catalogArticle.hasArticleRelations = catalogArticle.articleRelations.length > 0;
20625
20951
  }
20626
20952
 
20953
+ /** True when IDM delivered no docking point counts for this svg at all - a delivered 0 is a real count. */
20954
+ function lacksDockingPointCounts(svg) {
20955
+ return [svg.avc, svg.avn, svg.avo, svg.avr, svg.avs, svg.avu, svg.avl].every(function (count) {
20956
+ return count === undefined;
20957
+ });
20958
+ }
20959
+
20960
+ /**
20961
+ * Counts the docking points of accessory svgs whose IDM detail info delivered none - the frontend counterpart
20962
+ * of api2's FillAVsIfMissing for CE catalogs. Without counts an accessory is not dockable, so the accessory
20963
+ * step adds it without its svg and the planner palette never offers it. Has to run before the relations are
20964
+ * mapped, because they and the planner palette take a snapshot of the counts.
20965
+ */
20966
+ function fillMissingDockingPointCounts(_x3, _x4, _x5) {
20967
+ return _fillMissingDockingPointCounts.apply(this, arguments);
20968
+ }
20969
+
20627
20970
  /** Load IDM decisions by number; a list too long for one GET url goes through the POST query endpoint. */
20971
+ function _fillMissingDockingPointCounts() {
20972
+ _fillMissingDockingPointCounts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee4(items, set, catalogData) {
20973
+ var accessories, _iterator8, _step8, item, _iterator9, _step9, ref, accessory, svgUtils, countsByUrl, countSvg;
20974
+ return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context10) {
20975
+ while (1) switch (_context10.prev = _context10.next) {
20976
+ case 0:
20977
+ if (!catalogData.ignoreArticleRelations) {
20978
+ _context10.next = 2;
20979
+ break;
20980
+ }
20981
+ return _context10.abrupt("return");
20982
+ case 2:
20983
+ accessories = new Set();
20984
+ _iterator8 = _createForOfIteratorHelper$j(items);
20985
+ _context10.prev = 4;
20986
+ _iterator8.s();
20987
+ case 6:
20988
+ if ((_step8 = _iterator8.n()).done) {
20989
+ _context10.next = 29;
20990
+ break;
20991
+ }
20992
+ item = _step8.value;
20993
+ _iterator9 = _createForOfIteratorHelper$j(readAdditionalItemRefs(item));
20994
+ _context10.prev = 9;
20995
+ _iterator9.s();
20996
+ case 11:
20997
+ if ((_step9 = _iterator9.n()).done) {
20998
+ _context10.next = 19;
20999
+ break;
21000
+ }
21001
+ ref = _step9.value;
21002
+ if (!(ref.serieNo != catalogData.catalogCodex)) {
21003
+ _context10.next = 15;
21004
+ break;
21005
+ }
21006
+ return _context10.abrupt("continue", 17);
21007
+ case 15:
21008
+ accessory = catalogData.getCatalogArticle(ref.typeNo);
21009
+ if (accessory && !accessory.isHidden && accessory.catalogPlannerArticle) accessories.add(accessory);
21010
+ case 17:
21011
+ _context10.next = 11;
21012
+ break;
21013
+ case 19:
21014
+ _context10.next = 24;
21015
+ break;
21016
+ case 21:
21017
+ _context10.prev = 21;
21018
+ _context10.t0 = _context10["catch"](9);
21019
+ _iterator9.e(_context10.t0);
21020
+ case 24:
21021
+ _context10.prev = 24;
21022
+ _iterator9.f();
21023
+ return _context10.finish(24);
21024
+ case 27:
21025
+ _context10.next = 6;
21026
+ break;
21027
+ case 29:
21028
+ _context10.next = 34;
21029
+ break;
21030
+ case 31:
21031
+ _context10.prev = 31;
21032
+ _context10.t1 = _context10["catch"](4);
21033
+ _iterator8.e(_context10.t1);
21034
+ case 34:
21035
+ _context10.prev = 34;
21036
+ _iterator8.f();
21037
+ return _context10.finish(34);
21038
+ case 37:
21039
+ svgUtils = new SVGUtils(); // accessories may share a drawing - fetch and count each url once
21040
+ countsByUrl = new Map();
21041
+ countSvg = function countSvg(url) {
21042
+ var counts = countsByUrl.get(url);
21043
+ if (!counts) {
21044
+ counts = set.api.fetchData(url, {
21045
+ method: 'GET',
21046
+ config: {},
21047
+ data: {}
21048
+ }).then(function (svgContent) {
21049
+ return svgUtils.countDockingPoints(svgContent);
21050
+ })["catch"](function (e) {
21051
+ LOG$l.warn('docking points of the accessory svg ' + url + ' could not be counted', e);
21052
+ return undefined;
21053
+ });
21054
+ countsByUrl.set(url, counts);
21055
+ }
21056
+ return counts;
21057
+ };
21058
+ _context10.next = 42;
21059
+ return Promise.all(_toConsumableArray__default["default"](accessories).map(/*#__PURE__*/function () {
21060
+ var _ref4 = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(accessory) {
21061
+ var _accessory$svgs, _accessory$catalogPla12;
21062
+ var svgs, uncounted, counts, topCounts, paletteView;
21063
+ return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context9) {
21064
+ while (1) switch (_context9.prev = _context9.next) {
21065
+ case 0:
21066
+ svgs = (_accessory$svgs = accessory.svgs) !== null && _accessory$svgs !== void 0 ? _accessory$svgs : [];
21067
+ uncounted = svgs.filter(lacksDockingPointCounts);
21068
+ if (uncounted.length) {
21069
+ _context9.next = 4;
21070
+ break;
21071
+ }
21072
+ return _context9.abrupt("return");
21073
+ case 4:
21074
+ _context9.next = 6;
21075
+ return Promise.all(uncounted.map(function (svg) {
21076
+ return countSvg(svg.url);
21077
+ }));
21078
+ case 6:
21079
+ counts = _context9.sent;
21080
+ // every svg gets its counts, so an svg swap (IDMArticleEngine) reads real ones too
21081
+ uncounted.forEach(function (svg, i) {
21082
+ if (counts[i]) Object.assign(svg, counts[i]);
21083
+ });
21084
+
21085
+ // the planner article took its top values from the first svg (IDMCatalogData.getCatalogPlanner)
21086
+ topCounts = uncounted[0] === svgs[0] ? counts[0] : undefined;
21087
+ if (topCounts) {
21088
+ _context9.next = 11;
21089
+ break;
21090
+ }
21091
+ return _context9.abrupt("return");
21092
+ case 11:
21093
+ (_accessory$catalogPla12 = accessory.catalogPlannerArticle) === null || _accessory$catalogPla12 === void 0 || _accessory$catalogPla12.applyDockingPointCounts(topCounts);
21094
+ paletteView = catalogData.plannerPaletteViewInfo.catalogPlannerArticles.find(function (view) {
21095
+ return view.articleCodex == accessory.articleCodex;
21096
+ });
21097
+ if (paletteView) {
21098
+ Object.assign(paletteView, {
21099
+ hasAVC: topCounts.avc > 0,
21100
+ hasAVN: topCounts.avn > 0,
21101
+ hasAVO: topCounts.avo > 0,
21102
+ hasAVS: topCounts.avs > 0,
21103
+ hasAVU: topCounts.avu > 0,
21104
+ hasAVL: topCounts.avl > 0,
21105
+ hasAVR: topCounts.avr > 0
21106
+ });
21107
+ }
21108
+ case 14:
21109
+ case "end":
21110
+ return _context9.stop();
21111
+ }
21112
+ }, _callee3);
21113
+ }));
21114
+ return function (_x8) {
21115
+ return _ref4.apply(this, arguments);
21116
+ };
21117
+ }()));
21118
+ case 42:
21119
+ case "end":
21120
+ return _context10.stop();
21121
+ }
21122
+ }, _callee4, null, [[4, 31, 34, 37], [9, 21, 24, 27]]);
21123
+ }));
21124
+ return _fillMissingDockingPointCounts.apply(this, arguments);
21125
+ }
20628
21126
  var fetchDecisions = function fetchDecisions(set, catalogData, decisionNos) {
20629
21127
  var getUrl = set.api.getIDMDecisions(catalogData.accountGuid, decisionNos);
20630
21128
  if (getUrl.length > 2000) {
@@ -20721,7 +21219,7 @@ var loadDecisionsReferencedByActions = /*#__PURE__*/function () {
20721
21219
  }
20722
21220
  }, _callee);
20723
21221
  }));
20724
- return function loadDecisionsReferencedByActions(_x3, _x4) {
21222
+ return function loadDecisionsReferencedByActions(_x6, _x7) {
20725
21223
  return _ref3.apply(this, arguments);
20726
21224
  };
20727
21225
  }();
@@ -31716,7 +32214,7 @@ var DivaArticle = /*#__PURE__*/function () {
31716
32214
  break;
31717
32215
  }
31718
32216
  _context.next = 4;
31719
- return Promise.resolve().then(function () { return require('./ShelfPlanner-bd6038e1.js'); });
32217
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-a4717a2b.js'); });
31720
32218
  case 4:
31721
32219
  _yield$import = _context.sent;
31722
32220
  ShelfPlanner = _yield$import["default"];
@@ -40310,7 +40808,7 @@ var DivaSet = /*#__PURE__*/function () {
40310
40808
  break;
40311
40809
  }
40312
40810
  _context5.next = 3;
40313
- return Promise.resolve().then(function () { return require('./DoorPlanner-602a86f3.js'); });
40811
+ return Promise.resolve().then(function () { return require('./DoorPlanner-a89651e0.js'); });
40314
40812
  case 3:
40315
40813
  _yield$import = _context5.sent;
40316
40814
  DoorPlanner = _yield$import["default"];
@@ -43696,7 +44194,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
43696
44194
  case 6:
43697
44195
  //falls ein Accessoire verplant wurde wird das Accessoire beim Parent auch hinterlegt
43698
44196
  if (newArticle.relatedToBasketId) {
43699
- if (!newArticle.isDockable) (_set$getArticleByBask2 = set.getArticleByBasketId(newArticle.relatedToBasketId)) === null || _set$getArticleByBask2 === void 0 || _set$getArticleByBask2.addAccessoire(newArticle);
44197
+ // a dockable accessory is registered by the docking callback - one added without docking never gets there
44198
+ if (!newArticle.isDockable || initParams.notDocking) (_set$getArticleByBask2 = set.getArticleByBasketId(newArticle.relatedToBasketId)) === null || _set$getArticleByBask2 === void 0 || _set$getArticleByBask2.addAccessoire(newArticle);
43700
44199
  newArticle.accessoireParentArticle = set.getArticleByBasketId(newArticle.relatedToBasketId);
43701
44200
  }
43702
44201
  //holt die bereits gesetzten Option welche beim neuen Article übernommen werden könnten
@@ -48154,7 +48653,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48154
48653
  break;
48155
48654
  case 3:
48156
48655
  _context12.next = 5;
48157
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-14686c6d.js'); });
48656
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-82aaa131.js'); });
48158
48657
  case 5:
48159
48658
  _yield$import = _context12.sent;
48160
48659
  PfisterWWSHandler = _yield$import["default"];
@@ -48162,7 +48661,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48162
48661
  return _context12.abrupt("break", 27);
48163
48662
  case 9:
48164
48663
  _context12.next = 11;
48165
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-9497b33d.js'); });
48664
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-fcb69b1f.js'); });
48166
48665
  case 11:
48167
48666
  _yield$import2 = _context12.sent;
48168
48667
  LiviqueWWSHandler = _yield$import2["default"];
@@ -48170,7 +48669,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48170
48669
  return _context12.abrupt("break", 27);
48171
48670
  case 15:
48172
48671
  _context12.next = 17;
48173
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-acfb2f40.js'); });
48672
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-a5dccfff.js'); });
48174
48673
  case 17:
48175
48674
  _yield$import3 = _context12.sent;
48176
48675
  SeriousWWSHandler = _yield$import3["default"];
@@ -48178,7 +48677,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48178
48677
  return _context12.abrupt("break", 27);
48179
48678
  case 21:
48180
48679
  _context12.next = 23;
48181
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-bafafa71.js'); });
48680
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-8c3e6f6e.js'); });
48182
48681
  case 23:
48183
48682
  _yield$import4 = _context12.sent;
48184
48683
  StandardWWSHandler = _yield$import4["default"];
@@ -49565,7 +50064,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
49565
50064
  //If we need real time rendering initialize the SignalR and 3D host connection Handler
49566
50065
  bootMark('signalr: chunk import start');
49567
50066
  _context3.next = 3;
49568
- return Promise.resolve().then(function () { return require('./Host3DSignalR-09d9efe0.js'); });
50067
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-d8c102b7.js'); });
49569
50068
  case 3:
49570
50069
  _yield$import = _context3.sent;
49571
50070
  Host3DSignalR = _yield$import["default"];
@@ -51297,7 +51796,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
51297
51796
  break;
51298
51797
  case 8:
51299
51798
  _context5.next = 10;
51300
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-1e17ea12.js'); });
51799
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-6091f80a.js'); });
51301
51800
  case 10:
51302
51801
  _yield$import = _context5.sent;
51303
51802
  DivaStandardPlanner = _yield$import["default"];
@@ -51308,7 +51807,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
51308
51807
  return _context5.abrupt("break", 21);
51309
51808
  case 15:
51310
51809
  _context5.next = 17;
51311
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-69dd68ba.js'); });
51810
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-83122797.js'); });
51312
51811
  case 17:
51313
51812
  _yield$import2 = _context5.sent;
51314
51813
  DivaBoxPlanner = _yield$import2["default"];
@@ -57376,6 +57875,12 @@ var PlannerElementData = /*#__PURE__*/function () {
57376
57875
  set: function set(cornerPos) {
57377
57876
  var _this$planElement$olt3, _this$planElement$olt4;
57378
57877
  if (!this.planElement.plannerData) return;
57878
+ // Mirrors the getter: without an OLF there is no OLF/OLT split. Deriving the center from the OLT size would shift an
57879
+ // element whose OLT is smaller than its canvas (an accessory's margin for its AV lines) by half the difference.
57880
+ if (!this.HasOLFPolygon) {
57881
+ this.WorldPosCorner = cornerPos;
57882
+ return;
57883
+ }
57379
57884
  var w = (_this$planElement$olt3 = this.planElement.oltWidth) !== null && _this$planElement$olt3 !== void 0 ? _this$planElement$olt3 : this.planElement.plannerData.width;
57380
57885
  var d = (_this$planElement$olt4 = this.planElement.oltDepth) !== null && _this$planElement$olt4 !== void 0 ? _this$planElement$olt4 : this.planElement.plannerData.depth;
57381
57886
  var oltCenterDir = new Vector2(w / 2, d / 2);
@@ -75770,6 +76275,7 @@ exports.OptionCatalogData = OptionCatalogData;
75770
76275
  exports.PROPERTY_SCHEMAS = PROPERTY_SCHEMAS;
75771
76276
  exports.PlannerElementData = PlannerElementData;
75772
76277
  exports.Rendering = Rendering;
76278
+ exports.SVGUtils = SVGUtils;
75773
76279
  exports.Vector2 = Vector2;
75774
76280
  exports.Vector3 = Vector3;
75775
76281
  exports.Vector4 = Vector4;