@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
@@ -8,6 +8,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
8
8
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
9
9
  import axios$1 from 'axios';
10
10
  import DivaUtils, { DivaError, md5, nanoid } from '@crystaldesign/diva-utils';
11
+ import { parseXml, serializeXml, removeMask, stretchArticleSvg } from '@crystaldesign/planner-2d-core';
11
12
  import { PriceObjectData, VariantItemData, JsonConfigPriceData, OrderLineData, CompactOrderLineData, GroupsData, Favorites, Favorite, ConfigVariantData, BASKET_UPLOAD_FUNCTION_TYPES, BASKET_UPLOAD_MEDIA_TYPES, OrderSetData, BasketData } from '@crystaldesign/basket-model';
12
13
  import _typeof from '@babel/runtime/helpers/typeof';
13
14
  import { XMLParser } from 'fast-xml-parser';
@@ -17,7 +18,6 @@ import _inherits from '@babel/runtime/helpers/inherits';
17
18
  import _wrapNativeSuper from '@babel/runtime/helpers/wrapNativeSuper';
18
19
  import BasketHandler from '@crystaldesign/basket-handler';
19
20
  import { io } from 'socket.io-client';
20
- import '@crystaldesign/planner-2d-core';
21
21
 
22
22
  (function() {
23
23
  const env = {"STAGE":"production"};
@@ -144,7 +144,7 @@ function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t
144
144
 
145
145
  // Import types from AI service
146
146
 
147
- var LOG$q = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
147
+ var LOG$r = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
148
148
 
149
149
  /**
150
150
  * Deadline for the optional catalog XML preload. Axios has no default timeout, and planner start-up
@@ -210,7 +210,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
210
210
  if (plannerConfig.settings) {
211
211
  this.initalizeWebConfigData(plannerConfig);
212
212
  } else {
213
- LOG$q.error(new DivaError('Fehler beim laden der WebConfig', {
213
+ LOG$r.error(new DivaError('Fehler beim laden der WebConfig', {
214
214
  code: 'WC_0001'
215
215
  }));
216
216
  throw Error('Initalize failed!');
@@ -271,7 +271,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
271
271
  case 0:
272
272
  skip = _args.length > 2 && _args[2] !== undefined ? _args[2] : 0;
273
273
  dontLogError = _args.length > 3 ? _args[3] : undefined;
274
- LOG$q.debug('DivaApiHandler.fetchData ' + url, 'DivaApiHandler, fetchData');
274
+ LOG$r.debug('DivaApiHandler.fetchData ' + url, 'DivaApiHandler, fetchData');
275
275
  if (init) {
276
276
  _context.next = 5;
277
277
  break;
@@ -312,7 +312,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
312
312
  netBytes = typeof data === 'string' ? data.length : Number((_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers['content-length']) || undefined;
313
313
  }
314
314
  if (data !== null && data !== void 0 && data.Error) {
315
- if (dontLogError) LOG$q.warn(data.Error + ' ' + url);else LOG$q.error(new DivaError(data.Error, {
315
+ if (dontLogError) LOG$r.warn(data.Error + ' ' + url);else LOG$r.error(new DivaError(data.Error, {
316
316
  code: 'WC_0001',
317
317
  custom: {
318
318
  url: url
@@ -434,7 +434,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
434
434
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
435
435
  while (1) switch (_context2.prev = _context2.next) {
436
436
  case 0:
437
- LOG$q.debug('getDataWithoutCache: ', {
437
+ LOG$r.debug('getDataWithoutCache: ', {
438
438
  queryString: queryString,
439
439
  init: init,
440
440
  useWebServiceApi: useWebServiceApi
@@ -512,7 +512,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
512
512
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
513
513
  while (1) switch (_context3.prev = _context3.next) {
514
514
  case 0:
515
- LOG$q.debug('getDataCache: ', {
515
+ LOG$r.debug('getDataCache: ', {
516
516
  queryString: queryString,
517
517
  cacheMD5: cacheMD5,
518
518
  accountSessionGuid: accountSessionGuid,
@@ -533,14 +533,14 @@ var DivaApiHandler = /*#__PURE__*/function () {
533
533
  _context3.next = 9;
534
534
  break;
535
535
  }
536
- LOG$q.debug('getDataFromInternalCache: ' + queryString);
536
+ LOG$r.debug('getDataFromInternalCache: ' + queryString);
537
537
  return _context3.abrupt("return", cacheHit);
538
538
  case 9:
539
539
  if (!(cacheMD5 && this.jsonDataCache.get(cacheMD5) && !((_this$divaWebConfigDa2 = this.divaWebConfigData) !== null && _this$divaWebConfigDa2 !== void 0 && _this$divaWebConfigDa2.addOrganizationIdToCacheKey))) {
540
540
  _context3.next = 12;
541
541
  break;
542
542
  }
543
- LOG$q.debug('getDataFromInternalCache: ' + queryString);
543
+ LOG$r.debug('getDataFromInternalCache: ' + queryString);
544
544
  return _context3.abrupt("return", this.jsonDataCache.get(cacheMD5));
545
545
  case 12:
546
546
  if (!addSession) {
@@ -590,7 +590,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
590
590
  // SHOULD have been authenticated against an account, the planner ends up using a
591
591
  // visitor sessionGuid (cached per organization in DataStore). Surface it so we
592
592
  // can spot regressions instead of silently sending the wrong GUID.
593
- LOG$q.warn('[SESSION-GUID][API] visitor fallback used for api2 call (no accountSessionGuid passed)', {
593
+ LOG$r.warn('[SESSION-GUID][API] visitor fallback used for api2 call (no accountSessionGuid passed)', {
594
594
  callTag: "api#".concat(this.instanceId, "/call#").concat(this.apiCallCount),
595
595
  queryString: queryString,
596
596
  organizationId: this.OrganizationId
@@ -612,7 +612,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
612
612
  this.jsonDataCache.set(myQS, result);
613
613
  if (cacheMD5 && !((_this$divaWebConfigDa3 = this.divaWebConfigData) !== null && _this$divaWebConfigDa3 !== void 0 && _this$divaWebConfigDa3.addOrganizationIdToCacheKey)) this.jsonDataCache.set(cacheMD5, result);
614
614
  }
615
- LOG$q.debug('getDataFromApi: ' + queryString);
615
+ LOG$r.debug('getDataFromApi: ' + queryString);
616
616
  return _context3.abrupt("return", result);
617
617
  case 41:
618
618
  case "end":
@@ -648,7 +648,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
648
648
  case 5:
649
649
  _context4.prev = 5;
650
650
  _context4.t0 = _context4["catch"](1);
651
- LOG$q.error(new DivaError('could not create product in Configurator', {
651
+ LOG$r.error(new DivaError('could not create product in Configurator', {
652
652
  cause: _context4.t0
653
653
  }));
654
654
  return _context4.abrupt("return", false);
@@ -1633,7 +1633,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1633
1633
  status = _context12.t0 === null || _context12.t0 === void 0 || (_e$response3 = _context12.t0.response) === null || _e$response3 === void 0 ? void 0 : _e$response3.status;
1634
1634
  body = _context12.t0 === null || _context12.t0 === void 0 || (_e$response4 = _context12.t0.response) === null || _e$response4 === void 0 ? void 0 : _e$response4.data;
1635
1635
  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;
1636
- LOG$q.error(new Error("Failed to create lead key for email ".concat(email, ": ").concat(apiMessage)));
1636
+ LOG$r.error(new Error("Failed to create lead key for email ".concat(email, ": ").concat(apiMessage)));
1637
1637
  throw new DivaError(apiMessage || 'Failed to create lead key', {
1638
1638
  code: 'LEAD_KEY_REQUEST_FAILED',
1639
1639
  custom: {
@@ -1729,7 +1729,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1729
1729
  case 9:
1730
1730
  _context14.prev = 9;
1731
1731
  _context14.t0 = _context14["catch"](4);
1732
- LOG$q.error(new DivaError('Error Connecting to Support-Service-LivePlanner', {
1732
+ LOG$r.error(new DivaError('Error Connecting to Support-Service-LivePlanner', {
1733
1733
  cause: _context14.t0
1734
1734
  }));
1735
1735
  case 12:
@@ -1776,7 +1776,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1776
1776
  case 10:
1777
1777
  _context15.prev = 10;
1778
1778
  _context15.t0 = _context15["catch"](3);
1779
- LOG$q.error({
1779
+ LOG$r.error({
1780
1780
  message: 'Could not fetch dimension',
1781
1781
  name: 'get dimension error'
1782
1782
  });
@@ -1834,7 +1834,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1834
1834
  case 9:
1835
1835
  _context16.prev = 9;
1836
1836
  _context16.t0 = _context16["catch"](3);
1837
- LOG$q.error({
1837
+ LOG$r.error({
1838
1838
  message: 'Could not fetch catalogXml',
1839
1839
  name: 'get catalogXml error'
1840
1840
  });
@@ -1913,7 +1913,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
1913
1913
  case 14:
1914
1914
  _context17.prev = 14;
1915
1915
  _context17.t0 = _context17["catch"](6);
1916
- LOG$q.error(new DivaError('Error Connecting to Report Service', {
1916
+ LOG$r.error(new DivaError('Error Connecting to Report Service', {
1917
1917
  cause: _context17.t0
1918
1918
  }));
1919
1919
  case 17:
@@ -2436,6 +2436,22 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
2436
2436
  }
2437
2437
  return false;
2438
2438
  }
2439
+
2440
+ /**
2441
+ * Overwrites the docking point counts of the top svg. For IDM articles whose detail info delivered no
2442
+ * counts, so their svg was counted instead - without counts an article is not dockable (see isDockable).
2443
+ */
2444
+ }, {
2445
+ key: "applyDockingPointCounts",
2446
+ value: function applyDockingPointCounts(counts) {
2447
+ this.catPlanArt.topAVC = counts.avc;
2448
+ this.catPlanArt.topAVN = counts.avn;
2449
+ this.catPlanArt.topAVO = counts.avo;
2450
+ this.catPlanArt.topAVS = counts.avs;
2451
+ this.catPlanArt.topAVU = counts.avu;
2452
+ this.catPlanArt.topHasAVL = counts.avl > 0;
2453
+ this.catPlanArt.topHasAVR = counts.avr > 0;
2454
+ }
2439
2455
  }, {
2440
2456
  key: "filterType",
2441
2457
  get: function get() {
@@ -2447,7 +2463,7 @@ var CatalogPlannerArticleData = /*#__PURE__*/function () {
2447
2463
  }]);
2448
2464
  }();
2449
2465
 
2450
- var LOG$p = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
2466
+ var LOG$q = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
2451
2467
  var OptionCatalogData = /*#__PURE__*/function () {
2452
2468
  function OptionCatalogData(opt, catalogData) {
2453
2469
  var _this$opt$property;
@@ -2878,7 +2894,7 @@ var setOptionsProperties = function setOptionsProperties(catalogData, opt, prope
2878
2894
  case 'IsArtName':
2879
2895
  break;
2880
2896
  default:
2881
- LOG$p.debug('implement mapping for these props for options: ' + prop.Codex);
2897
+ LOG$q.debug('implement mapping for these props for options: ' + prop.Codex);
2882
2898
  break;
2883
2899
  }
2884
2900
  }
@@ -16673,7 +16689,7 @@ var ralClassics = [{
16673
16689
  rgb: '#7E8182'
16674
16690
  }];
16675
16691
 
16676
- var LOG$o = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
16692
+ var LOG$p = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
16677
16693
  var OptionValueCatalogData = /*#__PURE__*/function () {
16678
16694
  function OptionValueCatalogData(opv, catalogData) {
16679
16695
  var _this = this,
@@ -17165,7 +17181,7 @@ var setOptionValueProperties = function setOptionValueProperties(catalogData, op
17165
17181
  break;
17166
17182
  default:
17167
17183
  if (key.includes('__')) break;
17168
- LOG$o.debug('implement mapping for these props for optionValue: ' + prop.Codex);
17184
+ LOG$p.debug('implement mapping for these props for optionValue: ' + prop.Codex);
17169
17185
  var values_locales = [];
17170
17186
  if (prop.Value_locales) {
17171
17187
  var _prop$Value_locales;
@@ -17191,9 +17207,9 @@ var setOptionValueProperties = function setOptionValueProperties(catalogData, op
17191
17207
  return metaDatas;
17192
17208
  };
17193
17209
 
17194
- 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; } } }; }
17195
- 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; } }
17196
- 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; }
17210
+ 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; } } }; }
17211
+ 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; } }
17212
+ 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; }
17197
17213
  //kaufmännischer Artikel
17198
17214
  var CatalogArticleData = /*#__PURE__*/function () {
17199
17215
  function CatalogArticleData(catalogArticle, catalogData) {
@@ -17979,7 +17995,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
17979
17995
  value: function getOptionValueFromOption(opt, opv) {
17980
17996
  if (this._catalogArticle.articleOptions[opt] && this._catalogArticle.articleOptions[opt].hasOPG) {
17981
17997
  var myOPGs = this._catalogArticle.articleOptions[opt].articleOptionValues;
17982
- var _iterator = _createForOfIteratorHelper$l(myOPGs),
17998
+ var _iterator = _createForOfIteratorHelper$m(myOPGs),
17983
17999
  _step;
17984
18000
  try {
17985
18001
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -18046,7 +18062,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
18046
18062
  }]);
18047
18063
  }();
18048
18064
 
18049
- var LOG$n = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
18065
+ var LOG$o = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
18050
18066
  function initDivaCatalogData(json, orderSet, api) {
18051
18067
  var _json$MainCategory;
18052
18068
  var catalogData = {
@@ -18105,7 +18121,7 @@ function initDivaArticles(articleJson, plannerElementsJson, catalogData) {
18105
18121
  }
18106
18122
  } else {
18107
18123
  DivaUtils.endSpanOfApm('Catalog initialize');
18108
- LOG$n.error(new DivaError('Catalog ' + catalogData.catalogName + ' not listed', {
18124
+ LOG$o.error(new DivaError('Catalog ' + catalogData.catalogName + ' not listed', {
18109
18125
  code: 'WC_0002'
18110
18126
  }));
18111
18127
  throw new Error('Articles of Catalog: ' + catalogData.catalogCodex + ' are empty');
@@ -19128,9 +19144,9 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
19128
19144
  }]);
19129
19145
  }();
19130
19146
 
19131
- 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; } } }; }
19132
- 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; } }
19133
- 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; }
19147
+ 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; } } }; }
19148
+ 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; } }
19149
+ 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; }
19134
19150
  var ArticleOptionData = /*#__PURE__*/function () {
19135
19151
  function ArticleOptionData(opt, catalogData) {
19136
19152
  var _this$opt$property;
@@ -19230,7 +19246,7 @@ var ArticleOptionData = /*#__PURE__*/function () {
19230
19246
  }, {
19231
19247
  key: "getOpvByOcd",
19232
19248
  value: function getOpvByOcd(codex) {
19233
- var _iterator = _createForOfIteratorHelper$k(this.opt.articleOptionValues),
19249
+ var _iterator = _createForOfIteratorHelper$l(this.opt.articleOptionValues),
19234
19250
  _step;
19235
19251
  try {
19236
19252
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -19571,7 +19587,7 @@ var ArticleOptionData = /*#__PURE__*/function () {
19571
19587
  }]);
19572
19588
  }();
19573
19589
 
19574
- var LOG$m = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
19590
+ var LOG$n = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
19575
19591
  function addSupplierColors(set, catalogArticleData, allOPVsOfOPT, supplierColors, catalog, newOPT, rule) {
19576
19592
  var lang = catalog.api.getLanguage();
19577
19593
  // the palette group shows "<GroupName> (<OPG name>)", so both carry the same translated label
@@ -19778,12 +19794,12 @@ function loadArticleOptions(json, catalogArticleData, set) {
19778
19794
  var myOPV = new ArticleOptionValueData(getArticleOptionValueType(set, tmpOPV.Codex, tmpOPV, catOPV, catalogArticleData, true, newOPG, multiselectOptions), set.CatalogData);
19779
19795
  allOPVsOfOPG.set(tmpOPV.Codex, myOPV);
19780
19796
  } else {
19781
- LOG$m.error(new Error('OPV not found: ' + tmpOPV.Codex));
19797
+ LOG$n.error(new Error('OPV not found: ' + tmpOPV.Codex));
19782
19798
  }
19783
19799
  }
19784
19800
  newOPG.initOPVsInOPG(allOPVsOfOPG);
19785
19801
  } else {
19786
- LOG$m.error(new Error('OPG not found: ' + tmpOPG.Codex));
19802
+ LOG$n.error(new Error('OPG not found: ' + tmpOPG.Codex));
19787
19803
  }
19788
19804
  }
19789
19805
  if ((_myOPT$OPV = myOPT.OPV) !== null && _myOPT$OPV !== void 0 && _myOPT$OPV.length) {
@@ -19799,11 +19815,11 @@ function loadArticleOptions(json, catalogArticleData, set) {
19799
19815
  var _myOPV = new ArticleOptionValueData(getArticleOptionValueType(set, _tmpOPG.Codex, _tmpOPG, _catOPV, catalogArticleData, true, _newOPG, multiselectOptions), set.CatalogData);
19800
19816
  _allOPVsOfOPG.set(_tmpOPG.Codex, _myOPV);
19801
19817
  } else {
19802
- LOG$m.error(new Error('OPV not found: ' + _tmpOPG.Codex));
19818
+ LOG$n.error(new Error('OPV not found: ' + _tmpOPG.Codex));
19803
19819
  }
19804
19820
  _newOPG.initOPVsInOPG(_allOPVsOfOPG);
19805
19821
  } else {
19806
- LOG$m.error(new Error('OPG not found: ' + _tmpOPG.Codex));
19822
+ LOG$n.error(new Error('OPG not found: ' + _tmpOPG.Codex));
19807
19823
  }
19808
19824
  }
19809
19825
  }
@@ -19815,7 +19831,7 @@ function loadArticleOptions(json, catalogArticleData, set) {
19815
19831
  var _myOPV2 = new ArticleOptionValueData(getArticleOptionValueType(set, _tmpOPV.Codex, _tmpOPV, _catOPV2, catalogArticleData, true, newOPT, multiselectOptions), set.CatalogData);
19816
19832
  allOPVsOfOPT.set(_tmpOPV.Codex, _myOPV2);
19817
19833
  } else {
19818
- LOG$m.error(new Error('OPV not found: ' + _tmpOPV.Codex));
19834
+ LOG$n.error(new Error('OPV not found: ' + _tmpOPV.Codex));
19819
19835
  }
19820
19836
  }
19821
19837
  }
@@ -19903,12 +19919,12 @@ function initDecisions(catalog, catalogArticleData, decisionRefs) {
19903
19919
  articleCodex: catalogArticle.articleCodex
19904
19920
  };
19905
19921
  if (myDecision.Type == '0') {
19906
- LOG$m.error(new DivaError(text, {
19922
+ LOG$n.error(new DivaError(text, {
19907
19923
  code: 'WC_0011',
19908
19924
  custom: stack
19909
19925
  }));
19910
19926
  } else {
19911
- LOG$m.warn(text, undefined, stack);
19927
+ LOG$n.warn(text, undefined, stack);
19912
19928
  }
19913
19929
  myDecision.Options.splice(m, 1);
19914
19930
  m--;
@@ -20064,6 +20080,313 @@ function getArticleOptionValueType(set, codex, jsonOPV, catalogOPV, myArticle, i
20064
20080
  return opv;
20065
20081
  }
20066
20082
 
20083
+ 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; } } }; }
20084
+ 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; } }
20085
+ 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; }
20086
+ var LOG$m = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
20087
+ var COUNT_KEY_BY_DOCKING_TYPE = {
20088
+ AVC: 'avc',
20089
+ AVN: 'avn',
20090
+ AVO: 'avo',
20091
+ AVR: 'avr',
20092
+ AVS: 'avs',
20093
+ AVU: 'avu',
20094
+ AVL: 'avl'
20095
+ };
20096
+ var SVGUtils = /*#__PURE__*/function () {
20097
+ function SVGUtils() {
20098
+ _classCallCheck(this, SVGUtils);
20099
+ }
20100
+ /**
20101
+ * This function removes all VIF and OLF information from the SVG. This is used for displaying only the OLT information
20102
+ * @param content The svg with OLF and OLT
20103
+ * @returns SVG with only OLT information
20104
+ */
20105
+ return _createClass(SVGUtils, [{
20106
+ key: "removeOLFFromSvg",
20107
+ value: function removeOLFFromSvg(content) {
20108
+ var xmlDocument = parseXml(content);
20109
+ var vifObjs = xmlDocument.evaluate("//*[starts-with(@id,'VIF')]", xmlDocument, null, 7, null);
20110
+ if (vifObjs.snapshotLength > 0) {
20111
+ for (var i = 0; i < vifObjs.snapshotLength; i++) {
20112
+ var _parentElement;
20113
+ (_parentElement = vifObjs.snapshotItem(i).parentElement) === null || _parentElement === void 0 || _parentElement.removeChild(vifObjs.snapshotItem(i));
20114
+ }
20115
+ }
20116
+ var olfObjs = xmlDocument.evaluate("//*[starts-with(@id,'OLF')]", xmlDocument, null, 7, null);
20117
+ if (olfObjs.snapshotLength > 0) {
20118
+ for (var i = 0; i < olfObjs.snapshotLength; i++) {
20119
+ var _parentElement2;
20120
+ (_parentElement2 = olfObjs.snapshotItem(i).parentElement) === null || _parentElement2 === void 0 || _parentElement2.removeChild(olfObjs.snapshotItem(i));
20121
+ }
20122
+ }
20123
+ return serializeXml(xmlDocument);
20124
+ }
20125
+
20126
+ /**
20127
+ * This function returns the DPs of an svg
20128
+ * @param content The svg with OLF and OLT
20129
+ * @returns SVG with only OLT information
20130
+ */
20131
+ }, {
20132
+ key: "getDPsInSVG",
20133
+ value: function getDPsInSVG(content) {
20134
+ var dockingpointsSvgLine = [];
20135
+ var xmlDocument = parseXml(content);
20136
+ var dpObjs = xmlDocument.evaluate("//*[starts-with(@id,'AV')]", xmlDocument, null, 7, null);
20137
+ if (dpObjs.snapshotLength > 0) {
20138
+ for (var i = 0; i < dpObjs.snapshotLength; i++) {
20139
+ var obj = dpObjs.snapshotItem(i);
20140
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'line') {
20141
+ dockingpointsSvgLine.push({
20142
+ x1: Number(obj.getAttribute('x1')),
20143
+ y1: Number(obj.getAttribute('y1')),
20144
+ x2: Number(obj.getAttribute('x2')),
20145
+ y2: Number(obj.getAttribute('y2')),
20146
+ dockingName: obj.getAttribute('id'),
20147
+ dockingType: obj.getAttribute('id').substring(0, 3)
20148
+ });
20149
+ } else {
20150
+ throw new Error('nodename type: ' + obj.nodeName + ' not implemented');
20151
+ }
20152
+ }
20153
+ }
20154
+ dockingpointsSvgLine.sort(function (a, b) {
20155
+ if (a.dockingType === 'AVL') return -1;
20156
+ if (a.dockingType === 'AVR' && ['AVR', 'AVC', 'AVU', 'AVO', 'AVS', 'AVN'].includes(b.dockingType)) return -1;
20157
+ return 0;
20158
+ });
20159
+ return dockingpointsSvgLine;
20160
+ }
20161
+
20162
+ /**
20163
+ * Counts the docking points of an svg per connector type - the numbers an IDM detail info carries
20164
+ * when the media service analyzed the upload. Throws like getDPsInSVG on an AV element that is no line.
20165
+ * @param content The svg
20166
+ * @returns How many AV lines of each type the svg draws
20167
+ */
20168
+ }, {
20169
+ key: "countDockingPoints",
20170
+ value: function countDockingPoints(content) {
20171
+ var counts = {
20172
+ avc: 0,
20173
+ avn: 0,
20174
+ avo: 0,
20175
+ avr: 0,
20176
+ avs: 0,
20177
+ avu: 0,
20178
+ avl: 0
20179
+ };
20180
+ var _iterator = _createForOfIteratorHelper$k(this.getDPsInSVG(content)),
20181
+ _step;
20182
+ try {
20183
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
20184
+ var dockingType = _step.value.dockingType;
20185
+ // getDPsInSVG takes every id starting with 'AV', so an id like 'AVATAR' yields a type without a count
20186
+ var key = COUNT_KEY_BY_DOCKING_TYPE[dockingType];
20187
+ if (key) counts[key]++;
20188
+ }
20189
+ } catch (err) {
20190
+ _iterator.e(err);
20191
+ } finally {
20192
+ _iterator.f();
20193
+ }
20194
+ return counts;
20195
+ }
20196
+
20197
+ /**
20198
+ * This function returns the DPs of an svg
20199
+ * @param content The svg with OLF and OLT
20200
+ * @returns SVG with only OLT information
20201
+ */
20202
+ }, {
20203
+ key: "getPointOfPoligonById",
20204
+ value: function getPointOfPoligonById(content, id) {
20205
+ var points = [];
20206
+ var xmlDocument = parseXml(content);
20207
+ var dpObjs = xmlDocument.evaluate("//*[starts-with(@id,'" + id + "')]", xmlDocument, null, 7, null);
20208
+ if (dpObjs.snapshotLength > 1 || dpObjs.snapshotLength == 0) return undefined;
20209
+ for (var i = 0; i < dpObjs.snapshotLength; i++) {
20210
+ var obj = dpObjs.snapshotItem(i);
20211
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'polygon') {
20212
+ var pointsAsString = obj.getAttribute('points');
20213
+ if (pointsAsString) {
20214
+ var pointsFromString = pointsAsString.split(' ');
20215
+ for (var j = 0; j < pointsFromString.length; j++) {
20216
+ var xandY = pointsFromString[j].split(',');
20217
+ if (xandY.length !== 2) continue;
20218
+ points.push(new Vector2(Number(xandY[0]), Number(xandY[1])));
20219
+ }
20220
+ } else {
20221
+ return undefined;
20222
+ }
20223
+ }
20224
+ }
20225
+ return points;
20226
+ }
20227
+ }, {
20228
+ key: "getBoundingBoxOfPoints",
20229
+ value: function getBoundingBoxOfPoints(points) {
20230
+ var xArr = points.map(function (c) {
20231
+ return c.x;
20232
+ });
20233
+ var yArr = points.map(function (c) {
20234
+ return c.y;
20235
+ });
20236
+ var minX = Math.min.apply(Math, _toConsumableArray(xArr));
20237
+ var maxX = Math.max.apply(Math, _toConsumableArray(xArr));
20238
+ var minY = Math.min.apply(Math, _toConsumableArray(yArr));
20239
+ var maxY = Math.max.apply(Math, _toConsumableArray(yArr));
20240
+ var width = maxX - minX;
20241
+ var height = maxY - minY;
20242
+ return {
20243
+ width: width,
20244
+ height: height,
20245
+ minX: minX,
20246
+ minY: minY
20247
+ };
20248
+ }
20249
+
20250
+ /**
20251
+ * Returns OLF geometry (minX, minY, width, height) from SVG - supports rect and polygon.
20252
+ * Iterates through matches to find first rect/polygon (handles Illustrator group wrappers).
20253
+ */
20254
+ }, {
20255
+ key: "getOLFGeometryFromSvg",
20256
+ value: function getOLFGeometryFromSvg(content) {
20257
+ var xmlDocument = parseXml(content);
20258
+ var olfObjs = xmlDocument.evaluate("//*[starts-with(@id,'OLF')]", xmlDocument, null, 7, null);
20259
+ for (var i = 0; i < olfObjs.snapshotLength; i++) {
20260
+ var obj = olfObjs.snapshotItem(i);
20261
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'rect') {
20262
+ var _obj$getAttribute, _obj$getAttribute2, _obj$getAttribute3, _obj$getAttribute4;
20263
+ var x = parseFloat((_obj$getAttribute = obj.getAttribute('x')) !== null && _obj$getAttribute !== void 0 ? _obj$getAttribute : '0');
20264
+ var y = parseFloat((_obj$getAttribute2 = obj.getAttribute('y')) !== null && _obj$getAttribute2 !== void 0 ? _obj$getAttribute2 : '0');
20265
+ var width = parseFloat((_obj$getAttribute3 = obj.getAttribute('width')) !== null && _obj$getAttribute3 !== void 0 ? _obj$getAttribute3 : '0');
20266
+ var height = parseFloat((_obj$getAttribute4 = obj.getAttribute('height')) !== null && _obj$getAttribute4 !== void 0 ? _obj$getAttribute4 : '0');
20267
+ return {
20268
+ minX: x,
20269
+ minY: y,
20270
+ width: width,
20271
+ height: height
20272
+ };
20273
+ }
20274
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'polygon') {
20275
+ var pts = obj.getAttribute('points');
20276
+ if (pts) {
20277
+ var points = pts.split(/\s+/).reduce(function (acc, p) {
20278
+ var _p$split = p.split(','),
20279
+ _p$split2 = _slicedToArray(_p$split, 2),
20280
+ x = _p$split2[0],
20281
+ y = _p$split2[1];
20282
+ if (x != null && y != null) acc.push(new Vector2(Number(x), Number(y)));
20283
+ return acc;
20284
+ }, []);
20285
+ if (points.length) {
20286
+ var bbox = this.getBoundingBoxOfPoints(points);
20287
+ return {
20288
+ minX: bbox.minX,
20289
+ minY: bbox.minY,
20290
+ width: bbox.width,
20291
+ height: bbox.height
20292
+ };
20293
+ }
20294
+ }
20295
+ }
20296
+ }
20297
+ return undefined;
20298
+ }
20299
+
20300
+ /**
20301
+ * Returns OLT geometry (x, y, width, height) from SVG attributes - untransformed coords.
20302
+ * Iterates through matches to find first rect/polygon (handles Illustrator group wrappers).
20303
+ */
20304
+ }, {
20305
+ key: "getOLTGeometryFromSvg",
20306
+ value: function getOLTGeometryFromSvg(content) {
20307
+ var xmlDocument = parseXml(content);
20308
+ var oltObjs = xmlDocument.evaluate("//*[starts-with(@id,'OLT')]", xmlDocument, null, 7, null);
20309
+ for (var i = 0; i < oltObjs.snapshotLength; i++) {
20310
+ var obj = oltObjs.snapshotItem(i);
20311
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'rect') {
20312
+ var _obj$getAttribute5, _obj$getAttribute6, _obj$getAttribute7, _obj$getAttribute8;
20313
+ var x = parseFloat((_obj$getAttribute5 = obj.getAttribute('x')) !== null && _obj$getAttribute5 !== void 0 ? _obj$getAttribute5 : '0');
20314
+ var y = parseFloat((_obj$getAttribute6 = obj.getAttribute('y')) !== null && _obj$getAttribute6 !== void 0 ? _obj$getAttribute6 : '0');
20315
+ var width = parseFloat((_obj$getAttribute7 = obj.getAttribute('width')) !== null && _obj$getAttribute7 !== void 0 ? _obj$getAttribute7 : '0');
20316
+ var height = parseFloat((_obj$getAttribute8 = obj.getAttribute('height')) !== null && _obj$getAttribute8 !== void 0 ? _obj$getAttribute8 : '0');
20317
+ return {
20318
+ x: x,
20319
+ y: y,
20320
+ width: width,
20321
+ height: height
20322
+ };
20323
+ }
20324
+ if ((obj === null || obj === void 0 ? void 0 : obj.nodeName) === 'polygon') {
20325
+ var pts = obj.getAttribute('points');
20326
+ if (pts) {
20327
+ var points = pts.split(/\s+/).reduce(function (acc, p) {
20328
+ var _p$split3 = p.split(','),
20329
+ _p$split4 = _slicedToArray(_p$split3, 2),
20330
+ x = _p$split4[0],
20331
+ y = _p$split4[1];
20332
+ if (x != null && y != null) acc.push(new Vector2(Number(x), Number(y)));
20333
+ return acc;
20334
+ }, []);
20335
+ if (points.length) {
20336
+ var bbox = this.getBoundingBoxOfPoints(points);
20337
+ return {
20338
+ x: bbox.minX,
20339
+ y: bbox.minY,
20340
+ width: bbox.width,
20341
+ height: bbox.height
20342
+ };
20343
+ }
20344
+ }
20345
+ }
20346
+ }
20347
+ return undefined;
20348
+ }
20349
+
20350
+ /**
20351
+ * This function looks if the svg has a Mask HTML element. If so it removes all masks from SVG
20352
+ * @param content
20353
+ */
20354
+ }, {
20355
+ key: "removeMaskFromSvg",
20356
+ value: function removeMaskFromSvg(content) {
20357
+ return removeMask(content);
20358
+ }
20359
+
20360
+ /**
20361
+ * Stretches the SVG to the target OLT size and passes the result to the callback.
20362
+ * @param svgSourceUrl optional URL / path of the loaded SVG for diagnostics
20363
+ */
20364
+ }, {
20365
+ key: "ccCheckStretchAreas",
20366
+ value: function ccCheckStretchAreas(content, newWidthCM, newHeightCM, useglobalSvgScale, svgMinBorderXVal, svgMinBorderYVal, callback, svgSourceUrl) {
20367
+ var result = stretchArticleSvg(content, newWidthCM, newHeightCM, {
20368
+ useGlobalScale: useglobalSvgScale,
20369
+ minBorderX: svgMinBorderXVal,
20370
+ minBorderY: svgMinBorderYVal
20371
+ });
20372
+ var _iterator2 = _createForOfIteratorHelper$k(result.warnings),
20373
+ _step2;
20374
+ try {
20375
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
20376
+ var warning = _step2.value;
20377
+ LOG$m.warn('[SVGUtils] ccCheckStretchAreas: ' + warning + (svgSourceUrl ? ' (svg: ' + svgSourceUrl + ')' : ''));
20378
+ }
20379
+ } catch (err) {
20380
+ _iterator2.e(err);
20381
+ } finally {
20382
+ _iterator2.f();
20383
+ }
20384
+ callback(result.svg);
20385
+ return result.sizes;
20386
+ }
20387
+ }]);
20388
+ }();
20389
+
20067
20390
  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; }
20068
20391
  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(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; }
20069
20392
  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; } } }; }
@@ -20133,6 +20456,9 @@ function _loadMoreFromIDMArticles() {
20133
20456
  })), undefined, undefined, 'enricher');
20134
20457
  case 3:
20135
20458
  items = _context8.sent;
20459
+ _context8.next = 6;
20460
+ return fillMissingDockingPointCounts(items, set, catalogData);
20461
+ case 6:
20136
20462
  _loop3 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop3() {
20137
20463
  var catalogArticleData, item;
20138
20464
  return _regeneratorRuntime.wrap(function _loop3$(_context4) {
@@ -20159,17 +20485,17 @@ function _loadMoreFromIDMArticles() {
20159
20485
  }, _loop3);
20160
20486
  });
20161
20487
  i = 0;
20162
- case 6:
20488
+ case 8:
20163
20489
  if (!(i < catalogArticleDatas.length)) {
20164
- _context8.next = 11;
20490
+ _context8.next = 13;
20165
20491
  break;
20166
20492
  }
20167
- return _context8.delegateYield(_loop3(), "t0", 8);
20168
- case 8:
20493
+ return _context8.delegateYield(_loop3(), "t0", 10);
20494
+ case 10:
20169
20495
  i++;
20170
- _context8.next = 6;
20496
+ _context8.next = 8;
20171
20497
  break;
20172
- case 11:
20498
+ case 13:
20173
20499
  toLoadDecisionIds = getToLoadDecisionIds(catalogArticleDatas, catalogData);
20174
20500
  toLoadPFGroups = getPriceFeatureGroups(catalogArticleDatas, catalogData);
20175
20501
  toLoadFeatureClassRefNo = _toConsumableArray(new Set(catalogArticleDatas.filter(function (a) {
@@ -20178,9 +20504,9 @@ function _loadMoreFromIDMArticles() {
20178
20504
  return a.featureClassRefNo;
20179
20505
  })));
20180
20506
  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];
20181
- _context8.next = 17;
20507
+ _context8.next = 19;
20182
20508
  return Promise.all(promises);
20183
- case 17:
20509
+ case 19:
20184
20510
  _yield$Promise$all = _context8.sent;
20185
20511
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
20186
20512
  featureClasses = _yield$Promise$all2[0];
@@ -20192,7 +20518,7 @@ function _loadMoreFromIDMArticles() {
20192
20518
  }
20193
20519
  }
20194
20520
  if (!(toLoadDecisionIds.length !== 0 && toLoadDecisionIds.length != (decisions === null || decisions === void 0 ? void 0 : decisions.length))) {
20195
- _context8.next = 27;
20521
+ _context8.next = 29;
20196
20522
  break;
20197
20523
  }
20198
20524
  loadedIds = new Set((_decisions$map = decisions === null || decisions === void 0 ? void 0 : decisions.map(function (d) {
@@ -20202,17 +20528,17 @@ function _loadMoreFromIDMArticles() {
20202
20528
  return !loadedIds.has(id);
20203
20529
  });
20204
20530
  throw new Error("loading decisions failed \u2013 missing: [".concat(missingIds.join(', '), "]"));
20205
- case 27:
20206
- _context8.next = 29;
20207
- return loadDecisionsReferencedByActions(set, catalogData);
20208
20531
  case 29:
20532
+ _context8.next = 31;
20533
+ return loadDecisionsReferencedByActions(set, catalogData);
20534
+ case 31:
20209
20535
  if (priceFeatureGroups) {
20210
20536
  for (_i6 = 0; _i6 < priceFeatureGroups.length; _i6++) {
20211
20537
  catalogData.loadedPriceFeaturegroups.push(initializePriceFeatureGroups(priceFeatureGroups[_i6], catalogData.idmOptionGroups));
20212
20538
  }
20213
20539
  }
20214
20540
  _iterator6 = _createForOfIteratorHelper$j(toLoadPFGroups);
20215
- _context8.prev = 31;
20541
+ _context8.prev = 33;
20216
20542
  _loop7 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop7() {
20217
20543
  var prfgNo, askedBy;
20218
20544
  return _regeneratorRuntime.wrap(function _loop7$(_context5) {
@@ -20241,33 +20567,33 @@ function _loadMoreFromIDMArticles() {
20241
20567
  }, _loop7);
20242
20568
  });
20243
20569
  _iterator6.s();
20244
- case 34:
20570
+ case 36:
20245
20571
  if ((_step6 = _iterator6.n()).done) {
20246
- _context8.next = 40;
20572
+ _context8.next = 42;
20247
20573
  break;
20248
20574
  }
20249
- return _context8.delegateYield(_loop7(), "t1", 36);
20250
- case 36:
20575
+ return _context8.delegateYield(_loop7(), "t1", 38);
20576
+ case 38:
20251
20577
  if (!_context8.t1) {
20252
- _context8.next = 38;
20578
+ _context8.next = 40;
20253
20579
  break;
20254
20580
  }
20255
- return _context8.abrupt("continue", 38);
20256
- case 38:
20257
- _context8.next = 34;
20258
- break;
20581
+ return _context8.abrupt("continue", 40);
20259
20582
  case 40:
20260
- _context8.next = 45;
20583
+ _context8.next = 36;
20261
20584
  break;
20262
20585
  case 42:
20263
- _context8.prev = 42;
20264
- _context8.t2 = _context8["catch"](31);
20586
+ _context8.next = 47;
20587
+ break;
20588
+ case 44:
20589
+ _context8.prev = 44;
20590
+ _context8.t2 = _context8["catch"](33);
20265
20591
  _iterator6.e(_context8.t2);
20266
- case 45:
20267
- _context8.prev = 45;
20592
+ case 47:
20593
+ _context8.prev = 47;
20268
20594
  _iterator6.f();
20269
- return _context8.finish(45);
20270
- case 48:
20595
+ return _context8.finish(47);
20596
+ case 50:
20271
20597
  for (_i7 = 0; _i7 < catalogArticleDatas.length; _i7++) {
20272
20598
  catalogArticleData = catalogArticleDatas[_i7];
20273
20599
  catalogArticleData.articleIDMDecisions = sortDecisions(catalogData.getDecisionsByNo(_toConsumableArray(new Set([].concat(_toConsumableArray(catalogData.globalDecisions.map(function (g) {
@@ -20279,12 +20605,12 @@ function _loadMoreFromIDMArticles() {
20279
20605
  });
20280
20606
  toLoadFeatures = getFeatures(catalogData, featureClasses);
20281
20607
  if (!toLoadFeatures.length) {
20282
- _context8.next = 62;
20608
+ _context8.next = 64;
20283
20609
  break;
20284
20610
  }
20285
- _context8.next = 54;
20611
+ _context8.next = 56;
20286
20612
  return set.api.getDataCache(set.api.getIDMFeatures(catalogData.accountGuid, toLoadFeatures), undefined, undefined, 'enricher');
20287
- case 54:
20613
+ case 56:
20288
20614
  features = _context8.sent;
20289
20615
  _loop4 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop4() {
20290
20616
  var feature, insertIndex, k, _loop5, j;
@@ -20366,19 +20692,19 @@ function _loadMoreFromIDMArticles() {
20366
20692
  }, _loop4);
20367
20693
  });
20368
20694
  _i8 = 0;
20369
- case 57:
20695
+ case 59:
20370
20696
  if (!(_i8 < features.length)) {
20371
- _context8.next = 62;
20697
+ _context8.next = 64;
20372
20698
  break;
20373
20699
  }
20374
- return _context8.delegateYield(_loop4(), "t3", 59);
20375
- case 59:
20700
+ return _context8.delegateYield(_loop4(), "t3", 61);
20701
+ case 61:
20376
20702
  _i8++;
20377
- _context8.next = 57;
20703
+ _context8.next = 59;
20378
20704
  break;
20379
- case 62:
20705
+ case 64:
20380
20706
  _iterator7 = _createForOfIteratorHelper$j(toLoadFeatures);
20381
- _context8.prev = 63;
20707
+ _context8.prev = 65;
20382
20708
  _loop8 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop8() {
20383
20709
  var featureNo, askedBy;
20384
20710
  return _regeneratorRuntime.wrap(function _loop8$(_context6) {
@@ -20408,33 +20734,33 @@ function _loadMoreFromIDMArticles() {
20408
20734
  }, _loop8);
20409
20735
  });
20410
20736
  _iterator7.s();
20411
- case 66:
20737
+ case 68:
20412
20738
  if ((_step7 = _iterator7.n()).done) {
20413
- _context8.next = 72;
20739
+ _context8.next = 74;
20414
20740
  break;
20415
20741
  }
20416
- return _context8.delegateYield(_loop8(), "t4", 68);
20417
- case 68:
20742
+ return _context8.delegateYield(_loop8(), "t4", 70);
20743
+ case 70:
20418
20744
  if (!_context8.t4) {
20419
- _context8.next = 70;
20745
+ _context8.next = 72;
20420
20746
  break;
20421
20747
  }
20422
- return _context8.abrupt("continue", 70);
20423
- case 70:
20424
- _context8.next = 66;
20425
- break;
20748
+ return _context8.abrupt("continue", 72);
20426
20749
  case 72:
20427
- _context8.next = 77;
20750
+ _context8.next = 68;
20428
20751
  break;
20429
20752
  case 74:
20430
- _context8.prev = 74;
20431
- _context8.t5 = _context8["catch"](63);
20753
+ _context8.next = 79;
20754
+ break;
20755
+ case 76:
20756
+ _context8.prev = 76;
20757
+ _context8.t5 = _context8["catch"](65);
20432
20758
  _iterator7.e(_context8.t5);
20433
- case 77:
20434
- _context8.prev = 77;
20759
+ case 79:
20760
+ _context8.prev = 79;
20435
20761
  _iterator7.f();
20436
- return _context8.finish(77);
20437
- case 80:
20762
+ return _context8.finish(79);
20763
+ case 82:
20438
20764
  _loop6 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop6() {
20439
20765
  var catalogArticleData, featureClass, features, j;
20440
20766
  return _regeneratorRuntime.wrap(function _loop6$(_context7) {
@@ -20461,25 +20787,25 @@ function _loadMoreFromIDMArticles() {
20461
20787
  }, _loop6);
20462
20788
  });
20463
20789
  _i9 = 0;
20464
- case 82:
20790
+ case 84:
20465
20791
  if (!(_i9 < catalogArticleDatas.length)) {
20466
- _context8.next = 87;
20792
+ _context8.next = 89;
20467
20793
  break;
20468
20794
  }
20469
- return _context8.delegateYield(_loop6(), "t6", 84);
20470
- case 84:
20795
+ return _context8.delegateYield(_loop6(), "t6", 86);
20796
+ case 86:
20471
20797
  _i9++;
20472
- _context8.next = 82;
20798
+ _context8.next = 84;
20473
20799
  break;
20474
- case 87:
20800
+ case 89:
20475
20801
  catalogArticleDatas.map(function (c) {
20476
20802
  return c.areOptionsLoaded = true;
20477
20803
  });
20478
- case 88:
20804
+ case 90:
20479
20805
  case "end":
20480
20806
  return _context8.stop();
20481
20807
  }
20482
- }, _callee2, null, [[31, 42, 45, 48], [63, 74, 77, 80]]);
20808
+ }, _callee2, null, [[33, 44, 47, 50], [65, 76, 79, 82]]);
20483
20809
  }));
20484
20810
  return _loadMoreFromIDMArticles.apply(this, arguments);
20485
20811
  }
@@ -20603,7 +20929,179 @@ function initIDMArticleRelations(item, catalogArticleData, catalog) {
20603
20929
  catalogArticle.hasArticleRelations = catalogArticle.articleRelations.length > 0;
20604
20930
  }
20605
20931
 
20932
+ /** True when IDM delivered no docking point counts for this svg at all - a delivered 0 is a real count. */
20933
+ function lacksDockingPointCounts(svg) {
20934
+ return [svg.avc, svg.avn, svg.avo, svg.avr, svg.avs, svg.avu, svg.avl].every(function (count) {
20935
+ return count === undefined;
20936
+ });
20937
+ }
20938
+
20939
+ /**
20940
+ * Counts the docking points of accessory svgs whose IDM detail info delivered none - the frontend counterpart
20941
+ * of api2's FillAVsIfMissing for CE catalogs. Without counts an accessory is not dockable, so the accessory
20942
+ * step adds it without its svg and the planner palette never offers it. Has to run before the relations are
20943
+ * mapped, because they and the planner palette take a snapshot of the counts.
20944
+ */
20945
+ function fillMissingDockingPointCounts(_x3, _x4, _x5) {
20946
+ return _fillMissingDockingPointCounts.apply(this, arguments);
20947
+ }
20948
+
20606
20949
  /** Load IDM decisions by number; a list too long for one GET url goes through the POST query endpoint. */
20950
+ function _fillMissingDockingPointCounts() {
20951
+ _fillMissingDockingPointCounts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(items, set, catalogData) {
20952
+ var accessories, _iterator8, _step8, item, _iterator9, _step9, ref, accessory, svgUtils, countsByUrl, countSvg;
20953
+ return _regeneratorRuntime.wrap(function _callee4$(_context10) {
20954
+ while (1) switch (_context10.prev = _context10.next) {
20955
+ case 0:
20956
+ if (!catalogData.ignoreArticleRelations) {
20957
+ _context10.next = 2;
20958
+ break;
20959
+ }
20960
+ return _context10.abrupt("return");
20961
+ case 2:
20962
+ accessories = new Set();
20963
+ _iterator8 = _createForOfIteratorHelper$j(items);
20964
+ _context10.prev = 4;
20965
+ _iterator8.s();
20966
+ case 6:
20967
+ if ((_step8 = _iterator8.n()).done) {
20968
+ _context10.next = 29;
20969
+ break;
20970
+ }
20971
+ item = _step8.value;
20972
+ _iterator9 = _createForOfIteratorHelper$j(readAdditionalItemRefs(item));
20973
+ _context10.prev = 9;
20974
+ _iterator9.s();
20975
+ case 11:
20976
+ if ((_step9 = _iterator9.n()).done) {
20977
+ _context10.next = 19;
20978
+ break;
20979
+ }
20980
+ ref = _step9.value;
20981
+ if (!(ref.serieNo != catalogData.catalogCodex)) {
20982
+ _context10.next = 15;
20983
+ break;
20984
+ }
20985
+ return _context10.abrupt("continue", 17);
20986
+ case 15:
20987
+ accessory = catalogData.getCatalogArticle(ref.typeNo);
20988
+ if (accessory && !accessory.isHidden && accessory.catalogPlannerArticle) accessories.add(accessory);
20989
+ case 17:
20990
+ _context10.next = 11;
20991
+ break;
20992
+ case 19:
20993
+ _context10.next = 24;
20994
+ break;
20995
+ case 21:
20996
+ _context10.prev = 21;
20997
+ _context10.t0 = _context10["catch"](9);
20998
+ _iterator9.e(_context10.t0);
20999
+ case 24:
21000
+ _context10.prev = 24;
21001
+ _iterator9.f();
21002
+ return _context10.finish(24);
21003
+ case 27:
21004
+ _context10.next = 6;
21005
+ break;
21006
+ case 29:
21007
+ _context10.next = 34;
21008
+ break;
21009
+ case 31:
21010
+ _context10.prev = 31;
21011
+ _context10.t1 = _context10["catch"](4);
21012
+ _iterator8.e(_context10.t1);
21013
+ case 34:
21014
+ _context10.prev = 34;
21015
+ _iterator8.f();
21016
+ return _context10.finish(34);
21017
+ case 37:
21018
+ svgUtils = new SVGUtils(); // accessories may share a drawing - fetch and count each url once
21019
+ countsByUrl = new Map();
21020
+ countSvg = function countSvg(url) {
21021
+ var counts = countsByUrl.get(url);
21022
+ if (!counts) {
21023
+ counts = set.api.fetchData(url, {
21024
+ method: 'GET',
21025
+ config: {},
21026
+ data: {}
21027
+ }).then(function (svgContent) {
21028
+ return svgUtils.countDockingPoints(svgContent);
21029
+ })["catch"](function (e) {
21030
+ LOG$l.warn('docking points of the accessory svg ' + url + ' could not be counted', e);
21031
+ return undefined;
21032
+ });
21033
+ countsByUrl.set(url, counts);
21034
+ }
21035
+ return counts;
21036
+ };
21037
+ _context10.next = 42;
21038
+ return Promise.all(_toConsumableArray(accessories).map(/*#__PURE__*/function () {
21039
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(accessory) {
21040
+ var _accessory$svgs, _accessory$catalogPla12;
21041
+ var svgs, uncounted, counts, topCounts, paletteView;
21042
+ return _regeneratorRuntime.wrap(function _callee3$(_context9) {
21043
+ while (1) switch (_context9.prev = _context9.next) {
21044
+ case 0:
21045
+ svgs = (_accessory$svgs = accessory.svgs) !== null && _accessory$svgs !== void 0 ? _accessory$svgs : [];
21046
+ uncounted = svgs.filter(lacksDockingPointCounts);
21047
+ if (uncounted.length) {
21048
+ _context9.next = 4;
21049
+ break;
21050
+ }
21051
+ return _context9.abrupt("return");
21052
+ case 4:
21053
+ _context9.next = 6;
21054
+ return Promise.all(uncounted.map(function (svg) {
21055
+ return countSvg(svg.url);
21056
+ }));
21057
+ case 6:
21058
+ counts = _context9.sent;
21059
+ // every svg gets its counts, so an svg swap (IDMArticleEngine) reads real ones too
21060
+ uncounted.forEach(function (svg, i) {
21061
+ if (counts[i]) Object.assign(svg, counts[i]);
21062
+ });
21063
+
21064
+ // the planner article took its top values from the first svg (IDMCatalogData.getCatalogPlanner)
21065
+ topCounts = uncounted[0] === svgs[0] ? counts[0] : undefined;
21066
+ if (topCounts) {
21067
+ _context9.next = 11;
21068
+ break;
21069
+ }
21070
+ return _context9.abrupt("return");
21071
+ case 11:
21072
+ (_accessory$catalogPla12 = accessory.catalogPlannerArticle) === null || _accessory$catalogPla12 === void 0 || _accessory$catalogPla12.applyDockingPointCounts(topCounts);
21073
+ paletteView = catalogData.plannerPaletteViewInfo.catalogPlannerArticles.find(function (view) {
21074
+ return view.articleCodex == accessory.articleCodex;
21075
+ });
21076
+ if (paletteView) {
21077
+ Object.assign(paletteView, {
21078
+ hasAVC: topCounts.avc > 0,
21079
+ hasAVN: topCounts.avn > 0,
21080
+ hasAVO: topCounts.avo > 0,
21081
+ hasAVS: topCounts.avs > 0,
21082
+ hasAVU: topCounts.avu > 0,
21083
+ hasAVL: topCounts.avl > 0,
21084
+ hasAVR: topCounts.avr > 0
21085
+ });
21086
+ }
21087
+ case 14:
21088
+ case "end":
21089
+ return _context9.stop();
21090
+ }
21091
+ }, _callee3);
21092
+ }));
21093
+ return function (_x8) {
21094
+ return _ref4.apply(this, arguments);
21095
+ };
21096
+ }()));
21097
+ case 42:
21098
+ case "end":
21099
+ return _context10.stop();
21100
+ }
21101
+ }, _callee4, null, [[4, 31, 34, 37], [9, 21, 24, 27]]);
21102
+ }));
21103
+ return _fillMissingDockingPointCounts.apply(this, arguments);
21104
+ }
20607
21105
  var fetchDecisions = function fetchDecisions(set, catalogData, decisionNos) {
20608
21106
  var getUrl = set.api.getIDMDecisions(catalogData.accountGuid, decisionNos);
20609
21107
  if (getUrl.length > 2000) {
@@ -20700,7 +21198,7 @@ var loadDecisionsReferencedByActions = /*#__PURE__*/function () {
20700
21198
  }
20701
21199
  }, _callee);
20702
21200
  }));
20703
- return function loadDecisionsReferencedByActions(_x3, _x4) {
21201
+ return function loadDecisionsReferencedByActions(_x6, _x7) {
20704
21202
  return _ref3.apply(this, arguments);
20705
21203
  };
20706
21204
  }();
@@ -31695,7 +32193,7 @@ var DivaArticle = /*#__PURE__*/function () {
31695
32193
  break;
31696
32194
  }
31697
32195
  _context.next = 4;
31698
- return import('./ShelfPlanner-6f2b92a1.js');
32196
+ return import('./ShelfPlanner-bfd3c0d1.js');
31699
32197
  case 4:
31700
32198
  _yield$import = _context.sent;
31701
32199
  ShelfPlanner = _yield$import["default"];
@@ -40289,7 +40787,7 @@ var DivaSet = /*#__PURE__*/function () {
40289
40787
  break;
40290
40788
  }
40291
40789
  _context5.next = 3;
40292
- return import('./DoorPlanner-598af141.js');
40790
+ return import('./DoorPlanner-15567662.js');
40293
40791
  case 3:
40294
40792
  _yield$import = _context5.sent;
40295
40793
  DoorPlanner = _yield$import["default"];
@@ -43675,7 +44173,8 @@ var DivaSetHandler = /*#__PURE__*/function () {
43675
44173
  case 6:
43676
44174
  //falls ein Accessoire verplant wurde wird das Accessoire beim Parent auch hinterlegt
43677
44175
  if (newArticle.relatedToBasketId) {
43678
- if (!newArticle.isDockable) (_set$getArticleByBask2 = set.getArticleByBasketId(newArticle.relatedToBasketId)) === null || _set$getArticleByBask2 === void 0 || _set$getArticleByBask2.addAccessoire(newArticle);
44176
+ // a dockable accessory is registered by the docking callback - one added without docking never gets there
44177
+ if (!newArticle.isDockable || initParams.notDocking) (_set$getArticleByBask2 = set.getArticleByBasketId(newArticle.relatedToBasketId)) === null || _set$getArticleByBask2 === void 0 || _set$getArticleByBask2.addAccessoire(newArticle);
43679
44178
  newArticle.accessoireParentArticle = set.getArticleByBasketId(newArticle.relatedToBasketId);
43680
44179
  }
43681
44180
  //holt die bereits gesetzten Option welche beim neuen Article übernommen werden könnten
@@ -48133,7 +48632,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48133
48632
  break;
48134
48633
  case 3:
48135
48634
  _context12.next = 5;
48136
- return import('./PfisterWWSHandler-ebf67f99.js');
48635
+ return import('./PfisterWWSHandler-b9221f28.js');
48137
48636
  case 5:
48138
48637
  _yield$import = _context12.sent;
48139
48638
  PfisterWWSHandler = _yield$import["default"];
@@ -48141,7 +48640,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48141
48640
  return _context12.abrupt("break", 27);
48142
48641
  case 9:
48143
48642
  _context12.next = 11;
48144
- return import('./LiviqueWWSHandler-ace695dc.js');
48643
+ return import('./LiviqueWWSHandler-00904519.js');
48145
48644
  case 11:
48146
48645
  _yield$import2 = _context12.sent;
48147
48646
  LiviqueWWSHandler = _yield$import2["default"];
@@ -48149,7 +48648,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48149
48648
  return _context12.abrupt("break", 27);
48150
48649
  case 15:
48151
48650
  _context12.next = 17;
48152
- return import('./SeriousBasketHandler-14961eb6.js');
48651
+ return import('./SeriousBasketHandler-d67b4447.js');
48153
48652
  case 17:
48154
48653
  _yield$import3 = _context12.sent;
48155
48654
  SeriousWWSHandler = _yield$import3["default"];
@@ -48157,7 +48656,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
48157
48656
  return _context12.abrupt("break", 27);
48158
48657
  case 21:
48159
48658
  _context12.next = 23;
48160
- return import('./StandardWWSHandler-1c478a3c.js');
48659
+ return import('./StandardWWSHandler-ac6342aa.js');
48161
48660
  case 23:
48162
48661
  _yield$import4 = _context12.sent;
48163
48662
  StandardWWSHandler = _yield$import4["default"];
@@ -49544,7 +50043,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
49544
50043
  //If we need real time rendering initialize the SignalR and 3D host connection Handler
49545
50044
  bootMark('signalr: chunk import start');
49546
50045
  _context3.next = 3;
49547
- return import('./Host3DSignalR-bc77d0ab.js');
50046
+ return import('./Host3DSignalR-9c4f10d3.js');
49548
50047
  case 3:
49549
50048
  _yield$import = _context3.sent;
49550
50049
  Host3DSignalR = _yield$import["default"];
@@ -51276,7 +51775,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
51276
51775
  break;
51277
51776
  case 8:
51278
51777
  _context5.next = 10;
51279
- return import('./DivaStandardPlanner-e1831308.js');
51778
+ return import('./DivaStandardPlanner-cb773ae9.js');
51280
51779
  case 10:
51281
51780
  _yield$import = _context5.sent;
51282
51781
  DivaStandardPlanner = _yield$import["default"];
@@ -51287,7 +51786,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
51287
51786
  return _context5.abrupt("break", 21);
51288
51787
  case 15:
51289
51788
  _context5.next = 17;
51290
- return import('./DivaBoxPlanner-50d29c59.js');
51789
+ return import('./DivaBoxPlanner-694ee7c8.js');
51291
51790
  case 17:
51292
51791
  _yield$import2 = _context5.sent;
51293
51792
  DivaBoxPlanner = _yield$import2["default"];
@@ -57355,6 +57854,12 @@ var PlannerElementData = /*#__PURE__*/function () {
57355
57854
  set: function set(cornerPos) {
57356
57855
  var _this$planElement$olt3, _this$planElement$olt4;
57357
57856
  if (!this.planElement.plannerData) return;
57857
+ // Mirrors the getter: without an OLF there is no OLF/OLT split. Deriving the center from the OLT size would shift an
57858
+ // element whose OLT is smaller than its canvas (an accessory's margin for its AV lines) by half the difference.
57859
+ if (!this.HasOLFPolygon) {
57860
+ this.WorldPosCorner = cornerPos;
57861
+ return;
57862
+ }
57358
57863
  var w = (_this$planElement$olt3 = this.planElement.oltWidth) !== null && _this$planElement$olt3 !== void 0 ? _this$planElement$olt3 : this.planElement.plannerData.width;
57359
57864
  var d = (_this$planElement$olt4 = this.planElement.oltDepth) !== null && _this$planElement$olt4 !== void 0 ? _this$planElement$olt4 : this.planElement.plannerData.depth;
57360
57865
  var oltCenterDir = new Vector2(w / 2, d / 2);
@@ -75734,4 +76239,4 @@ function _withTimeout() {
75734
76239
  return _withTimeout.apply(this, arguments);
75735
76240
  }
75736
76241
 
75737
- export { collectStructureStepKeys as A, BoundingBox as B, Cell as C, DivaWebPlanner as D, runHeadlessArtifactPass as E, runHeadlessArtifactPassBatch as F, Grid as G, HQRenderScript as H, ArtifactGenerationError as I, JsonDataCache as J, OptionCatalogData as O, PlannerElementData as P, Rendering as R, Vector3 as V, articleHandlerInstance as a, setHandlerInstance as b, Vector2 as c, bootMark as d, DivaArticle as e, DivaCatalogData as f, DivaBasketHandler as g, CatalogPlannerArticleData as h, PROPERTY_SCHEMAS as i, decodePropertyValue as j, encodePropertyValue as k, loadAndRepairBasket as l, propertyValueProblem as m, editorKindOf as n, getSeriousSetNamePlaceholder as o, propertyEncodingOf as p, bootMarksEnabled as q, rawStringOf as r, summaryHandlerInstance as s, bootNetworkMark as t, bootNow as u, bootRequestName as v, Vector4 as w, creatRenderOrders as x, getOrigProductId as y, headlessSession as z };
76242
+ export { collectStructureStepKeys as A, BoundingBox as B, Cell as C, DivaWebPlanner as D, runHeadlessArtifactPass as E, runHeadlessArtifactPassBatch as F, Grid as G, HQRenderScript as H, ArtifactGenerationError as I, JsonDataCache as J, OptionCatalogData as O, PlannerElementData as P, Rendering as R, SVGUtils as S, Vector3 as V, articleHandlerInstance as a, setHandlerInstance as b, Vector2 as c, bootMark as d, DivaArticle as e, DivaCatalogData as f, DivaBasketHandler as g, CatalogPlannerArticleData as h, PROPERTY_SCHEMAS as i, decodePropertyValue as j, encodePropertyValue as k, loadAndRepairBasket as l, propertyValueProblem as m, editorKindOf as n, getSeriousSetNamePlaceholder as o, propertyEncodingOf as p, bootMarksEnabled as q, rawStringOf as r, summaryHandlerInstance as s, bootNetworkMark as t, bootNow as u, bootRequestName as v, Vector4 as w, creatRenderOrders as x, getOrigProductId as y, headlessSession as z };