@crystaldesign/diva-web-planner-react 24.13.0-beta.2 → 24.13.0-beta.21

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 (339) hide show
  1. package/build/esm/{ArticleProperties-95ee1579.js → ArticleProperties-5240edb7.js} +8 -1
  2. package/build/esm/{CatalogProperties-89f54c2e.js → CatalogProperties-0430bd65.js} +8 -1
  3. package/build/esm/{IconHandler-82467ce4.js → IconHandler-59b652f6.js} +1 -1
  4. package/build/esm/{OptionProperties-ca896e38.js → OptionProperties-df9da5ae.js} +16 -2
  5. package/build/esm/{OptionValueProperties-dfc073cc.js → OptionValueProperties-f75d09c3.js} +15 -1
  6. package/build/esm/{Planner2DGrid-3a0e4c1f.js → Planner2DGrid-6d61a21d.js} +1 -1
  7. package/build/esm/{Planner3DImage-e95812d8.js → Planner3DImage-c812aba3.js} +1 -1
  8. package/build/esm/{index-925d4378.js → index-00bf79db.js} +22 -22
  9. package/build/esm/{index-56b7139c.js → index-03f8817b.js} +14 -13
  10. package/build/esm/{index-d5e9d9e8.js → index-0518016b.js} +5 -5
  11. package/build/esm/{index-45a76f47.js → index-051ab992.js} +3 -3
  12. package/build/esm/{index-6a01de43.js → index-07db7699.js} +2 -2
  13. package/build/esm/{index-cff09fa4.js → index-093a7d4f.js} +2 -2
  14. package/build/esm/{index-1c183c67.js → index-0987379e.js} +1 -1
  15. package/build/esm/{index-77540259.js → index-0a5299b0.js} +1 -1
  16. package/build/esm/{index-df793d15.js → index-0aaaaab4.js} +1 -1
  17. package/build/esm/{index-de16f674.js → index-0aff3ba0.js} +2 -2
  18. package/build/esm/{index-9dd3bd32.js → index-0b306549.js} +1 -1
  19. package/build/esm/{index-651d76d7.js → index-11376fd0.js} +95 -95
  20. package/build/esm/{index-6decb5d3.js → index-1208f82a.js} +1 -1
  21. package/build/esm/{index-4a30c14c.js → index-12f286a3.js} +63 -63
  22. package/build/esm/{index-24d52479.js → index-14a21063.js} +5 -5
  23. package/build/esm/{index-6837d572.js → index-160a661d.js} +4 -4
  24. package/build/esm/{index-e7339ddb.js → index-16ab903b.js} +1 -1
  25. package/build/esm/{index-7ee7b1c2.js → index-179626cc.js} +2 -2
  26. package/build/esm/{index-d2fe78f5.js → index-196a3efc.js} +1 -1
  27. package/build/esm/{index-48cafd9e.js → index-19c72668.js} +1 -1
  28. package/build/esm/{index-bbfdfce3.js → index-19c84718.js} +36 -36
  29. package/build/esm/{index-6fea0d81.js → index-1c3b55c4.js} +7 -7
  30. package/build/esm/{index-faa47139.js → index-1f6141fb.js} +3 -3
  31. package/build/esm/{index-49fb3371.js → index-203e2184.js} +1 -1
  32. package/build/esm/{index-1b2b4042.js → index-20520cb0.js} +4 -4
  33. package/build/esm/{index-3e2c4671.js → index-21499cbc.js} +1 -1
  34. package/build/esm/{index-5c86f8b1.js → index-21e5e2a5.js} +1 -1
  35. package/build/esm/{index-a20b3219.js → index-23d0424f.js} +1 -1
  36. package/build/esm/{index-f3ea653b.js → index-277bf033.js} +1 -1
  37. package/build/esm/{index-1e268599.js → index-29031f21.js} +4 -4
  38. package/build/esm/{index-83cc92e5.js → index-2ba7b4aa.js} +1 -1
  39. package/build/esm/{index-7259cddd.js → index-2be6d62e.js} +4 -4
  40. package/build/esm/{index-5954d545.js → index-3059df6a.js} +2 -2
  41. package/build/esm/{index-3bcb8194.js → index-30da4911.js} +1 -1
  42. package/build/esm/{index-031dc0e5.js → index-30dcff3a.js} +1 -1
  43. package/build/esm/{index-722ec00d.js → index-322edc01.js} +1 -1
  44. package/build/esm/{index-670181e9.js → index-32c686ea.js} +1 -1
  45. package/build/esm/{index-da80a0c2.js → index-34c4cc60.js} +2 -2
  46. package/build/esm/{index-8daf399e.js → index-3523aa82.js} +1 -1
  47. package/build/esm/{index-a31a856c.js → index-376c39e2.js} +1 -1
  48. package/build/esm/{index-b2f19a64.js → index-3791a601.js} +2 -2
  49. package/build/esm/{index-52b1e7c6.js → index-392bb6fa.js} +1 -1
  50. package/build/esm/{index-a922e79a.js → index-3aac80ab.js} +2 -2
  51. package/build/esm/{index-5d85f8c0.js → index-3ae25180.js} +7 -1
  52. package/build/esm/{index-7a098804.js → index-3b2a275e.js} +45 -45
  53. package/build/esm/{index-b338153f.js → index-3bbf548a.js} +3 -3
  54. package/build/esm/{index-e0f40bb3.js → index-3d72488b.js} +9 -9
  55. package/build/esm/{index-9cd82562.js → index-40adac4f.js} +1 -1
  56. package/build/esm/{index-e129aece.js → index-42259492.js} +23 -23
  57. package/build/esm/{index-b69a4c48.js → index-4231e035.js} +5 -5
  58. package/build/esm/{index-1e54180d.js → index-42a104c6.js} +1 -1
  59. package/build/esm/{index-73f0b734.js → index-42d64731.js} +1 -1
  60. package/build/esm/{index-0066154e.js → index-43ab0734.js} +1 -1
  61. package/build/esm/{index-2202d2fe.js → index-44192a61.js} +1 -1
  62. package/build/esm/{index-11e66128.js → index-45a8722d.js} +2 -2
  63. package/build/esm/{index-48d67e81.js → index-4631b522.js} +96 -96
  64. package/build/esm/{index-c955ff73.js → index-4719f344.js} +1 -1
  65. package/build/esm/{index-3f7833cf.js → index-4734d142.js} +5 -5
  66. package/build/esm/{index-db845929.js → index-4885ca12.js} +61 -61
  67. package/build/esm/{index-9aca582a.js → index-499736d5.js} +1 -1
  68. package/build/esm/{index-43414249.js → index-49e70508.js} +3 -3
  69. package/build/esm/{index-118dce2b.js → index-4b9d12fd.js} +1 -1
  70. package/build/esm/{index-92cefc34.js → index-4de2f332.js} +13 -8
  71. package/build/esm/{index-f6440915.js → index-4e8fde3b.js} +2 -2
  72. package/build/esm/{index-b015a8ad.js → index-4ecb1718.js} +1 -1
  73. package/build/esm/{index-50a12589.js → index-5027d29e.js} +5 -5
  74. package/build/esm/{index-f70107bb.js → index-503ae59d.js} +15 -15
  75. package/build/esm/{index-0dcba316.js → index-5073f52f.js} +1 -1
  76. package/build/esm/{index-15f6f309.js → index-56c1d064.js} +1 -1
  77. package/build/esm/{index-b08eb814.js → index-572c28e7.js} +4 -4
  78. package/build/esm/{index-c287d4e2.js → index-59a6674b.js} +1 -1
  79. package/build/esm/{index-8647fd33.js → index-5b5c63e1.js} +5 -5
  80. package/build/esm/{index-9c14bd74.js → index-5b5ccff7.js} +1 -1
  81. package/build/esm/{index-7f70bd09.js → index-5b9a8371.js} +1 -1
  82. package/build/esm/{index-89210bd0.js → index-5bee5a97.js} +1 -1
  83. package/build/esm/{index-11ad0e13.js → index-5ccd969e.js} +5 -5
  84. package/build/esm/{index-eed2f545.js → index-5ed5b530.js} +9 -5
  85. package/build/esm/{index-39ff84b2.js → index-5f879181.js} +5 -5
  86. package/build/esm/{index-320fb1ad.js → index-5fb9ec48.js} +7 -7
  87. package/build/esm/{index-4641ca54.js → index-60291551.js} +20 -20
  88. package/build/esm/{index-810a2159.js → index-6055f2a0.js} +44 -44
  89. package/build/esm/{index-5bc631e1.js → index-62251d46.js} +2 -2
  90. package/build/esm/{index-02b07785.js → index-62c92770.js} +4 -4
  91. package/build/esm/{index-5061ae3f.js → index-64835b1c.js} +1 -1
  92. package/build/esm/{index-bdc54ba1.js → index-658ad8f3.js} +1 -1
  93. package/build/esm/{index-322caa25.js → index-65a5f4b4.js} +1 -1
  94. package/build/esm/{index-e3be2bc4.js → index-6603715f.js} +445 -373
  95. package/build/esm/{index-fadc5dbe.js → index-660de7f5.js} +2 -2
  96. package/build/esm/{index-3a13d9db.js → index-67b73910.js} +3 -3
  97. package/build/esm/{index-7aa58617.js → index-6916217e.js} +17 -17
  98. package/build/esm/{index-c7ffb37a.js → index-6919d36a.js} +1 -1
  99. package/build/esm/{index-949a4f0c.js → index-69210af1.js} +3 -3
  100. package/build/esm/{index-085c7e76.js → index-6a62a84c.js} +2 -2
  101. package/build/esm/{index-cf47944e.js → index-6b246430.js} +65 -65
  102. package/build/esm/{index-6e0257ff.js → index-6c32e771.js} +21 -22
  103. package/build/esm/{index-1adc466a.js → index-6c9b0bcb.js} +1 -1
  104. package/build/esm/{index-1ce5ef0d.js → index-6d0418b2.js} +47 -47
  105. package/build/esm/{index-d63a20f7.js → index-70cc54bf.js} +1 -1
  106. package/build/esm/{index-eb8cf8c7.js → index-712d190a.js} +1 -1
  107. package/build/esm/{index-29ee3bc5.js → index-74a4c6b5.js} +1 -1
  108. package/build/esm/{index-cabd9024.js → index-75f62e27.js} +1 -1
  109. package/build/esm/{index-1ebce6ad.js → index-77e9373e.js} +3 -3
  110. package/build/esm/{index-9909717d.js → index-7805d68e.js} +1 -1
  111. package/build/esm/{index-cfff21d6.js → index-7b0af091.js} +1 -1
  112. package/build/esm/{index-c6a518ff.js → index-7b46129c.js} +21 -21
  113. package/build/esm/{index-a0fd4b35.js → index-7e7528af.js} +3 -3
  114. package/build/esm/{index-49382814.js → index-7efc4097.js} +1 -1
  115. package/build/esm/{index-7530aff2.js → index-80d323af.js} +3 -3
  116. package/build/esm/{index-a9d73cbd.js → index-81dc7e1c.js} +3 -3
  117. package/build/esm/{index-76c62ffa.js → index-81fc7cf1.js} +1 -1
  118. package/build/esm/{index-f378204d.js → index-83dadcdf.js} +1 -1
  119. package/build/esm/{index-cb3456f9.js → index-842f2f16.js} +1 -1
  120. package/build/esm/{index-c427c7d7.js → index-844c5710.js} +1 -1
  121. package/build/esm/{index-cf99abd2.js → index-848770a4.js} +17 -17
  122. package/build/esm/{index-1446a4b6.js → index-881ac7de.js} +1 -1
  123. package/build/esm/{index-3ecc8e5b.js → index-882dd046.js} +1 -1
  124. package/build/esm/{index-fb4f9be9.js → index-8838ce57.js} +3 -2
  125. package/build/esm/{index-9fb2d769.js → index-88f292f1.js} +1 -1
  126. package/build/esm/{index-d88e4a5e.js → index-894738aa.js} +1 -1
  127. package/build/esm/{index-d062bb6c.js → index-89476282.js} +1 -1
  128. package/build/esm/{index-32d655e6.js → index-8af86548.js} +1 -1
  129. package/build/esm/{index-e08336e3.js → index-8b276ef7.js} +2 -2
  130. package/build/esm/{index-815d5b2b.js → index-8b76d650.js} +1 -1
  131. package/build/esm/{index-bdbcb597.js → index-8edba1e5.js} +1 -1
  132. package/build/esm/{index-fca86a6f.js → index-9064a97a.js} +1 -1
  133. package/build/esm/{index-33e6b9b8.js → index-9464269b.js} +1 -6
  134. package/build/esm/{index-db673592.js → index-94ab34e5.js} +1 -1
  135. package/build/esm/{index-b3d05bd4.js → index-96e61c47.js} +1 -1
  136. package/build/esm/{index-81d24c41.js → index-976ab29d.js} +2 -2
  137. package/build/esm/{index-6b5e94c0.js → index-97ad0a53.js} +1 -1
  138. package/build/esm/{index-e0fe8ad3.js → index-9816345f.js} +11 -7
  139. package/build/esm/{index-66ec2cfa.js → index-984f106f.js} +5 -5
  140. package/build/esm/{index-c2e72730.js → index-9a2d6f49.js} +6 -6
  141. package/build/esm/{index-576c5088.js → index-9a83200e.js} +1 -1
  142. package/build/esm/{index-b07cc2f3.js → index-9a8a7029.js} +1 -1
  143. package/build/esm/{index-f63e79af.js → index-a0b7c0ac.js} +3 -3
  144. package/build/esm/{index-d462acaa.js → index-a0facb3a.js} +1 -1
  145. package/build/esm/{index-42b8f19f.js → index-a16c2026.js} +1 -1
  146. package/build/esm/{index-f661610d.js → index-a30fc1d0.js} +1 -1
  147. package/build/esm/{index-ec16ec4f.js → index-a4236b8e.js} +2 -2
  148. package/build/esm/{index-5fdbee20.js → index-a524e70d.js} +1 -1
  149. package/build/esm/{index-89dc2440.js → index-a6d14bf4.js} +2 -2
  150. package/build/esm/{index-e9c9e29b.js → index-a82bffe6.js} +14 -14
  151. package/build/esm/{index-465443f5.js → index-a89d3eed.js} +7 -7
  152. package/build/esm/{index-f3a053a6.js → index-a90f3bf1.js} +6 -6
  153. package/build/esm/{index-63285dd7.js → index-a9a16918.js} +2 -2
  154. package/build/esm/{index-62671522.js → index-aa59985e.js} +75 -75
  155. package/build/esm/{index-6943a41a.js → index-aa7c9a35.js} +1 -1
  156. package/build/esm/{index-d60239bc.js → index-aad1ad73.js} +2 -2
  157. package/build/esm/{index-f4d746e1.js → index-ab334b23.js} +1 -1
  158. package/build/esm/{index-62f23d9f.js → index-ababf639.js} +52 -52
  159. package/build/esm/{index-ec7b9492.js → index-ad1bd259.js} +3 -3
  160. package/build/esm/{index-ad0ec7b7.js → index-ae572cf2.js} +1 -1
  161. package/build/esm/{index-9806be7b.js → index-af9c5278.js} +1 -1
  162. package/build/esm/{index-55b930d0.js → index-b0686bb0.js} +1 -1
  163. package/build/esm/{index-f8b6f8d4.js → index-b1866fbd.js} +1 -1
  164. package/build/esm/{index-25f7b4dd.js → index-b1a0b7b2.js} +3 -3
  165. package/build/esm/{index-79568e33.js → index-b2b857f4.js} +1 -1
  166. package/build/esm/{index-89eceab9.js → index-b3147883.js} +8 -8
  167. package/build/esm/{index-7ce91e89.js → index-b349026e.js} +3 -3
  168. package/build/esm/{index-47e1689c.js → index-b43e1af4.js} +1 -1
  169. package/build/esm/{index-499e233c.js → index-b4688689.js} +1 -1
  170. package/build/esm/{index-2cdc7dd5.js → index-b5ca101d.js} +76 -76
  171. package/build/esm/{index-8aca3334.js → index-b95f9e3b.js} +1 -1
  172. package/build/esm/{index-7f861c10.js → index-ba44f236.js} +1 -1
  173. package/build/esm/{index-8e97e10d.js → index-baad0eae.js} +3 -3
  174. package/build/esm/{index-b0b1e99f.js → index-bb8dcd67.js} +2 -2
  175. package/build/esm/{index-ca7f5226.js → index-bcea2ded.js} +2 -2
  176. package/build/esm/{index-d1761cce.js → index-bf090f72.js} +4 -4
  177. package/build/esm/{index-39ea5a5f.js → index-bf3564f0.js} +1 -1
  178. package/build/esm/{index-e86bf18b.js → index-c15f2e81.js} +3 -3
  179. package/build/esm/{index-db00fb66.js → index-c1d6cf26.js} +6 -6
  180. package/build/esm/{index-06e227d9.js → index-c350365d.js} +1 -1
  181. package/build/esm/{index-4629efea.js → index-c423a291.js} +46 -46
  182. package/build/esm/{index-d44d0b14.js → index-c4d32444.js} +1 -1
  183. package/build/esm/{index-a5505b2c.js → index-c75e79a5.js} +2 -2
  184. package/build/esm/{index-3eb05ac1.js → index-c827413e.js} +2 -2
  185. package/build/esm/index-c8f8e620.js +113 -0
  186. package/build/esm/{index-a7040739.js → index-c900f771.js} +4 -4
  187. package/build/esm/{index-73e20f49.js → index-c9267b7d.js} +1 -1
  188. package/build/esm/{index-c2796627.js → index-ca92ca36.js} +1 -1
  189. package/build/esm/{index-b11751c1.js → index-cab63e8f.js} +21 -21
  190. package/build/esm/{index-4a8c5b9f.js → index-cafb2ea8.js} +3 -3
  191. package/build/esm/{index-2ac5fb5d.js → index-cb110e68.js} +63 -63
  192. package/build/esm/{index-e92005ca.js → index-ccdab263.js} +50 -50
  193. package/build/esm/{index-bd0c9edd.js → index-d02b396a.js} +4 -4
  194. package/build/esm/{index-95cbb383.js → index-d6d7964b.js} +1 -1
  195. package/build/esm/{index-71f19a24.js → index-d81649c3.js} +1 -1
  196. package/build/esm/{index-6db74472.js → index-d9b6f0fa.js} +2 -2
  197. package/build/esm/{index-864b1252.js → index-d9f0b374.js} +2 -2
  198. package/build/esm/{index-3cefb057.js → index-da1b671c.js} +4 -4
  199. package/build/esm/{index-d7a24176.js → index-da6a15d7.js} +53 -52
  200. package/build/esm/{index-a3c3abe0.js → index-db0c8486.js} +1 -1
  201. package/build/esm/{index-c789c818.js → index-db916938.js} +8 -8
  202. package/build/esm/{index-1f1c27ae.js → index-dc039272.js} +1 -1
  203. package/build/esm/{index-840d9b5b.js → index-dee78f67.js} +2 -2
  204. package/build/esm/{index-43354ec6.js → index-e08088b9.js} +1 -1
  205. package/build/esm/{index-5db76ce2.js → index-e154e98c.js} +1 -1
  206. package/build/esm/{index-034599d4.js → index-e220e926.js} +1 -1
  207. package/build/esm/{index-f62eec39.js → index-e6a8182e.js} +1 -1
  208. package/build/esm/{index-9febd790.js → index-e6ac5458.js} +19 -19
  209. package/build/esm/{index-4f0fd4dc.js → index-e6b44955.js} +1 -1
  210. package/build/esm/{index-e6fc6127.js → index-e72c275b.js} +1 -1
  211. package/build/esm/{index-cf13d85f.js → index-e74fd210.js} +1 -1
  212. package/build/esm/{index-664f0c20.js → index-e7dcf976.js} +2 -2
  213. package/build/esm/{index-7a108864.js → index-e99c997c.js} +1 -1
  214. package/build/esm/{index-2b1bb56f.js → index-ebaafcb9.js} +2 -2
  215. package/build/esm/{index-5c8f092c.js → index-ed24ef65.js} +59 -59
  216. package/build/esm/{index-0bff2f79.js → index-ed584061.js} +2 -2
  217. package/build/esm/{index-8526ce37.js → index-ed697f53.js} +1 -1
  218. package/build/esm/{index-080fa1de.js → index-edce8140.js} +37 -37
  219. package/build/esm/{index-48ab4f47.js → index-eddef935.js} +2 -2
  220. package/build/esm/{index-2e1ce597.js → index-f046a3b6.js} +1 -1
  221. package/build/esm/{index-8d7c7946.js → index-f0700fdf.js} +6 -6
  222. package/build/esm/{index-3f78c1d0.js → index-f23027ea.js} +1 -1
  223. package/build/esm/{index-57f98f09.js → index-f40068ab.js} +3 -3
  224. package/build/esm/{index-a186d393.js → index-f4ac3ef1.js} +2 -2
  225. package/build/esm/{index-863c0444.js → index-f4f1300c.js} +1 -1
  226. package/build/esm/{index-cb12be92.js → index-f6552b89.js} +2 -2
  227. package/build/esm/{index-cfe349e6.js → index-f7d3b746.js} +2 -2
  228. package/build/esm/{index-558552fa.js → index-f82baadb.js} +1 -1
  229. package/build/esm/{index-16f2248e.js → index-fa0b3e84.js} +6 -6
  230. package/build/esm/{index-609d2f87.js → index-fbf4d9f8.js} +5 -4
  231. package/build/esm/{index-ec91b580.js → index-fc3f33f4.js} +1 -1
  232. package/build/esm/{index-e569c747.js → index-ffc99638.js} +6 -6
  233. package/build/esm/index.js +1 -1
  234. package/build/esm/{index.module-1369eb90.js → index.module-0d208756.js} +1 -1
  235. package/build/esm/{index.module-ba4a54b1.js → index.module-0f285fd8.js} +1 -1
  236. package/build/esm/{index.module-97731e7f.js → index.module-312c61e8.js} +1 -1
  237. package/build/esm/{index.module-5e59bc15.js → index.module-3285fa5b.js} +1 -1
  238. package/build/esm/{index.module-f8151ba6.js → index.module-643802af.js} +1 -1
  239. package/build/esm/{index.module-e2478d8f.js → index.module-89732219.js} +1 -1
  240. package/build/esm/{index.module-89729a6f.js → index.module-91016c51.js} +1 -1
  241. package/build/esm/{index.module-ad58dc0d.js → index.module-95ae08bb.js} +1 -1
  242. package/build/esm/{index.module-8dceecd2.js → index.module-9781d436.js} +1 -1
  243. package/build/esm/{index.module-4ba045f6.js → index.module-aa641914.js} +1 -1
  244. package/build/esm/{index.module-b50c6441.js → index.module-afb3b6eb.js} +1 -1
  245. package/build/esm/{index.module-33301a40.js → index.module-bc4f51b8.js} +1 -1
  246. package/build/esm/{index.module-03c13652.js → index.module-c4d44966.js} +1 -1
  247. package/build/esm/index.module-dd083f23.js +20 -0
  248. package/build/types/web-planner-react/src/components/GlobalElements/BarrierActions/blue/index.d.ts.map +1 -1
  249. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/PropertiesEditor/Properties/ArticleProperties.d.ts.map +1 -1
  250. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/PropertiesEditor/Properties/CatalogProperties.d.ts.map +1 -1
  251. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/PropertiesEditor/Properties/OptionProperties.d.ts.map +1 -1
  252. package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/PropertiesEditor/Properties/OptionValueProperties.d.ts.map +1 -1
  253. package/build/types/web-planner-react/src/components/Product/Product/serious/CheckoutForm/index.d.ts.map +1 -1
  254. package/build/types/web-planner-react/src/components/Product/ProductCenter/Planner3DImage/NavBar/standard/ArQrCodeIcon/index.d.ts.map +1 -1
  255. package/build/types/web-planner-react/src/components/Settings/SettingsHeaderContainer/SettingsItemHeader/Header/standard/index.d.ts.map +1 -1
  256. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/GenericComponents/InfoIcon/index.d.ts +3 -4
  257. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/GenericComponents/InfoIcon/index.d.ts.map +1 -1
  258. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/HeaderAndOption/DropDownText/serious/index.d.ts.map +1 -1
  259. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/ShelfPlanner/Grid/index.d.ts.map +1 -1
  260. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/ShelfPlanner/index.d.ts +3 -1
  261. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/ShelfPlanner/index.d.ts.map +1 -1
  262. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/Toggle/ToggleOption/index.d.ts.map +1 -1
  263. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/PaletteGroup/standard/Group/index.d.ts.map +1 -1
  264. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/index.d.ts +8 -1
  265. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/index.d.ts.map +1 -1
  266. package/build/types/web-planner-react/src/model/BarrierHandler.d.ts +4 -1
  267. package/build/types/web-planner-react/src/model/BarrierHandler.d.ts.map +1 -1
  268. package/build/types/web-planner-react/src/model/Palette/PaletteViewHandler.d.ts +1 -0
  269. package/build/types/web-planner-react/src/model/Palette/PaletteViewHandler.d.ts.map +1 -1
  270. package/build/types/web-planner-react/src/model/Palette/Steps/PlannerStep/PlannerItems.d.ts.map +1 -1
  271. package/build/types/web-planner-react/src/model/Palette/Steps/ShelfStep/ShelfItem.d.ts +5 -0
  272. package/build/types/web-planner-react/src/model/Palette/Steps/ShelfStep/ShelfItem.d.ts.map +1 -1
  273. package/build/types/web-planner-react/src/model/types.d.ts +1 -0
  274. package/build/types/web-planner-react/src/model/types.d.ts.map +1 -1
  275. package/build/umd/1144.diva-web-planner-react.umd.min.js +1 -1
  276. package/build/umd/1463.diva-web-planner-react.umd.min.js +1 -1
  277. package/build/umd/1512.diva-web-planner-react.umd.min.js +1 -1
  278. package/build/umd/158.diva-web-planner-react.umd.min.js +1 -1
  279. package/build/umd/1603.diva-web-planner-react.umd.min.js +1 -1
  280. package/build/umd/170.diva-web-planner-react.umd.min.js +1 -1
  281. package/build/umd/1912.diva-web-planner-react.umd.min.js +1 -1
  282. package/build/umd/2372.diva-web-planner-react.umd.min.js +1 -1
  283. package/build/umd/2568.diva-web-planner-react.umd.min.js +1 -1
  284. package/build/umd/2645.diva-web-planner-react.umd.min.js +1 -1
  285. package/build/umd/2933.diva-web-planner-react.umd.min.js +1 -1
  286. package/build/umd/3064.diva-web-planner-react.umd.min.js +1 -1
  287. package/build/umd/3596.diva-web-planner-react.umd.min.js +1 -1
  288. package/build/umd/3613.diva-web-planner-react.umd.min.js +1 -1
  289. package/build/umd/3846.diva-web-planner-react.umd.min.js +1 -1
  290. package/build/umd/4080.diva-web-planner-react.umd.min.js +1 -1
  291. package/build/umd/4585.diva-web-planner-react.umd.min.js +1 -1
  292. package/build/umd/4701.diva-web-planner-react.umd.min.js +1 -1
  293. package/build/umd/4754.diva-web-planner-react.umd.min.js +1 -1
  294. package/build/umd/4829.diva-web-planner-react.umd.min.js +1 -1
  295. package/build/umd/4872.diva-web-planner-react.umd.min.js +1 -1
  296. package/build/umd/5439.diva-web-planner-react.umd.min.js +1 -1
  297. package/build/umd/5492.diva-web-planner-react.umd.min.js +1 -1
  298. package/build/umd/5887.diva-web-planner-react.umd.min.js +1 -1
  299. package/build/umd/6092.diva-web-planner-react.umd.min.js +1 -1
  300. package/build/umd/6158.diva-web-planner-react.umd.min.js +1 -1
  301. package/build/umd/6201.diva-web-planner-react.umd.min.js +1 -1
  302. package/build/umd/6266.diva-web-planner-react.umd.min.js +1 -1
  303. package/build/umd/6770.diva-web-planner-react.umd.min.js +1 -1
  304. package/build/umd/7124.diva-web-planner-react.umd.min.js +1 -1
  305. package/build/umd/7393.diva-web-planner-react.umd.min.js +1 -1
  306. package/build/umd/7442.diva-web-planner-react.umd.min.js +1 -1
  307. package/build/umd/760.diva-web-planner-react.umd.min.js +1 -1
  308. package/build/umd/7674.diva-web-planner-react.umd.min.js +1 -1
  309. package/build/umd/7757.diva-web-planner-react.umd.min.js +1 -1
  310. package/build/umd/7881.diva-web-planner-react.umd.min.js +1 -1
  311. package/build/umd/7933.diva-web-planner-react.umd.min.js +1 -1
  312. package/build/umd/802.diva-web-planner-react.umd.min.js +1 -1
  313. package/build/umd/8042.diva-web-planner-react.umd.min.js +1 -1
  314. package/build/umd/8117.diva-web-planner-react.umd.min.js +1 -1
  315. package/build/umd/814.diva-web-planner-react.umd.min.js +1 -1
  316. package/build/umd/8213.diva-web-planner-react.umd.min.js +1 -1
  317. package/build/umd/8241.diva-web-planner-react.umd.min.js +1 -1
  318. package/build/umd/8356.diva-web-planner-react.umd.min.js +1 -1
  319. package/build/umd/8584.diva-web-planner-react.umd.min.js +1 -1
  320. package/build/umd/8717.diva-web-planner-react.umd.min.js +1 -1
  321. package/build/umd/8757.diva-web-planner-react.umd.min.js +1 -1
  322. package/build/umd/876.diva-web-planner-react.umd.min.js +1 -1
  323. package/build/umd/896.diva-web-planner-react.umd.min.js +1 -1
  324. package/build/umd/9390.diva-web-planner-react.umd.min.js +1 -1
  325. package/build/umd/9561.diva-web-planner-react.umd.min.js +1 -1
  326. package/build/umd/963.diva-web-planner-react.umd.min.js +5 -5
  327. package/build/umd/9631.diva-web-planner-react.umd.min.js +1 -1
  328. package/build/umd/9715.diva-web-planner-react.umd.min.js +1 -1
  329. package/build/umd/9944.diva-web-planner-react.umd.min.js +1 -1
  330. package/build/umd/diva-web-planner-react.umd.min.js +1 -1
  331. package/build/umd/report.html +4 -5
  332. package/package.json +6 -6
  333. package/build/esm/index-b78f5625.js +0 -115
  334. package/build/esm/index.module-0769e60f.js +0 -20
  335. package/build/esm/requestProductForm-275a48c7.js +0 -295
  336. package/build/types/web-planner-react/src/components/GlobalElements/BarrierActions/blue/presets/requestProductForm.d.ts +0 -21
  337. package/build/types/web-planner-react/src/components/GlobalElements/BarrierActions/blue/presets/requestProductForm.d.ts.map +0 -1
  338. package/build/umd/9276.diva-web-planner-react.umd.min.js +0 -2
  339. package/build/umd/9276.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 8241.diva-web-planner-react.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[8241],{8241:(t,e,n)=>{n.r(e),n.d(e,{default:()=>T});var o=n(84658),i=n(13125),s=n(43860),l=n(80248),r=n(50747),a=n.n(r),h=n(55901),c=n(12952),u=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),m=function(){return(0,s.Z)((function BoxPlannerPartlistHelper(t,e,n,o,s,r,a){(0,i.Z)(this,BoxPlannerPartlistHelper),(0,l.Z)(this,"constructionRules",void 0),(0,l.Z)(this,"getOptionVal",void 0),(0,l.Z)(this,"setOptionValue",void 0),(0,l.Z)(this,"getElementHasBottomPlate",void 0),(0,l.Z)(this,"getElementIsCornerElement",void 0),(0,l.Z)(this,"getCornerType",void 0),(0,l.Z)(this,"getElementHasTopPlate",void 0),(0,l.Z)(this,"getElementIsGarderobeElement",void 0),this.getOptionVal=t,this.getElementHasBottomPlate=n,this.setOptionValue=e,this.getElementIsCornerElement=o,this.getCornerType=s,this.getElementHasTopPlate=r,this.getElementIsGarderobeElement=a}),[{key:"setConstructionRules",value:function setConstructionRules(t){this.constructionRules=t}},{key:"getGroundPlatesNumOfRightNeighbors",value:function getGroundPlatesNumOfRightNeighbors(t,e,n){var o=0;if(this.getElementHasBottomPlate(t,n)&&o++,e.getPlannerHasActiveBackside()){var i=e.getOppositeElement(t.getElementId());if(this.getElementHasBottomPlate(i,n)&&o++,e.getElementHasRightElement(t.getElementId())){var s=e.getRightElement(t.getElementId()),l=e.getOppositeElement(s.getElementId());return this.getElementHasBottomPlate(s,n)&&o++,this.getElementHasBottomPlate(l,n)&&o++,o}return o}if(e.getElementHasRightElement(t.getElementId())){var r=e.getRightElement(t.getElementId());return this.getElementHasBottomPlate(r,n)&&o++,o}return o}},{key:"getTopPlatesNumOfRightNeighbors",value:function getTopPlatesNumOfRightNeighbors(t,e,n){var o=0;if(this.getElementHasTopPlate(t,e,n)&&o++,e.getPlannerHasActiveBackside()){var i=e.getOppositeElement(t.getElementId());if(this.getElementHasTopPlate(i,e,n)&&o++,e.getElementHasRightElement(t.getElementId())){var s=e.getRightElement(t.getElementId()),l=e.getOppositeElement(s.getElementId());return this.getElementHasTopPlate(s,e,n)&&o++,this.getElementHasTopPlate(l,e,n)&&o++,o}return o}if(e.getElementHasRightElement(t.getElementId())){var r=e.getRightElement(t.getElementId());return this.getElementHasTopPlate(r,e,n)&&o++,o}return o}},{key:"getElementHeight",value:function getElementHeight(t,e){var n=this.getOptionVal(t.getElementId(),"OPTHOEHE",e);return"OPVH_6"==n?"6":"OPVH_11"==n?"11":"OPVH_18"==n?"18":"37"}},{key:"getElementDepth",value:function getElementDepth(t,e){var n=this.getOptionVal(t.getElementId(),"OPTTIEFE",e);return"OPVTIEFE_18"==n?"18":"37"}},{key:"getElementRahmenColor",value:function getElementRahmenColor(t,e){var n=this.getOptionVal(t.getElementId(),"OPTFARBE_RAHMEN",e);return"OPVCHROM"==n?"CHROM":"OPVSCHWARZ_MATT"==n?"BLACK":"CHROM"}},{key:"calculateRahmen",value:function calculateRahmen(t,e){for(var n=t.getAllElementsInGrid(),o=0;o<n.length;o++)this.constructionRules.VarticalRahmenInfo&&(this.correctRahmenVerticalLeftFront(n[o],t,e),this.correctRahmenVerticalLeftBack(n[o],t,e),this.correctRahmenVerticalRightFront(n[o],t,e),this.correctRahmenVerticalRightBack(n[o],t,e),u.debug("---------Correct Senkrechte Rahmen for element with ID: "+n[o].ElementId+"; posNr: "+n[o].PosNr+" ----------"),u.debug("Senkrechter Rahmen links vorne: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_V",e)),u.debug("Senkrechter Rahmen links hinten: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_H",e)),u.debug("Senkrechter Rahmen rechts vorne : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_V",e)),u.debug("Senkrechter Rahmen rechts hinten : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_H",e))),this.constructionRules.DepthRahmenInfo&&(this.correctRahmenDepthLeftBottom(n[o],t,e),this.correctRahmenDepthLeftTop(n[o],t,e),this.correctRahmenDepthRightBottom(n[o],t,e),this.correctRahmenDepthRightTop(n[o],t,e),u.debug("---------Correct Tiefenverbinder Rahmen for element with ID: "+n[o].ElementId+"; posNr: "+n[o].PosNr+" ----------"),u.debug("Tiefen Rahmen links unten: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_U",e)),u.debug("Tiefen Rahmen links oben: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_O",e)),u.debug("Tiefen Rahmen rechts unten : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_U",e)),u.debug("Tiefen Rahmen rechts oben : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_O",e)))}},{key:"correctRahmenDepthLeftBottom",value:function correctRahmenDepthLeftBottom(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n),!(e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId()))&&!e.getElementHasBottomElement(t.getElementId()))if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(this.getElementHasBottomPlate(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);else switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenDepthLeftTop",value:function correctRahmenDepthLeftTop(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n),!(e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId())))if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(this.getElementIsCornerElement(t,n))switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else if(this.getElementHasTopPlate(t,e,n))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);else switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenDepthRightBottom",value:function correctRahmenDepthRightBottom(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId()))if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(o){var i=e.getRightElement(t.getElementId());if(!this.getElementHasBottomPlate(t,n)||this.getElementIsCornerElement(t,n))switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else if(!this.getElementHasBottomPlate(i,n)||this.getElementIsCornerElement(i,n))switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,n)}else if(this.getElementHasBottomPlate(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);else switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}break;case"BLACK":o?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,n):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenDepthRightTop",value:function correctRahmenDepthRightTop(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(!this.getElementHasTopPlate(t,e,n)||this.getElementIsCornerElement(t,n)){switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}return}if(!i)return void this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());if(!this.getElementHasTopPlate(s,e,n)||this.getElementIsCornerElement(s,n)){switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}return}this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,n);break;case"BLACK":i?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,n):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenVerticalLeftFront",value:function correctRahmenVerticalLeftFront(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n),!(e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}},{key:"correctRahmenVerticalLeftBack",value:function correctRahmenVerticalLeftBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside;if(!o&&!(o?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(e.getPlannerHasActiveBackside()){var i=e.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}},{key:"correctRahmenVerticalRightFront",value:function correctRahmenVerticalRightFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());this.getElementIsGarderobeElement(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}},{key:"correctRahmenVerticalRightBack",value:function correctRahmenVerticalRightBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside;if(!o){var i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());if(!s)return;if(e.getPlannerHasActiveBackside()){var l=e.getOppositeElement(t.getElementId());if(!l)return;var r=e.getOppositeElement(s.getElementId());if(!r)return;this.getElementIsGarderobeElement(s,n)||this.getElementIsGarderobeElement(l,n)||this.getElementIsGarderobeElement(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.getElementIsGarderobeElement(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else if(e.getPlannerHasActiveBackside()){var a=e.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}}},{key:"calculateKnots",value:function calculateKnots(t,e){if(this.constructionRules.hasKNOTS)for(var n=t.getAllElementsInGrid(),o=0;o<n.length;o++)this.correctKnotLeftTopFront(n[o],t,e),this.correctKnotLeftTopBack(n[o],t,e),this.correctKnotLeftBottomFront(n[o],t,e),this.correctKnotLeftBottomBack(n[o],t,e),this.correctKnotRightTopFront(n[o],t,e),this.correctKnotRightTopBack(n[o],t,e),this.correctKnotRightBottomFront(n[o],t,e),this.correctKnotRightBottomBack(n[o],t,e),this.correctKnotRightMiddleBack(n[o],t,e),this.correctKnotLeftMiddleBack(n[o],t,e),u.debug("---------Correct Knots for element with ID: "+n[o].ElementId+"; posNr: "+n[o].PosNr+" ----------"),u.debug("Links oben vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LTF",e)),u.debug("Links oben hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LTB",e)),u.debug("Links unten vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LBF",e)),u.debug("Links unten hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LBB",e)),u.debug("Rechts oben vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RTF",e)),u.debug("Rechts oben hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RTB",e)),u.debug("Rechts unten vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RBF",e)),u.debug("Links mitte hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LMB",e)),u.debug("Rechts mitte hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RMB",e)),u.debug("Rechts unten hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RBB",e))}},{key:"correctKnotLeftBottomFront",value:function correctKnotLeftBottomFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())&&(o||(e.getPlannerHasActiveBackside()&&this.getElementHasBottomPlate(t,n)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n),this.getElementHasBottomPlate(t,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n)),this.getElementIsCornerElement(t,n))){var i=e.getLeftElement(t.getElementId());if(this.getElementIsCornerElement(i,n))return;var s=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasBottomPlate(i,n)?this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.getElementHasBottomPlate(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}},{key:"correctKnotLeftTopFront",value:function correctKnotLeftTopFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(o||(e.getPlannerHasActiveBackside()&&this.getElementHasTopPlate(t,e,n)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n),this.getElementHasTopPlate(t,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n)),this.getElementIsCornerElement(t,n)){var i=e.getElementHasLeftElement(t.getElementId());if(o&&this.getElementIsCornerElement(e.getLeftElement(t.getElementId()),n))return;var s=e.getElementHasRightElement(t.getElementId());if(i||s){if(s&&!i){var l=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasTopPlate(l,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(!s&&i){var r=e.getLeftElement(t.getElementId());this.getElementHasTopPlate(r,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3erer_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}else if(s&&i){var a=e.getLeftElement(t.getElementId()),h=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasTopPlate(a,e,n)?this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.getElementHasTopPlate(a,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}},{key:"correctKnotLeftBottomBack",value:function correctKnotLeftBottomBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())){if(!o)if(e.getPlannerHasActiveBackside()&&!e.getIndexInGridByElementId(t.getElementId()).backside){var i=e.getOppositeElement(t.getElementId());i&&(this.getElementHasBottomPlate(t,n)?this.getElementHasBottomPlate(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.getElementHasBottomPlate(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else e.getPlannerHasActiveBackside()||this.getElementHasBottomPlate(t,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n)){var s=e.getLeftElement(t.getElementId());if(this.getElementIsCornerElement(s,n))return;switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":var l=e.getRightElement(t.getElementId());this.getElementHasBottomPlate(s,n)?this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n)}}}}},{key:"correctKnotLeftTopBack",value:function correctKnotLeftTopBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(!o)if(e.getPlannerHasActiveBackside()&&!e.getIndexInGridByElementId(t.getElementId()).backside){var i=e.getOppositeElement(t.getElementId());i&&(this.getElementHasTopPlate(t,e,n)?this.getElementHasTopPlate(i,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.getElementHasTopPlate(i,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else e.getPlannerHasActiveBackside()||this.getElementHasTopPlate(t,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n)){var s=e.getElementHasLeftElement(t.getElementId());if(o&&this.getElementIsCornerElement(e.getLeftElement(t.getElementId()),n))return;var l=e.getElementHasRightElement(t.getElementId());if(s||l){if(l&&!s){var r=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.getElementHasTopPlate(r,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n)}}else if(!l&&s){var a=e.getLeftElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":case"OUTSIDE":this.getElementHasTopPlate(a,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n)}}else if(l&&s){var h=e.getLeftElement(t.getElementId()),c=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.getElementHasTopPlate(h,e,n)?this.getElementHasTopPlate(c,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.getElementHasTopPlate(c,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}},{key:"correctKnotRightMiddleBack",value:function correctKnotRightMiddleBack(t,e,n){if((this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n),this.getElementIsGarderobeElement(t,n))&&!e.getIndexInGridByElementId(t.getElementId()).backside)if(e.getElementHasRightElement(t.getElementId()))if(e.getPlannerHasActiveBackside()){var o=e.getOppositeElement(t.getElementId());if(!o)return;var i=e.getRightElement(t.getElementId());if(!i)return;var s=e.getOppositeElement(i.getElementId());if(!s)return;this.getElementIsGarderobeElement(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.getElementIsGarderobeElement(o,n)?this.getElementIsGarderobeElement(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.getElementIsGarderobeElement(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else{var l=e.getRightElement(t.getElementId());if(!l)return;this.getElementIsGarderobeElement(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else if(e.getPlannerHasActiveBackside()){var r=e.getOppositeElement(t.getElementId());if(!r)return;this.getElementIsGarderobeElement(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}},{key:"correctKnotLeftMiddleBack",value:function correctKnotLeftMiddleBack(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n),this.getElementIsGarderobeElement(t,n)){var o=e.getIndexInGridByElementId(t.getElementId()).backside;if(!o){var i=o?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(i){var s=e.getLeftElement(t.getElementId());if(this.getElementIsGarderobeElement(s,n))return}if(i)if(e.getPlannerHasActiveBackside()){var l=e.getLeftElement(t.getElementId());if(!l)return;var r=e.getOppositeElement(t.getElementId());if(!r)return;var a=e.getOppositeElement(null==l?void 0:l.getElementId());if(!a)return;this.getElementIsGarderobeElement(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.getElementIsGarderobeElement(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);else if(e.getPlannerHasActiveBackside()){var h=e.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(h,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}}}},{key:"correctKnotRightBottomFront",value:function correctKnotRightBottomFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())){if(e.getPlannerHasActiveBackside())if(this.getElementHasBottomPlate(t,n))if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());s&&(this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&(this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);else if(this.getElementHasBottomPlate(t,n)){var r=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());r&&!this.getElementHasBottomPlate(r,n)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}else if(i){var a=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());a&&!this.getElementIsCornerElement(a,n)&&(this.getElementHasBottomPlate(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);if(this.getElementIsCornerElement(t,n))switch(this.getCornerType(t,n)){case"INSIDE":var h=e.getRightElement(t.getElementId());if(h&&this.getElementIsCornerElement(h,n))if(e.getElementHasRightElement(h.getElementId())){var c=e.getRightElement(h.getElementId());this.getElementHasBottomPlate(c,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else h&&this.getElementHasBottomPlate(h,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}},{key:"correctKnotRightTopFront",value:function correctKnotRightTopFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(e.getPlannerHasActiveBackside())if(this.getElementHasTopPlate(t,e,n))if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());s&&(this.getElementHasTopPlate(s,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&(this.getElementHasTopPlate(l,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);else if(this.getElementHasTopPlate(t,e,n)){if(i){var r=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());r&&(this.getElementHasTopPlate(r,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n))}}else if(i){var a=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());a&&!this.getElementIsCornerElement(a,n)&&(this.getElementHasTopPlate(a,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);if(this.getElementIsCornerElement(t,n)){var h=e.getElementHasLeftElement(t.getElementId()),c=e.getElementHasRightElement(t.getElementId());if(h||c){if(c&&!h){var u=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":if(this.getElementIsCornerElement(u,n))if(e.getElementHasRightElement(u.getElementId())){var m=e.getRightElement(u.getElementId());this.getElementHasTopPlate(m,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(u,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(!c&&h){e.getLeftElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(c&&h){var d=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":if(this.getElementIsCornerElement(d,n))if(e.getElementHasRightElement(d.getElementId())){var g=e.getRightElement(d.getElementId());this.getElementHasTopPlate(g,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(d,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}},{key:"correctKnotRightBottomBack",value:function correctKnotRightBottomBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())&&!e.getIndexInGridByElementId(t.getElementId()).backside){if(e.getPlannerHasActiveBackside())switch(this.getGroundPlatesNumOfRightNeighbors(t,e,n)){case 0:i?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n);break;case 1:i?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case 2:i?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);break;case 3:i&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n);break;case 4:i&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,n)}else if(this.getElementHasBottomPlate(t,n)){if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());s&&(this.getElementHasBottomPlate(s,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n))}}else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&!this.getElementIsCornerElement(l,n)&&(this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n))switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":var r=e.getRightElement(t.getElementId());if(this.getElementIsCornerElement(r,n)){var a=e.getRightElement(r.getElementId());this.getElementHasBottomPlate(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else this.getElementHasBottomPlate(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}},{key:"correctKnotRightTopBack",value:function correctKnotRightTopBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getIndexInGridByElementId(t.getElementId()).backside){if(e.getPlannerHasActiveBackside())if(i)switch(this.getTopPlatesNumOfRightNeighbors(t,e,n)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n);break;case 3:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n);break;case 4:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,n)}else switch(this.getTopPlatesNumOfRightNeighbors(t,e,n)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else if(this.getElementHasTopPlate(t,e,n)){if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());this.getElementIsCornerElement(s,n)||this.getElementHasTopPlate(s,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n)}}else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&!this.getElementIsCornerElement(l,n)&&(this.getElementHasTopPlate(l,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n)){var r=e.getElementHasLeftElement(t.getElementId()),a=e.getElementHasRightElement(t.getElementId());if(r||a){if(a&&!r){var h=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":if(this.getElementIsCornerElement(h,n))if(e.getElementHasRightElement(h.getElementId())){var c=e.getRightElement(h.getElementId());this.getElementHasTopPlate(c,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(!a&&r)this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);else if(a&&r){var u=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":if(this.getElementIsCornerElement(u,n))if(e.getElementHasRightElement(u.getElementId())){var m=e.getRightElement(u.getElementId());this.getElementHasTopPlate(m,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(u,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}}])}(),d=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),g=function(){return(0,s.Z)((function ConstructionRulesHandler(t,e,n){var o=this;(0,i.Z)(this,ConstructionRulesHandler),(0,l.Z)(this,"getValueOfOptionOfArticle",void 0),(0,l.Z)(this,"checkArticleHasOption",void 0),(0,l.Z)(this,"updateCfgValuesByPlanner",void 0),(0,l.Z)(this,"constructionRules",void 0),(0,l.Z)(this,"constructionRulesLoaded",void 0),(0,l.Z)(this,"hideOptionsForConstruction",void 0),(0,l.Z)(this,"partlistHelper",void 0),(0,l.Z)(this,"getOptionVal",(function(t,e,n){if(n.has(t)&&n.get(t).has(e)){var i=n.get(t).get(e);return null!=i?i:""}var s=o.getValueOfOptionOfArticle(t,e);return null!=s?s:""})),(0,l.Z)(this,"hasOptionValue",(function(t,e,n){return!(!n.has(t)||!n.get(t).has(e))||!!o.getValueOfOptionOfArticle(t,e)})),(0,l.Z)(this,"setOptionValue",(function(t,e,n,i){var s;if(i.has(t)||i.set(t,new Map),null===(s=i.get(t))||void 0===s||s.set(e,n),o.hideOptionsForConstruction.has(t)){var l=o.hideOptionsForConstruction.get(t).indexOf(e);l>=0&&o.hideOptionsForConstruction.get(t).splice(l,1)}})),(0,l.Z)(this,"getElementHasBottomPlate",(function(t,e){if(o.constructionRules.knotInfo.elementsWithGroundPlate)for(var n=0;n<o.constructionRules.knotInfo.elementsWithGroundPlate.length;n++){var i=o.constructionRules.knotInfo.elementsWithGroundPlate[n].onOPT,s=o.constructionRules.knotInfo.elementsWithGroundPlate[n].onOPVs,l=o.getOptionVal(t.getElementId(),i,e);return o.arrayContainsValue(s,l)}return!1})),(0,l.Z)(this,"getElementIsCornerElement",(function(t,e){return o.constructionRules.hasCORNER&&o.arrayContainsValue(o.constructionRules.knotInfo.cornerElements.onOPVs,o.getOptionVal(t.getElementId(),o.constructionRules.knotInfo.cornerElements.onOPT,e))})),(0,l.Z)(this,"getElementIsGarderobeElement",(function(t,e){return o.constructionRules.hasGARDEROBE&&o.arrayContainsValue(o.constructionRules.knotInfo.garderobeElements.onOPVs,o.getOptionVal(t.getElementId(),o.constructionRules.knotInfo.garderobeElements.onOPT,e))})),(0,l.Z)(this,"getCornerType",(function(t,e){return"OPVECK_I"==o.getOptionVal(t.getElementId(),"OPTELEMENT",e)?"INSIDE":"OPVECK_A"==o.getOptionVal(t.getElementId(),"OPTELEMENT",e)?"OUTSIDE":"NOCORNER"})),(0,l.Z)(this,"getElementHasTopPlate",(function(t,e,n){return!e.getElementHasTopElement(t.getElementId())||o.getElementHasBottomPlate(e.getTopElement(t.getElementId()),n)})),this.constructionRulesLoaded=!1,this.getValueOfOptionOfArticle=t,this.checkArticleHasOption=e,this.hideOptionsForConstruction=new Map,this.updateCfgValuesByPlanner=n,this.partlistHelper=new m(this.getOptionVal,this.setOptionValue,this.getElementHasBottomPlate,this.getElementIsCornerElement,this.getCornerType,this.getElementHasTopPlate,this.getElementIsGarderobeElement)}),[{key:"arrayContainsValue",value:function arrayContainsValue(t,e){if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}var o=t.split(";");for(n=0;n<o.length;n++)if(o[n]==e)return!0;return!1}},{key:"evalRule",value:function evalRule(t,e,n){for(var o=!0,i=e.split("&"),s=0;s<i.length;s++){var l=i[s].split("=")[0],r=i[s].split("=")[1],a=this.getOptionVal(t,l,n);a&&a!=r&&(o=!1)}return o}},{key:"setOptionDoShow",value:function setOptionDoShow(t,e,n){var o,i=this.constructionRules.optionsVisibilityInfo[e];null!=i.doShow&&(n.has(t)||n.set(t,new Map),null===(o=n.get(t))||void 0===o||o.set(e,i.doShow));if(this.hideOptionsForConstruction.has(t)){var s,l=this.hideOptionsForConstruction.get(t).indexOf(e);if(l>=0)null===(s=this.hideOptionsForConstruction.get(t))||void 0===s||s.splice(l,1)}}},{key:"setOptionDoHide",value:function setOptionDoHide(t,e,n){var o,i,s=this.constructionRules.optionsVisibilityInfo[e];n.has(t)||n.set(t,new Map),null===(o=n.get(t))||void 0===o||o.set(e,s.doHide),this.hideOptionsForConstruction.has(t)||this.hideOptionsForConstruction.set(t,[]),null===(i=this.hideOptionsForConstruction.get(t))||void 0===i||i.push(e)}},{key:"getCurOptionBasedConstructionRules",value:function getCurOptionBasedConstructionRules(t,e){for(var n=[],o=0;o<this.constructionRules.optionBasedConstructionRules.length;o++){var i=this.constructionRules.optionBasedConstructionRules[o];this.getOptionVal(t,i.masterOptionName,e)==i.masterOptionValue&&n.push(i)}return n}},{key:"setAllOptToDefault",value:function setAllOptToDefault(t,e,n,o){for(var i=[],s=void 0,l=0;l<this.constructionRules.optionsInfluenceRulesOfAllElements.length;l++){var r=this.constructionRules.optionsInfluenceRulesOfAllElements[l];for(var a in n)a==r.onOPT&&this.arrayContainsValue(r.onOPVs,n[a])&&i.push({opt:r.influenceOPT,opv:r.forceOPV,unvalidOPVs:r.unvalidOPVs,warning:r.warning,doShowWarning:!1})}for(var h=t.getAllElementIdsInGrid(),c=0;c<h.length;c++){var u;if(this.hideOptionsForConstruction.has(h[c])&&this.hideOptionsForConstruction.get(h[c]).length>0){for(;this.hideOptionsForConstruction.get(h[c]).length>0;){var m=this.hideOptionsForConstruction.get(h[c])[0];this.setOptionDoShow(h[c],m,e)}this.hideOptionsForConstruction.delete(h[c])}this.constructionRules.hasDMOD&&(t.getPlannerHasActiveBackside()?this.setOptionDoShow(h[c],"OPTDMOD",e):this.setOptionDoHide(h[c],"OPTDMOD",e));var d=t.getColumnCount();d>1?this.setOptionDoShow(h[c],"OPTMULTICOL",e):this.setOptionDoHide(h[c],"OPTMULTICOL",e),this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVOHNE",e),this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVOHNE",e);var g=t.getIndexInGridByElementId(h[c]);if(g.backside)this.setOptionValue(h[c],"OPTELEM_ON_BACK","OPVJA",e);else{if(this.setOptionValue(h[c],"OPTELEM_ON_BACK","OPVNEIN",e),g.col>0){var E=t.getPlannerElementAtGridPos(g.col-1,0,!1);if(E){var I=this.getOptionVal(E.getElementId(),"OPTELEMENT",e);"OPVECK_I"==I?this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVECK_I",e):"OPVECK_A"==I?this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVECK_A",e):this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVOHNE",e)}}if(g.col<d-1){var O=t.getPlannerElementAtGridPos(g.col+1,0,!1);if(O){var k=this.getOptionVal(O.getElementId(),"OPTELEMENT",e);"OPVECK_I"==k?this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVECK_I",e):"OPVECK_A"==k?this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVECK_A",e):this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVOHNE",e)}}}if(this.constructionRules.avoidOptionLastCol){var f=this.getOptionVal(h[c],this.constructionRules.avoidOptionLastCol.onOPT,e);this.arrayContainsValue(this.constructionRules.avoidOptionLastCol.onOPVs,f)&&g.col==d-1&&this.setOptionValue(h[c],this.constructionRules.avoidOptionLastCol.onOPT,this.constructionRules.avoidOptionLastCol.defaultOpv,e)}if(this.constructionRules.avoidOptionFirstCol){var R=this.getOptionVal(h[c],this.constructionRules.avoidOptionFirstCol.onOPT,e);this.arrayContainsValue(this.constructionRules.avoidOptionFirstCol.onOPVs,R)&&0==g.col&&this.setOptionValue(h[c],this.constructionRules.avoidOptionFirstCol.onOPT,this.constructionRules.avoidOptionFirstCol.defaultOpv,e)}var p=this.hasOptionValue(h[c],"OPTWW",e);if(t.getElementIsFirstInGrid(h[c])?(this.setOptionDoShow(h[c],"OPTWERKZEUGKASTEN",e),p&&(t.getSizeOfWholeSet().y>173&&!t.getPlannerHasActiveBackside()?this.setOptionDoShow(h[c],"OPTWW",e):this.setOptionDoHide(h[c],"OPTWW",e))):(this.setOptionDoHide(h[c],"OPTWERKZEUGKASTEN",e),p&&this.setOptionDoHide(h[c],"OPTWW",e)),e.has(h[c])||e.set(h[c],new Map),null===(u=e.get(h[c]))||void 0===u||u.set("DEBUG",t.getElementById(h[c]).getPosNr()+""),i.length>0)for(var P=0;P<i.length;P++){var T=this.getOptionVal(h[c],i[P].opt,e),V=!1;if(i[P].unvalidOPVs&&0!=i[P].unvalidOPVs.length){for(var _=i[P].unvalidOPVs.split(";"),B=0;B<_.length;B++)if(_[B]==T){V=!0;break}}else V=!0;V&&(T!=i[P].opv&&(this.setOptionValue(h[c],i[P].opt,i[P].opv,e),i[P].doShowWarning||(i[P].doShowWarning=!0,s=i[P].warning)))}if(n)for(var a in n)if(""!=a&&n[a]&&""!=n[a])for(l=0;l<this.constructionRules.optionsInfluenceRulesOfSingleElement.length;l++){r=this.constructionRules.optionsInfluenceRulesOfSingleElement[l];var v=!1;if(r.dir&&o&&o.length>0){if("TOP"==r.dir&&t.getElementHasBottomElement(h[c])&&o.indexOf(t.getBottomElement(h[c]).getElementId())>=0&&(v=!0),"DOWN"==r.dir&&t.getElementHasTopElement(h[c])&&o.indexOf(t.getTopElement(h[c]).getElementId())>=0&&(v=!0),"LEFT_RIGHT"==r.dir&&(t.getElementHasLeftElement(h[c])&&o.indexOf(t.getLeftElement(h[c]).getElementId())>=0||t.getElementHasRightElement(h[c])&&o.indexOf(t.getRightElement(h[c]).getElementId())>=0)&&(v=!0),"COL"==r.dir){var G=t.getIndexInGridByElementId(h[c]);t.getAllElementsInColumn(G.col,G.backside).forEach((function(t){return o.indexOf(t.ElementId)>=0?v=!0:void 0}))}if("BACK"==r.dir&&t.getPlannerHasActiveBackside()){var b=t.getOppositeElement(h[c]);b&&o.indexOf(b.getElementId())>=0&&(v=!0)}}else v=!0;if(v){T=this.getOptionVal(h[c],r.influenceOPT,e);a==r.onOPT&&T&&""!=T&&this.arrayContainsValue(r.unvalidOPVs,T)&&this.arrayContainsValue(r.onOPVs,n[a])&&(this.setOptionValue(h[c],r.influenceOPT,r.defaultOpv,e),r.warning&&(s=r.warning))}}var H=this.getCurOptionBasedConstructionRules(h[c],e);if(H)for(var C=0;C<H.length;C++)if(H[C].defaultOptions)for(var D=0;D<H[C].defaultOptions.length;D++){var L=H[C].defaultOptions[D];if(!L.rule||""==L.rule||this.evalRule(h[c],L.rule,e))for(var A=0;A<L.options.length;A++)"doShow"==L.value?this.setOptionDoShow(h[c],L.options[A],e):"doHide"==L.value&&this.setOptionDoHide(h[c],L.options[A],e),L.opv&&this.setOptionValue(h[c],L.options[A],L.opv,e)}this.setOptionValue(h[c],"OPTFAF_L_V","OPVOHNE_FAF",e),this.setOptionValue(h[c],"OPTFAF_L_H","OPVOHNE_FAF",e),this.setOptionValue(h[c],"OPTFAF_R_V","OPVOHNE_FAF",e),this.setOptionValue(h[c],"OPTFAF_R_H","OPVOHNE_FAF",e)}return s}},{key:"doCorrectAffectedElementsByOption",value:function doCorrectAffectedElementsByOption(t,e,n,o){if(null!=o&&1==o.length){var i=o[0];if(null!=n)for(var s in n){if(this.constructionRules.forceSameOptionInGrid&&this.arrayContainsValue(this.constructionRules.forceSameOptionInGrid,s)){var l=t.getIndexInGridByElementId(i).backside?t.getAllElementsInBackGrid():t.getAllElementsInFrontGrid();if(null!=l)for(var r=0;r<l.length;r++)this.setOptionValue(l[r].ElementId,s,n[s],e)}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInCol,s)){var a=t.getIndexInGridByElementId(i),h=t.getAllElementsInColumn(a.col,a.backside);if(null!=h){if(t.getPlannerHasActiveBackside()){var c,u=t.getAllElementsInColumn(a.col,!a.backside);u&&(h=null===(c=h)||void 0===c?void 0:c.concat(u))}for(r=0;r<h.length;r++)this.setOptionValue(h[r].ElementId,s,n[s],e)}}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInRow,s)){var m=t.getIndexInGridByElementId(i),d=t.getAllElementsInRow(m.row,m.backside);if(d&&t.getPlannerHasActiveBackside()){var g=t.getAllElementsInRow(m.row,!m.backside);g&&(d=d.concat(g))}for(r=0;r<d.length;r++)this.setOptionValue(d[r].ElementId,s,n[s],e)}}var E=t.getIndexInGridByElementId(i),I=t.getAllElementsInRow(E.row,E.backside);for(r=0;r<I.length;r++)if(I[r].getElementId()!=i)for(var O=0;O<this.constructionRules.forceSameOptionInRow.length;O++){var k=this.getOptionVal(I[r].getElementId(),this.constructionRules.forceSameOptionInRow[O],e);this.setOptionValue(i,this.constructionRules.forceSameOptionInRow[O],k,e);break}}}},{key:"handleVisibility_SHOW_HIDE",value:function handleVisibility_SHOW_HIDE(t,e,n,o){if(this.checkArticleHasOption(t,n.OPTCurrentElem)&&this.checkArticleHasOption(e,n.OPTNeighborElem)){var i=this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.get(t).indexOf(n.OPTCurrentElem)>=0;this.setOptionDoHide(e,n.OPTNeighborElem,o),i||this.setOptionDoShow(t,n.OPTCurrentElem,o)}}},{key:"handleBacksideVisibility_SHOW_HIDE",value:function handleBacksideVisibility_SHOW_HIDE(t,e,n,o){if(this.checkArticleHasOption(t,n.OPTCurrentElem)&&this.checkArticleHasOption(e,n.OPTNeighborElem)){var i=this.constructionRules.optionsVisibilityInfo[n.OPTCurrentElem],s=this.constructionRules.optionsVisibilityInfo[n.OPTNeighborElem];i&&s&&this.getOptionVal(t,n.OPTCurrentElem,o)==i.doShow&&this.getOptionVal(e,n.OPTNeighborElem,o)==s.doShow&&this.setOptionDoHide(t,n.OPTCurrentElem,o)}}},{key:"handleVisibiliy_HIDE_HIDE",value:function handleVisibiliy_HIDE_HIDE(t,e,n,o){var i=this.constructionRules.optionsVisibilityInfo[n.OPTCurrentElem];if(this.checkArticleHasOption(t,n.OPTCurrentElem)&&this.checkArticleHasOption(e,n.OPTNeighborElem)){var s=this.constructionRules.optionsVisibilityInfo[n.OPTNeighborElem],l=i.doShow==this.getOptionVal(t,n.OPTCurrentElem,o),r=this.getOptionVal(e,n.OPTNeighborElem,o)==s.doShow;l&&r&&(this.setOptionDoHide(t,n.OPTCurrentElem,o),this.setOptionDoHide(e,n.OPTNeighborElem,o))}}},{key:"correctSimpleOpt",value:function correctSimpleOpt(t,e,n,o,i){var s=n.getPlannerElementAtGridPos(t,e,i);if(this.constructionRules.defaultConstructionRules.TOP){var l=void 0;if(n.getElementHasTopElement(s.ElementId)){l=n.getPlannerElementAtGridPos(t,e+1,i);for(var r=0;r<this.constructionRules.defaultConstructionRules.TOP.length;r++){var a=this.constructionRules.defaultConstructionRules.TOP[r];"SHOW_HIDE"==a.OPTValueRule?this.handleVisibility_SHOW_HIDE(s.ElementId,l.ElementId,a,o):"HIDE_HIDE"==a.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(s.ElementId,l.ElementId,a,o)}}}if(this.constructionRules.defaultConstructionRules.RIGHT){var h=void 0;if(i?n.getElementHasLeftElement(s.ElementId):n.getElementHasRightElement(s.ElementId)){h=i?n.getPlannerElementAtGridPos(t-1,e,i):n.getPlannerElementAtGridPos(t+1,e,i);for(r=0;r<this.constructionRules.defaultConstructionRules.RIGHT.length;r++){var c=this.constructionRules.defaultConstructionRules.RIGHT[r];"SHOW_HIDE"==c.OPTValueRule?this.handleVisibility_SHOW_HIDE(s.ElementId,h.ElementId,c,o):"HIDE_HIDE"==c.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(s.ElementId,h.ElementId,c,o)}}}if(this.constructionRules.defaultConstructionRules.DOWN){var u=void 0;if(e>0){u=n.getPlannerElementAtGridPos(t,e-1,i);for(r=0;r<this.constructionRules.defaultConstructionRules.DOWN.length;r++){var m=this.constructionRules.defaultConstructionRules.DOWN[r];"SHOW_HIDE"==m.OPTValueRule?this.handleVisibility_SHOW_HIDE(s.ElementId,u.ElementId,m,o):"HIDE_HIDE"==m.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(s.ElementId,u.ElementId,m,o)}}}var d=i?n.getLeftElement(s.ElementId):n.getRightElement(s.ElementId),g=i?n.getRightElement(s.ElementId):n.getLeftElement(s.ElementId),E=n.getTopElement(s.ElementId),I=n.getBottomElement(s.ElementId),O=i?n.getTopLeftElement(s.ElementId):n.getTopRightElement(s.ElementId);d?this.setOptionValue(s.ElementId,"OPTNACHBAR_RECHTS",this.getOptionVal(d.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_RECHTS",o),g?this.setOptionValue(s.ElementId,"OPTNACHBAR_LINKS",this.getOptionVal(g.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_LINKS",o),E?this.setOptionValue(s.ElementId,"OPTNACHBAR_OBEN",this.getOptionVal(E.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_OBEN",o),O?this.setOptionValue(s.ElementId,"OPTNACHBAR_OBEN_RECHTS",this.getOptionVal(O.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_OBEN_RECHTS",o),this.constructionRules.hasNeighbors&&this.constructionRules.hasNeighbors.indexOf("OPTNACHBAR_UNTEN")>=0&&(I?this.setOptionValue(s.ElementId,"OPTNACHBAR_UNTEN",this.getOptionVal(I.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_UNTEN",o))}},{key:"correctBack",value:function correctBack(t,e,n){if(this.constructionRules.hasDMOD)if(t.getPlannerHasActiveBackside()){var o=void 0;if(o=t.getOppositeElement(n),this.constructionRules.defaultConstructionRules.BACK)for(var i=0;i<this.constructionRules.defaultConstructionRules.BACK.length;i++){var s,l,r=this.constructionRules.defaultConstructionRules.BACK[i],a=!1;if(r.hideOnElemAndOppositeOPT&&r.hideOnElemAndOppositeOPV)this.arrayContainsValue(r.hideOnElemAndOppositeOPV,this.getOptionVal(n,r.hideOnElemAndOppositeOPT,e))&&this.arrayContainsValue(r.hideOnElemAndOppositeOPV,this.getOptionVal(null===(s=o)||void 0===s?void 0:s.getElementId(),r.hideOnElemAndOppositeOPT,e))&&(a=!0);if(a)this.setOptionDoHide(n,r.OPTCurrentElem,e),this.setOptionDoHide(o.getElementId(),r.OPTCurrentElem,e);else if("FORCE_HIDE"==r.OPTValueRule&&this.setOptionDoHide(o.getElementId(),r.OPTCurrentElem,e),"SHOW_HIDE"==r.OPTValueRule)this.handleBacksideVisibility_SHOW_HIDE(null===(l=o)||void 0===l?void 0:l.getElementId(),n,r,e);else"HIDE_HIDE"==r.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(o.ElementId,n,r,e)}this.getElementHasBottomPlate(o,e)?this.setOptionDoShow(n,"OPTOPP_RAHMEN_U_V",e):this.setOptionDoHide(n,"OPTOPP_RAHMEN_U_V",e),this.getElementHasTopPlate(o,t,e)?this.setOptionDoShow(n,"OPTOPP_RAHMEN_O_V",e):this.setOptionDoHide(n,"OPTOPP_RAHMEN_O_V",e)}else this.setOptionDoHide(n,"OPTOPP_RAHMEN_U_V",e),this.setOptionDoHide(n,"OPTOPP_RAHMEN_O_V",e)}},{key:"correctBottom",value:function correctBottom(t,e,n){var o="";if(this.constructionRules.correctLeftRight&&null!=this.constructionRules.correctLeftRight.rowIndex)for(var i=t.getAllElementsInRow(this.constructionRules.correctLeftRight.rowIndex,n),s=0;s<i.length;s++){var l=i[s];if(0==s){if(null==(o=this.getOptionVal(l.ElementId,this.constructionRules.correctLeftRight.optWithOptVal,e)))return;n?this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optRight,o,e):(this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optLeft,o,e),this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optLeftBack,o,e))}n?this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optLeft,o,e):(this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optRight,o,e),this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optRightBack,o,e))}}},{key:"getValidLadder",value:function getValidLadder(t,e,n){for(var o=e.getAllElementsInColumn(t,!1),i=0;i<this.constructionRules.correctLadder.validLadder.length;i++){var s=this.constructionRules.correctLadder.validLadder[i];if(o.length==s.colCount){for(var l=!0,r=0;r<o.length;r++){var a=o[r];if(this.getOptionVal(a.ElementId,s.heightOption,n)!=s.heightPerRow[r]&&(l=!1),!l)break}if(l)return s}}}},{key:"correctLadder",value:function correctLadder(t,e){if(this.constructionRules.correctLadder){for(var n=t.getAllElementsInRow(this.constructionRules.correctLadder.rowIndex,!1),o=0;o<n.length;o++){var i=t.getRowCount(o);if(this.constructionRules.correctLadder.onElementHighestRowCount&&-1==this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(i))for(var s=t.getAllElementsInColumn(o,!1),l=0;l<s.length;l++)this.setOptionValue(s[l].ElementId,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,e);if(i<t.getSizeOfHighesRow(!1)){var r,a=null===(r=t.getPlannerElementAtGridPos(o,i-1,!1))||void 0===r?void 0:r.getElementId();a&&this.getOptionVal(a,this.constructionRules.correctLadder.optHeight,e)==this.constructionRules.correctLadder.opvProblematicHeight&&this.setOptionValue(a,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,e)}}for(o=0;o<n.length;o++){var h=n[o],c=this.getValidLadder(o,t,e);0==o&&this.setOptionValue(h.ElementId,this.constructionRules.correctLadder.optLadderLeft,c.optLadder,e);var u=c;if(t.getElementHasRightElement(h.getElementId())){var m=this.getValidLadder(o+1,t,e);m.colCount>c.colCount&&(u=m)}this.setOptionValue(h.getElementId(),this.constructionRules.correctLadder.optLadderRight,u.optLadder,e)}var d=t.getSizeOfHighesRow(!1);if(this.constructionRules.correctLadder.onElementHighestRowCount&&this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(d)>=0){var g=t.getAllElementsInRow(d-1,!1);for(o=0;o<g.length;o++){var E=g[o];this.setOptionDoShow(E.getElementId(),this.constructionRules.correctLadder.optHasHeight,e)}}}}},{key:"correctSeries",value:function correctSeries(t,e){for(var n=!1,o=t.getAllElementIdsInGrid(),i=!1,s=!1,l=0;l<o.length;l++){var r=o[l];this.getElementIsCornerElement(t.getElementById(r),e)&&(i=!0),this.checkArticleHasOption(r,"OPTBR_ABDECKPLATTE")&&this.setOptionDoHide(r,"OPTBR_ABDECKPLATTE",e);var a=this.getOptionVal(r,"OPTABDECKPLATTE",e);this.checkArticleHasOption(r,"OPTABDECKPLATTE")&&"OPVMIT_PLATTE"==a&&(n=!0),"OPVBR_18"==this.getOptionVal(r,"OPTBR",e)&&(s=!0)}if(!t.getPlannerHasActiveBackside()&&t.getPlannerElementAtGridPos(0,0,!1)){for(var h=t.getSizeOfHighesRow(!1),c=[],u=[],m=[],d=0,g=0,E=t.getAllElementsInColumn(g,!1);null!=E;){if(E.length==h){var I=E[h-1];m.push(I),"OPVBR_75"==(a=this.getOptionVal(I.ElementId,"OPTBR",e))?d+=75:"OPVBR_18"==a?d+=18.75:"OPVBR_37"==a&&(d+=37.5),this.setOptionDoHide(I.ElementId,"OPTOBEN",e)}else m.length>0&&(c.push(m),u.push(d)),m=[],d=0;g++,E=t.getAllElementsInColumn(g,!1)}for(m.length>0&&(c.push(m),u.push(d)),l=0;l<c.length;l++){var O=c[l][0],k="";if(this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_40")>=0&&Math.abs(u[l]-40.4)<3?k="OPVABDECKPLATTE_40":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_77")>=0&&Math.abs(u[l]-77.8)<3?k="OPVABDECKPLATTE_77":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_115")>=0&&Math.abs(u[l]-115.3)<3?k="OPVABDECKPLATTE_115":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_152")>=0&&Math.abs(u[l]-152.8)<3?k="OPVABDECKPLATTE_152":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_190")>=0&&Math.abs(u[l]-190.3)<3?k="OPVABDECKPLATTE_190":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_227")>=0&&Math.abs(u[l]-227.8)<3&&(k="OPVABDECKPLATTE_227"),""==k||i)for(var f=t.getAllElementsInGrid(),R=0;R<f.length;R++)this.checkArticleHasOption(f[R].getElementId(),"OPTABD_HIDE")&&this.setOptionDoShow(f[R].getElementId(),"OPTABD_HIDE",e);else for(var p=t.getAllElementsInGrid(),P=0;P<p.length;P++)this.checkArticleHasOption(p[P].getElementId(),"OPTABD_HIDE")&&this.setOptionDoHide(p[P].getElementId(),"OPTABD_HIDE",e);if(""==k||!n||i||s)for(var T=0;T<c[l].length;T++)this.setOptionDoShow(c[l][T].ElementId,"OPTOBEN",e);else this.setOptionValue(O.ElementId,"OPTBR_ABDECKPLATTE",k,e)}}}},{key:"correctForceOptOfElement",value:function correctForceOptOfElement(t,e,n,o){var i=e.getIndexInGridByElementId(t);if(i)for(var s=this.getCurOptionBasedConstructionRules(t,n),l=0;l<s.length;l++){if(s[l].forceOptions)for(var r=0;r<s[l].forceOptions.length;r++){var a=s[l].forceOptions[r];if(!a.rule||""==a.rule||this.evalRule(t,a.rule,n))for(var h=a.options,c=a.value,u=0;u<h.length;u++){var m=h[u],d=this.constructionRules.optionsVisibilityInfo[m];if(d.complementDir){var g=d.complementDir;o&&("LEFT"==g?g="RIGHT":"RIGHT"==g&&(g="LEFT"));var E=e.getNeighborElement(i.col,i.row,g,i.backside);if(null!=E){for(var I=this.getCurOptionBasedConstructionRules(E.ElementId,n),O=d.complementOPT,k=!1,f=0;f<I.length;f++)if(I[f].forceOptions)for(var R=0;R<I[f].forceOptions.length;R++){var p=I[f].forceOptions[R];if((!p.rule||""==p.rule||this.evalRule(E.ElementId,p.rule,n))&&(this.arrayContainsValue(p.options,O)&&(k=!0,"doShow"==c&&"doShow"==p.value&&("OPVFUELLUNG"==this.getOptionVal(t,"OPTELEMENT",n)&&"OPVFUELLUNG"==this.getOptionVal(E.ElementId,"OPTELEMENT",n)?(this.setOptionDoHide(E.ElementId,O,n),this.setOptionDoHide(E.ElementId,O,n)):this.setOptionDoShow(E.ElementId,O,n)),"doHide"==c&&"doHide"==p.value&&(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)),"doShow"==c&&"doHide"==p.value||"doHide"==c&&"doShow"==p.value))){var P=!0;a.prio&&p.prio?P=a.prio<=p.prio:a.prio?P=!0:p.prio&&(P=!1),P?"doHide"==c?(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)):"doShow"==c&&(this.setOptionDoShow(t,m,n),this.setOptionDoHide(E.ElementId,O,n)):"doHide"==p.value?(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)):"doShow"==p.value&&(this.setOptionDoHide(t,m,n),this.setOptionDoShow(E.ElementId,O,n))}}k||("doShow"==c&&(this.setOptionDoShow(t,m,n),this.setOptionDoHide(E.ElementId,O,n)),"doHide"==c&&(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)))}else"doShow"==c&&this.setOptionDoShow(t,m,n),"doHide"==c&&this.setOptionDoHide(t,m,n)}}}if(s[l].changeOptions)for(var T=0;T<s[l].changeOptions.length;T++){for(var V=!0,_=s[l].changeOptions[T].rule.split("&"),B=0;B<_.length;B++)if(_[B].indexOf("!=")>0){var v=_[B].split("!=")[0],G=_[B].split("!=")[1];this.getOptionVal(t,v,n)==G&&(V=!1)}else{v=_[B].split("=")[0],G=_[B].split("=")[1];this.getOptionVal(t,v,n)!=G&&(V=!1)}V&&(s[l].changeOptions[T].doShow&&this.setOptionDoShow(t,s[l].changeOptions[T].doShow,n),s[l].changeOptions[T].doHide&&this.setOptionDoHide(t,s[l].changeOptions[T].doHide,n),s[l].changeOptions[T].opt&&s[l].changeOptions[T].opv&&this.setOptionValue(t,s[l].changeOptions[T].opt,s[l].changeOptions[T].opv,n))}}}},{key:"correctNeighborCustomOLTs",value:function correctNeighborCustomOLTs(t,e,n){if(this.constructionRules.correctNeighborOPT&&0!=this.constructionRules.correctNeighborOPT.length)for(var o=0;o<this.constructionRules.correctNeighborOPT.length;o++){var i=e.getIndexInGridByElementId(t);if(this.setOptionValue(t,this.constructionRules.correctNeighborOPT[o].opt,"OPVOHNE",n),!i)return;var s=e.getNeighborElement(i.col,i.row,this.constructionRules.correctNeighborOPT[o].dir,i.backside);if(null!=s){var l=this.getOptionVal(s.ElementId,this.constructionRules.correctNeighborOPT[o].neighborOPT,n);""!=l&&this.setOptionValue(t,this.constructionRules.correctNeighborOPT[o].opt,l,n)}}}},{key:"doChangeRetailArticleNumbers",value:function doChangeRetailArticleNumbers(t,e){var n=t.getAllElementsInGrid();if(this.constructionRules.correctRetailArticleNumberByRule&&this.constructionRules.correctRetailArticleNumberByRule.length>0)for(var o=!0,i=0;i<this.constructionRules.correctRetailArticleNumberByRule.length;i++){var s=this.constructionRules.correctRetailArticleNumberByRule[i];if("global"==s.range){for(var l=0;l<n.length&&o;l++){this.evalRule(n[l].getElementId(),s.rule,e)||(o=!1)}if(o)return{doChange:!0,retailArticleRules:s.retailArticleRules}}}return{doChange:!1}}},{key:"setConstructionRules",value:function setConstructionRules(t){t&&t.constructionRules&&(this.constructionRules=t.constructionRules,this.partlistHelper.setConstructionRules(t.constructionRules),this.constructionRulesLoaded=!0)}},{key:"getConstructionRulesLoaded",value:function getConstructionRulesLoaded(){return this.constructionRulesLoaded}},{key:"updateOptionLogicBoxPlanner",value:(t=(0,o.Z)(a().mark((function _callee(t,e,n,o){var i,s,l,r,c,u,m;return a().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(null!=this.constructionRules&&this.constructionRulesLoaded){a.next=3;break}return d.error(new h.GE("Error construction rules are not set for boxPlanner",{code:"WC_0012"})),a.abrupt("return");case 3:if(i=(new Date).getTime(),s=void 0,d.debug("BoxPlanner - updateOptionLogicInGrid start updateOptionLogicInGrid"),l=new Map,o)for(r=t.getAllElementIdsInGrid(),e=void 0,n=void 0,c=0;c<r.length;c++)this.getElementIsCornerElement(t.getElementById(r[c]),l)&&this.setOptionValue(r[c],"OPTELEMENT","OPVOFFENES_FACH",l);for(s=this.setAllOptToDefault(t,l,e,n),this.doCorrectAffectedElementsByOption(t,l,e,n),this.correctBottom(t,l,!1),t.getPlannerHasActiveBackside()&&this.correctBottom(t,l,!0),this.correctSeries(t,l),c=0;c<t.getColumnCount();c++)for(u=0;u<t.getRowCount(c);u++)this.correctSimpleOpt(c,u,t,l,!1);if(t.getPlannerHasActiveBackside())for(c=t.getColumnCount()-1;c>=0;c--)for(u=0;u<t.getRowCount(c);u++)this.correctSimpleOpt(c,u,t,l,!0);for(c=0;c<t.getColumnCount();c++)for(u=0;u<t.getRowCount(c);u++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(c,u,!1).ElementId,t,l,!1),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(c,u,!1).ElementId,t,l);if(t.getPlannerHasActiveBackside())for(c=t.getColumnCount()-1;c>=0;c--)for(u=0;u<t.getRowCount(c);u++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(c,u,!0).ElementId,t,l,!0),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(c,u,!0).ElementId,t,l);for(this.correctLadder(t,l),this.partlistHelper.calculateKnots(t,l),this.partlistHelper.calculateRahmen(t,l),c=0;c<t.getColumnCount();c++)for(u=0;u<t.getRowCount(c);u++)this.correctBack(t,l,t.getPlannerElementAtGridPos(c,u,!1).getElementId());return m=this.doChangeRetailArticleNumbers(t,l),a.next=25,this.updateCfgValuesByPlanner(l,void 0,this.constructionRules.partlistRules.bundleRules,m);case 25:return d.debug("BoxPlanner updateOptionLogic - Duration after setting Option Values of all Articles: "+((new Date).getTime()-i)),d.debug("BoxPlanner updateOptionLogic - Duration after setting updating configurator: "+((new Date).getTime()-i)),a.abrupt("return",s);case 28:case"end":return a.stop()}}),_callee,this)}))),function updateOptionLogicBoxPlanner(e,n,o,i){return t.apply(this,arguments)})},{key:"onElemDeleted",value:function onElemDeleted(t){this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.delete(t)}},{key:"onElementCopy",value:function onElementCopy(t,e){if(this.hideOptionsForConstruction.has(t)){var n=this.hideOptionsForConstruction.get(t);this.hideOptionsForConstruction.set(e,(0,c.Z)(n))}}},{key:"getHasMaxElemCountPerColumn",value:function getHasMaxElemCountPerColumn(){return null!=this.constructionRules.maxElemCountPerCol}},{key:"getMaxElemCountPerColumn",value:function getMaxElemCountPerColumn(){return this.constructionRules.maxElemCountPerCol}}]);var t}(),E=n(64357),I=n(85398),O=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),k=function(){return(0,s.Z)((function BoxPlannerGrid(t){(0,i.Z)(this,BoxPlannerGrid),(0,l.Z)(this,"plannedElementGrid",void 0),(0,l.Z)(this,"backModulPlannedElementGrid",void 0),(0,l.Z)(this,"hasActiveBackside",void 0),(0,l.Z)(this,"getValueOfOptionOfArticle",void 0),this.plannedElementGrid=new Array(new Array),this.backModulPlannedElementGrid=new Array(new Array),this.hasActiveBackside=!1,this.getValueOfOptionOfArticle=t}),[{key:"getGridColumnWidth",value:function getGridColumnWidth(t,e){for(var n=-1,o=e?this.backModulPlannedElementGrid:this.plannedElementGrid,i=0;i<o[t].length;i++){var s=o[t][i]?null==o[t][i].Width?0:o[t][i].Width:0;s>n&&(n=s)}return n}},{key:"getGridColumnHeight",value:function getGridColumnHeight(t){var e=0;if(this.plannedElementGrid.length>t)for(var n=this.plannedElementGrid[t],o=0;o<n.length;o++){var i;e+=null===(i=n[o])||void 0===i?void 0:i.Height}return e}},{key:"deleteGridPos",value:function deleteGridPos(t){var e=new Array,n=t.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(1==n[t.col].length)for(var o=0;o<n.length;o++)o!=t.col&&(o<t.col?e[o]=n[o]:e[o-1]=n[o]);else for(o=0;o<n.length;o++)if(o!=t.col)e[o]=n[o];else{e[o]=new Array;for(var i=0;i<n[o].length;i++)i!=t.row&&(e[o][i]=n[o][i])}t.backside?this.backModulPlannedElementGrid=e:this.plannedElementGrid=e}},{key:"getPlannerElementAtGridPos",value:function getPlannerElementAtGridPos(t,e,n){var o=n?this.backModulPlannedElementGrid:this.plannedElementGrid;if(o[t]&&o[t][e])return o[t][e]}},{key:"getIndexInGridByElementId",value:function getIndexInGridByElementId(t){for(var e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)if(this.plannedElementGrid[e][n]&&this.plannedElementGrid[e][n].ElementId==t)return{col:e,row:n,backside:!1};for(e=0;e<this.backModulPlannedElementGrid.length;e++)for(n=0;n<this.backModulPlannedElementGrid[e].length;n++)if(this.backModulPlannedElementGrid[e][n]&&this.backModulPlannedElementGrid[e][n].ElementId==t)return{col:e,row:n,backside:!0};return{col:-1,row:-1,backside:!1}}},{key:"getAllElementIdsInGrid",value:function getAllElementIdsInGrid(){for(var t=[],e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)this.plannedElementGrid[e][n]&&t.push(this.plannedElementGrid[e][n].ElementId);for(e=0;e<this.backModulPlannedElementGrid.length;e++)for(n=0;n<this.backModulPlannedElementGrid[e].length;n++)this.backModulPlannedElementGrid[e][n]&&t.push(this.backModulPlannedElementGrid[e][n].ElementId);return t}},{key:"getAllElementsInFrontGrid",value:function getAllElementsInFrontGrid(){for(var t=[],e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)t.push(this.plannedElementGrid[e][n]);return t}},{key:"getAllElementsInBackGrid",value:function getAllElementsInBackGrid(){for(var t=[],e=0;e<this.backModulPlannedElementGrid.length;e++)for(var n=0;n<this.backModulPlannedElementGrid[e].length;n++)t.push(this.backModulPlannedElementGrid[e][n]);return t}},{key:"getAllElementsInGrid",value:function getAllElementsInGrid(){for(var t=[],e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)t.push(this.plannedElementGrid[e][n]);for(e=0;e<this.backModulPlannedElementGrid.length;e++)for(n=0;n<this.backModulPlannedElementGrid[e].length;n++)this.backModulPlannedElementGrid[e][n]&&t.push(this.backModulPlannedElementGrid[e][n]);return t}},{key:"getElementById",value:function getElementById(t){var e=this.getIndexInGridByElementId(t);return(e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid)[e.col][e.row]}},{key:"getElementIsFirstInGrid",value:function getElementIsFirstInGrid(t){var e=this.getIndexInGridByElementId(t);return 0==e.col&&0==e.row&&!e.backside}},{key:"getElementIsInLastCol",value:function getElementIsInLastCol(t,e){var n=e?this.backModulPlannedElementGrid:this.plannedElementGrid;return this.getIndexInGridByElementId(t).col+1==n.length}},{key:"getElementHasTopElement",value:function getElementHasTopElement(t){var e=this.getIndexInGridByElementId(t);return(e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid)[e.col].length>e.row+1}},{key:"getTopElement",value:function getTopElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(n[e.col].length>e.row+1)return n[e.col][e.row+1]}},{key:"getTopRightElement",value:function getTopRightElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(n.length>e.col+1&&null!=n[e.col+1][e.row+1])return n[e.col+1][e.row+1]}},{key:"getTopLeftElement",value:function getTopLeftElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(e.col>0&&null!=n[e.col-1][e.row-1])return n[e.col-1][e.row-1]}},{key:"getElementHasBottomElement",value:function getElementHasBottomElement(t){return this.getIndexInGridByElementId(t).row-1>=0}},{key:"getBottomElement",value:function getBottomElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(e.row-1>=0)return n[e.col][e.row-1]}},{key:"getElementHasRightElement",value:function getElementHasRightElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;return n.length>e.col+1&&null!=n[e.col+1][e.row]}},{key:"getRightElement",value:function getRightElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(n.length>e.col+1&&null!=n[e.col+1][e.row])return n[e.col+1][e.row]}},{key:"getElementHasLeftElement",value:function getElementHasLeftElement(t){var e=this.getIndexInGridByElementId(t);return e.col>0&&null!=this.getPlannerElementAtGridPos(e.col-1,e.row,e.backside)}},{key:"getLeftElement",value:function getLeftElement(t){var e=this.getIndexInGridByElementId(t);if(e.col>0&&null!=this.getPlannerElementAtGridPos(e.col-1,e.row,e.backside))return this.getPlannerElementAtGridPos(e.col-1,e.row,e.backside)}},{key:"getAllElementsInColumn",value:function getAllElementsInColumn(t,e){var n=e?this.backModulPlannedElementGrid:this.plannedElementGrid,o=new Array;if(!(t>=n.length)){for(var i=0;i<n[t].length;i++)n[t][i]&&o.push(n[t][i]);return n.length>t?o:void 0}}},{key:"getColumnCount",value:function getColumnCount(){return this.plannedElementGrid.length}},{key:"getRowCount",value:function getRowCount(t){return this.plannedElementGrid[t].length}},{key:"getAllElementsInRow",value:function getAllElementsInRow(t,e){for(var n=e?this.backModulPlannedElementGrid:this.plannedElementGrid,o=[],i=0;i<n.length;i++)n[i].length>t&&o.push(n[i][t]);return o}},{key:"getSizeOfHighesRow",value:function getSizeOfHighesRow(t){for(var e=t?this.backModulPlannedElementGrid:this.plannedElementGrid,n=0,o=0;o<e.length;o++)n<e[o].length&&(n=e[o].length);return n}},{key:"getNeighborElement",value:function getNeighborElement(t,e,n,o){var i=t,s=e;switch(n){case"TOP":s++;break;case"DOWN":s--;break;case"LEFT":i--;break;case"RIGHT":i++;break;case"BACK":this.hasActiveBackside&&(o=!o)}return this.getPlannerElementAtGridPos(i,s,o)}},{key:"getOppositeElement",value:function getOppositeElement(t){if(this.hasActiveBackside){var e=this.getIndexInGridByElementId(t);return e.backside?this.plannedElementGrid[e.col][e.row]:this.backModulPlannedElementGrid[e.col][e.row]}}},{key:"getAllOppositeElements",value:function getAllOppositeElements(t){var e=[];if(this.hasActiveBackside)for(var n=0;n<t.length;n++){var o=this.getIndexInGridByElementId(t[n]);o.backside?e.push(this.plannedElementGrid[o.col][o.row].getElementId()):this.backModulPlannedElementGrid[o.col][o.row]&&e.push(this.backModulPlannedElementGrid[o.col][o.row].getElementId())}return e}},{key:"getSizeOfWholeSet",value:function getSizeOfWholeSet(){for(var t=0,e=0,n=0,o=0;o<this.plannedElementGrid.length;o++){for(var i=0,s=0;s<this.plannedElementGrid[o].length;s++){var l=this.plannedElementGrid[o][s];i+=l.getHeight(),0==o&&0==s&&(e=l.getDepth())}i>n&&(n=i);var r=this.getGridColumnWidth(o,!1);o>0&&(77.9==r?r=75:40.4==r?r=37.5:21.7==r&&(r=18.75)),t+=r}return this.hasActiveBackside&&(e*=2),new E.P(t,n,e)}},{key:"getAllElementsDown",value:function getAllElementsDown(t){var e=this.getIndexInGridByElementId(t);if(0==e.row)return{elements:[],backside:!1};for(var n=[],o=0;o<e.row;o++){var i=this.getPlannerElementAtGridPos(e.col,o,e.backside);null!=i&&n.push(i.ElementId)}return{elements:n,backside:e.backside}}},{key:"prepareGridForCopy",value:function prepareGridForCopy(t,e){var n=this.getIndexInGridByElementId(t),o=0;switch(e){case"AVL":o=n.col;break;case"AVR":o=n.col+1}for(var i=new Array,s=0;s<this.plannedElementGrid.length+1;s++)i[s]=new Array;for(s=0;s<this.plannedElementGrid.length;s++)for(var l=0;l<this.plannedElementGrid[s].length;l++)s<o?i[s][l]=this.plannedElementGrid[s][l]:i[s+1][l]=this.plannedElementGrid[s][l];if(this.plannedElementGrid=i,this.hasActiveBackside){i=new Array;for(s=0;s<this.backModulPlannedElementGrid.length+1;s++)i[s]=new Array;for(s=0;s<this.backModulPlannedElementGrid.length;s++)for(l=0;l<this.backModulPlannedElementGrid[s].length;l++)s<o?i[s][l]=this.backModulPlannedElementGrid[s][l]:i[s+1][l]=this.backModulPlannedElementGrid[s][l];this.backModulPlannedElementGrid=i}}},{key:"prepareGridForBackSideCopy",value:function prepareGridForBackSideCopy(){this.backModulPlannedElementGrid=new Array;for(var t=0;t<this.plannedElementGrid.length;t++)this.backModulPlannedElementGrid.push(new Array);this.hasActiveBackside=!0}},{key:"addElementAtGridPos",value:function addElementAtGridPos(t,e,n,o){var i=o?this.backModulPlannedElementGrid:this.plannedElementGrid;i&&0!=i.length||(i=new Array),i[e]&&0!=i[e].length||(i[e]=new Array),i[e][n]=t,o?(this.hasActiveBackside=!0,this.backModulPlannedElementGrid=i):this.plannedElementGrid=i}},{key:"addElementAsCopy",value:function addElementAsCopy(t,e,n){var o=this.getIndexInGridByElementId(t),i=o.backside?this.backModulPlannedElementGrid:this.plannedElementGrid,s=!0;switch(n){case"AVR":i[o.col+1][o.row]=e;break;case"AVL":i[o.col-1][o.row]=e;break;case"AVO":i[o.col][o.row+1]=e;break;case"BACKSIDE":this.backModulPlannedElementGrid[o.col][o.row]=e,s=!1}s&&(o.backside?this.backModulPlannedElementGrid=i:this.plannedElementGrid=i)}},{key:"deleteElement",value:function deleteElement(t,e){var n=this.getIndexInGridByElementId(t),o=[];!this.hasActiveBackside||e&&"BoxPlanner_backside"==e||o.push(this.backModulPlannedElementGrid[n.col][n.row]),o.push(this.plannedElementGrid[n.col][n.row]);for(var i=[],s=0;s<o.length;s++)I.Z.removeDockingPointRelations(o[s]),e&&"BoxPlanner_backside"==e?e&&"BoxPlanner_backside"==e&&(this.backModulPlannedElementGrid[n.col][n.row]=void 0):this.deleteGridPos(this.getIndexInGridByElementId(o[s].ElementId)),i.push(o[s].getElementId());return i}},{key:"updateWorldPosOfElements",value:function updateWorldPosOfElements(){for(var t=0;t<this.plannedElementGrid.length;t++)for(var e=0;e<this.plannedElementGrid[t].length;e++){var n=this.plannedElementGrid[t][e];I.Z.removeDockingPointRelations(n)}if(this.hasActiveBackside)for(t=0;t<this.backModulPlannedElementGrid.length;t++)for(e=0;e<this.backModulPlannedElementGrid[t].length;e++){var o=this.backModulPlannedElementGrid[t][e];o&&I.Z.removeDockingPointRelations(o)}var i=1;for(t=0;t<this.plannedElementGrid.length;t++){for(e=0;e<this.plannedElementGrid[t].length;e++){var s=this.plannedElementGrid[t][e];this.plannedElementGrid[t]&&this.plannedElementGrid[t][e+1]&&I.Z.tryDockElement(s,"AVO",[this.plannedElementGrid[t][e+1]]),s.PosNr=i,i++}this.plannedElementGrid[t+1]&&this.plannedElementGrid[t+1][0]&&I.Z.tryDockElement(this.plannedElementGrid[t][0],"AVR",[this.plannedElementGrid[t+1][0]])}if(this.hasActiveBackside)for(t=0;t<this.backModulPlannedElementGrid.length;t++){for(e=0;e<this.backModulPlannedElementGrid[t].length;e++){var l=this.backModulPlannedElementGrid[t][e],r=this.plannedElementGrid[t][e].getDockingPointById("AVO_AVO_2_IL");r?l&&I.Z.tryDockElementToDP(l,this.plannedElementGrid[t][e],r):O.error(new h.GE("Error Loading DockingPoint AVO_2 for plannerElement")),this.backModulPlannedElementGrid[t]&&this.backModulPlannedElementGrid[t][e+1]&&l&&this.backModulPlannedElementGrid[t][e+1]&&I.Z.tryDockElement(l,"AVO",[this.backModulPlannedElementGrid[t][e+1]]),l&&(l.PosNr=i),i++}this.backModulPlannedElementGrid[t+1]&&this.backModulPlannedElementGrid[t+1][0]&&this.backModulPlannedElementGrid[t][0]&&I.Z.tryDockElement(this.backModulPlannedElementGrid[t][0],"AVL",[this.backModulPlannedElementGrid[t+1][0]])}}},{key:"destroyBoxPlannerGrid",value:function destroyBoxPlannerGrid(){for(var t=0;t<this.plannedElementGrid.length;t++){for(var e=0;e<this.plannedElementGrid[t].length;e++){this.plannedElementGrid[t][e].destroy()}this.plannedElementGrid[t]=[]}if(this.plannedElementGrid=[],this.hasActiveBackside){this.hasActiveBackside=!1;for(t=0;t<this.backModulPlannedElementGrid.length;t++){for(e=0;e<this.backModulPlannedElementGrid[t].length;e++){var n=this.backModulPlannedElementGrid[t][e];n&&n.destroy()}this.backModulPlannedElementGrid[t]=[]}this.backModulPlannedElementGrid=[]}}},{key:"getAllElementsInBacksideModuleGrid",value:function getAllElementsInBacksideModuleGrid(){for(var t=[],e=0;e<this.backModulPlannedElementGrid.length;e++)for(var n=0;n<this.backModulPlannedElementGrid[e].length;n++)this.backModulPlannedElementGrid[e][n]&&t.push(this.backModulPlannedElementGrid[e][n].ElementId);return t}},{key:"destroyBacksideModuleGrid",value:function destroyBacksideModuleGrid(){this.hasActiveBackside=!1;for(var t=[],e=0;e<this.backModulPlannedElementGrid.length;e++){for(var n=0;n<this.backModulPlannedElementGrid[e].length;n++){var o=this.backModulPlannedElementGrid[e][n];o&&(t.push(o.ElementId),o.destroy())}this.backModulPlannedElementGrid[e]=[]}this.backModulPlannedElementGrid=[]}},{key:"getPlannerHasActiveBackside",value:function getPlannerHasActiveBackside(){return this.hasActiveBackside}},{key:"getBoundingBox",value:function getBoundingBox(){var t,e=0,n=0,o=0,i=0,s=0,l=this.plannedElementGrid[0][0].getDepth(),r=0;t="RIGHT";for(var a=0;a<this.plannedElementGrid.length;a++){var h=this.plannedElementGrid[a][0],c=this.getValueOfOptionOfArticle(h.getElementId(),"OPTELEMENT");"RIGHT"==t?i+=this.plannedElementGrid[a][0].getWidth():"FRONT"==t?l+=this.plannedElementGrid[a][0].getWidth():"LEFT"==t?i-=this.plannedElementGrid[a][0].getWidth():"BACK"==t&&(l-=this.plannedElementGrid[a][0].getWidth()),"OPVECK_I"==c?"RIGHT"==t?t="FRONT":"FRONT"==t?t="LEFT":"LEFT"==t?t="BACK":"BACK"==t&&(t="RIGHT"):"OPVECK_A"==c&&("RIGHT"==t?t="BACK":"FRONT"==t?t="RIGHT":"LEFT"==t?t="FRONT":"BACK"==t&&(t="LEFT")),i<n&&(n=i),i>o&&(o=i),l<s&&(s=l),l>r&&(r=l);var u=this.getGridColumnHeight(a);e=e<u?u:e}var m=r-s,d=o-n;return this.hasActiveBackside&&(m=2*this.plannedElementGrid[0][0].getDepth()),{width:Math.round(1e3*d)/1e3,height:Math.round(1e3*e)/1e3,depth:Math.round(1e3*m)/1e3}}}])}(),f=n(74324),R=n(57312),p=n(58178),P=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),T=function(){function DivaBoxPlanner(t,e){(0,i.Z)(this,DivaBoxPlanner),(0,l.Z)(this,"set",void 0),(0,l.Z)(this,"plannerID",void 0),(0,l.Z)(this,"constructionRulesHandler",void 0),(0,l.Z)(this,"boxPlannerGrid",void 0),(0,l.Z)(this,"nextElementId",1),this.set=t,this.plannerID=e,this.constructionRulesHandler=new g(this.set.getValueOfOptionOfArticle,this.set.checkArticleHasOption,this.set.updateCfgValuesByPlanner),this.boxPlannerGrid=new k(this.set.getValueOfOptionOfArticle)}return(0,s.Z)(DivaBoxPlanner,[{key:"initPlanner",value:(u=(0,o.Z)(a().mark((function _callee(t){var e,n,o,i,s,l,r,c,u,m;return a().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(null==(e=JSON.parse(h.ZP.decodeBase64(t))).v||2!=e.v){a.next=26;break}if(e.set&&e.set.elements&&0!=e.set.elements.length){a.next=4;break}return a.abrupt("return");case 4:n=e.set.elements,o=0;case 6:if(!(o<n.length)){a.next=21;break}return i=n[o],s=parseInt(i.elementID),l=new R.Z(this.set.getSetId(),i.basketID,s,DivaBoxPlanner.plannerType),this.nextElementId<s+1&&(this.nextElementId=s+1),this.set.setElementId(i.basketID,l.ElementId),this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(l.ElementId)),(r=this.set.getPlannerData(l.ElementId))&&l.updatePlannerData(r),a.next=17,f.Z.loadSVG(l,this.set);case 17:this.boxPlannerGrid.addElementAtGridPos(l,i.boxPlannerInfo.gridPosCol,i.boxPlannerInfo.gridPosRow,i.boxPlannerInfo.isOnBackside);case 18:o++,a.next=6;break;case 21:return this.boxPlannerGrid.updateWorldPosOfElements(),a.next=24,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 24:a.next=42;break;case 26:c=1,o=0;case 28:if(!(o<e.Elements.length)){a.next=38;break}return u=e.Elements[o],(s=parseInt(u.ID))>c&&(c=s),m={boxElementID:u.ID,boxCol:u.col,boxRow:u.row,boxUpdateWholePlanning:!1},a.next=35,this.addPlannerElement(u.BasketID,m);case 35:o++,a.next=28;break;case 38:return this.nextElementId=c+1,this.boxPlannerGrid.updateWorldPosOfElements(),a.next=42,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 42:return a.abrupt("return",e);case 43:case"end":return a.stop()}}),_callee,this)}))),function initPlanner(t){return u.apply(this,arguments)})},{key:"saveSetPlanner",value:function saveSetPlanner(){for(var t=[],e=this.boxPlannerGrid.getAllElementIdsInGrid(),n=0;n<e.length;n++){var o=this.boxPlannerGrid.getElementById(e[n]);if(o){for(var i=this.boxPlannerGrid.getIndexInGridByElementId(e[n]),s=o.getDockingDockingPoints(),l=[],r=0;r<s.length;r++){var a,h={id:s[r].DpId,onID:s[r].OnElementId,onDPID:null===(a=s[r].OnDP)||void 0===a?void 0:a.DpId};l.push(h)}var c={elementID:o.getElementId(),basketID:this.set.getBasketId(o.getElementId()),CatalogCodex:this.set.getCatalogCodex(),Codex:this.set.getArticleCodex(o.getElementId()),posNr:o.PosNr,x:o.WorldPosCenter.x,y:o.WorldPosCenter.y,z:o.WorldPosCenter.z,rot:o.RotDeg,width:o.Width?o.Width:-1,height:o.Height?o.Height:-1,depth:o.Depth?o.Depth:-1,DP:l,boxPlannerInfo:{gridPosCol:i.col,gridPosRow:i.row,isOnBackside:i.backside}};t.push(c)}}var u=this.boxPlannerGrid.getBoundingBox();return{setId:this.set.getSetId(),x:0,y:0,z:0,width:u.width,height:u.height,depth:u.depth,rot:0,elements:t}}},{key:"addPlannerElement",value:(c=(0,o.Z)(a().mark((function _callee2(t,e){var n,o;return a().wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:if(null!=e&&null!=e.boxElementID&&null!=e.boxCol&&null!=e.boxRow){i.next=2;break}return i.abrupt("return");case 2:return n=new R.Z(this.set.getSetId(),t,e.boxElementID,DivaBoxPlanner.plannerType),this.nextElementId=isNaN(e.boxElementID)?this.nextElementId:e.boxElementID+1,this.set.setElementId(t,n.ElementId),o=this.set.getPlannerData(n.ElementId),n.updatePlannerData(o),i.next=9,f.Z.loadSVG(n,this.set);case 9:if(this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(n.ElementId)),this.boxPlannerGrid.addElementAtGridPos(n,e.boxCol,e.boxRow,null!=e.backside&&e.backside),!e.boxUpdateWholePlanning){i.next=15;break}return this.boxPlannerGrid.updateWorldPosOfElements(),i.next=15,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 15:case"end":return i.stop()}}),_callee2,this)}))),function addPlannerElement(t,e){return c.apply(this,arguments)})},{key:"extendPlanner",value:(r=(0,o.Z)(a().mark((function _callee3(t,e){return a().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return");case 1:case"end":return t.stop()}}),_callee3)}))),function extendPlanner(t,e){return r.apply(this,arguments)})},{key:"copyPlannerElement",value:(n=(0,o.Z)(a().mark((function _callee4(t,e){var n,o,i,s,l,r,h=this;return a().wrap((function _callee4$(a){for(;;)switch(a.prev=a.next){case 0:if(n=!1,e){a.next=3;break}return a.abrupt("return");case 3:"STD"==e.copyType&&(e.targetElements=[]),o=[],i=this,s="AVR","BoxPlanner_backside"==e.copyType?s="BACKSIDE":"STD"!=e.copyType&&"BoxPlanner_COL"!=e.copyType||("AVR"==e.dpType?s="AVR":"AVO"==e.dpType?s="AVO":"AVL"==e.dpType&&(s="AVL")),t.forEach((function(t,i){var l;n||(!e||"AVL"!=e.dpType&&"AVR"!=e.dpType?e&&e.copyType&&"BoxPlanner_backside"==e.copyType&&(h.boxPlannerGrid.getPlannerHasActiveBackside()||h.boxPlannerGrid.prepareGridForBackSideCopy()):h.boxPlannerGrid.prepareGridForCopy(i,e.dpType)),n=!0;var r=new R.Z(h.set.getSetId(),t,h.nextElementId,DivaBoxPlanner.plannerType);h.nextElementId++,h.set.setElementId(t,r.ElementId);var a=h.set.getPlannerData(r.ElementId);r.updatePlannerData(a),h.boxPlannerGrid.addElementAsCopy(i,r,s),h.constructionRulesHandler.onElementCopy(i,r.getElementId()),o.push(r),"STD"==e.copyType&&(null===(l=e.targetElements)||void 0===l||l.push(r.getElementId()))})),l=0;case 10:if(!(l<o.length)){a.next=17;break}return a.next=13,f.Z.loadSVG(o[l],this.set);case 13:if("AVO"==s&&this.constructionRulesHandler.getHasMaxElemCountPerColumn()&&i.boxPlannerGrid.getIndexInGridByElementId(o[l].ElementId).row+1==i.constructionRulesHandler.getMaxElemCountPerColumn())for(r=o[l].getFreeDockingPointsByType("AVO"),l=0;l<r.length;l++)r[l].disableDP(!0);case 14:l++,a.next=10;break;case 17:return this.boxPlannerGrid.updateWorldPosOfElements(),a.next=20,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,e.changedOPT,e.targetElements);case 20:case"end":return a.stop()}}),_callee4,this)}))),function copyPlannerElement(t,e){return n.apply(this,arguments)})},{key:"initIDM3DMeta",value:function initIDM3DMeta(t){P.debug("No IDM3D Planner for BoxPlanner")}},{key:"getPlannerElementsInfluencedByCopy",value:function getPlannerElementsInfluencedByCopy(t,e){var n=[];if(e&&"NO"==(null==e?void 0:e.dpType)&&"BoxPlanner_backside"==e.copyType)return this.boxPlannerGrid.getAllElementIdsInGrid();if(e&&"BoxPlanner_COL"==e.copyType){for(var o=this.boxPlannerGrid.getIndexInGridByElementId(t),i=this.boxPlannerGrid.getAllElementsInColumn(o.col,o.backside),s=0;s<i.length;s++)n.push(i[s].getElementId());return n}if(n.push(t),e){switch(e.dpType){case"AVL":case"AVR":var l=this.boxPlannerGrid.getAllElementsDown(t);n=n.concat(l.elements),l.backside}this.boxPlannerGrid.getPlannerHasActiveBackside()&&(n=n.concat(this.boxPlannerGrid.getAllOppositeElements(n)))}return n}},{key:"deletePlannerElement",value:(e=(0,o.Z)(a().mark((function _callee5(t,e,n){var o,i,s,l,r,h,c,u;return a().wrap((function _callee5$(e){for(;;)switch(e.prev=e.next){case 0:for(o=this.boxPlannerGrid.getIndexInGridByElementId(t),i={row:o.row,col:o.col,backside:o.backside},n&&"BoxPlanner_backside"==n?i={row:0,col:0,backside:!1}:o.row>0?i.row--:(s=0==o.col?0:o.col-1,(l=this.boxPlannerGrid.getAllElementsInColumn(s,o.backside))&&l.length>0&&(i.col=s,i.row=l.length-1)),r=this.boxPlannerGrid.deleteElement(t,n),h=0;h<r.length;h++)this.constructionRulesHandler.onElemDeleted(r[h]);if(c=!0,n&&"BoxPlanner_backside"==n&&(0==this.boxPlannerGrid.getAllElementsInBacksideModuleGrid().length?(this.boxPlannerGrid.destroyBacksideModuleGrid(),c=!0):c=!1),!c){e.next=11;break}return this.boxPlannerGrid.updateWorldPosOfElements(),e.next=11,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 11:if(!this.boxPlannerGrid.getPlannerElementAtGridPos(i.col,i.row,i.backside)){e.next=13;break}return e.abrupt("return",{newElementToSelect:null===(u=this.boxPlannerGrid.getPlannerElementAtGridPos(i.col,i.row,i.backside))||void 0===u?void 0:u.getElementId()});case 13:return e.abrupt("return",{});case 14:case"end":return e.stop()}}),_callee5,this)}))),function deletePlannerElement(t,n,o){return e.apply(this,arguments)})},{key:"getAllViewPlannerElements",value:function getAllViewPlannerElements(){return this.boxPlannerGrid.getAllElementsInGrid()}},{key:"getNeighborElements",value:function getNeighborElements(t,e){var n=this.boxPlannerGrid.getElementById(t);if(!n)return[];var o=null==n?void 0:n.getDockingDockingPointsByType(e);if(!o)return[];for(var i=[],s=0;s<(null==o?void 0:o.length);s++)null!=o[s]&&i.push(o[s].OnElementId);return i}},{key:"getFreeDockingPointsByElementId",value:function getFreeDockingPointsByElementId(t,e){return{dockingPoints:[],filter:[]}}},{key:"getDockedDockingPointsByElementId",value:function getDockedDockingPointsByElementId(t,e){return[]}},{key:"getDockedGroups",value:function getDockedGroups(){return[this.boxPlannerGrid.getAllElementIdsInGrid()]}},{key:"getBoundingBox",value:function getBoundingBox(){return P.warn("BoxPlanner - get2DViewPlannerBoundingBox not implemented yet","WC_0012"),new p.Z}},{key:"updatePlannerTrans",value:function updatePlannerTrans(t,e,n,o,i,s){return P.error(new h.GE("BoxPlanner - updatePlannerTrans not implemented yet",{code:"WC_0012"})),!1}},{key:"updatePlanner",value:(t=(0,o.Z)(a().mark((function _callee6(t,e){var n,o,i,s,l,r,h,c,u;return a().wrap((function _callee6$(a){for(;;)switch(a.prev=a.next){case 0:if(P.debug("BoxPlanner - configurationHasChanged "+t),!(t&&e&&e.length>0&&t.OPTELEMENT)||"OPVECK_I"!=t.OPTELEMENT&&"OPVECK_A"!=t.OPTELEMENT){a.next=18;break}if(!(e.length>1)){a.next=9;break}return a.next=5,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,e,!0);case 5:if(!(n=a.sent)){a.next=8;break}return a.abrupt("return",{elemIdsToDelete:[],viewMessageCodex:n});case 8:case 44:case 45:return a.abrupt("return",{elemIdsToDelete:[]});case 9:if(o=this.boxPlannerGrid.getIndexInGridByElementId(e[0]),i=e[0],o.row>0&&(i=this.boxPlannerGrid.getPlannerElementAtGridPos(o.col,0,!1).getElementId()),this.boxPlannerGrid.getElementHasLeftElement(i)&&this.boxPlannerGrid.getElementHasRightElement(i)){a.next=18;break}return s="NO",this.boxPlannerGrid.getElementHasLeftElement(i)||(s="AVL"),this.boxPlannerGrid.getElementHasRightElement(i)||(s="AVR"),l=this.getPlannerElementsInfluencedByCopy(i,{dpType:s,copyType:"BoxPlanner_COL"}),a.abrupt("return",{elemIdsToDelete:[],elementIdToCopy:l,copyDPType:s,copyType:"BoxPlanner_COL",ignoreOptionsToCopy:["OPTELEMENT"],changedOPT:t,targetElements:e});case 18:if(!t||!t.OPTDMOD){a.next=32;break}a.t0=t.OPTDMOD,a.next="OPVD_EIN"===a.t0?22:"OPVD_AUS"===a.t0?26:30;break;case 22:if(this.boxPlannerGrid.getPlannerHasActiveBackside()){a.next=25;break}return r=this.getPlannerElementsInfluencedByCopy(-1,{dpType:"NO",copyType:"BoxPlanner_backside"}),a.abrupt("return",{elemIdsToDelete:[],elementIdToCopy:r,copyType:"BoxPlanner_backside",changedOPT:t});case 25:case 29:return a.abrupt("break",30);case 26:if(!this.boxPlannerGrid.getPlannerHasActiveBackside()){a.next=29;break}return h=this.boxPlannerGrid.getAllElementsInBacksideModuleGrid(),a.abrupt("return",{elemIdsToDelete:h,deletionType:"BoxPlanner_backside",changedOPT:t});case 30:a.next=45;break;case 32:if(!(t&&t.OPTFARBE_RAHMEN&&"OPVSCHWARZ_MATT"==t.OPTFARBE_RAHMEN&&this.boxPlannerGrid.getPlannerHasActiveBackside())){a.next=37;break}return c=this.boxPlannerGrid.getAllElementsInBacksideModuleGrid(),a.abrupt("return",{elemIdsToDelete:c,deletionType:"BoxPlanner_backside",changedOPT:t,targetElements:e,viewMessageCodex:"BOXPLAN_BLACKFRAME_INCOMPATIBLE_ELEMENT_WARNING"});case 37:return a.next=39,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,e);case 39:if(!(u=a.sent)){a.next=44;break}return a.abrupt("return",{elemIdsToDelete:[],viewMessageCodex:u});case 46:case"end":return a.stop()}}),_callee6,this)}))),function updatePlanner(e,n){return t.apply(this,arguments)})},{key:"getSetData",value:function getSetData(t,e,n,o){for(var i={ID:"S1",H:"",x:0,y:0,z:0,w:0,ELE:[],Blob:this.set.CatalogData.supplierILN,Cat:this.set.getCatalogCodex(),ShowDim:n},s=this.boxPlannerGrid.getAllElementsInGrid(),l=0;l<s.length;l++){var r=s[l],a=r.ElementId,c=this.set.getPlannerConfigData(a).config,u={ID:"E"+a,N:c.N,Model:c.Model,x:-r.WorldPosCenter.x,y:r.WorldPosCenter.y,z:r.WorldPosCenter.z,PosPivot:"Center",w:r.getRotDeg(),RotPivot:"Center",DP:r.getDockingPointJS3D(),MAT:c.MAT,CFG:c.CFG,H:""},m=(0,h.FB)(JSON.stringify(u));u.H=m,i.ELE.push(u)}m=(0,h.FB)(JSON.stringify(i));return i.H=m,{constructionSet:i}}},{key:"getPlannerId",value:function getPlannerId(){return this.plannerID}},{key:"getElementPosInfo",value:function getElementPosInfo(){P.error(new h.GE("BoxPlanner - getElementPosInfo not implemented yet",{code:"WC_0012"}))}},{key:"destroyPlanner",value:function destroyPlanner(){this.boxPlannerGrid.destroyBoxPlannerGrid()}},{key:"getCatalogData",value:function getCatalogData(){return this.set.CatalogData}},{key:"getPlannerBoundingBox",value:function getPlannerBoundingBox(){return this.boxPlannerGrid.getBoundingBox()}},{key:"updatePlannerBoundingBox",value:function updatePlannerBoundingBox(){}},{key:"getPlanningIsComplete",value:function getPlanningIsComplete(){return null!=this.boxPlannerGrid.getPlannerElementAtGridPos(0,0,!1)}},{key:"updateSetPosNr",value:function updateSetPosNr(t){for(var e=this.boxPlannerGrid.getAllElementIdsInGrid(),n=0;n<e.length;n++){var o=e[n],i=this.boxPlannerGrid.getElementById(o);i&&(i.SetPosNr=t+i.PosNr-1,this.set.setPosNr(i.ElementId,i.getPosNr()))}return e.length}}]);var t,e,n,r,c,u}();(0,l.Z)(T,"plannerType","BOX")}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[8241],{8241:(t,e,n)=>{n.r(e),n.d(e,{default:()=>T});var o=n(84658),i=n(13125),s=n(43860),l=n(80248),r=n(50747),a=n.n(r),h=n(55901),c=n(12952),u=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),m=function(){return(0,s.Z)((function BoxPlannerPartlistHelper(t,e,n,o,s,r,a){(0,i.Z)(this,BoxPlannerPartlistHelper),(0,l.Z)(this,"constructionRules",void 0),(0,l.Z)(this,"getOptionVal",void 0),(0,l.Z)(this,"setOptionValue",void 0),(0,l.Z)(this,"getElementHasBottomPlate",void 0),(0,l.Z)(this,"getElementIsCornerElement",void 0),(0,l.Z)(this,"getCornerType",void 0),(0,l.Z)(this,"getElementHasTopPlate",void 0),(0,l.Z)(this,"getElementIsGarderobeElement",void 0),this.getOptionVal=t,this.getElementHasBottomPlate=n,this.setOptionValue=e,this.getElementIsCornerElement=o,this.getCornerType=s,this.getElementHasTopPlate=r,this.getElementIsGarderobeElement=a}),[{key:"setConstructionRules",value:function setConstructionRules(t){this.constructionRules=t}},{key:"getGroundPlatesNumOfRightNeighbors",value:function getGroundPlatesNumOfRightNeighbors(t,e,n){var o=0;if(this.getElementHasBottomPlate(t,n)&&o++,e.getPlannerHasActiveBackside()){var i=e.getOppositeElement(t.getElementId());if(this.getElementHasBottomPlate(i,n)&&o++,e.getElementHasRightElement(t.getElementId())){var s=e.getRightElement(t.getElementId()),l=e.getOppositeElement(s.getElementId());return this.getElementHasBottomPlate(s,n)&&o++,this.getElementHasBottomPlate(l,n)&&o++,o}return o}if(e.getElementHasRightElement(t.getElementId())){var r=e.getRightElement(t.getElementId());return this.getElementHasBottomPlate(r,n)&&o++,o}return o}},{key:"getTopPlatesNumOfRightNeighbors",value:function getTopPlatesNumOfRightNeighbors(t,e,n){var o=0;if(this.getElementHasTopPlate(t,e,n)&&o++,e.getPlannerHasActiveBackside()){var i=e.getOppositeElement(t.getElementId());if(this.getElementHasTopPlate(i,e,n)&&o++,e.getElementHasRightElement(t.getElementId())){var s=e.getRightElement(t.getElementId()),l=e.getOppositeElement(s.getElementId());return this.getElementHasTopPlate(s,e,n)&&o++,this.getElementHasTopPlate(l,e,n)&&o++,o}return o}if(e.getElementHasRightElement(t.getElementId())){var r=e.getRightElement(t.getElementId());return this.getElementHasTopPlate(r,e,n)&&o++,o}return o}},{key:"getElementHeight",value:function getElementHeight(t,e){var n=this.getOptionVal(t.getElementId(),"OPTHOEHE",e);return"OPVH_6"==n?"6":"OPVH_11"==n?"11":"OPVH_18"==n?"18":"37"}},{key:"getElementDepth",value:function getElementDepth(t,e){var n=this.getOptionVal(t.getElementId(),"OPTTIEFE",e);return"OPVTIEFE_18"==n?"18":"37"}},{key:"getElementRahmenColor",value:function getElementRahmenColor(t,e){var n=this.getOptionVal(t.getElementId(),"OPTFARBE_RAHMEN",e);return"OPVCHROM"==n?"CHROM":"OPVSCHWARZ_MATT"==n?"BLACK":"CHROM"}},{key:"calculateRahmen",value:function calculateRahmen(t,e){for(var n=t.getAllElementsInGrid(),o=0;o<n.length;o++)this.constructionRules.VarticalRahmenInfo&&(this.correctRahmenVerticalLeftFront(n[o],t,e),this.correctRahmenVerticalLeftBack(n[o],t,e),this.correctRahmenVerticalRightFront(n[o],t,e),this.correctRahmenVerticalRightBack(n[o],t,e),u.debug("---------Correct Senkrechte Rahmen for element with ID: "+n[o].ElementId+"; posNr: "+n[o].PosNr+" ----------"),u.debug("Senkrechter Rahmen links vorne: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_V",e)),u.debug("Senkrechter Rahmen links hinten: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_H",e)),u.debug("Senkrechter Rahmen rechts vorne : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_V",e)),u.debug("Senkrechter Rahmen rechts hinten : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_H",e))),this.constructionRules.DepthRahmenInfo&&(this.correctRahmenDepthLeftBottom(n[o],t,e),this.correctRahmenDepthLeftTop(n[o],t,e),this.correctRahmenDepthRightBottom(n[o],t,e),this.correctRahmenDepthRightTop(n[o],t,e),u.debug("---------Correct Tiefenverbinder Rahmen for element with ID: "+n[o].ElementId+"; posNr: "+n[o].PosNr+" ----------"),u.debug("Tiefen Rahmen links unten: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_U",e)),u.debug("Tiefen Rahmen links oben: "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_L_O",e)),u.debug("Tiefen Rahmen rechts unten : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_U",e)),u.debug("Tiefen Rahmen rechts oben : "+this.getOptionVal(n[o].ElementId,"OPTRAHMEN_R_O",e)))}},{key:"correctRahmenDepthLeftBottom",value:function correctRahmenDepthLeftBottom(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n),!(e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId()))&&!e.getElementHasBottomElement(t.getElementId()))if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(this.getElementHasBottomPlate(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);else switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenDepthLeftTop",value:function correctRahmenDepthLeftTop(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n),!(e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId())))if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(this.getElementIsCornerElement(t,n))switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else if(this.getElementHasTopPlate(t,e,n))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);else switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenDepthRightBottom",value:function correctRahmenDepthRightBottom(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId()))if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(o){var i=e.getRightElement(t.getElementId());if(!this.getElementHasBottomPlate(t,n)||this.getElementIsCornerElement(t,n))switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else if(!this.getElementHasBottomPlate(i,n)||this.getElementIsCornerElement(i,n))switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,n)}else if(this.getElementHasBottomPlate(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);else switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}break;case"BLACK":o?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,n):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenDepthRightTop",value:function correctRahmenDepthRightTop(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(e.getPlannerHasActiveBackside())switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(!this.getElementHasTopPlate(t,e,n)||this.getElementIsCornerElement(t,n)){switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}return}if(!i)return void this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,n);var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());if(!this.getElementHasTopPlate(s,e,n)||this.getElementIsCornerElement(s,n)){switch(this.getElementDepth(t,n)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,n);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,n)}return}this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,n);break;case"BLACK":i?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,n):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,n)}}},{key:"correctRahmenVerticalLeftFront",value:function correctRahmenVerticalLeftFront(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n),!(e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}},{key:"correctRahmenVerticalLeftBack",value:function correctRahmenVerticalLeftBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside;if(!o&&!(o?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(e.getPlannerHasActiveBackside()){var i=e.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}},{key:"correctRahmenVerticalRightFront",value:function correctRahmenVerticalRightFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());this.getElementIsGarderobeElement(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}},{key:"correctRahmenVerticalRightBack",value:function correctRahmenVerticalRightBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside;if(!o){var i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,n)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,n);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,n);break;case"18":switch(this.getElementRahmenColor(t,n)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,n)}break;case"37":if(this.getElementIsGarderobeElement(t,n))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n);else switch(this.getElementRahmenColor(t,n)){case"CHROM":if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());if(!s)return;if(e.getPlannerHasActiveBackside()){var l=e.getOppositeElement(t.getElementId());if(!l)return;var r=e.getOppositeElement(s.getElementId());if(!r)return;this.getElementIsGarderobeElement(s,n)||this.getElementIsGarderobeElement(l,n)||this.getElementIsGarderobeElement(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.getElementIsGarderobeElement(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else if(e.getPlannerHasActiveBackside()){var a=e.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,n):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,n);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,n)}}}}},{key:"calculateKnots",value:function calculateKnots(t,e){if(this.constructionRules.hasKNOTS)for(var n=t.getAllElementsInGrid(),o=0;o<n.length;o++)this.correctKnotLeftTopFront(n[o],t,e),this.correctKnotLeftTopBack(n[o],t,e),this.correctKnotLeftBottomFront(n[o],t,e),this.correctKnotLeftBottomBack(n[o],t,e),this.correctKnotRightTopFront(n[o],t,e),this.correctKnotRightTopBack(n[o],t,e),this.correctKnotRightBottomFront(n[o],t,e),this.correctKnotRightBottomBack(n[o],t,e),this.correctKnotRightMiddleBack(n[o],t,e),this.correctKnotLeftMiddleBack(n[o],t,e),u.debug("---------Correct Knots for element with ID: "+n[o].ElementId+"; posNr: "+n[o].PosNr+" ----------"),u.debug("Links oben vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LTF",e)),u.debug("Links oben hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LTB",e)),u.debug("Links unten vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LBF",e)),u.debug("Links unten hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LBB",e)),u.debug("Rechts oben vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RTF",e)),u.debug("Rechts oben hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RTB",e)),u.debug("Rechts unten vorne : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RBF",e)),u.debug("Links mitte hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_LMB",e)),u.debug("Rechts mitte hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RMB",e)),u.debug("Rechts unten hinten : "+this.getOptionVal(n[o].ElementId,"OPTKNOTEN_RBB",e))}},{key:"correctKnotLeftBottomFront",value:function correctKnotLeftBottomFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())&&(o||(e.getPlannerHasActiveBackside()&&this.getElementHasBottomPlate(t,n)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n),this.getElementHasBottomPlate(t,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n)),this.getElementIsCornerElement(t,n))){var i=e.getLeftElement(t.getElementId());if(this.getElementIsCornerElement(i,n))return;var s=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasBottomPlate(i,n)?this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.getElementHasBottomPlate(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}},{key:"correctKnotLeftTopFront",value:function correctKnotLeftTopFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(o||(e.getPlannerHasActiveBackside()&&this.getElementHasTopPlate(t,e,n)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n),this.getElementHasTopPlate(t,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n)),this.getElementIsCornerElement(t,n)){var i=e.getElementHasLeftElement(t.getElementId());if(o&&this.getElementIsCornerElement(e.getLeftElement(t.getElementId()),n))return;var s=e.getElementHasRightElement(t.getElementId());if(i||s){if(s&&!i){var l=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasTopPlate(l,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(!s&&i){var r=e.getLeftElement(t.getElementId());this.getElementHasTopPlate(r,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3erer_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}else if(s&&i){var a=e.getLeftElement(t.getElementId()),h=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasTopPlate(a,e,n)?this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.getElementHasTopPlate(a,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}},{key:"correctKnotLeftBottomBack",value:function correctKnotLeftBottomBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())){if(!o)if(e.getPlannerHasActiveBackside()&&!e.getIndexInGridByElementId(t.getElementId()).backside){var i=e.getOppositeElement(t.getElementId());i&&(this.getElementHasBottomPlate(t,n)?this.getElementHasBottomPlate(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.getElementHasBottomPlate(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else e.getPlannerHasActiveBackside()||this.getElementHasBottomPlate(t,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n)){var s=e.getLeftElement(t.getElementId());if(this.getElementIsCornerElement(s,n))return;switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":var l=e.getRightElement(t.getElementId());this.getElementHasBottomPlate(s,n)?this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n)}}}}},{key:"correctKnotLeftTopBack",value:function correctKnotLeftTopBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(!o)if(e.getPlannerHasActiveBackside()&&!e.getIndexInGridByElementId(t.getElementId()).backside){var i=e.getOppositeElement(t.getElementId());i&&(this.getElementHasTopPlate(t,e,n)?this.getElementHasTopPlate(i,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.getElementHasTopPlate(i,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else e.getPlannerHasActiveBackside()||this.getElementHasTopPlate(t,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n)){var s=e.getElementHasLeftElement(t.getElementId());if(o&&this.getElementIsCornerElement(e.getLeftElement(t.getElementId()),n))return;var l=e.getElementHasRightElement(t.getElementId());if(s||l){if(l&&!s){var r=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":this.getElementHasTopPlate(r,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n)}}else if(!l&&s){var a=e.getLeftElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":case"OUTSIDE":this.getElementHasTopPlate(a,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n)}}else if(l&&s){var h=e.getLeftElement(t.getElementId()),c=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.getElementHasTopPlate(h,e,n)?this.getElementHasTopPlate(c,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.getElementHasTopPlate(c,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}},{key:"correctKnotRightMiddleBack",value:function correctKnotRightMiddleBack(t,e,n){if((this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n),this.getElementIsGarderobeElement(t,n))&&!e.getIndexInGridByElementId(t.getElementId()).backside)if(e.getElementHasRightElement(t.getElementId()))if(e.getPlannerHasActiveBackside()){var o=e.getOppositeElement(t.getElementId());if(!o)return;var i=e.getRightElement(t.getElementId());if(!i)return;var s=e.getOppositeElement(i.getElementId());if(!s)return;this.getElementIsGarderobeElement(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.getElementIsGarderobeElement(o,n)?this.getElementIsGarderobeElement(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.getElementIsGarderobeElement(i,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else{var l=e.getRightElement(t.getElementId());if(!l)return;this.getElementIsGarderobeElement(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else if(e.getPlannerHasActiveBackside()){var r=e.getOppositeElement(t.getElementId());if(!r)return;this.getElementIsGarderobeElement(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}},{key:"correctKnotLeftMiddleBack",value:function correctKnotLeftMiddleBack(t,e,n){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n),this.getElementIsGarderobeElement(t,n)){var o=e.getIndexInGridByElementId(t.getElementId()).backside;if(!o){var i=o?e.getElementHasRightElement(t.getElementId()):e.getElementHasLeftElement(t.getElementId());if(i){var s=e.getLeftElement(t.getElementId());if(this.getElementIsGarderobeElement(s,n))return}if(i)if(e.getPlannerHasActiveBackside()){var l=e.getLeftElement(t.getElementId());if(!l)return;var r=e.getOppositeElement(t.getElementId());if(!r)return;var a=e.getOppositeElement(null==l?void 0:l.getElementId());if(!a)return;this.getElementIsGarderobeElement(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.getElementIsGarderobeElement(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);else if(e.getPlannerHasActiveBackside()){var h=e.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(h,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n)}}}},{key:"correctKnotRightBottomFront",value:function correctKnotRightBottomFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())){if(e.getPlannerHasActiveBackside())if(this.getElementHasBottomPlate(t,n))if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());s&&(this.getElementHasBottomPlate(s,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&(this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);else if(this.getElementHasBottomPlate(t,n)){var r=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());r&&!this.getElementHasBottomPlate(r,n)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}else if(i){var a=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());a&&!this.getElementIsCornerElement(a,n)&&(this.getElementHasBottomPlate(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);if(this.getElementIsCornerElement(t,n))switch(this.getCornerType(t,n)){case"INSIDE":var h=e.getRightElement(t.getElementId());if(h&&this.getElementIsCornerElement(h,n))if(e.getElementHasRightElement(h.getElementId())){var c=e.getRightElement(h.getElementId());this.getElementHasBottomPlate(c,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else h&&this.getElementHasBottomPlate(h,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}},{key:"correctKnotRightTopFront",value:function correctKnotRightTopFront(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(e.getPlannerHasActiveBackside())if(this.getElementHasTopPlate(t,e,n))if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());s&&(this.getElementHasTopPlate(s,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&(this.getElementHasTopPlate(l,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);else if(this.getElementHasTopPlate(t,e,n)){if(i){var r=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());r&&(this.getElementHasTopPlate(r,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n))}}else if(i){var a=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());a&&!this.getElementIsCornerElement(a,n)&&(this.getElementHasTopPlate(a,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,n);if(this.getElementIsCornerElement(t,n)){var h=e.getElementHasLeftElement(t.getElementId()),c=e.getElementHasRightElement(t.getElementId());if(h||c){if(c&&!h){var u=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":if(this.getElementIsCornerElement(u,n))if(e.getElementHasRightElement(u.getElementId())){var m=e.getRightElement(u.getElementId());this.getElementHasTopPlate(m,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(u,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(!c&&h){e.getLeftElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(c&&h){var d=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":if(this.getElementIsCornerElement(d,n))if(e.getElementHasRightElement(d.getElementId())){var g=e.getRightElement(d.getElementId());this.getElementHasTopPlate(g,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(d,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}},{key:"correctKnotRightBottomBack",value:function correctKnotRightBottomBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getElementHasBottomElement(t.getElementId())&&!e.getIndexInGridByElementId(t.getElementId()).backside){if(e.getPlannerHasActiveBackside())switch(this.getGroundPlatesNumOfRightNeighbors(t,e,n)){case 0:i?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n);break;case 1:i?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case 2:i?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);break;case 3:i&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n);break;case 4:i&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,n)}else if(this.getElementHasBottomPlate(t,n)){if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());s&&(this.getElementHasBottomPlate(s,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n))}}else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&!this.getElementIsCornerElement(l,n)&&(this.getElementHasBottomPlate(l,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n))switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":var r=e.getRightElement(t.getElementId());if(this.getElementIsCornerElement(r,n)){var a=e.getRightElement(r.getElementId());this.getElementHasBottomPlate(a,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else this.getElementHasBottomPlate(r,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}},{key:"correctKnotRightTopBack",value:function correctKnotRightTopBack(t,e,n){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,n);var o=e.getIndexInGridByElementId(t.getElementId()).backside,i=o?e.getElementHasLeftElement(t.getElementId()):e.getElementHasRightElement(t.getElementId());if(!e.getIndexInGridByElementId(t.getElementId()).backside){if(e.getPlannerHasActiveBackside())if(i)switch(this.getTopPlatesNumOfRightNeighbors(t,e,n)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,n);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,n);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,n);break;case 3:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n);break;case 4:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,n)}else switch(this.getTopPlatesNumOfRightNeighbors(t,e,n)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else if(this.getElementHasTopPlate(t,e,n)){if(i){var s=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());this.getElementIsCornerElement(s,n)||this.getElementHasTopPlate(s,e,n)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n)}}else if(i){var l=o?e.getLeftElement(t.getElementId()):e.getRightElement(t.getElementId());l&&!this.getElementIsCornerElement(l,n)&&(this.getElementHasTopPlate(l,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,n))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,n);if(this.getElementIsCornerElement(t,n)){var r=e.getElementHasLeftElement(t.getElementId()),a=e.getElementHasRightElement(t.getElementId());if(r||a){if(a&&!r){var h=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":if(this.getElementIsCornerElement(h,n))if(e.getElementHasRightElement(h.getElementId())){var c=e.getRightElement(h.getElementId());this.getElementHasTopPlate(c,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(h,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}else if(!a&&r)this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);else if(a&&r){var u=e.getRightElement(t.getElementId());switch(this.getCornerType(t,n)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n);break;case"OUTSIDE":if(this.getElementIsCornerElement(u,n))if(e.getElementHasRightElement(u.getElementId())){var m=e.getRightElement(u.getElementId());this.getElementHasTopPlate(m,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n);else this.getElementHasTopPlate(u,e,n)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,n):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,n)}}}}])}(),d=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),g=function(){return(0,s.Z)((function ConstructionRulesHandler(t,e,n){var o=this;(0,i.Z)(this,ConstructionRulesHandler),(0,l.Z)(this,"getValueOfOptionOfArticle",void 0),(0,l.Z)(this,"checkArticleHasOption",void 0),(0,l.Z)(this,"updateCfgValuesByPlanner",void 0),(0,l.Z)(this,"constructionRules",void 0),(0,l.Z)(this,"constructionRulesLoaded",void 0),(0,l.Z)(this,"hideOptionsForConstruction",void 0),(0,l.Z)(this,"partlistHelper",void 0),(0,l.Z)(this,"getOptionVal",(function(t,e,n){if(n.has(t)&&n.get(t).has(e)){var i=n.get(t).get(e);return null!=i?i:""}var s=o.getValueOfOptionOfArticle(t,e);return null!=s?s:""})),(0,l.Z)(this,"hasOptionValue",(function(t,e,n){return!(!n.has(t)||!n.get(t).has(e))||!!o.getValueOfOptionOfArticle(t,e)})),(0,l.Z)(this,"setOptionValue",(function(t,e,n,i){var s;if(i.has(t)||i.set(t,new Map),null===(s=i.get(t))||void 0===s||s.set(e,n),o.hideOptionsForConstruction.has(t)){var l=o.hideOptionsForConstruction.get(t).indexOf(e);l>=0&&o.hideOptionsForConstruction.get(t).splice(l,1)}})),(0,l.Z)(this,"getElementHasBottomPlate",(function(t,e){if(o.constructionRules.knotInfo.elementsWithGroundPlate)for(var n=0;n<o.constructionRules.knotInfo.elementsWithGroundPlate.length;n++){var i=o.constructionRules.knotInfo.elementsWithGroundPlate[n].onOPT,s=o.constructionRules.knotInfo.elementsWithGroundPlate[n].onOPVs,l=o.getOptionVal(t.getElementId(),i,e);return o.arrayContainsValue(s,l)}return!1})),(0,l.Z)(this,"getElementIsCornerElement",(function(t,e){return o.constructionRules.hasCORNER&&o.arrayContainsValue(o.constructionRules.knotInfo.cornerElements.onOPVs,o.getOptionVal(t.getElementId(),o.constructionRules.knotInfo.cornerElements.onOPT,e))})),(0,l.Z)(this,"getElementIsGarderobeElement",(function(t,e){return o.constructionRules.hasGARDEROBE&&o.arrayContainsValue(o.constructionRules.knotInfo.garderobeElements.onOPVs,o.getOptionVal(t.getElementId(),o.constructionRules.knotInfo.garderobeElements.onOPT,e))})),(0,l.Z)(this,"getCornerType",(function(t,e){return"OPVECK_I"==o.getOptionVal(t.getElementId(),"OPTELEMENT",e)?"INSIDE":"OPVECK_A"==o.getOptionVal(t.getElementId(),"OPTELEMENT",e)?"OUTSIDE":"NOCORNER"})),(0,l.Z)(this,"getElementHasTopPlate",(function(t,e,n){return!e.getElementHasTopElement(t.getElementId())||o.getElementHasBottomPlate(e.getTopElement(t.getElementId()),n)})),this.constructionRulesLoaded=!1,this.getValueOfOptionOfArticle=t,this.checkArticleHasOption=e,this.hideOptionsForConstruction=new Map,this.updateCfgValuesByPlanner=n,this.partlistHelper=new m(this.getOptionVal,this.setOptionValue,this.getElementHasBottomPlate,this.getElementIsCornerElement,this.getCornerType,this.getElementHasTopPlate,this.getElementIsGarderobeElement)}),[{key:"arrayContainsValue",value:function arrayContainsValue(t,e){if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}var o=t.split(";");for(n=0;n<o.length;n++)if(o[n]==e)return!0;return!1}},{key:"evalRule",value:function evalRule(t,e,n){for(var o=!0,i=e.split("&"),s=0;s<i.length;s++){var l=i[s].split("=")[0],r=i[s].split("=")[1],a=this.getOptionVal(t,l,n);a&&a!=r&&(o=!1)}return o}},{key:"setOptionDoShow",value:function setOptionDoShow(t,e,n){var o,i=this.constructionRules.optionsVisibilityInfo[e];null!=i.doShow&&(n.has(t)||n.set(t,new Map),null===(o=n.get(t))||void 0===o||o.set(e,i.doShow));if(this.hideOptionsForConstruction.has(t)){var s,l=this.hideOptionsForConstruction.get(t).indexOf(e);if(l>=0)null===(s=this.hideOptionsForConstruction.get(t))||void 0===s||s.splice(l,1)}}},{key:"setOptionDoHide",value:function setOptionDoHide(t,e,n){var o,i,s=this.constructionRules.optionsVisibilityInfo[e];n.has(t)||n.set(t,new Map),null===(o=n.get(t))||void 0===o||o.set(e,s.doHide),this.hideOptionsForConstruction.has(t)||this.hideOptionsForConstruction.set(t,[]),null===(i=this.hideOptionsForConstruction.get(t))||void 0===i||i.push(e)}},{key:"getCurOptionBasedConstructionRules",value:function getCurOptionBasedConstructionRules(t,e){for(var n=[],o=0;o<this.constructionRules.optionBasedConstructionRules.length;o++){var i=this.constructionRules.optionBasedConstructionRules[o];this.getOptionVal(t,i.masterOptionName,e)==i.masterOptionValue&&n.push(i)}return n}},{key:"setAllOptToDefault",value:function setAllOptToDefault(t,e,n,o){for(var i=[],s=void 0,l=0;l<this.constructionRules.optionsInfluenceRulesOfAllElements.length;l++){var r=this.constructionRules.optionsInfluenceRulesOfAllElements[l];for(var a in n)a==r.onOPT&&this.arrayContainsValue(r.onOPVs,n[a])&&i.push({opt:r.influenceOPT,opv:r.forceOPV,unvalidOPVs:r.unvalidOPVs,warning:r.warning,doShowWarning:!1})}for(var h=t.getAllElementIdsInGrid(),c=0;c<h.length;c++){var u;if(this.hideOptionsForConstruction.has(h[c])&&this.hideOptionsForConstruction.get(h[c]).length>0){for(;this.hideOptionsForConstruction.get(h[c]).length>0;){var m=this.hideOptionsForConstruction.get(h[c])[0];this.setOptionDoShow(h[c],m,e)}this.hideOptionsForConstruction.delete(h[c])}this.constructionRules.hasDMOD&&(t.getPlannerHasActiveBackside()?this.setOptionDoShow(h[c],"OPTDMOD",e):this.setOptionDoHide(h[c],"OPTDMOD",e));var d=t.getColumnCount();d>1?this.setOptionDoShow(h[c],"OPTMULTICOL",e):this.setOptionDoHide(h[c],"OPTMULTICOL",e),this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVOHNE",e),this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVOHNE",e);var g=t.getIndexInGridByElementId(h[c]);if(g.backside)this.setOptionValue(h[c],"OPTELEM_ON_BACK","OPVJA",e);else{if(this.setOptionValue(h[c],"OPTELEM_ON_BACK","OPVNEIN",e),g.col>0){var E=t.getPlannerElementAtGridPos(g.col-1,0,!1);if(E){var I=this.getOptionVal(E.getElementId(),"OPTELEMENT",e);"OPVECK_I"==I?this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVECK_I",e):"OPVECK_A"==I?this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVECK_A",e):this.setOptionValue(h[c],"OPTCORNER_COL_L","OPVOHNE",e)}}if(g.col<d-1){var O=t.getPlannerElementAtGridPos(g.col+1,0,!1);if(O){var k=this.getOptionVal(O.getElementId(),"OPTELEMENT",e);"OPVECK_I"==k?this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVECK_I",e):"OPVECK_A"==k?this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVECK_A",e):this.setOptionValue(h[c],"OPTCORNER_COL_R","OPVOHNE",e)}}}if(this.constructionRules.avoidOptionLastCol){var f=this.getOptionVal(h[c],this.constructionRules.avoidOptionLastCol.onOPT,e);this.arrayContainsValue(this.constructionRules.avoidOptionLastCol.onOPVs,f)&&g.col==d-1&&this.setOptionValue(h[c],this.constructionRules.avoidOptionLastCol.onOPT,this.constructionRules.avoidOptionLastCol.defaultOpv,e)}if(this.constructionRules.avoidOptionFirstCol){var R=this.getOptionVal(h[c],this.constructionRules.avoidOptionFirstCol.onOPT,e);this.arrayContainsValue(this.constructionRules.avoidOptionFirstCol.onOPVs,R)&&0==g.col&&this.setOptionValue(h[c],this.constructionRules.avoidOptionFirstCol.onOPT,this.constructionRules.avoidOptionFirstCol.defaultOpv,e)}var p=this.hasOptionValue(h[c],"OPTWW",e);if(t.getElementIsFirstInGrid(h[c])?(this.setOptionDoShow(h[c],"OPTWERKZEUGKASTEN",e),p&&(t.getSizeOfWholeSet().y>173&&!t.getPlannerHasActiveBackside()?this.setOptionDoShow(h[c],"OPTWW",e):this.setOptionDoHide(h[c],"OPTWW",e))):(this.setOptionDoHide(h[c],"OPTWERKZEUGKASTEN",e),p&&this.setOptionDoHide(h[c],"OPTWW",e)),e.has(h[c])||e.set(h[c],new Map),null===(u=e.get(h[c]))||void 0===u||u.set("DEBUG",t.getElementById(h[c]).getPosNr()+""),i.length>0)for(var P=0;P<i.length;P++){var T=this.getOptionVal(h[c],i[P].opt,e),V=!1;if(i[P].unvalidOPVs&&0!=i[P].unvalidOPVs.length){for(var _=i[P].unvalidOPVs.split(";"),B=0;B<_.length;B++)if(_[B]==T){V=!0;break}}else V=!0;V&&(T!=i[P].opv&&(this.setOptionValue(h[c],i[P].opt,i[P].opv,e),i[P].doShowWarning||(i[P].doShowWarning=!0,s=i[P].warning)))}if(n)for(var a in n)if(""!=a&&n[a]&&""!=n[a])for(l=0;l<this.constructionRules.optionsInfluenceRulesOfSingleElement.length;l++){r=this.constructionRules.optionsInfluenceRulesOfSingleElement[l];var v=!1;if(r.dir&&o&&o.length>0){if("TOP"==r.dir&&t.getElementHasBottomElement(h[c])&&o.indexOf(t.getBottomElement(h[c]).getElementId())>=0&&(v=!0),"DOWN"==r.dir&&t.getElementHasTopElement(h[c])&&o.indexOf(t.getTopElement(h[c]).getElementId())>=0&&(v=!0),"LEFT_RIGHT"==r.dir&&(t.getElementHasLeftElement(h[c])&&o.indexOf(t.getLeftElement(h[c]).getElementId())>=0||t.getElementHasRightElement(h[c])&&o.indexOf(t.getRightElement(h[c]).getElementId())>=0)&&(v=!0),"COL"==r.dir){var G=t.getIndexInGridByElementId(h[c]);t.getAllElementsInColumn(G.col,G.backside).forEach((function(t){return o.indexOf(t.ElementId)>=0?v=!0:void 0}))}if("BACK"==r.dir&&t.getPlannerHasActiveBackside()){var b=t.getOppositeElement(h[c]);b&&o.indexOf(b.getElementId())>=0&&(v=!0)}}else v=!0;if(v){T=this.getOptionVal(h[c],r.influenceOPT,e);a==r.onOPT&&T&&""!=T&&this.arrayContainsValue(r.unvalidOPVs,T)&&this.arrayContainsValue(r.onOPVs,n[a])&&(this.setOptionValue(h[c],r.influenceOPT,r.defaultOpv,e),r.warning&&(s=r.warning))}}var H=this.getCurOptionBasedConstructionRules(h[c],e);if(H)for(var C=0;C<H.length;C++)if(H[C].defaultOptions)for(var D=0;D<H[C].defaultOptions.length;D++){var A=H[C].defaultOptions[D];if(!A.rule||""==A.rule||this.evalRule(h[c],A.rule,e))for(var y=0;y<A.options.length;y++)"doShow"==A.value?this.setOptionDoShow(h[c],A.options[y],e):"doHide"==A.value&&this.setOptionDoHide(h[c],A.options[y],e),A.opv&&this.setOptionValue(h[c],A.options[y],A.opv,e)}this.setOptionValue(h[c],"OPTFAF_L_V","OPVOHNE_FAF",e),this.setOptionValue(h[c],"OPTFAF_L_H","OPVOHNE_FAF",e),this.setOptionValue(h[c],"OPTFAF_R_V","OPVOHNE_FAF",e),this.setOptionValue(h[c],"OPTFAF_R_H","OPVOHNE_FAF",e)}return s}},{key:"doCorrectAffectedElementsByOption",value:function doCorrectAffectedElementsByOption(t,e,n,o){if(null!=o&&1==o.length){var i=o[0];if(null!=n)for(var s in n){if(this.constructionRules.forceSameOptionInGrid&&this.arrayContainsValue(this.constructionRules.forceSameOptionInGrid,s)){var l=t.getIndexInGridByElementId(i).backside?t.getAllElementsInBackGrid():t.getAllElementsInFrontGrid();if(null!=l)for(var r=0;r<l.length;r++)this.setOptionValue(l[r].ElementId,s,n[s],e)}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInCol,s)){var a=t.getIndexInGridByElementId(i),h=t.getAllElementsInColumn(a.col,a.backside);if(null!=h){if(t.getPlannerHasActiveBackside()){var c,u=t.getAllElementsInColumn(a.col,!a.backside);u&&(h=null===(c=h)||void 0===c?void 0:c.concat(u))}for(r=0;r<h.length;r++)this.setOptionValue(h[r].ElementId,s,n[s],e)}}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInRow,s)){var m=t.getIndexInGridByElementId(i),d=t.getAllElementsInRow(m.row,m.backside);if(d&&t.getPlannerHasActiveBackside()){var g=t.getAllElementsInRow(m.row,!m.backside);g&&(d=d.concat(g))}for(r=0;r<d.length;r++)this.setOptionValue(d[r].ElementId,s,n[s],e)}}var E=t.getIndexInGridByElementId(i),I=t.getAllElementsInRow(E.row,E.backside);for(r=0;r<I.length;r++)if(I[r].getElementId()!=i)for(var O=0;O<this.constructionRules.forceSameOptionInRow.length;O++){var k=this.getOptionVal(I[r].getElementId(),this.constructionRules.forceSameOptionInRow[O],e);this.setOptionValue(i,this.constructionRules.forceSameOptionInRow[O],k,e);break}}}},{key:"handleVisibility_SHOW_HIDE",value:function handleVisibility_SHOW_HIDE(t,e,n,o){if(this.checkArticleHasOption(t,n.OPTCurrentElem)&&this.checkArticleHasOption(e,n.OPTNeighborElem)){var i=this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.get(t).indexOf(n.OPTCurrentElem)>=0;this.setOptionDoHide(e,n.OPTNeighborElem,o),i||this.setOptionDoShow(t,n.OPTCurrentElem,o)}}},{key:"handleBacksideVisibility_SHOW_HIDE",value:function handleBacksideVisibility_SHOW_HIDE(t,e,n,o){if(this.checkArticleHasOption(t,n.OPTCurrentElem)&&this.checkArticleHasOption(e,n.OPTNeighborElem)){var i=this.constructionRules.optionsVisibilityInfo[n.OPTCurrentElem],s=this.constructionRules.optionsVisibilityInfo[n.OPTNeighborElem];i&&s&&this.getOptionVal(t,n.OPTCurrentElem,o)==i.doShow&&this.getOptionVal(e,n.OPTNeighborElem,o)==s.doShow&&this.setOptionDoHide(t,n.OPTCurrentElem,o)}}},{key:"handleVisibiliy_HIDE_HIDE",value:function handleVisibiliy_HIDE_HIDE(t,e,n,o){var i=this.constructionRules.optionsVisibilityInfo[n.OPTCurrentElem];if(this.checkArticleHasOption(t,n.OPTCurrentElem)&&this.checkArticleHasOption(e,n.OPTNeighborElem)){var s=this.constructionRules.optionsVisibilityInfo[n.OPTNeighborElem],l=i.doShow==this.getOptionVal(t,n.OPTCurrentElem,o),r=this.getOptionVal(e,n.OPTNeighborElem,o)==s.doShow;l&&r&&(this.setOptionDoHide(t,n.OPTCurrentElem,o),this.setOptionDoHide(e,n.OPTNeighborElem,o))}}},{key:"correctSimpleOpt",value:function correctSimpleOpt(t,e,n,o,i){var s=n.getPlannerElementAtGridPos(t,e,i);if(this.constructionRules.defaultConstructionRules.TOP){var l=void 0;if(n.getElementHasTopElement(s.ElementId)){l=n.getPlannerElementAtGridPos(t,e+1,i);for(var r=0;r<this.constructionRules.defaultConstructionRules.TOP.length;r++){var a=this.constructionRules.defaultConstructionRules.TOP[r];"SHOW_HIDE"==a.OPTValueRule?this.handleVisibility_SHOW_HIDE(s.ElementId,l.ElementId,a,o):"HIDE_HIDE"==a.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(s.ElementId,l.ElementId,a,o)}}}if(this.constructionRules.defaultConstructionRules.RIGHT){var h=void 0;if(i?n.getElementHasLeftElement(s.ElementId):n.getElementHasRightElement(s.ElementId)){h=i?n.getPlannerElementAtGridPos(t-1,e,i):n.getPlannerElementAtGridPos(t+1,e,i);for(r=0;r<this.constructionRules.defaultConstructionRules.RIGHT.length;r++){var c=this.constructionRules.defaultConstructionRules.RIGHT[r];"SHOW_HIDE"==c.OPTValueRule?this.handleVisibility_SHOW_HIDE(s.ElementId,h.ElementId,c,o):"HIDE_HIDE"==c.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(s.ElementId,h.ElementId,c,o)}}}if(this.constructionRules.defaultConstructionRules.DOWN){var u=void 0;if(e>0){u=n.getPlannerElementAtGridPos(t,e-1,i);for(r=0;r<this.constructionRules.defaultConstructionRules.DOWN.length;r++){var m=this.constructionRules.defaultConstructionRules.DOWN[r];"SHOW_HIDE"==m.OPTValueRule?this.handleVisibility_SHOW_HIDE(s.ElementId,u.ElementId,m,o):"HIDE_HIDE"==m.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(s.ElementId,u.ElementId,m,o)}}}var d=i?n.getLeftElement(s.ElementId):n.getRightElement(s.ElementId),g=i?n.getRightElement(s.ElementId):n.getLeftElement(s.ElementId),E=n.getTopElement(s.ElementId),I=n.getBottomElement(s.ElementId),O=i?n.getTopLeftElement(s.ElementId):n.getTopRightElement(s.ElementId);d?this.setOptionValue(s.ElementId,"OPTNACHBAR_RECHTS",this.getOptionVal(d.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_RECHTS",o),g?this.setOptionValue(s.ElementId,"OPTNACHBAR_LINKS",this.getOptionVal(g.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_LINKS",o),E?this.setOptionValue(s.ElementId,"OPTNACHBAR_OBEN",this.getOptionVal(E.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_OBEN",o),O?this.setOptionValue(s.ElementId,"OPTNACHBAR_OBEN_RECHTS",this.getOptionVal(O.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_OBEN_RECHTS",o),this.constructionRules.hasNeighbors&&this.constructionRules.hasNeighbors.indexOf("OPTNACHBAR_UNTEN")>=0&&(I?this.setOptionValue(s.ElementId,"OPTNACHBAR_UNTEN",this.getOptionVal(I.ElementId,"OPTELEMENT",o),o):this.setOptionDoHide(s.ElementId,"OPTNACHBAR_UNTEN",o))}},{key:"correctBack",value:function correctBack(t,e,n){if(this.constructionRules.hasDMOD)if(t.getPlannerHasActiveBackside()){var o=void 0;if(o=t.getOppositeElement(n),this.constructionRules.defaultConstructionRules.BACK)for(var i=0;i<this.constructionRules.defaultConstructionRules.BACK.length;i++){var s,l,r=this.constructionRules.defaultConstructionRules.BACK[i],a=!1;if(r.hideOnElemAndOppositeOPT&&r.hideOnElemAndOppositeOPV)this.arrayContainsValue(r.hideOnElemAndOppositeOPV,this.getOptionVal(n,r.hideOnElemAndOppositeOPT,e))&&this.arrayContainsValue(r.hideOnElemAndOppositeOPV,this.getOptionVal(null===(s=o)||void 0===s?void 0:s.getElementId(),r.hideOnElemAndOppositeOPT,e))&&(a=!0);if(a)this.setOptionDoHide(n,r.OPTCurrentElem,e),this.setOptionDoHide(o.getElementId(),r.OPTCurrentElem,e);else if("FORCE_HIDE"==r.OPTValueRule&&this.setOptionDoHide(o.getElementId(),r.OPTCurrentElem,e),"SHOW_HIDE"==r.OPTValueRule)this.handleBacksideVisibility_SHOW_HIDE(null===(l=o)||void 0===l?void 0:l.getElementId(),n,r,e);else"HIDE_HIDE"==r.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(o.ElementId,n,r,e)}this.getElementHasBottomPlate(o,e)?this.setOptionDoShow(n,"OPTOPP_RAHMEN_U_V",e):this.setOptionDoHide(n,"OPTOPP_RAHMEN_U_V",e),this.getElementHasTopPlate(o,t,e)?this.setOptionDoShow(n,"OPTOPP_RAHMEN_O_V",e):this.setOptionDoHide(n,"OPTOPP_RAHMEN_O_V",e)}else this.setOptionDoHide(n,"OPTOPP_RAHMEN_U_V",e),this.setOptionDoHide(n,"OPTOPP_RAHMEN_O_V",e)}},{key:"correctBottom",value:function correctBottom(t,e,n){var o="";if(this.constructionRules.correctLeftRight&&null!=this.constructionRules.correctLeftRight.rowIndex)for(var i=t.getAllElementsInRow(this.constructionRules.correctLeftRight.rowIndex,n),s=0;s<i.length;s++){var l=i[s];if(0==s){if(null==(o=this.getOptionVal(l.ElementId,this.constructionRules.correctLeftRight.optWithOptVal,e)))return;n?this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optRight,o,e):(this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optLeft,o,e),this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optLeftBack,o,e))}n?this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optLeft,o,e):(this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optRight,o,e),this.setOptionValue(l.ElementId,this.constructionRules.correctLeftRight.optRightBack,o,e))}}},{key:"getValidLadder",value:function getValidLadder(t,e,n){for(var o=e.getAllElementsInColumn(t,!1),i=0;i<this.constructionRules.correctLadder.validLadder.length;i++){var s=this.constructionRules.correctLadder.validLadder[i];if(o.length==s.colCount){for(var l=!0,r=0;r<o.length;r++){var a=o[r];if(this.getOptionVal(a.ElementId,s.heightOption,n)!=s.heightPerRow[r]&&(l=!1),!l)break}if(l)return s}}}},{key:"correctLadder",value:function correctLadder(t,e){if(this.constructionRules.correctLadder){for(var n=t.getAllElementsInRow(this.constructionRules.correctLadder.rowIndex,!1),o=0;o<n.length;o++){var i=t.getRowCount(o);if(this.constructionRules.correctLadder.onElementHighestRowCount&&-1==this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(i))for(var s=t.getAllElementsInColumn(o,!1),l=0;l<s.length;l++)this.setOptionValue(s[l].ElementId,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,e);if(i<t.getSizeOfHighesRow(!1)){var r,a=null===(r=t.getPlannerElementAtGridPos(o,i-1,!1))||void 0===r?void 0:r.getElementId();a&&this.getOptionVal(a,this.constructionRules.correctLadder.optHeight,e)==this.constructionRules.correctLadder.opvProblematicHeight&&this.setOptionValue(a,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,e)}}for(o=0;o<n.length;o++){var h=n[o],c=this.getValidLadder(o,t,e);0==o&&this.setOptionValue(h.ElementId,this.constructionRules.correctLadder.optLadderLeft,c.optLadder,e);var u=c;if(t.getElementHasRightElement(h.getElementId())){var m=this.getValidLadder(o+1,t,e);m.colCount>c.colCount&&(u=m)}this.setOptionValue(h.getElementId(),this.constructionRules.correctLadder.optLadderRight,u.optLadder,e)}var d=t.getSizeOfHighesRow(!1);if(this.constructionRules.correctLadder.onElementHighestRowCount&&this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(d)>=0){var g=t.getAllElementsInRow(d-1,!1);for(o=0;o<g.length;o++){var E=g[o];this.setOptionDoShow(E.getElementId(),this.constructionRules.correctLadder.optHasHeight,e)}}}}},{key:"correctSeries",value:function correctSeries(t,e){for(var n=!1,o=t.getAllElementIdsInGrid(),i=!1,s=!1,l=0;l<o.length;l++){var r=o[l];this.getElementIsCornerElement(t.getElementById(r),e)&&(i=!0),this.checkArticleHasOption(r,"OPTBR_ABDECKPLATTE")&&this.setOptionDoHide(r,"OPTBR_ABDECKPLATTE",e);var a=this.getOptionVal(r,"OPTABDECKPLATTE",e);this.checkArticleHasOption(r,"OPTABDECKPLATTE")&&"OPVMIT_PLATTE"==a&&(n=!0),"OPVBR_18"==this.getOptionVal(r,"OPTBR",e)&&(s=!0)}if(!t.getPlannerHasActiveBackside()&&t.getPlannerElementAtGridPos(0,0,!1)){for(var h=t.getSizeOfHighesRow(!1),c=[],u=[],m=[],d=0,g=0,E=t.getAllElementsInColumn(g,!1);null!=E;){if(E.length==h){var I=E[h-1];m.push(I),"OPVBR_75"==(a=this.getOptionVal(I.ElementId,"OPTBR",e))?d+=75:"OPVBR_18"==a?d+=18.75:"OPVBR_37"==a&&(d+=37.5),this.setOptionDoHide(I.ElementId,"OPTOBEN",e)}else m.length>0&&(c.push(m),u.push(d)),m=[],d=0;g++,E=t.getAllElementsInColumn(g,!1)}for(m.length>0&&(c.push(m),u.push(d)),l=0;l<c.length;l++){var O=c[l][0],k="";if(this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_40")>=0&&Math.abs(u[l]-40.4)<3?k="OPVABDECKPLATTE_40":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_77")>=0&&Math.abs(u[l]-77.8)<3?k="OPVABDECKPLATTE_77":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_115")>=0&&Math.abs(u[l]-115.3)<3?k="OPVABDECKPLATTE_115":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_152")>=0&&Math.abs(u[l]-152.8)<3?k="OPVABDECKPLATTE_152":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_190")>=0&&Math.abs(u[l]-190.3)<3?k="OPVABDECKPLATTE_190":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_227")>=0&&Math.abs(u[l]-227.8)<3&&(k="OPVABDECKPLATTE_227"),""==k||i)for(var f=t.getAllElementsInGrid(),R=0;R<f.length;R++)this.checkArticleHasOption(f[R].getElementId(),"OPTABD_HIDE")&&this.setOptionDoShow(f[R].getElementId(),"OPTABD_HIDE",e);else for(var p=t.getAllElementsInGrid(),P=0;P<p.length;P++)this.checkArticleHasOption(p[P].getElementId(),"OPTABD_HIDE")&&this.setOptionDoHide(p[P].getElementId(),"OPTABD_HIDE",e);if(""==k||!n||i||s)for(var T=0;T<c[l].length;T++)this.setOptionDoShow(c[l][T].ElementId,"OPTOBEN",e);else this.setOptionValue(O.ElementId,"OPTBR_ABDECKPLATTE",k,e)}}}},{key:"correctForceOptOfElement",value:function correctForceOptOfElement(t,e,n,o){var i=e.getIndexInGridByElementId(t);if(i)for(var s=this.getCurOptionBasedConstructionRules(t,n),l=0;l<s.length;l++){if(s[l].forceOptions)for(var r=0;r<s[l].forceOptions.length;r++){var a=s[l].forceOptions[r];if(!a.rule||""==a.rule||this.evalRule(t,a.rule,n))for(var h=a.options,c=a.value,u=0;u<h.length;u++){var m=h[u],d=this.constructionRules.optionsVisibilityInfo[m];if(d.complementDir){var g=d.complementDir;o&&("LEFT"==g?g="RIGHT":"RIGHT"==g&&(g="LEFT"));var E=e.getNeighborElement(i.col,i.row,g,i.backside);if(null!=E){for(var I=this.getCurOptionBasedConstructionRules(E.ElementId,n),O=d.complementOPT,k=!1,f=0;f<I.length;f++)if(I[f].forceOptions)for(var R=0;R<I[f].forceOptions.length;R++){var p=I[f].forceOptions[R];if((!p.rule||""==p.rule||this.evalRule(E.ElementId,p.rule,n))&&(this.arrayContainsValue(p.options,O)&&(k=!0,"doShow"==c&&"doShow"==p.value&&("OPVFUELLUNG"==this.getOptionVal(t,"OPTELEMENT",n)&&"OPVFUELLUNG"==this.getOptionVal(E.ElementId,"OPTELEMENT",n)?(this.setOptionDoHide(E.ElementId,O,n),this.setOptionDoHide(E.ElementId,O,n)):this.setOptionDoShow(E.ElementId,O,n)),"doHide"==c&&"doHide"==p.value&&(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)),"doShow"==c&&"doHide"==p.value||"doHide"==c&&"doShow"==p.value))){var P=!0;a.prio&&p.prio?P=a.prio<=p.prio:a.prio?P=!0:p.prio&&(P=!1),P?"doHide"==c?(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)):"doShow"==c&&(this.setOptionDoShow(t,m,n),this.setOptionDoHide(E.ElementId,O,n)):"doHide"==p.value?(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)):"doShow"==p.value&&(this.setOptionDoHide(t,m,n),this.setOptionDoShow(E.ElementId,O,n))}}k||("doShow"==c&&(this.setOptionDoShow(t,m,n),this.setOptionDoHide(E.ElementId,O,n)),"doHide"==c&&(this.setOptionDoHide(t,m,n),this.setOptionDoHide(E.ElementId,O,n)))}else"doShow"==c&&this.setOptionDoShow(t,m,n),"doHide"==c&&this.setOptionDoHide(t,m,n)}}}if(s[l].changeOptions)for(var T=0;T<s[l].changeOptions.length;T++){for(var V=!0,_=s[l].changeOptions[T].rule.split("&"),B=0;B<_.length;B++)if(_[B].indexOf("!=")>0){var v=_[B].split("!=")[0],G=_[B].split("!=")[1];this.getOptionVal(t,v,n)==G&&(V=!1)}else{v=_[B].split("=")[0],G=_[B].split("=")[1];this.getOptionVal(t,v,n)!=G&&(V=!1)}V&&(s[l].changeOptions[T].doShow&&this.setOptionDoShow(t,s[l].changeOptions[T].doShow,n),s[l].changeOptions[T].doHide&&this.setOptionDoHide(t,s[l].changeOptions[T].doHide,n),s[l].changeOptions[T].opt&&s[l].changeOptions[T].opv&&this.setOptionValue(t,s[l].changeOptions[T].opt,s[l].changeOptions[T].opv,n))}}}},{key:"correctNeighborCustomOLTs",value:function correctNeighborCustomOLTs(t,e,n){if(this.constructionRules.correctNeighborOPT&&0!=this.constructionRules.correctNeighborOPT.length)for(var o=0;o<this.constructionRules.correctNeighborOPT.length;o++){var i=e.getIndexInGridByElementId(t);if(this.setOptionValue(t,this.constructionRules.correctNeighborOPT[o].opt,"OPVOHNE",n),!i)return;var s=e.getNeighborElement(i.col,i.row,this.constructionRules.correctNeighborOPT[o].dir,i.backside);if(null!=s){var l=this.getOptionVal(s.ElementId,this.constructionRules.correctNeighborOPT[o].neighborOPT,n);""!=l&&this.setOptionValue(t,this.constructionRules.correctNeighborOPT[o].opt,l,n)}}}},{key:"doChangeRetailArticleNumbers",value:function doChangeRetailArticleNumbers(t,e){var n=t.getAllElementsInGrid();if(this.constructionRules.correctRetailArticleNumberByRule&&this.constructionRules.correctRetailArticleNumberByRule.length>0)for(var o=!0,i=0;i<this.constructionRules.correctRetailArticleNumberByRule.length;i++){var s=this.constructionRules.correctRetailArticleNumberByRule[i];if("global"==s.range){for(var l=0;l<n.length&&o;l++){this.evalRule(n[l].getElementId(),s.rule,e)||(o=!1)}if(o)return{doChange:!0,retailArticleRules:s.retailArticleRules}}}return{doChange:!1}}},{key:"setConstructionRules",value:function setConstructionRules(t){t&&t.constructionRules&&(this.constructionRules=t.constructionRules,this.partlistHelper.setConstructionRules(t.constructionRules),this.constructionRulesLoaded=!0)}},{key:"getConstructionRulesLoaded",value:function getConstructionRulesLoaded(){return this.constructionRulesLoaded}},{key:"updateOptionLogicBoxPlanner",value:(t=(0,o.Z)(a().mark((function _callee(t,e,n,o){var i,s,l,r,c,u,m;return a().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(null!=this.constructionRules&&this.constructionRulesLoaded){a.next=3;break}return d.error(new h.GE("Error construction rules are not set for boxPlanner",{code:"WC_0012"})),a.abrupt("return");case 3:if(i=(new Date).getTime(),s=void 0,d.debug("BoxPlanner - updateOptionLogicInGrid start updateOptionLogicInGrid"),l=new Map,o)for(r=t.getAllElementIdsInGrid(),e=void 0,n=void 0,c=0;c<r.length;c++)this.getElementIsCornerElement(t.getElementById(r[c]),l)&&this.setOptionValue(r[c],"OPTELEMENT","OPVOFFENES_FACH",l);for(s=this.setAllOptToDefault(t,l,e,n),this.doCorrectAffectedElementsByOption(t,l,e,n),this.correctBottom(t,l,!1),t.getPlannerHasActiveBackside()&&this.correctBottom(t,l,!0),this.correctSeries(t,l),c=0;c<t.getColumnCount();c++)for(u=0;u<t.getRowCount(c);u++)this.correctSimpleOpt(c,u,t,l,!1);if(t.getPlannerHasActiveBackside())for(c=t.getColumnCount()-1;c>=0;c--)for(u=0;u<t.getRowCount(c);u++)this.correctSimpleOpt(c,u,t,l,!0);for(c=0;c<t.getColumnCount();c++)for(u=0;u<t.getRowCount(c);u++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(c,u,!1).ElementId,t,l,!1),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(c,u,!1).ElementId,t,l);if(t.getPlannerHasActiveBackside())for(c=t.getColumnCount()-1;c>=0;c--)for(u=0;u<t.getRowCount(c);u++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(c,u,!0).ElementId,t,l,!0),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(c,u,!0).ElementId,t,l);for(this.correctLadder(t,l),this.partlistHelper.calculateKnots(t,l),this.partlistHelper.calculateRahmen(t,l),c=0;c<t.getColumnCount();c++)for(u=0;u<t.getRowCount(c);u++)this.correctBack(t,l,t.getPlannerElementAtGridPos(c,u,!1).getElementId());return m=this.doChangeRetailArticleNumbers(t,l),a.next=25,this.updateCfgValuesByPlanner(l,void 0,this.constructionRules.partlistRules.bundleRules,m);case 25:return d.debug("BoxPlanner updateOptionLogic - Duration after setting Option Values of all Articles: "+((new Date).getTime()-i)),d.debug("BoxPlanner updateOptionLogic - Duration after setting updating configurator: "+((new Date).getTime()-i)),a.abrupt("return",s);case 28:case"end":return a.stop()}}),_callee,this)}))),function updateOptionLogicBoxPlanner(e,n,o,i){return t.apply(this,arguments)})},{key:"onElemDeleted",value:function onElemDeleted(t){this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.delete(t)}},{key:"onElementCopy",value:function onElementCopy(t,e){if(this.hideOptionsForConstruction.has(t)){var n=this.hideOptionsForConstruction.get(t);this.hideOptionsForConstruction.set(e,(0,c.Z)(n))}}},{key:"getHasMaxElemCountPerColumn",value:function getHasMaxElemCountPerColumn(){return null!=this.constructionRules.maxElemCountPerCol}},{key:"getMaxElemCountPerColumn",value:function getMaxElemCountPerColumn(){return this.constructionRules.maxElemCountPerCol}},{key:"getForceWholePlanningSameHeight",value:function getForceWholePlanningSameHeight(){return this.constructionRules.forceWholePlanningSameHeight}}]);var t}(),E=n(64357),I=n(85398),O=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),k=function(){return(0,s.Z)((function BoxPlannerGrid(t){(0,i.Z)(this,BoxPlannerGrid),(0,l.Z)(this,"plannedElementGrid",void 0),(0,l.Z)(this,"backModulPlannedElementGrid",void 0),(0,l.Z)(this,"hasActiveBackside",void 0),(0,l.Z)(this,"getValueOfOptionOfArticle",void 0),this.plannedElementGrid=new Array(new Array),this.backModulPlannedElementGrid=new Array(new Array),this.hasActiveBackside=!1,this.getValueOfOptionOfArticle=t}),[{key:"getGridColumnWidth",value:function getGridColumnWidth(t,e){for(var n=-1,o=e?this.backModulPlannedElementGrid:this.plannedElementGrid,i=0;i<o[t].length;i++){var s=o[t][i]?null==o[t][i].Width?0:o[t][i].Width:0;s>n&&(n=s)}return n}},{key:"getGridColumnHeight",value:function getGridColumnHeight(t){var e=0;if(this.plannedElementGrid.length>t)for(var n=this.plannedElementGrid[t],o=0;o<n.length;o++){var i;e+=null===(i=n[o])||void 0===i?void 0:i.Height}return e}},{key:"deleteGridPos",value:function deleteGridPos(t){var e=new Array,n=t.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(1==n[t.col].length)for(var o=0;o<n.length;o++)o!=t.col&&(o<t.col?e[o]=n[o]:e[o-1]=n[o]);else for(o=0;o<n.length;o++)if(o!=t.col)e[o]=n[o];else{e[o]=new Array;for(var i=0;i<n[o].length;i++)i!=t.row&&(e[o][i]=n[o][i])}t.backside?this.backModulPlannedElementGrid=e:this.plannedElementGrid=e}},{key:"getPlannerElementAtGridPos",value:function getPlannerElementAtGridPos(t,e,n){var o=n?this.backModulPlannedElementGrid:this.plannedElementGrid;if(o[t]&&o[t][e])return o[t][e]}},{key:"getIndexInGridByElementId",value:function getIndexInGridByElementId(t){for(var e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)if(this.plannedElementGrid[e][n]&&this.plannedElementGrid[e][n].ElementId==t)return{col:e,row:n,backside:!1};for(e=0;e<this.backModulPlannedElementGrid.length;e++)for(n=0;n<this.backModulPlannedElementGrid[e].length;n++)if(this.backModulPlannedElementGrid[e][n]&&this.backModulPlannedElementGrid[e][n].ElementId==t)return{col:e,row:n,backside:!0};return{col:-1,row:-1,backside:!1}}},{key:"getAllElementIdsInGrid",value:function getAllElementIdsInGrid(){for(var t=[],e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)this.plannedElementGrid[e][n]&&t.push(this.plannedElementGrid[e][n].ElementId);for(e=0;e<this.backModulPlannedElementGrid.length;e++)for(n=0;n<this.backModulPlannedElementGrid[e].length;n++)this.backModulPlannedElementGrid[e][n]&&t.push(this.backModulPlannedElementGrid[e][n].ElementId);return t}},{key:"getAllElementsInFrontGrid",value:function getAllElementsInFrontGrid(){for(var t=[],e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)t.push(this.plannedElementGrid[e][n]);return t}},{key:"getAllElementsInBackGrid",value:function getAllElementsInBackGrid(){for(var t=[],e=0;e<this.backModulPlannedElementGrid.length;e++)for(var n=0;n<this.backModulPlannedElementGrid[e].length;n++)t.push(this.backModulPlannedElementGrid[e][n]);return t}},{key:"getAllElementsInGrid",value:function getAllElementsInGrid(){for(var t=[],e=0;e<this.plannedElementGrid.length;e++)for(var n=0;n<this.plannedElementGrid[e].length;n++)t.push(this.plannedElementGrid[e][n]);for(e=0;e<this.backModulPlannedElementGrid.length;e++)for(n=0;n<this.backModulPlannedElementGrid[e].length;n++)this.backModulPlannedElementGrid[e][n]&&t.push(this.backModulPlannedElementGrid[e][n]);return t}},{key:"getElementById",value:function getElementById(t){var e=this.getIndexInGridByElementId(t);return(e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid)[e.col][e.row]}},{key:"getElementIsFirstInGrid",value:function getElementIsFirstInGrid(t){var e=this.getIndexInGridByElementId(t);return 0==e.col&&0==e.row&&!e.backside}},{key:"getElementIsInLastCol",value:function getElementIsInLastCol(t,e){var n=e?this.backModulPlannedElementGrid:this.plannedElementGrid;return this.getIndexInGridByElementId(t).col+1==n.length}},{key:"getElementHasTopElement",value:function getElementHasTopElement(t){var e=this.getIndexInGridByElementId(t);return(e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid)[e.col].length>e.row+1}},{key:"getTopElement",value:function getTopElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(n[e.col].length>e.row+1)return n[e.col][e.row+1]}},{key:"getTopRightElement",value:function getTopRightElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(n.length>e.col+1&&null!=n[e.col+1][e.row+1])return n[e.col+1][e.row+1]}},{key:"getTopLeftElement",value:function getTopLeftElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(e.col>0&&null!=n[e.col-1][e.row-1])return n[e.col-1][e.row-1]}},{key:"getElementHasBottomElement",value:function getElementHasBottomElement(t){return this.getIndexInGridByElementId(t).row-1>=0}},{key:"getBottomElement",value:function getBottomElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(e.row-1>=0)return n[e.col][e.row-1]}},{key:"getElementHasRightElement",value:function getElementHasRightElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;return n.length>e.col+1&&null!=n[e.col+1][e.row]}},{key:"getRightElement",value:function getRightElement(t){var e=this.getIndexInGridByElementId(t),n=e.backside?this.backModulPlannedElementGrid:this.plannedElementGrid;if(n.length>e.col+1&&null!=n[e.col+1][e.row])return n[e.col+1][e.row]}},{key:"getElementHasLeftElement",value:function getElementHasLeftElement(t){var e=this.getIndexInGridByElementId(t);return e.col>0&&null!=this.getPlannerElementAtGridPos(e.col-1,e.row,e.backside)}},{key:"getLeftElement",value:function getLeftElement(t){var e=this.getIndexInGridByElementId(t);if(e.col>0&&null!=this.getPlannerElementAtGridPos(e.col-1,e.row,e.backside))return this.getPlannerElementAtGridPos(e.col-1,e.row,e.backside)}},{key:"getAllElementsInColumn",value:function getAllElementsInColumn(t,e){var n=e?this.backModulPlannedElementGrid:this.plannedElementGrid,o=new Array;if(!(t>=n.length)){for(var i=0;i<n[t].length;i++)n[t][i]&&o.push(n[t][i]);return n.length>t?o:void 0}}},{key:"getColumnCount",value:function getColumnCount(){return this.plannedElementGrid.length}},{key:"getRowCount",value:function getRowCount(t){return this.plannedElementGrid[t].length}},{key:"getAllElementsInRow",value:function getAllElementsInRow(t,e){for(var n=e?this.backModulPlannedElementGrid:this.plannedElementGrid,o=[],i=0;i<n.length;i++)n[i].length>t&&o.push(n[i][t]);return o}},{key:"getSizeOfHighesRow",value:function getSizeOfHighesRow(t){for(var e=t?this.backModulPlannedElementGrid:this.plannedElementGrid,n=0,o=0;o<e.length;o++)n<e[o].length&&(n=e[o].length);return n}},{key:"getNeighborElement",value:function getNeighborElement(t,e,n,o){var i=t,s=e;switch(n){case"TOP":s++;break;case"DOWN":s--;break;case"LEFT":i--;break;case"RIGHT":i++;break;case"BACK":this.hasActiveBackside&&(o=!o)}return this.getPlannerElementAtGridPos(i,s,o)}},{key:"getOppositeElement",value:function getOppositeElement(t){if(this.hasActiveBackside){var e=this.getIndexInGridByElementId(t);return e.backside?this.plannedElementGrid[e.col][e.row]:this.backModulPlannedElementGrid[e.col][e.row]}}},{key:"getAllOppositeElements",value:function getAllOppositeElements(t){var e=[];if(this.hasActiveBackside)for(var n=0;n<t.length;n++){var o=this.getIndexInGridByElementId(t[n]);o.backside?e.push(this.plannedElementGrid[o.col][o.row].getElementId()):this.backModulPlannedElementGrid[o.col][o.row]&&e.push(this.backModulPlannedElementGrid[o.col][o.row].getElementId())}return e}},{key:"getSizeOfWholeSet",value:function getSizeOfWholeSet(){for(var t=0,e=0,n=0,o=0;o<this.plannedElementGrid.length;o++){for(var i=0,s=0;s<this.plannedElementGrid[o].length;s++){var l=this.plannedElementGrid[o][s];i+=l.getHeight(),0==o&&0==s&&(e=l.getDepth())}i>n&&(n=i);var r=this.getGridColumnWidth(o,!1);o>0&&(77.9==r?r=75:40.4==r?r=37.5:21.7==r&&(r=18.75)),t+=r}return this.hasActiveBackside&&(e*=2),new E.P(t,n,e)}},{key:"getAllElementsInSameRowByElementId",value:function getAllElementsInSameRowByElementId(t){var e=this.getIndexInGridByElementId(t),n=this.getAllElementsInRow(e.row,!1);return this.hasActiveBackside&&(n=n.concat(this.getAllElementsInRow(e.row,!0))),{elementIds:n.map((function(t){return t.ElementId})),plannerElements:n,backside:e.backside}}},{key:"getAllElementsDown",value:function getAllElementsDown(t){var e=this.getIndexInGridByElementId(t);if(0==e.row)return{elements:[],backside:!1};for(var n=[],o=0;o<e.row;o++){var i=this.getPlannerElementAtGridPos(e.col,o,e.backside);null!=i&&n.push(i.ElementId)}return{elements:n,backside:e.backside}}},{key:"getAllElementsInSameCol",value:function getAllElementsInSameCol(t){var e=this.getIndexInGridByElementId(t),n=this.getAllElementsInColumn(e.col,e.backside);return null==n&&(n=[]),{elements:n.map((function(t){return t.ElementId})),backside:e.backside}}},{key:"prepareGridForCopy",value:function prepareGridForCopy(t,e){var n=this.getIndexInGridByElementId(t),o=0;switch(e){case"AVL":o=n.col;break;case"AVR":o=n.col+1}for(var i=new Array,s=0;s<this.plannedElementGrid.length+1;s++)i[s]=new Array;for(s=0;s<this.plannedElementGrid.length;s++)for(var l=0;l<this.plannedElementGrid[s].length;l++)s<o?i[s][l]=this.plannedElementGrid[s][l]:i[s+1][l]=this.plannedElementGrid[s][l];if(this.plannedElementGrid=i,this.hasActiveBackside){i=new Array;for(s=0;s<this.backModulPlannedElementGrid.length+1;s++)i[s]=new Array;for(s=0;s<this.backModulPlannedElementGrid.length;s++)for(l=0;l<this.backModulPlannedElementGrid[s].length;l++)s<o?i[s][l]=this.backModulPlannedElementGrid[s][l]:i[s+1][l]=this.backModulPlannedElementGrid[s][l];this.backModulPlannedElementGrid=i}}},{key:"prepareGridForBackSideCopy",value:function prepareGridForBackSideCopy(){this.backModulPlannedElementGrid=new Array;for(var t=0;t<this.plannedElementGrid.length;t++)this.backModulPlannedElementGrid.push(new Array);this.hasActiveBackside=!0}},{key:"addElementAtGridPos",value:function addElementAtGridPos(t,e,n,o){var i=o?this.backModulPlannedElementGrid:this.plannedElementGrid;i&&0!=i.length||(i=new Array),i[e]&&0!=i[e].length||(i[e]=new Array),i[e][n]=t,o?(this.hasActiveBackside=!0,this.backModulPlannedElementGrid=i):this.plannedElementGrid=i}},{key:"addElementAsCopy",value:function addElementAsCopy(t,e,n){var o=this.getIndexInGridByElementId(t),i=o.backside?this.backModulPlannedElementGrid:this.plannedElementGrid,s=!0;switch(n){case"AVR":i[o.col+1][o.row]=e;break;case"AVL":i[o.col-1][o.row]=e;break;case"AVO":i[o.col][o.row+1]=e;break;case"BACKSIDE":this.backModulPlannedElementGrid[o.col][o.row]=e,s=!1}s&&(o.backside?this.backModulPlannedElementGrid=i:this.plannedElementGrid=i)}},{key:"deleteElement",value:function deleteElement(t,e){var n=this.getIndexInGridByElementId(t),o=[];!this.hasActiveBackside||e&&"BoxPlanner_backside"==e||o.push(this.backModulPlannedElementGrid[n.col][n.row]),o.push(this.plannedElementGrid[n.col][n.row]);for(var i=[],s=0;s<o.length;s++)I.Z.removeDockingPointRelations(o[s]),e&&"BoxPlanner_backside"==e?e&&"BoxPlanner_backside"==e&&(this.backModulPlannedElementGrid[n.col][n.row]=void 0):this.deleteGridPos(this.getIndexInGridByElementId(o[s].ElementId)),i.push(o[s].getElementId());return i}},{key:"updateWorldPosOfElements",value:function updateWorldPosOfElements(){for(var t=0;t<this.plannedElementGrid.length;t++)for(var e=0;e<this.plannedElementGrid[t].length;e++){var n=this.plannedElementGrid[t][e];I.Z.removeDockingPointRelations(n)}if(this.hasActiveBackside)for(t=0;t<this.backModulPlannedElementGrid.length;t++)for(e=0;e<this.backModulPlannedElementGrid[t].length;e++){var o=this.backModulPlannedElementGrid[t][e];o&&I.Z.removeDockingPointRelations(o)}var i=1;for(t=0;t<this.plannedElementGrid.length;t++){for(e=0;e<this.plannedElementGrid[t].length;e++){var s=this.plannedElementGrid[t][e];this.plannedElementGrid[t]&&this.plannedElementGrid[t][e+1]&&I.Z.tryDockElement(s,"AVO",[this.plannedElementGrid[t][e+1]]),s.PosNr=i,i++}this.plannedElementGrid[t+1]&&this.plannedElementGrid[t+1][0]&&I.Z.tryDockElement(this.plannedElementGrid[t][0],"AVR",[this.plannedElementGrid[t+1][0]])}if(this.hasActiveBackside)for(t=0;t<this.backModulPlannedElementGrid.length;t++){for(e=0;e<this.backModulPlannedElementGrid[t].length;e++){var l=this.backModulPlannedElementGrid[t][e],r=this.plannedElementGrid[t][e].getDockingPointById("AVO_AVO_2_IL");r?l&&I.Z.tryDockElementToDP(l,this.plannedElementGrid[t][e],r):O.error(new h.GE("Error Loading DockingPoint AVO_2 for plannerElement")),this.backModulPlannedElementGrid[t]&&this.backModulPlannedElementGrid[t][e+1]&&l&&this.backModulPlannedElementGrid[t][e+1]&&I.Z.tryDockElement(l,"AVO",[this.backModulPlannedElementGrid[t][e+1]]),l&&(l.PosNr=i),i++}this.backModulPlannedElementGrid[t+1]&&this.backModulPlannedElementGrid[t+1][0]&&this.backModulPlannedElementGrid[t][0]&&I.Z.tryDockElement(this.backModulPlannedElementGrid[t][0],"AVL",[this.backModulPlannedElementGrid[t+1][0]])}}},{key:"destroyBoxPlannerGrid",value:function destroyBoxPlannerGrid(){for(var t=0;t<this.plannedElementGrid.length;t++){for(var e=0;e<this.plannedElementGrid[t].length;e++){this.plannedElementGrid[t][e].destroy()}this.plannedElementGrid[t]=[]}if(this.plannedElementGrid=[],this.hasActiveBackside){this.hasActiveBackside=!1;for(t=0;t<this.backModulPlannedElementGrid.length;t++){for(e=0;e<this.backModulPlannedElementGrid[t].length;e++){var n=this.backModulPlannedElementGrid[t][e];n&&n.destroy()}this.backModulPlannedElementGrid[t]=[]}this.backModulPlannedElementGrid=[]}}},{key:"getAllElementsInBacksideModuleGrid",value:function getAllElementsInBacksideModuleGrid(){for(var t=[],e=0;e<this.backModulPlannedElementGrid.length;e++)for(var n=0;n<this.backModulPlannedElementGrid[e].length;n++)this.backModulPlannedElementGrid[e][n]&&t.push(this.backModulPlannedElementGrid[e][n].ElementId);return t}},{key:"destroyBacksideModuleGrid",value:function destroyBacksideModuleGrid(){this.hasActiveBackside=!1;for(var t=[],e=0;e<this.backModulPlannedElementGrid.length;e++){for(var n=0;n<this.backModulPlannedElementGrid[e].length;n++){var o=this.backModulPlannedElementGrid[e][n];o&&(t.push(o.ElementId),o.destroy())}this.backModulPlannedElementGrid[e]=[]}this.backModulPlannedElementGrid=[]}},{key:"getPlannerHasActiveBackside",value:function getPlannerHasActiveBackside(){return this.hasActiveBackside}},{key:"getBoundingBox",value:function getBoundingBox(){var t,e=0,n=0,o=0,i=0,s=0,l=this.plannedElementGrid[0][0].getDepth(),r=0;t="RIGHT";for(var a=0;a<this.plannedElementGrid.length;a++){var h=this.plannedElementGrid[a][0],c=this.getValueOfOptionOfArticle(h.getElementId(),"OPTELEMENT");"RIGHT"==t?i+=this.plannedElementGrid[a][0].getWidth():"FRONT"==t?l+=this.plannedElementGrid[a][0].getWidth():"LEFT"==t?i-=this.plannedElementGrid[a][0].getWidth():"BACK"==t&&(l-=this.plannedElementGrid[a][0].getWidth()),"OPVECK_I"==c?"RIGHT"==t?t="FRONT":"FRONT"==t?t="LEFT":"LEFT"==t?t="BACK":"BACK"==t&&(t="RIGHT"):"OPVECK_A"==c&&("RIGHT"==t?t="BACK":"FRONT"==t?t="RIGHT":"LEFT"==t?t="FRONT":"BACK"==t&&(t="LEFT")),i<n&&(n=i),i>o&&(o=i),l<s&&(s=l),l>r&&(r=l);var u=this.getGridColumnHeight(a);e=e<u?u:e}var m=r-s,d=o-n;return this.hasActiveBackside&&(m=2*this.plannedElementGrid[0][0].getDepth()),{width:Math.round(1e3*d)/1e3,height:Math.round(1e3*e)/1e3,depth:Math.round(1e3*m)/1e3}}}])}(),f=n(74324),R=n(57312),p=n(58178),P=h.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),T=function(){function DivaBoxPlanner(t,e){(0,i.Z)(this,DivaBoxPlanner),(0,l.Z)(this,"set",void 0),(0,l.Z)(this,"plannerID",void 0),(0,l.Z)(this,"constructionRulesHandler",void 0),(0,l.Z)(this,"boxPlannerGrid",void 0),(0,l.Z)(this,"nextElementId",1),this.set=t,this.plannerID=e,this.constructionRulesHandler=new g(this.set.getValueOfOptionOfArticle,this.set.checkArticleHasOption,this.set.updateCfgValuesByPlanner),this.boxPlannerGrid=new k(this.set.getValueOfOptionOfArticle)}return(0,s.Z)(DivaBoxPlanner,[{key:"initPlanner",value:(u=(0,o.Z)(a().mark((function _callee(t){var e,n,o,i,s,l,r,c,u,m;return a().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(null==(e=JSON.parse(h.ZP.decodeBase64(t))).v||2!=e.v){a.next=26;break}if(e.set&&e.set.elements&&0!=e.set.elements.length){a.next=4;break}return a.abrupt("return");case 4:n=e.set.elements,o=0;case 6:if(!(o<n.length)){a.next=21;break}return i=n[o],s=parseInt(i.elementID),l=new R.Z(this.set.getSetId(),i.basketID,s,DivaBoxPlanner.plannerType),this.nextElementId<s+1&&(this.nextElementId=s+1),this.set.setElementId(i.basketID,l.ElementId),this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(l.ElementId)),(r=this.set.getPlannerData(l.ElementId))&&l.updatePlannerData(r),a.next=17,f.Z.loadSVG(l,this.set);case 17:this.boxPlannerGrid.addElementAtGridPos(l,i.boxPlannerInfo.gridPosCol,i.boxPlannerInfo.gridPosRow,i.boxPlannerInfo.isOnBackside);case 18:o++,a.next=6;break;case 21:return this.boxPlannerGrid.updateWorldPosOfElements(),a.next=24,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 24:a.next=42;break;case 26:c=1,o=0;case 28:if(!(o<e.Elements.length)){a.next=38;break}return u=e.Elements[o],(s=parseInt(u.ID))>c&&(c=s),m={boxElementID:u.ID,boxCol:u.col,boxRow:u.row,boxUpdateWholePlanning:!1},a.next=35,this.addPlannerElement(u.BasketID,m);case 35:o++,a.next=28;break;case 38:return this.nextElementId=c+1,this.boxPlannerGrid.updateWorldPosOfElements(),a.next=42,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 42:return a.abrupt("return",e);case 43:case"end":return a.stop()}}),_callee,this)}))),function initPlanner(t){return u.apply(this,arguments)})},{key:"saveSetPlanner",value:function saveSetPlanner(){for(var t=[],e=this.boxPlannerGrid.getAllElementIdsInGrid(),n=0;n<e.length;n++){var o=this.boxPlannerGrid.getElementById(e[n]);if(o){for(var i=this.boxPlannerGrid.getIndexInGridByElementId(e[n]),s=o.getDockingDockingPoints(),l=[],r=0;r<s.length;r++){var a,h={id:s[r].DpId,onID:s[r].OnElementId,onDPID:null===(a=s[r].OnDP)||void 0===a?void 0:a.DpId};l.push(h)}var c={elementID:o.getElementId(),basketID:this.set.getBasketId(o.getElementId()),CatalogCodex:this.set.getCatalogCodex(),Codex:this.set.getArticleCodex(o.getElementId()),posNr:o.PosNr,x:o.WorldPosCenter.x,y:o.WorldPosCenter.y,z:o.WorldPosCenter.z,rot:o.RotDeg,width:o.Width?o.Width:-1,height:o.Height?o.Height:-1,depth:o.Depth?o.Depth:-1,DP:l,boxPlannerInfo:{gridPosCol:i.col,gridPosRow:i.row,isOnBackside:i.backside}};t.push(c)}}var u=this.boxPlannerGrid.getBoundingBox();return{setId:this.set.getSetId(),x:0,y:0,z:0,width:u.width,height:u.height,depth:u.depth,rot:0,elements:t}}},{key:"addPlannerElement",value:(c=(0,o.Z)(a().mark((function _callee2(t,e){var n,o;return a().wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:if(null!=e&&null!=e.boxElementID&&null!=e.boxCol&&null!=e.boxRow){i.next=2;break}return i.abrupt("return");case 2:return n=new R.Z(this.set.getSetId(),t,e.boxElementID,DivaBoxPlanner.plannerType),this.nextElementId=isNaN(e.boxElementID)?this.nextElementId:e.boxElementID+1,this.set.setElementId(t,n.ElementId),o=this.set.getPlannerData(n.ElementId),n.updatePlannerData(o),i.next=9,f.Z.loadSVG(n,this.set);case 9:if(this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(n.ElementId)),this.boxPlannerGrid.addElementAtGridPos(n,e.boxCol,e.boxRow,null!=e.backside&&e.backside),!e.boxUpdateWholePlanning){i.next=15;break}return this.boxPlannerGrid.updateWorldPosOfElements(),i.next=15,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 15:case"end":return i.stop()}}),_callee2,this)}))),function addPlannerElement(t,e){return c.apply(this,arguments)})},{key:"extendPlanner",value:(r=(0,o.Z)(a().mark((function _callee3(t,e){return a().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return");case 1:case"end":return t.stop()}}),_callee3)}))),function extendPlanner(t,e){return r.apply(this,arguments)})},{key:"copyPlannerElement",value:(n=(0,o.Z)(a().mark((function _callee4(t,e){var n,o,i,s,l,r,h=this;return a().wrap((function _callee4$(a){for(;;)switch(a.prev=a.next){case 0:if(n=!1,e){a.next=3;break}return a.abrupt("return");case 3:"STD"==e.copyType&&(e.targetElements=[]),o=[],i=this,s="AVR","BoxPlanner_backside"==e.copyType?s="BACKSIDE":"STD"!=e.copyType&&"BoxPlanner_COL"!=e.copyType||("AVR"==e.dpType?s="AVR":"AVO"==e.dpType?s="AVO":"AVL"==e.dpType&&(s="AVL")),t.forEach((function(t,i){var l;n||(!e||"AVL"!=e.dpType&&"AVR"!=e.dpType?e&&e.copyType&&"BoxPlanner_backside"==e.copyType&&(h.boxPlannerGrid.getPlannerHasActiveBackside()||h.boxPlannerGrid.prepareGridForBackSideCopy()):h.boxPlannerGrid.prepareGridForCopy(i,e.dpType)),n=!0;var r=new R.Z(h.set.getSetId(),t,h.nextElementId,DivaBoxPlanner.plannerType);h.nextElementId++,h.set.setElementId(t,r.ElementId);var a=h.set.getPlannerData(r.ElementId);r.updatePlannerData(a),h.boxPlannerGrid.addElementAsCopy(i,r,s),h.constructionRulesHandler.onElementCopy(i,r.getElementId()),o.push(r),"STD"==e.copyType&&(null===(l=e.targetElements)||void 0===l||l.push(r.getElementId()))})),l=0;case 10:if(!(l<o.length)){a.next=17;break}return a.next=13,f.Z.loadSVG(o[l],this.set);case 13:if("AVO"==s&&this.constructionRulesHandler.getHasMaxElemCountPerColumn()&&i.boxPlannerGrid.getIndexInGridByElementId(o[l].ElementId).row+1==i.constructionRulesHandler.getMaxElemCountPerColumn())for(r=o[l].getFreeDockingPointsByType("AVO"),l=0;l<r.length;l++)r[l].disableDP(!0);case 14:l++,a.next=10;break;case 17:return this.boxPlannerGrid.updateWorldPosOfElements(),a.next=20,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,e.changedOPT,e.targetElements);case 20:case"end":return a.stop()}}),_callee4,this)}))),function copyPlannerElement(t,e){return n.apply(this,arguments)})},{key:"initIDM3DMeta",value:function initIDM3DMeta(t){P.debug("No IDM3D Planner for BoxPlanner")}},{key:"getPlannerElementsInfluencedByDeletion",value:function getPlannerElementsInfluencedByDeletion(t){return this.constructionRulesHandler.getForceWholePlanningSameHeight()?0==this.boxPlannerGrid.getIndexInGridByElementId(t).row?[t]:this.boxPlannerGrid.getAllElementsInSameRowByElementId(t).elementIds:[t]}},{key:"getPlannerElementsInfluencedByCopy",value:function getPlannerElementsInfluencedByCopy(t,e){var n=[];if(e&&"NO"==(null==e?void 0:e.dpType)&&"BoxPlanner_backside"==e.copyType)return this.boxPlannerGrid.getAllElementIdsInGrid();if(e&&"BoxPlanner_COL"==e.copyType){for(var o=this.boxPlannerGrid.getIndexInGridByElementId(t),i=this.boxPlannerGrid.getAllElementsInColumn(o.col,o.backside),s=0;s<i.length;s++)n.push(i[s].getElementId());return n}if(n.push(t),e){switch(e.dpType){case"AVL":case"AVR":if(this.constructionRulesHandler.getForceWholePlanningSameHeight()){var l=this.boxPlannerGrid.getAllElementsInSameCol(t);n=l.elements,l.backside}else{var r=this.boxPlannerGrid.getAllElementsDown(t);n=n.concat(r.elements),r.backside}break;case"AVO":if(this.constructionRulesHandler.getForceWholePlanningSameHeight()){var a=this.boxPlannerGrid.getAllElementsInSameRowByElementId(t);n=a.elementIds,a.backside}}this.boxPlannerGrid.getPlannerHasActiveBackside()&&(n=n.concat(this.boxPlannerGrid.getAllOppositeElements(n)))}return n}},{key:"deletePlannerElement",value:(e=(0,o.Z)(a().mark((function _callee5(t,e,n){var o,i,s,l,r,h,c,u;return a().wrap((function _callee5$(e){for(;;)switch(e.prev=e.next){case 0:for(o=this.boxPlannerGrid.getIndexInGridByElementId(t),i={row:o.row,col:o.col,backside:o.backside},n&&"BoxPlanner_backside"==n?i={row:0,col:0,backside:!1}:o.row>0?i.row--:(s=0==o.col?0:o.col-1,(l=this.boxPlannerGrid.getAllElementsInColumn(s,o.backside))&&l.length>0&&(i.col=s,i.row=l.length-1)),r=this.boxPlannerGrid.deleteElement(t,n),h=0;h<r.length;h++)this.constructionRulesHandler.onElemDeleted(r[h]);if(c=!0,n&&"BoxPlanner_backside"==n&&(0==this.boxPlannerGrid.getAllElementsInBacksideModuleGrid().length?(this.boxPlannerGrid.destroyBacksideModuleGrid(),c=!0):c=!1),!c){e.next=11;break}return this.boxPlannerGrid.updateWorldPosOfElements(),e.next=11,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 11:if(!this.boxPlannerGrid.getPlannerElementAtGridPos(i.col,i.row,i.backside)){e.next=13;break}return e.abrupt("return",{newElementToSelect:null===(u=this.boxPlannerGrid.getPlannerElementAtGridPos(i.col,i.row,i.backside))||void 0===u?void 0:u.getElementId()});case 13:return e.abrupt("return",{});case 14:case"end":return e.stop()}}),_callee5,this)}))),function deletePlannerElement(t,n,o){return e.apply(this,arguments)})},{key:"getAllViewPlannerElements",value:function getAllViewPlannerElements(){return this.boxPlannerGrid.getAllElementsInGrid()}},{key:"getNeighborElements",value:function getNeighborElements(t,e){var n=this.boxPlannerGrid.getElementById(t);if(!n)return[];var o=null==n?void 0:n.getDockingDockingPointsByType(e);if(!o)return[];for(var i=[],s=0;s<(null==o?void 0:o.length);s++)null!=o[s]&&i.push(o[s].OnElementId);return i}},{key:"getFreeDockingPointsByElementId",value:function getFreeDockingPointsByElementId(t,e){return{dockingPoints:[],filter:[]}}},{key:"getDockedDockingPointsByElementId",value:function getDockedDockingPointsByElementId(t,e){return[]}},{key:"getDockedGroups",value:function getDockedGroups(){return[this.boxPlannerGrid.getAllElementIdsInGrid()]}},{key:"getBoundingBox",value:function getBoundingBox(){return P.warn("BoxPlanner - get2DViewPlannerBoundingBox not implemented yet","WC_0012"),new p.Z}},{key:"updatePlannerTrans",value:function updatePlannerTrans(t,e,n,o,i,s){return P.error(new h.GE("BoxPlanner - updatePlannerTrans not implemented yet",{code:"WC_0012"})),!1}},{key:"updatePlanner",value:(t=(0,o.Z)(a().mark((function _callee6(t,e){var n,o,i,s,l,r,h,c,u;return a().wrap((function _callee6$(a){for(;;)switch(a.prev=a.next){case 0:if(P.debug("BoxPlanner - configurationHasChanged "+t),!(t&&e&&e.length>0&&t.OPTELEMENT)||"OPVECK_I"!=t.OPTELEMENT&&"OPVECK_A"!=t.OPTELEMENT){a.next=18;break}if(!(e.length>1)){a.next=9;break}return a.next=5,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,e,!0);case 5:if(!(n=a.sent)){a.next=8;break}return a.abrupt("return",{elemIdsToDelete:[],viewMessageCodex:n});case 8:case 44:case 45:return a.abrupt("return",{elemIdsToDelete:[]});case 9:if(o=this.boxPlannerGrid.getIndexInGridByElementId(e[0]),i=e[0],o.row>0&&(i=this.boxPlannerGrid.getPlannerElementAtGridPos(o.col,0,!1).getElementId()),this.boxPlannerGrid.getElementHasLeftElement(i)&&this.boxPlannerGrid.getElementHasRightElement(i)){a.next=18;break}return s="NO",this.boxPlannerGrid.getElementHasLeftElement(i)||(s="AVL"),this.boxPlannerGrid.getElementHasRightElement(i)||(s="AVR"),l=this.getPlannerElementsInfluencedByCopy(i,{dpType:s,copyType:"BoxPlanner_COL"}),a.abrupt("return",{elemIdsToDelete:[],elementIdToCopy:l,copyDPType:s,copyType:"BoxPlanner_COL",ignoreOptionsToCopy:["OPTELEMENT"],changedOPT:t,targetElements:e});case 18:if(!t||!t.OPTDMOD){a.next=32;break}a.t0=t.OPTDMOD,a.next="OPVD_EIN"===a.t0?22:"OPVD_AUS"===a.t0?26:30;break;case 22:if(this.boxPlannerGrid.getPlannerHasActiveBackside()){a.next=25;break}return r=this.getPlannerElementsInfluencedByCopy(-1,{dpType:"NO",copyType:"BoxPlanner_backside"}),a.abrupt("return",{elemIdsToDelete:[],elementIdToCopy:r,copyType:"BoxPlanner_backside",changedOPT:t});case 25:case 29:return a.abrupt("break",30);case 26:if(!this.boxPlannerGrid.getPlannerHasActiveBackside()){a.next=29;break}return h=this.boxPlannerGrid.getAllElementsInBacksideModuleGrid(),a.abrupt("return",{elemIdsToDelete:h,deletionType:"BoxPlanner_backside",changedOPT:t});case 30:a.next=45;break;case 32:if(!(t&&t.OPTFARBE_RAHMEN&&"OPVSCHWARZ_MATT"==t.OPTFARBE_RAHMEN&&this.boxPlannerGrid.getPlannerHasActiveBackside())){a.next=37;break}return c=this.boxPlannerGrid.getAllElementsInBacksideModuleGrid(),a.abrupt("return",{elemIdsToDelete:c,deletionType:"BoxPlanner_backside",changedOPT:t,targetElements:e,viewMessageCodex:"BOXPLAN_BLACKFRAME_INCOMPATIBLE_ELEMENT_WARNING"});case 37:return a.next=39,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,e);case 39:if(!(u=a.sent)){a.next=44;break}return a.abrupt("return",{elemIdsToDelete:[],viewMessageCodex:u});case 46:case"end":return a.stop()}}),_callee6,this)}))),function updatePlanner(e,n){return t.apply(this,arguments)})},{key:"getSetData",value:function getSetData(t,e,n,o){for(var i={ID:"S1",H:"",x:0,y:0,z:0,w:0,ELE:[],Blob:this.set.CatalogData.supplierILN,Cat:this.set.getCatalogCodex(),ShowDim:n},s=this.boxPlannerGrid.getAllElementsInGrid(),l=0;l<s.length;l++){var r=s[l],a=r.ElementId,c=this.set.getPlannerConfigData(a).config,u={ID:"E"+a,N:c.N,Model:c.Model,x:-r.WorldPosCenter.x,y:r.WorldPosCenter.y,z:r.WorldPosCenter.z,PosPivot:"Center",w:r.getRotDeg(),RotPivot:"Center",DP:r.getDockingPointJS3D(),MAT:c.MAT,CFG:c.CFG,H:""},m=(0,h.FB)(JSON.stringify(u));u.H=m,i.ELE.push(u)}m=(0,h.FB)(JSON.stringify(i));return i.H=m,{constructionSet:i}}},{key:"getPlannerId",value:function getPlannerId(){return this.plannerID}},{key:"getElementPosInfo",value:function getElementPosInfo(){P.error(new h.GE("BoxPlanner - getElementPosInfo not implemented yet",{code:"WC_0012"}))}},{key:"destroyPlanner",value:function destroyPlanner(){this.boxPlannerGrid.destroyBoxPlannerGrid()}},{key:"getCatalogData",value:function getCatalogData(){return this.set.CatalogData}},{key:"getPlannerBoundingBox",value:function getPlannerBoundingBox(){return this.boxPlannerGrid.getBoundingBox()}},{key:"updatePlannerBoundingBox",value:function updatePlannerBoundingBox(){}},{key:"getPlanningIsComplete",value:function getPlanningIsComplete(){return null!=this.boxPlannerGrid.getPlannerElementAtGridPos(0,0,!1)}},{key:"updateSetPosNr",value:function updateSetPosNr(t){for(var e=this.boxPlannerGrid.getAllElementIdsInGrid(),n=0;n<e.length;n++){var o=e[n],i=this.boxPlannerGrid.getElementById(o);i&&(i.SetPosNr=t+i.PosNr-1,this.set.setPosNr(i.ElementId,i.getPosNr()))}return e.length}}]);var t,e,n,r,c,u}();(0,l.Z)(T,"plannerType","BOX")}}]);