@crystaldesign/diva-web-planner-react 24.10.0-beta.9 → 24.10.0-rc.10

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 (415) hide show
  1. package/build/esm/{ArticleProperties-538e5408.js → ArticleProperties-bacc1bd4.js} +1 -1
  2. package/build/esm/{CatalogProperties-e98ae5c9.js → CatalogProperties-a922690a.js} +1 -1
  3. package/build/esm/{IconHandler-e0c67d1c.js → IconHandler-dd3a10fc.js} +1 -1
  4. package/build/esm/{OptionProperties-75daad97.js → OptionProperties-2983dbd9.js} +1 -1
  5. package/build/esm/{OptionValueProperties-bee5848d.js → OptionValueProperties-5978497f.js} +1 -1
  6. package/build/esm/{Planner2DGrid-4d193e19.js → Planner2DGrid-e652fac4.js} +1 -1
  7. package/build/esm/{Planner3DImage-97323d9b.js → Planner3DImage-c91d32b5.js} +1 -1
  8. package/build/esm/{index-b3608d4a.js → index-01347949.js} +1 -1
  9. package/build/esm/{index-1ce1a5b1.js → index-037be9dc.js} +1 -1
  10. package/build/esm/{index-e32d84a6.js → index-0508b86a.js} +94 -97
  11. package/build/esm/{index-e9ca2d7b.js → index-0512b867.js} +1 -1
  12. package/build/esm/{index-ae362a0c.js → index-057de6b6.js} +1 -1
  13. package/build/esm/{index-ff308b3a.js → index-05ed7ac6.js} +1 -1
  14. package/build/esm/{index-e5b0190a.js → index-08075258.js} +2 -2
  15. package/build/esm/{index-a00c6838.js → index-085e56ec.js} +1 -1
  16. package/build/esm/{index-f9309d78.js → index-096176b1.js} +1 -1
  17. package/build/esm/{index-f3c06912.js → index-0a03006a.js} +4 -4
  18. package/build/esm/{index-0b97bad0.js → index-0ca9d660.js} +1 -1
  19. package/build/esm/{index-29e9a508.js → index-0ce83afd.js} +1 -1
  20. package/build/esm/{index-fc153606.js → index-0d1f740f.js} +1 -1
  21. package/build/esm/{index-4e0d8790.js → index-0d5f065b.js} +15 -15
  22. package/build/esm/{index-3c29189d.js → index-0e101297.js} +3 -3
  23. package/build/esm/{index-fd97b7f7.js → index-0e96247b.js} +1 -1
  24. package/build/esm/{index-8ba1e8c6.js → index-102a962f.js} +4 -4
  25. package/build/esm/{index-e12c0360.js → index-12f2d080.js} +7 -7
  26. package/build/esm/{index-2ddf5238.js → index-142af4a9.js} +4 -4
  27. package/build/esm/{index-2cffc8f1.js → index-16a65612.js} +1 -1
  28. package/build/esm/{index-78af59b5.js → index-185b9a72.js} +3 -5
  29. package/build/esm/{index-e8a7abed.js → index-19c1bb58.js} +1 -1
  30. package/build/esm/{index-5ec90b25.js → index-1b99008e.js} +3 -3
  31. package/build/esm/{index-353eecb9.js → index-1beee556.js} +7 -7
  32. package/build/esm/{index-220d99cb.js → index-1c6fbbd8.js} +1 -1
  33. package/build/esm/{index-2c513e7c.js → index-1eef6535.js} +6 -6
  34. package/build/esm/{index-b20e169e.js → index-1f2a5880.js} +1 -1
  35. package/build/esm/{index-69e73410.js → index-1f33a563.js} +1 -1
  36. package/build/esm/{index-e756f543.js → index-20320f79.js} +1 -1
  37. package/build/esm/{index-8eb2bf9d.js → index-20c6df30.js} +4 -4
  38. package/build/esm/{index-2f3efe9d.js → index-22786a03.js} +1 -1
  39. package/build/esm/{index-9458de8e.js → index-22f5d1bd.js} +1 -1
  40. package/build/esm/{index-f752e8a0.js → index-234a793f.js} +1 -1
  41. package/build/esm/{index-5e85059a.js → index-23a8b88a.js} +37 -37
  42. package/build/esm/{index-de1b4a37.js → index-26a2a59a.js} +1 -1
  43. package/build/esm/{index-a1a16732.js → index-281aa9ea.js} +1 -1
  44. package/build/esm/{index-32ed3d4f.js → index-286db78a.js} +14 -15
  45. package/build/esm/{index-1b39597e.js → index-29351fd3.js} +8 -5
  46. package/build/esm/{index-e90924d5.js → index-2c7befd1.js} +1 -1
  47. package/build/esm/{index-ed3c1695.js → index-2d9fcb2d.js} +1 -1
  48. package/build/esm/{index-fbc6f320.js → index-31007c77.js} +5 -5
  49. package/build/esm/{index-a94d988f.js → index-34fd78be.js} +1 -1
  50. package/build/esm/{index-de82ea96.js → index-3555fd81.js} +1 -1
  51. package/build/esm/{index-7536aba2.js → index-356efcd8.js} +3 -3
  52. package/build/esm/{index-9f3cfe99.js → index-36dc25b5.js} +44 -44
  53. package/build/esm/{index-32583a2a.js → index-396947ae.js} +3 -3
  54. package/build/esm/{index-84fe256f.js → index-399c4d8f.js} +3 -3
  55. package/build/esm/{index-f4863358.js → index-3a8f22fc.js} +1 -1
  56. package/build/esm/{index-33cb7e38.js → index-3b0002d1.js} +1 -1
  57. package/build/esm/{index-d6116ce1.js → index-3b19f245.js} +6 -6
  58. package/build/esm/{index-c2447498.js → index-3b66811d.js} +45 -45
  59. package/build/esm/{index-b3d5888e.js → index-3e1e7201.js} +1 -1
  60. package/build/esm/{index-06d01afe.js → index-40316ccb.js} +1 -1
  61. package/build/esm/{index-b6220a84.js → index-409414ad.js} +1 -1
  62. package/build/esm/{index-64383149.js → index-4117ba92.js} +13 -13
  63. package/build/esm/{index-64c57a00.js → index-41927d7b.js} +6 -6
  64. package/build/esm/{index-9bd38aab.js → index-41c6c1e2.js} +1 -1
  65. package/build/esm/{index-e759b477.js → index-4224b73c.js} +1 -1
  66. package/build/esm/{index-cad87ce4.js → index-42fcf0d2.js} +1 -1
  67. package/build/esm/{index-5ca2154a.js → index-431e1db0.js} +4 -4
  68. package/build/esm/{index-0f9d0da4.js → index-4608a7f6.js} +4 -4
  69. package/build/esm/{index-7fd62018.js → index-47055650.js} +1 -1
  70. package/build/esm/{index-667a5534.js → index-47b5fd84.js} +4 -4
  71. package/build/esm/{index-f9e79e96.js → index-484fd240.js} +1 -1
  72. package/build/esm/{index-b4a862e0.js → index-488dd8bc.js} +1 -1
  73. package/build/esm/{index-49fa491b.js → index-491210c7.js} +1 -1
  74. package/build/esm/{index-0bdbf9ee.js → index-49e7789a.js} +5 -5
  75. package/build/esm/{index-769e3db1.js → index-4c0b2f39.js} +1 -1
  76. package/build/esm/{index-1241c008.js → index-4ce9c261.js} +5 -5
  77. package/build/esm/{index-ac65ce49.js → index-4d229b25.js} +1 -1
  78. package/build/esm/{index-75a7fa89.js → index-4d8b7831.js} +1 -1
  79. package/build/esm/{index-9ebbd650.js → index-4e6311fa.js} +1 -1
  80. package/build/esm/{index-04bb6f51.js → index-4ead4ec1.js} +2 -2
  81. package/build/esm/{index-17325edb.js → index-52e6c419.js} +5 -5
  82. package/build/esm/{index-59caee86.js → index-53910193.js} +4 -4
  83. package/build/esm/{index-0b8f5b10.js → index-547b4ee0.js} +6 -6
  84. package/build/esm/{index-c6b25ae7.js → index-54c317b0.js} +2 -2
  85. package/build/esm/{index-5af820ff.js → index-5565a435.js} +2 -2
  86. package/build/esm/{index-c7037cae.js → index-55cbf956.js} +1 -1
  87. package/build/esm/{index-ca4caaa9.js → index-57723863.js} +2 -2
  88. package/build/esm/{index-824cea6b.js → index-595de12d.js} +1 -1
  89. package/build/esm/{index-a0eaa471.js → index-5a662cf4.js} +2 -2
  90. package/build/esm/{index-52b386be.js → index-5aace551.js} +1 -1
  91. package/build/esm/{index-d8ae4b0a.js → index-5b76d634.js} +3 -5
  92. package/build/esm/{index-d85f3ea5.js → index-5c271553.js} +19 -19
  93. package/build/esm/{index-a7437a21.js → index-5c3bc453.js} +1 -1
  94. package/build/esm/index-5cfeff0f.js +69 -0
  95. package/build/esm/{index-07c62335.js → index-5d795265.js} +6 -6
  96. package/build/esm/{index-16a6aca0.js → index-5e15f668.js} +1 -1
  97. package/build/esm/{index-87d179dc.js → index-5e947443.js} +1 -1
  98. package/build/esm/{index-350d8b1f.js → index-60a9bb1b.js} +1 -1
  99. package/build/esm/{index-e882d2be.js → index-61a46af1.js} +1 -1
  100. package/build/esm/{index-79645c9e.js → index-62deda33.js} +1 -1
  101. package/build/esm/{index-619d4e99.js → index-6421b851.js} +13 -11
  102. package/build/esm/{index-2011f64e.js → index-65929dbb.js} +1 -1
  103. package/build/esm/{index-50a13cab.js → index-65eb4a7c.js} +1 -1
  104. package/build/esm/{index-26706918.js → index-66679574.js} +5 -5
  105. package/build/esm/{index-459d55ad.js → index-6b5b9660.js} +3 -3
  106. package/build/esm/{index-3e65a7d1.js → index-6bdc5678.js} +1 -1
  107. package/build/esm/{index-a66fbae4.js → index-6bddbb12.js} +1 -1
  108. package/build/esm/{index-e7f3f11d.js → index-6cee5947.js} +3 -3
  109. package/build/esm/{index-df938e09.js → index-6d5e37e3.js} +257 -317
  110. package/build/esm/{index-f2e6d2f6.js → index-730248de.js} +21 -21
  111. package/build/esm/{index-75b9078e.js → index-736c1b5c.js} +3 -5
  112. package/build/esm/{index-481b7db0.js → index-769d3fe2.js} +63 -67
  113. package/build/esm/{index-54b78793.js → index-76d18198.js} +1 -1
  114. package/build/esm/{index-b7634732.js → index-7c8b01c4.js} +5 -5
  115. package/build/esm/{index-5f61ba86.js → index-7ca7a002.js} +1 -1
  116. package/build/esm/{index-9cb145fa.js → index-7df39345.js} +5 -5
  117. package/build/esm/{index-8902ce99.js → index-7e9fdecc.js} +1 -1
  118. package/build/esm/{index-ae3973cc.js → index-7ee3a8d4.js} +65 -69
  119. package/build/esm/{index-2f04aeae.js → index-817b4a6b.js} +4 -4
  120. package/build/esm/{index-0a3def68.js → index-81eeb7f1.js} +2 -2
  121. package/build/esm/{index-0755d683.js → index-81fcff25.js} +3 -3
  122. package/build/esm/{index-845f357f.js → index-823139a0.js} +59 -63
  123. package/build/esm/{index-09a44a37.js → index-8258c44c.js} +4 -4
  124. package/build/esm/{index-59392ae7.js → index-831f97fb.js} +57 -63
  125. package/build/esm/{index-80accd63.js → index-848dd002.js} +96 -97
  126. package/build/esm/{index-2b9cff69.js → index-855597ae.js} +2 -2
  127. package/build/esm/{index-2b3883fc.js → index-8783bbc0.js} +2 -2
  128. package/build/esm/{index-1fa70e4d.js → index-88508a8b.js} +1 -1
  129. package/build/esm/{index-5134ead7.js → index-88c90c7f.js} +2 -2
  130. package/build/esm/{index-1ecb5a71.js → index-898e4374.js} +2 -2
  131. package/build/esm/{index-0185e06a.js → index-8b6cf805.js} +1 -1
  132. package/build/esm/{index-96fac379.js → index-8b82f852.js} +1 -1
  133. package/build/esm/{index-340ff8df.js → index-8d26ec9d.js} +15 -20
  134. package/build/esm/{index-5b6fd3a5.js → index-8d9bd0f9.js} +61 -62
  135. package/build/esm/{index-a5156cf8.js → index-8f0ab826.js} +1 -1
  136. package/build/esm/{index-b514a7b6.js → index-8f5904a0.js} +75 -80
  137. package/build/esm/{index-463b48d0.js → index-908cdf40.js} +2 -2
  138. package/build/esm/{index-a2674173.js → index-914d9b97.js} +3 -3
  139. package/build/esm/{index-abf20110.js → index-916b52e9.js} +1 -1
  140. package/build/esm/{index-21582489.js → index-91d19e47.js} +1 -1
  141. package/build/esm/{index-03ad9eca.js → index-93aaea4e.js} +2 -2
  142. package/build/esm/{index-d067dee2.js → index-953000cf.js} +1 -1
  143. package/build/esm/{index-ad5c8e67.js → index-96509aaa.js} +1 -1
  144. package/build/esm/{index-cd4c6cb2.js → index-97072294.js} +46 -46
  145. package/build/esm/{index-75a0c65b.js → index-97cc9d83.js} +1 -1
  146. package/build/esm/{index-590dbcc5.js → index-97e54a77.js} +3 -3
  147. package/build/esm/{index-8887b1b3.js → index-9893109e.js} +1 -1
  148. package/build/esm/{index-24c89cb3.js → index-99e4cfb9.js} +1 -1
  149. package/build/esm/{index-515d3b61.js → index-9b23d51d.js} +9 -9
  150. package/build/esm/{index-193f9247.js → index-9b495a1a.js} +1 -1
  151. package/build/esm/{index-7e8566e9.js → index-9b8a0beb.js} +2 -2
  152. package/build/esm/{index-ed9905de.js → index-9ca23329.js} +8 -8
  153. package/build/esm/{index-9e55648d.js → index-9cd55698.js} +2 -2
  154. package/build/esm/{index-7c946a2b.js → index-9df2d6d9.js} +1 -1
  155. package/build/esm/{index-e6ad2430.js → index-9f0e2dc5.js} +2 -2
  156. package/build/esm/{index-32eb6f3d.js → index-a1015e95.js} +1 -1
  157. package/build/esm/{index-dd56d95b.js → index-a4103c43.js} +3 -3
  158. package/build/esm/{index-4d62fa93.js → index-a44d2ed7.js} +2 -2
  159. package/build/esm/{index-a1af1ca2.js → index-a4b7c9fe.js} +1 -1
  160. package/build/esm/{index-a9e92851.js → index-a4e2ac94.js} +1 -1
  161. package/build/esm/{index-cccef96f.js → index-a609cea8.js} +1 -1
  162. package/build/esm/{index-0038b999.js → index-a70c2514.js} +1 -1
  163. package/build/esm/{index-6e08c864.js → index-a71bfad9.js} +1 -1
  164. package/build/esm/{index-de3d5a82.js → index-a82c539c.js} +13 -9
  165. package/build/esm/{index-5b24b904.js → index-a8ed80b2.js} +2 -2
  166. package/build/esm/{index-ec445682.js → index-a90307d3.js} +1 -1
  167. package/build/esm/{index-0512f867.js → index-a953c09b.js} +3 -3
  168. package/build/esm/{index-4468b5bc.js → index-a9988491.js} +36 -36
  169. package/build/esm/{index-a535a583.js → index-a9b555da.js} +2 -2
  170. package/build/esm/{index-e349efb5.js → index-ad6c7932.js} +2 -2
  171. package/build/esm/{index-1a43f355.js → index-ada8eb65.js} +9 -9
  172. package/build/esm/{index-931379fb.js → index-b1302523.js} +1 -1
  173. package/build/esm/{index-26008a76.js → index-b28c2f52.js} +1 -1
  174. package/build/esm/{index-082300ef.js → index-b53492e8.js} +4 -4
  175. package/build/esm/{index-d1163a69.js → index-b741d4fa.js} +1 -1
  176. package/build/esm/{index-74b2c421.js → index-b76ec583.js} +1 -1
  177. package/build/esm/{index-16633363.js → index-b8bcaa97.js} +1 -1
  178. package/build/esm/{index-c74868ca.js → index-ba4926ab.js} +1 -1
  179. package/build/esm/{index-629c582f.js → index-bec99a4c.js} +4 -4
  180. package/build/esm/{index-9f99a8fa.js → index-bed87284.js} +1 -1
  181. package/build/esm/{index-694eb473.js → index-bff86636.js} +1 -1
  182. package/build/esm/{index-0373e245.js → index-c04929f6.js} +1 -1
  183. package/build/esm/{index-4f09b3cf.js → index-c0e3da9e.js} +1 -1
  184. package/build/esm/{index-f72795dd.js → index-c0f96a20.js} +2 -2
  185. package/build/esm/{index-f5256e5c.js → index-c1e0712b.js} +1 -1
  186. package/build/esm/{index-89d1a6e6.js → index-c4b191c8.js} +3 -3
  187. package/build/esm/{index-40f2fa10.js → index-ca37afab.js} +2 -2
  188. package/build/esm/{index-6580c12a.js → index-cb2abc08.js} +53 -68
  189. package/build/esm/{index-a35384d1.js → index-cb34a3fc.js} +22 -22
  190. package/build/esm/{index-f5aad3b1.js → index-cb4cb280.js} +21 -21
  191. package/build/esm/{index-5e451552.js → index-cbd2fc31.js} +3 -3
  192. package/build/esm/{index-adac9c0f.js → index-cc269717.js} +1 -1
  193. package/build/esm/{index-67da9d0f.js → index-cc6f1c84.js} +2 -2
  194. package/build/esm/{index-ba5dda13.js → index-cee65603.js} +1 -1
  195. package/build/esm/{index-c6a28664.js → index-cfbf46e3.js} +47 -47
  196. package/build/esm/{index-638a1b4b.js → index-d3246b8e.js} +1 -1
  197. package/build/esm/{index-9d12a29c.js → index-d3a84d32.js} +1 -1
  198. package/build/esm/{index-4c84882c.js → index-d3ea8e48.js} +1 -1
  199. package/build/esm/{index-6e672ac1.js → index-d434b95e.js} +2 -2
  200. package/build/esm/{index-0f6a2fbd.js → index-d497084a.js} +1 -1
  201. package/build/esm/{index-d8f6cb28.js → index-d519e39f.js} +7 -7
  202. package/build/esm/{index-fd0910a6.js → index-d5fc20f1.js} +1 -1
  203. package/build/esm/{index-1f40d1ce.js → index-d6cc8e7b.js} +20 -22
  204. package/build/esm/{index-9502beb1.js → index-d7dc8c65.js} +1 -1
  205. package/build/esm/{index-6a4f7633.js → index-d820de9c.js} +2 -2
  206. package/build/esm/{index-fdb61648.js → index-d84d40ad.js} +1 -1
  207. package/build/esm/{index-f348978e.js → index-dbb65323.js} +2 -2
  208. package/build/esm/{index-ecb1dd5f.js → index-dbe64346.js} +2 -2
  209. package/build/esm/{index-f946a39f.js → index-dcd38b9a.js} +49 -49
  210. package/build/esm/{index-912163b8.js → index-e3046e89.js} +2 -2
  211. package/build/esm/{index-20d749e6.js → index-e524f8fc.js} +17 -17
  212. package/build/esm/{index-fbeee3da.js → index-e622f419.js} +1 -1
  213. package/build/esm/{index-b11c6029.js → index-e6d3f526.js} +1 -1
  214. package/build/esm/{index-8b36039c.js → index-e70fc7c2.js} +5 -5
  215. package/build/esm/{index-fab630a6.js → index-e99ebd28.js} +2 -2
  216. package/build/esm/{index-69bbf527.js → index-e9f0e838.js} +1 -1
  217. package/build/esm/{index-77d0f5cc.js → index-ea136bcf.js} +2 -2
  218. package/build/esm/{index-04be4a6d.js → index-eaf69738.js} +17 -18
  219. package/build/esm/{index-d8ba571f.js → index-ebb4ab54.js} +1 -1
  220. package/build/esm/{index-f2ec26d1.js → index-ec6b1467.js} +1 -1
  221. package/build/esm/{index-cb0d64bf.js → index-ed948c0e.js} +1 -1
  222. package/build/esm/{index-dfc6ce9a.js → index-ee146e07.js} +1 -1
  223. package/build/esm/{index-3c193068.js → index-f3b97d31.js} +23 -23
  224. package/build/esm/{index-feda9828.js → index-f67edbf7.js} +1 -1
  225. package/build/esm/{index-6995a909.js → index-f8421bc7.js} +76 -81
  226. package/build/esm/{index-088775e0.js → index-f85901c5.js} +5 -5
  227. package/build/esm/{index-4fa1f185.js → index-f8bd073f.js} +2 -2
  228. package/build/esm/{index-808b5c9c.js → index-f9ca1c92.js} +2 -2
  229. package/build/esm/{index-639e29a6.js → index-fcd8f744.js} +19 -23
  230. package/build/esm/{index-6aa51ce0.js → index-fe47adb9.js} +63 -67
  231. package/build/esm/{index-5e9093a2.js → index-fe6f0413.js} +3 -3
  232. package/build/esm/index.js +1 -1
  233. package/build/esm/{index.module-3c47d5ce.js → index.module-02375452.js} +1 -1
  234. package/build/esm/{index.module-4758e564.js → index.module-074a3577.js} +1 -1
  235. package/build/esm/{index.module-2e57dd5c.js → index.module-161259fd.js} +1 -1
  236. package/build/esm/{index.module-fe43cac5.js → index.module-3f850010.js} +1 -1
  237. package/build/esm/{index.module-73422bd1.js → index.module-44029914.js} +1 -1
  238. package/build/esm/{index.module-c0301db6.js → index.module-48bfe1a5.js} +2 -2
  239. package/build/esm/{index.module-8c6267ac.js → index.module-71c25ecf.js} +1 -1
  240. package/build/esm/{index.module-e6ba6bca.js → index.module-9e2f5b2c.js} +1 -1
  241. package/build/esm/{index.module-ea480458.js → index.module-a244293c.js} +1 -1
  242. package/build/esm/{index.module-102db393.js → index.module-a337d9b5.js} +1 -1
  243. package/build/esm/{index.module-f9bd5140.js → index.module-c2d1da09.js} +1 -1
  244. package/build/esm/{index.module-65489831.js → index.module-d4ef0a0c.js} +1 -1
  245. package/build/esm/{index.module-b49a0be9.js → index.module-ea6ea802.js} +1 -1
  246. package/build/esm/{index.module-aec750dc.js → index.module-fb597c7a.js} +1 -1
  247. package/build/esm/{requestProductForm-a469d0a2.js → requestProductForm-5c04ddd6.js} +1 -1
  248. package/build/types/web-planner-react/src/components/Action/Basket/ralph/index.d.ts.map +1 -1
  249. package/build/types/web-planner-react/src/components/Product/ProductCenter/Planner3DImage/NavBar/standard/ArQrCodeIcon/index.d.ts +3 -1
  250. package/build/types/web-planner-react/src/components/Product/ProductCenter/Planner3DImage/NavBar/standard/ArQrCodeIcon/index.d.ts.map +1 -1
  251. package/build/types/web-planner-react/src/components/Product/ProductCenter/Planner3DImage/NavBar/standard/index.d.ts.map +1 -1
  252. package/build/types/web-planner-react/src/components/Product/ProductCenter/index.d.ts.map +1 -1
  253. package/build/types/web-planner-react/src/components/Product/ProductHeader/Functions/ralph/index.d.ts.map +1 -1
  254. package/build/types/web-planner-react/src/components/Product/ProductHeader/ProductHeader/standard/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/ProductList/index.d.ts.map +1 -1
  257. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/index.d.ts +1 -6
  258. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/index.d.ts.map +1 -1
  259. package/build/types/web-planner-react/src/components/Settings/index.d.ts.map +1 -1
  260. package/build/types/web-planner-react/src/model/DivaViewHandler.d.ts.map +1 -1
  261. package/build/types/web-planner-react/src/model/Palette/PaletteViewHandler.d.ts.map +1 -1
  262. package/build/types/web-planner-react/src/model/Planner/ViewPlannerHandler.d.ts +0 -11
  263. package/build/types/web-planner-react/src/model/Planner/ViewPlannerHandler.d.ts.map +1 -1
  264. package/build/types/web-planner-react/src/model/States/UIState/Product/index.d.ts +1 -5
  265. package/build/types/web-planner-react/src/model/States/UIState/Product/index.d.ts.map +1 -1
  266. package/build/types/web-planner-react/src/model/States/UIState/index.d.ts +1 -2
  267. package/build/types/web-planner-react/src/model/States/UIState/index.d.ts.map +1 -1
  268. package/build/umd/109.diva-web-planner-react.umd.min.js +1 -1
  269. package/build/umd/109.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -6
  270. package/build/umd/1095.diva-web-planner-react.umd.min.js +1 -1
  271. package/build/umd/1120.diva-web-planner-react.umd.min.js +1 -1
  272. package/build/umd/1197.diva-web-planner-react.umd.min.js +2 -0
  273. package/build/umd/1197.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
  274. package/build/umd/1500.diva-web-planner-react.umd.min.js +1 -1
  275. package/build/umd/1819.diva-web-planner-react.umd.min.js +1 -1
  276. package/build/umd/2081.diva-web-planner-react.umd.min.js +1 -1
  277. package/build/umd/220.diva-web-planner-react.umd.min.js +1 -1
  278. package/build/umd/2256.diva-web-planner-react.umd.min.js +1 -1
  279. package/build/umd/2309.diva-web-planner-react.umd.min.js +2 -0
  280. package/build/umd/{1928.diva-web-planner-react.umd.min.js.LICENSE.txt → 2309.diva-web-planner-react.umd.min.js.LICENSE.txt} +1 -1
  281. package/build/umd/2476.diva-web-planner-react.umd.min.js +1 -1
  282. package/build/umd/2636.diva-web-planner-react.umd.min.js +1 -1
  283. package/build/umd/3338.diva-web-planner-react.umd.min.js +1 -1
  284. package/build/umd/3452.diva-web-planner-react.umd.min.js +1 -1
  285. package/build/umd/3528.diva-web-planner-react.umd.min.js +1 -1
  286. package/build/umd/3802.diva-web-planner-react.umd.min.js +1 -1
  287. package/build/umd/4133.diva-web-planner-react.umd.min.js +1 -1
  288. package/build/umd/4133.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -6
  289. package/build/umd/4209.diva-web-planner-react.umd.min.js +1 -1
  290. package/build/umd/4215.diva-web-planner-react.umd.min.js +1 -1
  291. package/build/umd/4444.diva-web-planner-react.umd.min.js +1 -1
  292. package/build/umd/5431.diva-web-planner-react.umd.min.js +2 -0
  293. package/build/umd/{2136.diva-web-planner-react.umd.min.js.LICENSE.txt → 5431.diva-web-planner-react.umd.min.js.LICENSE.txt} +1 -1
  294. package/build/umd/5860.diva-web-planner-react.umd.min.js +2 -0
  295. package/build/umd/{5777.diva-web-planner-react.umd.min.js.LICENSE.txt → 5860.diva-web-planner-react.umd.min.js.LICENSE.txt} +1 -1
  296. package/build/umd/5901.diva-web-planner-react.umd.min.js +1 -1
  297. package/build/umd/5940.diva-web-planner-react.umd.min.js +1 -1
  298. package/build/umd/5940.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -6
  299. package/build/umd/597.diva-web-planner-react.umd.min.js +1 -1
  300. package/build/umd/5982.diva-web-planner-react.umd.min.js +1 -1
  301. package/build/umd/6230.diva-web-planner-react.umd.min.js +1 -1
  302. package/build/umd/6265.diva-web-planner-react.umd.min.js +1 -1
  303. package/build/umd/6342.diva-web-planner-react.umd.min.js +1 -1
  304. package/build/umd/644.diva-web-planner-react.umd.min.js +1 -1
  305. package/build/umd/6666.diva-web-planner-react.umd.min.js +1 -1
  306. package/build/umd/6758.diva-web-planner-react.umd.min.js +2 -0
  307. package/build/umd/{59.diva-web-planner-react.umd.min.js.LICENSE.txt → 6758.diva-web-planner-react.umd.min.js.LICENSE.txt} +1 -1
  308. package/build/umd/6973.diva-web-planner-react.umd.min.js +1 -1
  309. package/build/umd/7035.diva-web-planner-react.umd.min.js +1 -1
  310. package/build/umd/7422.diva-web-planner-react.umd.min.js +1 -1
  311. package/build/umd/7470.diva-web-planner-react.umd.min.js +1 -1
  312. package/build/umd/7566.diva-web-planner-react.umd.min.js +1 -1
  313. package/build/umd/7706.diva-web-planner-react.umd.min.js +2 -0
  314. package/build/umd/7706.diva-web-planner-react.umd.min.js.LICENSE.txt +7 -0
  315. package/build/umd/7854.diva-web-planner-react.umd.min.js +1 -1
  316. package/build/umd/7999.diva-web-planner-react.umd.min.js +2 -0
  317. package/build/umd/7999.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
  318. package/build/umd/8035.diva-web-planner-react.umd.min.js +1 -1
  319. package/build/umd/8307.diva-web-planner-react.umd.min.js +1 -1
  320. package/build/umd/8932.diva-web-planner-react.umd.min.js +1 -1
  321. package/build/umd/8990.diva-web-planner-react.umd.min.js +1 -1
  322. package/build/umd/9062.diva-web-planner-react.umd.min.js +1 -1
  323. package/build/umd/9146.diva-web-planner-react.umd.min.js +1 -1
  324. package/build/umd/9334.diva-web-planner-react.umd.min.js +1 -1
  325. package/build/umd/968.diva-web-planner-react.umd.min.js +1 -1
  326. package/build/umd/diva-web-planner-react.umd.min.js +1 -1
  327. package/build/umd/report.html +1 -1
  328. package/package.json +6 -6
  329. package/build/esm/PlannerSirvViewer-a82ea314.js +0 -70
  330. package/build/esm/index-2242df19.js +0 -61
  331. package/build/esm/index-51798d46.js +0 -38
  332. package/build/esm/index-57295246.js +0 -60
  333. package/build/esm/index-7a62967e.js +0 -32
  334. package/build/esm/index-80b9a1e6.js +0 -173
  335. package/build/esm/index-9a91f946.js +0 -63
  336. package/build/esm/index-9fc2fd14.js +0 -72
  337. package/build/esm/index-a8e4a404.js +0 -134
  338. package/build/esm/index-a8ebc61d.js +0 -166
  339. package/build/esm/index-b7a72c16.js +0 -153
  340. package/build/esm/index-dde9edaf.js +0 -67
  341. package/build/esm/index-dfa0c3ac.js +0 -146
  342. package/build/esm/index-e3902551.js +0 -50
  343. package/build/esm/index-e6ac791a.js +0 -29
  344. package/build/types/web-planner-react/src/components/Layout/lessSimple/index.d.ts +0 -7
  345. package/build/types/web-planner-react/src/components/Layout/lessSimple/index.d.ts.map +0 -1
  346. package/build/types/web-planner-react/src/components/Layout/simple/index.d.ts +0 -7
  347. package/build/types/web-planner-react/src/components/Layout/simple/index.d.ts.map +0 -1
  348. package/build/types/web-planner-react/src/components/Product/Product/simple/index.d.ts +0 -8
  349. package/build/types/web-planner-react/src/components/Product/Product/simple/index.d.ts.map +0 -1
  350. package/build/types/web-planner-react/src/components/Product/ProductCenter/PlannerMsgContainer/simple/index.d.ts +0 -4
  351. package/build/types/web-planner-react/src/components/Product/ProductCenter/PlannerMsgContainer/simple/index.d.ts.map +0 -1
  352. package/build/types/web-planner-react/src/components/Product/ProductCenter/PlannerSirvViewer/index.d.ts +0 -7
  353. package/build/types/web-planner-react/src/components/Product/ProductCenter/PlannerSirvViewer/index.d.ts.map +0 -1
  354. package/build/types/web-planner-react/src/components/Product/ProductHeader/CreateCache/index.d.ts +0 -7
  355. package/build/types/web-planner-react/src/components/Product/ProductHeader/CreateCache/index.d.ts.map +0 -1
  356. package/build/types/web-planner-react/src/components/Settings/SettingsHeaderContainer/SettingsItemHeader/Header/lessSimple/index.d.ts +0 -4
  357. package/build/types/web-planner-react/src/components/Settings/SettingsHeaderContainer/SettingsItemHeader/Header/lessSimple/index.d.ts.map +0 -1
  358. package/build/types/web-planner-react/src/components/Settings/SettingsHeaderContainer/SettingsItemHeader/Header/standard/FavoritesButton/index.d.ts +0 -7
  359. package/build/types/web-planner-react/src/components/Settings/SettingsHeaderContainer/SettingsItemHeader/Header/standard/FavoritesButton/index.d.ts.map +0 -1
  360. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/Options/IsActive/lessSimple/index.d.ts +0 -3
  361. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/Options/IsActive/lessSimple/index.d.ts.map +0 -1
  362. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsSubTabGroup/SubTabGroup/index.d.ts +0 -14
  363. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsSubTabGroup/SubTabGroup/index.d.ts.map +0 -1
  364. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsSubTabGroup/SubTabGroupHeader/index.d.ts +0 -10
  365. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsSubTabGroup/SubTabGroupHeader/index.d.ts.map +0 -1
  366. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsSubTabGroup/index.d.ts +0 -7
  367. package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsSubTabGroup/index.d.ts.map +0 -1
  368. package/build/types/web-planner-react/src/components/TabGroup/TabGroupHorizontal/item/lessSimple/index.d.ts +0 -6
  369. package/build/types/web-planner-react/src/components/TabGroup/TabGroupHorizontal/item/lessSimple/index.d.ts.map +0 -1
  370. package/build/types/web-planner-react/src/model/Planner/Viewer/Interface/IViewPlannerSirv.d.ts +0 -10
  371. package/build/types/web-planner-react/src/model/Planner/Viewer/Interface/IViewPlannerSirv.d.ts.map +0 -1
  372. package/build/types/web-planner-react/src/model/Planner/Viewer/PlannerSirvViewer.d.ts +0 -22
  373. package/build/types/web-planner-react/src/model/Planner/Viewer/PlannerSirvViewer.d.ts.map +0 -1
  374. package/build/umd/1125.diva-web-planner-react.umd.min.js +0 -2
  375. package/build/umd/1125.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  376. package/build/umd/1129.diva-web-planner-react.umd.min.js +0 -2
  377. package/build/umd/1129.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  378. package/build/umd/1701.diva-web-planner-react.umd.min.js +0 -2
  379. package/build/umd/1701.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  380. package/build/umd/1928.diva-web-planner-react.umd.min.js +0 -2
  381. package/build/umd/2136.diva-web-planner-react.umd.min.js +0 -2
  382. package/build/umd/2270.diva-web-planner-react.umd.min.js +0 -2
  383. package/build/umd/2270.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  384. package/build/umd/3834.diva-web-planner-react.umd.min.js +0 -2
  385. package/build/umd/3834.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  386. package/build/umd/5562.diva-web-planner-react.umd.min.js +0 -2
  387. package/build/umd/5562.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  388. package/build/umd/5777.diva-web-planner-react.umd.min.js +0 -2
  389. package/build/umd/59.diva-web-planner-react.umd.min.js +0 -2
  390. package/build/umd/6108.diva-web-planner-react.umd.min.js +0 -2
  391. package/build/umd/6108.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  392. package/build/umd/625.diva-web-planner-react.umd.min.js +0 -2
  393. package/build/umd/625.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  394. package/build/umd/6257.diva-web-planner-react.umd.min.js +0 -2
  395. package/build/umd/6257.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
  396. package/build/umd/6686.diva-web-planner-react.umd.min.js +0 -2
  397. package/build/umd/6686.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
  398. package/build/umd/714.diva-web-planner-react.umd.min.js +0 -2
  399. package/build/umd/714.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  400. package/build/umd/7195.diva-web-planner-react.umd.min.js +0 -2
  401. package/build/umd/7195.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  402. package/build/umd/7301.diva-web-planner-react.umd.min.js +0 -2
  403. package/build/umd/7301.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  404. package/build/umd/7360.diva-web-planner-react.umd.min.js +0 -2
  405. package/build/umd/7360.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -7
  406. package/build/umd/7576.diva-web-planner-react.umd.min.js +0 -2
  407. package/build/umd/7576.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  408. package/build/umd/8279.diva-web-planner-react.umd.min.js +0 -2
  409. package/build/umd/8279.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  410. package/build/umd/8381.diva-web-planner-react.umd.min.js +0 -2
  411. package/build/umd/8381.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  412. package/build/umd/9174.diva-web-planner-react.umd.min.js +0 -2
  413. package/build/umd/9174.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
  414. package/build/umd/9311.diva-web-planner-react.umd.min.js +0 -2
  415. package/build/umd/9311.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 644.diva-web-planner-react.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[644],{50644:(t,e,n)=>{n.r(e),n.d(e,{default:()=>T});var o=n(66557),i=n(91639),s=n(58339),l=n(88893),r=n(10725),a=n.n(r),h=n(23651),c=n(6888),u=h.Ay.initLog("Planner","WEB-PLANNER-LOGIC"),m=function(){return(0,s.A)((function BoxPlannerPartlistHelper(t,e,n,o,s,r,a){(0,i.A)(this,BoxPlannerPartlistHelper),(0,l.A)(this,"constructionRules",void 0),(0,l.A)(this,"getOptionVal",void 0),(0,l.A)(this,"setOptionValue",void 0),(0,l.A)(this,"getElementHasBottomPlate",void 0),(0,l.A)(this,"getElementIsCornerElement",void 0),(0,l.A)(this,"getCornerType",void 0),(0,l.A)(this,"getElementHasTopPlate",void 0),(0,l.A)(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.Ay.initLog("Planner","WEB-PLANNER-LOGIC"),g=function(){return(0,s.A)((function ConstructionRulesHandler(t,e,n){var o=this;(0,i.A)(this,ConstructionRulesHandler),(0,l.A)(this,"getValueOfOptionOfArticle",void 0),(0,l.A)(this,"checkArticleHasOption",void 0),(0,l.A)(this,"updateCfgValuesByPlanner",void 0),(0,l.A)(this,"constructionRules",void 0),(0,l.A)(this,"constructionRulesLoaded",void 0),(0,l.A)(this,"hideOptionsForConstruction",void 0),(0,l.A)(this,"partlistHelper",void 0),(0,l.A)(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.A)(this,"hasOptionValue",(function(t,e,n){return!(!n.has(t)||!n.get(t).has(e))||!!o.getValueOfOptionOfArticle(t,e)})),(0,l.A)(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.A)(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.A)(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.A)(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.A)(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.A)(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 A=0;A<H.length;A++)if(H[A].defaultOptions)for(var C=0;C<H[A].defaultOptions.length;C++){var D=H[A].defaultOptions[C];if(!D.rule||""==D.rule||this.evalRule(h[c],D.rule,e))for(var L=0;L<D.options.length;L++)"doShow"==D.value?this.setOptionDoShow(h[c],D.options[L],e):"doHide"==D.value&&this.setOptionDoHide(h[c],D.options[L],e),D.opv&&this.setOptionValue(h[c],D.options[L],D.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.A)(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.p$("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.A)(n))}}},{key:"getHasMaxElemCountPerColumn",value:function getHasMaxElemCountPerColumn(){return null!=this.constructionRules.maxElemCountPerCol}},{key:"getMaxElemCountPerColumn",value:function getMaxElemCountPerColumn(){return this.constructionRules.maxElemCountPerCol}}]);var t}(),E=n(26664),I=n(85112),O=h.Ay.initLog("Planner","WEB-PLANNER-LOGIC"),k=function(){return(0,s.A)((function BoxPlannerGrid(t){(0,i.A)(this,BoxPlannerGrid),(0,l.A)(this,"plannedElementGrid",void 0),(0,l.A)(this,"backModulPlannedElementGrid",void 0),(0,l.A)(this,"hasActiveBackside",void 0),(0,l.A)(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.Pq(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.A.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.A.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.A.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.A.tryDockElement(s,"AVO",[this.plannedElementGrid[t][e+1]]),s.PosNr=i,i++}this.plannedElementGrid[t+1]&&this.plannedElementGrid[t+1][0]&&I.A.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.A.tryDockElementToDP(l,this.plannedElementGrid[t][e],r):O.error(new h.p$("Error Loading DockingPoint AVO_2 for plannerElement")),this.backModulPlannedElementGrid[t]&&this.backModulPlannedElementGrid[t][e+1]&&l&&this.backModulPlannedElementGrid[t][e+1]&&I.A.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.A.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(80389),R=n(31736),p=n(38935),P=h.Ay.initLog("Planner","WEB-PLANNER-LOGIC"),T=function(){function DivaBoxPlanner(t,e){(0,i.A)(this,DivaBoxPlanner),(0,l.A)(this,"set",void 0),(0,l.A)(this,"plannerID",void 0),(0,l.A)(this,"constructionRulesHandler",void 0),(0,l.A)(this,"boxPlannerGrid",void 0),(0,l.A)(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.A)(DivaBoxPlanner,[{key:"initPlanner",value:(u=(0,o.A)(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.Ay.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.A(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.A.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.A)(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.A(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.A.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.A)(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.A)(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.A(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.A.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.A)(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.A}},{key:"updatePlannerTrans",value:function updatePlannerTrans(t,e,n,o,i,s){return P.error(new h.p$("BoxPlanner - updatePlannerTrans not implemented yet",{code:"WC_0012"})),!1}},{key:"updatePlanner",value:(t=(0,o.A)(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,i){for(var s={ID:"S1",H:"",x:0,y:0,z:0,w:0,ELE:[],Blob:this.set.CatalogData.supplierILN,Cat:this.set.getCatalogCodex(),ShowDim:n},l=this.boxPlannerGrid.getAllElementsInGrid(),r=0;r<l.length;r++){var a=l[r],c=a.ElementId,u=this.set.getPlannerConfigData(c,!1).config,m={ID:"E"+c,N:u.N,Model:u.Model,x:-a.WorldPosCenter.x,y:a.WorldPosCenter.y,z:a.WorldPosCenter.z,PosPivot:"Center",w:a.getRotDeg(),RotPivot:"Center",DP:a.getDockingPointJS3D(),MAT:u.MAT,CFG:u.CFG,H:""},d=(0,h.Fx)(JSON.stringify(m));m.H=d,s.ELE.push(m)}d=(0,h.Fx)(JSON.stringify(s));return s.H=d,{constructionSet:s,containsNotDigitalizedTextures:!1}}},{key:"getPlannerId",value:function getPlannerId(){return this.plannerID}},{key:"getElementPosInfo",value:function getElementPosInfo(){P.error(new h.p$("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(),void 0))}return e.length}}]);var t,e,n,r,c,u}();(0,l.A)(T,"plannerType","BOX")}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[644],{50644:(t,e,n)=>{n.r(e),n.d(e,{default:()=>T});var o=n(66557),i=n(91639),s=n(58339),l=n(88893),r=n(10725),a=n.n(r),h=n(23651),c=n(6888),u=h.Ay.initLog("Planner","WEB-PLANNER-LOGIC"),m=function(){return(0,s.A)((function BoxPlannerPartlistHelper(t,e,n,o,s,r,a){(0,i.A)(this,BoxPlannerPartlistHelper),(0,l.A)(this,"constructionRules",void 0),(0,l.A)(this,"getOptionVal",void 0),(0,l.A)(this,"setOptionValue",void 0),(0,l.A)(this,"getElementHasBottomPlate",void 0),(0,l.A)(this,"getElementIsCornerElement",void 0),(0,l.A)(this,"getCornerType",void 0),(0,l.A)(this,"getElementHasTopPlate",void 0),(0,l.A)(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.Ay.initLog("Planner","WEB-PLANNER-LOGIC"),g=function(){return(0,s.A)((function ConstructionRulesHandler(t,e,n){var o=this;(0,i.A)(this,ConstructionRulesHandler),(0,l.A)(this,"getValueOfOptionOfArticle",void 0),(0,l.A)(this,"checkArticleHasOption",void 0),(0,l.A)(this,"updateCfgValuesByPlanner",void 0),(0,l.A)(this,"constructionRules",void 0),(0,l.A)(this,"constructionRulesLoaded",void 0),(0,l.A)(this,"hideOptionsForConstruction",void 0),(0,l.A)(this,"partlistHelper",void 0),(0,l.A)(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.A)(this,"hasOptionValue",(function(t,e,n){return!(!n.has(t)||!n.get(t).has(e))||!!o.getValueOfOptionOfArticle(t,e)})),(0,l.A)(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.A)(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.A)(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.A)(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.A)(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.A)(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 A=0;A<H.length;A++)if(H[A].defaultOptions)for(var C=0;C<H[A].defaultOptions.length;C++){var D=H[A].defaultOptions[C];if(!D.rule||""==D.rule||this.evalRule(h[c],D.rule,e))for(var L=0;L<D.options.length;L++)"doShow"==D.value?this.setOptionDoShow(h[c],D.options[L],e):"doHide"==D.value&&this.setOptionDoHide(h[c],D.options[L],e),D.opv&&this.setOptionValue(h[c],D.options[L],D.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.A)(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.p$("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.A)(n))}}},{key:"getHasMaxElemCountPerColumn",value:function getHasMaxElemCountPerColumn(){return null!=this.constructionRules.maxElemCountPerCol}},{key:"getMaxElemCountPerColumn",value:function getMaxElemCountPerColumn(){return this.constructionRules.maxElemCountPerCol}}]);var t}(),E=n(26664),I=n(85112),O=h.Ay.initLog("Planner","WEB-PLANNER-LOGIC"),k=function(){return(0,s.A)((function BoxPlannerGrid(t){(0,i.A)(this,BoxPlannerGrid),(0,l.A)(this,"plannedElementGrid",void 0),(0,l.A)(this,"backModulPlannedElementGrid",void 0),(0,l.A)(this,"hasActiveBackside",void 0),(0,l.A)(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.Pq(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.A.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.A.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.A.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.A.tryDockElement(s,"AVO",[this.plannedElementGrid[t][e+1]]),s.PosNr=i,i++}this.plannedElementGrid[t+1]&&this.plannedElementGrid[t+1][0]&&I.A.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.A.tryDockElementToDP(l,this.plannedElementGrid[t][e],r):O.error(new h.p$("Error Loading DockingPoint AVO_2 for plannerElement")),this.backModulPlannedElementGrid[t]&&this.backModulPlannedElementGrid[t][e+1]&&l&&this.backModulPlannedElementGrid[t][e+1]&&I.A.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.A.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(80389),R=n(31736),p=n(38935),P=h.Ay.initLog("Planner","WEB-PLANNER-LOGIC"),T=function(){function DivaBoxPlanner(t,e){(0,i.A)(this,DivaBoxPlanner),(0,l.A)(this,"set",void 0),(0,l.A)(this,"plannerID",void 0),(0,l.A)(this,"constructionRulesHandler",void 0),(0,l.A)(this,"boxPlannerGrid",void 0),(0,l.A)(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.A)(DivaBoxPlanner,[{key:"initPlanner",value:(u=(0,o.A)(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.Ay.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.A(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.A.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.A)(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.A(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.A.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.A)(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.A)(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.A(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.A.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.A)(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.A}},{key:"updatePlannerTrans",value:function updatePlannerTrans(t,e,n,o,i,s){return P.error(new h.p$("BoxPlanner - updatePlannerTrans not implemented yet",{code:"WC_0012"})),!1}},{key:"updatePlanner",value:(t=(0,o.A)(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.Fx)(JSON.stringify(u));u.H=m,i.ELE.push(u)}m=(0,h.Fx)(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.p$("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(),void 0))}return e.length}}]);var t,e,n,r,c,u}();(0,l.A)(T,"plannerType","BOX")}}]);