kitchen-simulator 2.0.0 → 2.0.1

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 (1165) hide show
  1. package/README.md +24 -1
  2. package/es/@history.js +2 -0
  3. package/es/AppContext.js +3 -0
  4. package/es/LiteKitchenConfigurator.js +480 -0
  5. package/es/LiteRenderer.js +503 -0
  6. package/es/actions/area-actions.js +14 -0
  7. package/es/actions/export.js +36 -0
  8. package/es/actions/groups-actions.js +89 -0
  9. package/es/actions/holes-actions.js +119 -0
  10. package/es/actions/items-actions.js +318 -0
  11. package/es/actions/lines-actions.js +81 -0
  12. package/es/actions/project-actions.js +286 -0
  13. package/es/actions/scene-actions.js +33 -0
  14. package/es/actions/vertices-actions.js +27 -0
  15. package/es/actions/viewer2d-actions.js +58 -0
  16. package/es/actions/viewer3d-actions.js +23 -0
  17. package/es/analytics/ga4.js +188 -0
  18. package/es/analytics/posthog.js +60 -0
  19. package/es/assets/Window.hdr +2100 -0
  20. package/es/assets/brown_photostudio_02_1k.hdr +0 -0
  21. package/es/assets/fonts/Rene Bieder Milliard Black Italic.woff +0 -0
  22. package/es/assets/fonts/Rene Bieder Milliard Black.woff +0 -0
  23. package/es/assets/fonts/Rene Bieder Milliard Bold Italic.woff +0 -0
  24. package/es/assets/fonts/Rene Bieder Milliard Bold.woff +0 -0
  25. package/es/assets/fonts/Rene Bieder Milliard Book Italic.woff +0 -0
  26. package/es/assets/fonts/Rene Bieder Milliard Book.woff +0 -0
  27. package/es/assets/fonts/Rene Bieder Milliard ExtraBold Italic.woff +0 -0
  28. package/es/assets/fonts/Rene Bieder Milliard ExtraBold.woff +0 -0
  29. package/es/assets/fonts/Rene Bieder Milliard ExtraLight Italic.woff +0 -0
  30. package/es/assets/fonts/Rene Bieder Milliard ExtraLight.woff +0 -0
  31. package/es/assets/fonts/Rene Bieder Milliard Hairline Italic.woff +0 -0
  32. package/es/assets/fonts/Rene Bieder Milliard Hairline.woff +0 -0
  33. package/es/assets/fonts/Rene Bieder Milliard Heavy Italic.woff +0 -0
  34. package/es/assets/fonts/Rene Bieder Milliard Heavy.woff +0 -0
  35. package/es/assets/fonts/Rene Bieder Milliard Light Italic.woff +0 -0
  36. package/es/assets/fonts/Rene Bieder Milliard Light.woff +0 -0
  37. package/es/assets/fonts/Rene Bieder Milliard Medium Italic.woff +0 -0
  38. package/es/assets/fonts/Rene Bieder Milliard Medium.woff +0 -0
  39. package/es/assets/fonts/Rene Bieder Milliard SemiBold Italic.woff +0 -0
  40. package/es/assets/fonts/Rene Bieder Milliard SemiBold.woff +0 -0
  41. package/es/assets/fonts/Rene Bieder Milliard Thin Italic.woff +0 -0
  42. package/es/assets/fonts/Rene Bieder Milliard Thin.woff +0 -0
  43. package/es/assets/fonts/style.css +177 -0
  44. package/es/assets/gltf/door_closet.bin +0 -0
  45. package/es/assets/gltf/door_closet.fbx +0 -0
  46. package/es/assets/gltf/door_closet.gltf +1 -0
  47. package/es/assets/gltf/door_exterior.bin +0 -0
  48. package/es/assets/gltf/door_exterior.fbx +0 -0
  49. package/es/assets/gltf/door_exterior.gltf +1 -0
  50. package/es/assets/gltf/door_interior.bin +0 -0
  51. package/es/assets/gltf/door_interior.fbx +0 -0
  52. package/es/assets/gltf/door_interior.gltf +1 -0
  53. package/es/assets/gltf/door_sliding.bin +0 -0
  54. package/es/assets/gltf/door_sliding.fbx +0 -0
  55. package/es/assets/gltf/door_sliding.gltf +1 -0
  56. package/es/assets/gltf/doorway_framed.bin +0 -0
  57. package/es/assets/gltf/doorway_framed.fbx +0 -0
  58. package/es/assets/gltf/doorway_framed.gltf +1 -0
  59. package/es/assets/gltf/window_clear.bin +0 -0
  60. package/es/assets/gltf/window_clear.fbx +0 -0
  61. package/es/assets/gltf/window_clear.gltf +1 -0
  62. package/es/assets/gltf/window_cross.bin +0 -0
  63. package/es/assets/gltf/window_cross.fbx +0 -0
  64. package/es/assets/gltf/window_cross.gltf +1 -0
  65. package/es/assets/gltf/window_double_hung.bin +0 -0
  66. package/es/assets/gltf/window_double_hung.fbx +0 -0
  67. package/es/assets/gltf/window_double_hung.gltf +1 -0
  68. package/es/assets/gltf/window_vertical.bin +0 -0
  69. package/es/assets/gltf/window_vertical.fbx +0 -0
  70. package/es/assets/gltf/window_vertical.gltf +1 -0
  71. package/es/assets/img/1.jpg +0 -0
  72. package/es/assets/img/TKC_thumbnail.png +0 -0
  73. package/es/assets/img/Toggle.png +0 -0
  74. package/es/assets/img/loading/loading.gif +0 -0
  75. package/es/assets/img/loading/loading_1.svg +11 -0
  76. package/es/assets/img/loading_large.gif +0 -0
  77. package/es/assets/img/png/door/closet.png +0 -0
  78. package/es/assets/img/png/door/doorwaysframed.png +0 -0
  79. package/es/assets/img/png/door/doorwaysframeles.png +0 -0
  80. package/es/assets/img/png/door/doorwaysframeless.png +0 -0
  81. package/es/assets/img/png/door/exterior.png +0 -0
  82. package/es/assets/img/png/door/interior.png +0 -0
  83. package/es/assets/img/png/door/sliding.png +0 -0
  84. package/es/assets/img/png/helper/outcome.png +0 -0
  85. package/es/assets/img/png/helper/video_preview_3d.png +0 -0
  86. package/es/assets/img/png/helper/video_preview_start.png +0 -0
  87. package/es/assets/img/project_img.png +0 -0
  88. package/es/assets/img/rta/rta_logo_box_blue.jpg +0 -0
  89. package/es/assets/img/rta/rta_logo_box_blue_ico.jpg +0 -0
  90. package/es/assets/img/rta/rta_logo_box_blue_ico.svg +55 -0
  91. package/es/assets/img/rta/rta_logo_box_darkGray.jpg +0 -0
  92. package/es/assets/img/rta/rta_logo_box_lightblue.png +0 -0
  93. package/es/assets/img/rta/rta_logo_box_lightmaroon.png +0 -0
  94. package/es/assets/img/rta/rta_logo_box_maroon.png +0 -0
  95. package/es/assets/img/rta/rta_logo_box_white.png +0 -0
  96. package/es/assets/img/rta_menu.png +0 -0
  97. package/es/assets/img/step2.jpg +0 -0
  98. package/es/assets/img/step3.jpg +0 -0
  99. package/es/assets/img/step4.jpg +0 -0
  100. package/es/assets/img/step5.jpg +0 -0
  101. package/es/assets/img/step6.jpg +0 -0
  102. package/es/assets/img/step7.jpg +0 -0
  103. package/es/assets/img/step8.jpg +0 -0
  104. package/es/assets/img/svg/2d_delete_object.svg +33 -0
  105. package/es/assets/img/svg/2d_delete_object1.svg +33 -0
  106. package/es/assets/img/svg/2d_lock_object.svg +33 -0
  107. package/es/assets/img/svg/3d_item_move.svg +106 -0
  108. package/es/assets/img/svg/3d_item_rotation.svg +76 -0
  109. package/es/assets/img/svg/3d_item_warning_edit.svg +77 -0
  110. package/es/assets/img/svg/3d_item_warning_info.svg +81 -0
  111. package/es/assets/img/svg/accessories.svg +4 -0
  112. package/es/assets/img/svg/angle_icon.svg +39 -0
  113. package/es/assets/img/svg/blank_div.svg +14 -0
  114. package/es/assets/img/svg/bottombar/2d3d_button.svg +3 -0
  115. package/es/assets/img/svg/bottombar/2d3d_button_active.svg +3 -0
  116. package/es/assets/img/svg/bottombar/2d3d_toggle.svg +4 -0
  117. package/es/assets/img/svg/bottombar/2d3d_toggle_active.svg +4 -0
  118. package/es/assets/img/svg/bottombar/arrow-down.svg +3 -0
  119. package/es/assets/img/svg/bottombar/arrow-left.svg +3 -0
  120. package/es/assets/img/svg/bottombar/arrow-minus.svg +3 -0
  121. package/es/assets/img/svg/bottombar/arrow-plus.svg +11 -0
  122. package/es/assets/img/svg/bottombar/arrow-right.svg +3 -0
  123. package/es/assets/img/svg/bottombar/arrow-up.svg +3 -0
  124. package/es/assets/img/svg/bottombar/collapse.svg +3 -0
  125. package/es/assets/img/svg/bottombar/elevation-back.svg +6 -0
  126. package/es/assets/img/svg/bottombar/elevation-front.svg +6 -0
  127. package/es/assets/img/svg/bottombar/elevation-left.svg +6 -0
  128. package/es/assets/img/svg/bottombar/elevation-right.svg +7 -0
  129. package/es/assets/img/svg/bottombar/elevation.svg +6 -0
  130. package/es/assets/img/svg/bottombar/expand.svg +3 -0
  131. package/es/assets/img/svg/bottombar/help.svg +72 -0
  132. package/es/assets/img/svg/bottombar/incm_toggle.svg +39 -0
  133. package/es/assets/img/svg/bottombar/pan_1.svg +57 -0
  134. package/es/assets/img/svg/bottombar/pan_2.svg +27 -0
  135. package/es/assets/img/svg/bottombar/pan_3.svg +27 -0
  136. package/es/assets/img/svg/bottombar/pan_4.svg +27 -0
  137. package/es/assets/img/svg/bottombar/pan_5.svg +27 -0
  138. package/es/assets/img/svg/bottombar/settings.svg +23 -0
  139. package/es/assets/img/svg/bottombar/spin-down.svg +76 -0
  140. package/es/assets/img/svg/bottombar/spin-left.svg +75 -0
  141. package/es/assets/img/svg/bottombar/spin-right.svg +75 -0
  142. package/es/assets/img/svg/bottombar/spin-up.svg +76 -0
  143. package/es/assets/img/svg/bottombar/spin_1.svg +48 -0
  144. package/es/assets/img/svg/bottombar/spin_2.svg +31 -0
  145. package/es/assets/img/svg/bottombar/spin_3.svg +31 -0
  146. package/es/assets/img/svg/bottombar/spin_4.svg +31 -0
  147. package/es/assets/img/svg/bottombar/spin_5.svg +31 -0
  148. package/es/assets/img/svg/bottombar/zoomin.svg +29 -0
  149. package/es/assets/img/svg/bottombar/zoomout.svg +26 -0
  150. package/es/assets/img/svg/check.svg +10 -0
  151. package/es/assets/img/svg/close.svg +11 -0
  152. package/es/assets/img/svg/color/Black.svg +3 -0
  153. package/es/assets/img/svg/color/Blue.svg +3 -0
  154. package/es/assets/img/svg/color/Brown.svg +9 -0
  155. package/es/assets/img/svg/color/Cream.svg +3 -0
  156. package/es/assets/img/svg/color/Dark.svg +9 -0
  157. package/es/assets/img/svg/color/Gray.svg +3 -0
  158. package/es/assets/img/svg/color/Green.svg +3 -0
  159. package/es/assets/img/svg/color/Light.svg +9 -0
  160. package/es/assets/img/svg/color/Medium.svg +9 -0
  161. package/es/assets/img/svg/color/Unfinished.svg +9 -0
  162. package/es/assets/img/svg/color/White.svg +3 -0
  163. package/es/assets/img/svg/color/White.svg.bak +3 -0
  164. package/es/assets/img/svg/color/stone2.jpg +0 -0
  165. package/es/assets/img/svg/color/wood2.jpg +0 -0
  166. package/es/assets/img/svg/copy.svg +11 -0
  167. package/es/assets/img/svg/delete.svg +3 -0
  168. package/es/assets/img/svg/detail.svg +77 -0
  169. package/es/assets/img/svg/disclaimer/background.svg +758 -0
  170. package/es/assets/img/svg/disclaimer/logo-dots.svg +11 -0
  171. package/es/assets/img/svg/door/Closet.svg +11 -0
  172. package/es/assets/img/svg/door/Exterior.svg +5 -0
  173. package/es/assets/img/svg/door/Framed_dorway.svg +5 -0
  174. package/es/assets/img/svg/door/Frameless_dorway.svg +5 -0
  175. package/es/assets/img/svg/door/Interior.svg +7 -0
  176. package/es/assets/img/svg/door/Sliding.svg +5 -0
  177. package/es/assets/img/svg/doors_closet.svg +47 -0
  178. package/es/assets/img/svg/doors_exterior.svg +25 -0
  179. package/es/assets/img/svg/doors_interior.svg +29 -0
  180. package/es/assets/img/svg/doors_patio.svg +26 -0
  181. package/es/assets/img/svg/duplicate.svg +11 -0
  182. package/es/assets/img/svg/duplicate_object_left.svg +32 -0
  183. package/es/assets/img/svg/duplicate_object_right.svg +32 -0
  184. package/es/assets/img/svg/filtersActive.svg +19 -0
  185. package/es/assets/img/svg/firstsetting/L.svg +3 -0
  186. package/es/assets/img/svg/firstsetting/L2.svg +3 -0
  187. package/es/assets/img/svg/firstsetting/Open.svg +3 -0
  188. package/es/assets/img/svg/firstsetting/Square.svg +3 -0
  189. package/es/assets/img/svg/firstsetting/bar-active.svg +9 -0
  190. package/es/assets/img/svg/firstsetting/bar-normal.svg +3 -0
  191. package/es/assets/img/svg/firstsetting/bullet-current.svg +3 -0
  192. package/es/assets/img/svg/firstsetting/bullet-done.svg +3 -0
  193. package/es/assets/img/svg/firstsetting/bullet-not-done.svg +3 -0
  194. package/es/assets/img/svg/firstsetting/check-active.svg +3 -0
  195. package/es/assets/img/svg/firstsetting/check-normal.svg +3 -0
  196. package/es/assets/img/svg/firstsetting/pencil.svg +11 -0
  197. package/es/assets/img/svg/green_checkmark.svg +27 -0
  198. package/es/assets/img/svg/headerbar/assist.svg +3 -0
  199. package/es/assets/img/svg/headerbar/cart.svg +3 -0
  200. package/es/assets/img/svg/headerbar/check.svg +10 -0
  201. package/es/assets/img/svg/headerbar/consult_designer.svg +45 -0
  202. package/es/assets/img/svg/headerbar/edit_name.svg +26 -0
  203. package/es/assets/img/svg/headerbar/file-dollar.svg +13 -0
  204. package/es/assets/img/svg/headerbar/hamburger_menu.svg +32 -0
  205. package/es/assets/img/svg/headerbar/plus.svg +11 -0
  206. package/es/assets/img/svg/headerbar/review_quote.svg +44 -0
  207. package/es/assets/img/svg/headerbar/ruler-measure.svg +11 -0
  208. package/es/assets/img/svg/headerbar/save.svg +3 -0
  209. package/es/assets/img/svg/headerbar/setting.svg +75 -0
  210. package/es/assets/img/svg/help/check.svg +10 -0
  211. package/es/assets/img/svg/help/search.svg +76 -0
  212. package/es/assets/img/svg/intro/1-start-with-floorplan-whole.svg +27 -0
  213. package/es/assets/img/svg/intro/1-start-with-floorplan.svg +26 -0
  214. package/es/assets/img/svg/intro/2-start-from-scratch-whole.svg +28 -0
  215. package/es/assets/img/svg/intro/2-start-from-scratch.svg +27 -0
  216. package/es/assets/img/svg/intro/3-retrieve-project-whole.svg +19 -0
  217. package/es/assets/img/svg/intro/3-retrieve-project.svg +18 -0
  218. package/es/assets/img/svg/invert.svg +127 -0
  219. package/es/assets/img/svg/lefttoolbar/appliance-active.svg +13 -0
  220. package/es/assets/img/svg/lefttoolbar/appliance.svg +13 -0
  221. package/es/assets/img/svg/lefttoolbar/cabinet-active.svg +10 -0
  222. package/es/assets/img/svg/lefttoolbar/cabinet-category.svg +3 -0
  223. package/es/assets/img/svg/lefttoolbar/cabinet-one.svg +3 -0
  224. package/es/assets/img/svg/lefttoolbar/cabinet.svg +10 -0
  225. package/es/assets/img/svg/lefttoolbar/disigner_assistance.svg +89 -0
  226. package/es/assets/img/svg/lefttoolbar/door-style-active.svg +20 -0
  227. package/es/assets/img/svg/lefttoolbar/door-style.svg +20 -0
  228. package/es/assets/img/svg/lefttoolbar/door.svg +12 -0
  229. package/es/assets/img/svg/lefttoolbar/error_icon.svg +81 -0
  230. package/es/assets/img/svg/lefttoolbar/finishing-active.svg +13 -0
  231. package/es/assets/img/svg/lefttoolbar/finishing.svg +13 -0
  232. package/es/assets/img/svg/lefttoolbar/reviewforquote-active.svg +86 -0
  233. package/es/assets/img/svg/lefttoolbar/reviewforquote.svg +12 -0
  234. package/es/assets/img/svg/lefttoolbar/room-shape-L.svg +3 -0
  235. package/es/assets/img/svg/lefttoolbar/room-shape-active.svg +18 -0
  236. package/es/assets/img/svg/lefttoolbar/room-shape-custom.svg +12 -0
  237. package/es/assets/img/svg/lefttoolbar/room-shape-irregular.svg +3 -0
  238. package/es/assets/img/svg/lefttoolbar/room-shape-open.svg +3 -0
  239. package/es/assets/img/svg/lefttoolbar/room-shape-square.svg +3 -0
  240. package/es/assets/img/svg/lefttoolbar/room-shape.svg +18 -0
  241. package/es/assets/img/svg/lefttoolbar/search.svg +76 -0
  242. package/es/assets/img/svg/lefttoolbar/view_more.svg +86 -0
  243. package/es/assets/img/svg/lefttoolbar/warning_icon.svg +81 -0
  244. package/es/assets/img/svg/lefttoolbar/window.svg +12 -0
  245. package/es/assets/img/svg/logo.svg +11 -0
  246. package/es/assets/img/svg/logo_with_text.svg +25 -0
  247. package/es/assets/img/svg/menubar/login.svg +84 -0
  248. package/es/assets/img/svg/menubar/my_projects.svg +85 -0
  249. package/es/assets/img/svg/menubar/new_project.svg +110 -0
  250. package/es/assets/img/svg/menubar/save_project.svg +84 -0
  251. package/es/assets/img/svg/options.svg +3 -0
  252. package/es/assets/img/svg/positioning.svg +3 -0
  253. package/es/assets/img/svg/rotate.png +0 -0
  254. package/es/assets/img/svg/rotate.svg +17 -0
  255. package/es/assets/img/svg/rotate_object_clockwise.svg +26 -0
  256. package/es/assets/img/svg/rotate_object_counterclockwise.svg +26 -0
  257. package/es/assets/img/svg/toggleFilters.svg +19 -0
  258. package/es/assets/img/svg/toolbar/add_appliances_active.svg +64 -0
  259. package/es/assets/img/svg/toolbar/add_appliances_inactive.svg +52 -0
  260. package/es/assets/img/svg/toolbar/add_button.svg +36 -0
  261. package/es/assets/img/svg/toolbar/add_cabinets_active.svg +59 -0
  262. package/es/assets/img/svg/toolbar/add_cabinets_inactive.svg +49 -0
  263. package/es/assets/img/svg/toolbar/add_items_doors.svg +25 -0
  264. package/es/assets/img/svg/toolbar/add_items_doorways.svg +24 -0
  265. package/es/assets/img/svg/toolbar/add_items_refrigerator.svg +32 -0
  266. package/es/assets/img/svg/toolbar/add_items_windows.svg +28 -0
  267. package/es/assets/img/svg/toolbar/apply_button.svg +38 -0
  268. package/es/assets/img/svg/toolbar/arrow-plus.svg +11 -0
  269. package/es/assets/img/svg/toolbar/backsplash.svg +8 -0
  270. package/es/assets/img/svg/toolbar/cancel_button.svg +37 -0
  271. package/es/assets/img/svg/toolbar/consult_a_designer_button.svg +47 -0
  272. package/es/assets/img/svg/toolbar/countertop.svg +7 -0
  273. package/es/assets/img/svg/toolbar/dcm.png +0 -0
  274. package/es/assets/img/svg/toolbar/dcm_off.svg +12 -0
  275. package/es/assets/img/svg/toolbar/dcm_on.svg +474 -0
  276. package/es/assets/img/svg/toolbar/delete_button.svg +37 -0
  277. package/es/assets/img/svg/toolbar/download.svg +77 -0
  278. package/es/assets/img/svg/toolbar/draw_custom_floor.svg +31 -0
  279. package/es/assets/img/svg/toolbar/edit_button.svg +75 -0
  280. package/es/assets/img/svg/toolbar/email_quote_button.svg +44 -0
  281. package/es/assets/img/svg/toolbar/fbm.png +0 -0
  282. package/es/assets/img/svg/toolbar/finishing_touches_active.svg +54 -0
  283. package/es/assets/img/svg/toolbar/finishing_touches_inactive.svg +42 -0
  284. package/es/assets/img/svg/toolbar/floorstyle.svg +9 -0
  285. package/es/assets/img/svg/toolbar/fmb.png +0 -0
  286. package/es/assets/img/svg/toolbar/fmb_off.svg +12 -0
  287. package/es/assets/img/svg/toolbar/fmb_on.svg +489 -0
  288. package/es/assets/img/svg/toolbar/furnishings_icon.svg +6 -0
  289. package/es/assets/img/svg/toolbar/get_started_button.svg +41 -0
  290. package/es/assets/img/svg/toolbar/handles.svg +5 -0
  291. package/es/assets/img/svg/toolbar/lighting.svg +7 -0
  292. package/es/assets/img/svg/toolbar/lrm.png +0 -0
  293. package/es/assets/img/svg/toolbar/lrm_off.svg +12 -0
  294. package/es/assets/img/svg/toolbar/lrm_on.svg +470 -0
  295. package/es/assets/img/svg/toolbar/make_floorplan_active.svg +66 -0
  296. package/es/assets/img/svg/toolbar/make_floorplan_inactive.svg +52 -0
  297. package/es/assets/img/svg/toolbar/predefined_room_l_shaped.svg +20 -0
  298. package/es/assets/img/svg/toolbar/predefined_room_layout.svg +20 -0
  299. package/es/assets/img/svg/toolbar/predefined_room_long_narrow.svg +20 -0
  300. package/es/assets/img/svg/toolbar/predefined_room_open_l_shape.svg +20 -0
  301. package/es/assets/img/svg/toolbar/predefined_room_open_pentagon.svg +20 -0
  302. package/es/assets/img/svg/toolbar/predefined_room_open_rectangle.svg +20 -0
  303. package/es/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg +20 -0
  304. package/es/assets/img/svg/toolbar/predefined_room_pentagon.svg +20 -0
  305. package/es/assets/img/svg/toolbar/predefined_room_rectangle.svg +20 -0
  306. package/es/assets/img/svg/toolbar/predefined_room_rectangle_with_alcove.svg +20 -0
  307. package/es/assets/img/svg/toolbar/redo_button.svg +75 -0
  308. package/es/assets/img/svg/toolbar/redo_button1.svg +75 -0
  309. package/es/assets/img/svg/toolbar/review_quote_active.svg +14 -0
  310. package/es/assets/img/svg/toolbar/review_quote_inactive.svg +44 -0
  311. package/es/assets/img/svg/toolbar/save_project_button.svg +44 -0
  312. package/es/assets/img/svg/toolbar/select_doorstyle_active.svg +67 -0
  313. package/es/assets/img/svg/toolbar/select_doorstyle_inactive.svg +57 -0
  314. package/es/assets/img/svg/toolbar/shopping-cart.svg +13 -0
  315. package/es/assets/img/svg/toolbar/style_change_button.svg +47 -0
  316. package/es/assets/img/svg/toolbar/take_picture.svg +75 -0
  317. package/es/assets/img/svg/toolbar/undo_button.svg +76 -0
  318. package/es/assets/img/svg/toolbar/undo_button1.svg +76 -0
  319. package/es/assets/img/svg/toolbar/use_button.svg +37 -0
  320. package/es/assets/img/svg/toolbar/wall_color_icon.svg +6 -0
  321. package/es/assets/img/svg/topbar/edit_active.svg +10 -0
  322. package/es/assets/img/svg/topbar/edit_inactive.svg +10 -0
  323. package/es/assets/img/svg/topbar/redo_active.svg +42 -0
  324. package/es/assets/img/svg/topbar/redo_inactive.svg +23 -0
  325. package/es/assets/img/svg/topbar/select_all_active.svg +50 -0
  326. package/es/assets/img/svg/topbar/select_all_inactive.svg +32 -0
  327. package/es/assets/img/svg/topbar/take_picture_active.svg +51 -0
  328. package/es/assets/img/svg/topbar/take_picture_inactive.svg +26 -0
  329. package/es/assets/img/svg/topbar/undo_active.svg +42 -0
  330. package/es/assets/img/svg/topbar/undo_inactive.svg +23 -0
  331. package/es/assets/img/svg/warning_info_2d.svg +81 -0
  332. package/es/assets/img/svg/window/Clear.svg +3 -0
  333. package/es/assets/img/svg/window/Cross.svg +5 -0
  334. package/es/assets/img/svg/window/Double_hung.svg +4 -0
  335. package/es/assets/img/svg/window/Vertical.svg +4 -0
  336. package/es/assets/img/svg/windows_clear.svg +23 -0
  337. package/es/assets/img/svg/windows_cross.svg +28 -0
  338. package/es/assets/img/svg/windows_double_hung.svg +24 -0
  339. package/es/assets/img/svg/windows_vertical.svg +24 -0
  340. package/es/assets/img/svg/wizardstep/Custom.svg +3 -0
  341. package/es/assets/img/svg/wizardstep/Dashed_line.svg +3 -0
  342. package/es/assets/img/svg/wizardstep/L.svg +3 -0
  343. package/es/assets/img/svg/wizardstep/L2.svg +3 -0
  344. package/es/assets/img/svg/wizardstep/Open.svg +3 -0
  345. package/es/assets/img/svg/wizardstep/Square.svg +3 -0
  346. package/es/assets/img/svg/wizardstep/bar-active.svg +9 -0
  347. package/es/assets/img/svg/wizardstep/bar-normal.svg +3 -0
  348. package/es/assets/img/svg/wizardstep/bullet-current.svg +3 -0
  349. package/es/assets/img/svg/wizardstep/bullet-done.svg +3 -0
  350. package/es/assets/img/svg/wizardstep/bullet-not-done.svg +3 -0
  351. package/es/assets/img/svg/wizardstep/check-active.svg +3 -0
  352. package/es/assets/img/svg/wizardstep/check-normal.svg +3 -0
  353. package/es/assets/img/svg/wizardstep/detail_view.svg +87 -0
  354. package/es/assets/img/svg/wizardstep/pencil.svg +11 -0
  355. package/es/assets/img/svg/wizardstep/tile_view.svg +95 -0
  356. package/es/assets/img/texture/glass.jpg +0 -0
  357. package/es/assets/img/texture/steel.jpg +0 -0
  358. package/es/assets/img/texture/white1px.jpg +0 -0
  359. package/es/assets/img/texture/wood.jpg +0 -0
  360. package/es/assets/model/DCM.bin +0 -0
  361. package/es/assets/model/DCM.fbx +0 -0
  362. package/es/assets/model/DCM.gltf +1 -0
  363. package/es/assets/model/FBM.bin +0 -0
  364. package/es/assets/model/FBM.fbx +0 -0
  365. package/es/assets/model/FBM.gltf +1 -0
  366. package/es/assets/model/LRM.bin +0 -0
  367. package/es/assets/model/LRM.fbx +0 -0
  368. package/es/assets/model/LRM.gltf +1 -0
  369. package/es/assets/rtastore_logo.png +0 -0
  370. package/es/catalog/areas/area/planner-element.js +45 -0
  371. package/es/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
  372. package/es/catalog/areas/area/textures/grass.jpg +0 -0
  373. package/es/catalog/areas/area/textures/parquet.jpg +0 -0
  374. package/es/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
  375. package/es/catalog/areas/area/textures/tile1.jpg +0 -0
  376. package/es/catalog/back.png +0 -0
  377. package/es/catalog/catalog.js +265 -0
  378. package/es/catalog/doors.png +0 -0
  379. package/es/catalog/doorways.png +0 -0
  380. package/es/catalog/envMap/nx.hdr +0 -0
  381. package/es/catalog/envMap/ny.hdr +0 -0
  382. package/es/catalog/envMap/nz.hdr +0 -0
  383. package/es/catalog/envMap/px.hdr +0 -0
  384. package/es/catalog/envMap/py.hdr +0 -0
  385. package/es/catalog/envMap/pz.hdr +0 -0
  386. package/es/catalog/export.js +0 -0
  387. package/es/catalog/factories/area-factory-3d.js +181 -0
  388. package/es/catalog/factories/area-factory.js +78 -0
  389. package/es/catalog/factories/export.js +7 -0
  390. package/es/catalog/factories/wall-factory-3d.js +202 -0
  391. package/es/catalog/factories/wall-factory.js +267 -0
  392. package/es/catalog/holes/door-closet/planner-element.js +222 -0
  393. package/es/catalog/holes/door-double/door_double.png +0 -0
  394. package/es/catalog/holes/door-double/planner-element.js +315 -0
  395. package/es/catalog/holes/door-exterior/planner-element.js +215 -0
  396. package/es/catalog/holes/door-interior/planner-element.js +227 -0
  397. package/es/catalog/holes/door-panic/panicDoor.png +0 -0
  398. package/es/catalog/holes/door-panic/planner-element.js +503 -0
  399. package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
  400. package/es/catalog/holes/door-panic-double/planner-element.js +463 -0
  401. package/es/catalog/holes/door-sliding/planner-element.js +225 -0
  402. package/es/catalog/holes/doorway-framed/planner-element.js +145 -0
  403. package/es/catalog/holes/doorway-frameless/planner-element.js +104 -0
  404. package/es/catalog/holes/export.js +13 -0
  405. package/es/catalog/holes/gate/gate.jpg +0 -0
  406. package/es/catalog/holes/window-clear/planner-element.js +166 -0
  407. package/es/catalog/holes/window-clear/texture.png +0 -0
  408. package/es/catalog/holes/window-cross/planner-element.js +165 -0
  409. package/es/catalog/holes/window-cross/texture.png +0 -0
  410. package/es/catalog/holes/window-double-hung/planner-element.js +303 -0
  411. package/es/catalog/holes/window-double-hung/texture.png +0 -0
  412. package/es/catalog/holes/window-vertical/planner-element.js +276 -0
  413. package/es/catalog/holes/window-vertical/texture.png +0 -0
  414. package/es/catalog/lines/wall/planner-element.js +79 -0
  415. package/es/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
  416. package/es/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
  417. package/es/catalog/lines/wall/textures/bricks.jpg +0 -0
  418. package/es/catalog/lines/wall/textures/bricks2.jpg +0 -0
  419. package/es/catalog/lines/wall/textures/bricks3.jpg +0 -0
  420. package/es/catalog/lines/wall/textures/morden-normal.jpg +0 -0
  421. package/es/catalog/lines/wall/textures/morden.jpg +0 -0
  422. package/es/catalog/lines/wall/textures/painted-normal.jpg +0 -0
  423. package/es/catalog/lines/wall/textures/painted.jpg +0 -0
  424. package/es/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
  425. package/es/catalog/lines/wall/textures/plaster.jpg +0 -0
  426. package/es/catalog/lines/wall/wall.png +0 -0
  427. package/es/catalog/molding/molding-dcm/planner-element.js +26 -0
  428. package/es/catalog/molding/molding-dcm/texture.png +0 -0
  429. package/es/catalog/molding/molding-fbm/planner-element.js +26 -0
  430. package/es/catalog/molding/molding-fbm/texture.png +0 -0
  431. package/es/catalog/molding/molding-lrm/planner-element.js +26 -0
  432. package/es/catalog/molding/molding-lrm/texture.png +0 -0
  433. package/es/catalog/properties/export.js +21 -0
  434. package/es/catalog/properties/property-checkbox.js +68 -0
  435. package/es/catalog/properties/property-color.js +39 -0
  436. package/es/catalog/properties/property-enum.js +50 -0
  437. package/es/catalog/properties/property-hidden.js +19 -0
  438. package/es/catalog/properties/property-lenght-measure.js +100 -0
  439. package/es/catalog/properties/property-length-measure.js +84 -0
  440. package/es/catalog/properties/property-length-measure_hole.js +100 -0
  441. package/es/catalog/properties/property-number.js +48 -0
  442. package/es/catalog/properties/property-read-only.js +26 -0
  443. package/es/catalog/properties/property-string.js +48 -0
  444. package/es/catalog/properties/property-toggle.js +39 -0
  445. package/es/catalog/properties/shared-property-style.js +14 -0
  446. package/es/catalog/utils/FuseUtils.js +79 -0
  447. package/es/catalog/utils/exporter.js +149 -0
  448. package/es/catalog/utils/geom-utils.js +189 -0
  449. package/es/catalog/utils/item-loader.js +1594 -0
  450. package/es/catalog/utils/load-obj.js +91 -0
  451. package/es/catalog/utils/mtl-loader.js +357 -0
  452. package/es/catalog/utils/obj-loader.js +476 -0
  453. package/es/catalog/windows.png +0 -0
  454. package/es/class/FuseUtils.js +79 -0
  455. package/es/class/area.js +141 -0
  456. package/es/class/export.js +24 -0
  457. package/es/class/group.js +431 -0
  458. package/es/class/guide.js +58 -0
  459. package/es/class/hole.js +926 -0
  460. package/es/class/item.js +1845 -0
  461. package/es/class/layer.js +663 -0
  462. package/es/class/line.js +1221 -0
  463. package/es/class/project.js +795 -0
  464. package/es/class/vertex.js +198 -0
  465. package/es/components/content.js +131 -0
  466. package/es/components/export.js +7 -0
  467. package/es/components/style/button.js +106 -0
  468. package/es/components/style/cancel-button.js +21 -0
  469. package/es/components/style/content-container.js +30 -0
  470. package/es/components/style/content-title.js +25 -0
  471. package/es/components/style/delete-button.js +24 -0
  472. package/es/components/style/export.js +31 -0
  473. package/es/components/style/form-block.js +20 -0
  474. package/es/components/style/form-color-input.js +26 -0
  475. package/es/components/style/form-label.js +22 -0
  476. package/es/components/style/form-number-input.js +183 -0
  477. package/es/components/style/form-number-input_2.js +200 -0
  478. package/es/components/style/form-select.js +19 -0
  479. package/es/components/style/form-slider.js +60 -0
  480. package/es/components/style/form-submit-button.js +25 -0
  481. package/es/components/style/form-text-input.js +69 -0
  482. package/es/components/viewer2d/area.js +81 -0
  483. package/es/components/viewer2d/export.js +31 -0
  484. package/es/components/viewer2d/grids/grid-horizontal-streak.js +36 -0
  485. package/es/components/viewer2d/grids/grid-streak.js +36 -0
  486. package/es/components/viewer2d/grids/grid-vertical-streak.js +36 -0
  487. package/es/components/viewer2d/grids/grids.js +30 -0
  488. package/es/components/viewer2d/group.js +53 -0
  489. package/es/components/viewer2d/item.js +447 -0
  490. package/es/components/viewer2d/layer.js +164 -0
  491. package/es/components/viewer2d/line.js +964 -0
  492. package/es/components/viewer2d/ruler.js +79 -0
  493. package/es/components/viewer2d/rulerDist.js +132 -0
  494. package/es/components/viewer2d/rulerX.js +145 -0
  495. package/es/components/viewer2d/rulerY.js +147 -0
  496. package/es/components/viewer2d/scene.js +128 -0
  497. package/es/components/viewer2d/snap.js +74 -0
  498. package/es/components/viewer2d/state.js +73 -0
  499. package/es/components/viewer2d/utils.js +187 -0
  500. package/es/components/viewer2d/vertex.js +65 -0
  501. package/es/components/viewer2d/viewer2d.js +1433 -0
  502. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +2585 -0
  503. package/es/components/viewer3d/dcm.js +401 -0
  504. package/es/components/viewer3d/fbm.js +414 -0
  505. package/es/components/viewer3d/front3D.js +61 -0
  506. package/es/components/viewer3d/grid-creator.js +25 -0
  507. package/es/components/viewer3d/grids/grid-horizontal-streak.js +36 -0
  508. package/es/components/viewer3d/grids/grid-streak.js +27 -0
  509. package/es/components/viewer3d/grids/grid-vertical-streak.js +36 -0
  510. package/es/components/viewer3d/libs/first-person-controls.js +67 -0
  511. package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +1281 -0
  512. package/es/components/viewer3d/libs/mtl-loader.js +357 -0
  513. package/es/components/viewer3d/libs/obj-loader.js +462 -0
  514. package/es/components/viewer3d/libs/orbit-controls.js +697 -0
  515. package/es/components/viewer3d/libs/pointer-lock-controls.js +44 -0
  516. package/es/components/viewer3d/lrm.js +305 -0
  517. package/es/components/viewer3d/model.js +708 -0
  518. package/es/components/viewer3d/pointer-lock-navigation.js +115 -0
  519. package/es/components/viewer3d/ruler-utils/itemRect.js +61 -0
  520. package/es/components/viewer3d/ruler-utils/layer3D.js +495 -0
  521. package/es/components/viewer3d/ruler-utils/ruler3D.js +224 -0
  522. package/es/components/viewer3d/ruler-utils/scene3D.js +59 -0
  523. package/es/components/viewer3d/ruler-utils/state3D.js +18 -0
  524. package/es/components/viewer3d/scene-creator.js +3617 -0
  525. package/es/components/viewer3d/three-memory-cleaner.js +51 -0
  526. package/es/components/viewer3d/viewer3d-first-person.js +309 -0
  527. package/es/components/viewer3d/viewer3d.js +2654 -0
  528. package/es/constants.js +688 -0
  529. package/es/devLiteRenderer.js +316 -0
  530. package/es/index.js +56 -0
  531. package/es/models.js +506 -0
  532. package/es/plugins/SVGLoader.js +1412 -0
  533. package/es/plugins/console-debugger.js +34 -0
  534. package/es/plugins/export.js +7 -0
  535. package/es/plugins/keyboard.js +101 -0
  536. package/es/reducers/areas-reducer.js +12 -0
  537. package/es/reducers/export.js +25 -0
  538. package/es/reducers/groups-reducer.js +38 -0
  539. package/es/reducers/holes-reducer.js +62 -0
  540. package/es/reducers/items-reducer.js +147 -0
  541. package/es/reducers/lines-reducer.js +45 -0
  542. package/es/reducers/project-reducer.js +131 -0
  543. package/es/reducers/reducer.js +19 -0
  544. package/es/reducers/scene-reducer.js +28 -0
  545. package/es/reducers/user-reducer.js +41 -0
  546. package/es/reducers/vertices-reducer.js +19 -0
  547. package/es/reducers/viewer2d-reducer.js +75 -0
  548. package/es/reducers/viewer3d-reducer.js +56 -0
  549. package/es/shared-style.js +66 -0
  550. package/es/styles/export.js +5 -0
  551. package/es/styles/tabs.css +40 -0
  552. package/es/translator/en.js +104 -0
  553. package/es/translator/it.js +79 -0
  554. package/es/translator/ru.js +79 -0
  555. package/es/translator/translator.js +80 -0
  556. package/es/utils/browser.js +33 -0
  557. package/es/utils/convert-units-lite.js +29 -0
  558. package/es/utils/email-validator.js +4 -0
  559. package/es/utils/export.js +25 -0
  560. package/es/utils/geometry.js +2446 -0
  561. package/es/utils/get-edges-of-subgraphs.js +26 -0
  562. package/es/utils/graph-cycles.js +238 -0
  563. package/es/utils/graph-inner-cycles.js +46 -0
  564. package/es/utils/graph.js +145 -0
  565. package/es/utils/helper.js +334 -0
  566. package/es/utils/history.js +29 -0
  567. package/es/utils/id-broker.js +15 -0
  568. package/es/utils/isolate-event-handler.js +683 -0
  569. package/es/utils/logger.js +8 -0
  570. package/es/utils/math.js +50 -0
  571. package/es/utils/molding.js +865 -0
  572. package/es/utils/name-generator.js +14 -0
  573. package/es/utils/objects-utils.js +50 -0
  574. package/es/utils/phone-validator.js +4 -0
  575. package/es/utils/process-black-list.js +15 -0
  576. package/es/utils/react-if.js +18 -0
  577. package/es/utils/snap-scene.js +94 -0
  578. package/es/utils/snap.js +231 -0
  579. package/es/utils/summarizeCart.js +24 -0
  580. package/es/utils/threeCSG.es6.js +494 -0
  581. package/es/version.js +1 -0
  582. package/lib/@history.js +11 -0
  583. package/lib/AppContext.js +11 -0
  584. package/lib/LiteKitchenConfigurator.js +490 -0
  585. package/lib/LiteRenderer.js +513 -0
  586. package/lib/actions/area-actions.js +21 -0
  587. package/lib/actions/export.js +36 -0
  588. package/lib/actions/groups-actions.js +107 -0
  589. package/lib/actions/holes-actions.js +140 -0
  590. package/lib/actions/items-actions.js +370 -0
  591. package/lib/actions/lines-actions.js +96 -0
  592. package/lib/actions/project-actions.js +338 -0
  593. package/lib/actions/scene-actions.js +43 -0
  594. package/lib/actions/vertices-actions.js +35 -0
  595. package/lib/actions/viewer2d-actions.js +73 -0
  596. package/lib/actions/viewer3d-actions.js +32 -0
  597. package/lib/analytics/ga4.js +194 -0
  598. package/lib/analytics/posthog.js +68 -0
  599. package/lib/assets/Window.hdr +2100 -0
  600. package/lib/assets/brown_photostudio_02_1k.hdr +0 -0
  601. package/lib/assets/fonts/Rene Bieder Milliard Black Italic.woff +0 -0
  602. package/lib/assets/fonts/Rene Bieder Milliard Black.woff +0 -0
  603. package/lib/assets/fonts/Rene Bieder Milliard Bold Italic.woff +0 -0
  604. package/lib/assets/fonts/Rene Bieder Milliard Bold.woff +0 -0
  605. package/lib/assets/fonts/Rene Bieder Milliard Book Italic.woff +0 -0
  606. package/lib/assets/fonts/Rene Bieder Milliard Book.woff +0 -0
  607. package/lib/assets/fonts/Rene Bieder Milliard ExtraBold Italic.woff +0 -0
  608. package/lib/assets/fonts/Rene Bieder Milliard ExtraBold.woff +0 -0
  609. package/lib/assets/fonts/Rene Bieder Milliard ExtraLight Italic.woff +0 -0
  610. package/lib/assets/fonts/Rene Bieder Milliard ExtraLight.woff +0 -0
  611. package/lib/assets/fonts/Rene Bieder Milliard Hairline Italic.woff +0 -0
  612. package/lib/assets/fonts/Rene Bieder Milliard Hairline.woff +0 -0
  613. package/lib/assets/fonts/Rene Bieder Milliard Heavy Italic.woff +0 -0
  614. package/lib/assets/fonts/Rene Bieder Milliard Heavy.woff +0 -0
  615. package/lib/assets/fonts/Rene Bieder Milliard Light Italic.woff +0 -0
  616. package/lib/assets/fonts/Rene Bieder Milliard Light.woff +0 -0
  617. package/lib/assets/fonts/Rene Bieder Milliard Medium Italic.woff +0 -0
  618. package/lib/assets/fonts/Rene Bieder Milliard Medium.woff +0 -0
  619. package/lib/assets/fonts/Rene Bieder Milliard SemiBold Italic.woff +0 -0
  620. package/lib/assets/fonts/Rene Bieder Milliard SemiBold.woff +0 -0
  621. package/lib/assets/fonts/Rene Bieder Milliard Thin Italic.woff +0 -0
  622. package/lib/assets/fonts/Rene Bieder Milliard Thin.woff +0 -0
  623. package/lib/assets/fonts/style.css +177 -0
  624. package/lib/assets/gltf/door_closet.bin +0 -0
  625. package/lib/assets/gltf/door_closet.fbx +0 -0
  626. package/lib/assets/gltf/door_closet.gltf +1 -0
  627. package/lib/assets/gltf/door_exterior.bin +0 -0
  628. package/lib/assets/gltf/door_exterior.fbx +0 -0
  629. package/lib/assets/gltf/door_exterior.gltf +1 -0
  630. package/lib/assets/gltf/door_interior.bin +0 -0
  631. package/lib/assets/gltf/door_interior.fbx +0 -0
  632. package/lib/assets/gltf/door_interior.gltf +1 -0
  633. package/lib/assets/gltf/door_sliding.bin +0 -0
  634. package/lib/assets/gltf/door_sliding.fbx +0 -0
  635. package/lib/assets/gltf/door_sliding.gltf +1 -0
  636. package/lib/assets/gltf/doorway_framed.bin +0 -0
  637. package/lib/assets/gltf/doorway_framed.fbx +0 -0
  638. package/lib/assets/gltf/doorway_framed.gltf +1 -0
  639. package/lib/assets/gltf/window_clear.bin +0 -0
  640. package/lib/assets/gltf/window_clear.fbx +0 -0
  641. package/lib/assets/gltf/window_clear.gltf +1 -0
  642. package/lib/assets/gltf/window_cross.bin +0 -0
  643. package/lib/assets/gltf/window_cross.fbx +0 -0
  644. package/lib/assets/gltf/window_cross.gltf +1 -0
  645. package/lib/assets/gltf/window_double_hung.bin +0 -0
  646. package/lib/assets/gltf/window_double_hung.fbx +0 -0
  647. package/lib/assets/gltf/window_double_hung.gltf +1 -0
  648. package/lib/assets/gltf/window_vertical.bin +0 -0
  649. package/lib/assets/gltf/window_vertical.fbx +0 -0
  650. package/lib/assets/gltf/window_vertical.gltf +1 -0
  651. package/lib/assets/img/1.jpg +0 -0
  652. package/lib/assets/img/TKC_thumbnail.png +0 -0
  653. package/lib/assets/img/Toggle.png +0 -0
  654. package/lib/assets/img/loading/loading.gif +0 -0
  655. package/lib/assets/img/loading/loading_1.svg +11 -0
  656. package/lib/assets/img/loading_large.gif +0 -0
  657. package/lib/assets/img/png/door/closet.png +0 -0
  658. package/lib/assets/img/png/door/doorwaysframed.png +0 -0
  659. package/lib/assets/img/png/door/doorwaysframeles.png +0 -0
  660. package/lib/assets/img/png/door/doorwaysframeless.png +0 -0
  661. package/lib/assets/img/png/door/exterior.png +0 -0
  662. package/lib/assets/img/png/door/interior.png +0 -0
  663. package/lib/assets/img/png/door/sliding.png +0 -0
  664. package/lib/assets/img/png/helper/outcome.png +0 -0
  665. package/lib/assets/img/png/helper/video_preview_3d.png +0 -0
  666. package/lib/assets/img/png/helper/video_preview_start.png +0 -0
  667. package/lib/assets/img/project_img.png +0 -0
  668. package/lib/assets/img/rta/rta_logo_box_blue.jpg +0 -0
  669. package/lib/assets/img/rta/rta_logo_box_blue_ico.jpg +0 -0
  670. package/lib/assets/img/rta/rta_logo_box_blue_ico.svg +55 -0
  671. package/lib/assets/img/rta/rta_logo_box_darkGray.jpg +0 -0
  672. package/lib/assets/img/rta/rta_logo_box_lightblue.png +0 -0
  673. package/lib/assets/img/rta/rta_logo_box_lightmaroon.png +0 -0
  674. package/lib/assets/img/rta/rta_logo_box_maroon.png +0 -0
  675. package/lib/assets/img/rta/rta_logo_box_white.png +0 -0
  676. package/lib/assets/img/rta_menu.png +0 -0
  677. package/lib/assets/img/step2.jpg +0 -0
  678. package/lib/assets/img/step3.jpg +0 -0
  679. package/lib/assets/img/step4.jpg +0 -0
  680. package/lib/assets/img/step5.jpg +0 -0
  681. package/lib/assets/img/step6.jpg +0 -0
  682. package/lib/assets/img/step7.jpg +0 -0
  683. package/lib/assets/img/step8.jpg +0 -0
  684. package/lib/assets/img/svg/2d_delete_object.svg +33 -0
  685. package/lib/assets/img/svg/2d_delete_object1.svg +33 -0
  686. package/lib/assets/img/svg/2d_lock_object.svg +33 -0
  687. package/lib/assets/img/svg/3d_item_move.svg +106 -0
  688. package/lib/assets/img/svg/3d_item_rotation.svg +76 -0
  689. package/lib/assets/img/svg/3d_item_warning_edit.svg +77 -0
  690. package/lib/assets/img/svg/3d_item_warning_info.svg +81 -0
  691. package/lib/assets/img/svg/accessories.svg +4 -0
  692. package/lib/assets/img/svg/angle_icon.svg +39 -0
  693. package/lib/assets/img/svg/blank_div.svg +14 -0
  694. package/lib/assets/img/svg/bottombar/2d3d_button.svg +3 -0
  695. package/lib/assets/img/svg/bottombar/2d3d_button_active.svg +3 -0
  696. package/lib/assets/img/svg/bottombar/2d3d_toggle.svg +4 -0
  697. package/lib/assets/img/svg/bottombar/2d3d_toggle_active.svg +4 -0
  698. package/lib/assets/img/svg/bottombar/arrow-down.svg +3 -0
  699. package/lib/assets/img/svg/bottombar/arrow-left.svg +3 -0
  700. package/lib/assets/img/svg/bottombar/arrow-minus.svg +3 -0
  701. package/lib/assets/img/svg/bottombar/arrow-plus.svg +11 -0
  702. package/lib/assets/img/svg/bottombar/arrow-right.svg +3 -0
  703. package/lib/assets/img/svg/bottombar/arrow-up.svg +3 -0
  704. package/lib/assets/img/svg/bottombar/collapse.svg +3 -0
  705. package/lib/assets/img/svg/bottombar/elevation-back.svg +6 -0
  706. package/lib/assets/img/svg/bottombar/elevation-front.svg +6 -0
  707. package/lib/assets/img/svg/bottombar/elevation-left.svg +6 -0
  708. package/lib/assets/img/svg/bottombar/elevation-right.svg +7 -0
  709. package/lib/assets/img/svg/bottombar/elevation.svg +6 -0
  710. package/lib/assets/img/svg/bottombar/expand.svg +3 -0
  711. package/lib/assets/img/svg/bottombar/help.svg +72 -0
  712. package/lib/assets/img/svg/bottombar/incm_toggle.svg +39 -0
  713. package/lib/assets/img/svg/bottombar/pan_1.svg +57 -0
  714. package/lib/assets/img/svg/bottombar/pan_2.svg +27 -0
  715. package/lib/assets/img/svg/bottombar/pan_3.svg +27 -0
  716. package/lib/assets/img/svg/bottombar/pan_4.svg +27 -0
  717. package/lib/assets/img/svg/bottombar/pan_5.svg +27 -0
  718. package/lib/assets/img/svg/bottombar/settings.svg +23 -0
  719. package/lib/assets/img/svg/bottombar/spin-down.svg +76 -0
  720. package/lib/assets/img/svg/bottombar/spin-left.svg +75 -0
  721. package/lib/assets/img/svg/bottombar/spin-right.svg +75 -0
  722. package/lib/assets/img/svg/bottombar/spin-up.svg +76 -0
  723. package/lib/assets/img/svg/bottombar/spin_1.svg +48 -0
  724. package/lib/assets/img/svg/bottombar/spin_2.svg +31 -0
  725. package/lib/assets/img/svg/bottombar/spin_3.svg +31 -0
  726. package/lib/assets/img/svg/bottombar/spin_4.svg +31 -0
  727. package/lib/assets/img/svg/bottombar/spin_5.svg +31 -0
  728. package/lib/assets/img/svg/bottombar/zoomin.svg +29 -0
  729. package/lib/assets/img/svg/bottombar/zoomout.svg +26 -0
  730. package/lib/assets/img/svg/check.svg +10 -0
  731. package/lib/assets/img/svg/close.svg +11 -0
  732. package/lib/assets/img/svg/color/Black.svg +3 -0
  733. package/lib/assets/img/svg/color/Blue.svg +3 -0
  734. package/lib/assets/img/svg/color/Brown.svg +9 -0
  735. package/lib/assets/img/svg/color/Cream.svg +3 -0
  736. package/lib/assets/img/svg/color/Dark.svg +9 -0
  737. package/lib/assets/img/svg/color/Gray.svg +3 -0
  738. package/lib/assets/img/svg/color/Green.svg +3 -0
  739. package/lib/assets/img/svg/color/Light.svg +9 -0
  740. package/lib/assets/img/svg/color/Medium.svg +9 -0
  741. package/lib/assets/img/svg/color/Unfinished.svg +9 -0
  742. package/lib/assets/img/svg/color/White.svg +3 -0
  743. package/lib/assets/img/svg/color/White.svg.bak +3 -0
  744. package/lib/assets/img/svg/color/stone2.jpg +0 -0
  745. package/lib/assets/img/svg/color/wood2.jpg +0 -0
  746. package/lib/assets/img/svg/copy.svg +11 -0
  747. package/lib/assets/img/svg/delete.svg +3 -0
  748. package/lib/assets/img/svg/detail.svg +77 -0
  749. package/lib/assets/img/svg/disclaimer/background.svg +758 -0
  750. package/lib/assets/img/svg/disclaimer/logo-dots.svg +11 -0
  751. package/lib/assets/img/svg/door/Closet.svg +11 -0
  752. package/lib/assets/img/svg/door/Exterior.svg +5 -0
  753. package/lib/assets/img/svg/door/Framed_dorway.svg +5 -0
  754. package/lib/assets/img/svg/door/Frameless_dorway.svg +5 -0
  755. package/lib/assets/img/svg/door/Interior.svg +7 -0
  756. package/lib/assets/img/svg/door/Sliding.svg +5 -0
  757. package/lib/assets/img/svg/doors_closet.svg +47 -0
  758. package/lib/assets/img/svg/doors_exterior.svg +25 -0
  759. package/lib/assets/img/svg/doors_interior.svg +29 -0
  760. package/lib/assets/img/svg/doors_patio.svg +26 -0
  761. package/lib/assets/img/svg/duplicate.svg +11 -0
  762. package/lib/assets/img/svg/duplicate_object_left.svg +32 -0
  763. package/lib/assets/img/svg/duplicate_object_right.svg +32 -0
  764. package/lib/assets/img/svg/filtersActive.svg +19 -0
  765. package/lib/assets/img/svg/firstsetting/L.svg +3 -0
  766. package/lib/assets/img/svg/firstsetting/L2.svg +3 -0
  767. package/lib/assets/img/svg/firstsetting/Open.svg +3 -0
  768. package/lib/assets/img/svg/firstsetting/Square.svg +3 -0
  769. package/lib/assets/img/svg/firstsetting/bar-active.svg +9 -0
  770. package/lib/assets/img/svg/firstsetting/bar-normal.svg +3 -0
  771. package/lib/assets/img/svg/firstsetting/bullet-current.svg +3 -0
  772. package/lib/assets/img/svg/firstsetting/bullet-done.svg +3 -0
  773. package/lib/assets/img/svg/firstsetting/bullet-not-done.svg +3 -0
  774. package/lib/assets/img/svg/firstsetting/check-active.svg +3 -0
  775. package/lib/assets/img/svg/firstsetting/check-normal.svg +3 -0
  776. package/lib/assets/img/svg/firstsetting/pencil.svg +11 -0
  777. package/lib/assets/img/svg/green_checkmark.svg +27 -0
  778. package/lib/assets/img/svg/headerbar/assist.svg +3 -0
  779. package/lib/assets/img/svg/headerbar/cart.svg +3 -0
  780. package/lib/assets/img/svg/headerbar/check.svg +10 -0
  781. package/lib/assets/img/svg/headerbar/consult_designer.svg +45 -0
  782. package/lib/assets/img/svg/headerbar/edit_name.svg +26 -0
  783. package/lib/assets/img/svg/headerbar/file-dollar.svg +13 -0
  784. package/lib/assets/img/svg/headerbar/hamburger_menu.svg +32 -0
  785. package/lib/assets/img/svg/headerbar/plus.svg +11 -0
  786. package/lib/assets/img/svg/headerbar/review_quote.svg +44 -0
  787. package/lib/assets/img/svg/headerbar/ruler-measure.svg +11 -0
  788. package/lib/assets/img/svg/headerbar/save.svg +3 -0
  789. package/lib/assets/img/svg/headerbar/setting.svg +75 -0
  790. package/lib/assets/img/svg/help/check.svg +10 -0
  791. package/lib/assets/img/svg/help/search.svg +76 -0
  792. package/lib/assets/img/svg/intro/1-start-with-floorplan-whole.svg +27 -0
  793. package/lib/assets/img/svg/intro/1-start-with-floorplan.svg +26 -0
  794. package/lib/assets/img/svg/intro/2-start-from-scratch-whole.svg +28 -0
  795. package/lib/assets/img/svg/intro/2-start-from-scratch.svg +27 -0
  796. package/lib/assets/img/svg/intro/3-retrieve-project-whole.svg +19 -0
  797. package/lib/assets/img/svg/intro/3-retrieve-project.svg +18 -0
  798. package/lib/assets/img/svg/invert.svg +127 -0
  799. package/lib/assets/img/svg/lefttoolbar/appliance-active.svg +13 -0
  800. package/lib/assets/img/svg/lefttoolbar/appliance.svg +13 -0
  801. package/lib/assets/img/svg/lefttoolbar/cabinet-active.svg +10 -0
  802. package/lib/assets/img/svg/lefttoolbar/cabinet-category.svg +3 -0
  803. package/lib/assets/img/svg/lefttoolbar/cabinet-one.svg +3 -0
  804. package/lib/assets/img/svg/lefttoolbar/cabinet.svg +10 -0
  805. package/lib/assets/img/svg/lefttoolbar/disigner_assistance.svg +89 -0
  806. package/lib/assets/img/svg/lefttoolbar/door-style-active.svg +20 -0
  807. package/lib/assets/img/svg/lefttoolbar/door-style.svg +20 -0
  808. package/lib/assets/img/svg/lefttoolbar/door.svg +12 -0
  809. package/lib/assets/img/svg/lefttoolbar/error_icon.svg +81 -0
  810. package/lib/assets/img/svg/lefttoolbar/finishing-active.svg +13 -0
  811. package/lib/assets/img/svg/lefttoolbar/finishing.svg +13 -0
  812. package/lib/assets/img/svg/lefttoolbar/reviewforquote-active.svg +86 -0
  813. package/lib/assets/img/svg/lefttoolbar/reviewforquote.svg +12 -0
  814. package/lib/assets/img/svg/lefttoolbar/room-shape-L.svg +3 -0
  815. package/lib/assets/img/svg/lefttoolbar/room-shape-active.svg +18 -0
  816. package/lib/assets/img/svg/lefttoolbar/room-shape-custom.svg +12 -0
  817. package/lib/assets/img/svg/lefttoolbar/room-shape-irregular.svg +3 -0
  818. package/lib/assets/img/svg/lefttoolbar/room-shape-open.svg +3 -0
  819. package/lib/assets/img/svg/lefttoolbar/room-shape-square.svg +3 -0
  820. package/lib/assets/img/svg/lefttoolbar/room-shape.svg +18 -0
  821. package/lib/assets/img/svg/lefttoolbar/search.svg +76 -0
  822. package/lib/assets/img/svg/lefttoolbar/view_more.svg +86 -0
  823. package/lib/assets/img/svg/lefttoolbar/warning_icon.svg +81 -0
  824. package/lib/assets/img/svg/lefttoolbar/window.svg +12 -0
  825. package/lib/assets/img/svg/logo.svg +11 -0
  826. package/lib/assets/img/svg/logo_with_text.svg +25 -0
  827. package/lib/assets/img/svg/menubar/login.svg +84 -0
  828. package/lib/assets/img/svg/menubar/my_projects.svg +85 -0
  829. package/lib/assets/img/svg/menubar/new_project.svg +110 -0
  830. package/lib/assets/img/svg/menubar/save_project.svg +84 -0
  831. package/lib/assets/img/svg/options.svg +3 -0
  832. package/lib/assets/img/svg/positioning.svg +3 -0
  833. package/lib/assets/img/svg/rotate.png +0 -0
  834. package/lib/assets/img/svg/rotate.svg +17 -0
  835. package/lib/assets/img/svg/rotate_object_clockwise.svg +26 -0
  836. package/lib/assets/img/svg/rotate_object_counterclockwise.svg +26 -0
  837. package/lib/assets/img/svg/toggleFilters.svg +19 -0
  838. package/lib/assets/img/svg/toolbar/add_appliances_active.svg +64 -0
  839. package/lib/assets/img/svg/toolbar/add_appliances_inactive.svg +52 -0
  840. package/lib/assets/img/svg/toolbar/add_button.svg +36 -0
  841. package/lib/assets/img/svg/toolbar/add_cabinets_active.svg +59 -0
  842. package/lib/assets/img/svg/toolbar/add_cabinets_inactive.svg +49 -0
  843. package/lib/assets/img/svg/toolbar/add_items_doors.svg +25 -0
  844. package/lib/assets/img/svg/toolbar/add_items_doorways.svg +24 -0
  845. package/lib/assets/img/svg/toolbar/add_items_refrigerator.svg +32 -0
  846. package/lib/assets/img/svg/toolbar/add_items_windows.svg +28 -0
  847. package/lib/assets/img/svg/toolbar/apply_button.svg +38 -0
  848. package/lib/assets/img/svg/toolbar/arrow-plus.svg +11 -0
  849. package/lib/assets/img/svg/toolbar/backsplash.svg +8 -0
  850. package/lib/assets/img/svg/toolbar/cancel_button.svg +37 -0
  851. package/lib/assets/img/svg/toolbar/consult_a_designer_button.svg +47 -0
  852. package/lib/assets/img/svg/toolbar/countertop.svg +7 -0
  853. package/lib/assets/img/svg/toolbar/dcm.png +0 -0
  854. package/lib/assets/img/svg/toolbar/dcm_off.svg +12 -0
  855. package/lib/assets/img/svg/toolbar/dcm_on.svg +474 -0
  856. package/lib/assets/img/svg/toolbar/delete_button.svg +37 -0
  857. package/lib/assets/img/svg/toolbar/download.svg +77 -0
  858. package/lib/assets/img/svg/toolbar/draw_custom_floor.svg +31 -0
  859. package/lib/assets/img/svg/toolbar/edit_button.svg +75 -0
  860. package/lib/assets/img/svg/toolbar/email_quote_button.svg +44 -0
  861. package/lib/assets/img/svg/toolbar/fbm.png +0 -0
  862. package/lib/assets/img/svg/toolbar/finishing_touches_active.svg +54 -0
  863. package/lib/assets/img/svg/toolbar/finishing_touches_inactive.svg +42 -0
  864. package/lib/assets/img/svg/toolbar/floorstyle.svg +9 -0
  865. package/lib/assets/img/svg/toolbar/fmb.png +0 -0
  866. package/lib/assets/img/svg/toolbar/fmb_off.svg +12 -0
  867. package/lib/assets/img/svg/toolbar/fmb_on.svg +489 -0
  868. package/lib/assets/img/svg/toolbar/furnishings_icon.svg +6 -0
  869. package/lib/assets/img/svg/toolbar/get_started_button.svg +41 -0
  870. package/lib/assets/img/svg/toolbar/handles.svg +5 -0
  871. package/lib/assets/img/svg/toolbar/lighting.svg +7 -0
  872. package/lib/assets/img/svg/toolbar/lrm.png +0 -0
  873. package/lib/assets/img/svg/toolbar/lrm_off.svg +12 -0
  874. package/lib/assets/img/svg/toolbar/lrm_on.svg +470 -0
  875. package/lib/assets/img/svg/toolbar/make_floorplan_active.svg +66 -0
  876. package/lib/assets/img/svg/toolbar/make_floorplan_inactive.svg +52 -0
  877. package/lib/assets/img/svg/toolbar/predefined_room_l_shaped.svg +20 -0
  878. package/lib/assets/img/svg/toolbar/predefined_room_layout.svg +20 -0
  879. package/lib/assets/img/svg/toolbar/predefined_room_long_narrow.svg +20 -0
  880. package/lib/assets/img/svg/toolbar/predefined_room_open_l_shape.svg +20 -0
  881. package/lib/assets/img/svg/toolbar/predefined_room_open_pentagon.svg +20 -0
  882. package/lib/assets/img/svg/toolbar/predefined_room_open_rectangle.svg +20 -0
  883. package/lib/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg +20 -0
  884. package/lib/assets/img/svg/toolbar/predefined_room_pentagon.svg +20 -0
  885. package/lib/assets/img/svg/toolbar/predefined_room_rectangle.svg +20 -0
  886. package/lib/assets/img/svg/toolbar/predefined_room_rectangle_with_alcove.svg +20 -0
  887. package/lib/assets/img/svg/toolbar/redo_button.svg +75 -0
  888. package/lib/assets/img/svg/toolbar/redo_button1.svg +75 -0
  889. package/lib/assets/img/svg/toolbar/review_quote_active.svg +14 -0
  890. package/lib/assets/img/svg/toolbar/review_quote_inactive.svg +44 -0
  891. package/lib/assets/img/svg/toolbar/save_project_button.svg +44 -0
  892. package/lib/assets/img/svg/toolbar/select_doorstyle_active.svg +67 -0
  893. package/lib/assets/img/svg/toolbar/select_doorstyle_inactive.svg +57 -0
  894. package/lib/assets/img/svg/toolbar/shopping-cart.svg +13 -0
  895. package/lib/assets/img/svg/toolbar/style_change_button.svg +47 -0
  896. package/lib/assets/img/svg/toolbar/take_picture.svg +75 -0
  897. package/lib/assets/img/svg/toolbar/undo_button.svg +76 -0
  898. package/lib/assets/img/svg/toolbar/undo_button1.svg +76 -0
  899. package/lib/assets/img/svg/toolbar/use_button.svg +37 -0
  900. package/lib/assets/img/svg/toolbar/wall_color_icon.svg +6 -0
  901. package/lib/assets/img/svg/topbar/edit_active.svg +10 -0
  902. package/lib/assets/img/svg/topbar/edit_inactive.svg +10 -0
  903. package/lib/assets/img/svg/topbar/redo_active.svg +42 -0
  904. package/lib/assets/img/svg/topbar/redo_inactive.svg +23 -0
  905. package/lib/assets/img/svg/topbar/select_all_active.svg +50 -0
  906. package/lib/assets/img/svg/topbar/select_all_inactive.svg +32 -0
  907. package/lib/assets/img/svg/topbar/take_picture_active.svg +51 -0
  908. package/lib/assets/img/svg/topbar/take_picture_inactive.svg +26 -0
  909. package/lib/assets/img/svg/topbar/undo_active.svg +42 -0
  910. package/lib/assets/img/svg/topbar/undo_inactive.svg +23 -0
  911. package/lib/assets/img/svg/warning_info_2d.svg +81 -0
  912. package/lib/assets/img/svg/window/Clear.svg +3 -0
  913. package/lib/assets/img/svg/window/Cross.svg +5 -0
  914. package/lib/assets/img/svg/window/Double_hung.svg +4 -0
  915. package/lib/assets/img/svg/window/Vertical.svg +4 -0
  916. package/lib/assets/img/svg/windows_clear.svg +23 -0
  917. package/lib/assets/img/svg/windows_cross.svg +28 -0
  918. package/lib/assets/img/svg/windows_double_hung.svg +24 -0
  919. package/lib/assets/img/svg/windows_vertical.svg +24 -0
  920. package/lib/assets/img/svg/wizardstep/Custom.svg +3 -0
  921. package/lib/assets/img/svg/wizardstep/Dashed_line.svg +3 -0
  922. package/lib/assets/img/svg/wizardstep/L.svg +3 -0
  923. package/lib/assets/img/svg/wizardstep/L2.svg +3 -0
  924. package/lib/assets/img/svg/wizardstep/Open.svg +3 -0
  925. package/lib/assets/img/svg/wizardstep/Square.svg +3 -0
  926. package/lib/assets/img/svg/wizardstep/bar-active.svg +9 -0
  927. package/lib/assets/img/svg/wizardstep/bar-normal.svg +3 -0
  928. package/lib/assets/img/svg/wizardstep/bullet-current.svg +3 -0
  929. package/lib/assets/img/svg/wizardstep/bullet-done.svg +3 -0
  930. package/lib/assets/img/svg/wizardstep/bullet-not-done.svg +3 -0
  931. package/lib/assets/img/svg/wizardstep/check-active.svg +3 -0
  932. package/lib/assets/img/svg/wizardstep/check-normal.svg +3 -0
  933. package/lib/assets/img/svg/wizardstep/detail_view.svg +87 -0
  934. package/lib/assets/img/svg/wizardstep/pencil.svg +11 -0
  935. package/lib/assets/img/svg/wizardstep/tile_view.svg +95 -0
  936. package/lib/assets/img/texture/glass.jpg +0 -0
  937. package/lib/assets/img/texture/steel.jpg +0 -0
  938. package/lib/assets/img/texture/white1px.jpg +0 -0
  939. package/lib/assets/img/texture/wood.jpg +0 -0
  940. package/lib/assets/model/DCM.bin +0 -0
  941. package/lib/assets/model/DCM.fbx +0 -0
  942. package/lib/assets/model/DCM.gltf +1 -0
  943. package/lib/assets/model/FBM.bin +0 -0
  944. package/lib/assets/model/FBM.fbx +0 -0
  945. package/lib/assets/model/FBM.gltf +1 -0
  946. package/lib/assets/model/LRM.bin +0 -0
  947. package/lib/assets/model/LRM.fbx +0 -0
  948. package/lib/assets/model/LRM.gltf +1 -0
  949. package/lib/assets/rtastore_logo.png +0 -0
  950. package/lib/catalog/areas/area/planner-element.js +53 -0
  951. package/lib/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
  952. package/lib/catalog/areas/area/textures/grass.jpg +0 -0
  953. package/lib/catalog/areas/area/textures/parquet.jpg +0 -0
  954. package/lib/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
  955. package/lib/catalog/areas/area/textures/tile1.jpg +0 -0
  956. package/lib/catalog/back.png +0 -0
  957. package/lib/catalog/catalog.js +272 -0
  958. package/lib/catalog/doors.png +0 -0
  959. package/lib/catalog/doorways.png +0 -0
  960. package/lib/catalog/envMap/nx.hdr +0 -0
  961. package/lib/catalog/envMap/ny.hdr +0 -0
  962. package/lib/catalog/envMap/nz.hdr +0 -0
  963. package/lib/catalog/envMap/px.hdr +0 -0
  964. package/lib/catalog/envMap/py.hdr +0 -0
  965. package/lib/catalog/envMap/pz.hdr +0 -0
  966. package/lib/catalog/export.js +1 -0
  967. package/lib/catalog/factories/area-factory-3d.js +190 -0
  968. package/lib/catalog/factories/area-factory.js +88 -0
  969. package/lib/catalog/factories/export.js +25 -0
  970. package/lib/catalog/factories/wall-factory-3d.js +212 -0
  971. package/lib/catalog/factories/wall-factory.js +279 -0
  972. package/lib/catalog/holes/door-closet/planner-element.js +232 -0
  973. package/lib/catalog/holes/door-double/door_double.png +0 -0
  974. package/lib/catalog/holes/door-double/planner-element.js +325 -0
  975. package/lib/catalog/holes/door-exterior/planner-element.js +225 -0
  976. package/lib/catalog/holes/door-interior/planner-element.js +237 -0
  977. package/lib/catalog/holes/door-panic/panicDoor.png +0 -0
  978. package/lib/catalog/holes/door-panic/planner-element.js +513 -0
  979. package/lib/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
  980. package/lib/catalog/holes/door-panic-double/planner-element.js +473 -0
  981. package/lib/catalog/holes/door-sliding/planner-element.js +235 -0
  982. package/lib/catalog/holes/doorway-framed/planner-element.js +155 -0
  983. package/lib/catalog/holes/doorway-frameless/planner-element.js +114 -0
  984. package/lib/catalog/holes/export.js +97 -0
  985. package/lib/catalog/holes/gate/gate.jpg +0 -0
  986. package/lib/catalog/holes/window-clear/planner-element.js +176 -0
  987. package/lib/catalog/holes/window-clear/texture.png +0 -0
  988. package/lib/catalog/holes/window-cross/planner-element.js +175 -0
  989. package/lib/catalog/holes/window-cross/texture.png +0 -0
  990. package/lib/catalog/holes/window-double-hung/planner-element.js +313 -0
  991. package/lib/catalog/holes/window-double-hung/texture.png +0 -0
  992. package/lib/catalog/holes/window-vertical/planner-element.js +286 -0
  993. package/lib/catalog/holes/window-vertical/texture.png +0 -0
  994. package/lib/catalog/lines/wall/planner-element.js +87 -0
  995. package/lib/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
  996. package/lib/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
  997. package/lib/catalog/lines/wall/textures/bricks.jpg +0 -0
  998. package/lib/catalog/lines/wall/textures/bricks2.jpg +0 -0
  999. package/lib/catalog/lines/wall/textures/bricks3.jpg +0 -0
  1000. package/lib/catalog/lines/wall/textures/morden-normal.jpg +0 -0
  1001. package/lib/catalog/lines/wall/textures/morden.jpg +0 -0
  1002. package/lib/catalog/lines/wall/textures/painted-normal.jpg +0 -0
  1003. package/lib/catalog/lines/wall/textures/painted.jpg +0 -0
  1004. package/lib/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
  1005. package/lib/catalog/lines/wall/textures/plaster.jpg +0 -0
  1006. package/lib/catalog/lines/wall/wall.png +0 -0
  1007. package/lib/catalog/molding/molding-dcm/planner-element.js +33 -0
  1008. package/lib/catalog/molding/molding-dcm/texture.png +0 -0
  1009. package/lib/catalog/molding/molding-fbm/planner-element.js +33 -0
  1010. package/lib/catalog/molding/molding-fbm/texture.png +0 -0
  1011. package/lib/catalog/molding/molding-lrm/planner-element.js +33 -0
  1012. package/lib/catalog/molding/molding-lrm/texture.png +0 -0
  1013. package/lib/catalog/properties/export.js +81 -0
  1014. package/lib/catalog/properties/property-checkbox.js +76 -0
  1015. package/lib/catalog/properties/property-color.js +47 -0
  1016. package/lib/catalog/properties/property-enum.js +58 -0
  1017. package/lib/catalog/properties/property-hidden.js +27 -0
  1018. package/lib/catalog/properties/property-lenght-measure.js +108 -0
  1019. package/lib/catalog/properties/property-length-measure.js +92 -0
  1020. package/lib/catalog/properties/property-length-measure_hole.js +108 -0
  1021. package/lib/catalog/properties/property-number.js +56 -0
  1022. package/lib/catalog/properties/property-read-only.js +34 -0
  1023. package/lib/catalog/properties/property-string.js +56 -0
  1024. package/lib/catalog/properties/property-toggle.js +47 -0
  1025. package/lib/catalog/properties/shared-property-style.js +21 -0
  1026. package/lib/catalog/utils/FuseUtils.js +87 -0
  1027. package/lib/catalog/utils/exporter.js +157 -0
  1028. package/lib/catalog/utils/geom-utils.js +205 -0
  1029. package/lib/catalog/utils/item-loader.js +1608 -0
  1030. package/lib/catalog/utils/load-obj.js +99 -0
  1031. package/lib/catalog/utils/mtl-loader.js +366 -0
  1032. package/lib/catalog/utils/obj-loader.js +486 -0
  1033. package/lib/catalog/windows.png +0 -0
  1034. package/lib/class/FuseUtils.js +87 -0
  1035. package/lib/class/area.js +148 -0
  1036. package/lib/class/export.js +96 -0
  1037. package/lib/class/group.js +438 -0
  1038. package/lib/class/guide.js +64 -0
  1039. package/lib/class/hole.js +932 -0
  1040. package/lib/class/item.js +1852 -0
  1041. package/lib/class/layer.js +670 -0
  1042. package/lib/class/line.js +1230 -0
  1043. package/lib/class/project.js +804 -0
  1044. package/lib/class/vertex.js +205 -0
  1045. package/lib/components/content.js +142 -0
  1046. package/lib/components/export.js +7 -0
  1047. package/lib/components/style/button.js +115 -0
  1048. package/lib/components/style/cancel-button.js +29 -0
  1049. package/lib/components/style/content-container.js +38 -0
  1050. package/lib/components/style/content-title.js +35 -0
  1051. package/lib/components/style/delete-button.js +34 -0
  1052. package/lib/components/style/export.js +121 -0
  1053. package/lib/components/style/form-block.js +28 -0
  1054. package/lib/components/style/form-color-input.js +34 -0
  1055. package/lib/components/style/form-label.js +30 -0
  1056. package/lib/components/style/form-number-input.js +192 -0
  1057. package/lib/components/style/form-number-input_2.js +209 -0
  1058. package/lib/components/style/form-select.js +29 -0
  1059. package/lib/components/style/form-slider.js +68 -0
  1060. package/lib/components/style/form-submit-button.js +35 -0
  1061. package/lib/components/style/form-text-input.js +78 -0
  1062. package/lib/components/viewer2d/area.js +89 -0
  1063. package/lib/components/viewer2d/export.js +121 -0
  1064. package/lib/components/viewer2d/grids/grid-horizontal-streak.js +44 -0
  1065. package/lib/components/viewer2d/grids/grid-streak.js +44 -0
  1066. package/lib/components/viewer2d/grids/grid-vertical-streak.js +44 -0
  1067. package/lib/components/viewer2d/grids/grids.js +40 -0
  1068. package/lib/components/viewer2d/group.js +63 -0
  1069. package/lib/components/viewer2d/item.js +457 -0
  1070. package/lib/components/viewer2d/layer.js +172 -0
  1071. package/lib/components/viewer2d/line.js +975 -0
  1072. package/lib/components/viewer2d/ruler.js +87 -0
  1073. package/lib/components/viewer2d/rulerDist.js +140 -0
  1074. package/lib/components/viewer2d/rulerX.js +154 -0
  1075. package/lib/components/viewer2d/rulerY.js +156 -0
  1076. package/lib/components/viewer2d/scene.js +137 -0
  1077. package/lib/components/viewer2d/snap.js +84 -0
  1078. package/lib/components/viewer2d/state.js +83 -0
  1079. package/lib/components/viewer2d/utils.js +200 -0
  1080. package/lib/components/viewer2d/vertex.js +75 -0
  1081. package/lib/components/viewer2d/viewer2d.js +1444 -0
  1082. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +2591 -0
  1083. package/lib/components/viewer3d/dcm.js +408 -0
  1084. package/lib/components/viewer3d/fbm.js +421 -0
  1085. package/lib/components/viewer3d/front3D.js +71 -0
  1086. package/lib/components/viewer3d/grid-creator.js +35 -0
  1087. package/lib/components/viewer3d/grids/grid-horizontal-streak.js +45 -0
  1088. package/lib/components/viewer3d/grids/grid-streak.js +36 -0
  1089. package/lib/components/viewer3d/grids/grid-vertical-streak.js +45 -0
  1090. package/lib/components/viewer3d/libs/first-person-controls.js +74 -0
  1091. package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js +1287 -0
  1092. package/lib/components/viewer3d/libs/mtl-loader.js +366 -0
  1093. package/lib/components/viewer3d/libs/obj-loader.js +471 -0
  1094. package/lib/components/viewer3d/libs/orbit-controls.js +706 -0
  1095. package/lib/components/viewer3d/libs/pointer-lock-controls.js +53 -0
  1096. package/lib/components/viewer3d/lrm.js +312 -0
  1097. package/lib/components/viewer3d/model.js +714 -0
  1098. package/lib/components/viewer3d/pointer-lock-navigation.js +122 -0
  1099. package/lib/components/viewer3d/ruler-utils/itemRect.js +69 -0
  1100. package/lib/components/viewer3d/ruler-utils/layer3D.js +503 -0
  1101. package/lib/components/viewer3d/ruler-utils/ruler3D.js +232 -0
  1102. package/lib/components/viewer3d/ruler-utils/scene3D.js +67 -0
  1103. package/lib/components/viewer3d/ruler-utils/state3D.js +26 -0
  1104. package/lib/components/viewer3d/scene-creator.js +3652 -0
  1105. package/lib/components/viewer3d/three-memory-cleaner.js +60 -0
  1106. package/lib/components/viewer3d/viewer3d-first-person.js +316 -0
  1107. package/lib/components/viewer3d/viewer3d.js +2661 -0
  1108. package/lib/constants.js +697 -0
  1109. package/lib/devLiteRenderer.js +320 -0
  1110. package/lib/index.js +64 -0
  1111. package/lib/models.js +513 -0
  1112. package/lib/plugins/SVGLoader.js +1417 -0
  1113. package/lib/plugins/console-debugger.js +42 -0
  1114. package/lib/plugins/export.js +25 -0
  1115. package/lib/plugins/keyboard.js +108 -0
  1116. package/lib/reducers/areas-reducer.js +19 -0
  1117. package/lib/reducers/export.js +97 -0
  1118. package/lib/reducers/groups-reducer.js +45 -0
  1119. package/lib/reducers/holes-reducer.js +69 -0
  1120. package/lib/reducers/items-reducer.js +151 -0
  1121. package/lib/reducers/lines-reducer.js +52 -0
  1122. package/lib/reducers/project-reducer.js +138 -0
  1123. package/lib/reducers/reducer.js +26 -0
  1124. package/lib/reducers/scene-reducer.js +35 -0
  1125. package/lib/reducers/user-reducer.js +48 -0
  1126. package/lib/reducers/vertices-reducer.js +26 -0
  1127. package/lib/reducers/viewer2d-reducer.js +82 -0
  1128. package/lib/reducers/viewer3d-reducer.js +63 -0
  1129. package/lib/shared-style.js +72 -0
  1130. package/lib/styles/export.js +13 -0
  1131. package/lib/styles/tabs.css +40 -0
  1132. package/lib/translator/en.js +111 -0
  1133. package/lib/translator/it.js +86 -0
  1134. package/lib/translator/ru.js +86 -0
  1135. package/lib/translator/translator.js +87 -0
  1136. package/lib/utils/browser.js +40 -0
  1137. package/lib/utils/convert-units-lite.js +35 -0
  1138. package/lib/utils/email-validator.js +10 -0
  1139. package/lib/utils/export.js +56 -0
  1140. package/lib/utils/geometry.js +2545 -0
  1141. package/lib/utils/get-edges-of-subgraphs.js +33 -0
  1142. package/lib/utils/graph-cycles.js +239 -0
  1143. package/lib/utils/graph-inner-cycles.js +54 -0
  1144. package/lib/utils/graph.js +153 -0
  1145. package/lib/utils/helper.js +358 -0
  1146. package/lib/utils/history.js +36 -0
  1147. package/lib/utils/id-broker.js +22 -0
  1148. package/lib/utils/isolate-event-handler.js +691 -0
  1149. package/lib/utils/logger.js +14 -0
  1150. package/lib/utils/math.js +57 -0
  1151. package/lib/utils/molding.js +890 -0
  1152. package/lib/utils/name-generator.js +21 -0
  1153. package/lib/utils/objects-utils.js +62 -0
  1154. package/lib/utils/phone-validator.js +10 -0
  1155. package/lib/utils/process-black-list.js +22 -0
  1156. package/lib/utils/react-if.js +25 -0
  1157. package/lib/utils/snap-scene.js +101 -0
  1158. package/lib/utils/snap.js +245 -0
  1159. package/lib/utils/summarizeCart.js +30 -0
  1160. package/lib/utils/threeCSG.es6.js +504 -0
  1161. package/lib/version.js +7 -0
  1162. package/package.json +93 -86
  1163. package/dist/index.js +0 -3
  1164. package/dist/index.js.LICENSE.txt +0 -55
  1165. package/dist/index.js.map +0 -1
@@ -0,0 +1,1845 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ import { convert } from "../utils/convert-units-lite";
8
+ import { Group, Hole, Layer } from "./export";
9
+ import { GeometryUtils, IDBroker, MoldingUtils, NameGenerator } from "../utils/export";
10
+ import { fromJS, Map } from 'immutable';
11
+ import { INSTALLATION_SUFFIX_TYPE, MODE_DRAGGING_ITEM, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM, MODE_ROTATING_ITEM_3D, MOLDING_LOCATIONS } from "../constants";
12
+ import { debugUtil } from "../utils/helper";
13
+ import { isUndefined } from 'util';
14
+ import { hasMoldingLayout } from "../utils/molding";
15
+ import { getInstallationSuffix } from "../components/viewer2d/utils";
16
+ var allItemRect;
17
+ var allItemSnap;
18
+ var allLines;
19
+ var allLineRects;
20
+ var allLineSnap;
21
+ var allRect;
22
+ var time1;
23
+ var time2;
24
+ var Item = /*#__PURE__*/function () {
25
+ function Item() {
26
+ _classCallCheck(this, Item);
27
+ }
28
+ return _createClass(Item, null, [{
29
+ key: "create",
30
+ value: function create(state, layerID, type, x, y, width, height, rotation, isDuplication) {
31
+ var molding = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : [];
32
+ var itemID = IDBroker.acquireID();
33
+ var item = state.catalog.factoryElement(type, {
34
+ id: itemID,
35
+ itemID: state.catalog.getIn(['elements', type, 'itemID']),
36
+ name: NameGenerator.generateName('items', state.catalog.getIn(['elements', type, 'info', 'title'])),
37
+ sku_number: state.catalog.getIn(['elements', type, 'obj']).toJS().sku_number,
38
+ //style: state.catalog.getIn(['elements', type, 'info', 'door']),
39
+ category: state.catalog.getIn(['elements', type, 'type']),
40
+ layoutpos: state.catalog.getIn(['elements', type, 'info', 'layoutpos']),
41
+ cabinet_category: state.catalog.getIn(['elements', type, 'obj']).toJS().cabinet_category,
42
+ type: type,
43
+ height: height,
44
+ width: width,
45
+ x: x,
46
+ y: y,
47
+ rotation: rotation,
48
+ isDuplication: isDuplication
49
+ }, null, state);
50
+ if (item.category === 'cabinet') {
51
+ var _state$doorStyle;
52
+ var layer = state.getIn(['scene', 'layers', layerID]);
53
+ var temp = layer.doorStyle || ((_state$doorStyle = state.doorStyle) === null || _state$doorStyle === void 0 ? void 0 : _state$doorStyle.toJS());
54
+ var cds = state.catalog.getIn(['elements', type, 'cds']);
55
+ if (cds) {
56
+ var updatedDoorStyles = _objectSpread(_objectSpread({}, temp.doorStyles), {}, {
57
+ cds: [cds]
58
+ });
59
+ item = item.merge({
60
+ doorStyle: fromJS(_objectSpread(_objectSpread({}, temp), {}, {
61
+ doorStyles: updatedDoorStyles
62
+ }))
63
+ });
64
+ }
65
+ }
66
+ if (item.get('type') === 'cabinet' && item.get('doorStyle').size === 0) {
67
+ return {
68
+ updatedState: state,
69
+ item: null
70
+ };
71
+ }
72
+ var setSizeOfItemByDoorStyle = function setSizeOfItemByDoorStyle() {
73
+ var doorStyle = item.get('doorStyle').toJS();
74
+ var euroCDS = state.catalog.getIn(['elements', type, 'customer_property']).is_euro_cds;
75
+ if (doorStyle.door_style_name === 'Euro & Frameless' && euroCDS.length > 0) {
76
+ var newProperties = item.get('properties').toJS();
77
+ if (newProperties.hasOwnProperty('depth')) {
78
+ if (!newProperties.hasOwnProperty('oldDepth')) {
79
+ newProperties['oldDepth'] = new Map({
80
+ length: newProperties.depth.length,
81
+ _length: newProperties.depth._length,
82
+ _unit: newProperties.depth._unit
83
+ });
84
+ }
85
+ newProperties['depth'] = new Map({
86
+ length: convert(euroCDS[0].euro_length).from('in').to('cm'),
87
+ _length: euroCDS[0].euro_length,
88
+ _unit: 'in'
89
+ });
90
+ }
91
+ if (newProperties.hasOwnProperty('height')) {
92
+ if (!newProperties.hasOwnProperty('oldHeight')) {
93
+ newProperties['oldHeight'] = new Map({
94
+ length: newProperties.height.length,
95
+ _length: newProperties.height._length,
96
+ _unit: newProperties.height._unit
97
+ });
98
+ }
99
+ newProperties['height'] = new Map({
100
+ length: convert(euroCDS[0].euro_height).from('in').to('cm'),
101
+ _length: euroCDS[0].euro_height,
102
+ _unit: 'in'
103
+ });
104
+ }
105
+ if (newProperties.hasOwnProperty('width')) {
106
+ if (!newProperties.hasOwnProperty('oldWidth')) {
107
+ newProperties['oldWidth'] = new Map({
108
+ length: newProperties.width.length,
109
+ _length: newProperties.width._length,
110
+ _unit: newProperties.width._unit
111
+ });
112
+ }
113
+ newProperties['width'] = new Map({
114
+ length: convert(euroCDS[0].euro_width).from('in').to('cm') - 10,
115
+ _length: euroCDS[0].euro_width,
116
+ _unit: 'in'
117
+ });
118
+ }
119
+ item = item.merge({
120
+ properties: fromJS(newProperties)
121
+ });
122
+ } else {
123
+ var properties = item.get('properties').toJS();
124
+ if (properties.hasOwnProperty('oldDepth')) {
125
+ properties['depth'] = new Map({
126
+ length: properties.oldDepth.length,
127
+ _length: properties.oldDepth._length,
128
+ _unit: properties.oldDepth._unit
129
+ });
130
+ }
131
+ if (properties.hasOwnProperty('oldHeight')) {
132
+ properties['height'] = new Map({
133
+ length: properties.oldHeight.length,
134
+ _length: properties.oldHeight._length,
135
+ _unit: properties.oldHeight._unit
136
+ });
137
+ }
138
+ if (properties.hasOwnProperty('oldWidth')) {
139
+ properties['width'] = new Map({
140
+ length: properties.oldWidth.length,
141
+ _length: properties.oldWidth._length,
142
+ _unit: properties.oldWidth._unit
143
+ });
144
+ }
145
+ item = item.merge({
146
+ properties: fromJS(properties)
147
+ });
148
+ }
149
+ };
150
+ item.category === 'cabinet' && setSizeOfItemByDoorStyle();
151
+ item = this.updateDoorHandle(item, state.getIn(['scene', 'layers', layerID]));
152
+ state = state.setIn(['scene', 'layers', layerID, 'items', itemID], item);
153
+ if (item.type.includes('Light')) {
154
+ var ceilHeight = state.getIn(['scene', 'layers', layerID, 'ceilHeight']);
155
+ var ceilUnit = state.getIn(['scene', 'layers', layerID, 'unit']);
156
+ ceilHeight = convert(ceilHeight).from(ceilUnit).to('cm');
157
+ var newAltitude = ceilHeight - item.properties.getIn(['height', 'length']);
158
+ newAltitude = convert(newAltitude).from('cm').to(ceilUnit);
159
+ item = item.setIn(['properties', 'altitude', '_length'], newAltitude);
160
+ state = state.setIn(['scene', 'layers', layerID, 'items', item.id], item);
161
+ }
162
+ if (item.category === 'cabinet') {
163
+ // If create a copied object, copied object has original object's molding property.And if create a object, it has a layer's molding property.
164
+ var layerMolding = state.getIn(['scene', 'layers', layerID, 'molding']).filter(function (md) {
165
+ return hasMoldingLayout(md, item.layoutpos);
166
+ });
167
+ state = state.setIn(['scene', 'layers', layerID, 'items', itemID, 'molding'], layerMolding.length ? layerMolding : molding);
168
+ }
169
+ return {
170
+ updatedState: state,
171
+ item: item
172
+ };
173
+ }
174
+ }, {
175
+ key: "updateDoorHandle",
176
+ value: function updateDoorHandle(item, layer) {
177
+ var doorHandle = layer.get('doorHandle');
178
+ if (doorHandle == '') return item;
179
+ var dataJSON = item.toJS();
180
+ var itemID = dataJSON.id;
181
+ var doorStyle = dataJSON.doorStyle;
182
+ var tmpDS = _objectSpread(_objectSpread({}, doorStyle), {}, {
183
+ handle_gltf: doorHandle,
184
+ metalness: 0.2,
185
+ roughness: 0.1
186
+ });
187
+ var cnt = 0;
188
+ for (var prop in doorStyle.doorStyles) cnt++;
189
+ if (cnt !== 0) {
190
+ for (var i = 1; i < 10; i++) {
191
+ tmpDS['doorStyles']['door_handle_' + i + '_gltf'] = doorHandle;
192
+ tmpDS['doorStyles']['fixed_drawer_door_handle_' + i + '_gltf'] = doorHandle;
193
+ tmpDS['doorStyles']['drawer_door_handle_' + i + '_gltf'] = doorHandle;
194
+ }
195
+ }
196
+ item = item.mergeIn(['doorStyle'], fromJS(tmpDS));
197
+ return item;
198
+ }
199
+ }, {
200
+ key: "select",
201
+ value: function select(state, layerID, itemID) {
202
+ state = Layer.select(state, layerID).updatedState;
203
+ state = Layer.selectElement(state, layerID, 'items', itemID).updatedState;
204
+ state = state.merge({
205
+ replacingSupport: new Map({
206
+ layerID: layerID,
207
+ itemID: itemID
208
+ })
209
+ });
210
+ return {
211
+ updatedState: state
212
+ };
213
+ }
214
+ }, {
215
+ key: "selectHole",
216
+ value: function selectHole(state, layerID, holeID) {
217
+ state = Layer.select(state, layerID).updatedState;
218
+ state = Layer.selectElement(state, layerID, 'holes', holeID).updatedState;
219
+ return {
220
+ updatedState: state
221
+ };
222
+ }
223
+ }, {
224
+ key: "editWidth",
225
+ value: function editWidth(state, newWidth, layerID, itemID) {
226
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
227
+ var properties = item.properties;
228
+ if (newWidth === 0) {
229
+ alert('You can not set width to 0');
230
+ return {
231
+ updatedState: state
232
+ };
233
+ }
234
+ var width = new Map({
235
+ _length: newWidth,
236
+ _unit: 'in',
237
+ length: convert(newWidth).from('in').to('cm')
238
+ });
239
+ properties = properties.set('width', width);
240
+ state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'properties'], properties);
241
+ return {
242
+ updatedState: state
243
+ };
244
+ }
245
+ }, {
246
+ key: "prepareSnap",
247
+ value: function prepareSnap(state, layerID) {
248
+ var layer = state.getIn(['scene', 'layers', layerID]);
249
+ var scene = state.get('scene');
250
+ var catalog = state.catalog.toJS();
251
+ allLines = GeometryUtils.getAllLines(layer);
252
+ allLineRects = GeometryUtils.buildRectFromLines(layer, allLines);
253
+ allItemRect = GeometryUtils.getAllItems(scene, catalog, allLineRects);
254
+ allItemSnap = GeometryUtils.getAllItemSnap(allItemRect);
255
+ allLineSnap = GeometryUtils.getAllLineSnap(allLineRects, allItemRect.cur);
256
+ allRect = allItemRect.others.concat(allLineRects);
257
+ allItemSnap = GeometryUtils.validateSnaps(allItemSnap, allRect);
258
+ allLineSnap = GeometryUtils.validateSnaps(allLineSnap, allRect);
259
+ }
260
+ }, {
261
+ key: "duplicateSelected",
262
+ value: function duplicateSelected(state, currentObject) {
263
+ var layerID = state.getIn(['scene', 'selectedLayer']);
264
+ var layer = state.getIn(['scene', 'layers', layerID]);
265
+ var objectID = currentObject.id;
266
+ var myObject;
267
+ var x = currentObject.x;
268
+ var y = currentObject.y;
269
+ var sceneComponentType, width, depth, rotRad;
270
+ switch (currentObject.prototype) {
271
+ case 'items':
272
+ myObject = state.getIn(['scene', 'layers', layerID, 'items', objectID]);
273
+ sceneComponentType = myObject.type;
274
+ width = myObject.properties.getIn(['width', 'length']);
275
+ depth = myObject.properties.getIn(['depth', 'length']);
276
+ rotRad = myObject.rotation * Math.PI / 180;
277
+ this.prepareSnap(state, layerID);
278
+ var val = {
279
+ pos: {
280
+ x: x + width * Math.cos(rotRad),
281
+ y: y + width * Math.sin(rotRad)
282
+ },
283
+ rotRad: rotRad
284
+ };
285
+ val.size = allItemRect.cur.size;
286
+ val.layoutpos = allItemRect.cur.layoutpos;
287
+ val.is_corner = allItemRect.cur.is_corner;
288
+ var isrectSect = GeometryUtils.validInterSect(allRect, val);
289
+ if (isrectSect) {
290
+ // Duplicated object has a original object's molding property
291
+ var _this$create = this.create(state, layerID, sceneComponentType, x + width * Math.cos(rotRad), y + width * Math.sin(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
292
+ stateI = _this$create.updatedState,
293
+ item = _this$create.item;
294
+ if (item === null) {
295
+ alert('There are no Door Colors in this cabinet.');
296
+ state = state.merge({
297
+ mode: MODE_IDLE,
298
+ drawingSupport: new Map()
299
+ });
300
+ } else {
301
+ state = Item.select(stateI, layerID, item.id).updatedState;
302
+ state = state.setIn(['drawingSupport', 'currentID'], item.id);
303
+ }
304
+ } else {
305
+ var _val = {
306
+ pos: {
307
+ x: x - width * Math.cos(rotRad),
308
+ y: y - width * Math.sin(rotRad)
309
+ },
310
+ rotRad: rotRad
311
+ };
312
+ _val.size = allItemRect.cur.size;
313
+ _val.layoutpos = allItemRect.cur.layoutpos;
314
+ _val.is_corner = allItemRect.cur.is_corner;
315
+ var isRect = GeometryUtils.validInterSect(allRect, _val);
316
+ if (isRect) {
317
+ var _this$create2 = this.create(state, layerID, sceneComponentType, x - width * Math.cos(rotRad), y - width * Math.sin(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
318
+ _stateI = _this$create2.updatedState,
319
+ _item = _this$create2.item;
320
+ if (_item === null) {
321
+ alert('There are no Door Colors in this cabinet.');
322
+ state = state.merge({
323
+ mode: MODE_IDLE,
324
+ drawingSupport: new Map()
325
+ });
326
+ } else {
327
+ state = Item.select(_stateI, layerID, _item.id).updatedState;
328
+ state = state.setIn(['drawingSupport', 'currentID'], _item.id);
329
+ }
330
+ } else {
331
+ var _val2 = {
332
+ pos: {
333
+ x: x - depth * Math.sin(rotRad),
334
+ y: y - depth * Math.cos(rotRad)
335
+ },
336
+ rotRad: rotRad
337
+ };
338
+ _val2.size = allItemRect.cur.size;
339
+ _val2.layoutpos = allItemRect.cur.layoutpos;
340
+ _val2.is_corner = allItemRect.cur.is_corner;
341
+ var isRectDown = GeometryUtils.validInterSect(allRect, _val2);
342
+ if (isRectDown) {
343
+ var _this$create3 = this.create(state, layerID, sceneComponentType, x - depth * Math.sin(rotRad), y - depth * Math.cos(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
344
+ _stateI2 = _this$create3.updatedState,
345
+ _item2 = _this$create3.item;
346
+ if (_item2 === null) {
347
+ alert('There are no Door Colors in this cabinet.');
348
+ state = state.merge({
349
+ mode: MODE_IDLE,
350
+ drawingSupport: new Map()
351
+ });
352
+ } else {
353
+ state = Item.select(_stateI2, layerID, _item2.id).updatedState;
354
+ state = state.setIn(['drawingSupport', 'currentID'], _item2.id);
355
+ }
356
+ } else {
357
+ var _val3 = {
358
+ pos: {
359
+ x: x + depth * Math.sin(rotRad),
360
+ y: y + depth * Math.cos(rotRad)
361
+ },
362
+ rotRad: rotRad
363
+ };
364
+ _val3.size = allItemRect.cur.size;
365
+ _val3.layoutpos = allItemRect.cur.layoutpos;
366
+ _val3.is_corner = allItemRect.cur.is_corner;
367
+ var isRectUp = GeometryUtils.validInterSect(allRect, _val3);
368
+ if (isRectUp) {
369
+ var _this$create4 = this.create(state, layerID, sceneComponentType, x + depth * Math.sin(rotRad), y + depth * Math.cos(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
370
+ _stateI3 = _this$create4.updatedState,
371
+ _item3 = _this$create4.item;
372
+ if (_item3 === null) {
373
+ alert('There are no Door Colors in this cabinet.');
374
+ state = state.merge({
375
+ mode: MODE_IDLE,
376
+ drawingSupport: new Map()
377
+ });
378
+ } else {
379
+ state = Item.select(_stateI3, layerID, _item3.id).updatedState;
380
+ state = state.setIn(['drawingSupport', 'currentID'], _item3.id);
381
+ }
382
+ } else {
383
+ console.log('there is no space');
384
+ alert('No more space!');
385
+ }
386
+ }
387
+ }
388
+ }
389
+ break;
390
+ case 'holes':
391
+ this.prepareSnap(state, layerID);
392
+ myObject = state.getIn(['scene', 'layers', layerID, 'holes', objectID]);
393
+ var line = state.getIn(['scene', 'layers', layerID, 'lines', myObject.line]);
394
+ sceneComponentType = myObject.type;
395
+ width = myObject.get('properties').get('width').get('length');
396
+ var myOffset = myObject.offset;
397
+ var v0 = layer.getIn(['vertices', line.vertices.get(0)]);
398
+ var v1 = layer.getIn(['vertices', line.vertices.get(1)]);
399
+ var lineLength = GeometryUtils.pointsDistance(v0.x, v0.y, v1.x, v1.y);
400
+ var delta = width / 2 / lineLength + 0.00001;
401
+ var allHoles = state.getIn(['scene', 'layers', layerID, 'holes']);
402
+ var rightAble = true;
403
+ var leftAble = true;
404
+ if (myOffset + 3 * delta > 1) rightAble = false;else if (myOffset - 3 * delta < 0) leftAble = false;
405
+ if (allHoles.size === 0) {
406
+ var _this$createHole = this.createHole(state, layerID, sceneComponentType, myObject.line, myOffset + delta * 2, myObject.get('properties')),
407
+ stateH = _this$createHole.updatedState,
408
+ hole = _this$createHole.hole;
409
+ state = this.selectHole(stateH, layerID, hole.id).updatedState;
410
+ state = state.setIn(['drawingSupport', 'currentID'], hole.id);
411
+ } else {
412
+ allHoles.forEach(function (hole) {
413
+ if (hole.line === line.id) if (!hole.selected) {
414
+ var newDelta = hole.get('properties').get('width').get('length') / 2 / lineLength;
415
+ if (myOffset < hole.offset) {
416
+ if (myOffset + delta * 3 > hole.offset - newDelta) {
417
+ rightAble = false;
418
+ }
419
+ } else {
420
+ if (myOffset - delta * 3 < hole.offset + newDelta) {
421
+ leftAble = false;
422
+ }
423
+ }
424
+ }
425
+ });
426
+ }
427
+ if (rightAble) {
428
+ var _this$createHole2 = this.createHole(state, layerID, sceneComponentType, myObject.line, myOffset + delta * 2, myObject.get('properties')),
429
+ _stateH = _this$createHole2.updatedState,
430
+ _hole = _this$createHole2.hole;
431
+ state = this.selectHole(_stateH, layerID, _hole.id).updatedState;
432
+ state = state.setIn(['drawingSupport', 'currentID'], _hole.id);
433
+ } else {
434
+ if (leftAble) {
435
+ var _this$createHole3 = this.createHole(state, layerID, sceneComponentType, myObject.line, myOffset - delta * 2, myObject.get('properties')),
436
+ _stateH2 = _this$createHole3.updatedState,
437
+ _hole2 = _this$createHole3.hole;
438
+ state = this.selectHole(_stateH2, layerID, _hole2.id).updatedState;
439
+ state = state.setIn(['drawingSupport', 'currentID'], _hole2.id);
440
+ } else alert('No more space');
441
+ }
442
+ break;
443
+ case 'lines':
444
+ alert('Duplicating lines is not currently supported yet.');
445
+ break;
446
+ default:
447
+ break;
448
+ }
449
+ return {
450
+ updatedState: state
451
+ };
452
+ }
453
+ }, {
454
+ key: "storeDistArray",
455
+ value: function storeDistArray(state, layerID, itemID, distArray) {
456
+ var curDistArray = state.getIn(['scene', 'layers', layerID, 'items', itemID, 'distArray']);
457
+ var isEqualDist = function isEqualDist(a, b) {
458
+ return a == b;
459
+ };
460
+ if (curDistArray) {
461
+ var equal = curDistArray.every(function (curElement, index) {
462
+ return isEqualDist(curElement[0], distArray[index][0]);
463
+ });
464
+ if (!equal) {
465
+ state = state.setIn(['scene', 'layers', layerID, 'items', itemID, 'distArray'], distArray);
466
+ }
467
+ }
468
+ return {
469
+ updatedState: state
470
+ };
471
+ }
472
+ }, {
473
+ key: "validateItemPositions",
474
+ value: function validateItemPositions(state, layerID) {
475
+ var _this = this;
476
+ var layer = state.getIn(['scene', 'layers', layerID]);
477
+ function isItemInRect(item) {
478
+ var _state$getIn = state.getIn(['scene']),
479
+ width = _state$getIn.width,
480
+ height = _state$getIn.height;
481
+ return item.x >= 0 && item.x <= width && item.y >= 0 && item.y <= height;
482
+ }
483
+ layer.items.forEach(function (item) {
484
+ if (!isItemInRect(item)) state = _this.remove(state, layerID, item.id).updatedState;
485
+ });
486
+ return {
487
+ updatedState: state
488
+ };
489
+ }
490
+ }, {
491
+ key: "remove",
492
+ value: function remove(state, layerID, itemID) {
493
+ state = this.unselect(state, layerID, itemID).updatedState;
494
+ state = Layer.removeElement(state, layerID, 'items', itemID).updatedState;
495
+ state.getIn(['scene', 'groups']).forEach(function (group) {
496
+ return state = Group.removeElement(state, group.id, layerID, 'items', itemID).updatedState;
497
+ });
498
+ return {
499
+ updatedState: state
500
+ };
501
+ }
502
+ }, {
503
+ key: "replaceItem",
504
+ value: function replaceItem(state, selectedPos, currentObject, selectedObject) {
505
+ state = this.remove(state, state.scene.selectedLayer, selectedPos.selectedItemId).updatedState;
506
+ state = this.create(state, state.scene.selectedLayer, selectedObject.name, selectedPos.x, selectedPos.y, selectedObject.info.width, selectedObject.info.height, selectedPos.rotation, false).updatedState;
507
+ // state = this.select(state, state.scene.selectedLayer, selectedPos.selectedItemId).updatedState;
508
+ return {
509
+ updatedState: state
510
+ };
511
+ }
512
+ }, {
513
+ key: "unselect",
514
+ value: function unselect(state, layerID, itemID) {
515
+ state = Layer.unselect(state, layerID, 'items', itemID).updatedState;
516
+ return {
517
+ updatedState: state
518
+ };
519
+ }
520
+ }, {
521
+ key: "selectToolDrawingItem",
522
+ value: function selectToolDrawingItem(state, sceneComponentType) {
523
+ state = state.merge({
524
+ mode: MODE_DRAWING_ITEM,
525
+ drawingSupport: new Map({
526
+ type: sceneComponentType
527
+ })
528
+ });
529
+ return {
530
+ updatedState: state
531
+ };
532
+ }
533
+ }, {
534
+ key: "selectToolDrawingItem3D",
535
+ value: function selectToolDrawingItem3D(state, sceneComponentType) {
536
+ state = state.merge({
537
+ mode: MODE_DRAWING_ITEM_3D,
538
+ drawingSupport: new Map({
539
+ type: sceneComponentType
540
+ })
541
+ });
542
+ state = state.mergeIn(['scene', 'loadFlag'], false);
543
+
544
+ // place the item at random position
545
+ var layerID = state.scene.get('selectedLayer');
546
+ state = this.updateDrawingItem(state, layerID, 0, 0).updatedState;
547
+ return {
548
+ updatedState: state
549
+ };
550
+ }
551
+ }, {
552
+ key: "endCreatingCabinet",
553
+ value: function endCreatingCabinet(state) {
554
+ state = state.merge({
555
+ isOpen: false,
556
+ openedType: 0
557
+ });
558
+ return {
559
+ updatedState: state
560
+ };
561
+ }
562
+ }, {
563
+ key: "updatePopupOpen",
564
+ value: function updatePopupOpen(state, value) {
565
+ state = state.merge({
566
+ openedType: value
567
+ });
568
+ return {
569
+ updatedState: state
570
+ };
571
+ }
572
+ }, {
573
+ key: "updateDrawingItem",
574
+ value: function updateDrawingItem(state, layerID, x, y) {
575
+ if (state.hasIn(['drawingSupport', 'currentID'])) {
576
+ var mode = state.get('mode');
577
+ if ([MODE_DRAWING_ITEM_3D].includes(mode)) {
578
+ state = state.updateIn(['scene', 'layers', layerID, 'items', state.getIn(['drawingSupport', 'currentID'])], function (item) {
579
+ return item && item.merge({
580
+ x: x,
581
+ y: y
582
+ });
583
+ });
584
+ state = state.merge({
585
+ mode: MODE_IDLE_3D
586
+ });
587
+ }
588
+ if ([MODE_DRAWING_ITEM].includes(mode)) {
589
+ state = state.merge({
590
+ mode: MODE_IDLE
591
+ });
592
+ state = state.updateIn(['scene', 'layers', layerID, 'items', state.getIn(['drawingSupport', 'currentID'])], function (item) {
593
+ return item && item.merge({
594
+ x: x,
595
+ y: y
596
+ });
597
+ });
598
+ }
599
+ } else {
600
+ var _this$create5 = this.create(state, layerID, state.getIn(['drawingSupport', 'type']), x, y, 200, 100, 0, false),
601
+ stateI = _this$create5.updatedState,
602
+ item = _this$create5.item;
603
+ if (item === null) {
604
+ alert('There are no Door Colors in this cabinet.');
605
+ state = state.merge({
606
+ mode: MODE_IDLE,
607
+ drawingSupport: new Map()
608
+ });
609
+ } else {
610
+ state = Item.select(stateI, layerID, item.id).updatedState;
611
+ state = state.setIn(['drawingSupport', 'currentID'], item.id);
612
+ }
613
+ }
614
+ return {
615
+ updatedState: state
616
+ };
617
+ }
618
+ }, {
619
+ key: "updateDraggingItemChanged",
620
+ value: function updateDraggingItemChanged(state, x, y, layerID, itemID) {
621
+ var _state = state,
622
+ scene = _state.scene;
623
+ // let originalX = draggingSupport.get('originalX');
624
+ // let originalY = draggingSupport.get('originalY');
625
+
626
+ // let diffX = x;
627
+ // let diffY = y;
628
+
629
+ var item = scene.getIn(['layers', layerID, 'items', itemID]);
630
+ // let tX = originalX - diffX;
631
+ // let tY = originalY - diffY;
632
+ // tX = tX > 500 ? 500 : tX < 0 ? 0 : tX;
633
+ // tY = tY > 500 ? 500 : tY < 0 ? 0 : tY;
634
+ item = item.merge({
635
+ x: x,
636
+ y: y
637
+ });
638
+ state = state.merge({
639
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
640
+ });
641
+ time2 = debugUtil();
642
+ false && console.log('FPS:', Math.round(1000 / (time2 - time1)), ' Delta Time:', (time2 - time1) / 1000, '(s)');
643
+ return {
644
+ updatedState: state
645
+ };
646
+ }
647
+ }, {
648
+ key: "endDrawingItem",
649
+ value: function endDrawingItem(state, layerID, x, y) {
650
+ var catalog = state.catalog;
651
+ state = this.updateDrawingItem(state, layerID, x, y, catalog).updatedState;
652
+ state = Layer.unselectAll(state, layerID).updatedState;
653
+ var popup = state.get('popup');
654
+ state = state.merge({
655
+ drawingSupport: Map({
656
+ type: state.drawingSupport.get('type')
657
+ }),
658
+ isOpen: !popup
659
+ });
660
+ state = Layer.unselectAll(state, layerID).updatedState;
661
+ this.updateMolding(state);
662
+ return {
663
+ updatedState: state
664
+ };
665
+ }
666
+ }, {
667
+ key: "beginDraggingItem",
668
+ value: function beginDraggingItem(state, layerID, itemID, x, y) {
669
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
670
+ time1 = debugUtil();
671
+ if (isUndefined(item)) return;
672
+ state = state.merge({
673
+ mode: MODE_DRAGGING_ITEM,
674
+ draggingSupport: Map({
675
+ layerID: layerID,
676
+ itemID: itemID,
677
+ startPointX: x,
678
+ startPointY: y,
679
+ originalX: item.x,
680
+ originalY: item.y
681
+ })
682
+ });
683
+ return {
684
+ updatedState: state
685
+ };
686
+ }
687
+ }, {
688
+ key: "beginDraggingItem3D",
689
+ value: function beginDraggingItem3D(state, layerID, itemID, x, y) {
690
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
691
+ state = state.setIn(['scene', 'isEndDragging'], false);
692
+ if (isUndefined(item)) return {
693
+ updatedState: state
694
+ };
695
+ state = state.merge({
696
+ mode: MODE_DRAGGING_ITEM_3D,
697
+ draggingSupport: Map({
698
+ layerID: layerID,
699
+ itemID: itemID,
700
+ startPointX: x,
701
+ startPointY: y,
702
+ originalX: item.x,
703
+ originalY: item.y
704
+ })
705
+ });
706
+ return {
707
+ updatedState: state
708
+ };
709
+ }
710
+ }, {
711
+ key: "updateDraggingItem",
712
+ value: function updateDraggingItem(state, x, y) {
713
+ var _state2 = state,
714
+ draggingSupport = _state2.draggingSupport,
715
+ scene = _state2.scene;
716
+ var layerID = draggingSupport.get('layerID');
717
+ var itemID = draggingSupport.get('itemID');
718
+ var startPointX = draggingSupport.get('startPointX');
719
+ var startPointY = draggingSupport.get('startPointY');
720
+ var originalX = draggingSupport.get('originalX');
721
+ var originalY = draggingSupport.get('originalY');
722
+ var diffX = startPointX - x;
723
+ var diffY = startPointY - y;
724
+ var item = scene.getIn(['layers', layerID, 'items', itemID]);
725
+ if (isUndefined(item)) return {
726
+ updatedState: state
727
+ };
728
+ var tX = originalX - diffX;
729
+ var tY = originalY - diffY;
730
+ tX = tX > scene.width ? scene.width : tX < 0 ? 0 : tX;
731
+ tY = tY > scene.height ? scene.height : tY < 0 ? 0 : tY;
732
+ item = item.merge({
733
+ x: tX,
734
+ y: tY
735
+ });
736
+ state = state.merge({
737
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
738
+ });
739
+ return {
740
+ updatedState: state
741
+ };
742
+ }
743
+ }, {
744
+ key: "updateDraggingItem3DX",
745
+ value: function updateDraggingItem3DX(state, x) {
746
+ var _state3 = state,
747
+ draggingSupport = _state3.draggingSupport,
748
+ scene = _state3.scene;
749
+ var layerID = draggingSupport.get('layerID');
750
+ var itemID = draggingSupport.get('itemID');
751
+ var startPointX = draggingSupport.get('startPointX');
752
+ var originalX = draggingSupport.get('originalX');
753
+ var diffX = startPointX - x;
754
+ var item = scene.getIn(['layers', layerID, 'items', itemID]);
755
+ item = item.merge({
756
+ x: originalX - diffX
757
+ });
758
+ state = state.merge({
759
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
760
+ });
761
+ return {
762
+ updatedState: state
763
+ };
764
+ }
765
+ }, {
766
+ key: "updateDraggingItem3DY",
767
+ value: function updateDraggingItem3DY(state, y) {
768
+ var _state4 = state,
769
+ draggingSupport = _state4.draggingSupport,
770
+ scene = _state4.scene;
771
+ var layerID = draggingSupport.get('layerID');
772
+ var itemID = draggingSupport.get('itemID');
773
+ var startPointY = draggingSupport.get('startPointY');
774
+ var originalY = draggingSupport.get('originalY');
775
+ var diffY = startPointY - y;
776
+ var item = scene.getIn(['layers', layerID, 'items', itemID]);
777
+ item = item.merge({
778
+ y: originalY - diffY
779
+ });
780
+ state = state.merge({
781
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
782
+ });
783
+ return {
784
+ updatedState: state
785
+ };
786
+ }
787
+ }, {
788
+ key: "endDraggingItem",
789
+ value: function endDraggingItem(state, x, y) {
790
+ state = this.updateDraggingItem(state, x, y).updatedState;
791
+ state = state.merge({
792
+ mode: MODE_IDLE
793
+ });
794
+ return {
795
+ updatedState: state
796
+ };
797
+ }
798
+ }, {
799
+ key: "endDraggingItem3D",
800
+ value: function endDraggingItem3D(state) {
801
+ // state = this.updateDraggingItem(state, x, y).updatedState;
802
+ state = state.merge({
803
+ mode: MODE_IDLE_3D
804
+ });
805
+ state = state.setIn(['scene', 'isEndDragging'], true);
806
+ return {
807
+ updatedState: state
808
+ };
809
+ }
810
+ }, {
811
+ key: "beginRotatingItem",
812
+ value: function beginRotatingItem(state, layerID, itemID, x, y) {
813
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
814
+ var originRotation = item.get('rotation');
815
+ state = state.merge({
816
+ mode: MODE_ROTATING_ITEM,
817
+ rotatingSupport: Map({
818
+ layerID: layerID,
819
+ itemID: itemID,
820
+ x: x,
821
+ y: y,
822
+ originRotation: originRotation
823
+ })
824
+ });
825
+ return {
826
+ updatedState: state
827
+ };
828
+ }
829
+ }, {
830
+ key: "beginRotatingItem3D",
831
+ value: function beginRotatingItem3D(state, layerID, itemID, x, y) {
832
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
833
+ var originRotation = item.get('rotation');
834
+ state = state.merge({
835
+ mode: MODE_ROTATING_ITEM_3D,
836
+ rotatingSupport: Map({
837
+ layerID: layerID,
838
+ itemID: itemID,
839
+ x: x,
840
+ y: y,
841
+ originRotation: originRotation
842
+ })
843
+ });
844
+ return {
845
+ updatedState: state
846
+ };
847
+ }
848
+ }, {
849
+ key: "updateRotatingItem",
850
+ value: function updateRotatingItem(state, x, y) {
851
+ var _state5 = state,
852
+ rotatingSupport = _state5.rotatingSupport,
853
+ scene = _state5.scene;
854
+ var layerID = rotatingSupport.get('layerID');
855
+ var itemID = rotatingSupport.get('itemID');
856
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
857
+ var origin = {
858
+ x: rotatingSupport.get('x'),
859
+ y: rotatingSupport.get('y'),
860
+ originRotation: rotatingSupport.get('originRotation')
861
+ };
862
+ var newRot = Math.atan2(origin.y - item.y, origin.x - item.x) * 180 / Math.PI + 90;
863
+ var deltaRot = newRot - origin.originRotation;
864
+ var deltaX = x - item.x;
865
+ var deltaY = y - item.y;
866
+ var rotation = Math.atan2(deltaY, deltaX) * 180 / Math.PI + 90;
867
+ rotation -= deltaRot;
868
+ if (-5 < rotation && rotation < 5) rotation = 0;
869
+ if (-95 < rotation && rotation < -85) rotation = -90;
870
+ if (-185 < rotation && rotation < -175) rotation = -180;
871
+ if (85 < rotation && rotation < 95) rotation = 90;
872
+ if (-270 < rotation && rotation < -265) rotation = 90;
873
+ if (175 < rotation && rotation < 185) rotation = 180;
874
+ if (265 < rotation && rotation < 275) rotation = -90;
875
+ item = item.merge({
876
+ rotation: rotation
877
+ });
878
+ state = state.merge({
879
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
880
+ });
881
+ return {
882
+ updatedState: state
883
+ };
884
+ }
885
+ }, {
886
+ key: "updateRotatingItemChanged",
887
+ value: function updateRotatingItemChanged(state, rotation, layerID, itemID) {
888
+ var scene = state.scene;
889
+
890
+ // let originalX = draggingSupport.get('originalX');
891
+ // let originalY = draggingSupport.get('originalY');
892
+
893
+ // let diffX = x;
894
+ // let diffY = y;
895
+
896
+ var item = scene.getIn(['layers', layerID, 'items', itemID]);
897
+ // let tX = originalX - diffX;
898
+ // let tY = originalY - diffY;
899
+ // tX = tX > 500 ? 500 : tX < 0 ? 0 : tX;
900
+ // tY = tY > 500 ? 500 : tY < 0 ? 0 : tY;
901
+ item = item.merge({
902
+ rotation: rotation
903
+ });
904
+ state = state.merge({
905
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
906
+ });
907
+ return {
908
+ updatedState: state
909
+ };
910
+ }
911
+ }, {
912
+ key: "endRotatingItem",
913
+ value: function endRotatingItem(state, x, y) {
914
+ //state = this.updateRotatingItem(state, x, y).updatedState;
915
+ state = state.merge({
916
+ mode: MODE_IDLE
917
+ });
918
+ return {
919
+ updatedState: state
920
+ };
921
+ }
922
+ }, {
923
+ key: "endRotatingItem3D",
924
+ value: function endRotatingItem3D(state, x, y) {
925
+ state = this.updateRotatingItem(state, x, y).updatedState;
926
+ state = state.merge({
927
+ mode: MODE_IDLE_3D
928
+ });
929
+ return {
930
+ updatedState: state
931
+ };
932
+ }
933
+ }, {
934
+ key: "replaceSubmodule",
935
+ value: function replaceSubmodule(state, url) {
936
+ var _state6 = state,
937
+ replacingSupport = _state6.replacingSupport,
938
+ scene = _state6.scene;
939
+ url = 'catalog/texture.png';
940
+ var urlData = url.split('/');
941
+ var newURL = '';
942
+ var addURL = false;
943
+ for (var i = 0; i < urlData.length; i++) {
944
+ if (urlData[i] == '') {
945
+ continue;
946
+ }
947
+ newURL += '/' + urlData[i];
948
+ }
949
+ var layerID = replacingSupport.get('layerID');
950
+ var itemID = replacingSupport.get('itemID');
951
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
952
+ var submodule = [];
953
+ var normalMap = [];
954
+ for (var _i = 0; _i < item.submodule.size; _i++) submodule.push(item.submodule.get(_i));
955
+ for (var _i2 = 0; _i2 < item.normalMap.size; _i2++) normalMap.push(item.normalMap.get(_i2));
956
+ //let submodule = state.getIn(['scene', 'layers', layerID, 'items', itemID, 'submodule']);
957
+ urlData = newURL.split('/');
958
+ var flag = false;
959
+ if (urlData[urlData.length - 1].includes('.gltf')) {
960
+ for (var _i3 = 0; _i3 < submodule.length; _i3++) {
961
+ var pathData = submodule[_i3].split('/');
962
+ if (pathData[pathData.length - 2] === urlData[urlData.length - 2]) {
963
+ submodule[_i3] = newURL;
964
+ flag = true;
965
+ }
966
+ }
967
+ if (!flag) submodule.push(newURL);
968
+ item = item.merge({
969
+ submodule: submodule
970
+ });
971
+ } else {
972
+ for (var _i4 = 0; _i4 < normalMap.length; _i4++) {
973
+ var _pathData = normalMap[_i4].split('/');
974
+ if (_pathData[_pathData.length - 2] === urlData[urlData.length - 2]) {
975
+ normalMap[_i4] = newURL;
976
+ flag = true;
977
+ }
978
+ }
979
+ if (!flag) normalMap.push(newURL);
980
+ item = item.merge({
981
+ normalMap: normalMap
982
+ });
983
+ }
984
+ state = state.merge({
985
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
986
+ });
987
+ state = state.merge({
988
+ mode: MODE_IDLE_3D
989
+ });
990
+ return {
991
+ updatedState: state
992
+ };
993
+ }
994
+ }, {
995
+ key: "setProperties",
996
+ value: function setProperties(state, layerID, itemID, properties) {
997
+ state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'properties'], properties);
998
+ return {
999
+ updatedState: state
1000
+ };
1001
+ }
1002
+ }, {
1003
+ key: "setJsProperties",
1004
+ value: function setJsProperties(state, layerID, itemID, properties) {
1005
+ return this.setProperties(state, layerID, itemID, fromJS(properties));
1006
+ }
1007
+ }, {
1008
+ key: "updateProperties",
1009
+ value: function updateProperties(state, layerID, itemID, properties) {
1010
+ properties.forEach(function (v, k) {
1011
+ if (state.hasIn(['scene', 'layers', layerID, 'items', itemID, 'properties', k])) state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'properties', k], v);
1012
+ });
1013
+ return {
1014
+ updatedState: state
1015
+ };
1016
+ }
1017
+ }, {
1018
+ key: "updateJsProperties",
1019
+ value: function updateJsProperties(state, layerID, itemID, properties) {
1020
+ return this.updateProperties(state, layerID, itemID, fromJS(properties));
1021
+ }
1022
+ }, {
1023
+ key: "setAttributes",
1024
+ value: function setAttributes(state, layerID, itemID, itemAttributes) {
1025
+ state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID], itemAttributes);
1026
+ return {
1027
+ updatedState: state
1028
+ };
1029
+ }
1030
+ }, {
1031
+ key: "setJsAttributes",
1032
+ value: function setJsAttributes(state, layerID, itemID, itemAttributes) {
1033
+ itemAttributes = fromJS(itemAttributes);
1034
+ return this.setAttributes(state, layerID, itemID, itemAttributes);
1035
+ }
1036
+ }, {
1037
+ key: "animateObject",
1038
+ value: function animateObject(state, value) {
1039
+ var _state7 = state,
1040
+ replacingSupport = _state7.replacingSupport,
1041
+ scene = _state7.scene;
1042
+ var layerID = replacingSupport.get('layerID');
1043
+ var itemID = replacingSupport.get('itemID');
1044
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
1045
+ if (item !== undefined) {
1046
+ var animCount = item.get('animate');
1047
+ item = item.merge({
1048
+ animValue: value,
1049
+ animate: animCount + 1
1050
+ });
1051
+ state = state.merge({
1052
+ scene: scene.mergeIn(['layers', layerID, 'items', itemID], item)
1053
+ });
1054
+ state = state.merge({
1055
+ mode: MODE_IDLE_3D
1056
+ });
1057
+ }
1058
+ return {
1059
+ updatedState: state
1060
+ };
1061
+ }
1062
+ }, {
1063
+ key: "removeReplacingSupport",
1064
+ value: function removeReplacingSupport(state) {
1065
+ state = state.merge({
1066
+ replacingSupport: new Map()
1067
+ });
1068
+ return {
1069
+ updatedState: state
1070
+ };
1071
+ }
1072
+ }, {
1073
+ key: "setInitialDoorStyle",
1074
+ value: function setInitialDoorStyle(state, doorStyle) {
1075
+ state = state.merge({
1076
+ doorStyle: doorStyle
1077
+ });
1078
+ var _state8 = state,
1079
+ scene = _state8.scene;
1080
+ var layerID = scene.get('selectedLayer');
1081
+ var layers = scene.layers.get(layerID);
1082
+ var items = layers.items;
1083
+ items.forEach(function (data) {
1084
+ {
1085
+ var itemID = data.id;
1086
+ var tmpDS = _objectSpread(_objectSpread({}, data.doorStyle), {}, {
1087
+ doorStyles: _objectSpread(_objectSpread({}, data.doorStyle.doorStyles), {}, {
1088
+ counttop: doorStyle.doorStyles.counttop
1089
+ })
1090
+ });
1091
+ data = data.mergeIn(['doorStyle'], fromJS(tmpDS));
1092
+ layers = layers.mergeIn(['items', itemID], data);
1093
+ state = state.merge({
1094
+ scene: scene.mergeIn(['layers', layerID], layers)
1095
+ });
1096
+ }
1097
+ });
1098
+ return {
1099
+ updatedState: state
1100
+ };
1101
+ }
1102
+ }, {
1103
+ key: "setDoorStyle",
1104
+ value: function setDoorStyle(state, doorStyle, itemCDS, isAll) {
1105
+ var _this2 = this;
1106
+ var keys = Object.keys(doorStyle.doorStyles);
1107
+ keys = keys.filter(function (elem) {
1108
+ return !elem.endsWith('_gltf');
1109
+ });
1110
+ var tmp = {};
1111
+ for (var x in keys) {
1112
+ tmp[keys[x]] = doorStyle.doorStyles[keys[x]];
1113
+ }
1114
+ state = state.setIn(['scene', 'layers', state.scene.selectedLayer, 'doorStyle'], doorStyle);
1115
+ state = state.merge({
1116
+ doorStyle: doorStyle
1117
+ });
1118
+ var layerID = state.scene.get('selectedLayer');
1119
+ var temp_layer_molding = state.scene.getIn(['layers', layerID, 'molding']);
1120
+ temp_layer_molding = temp_layer_molding.filter(function (md) {
1121
+ return itemCDS === null || itemCDS === void 0 ? void 0 : itemCDS.some(function (ds) {
1122
+ return md.itemID === ds.itemID;
1123
+ });
1124
+ });
1125
+ state = state.setIn(['scene', 'layers', layerID, 'molding'], temp_layer_molding);
1126
+ var itemIDs = state.scene.layers.getIn([layerID, 'selected', 'items']).toJS();
1127
+ var setDoorStyleOfItem = function setDoorStyleOfItem(data) {
1128
+ var _cds$data;
1129
+ if (data.category !== 'cabinet') return; //CDS should effect to cabinets
1130
+ var itemID = data.id;
1131
+ var curItem = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
1132
+ var layer = state.getIn(['scene', 'layers', layerID]);
1133
+ var tmpMolding = _toConsumableArray(curItem.molding);
1134
+ var temp_item_molding = _toConsumableArray(curItem.molding);
1135
+ temp_item_molding = temp_item_molding.filter(function (md) {
1136
+ return itemCDS === null || itemCDS === void 0 ? void 0 : itemCDS.some(function (ds) {
1137
+ return ds.itemID === md.itemID;
1138
+ });
1139
+ });
1140
+ tmpMolding.forEach(function (md) {
1141
+ var itemGroup = MoldingUtils.getItemGroupFromMolding(layer, curItem, md);
1142
+ itemGroup.forEach(function (it) {
1143
+ state = state.setIn(['scene', 'layers', layerID, 'items', it.id, 'molding'], temp_item_molding);
1144
+ });
1145
+ });
1146
+ var cds = itemCDS === null || itemCDS === void 0 ? void 0 : itemCDS.find(function (elem) {
1147
+ return elem.itemID === data.itemID;
1148
+ });
1149
+ var euro_cds = (cds === null || cds === void 0 || (_cds$data = cds.data) === null || _cds$data === void 0 ? void 0 : _cds$data.filter(function (element) {
1150
+ return element && element.is_euro_cds;
1151
+ })) || [];
1152
+ var cds_data = cds ? [cds] : [];
1153
+ if (
1154
+ // doorStyle.door_style_name === 'Euro & Frameless' &&
1155
+ euro_cds.length > 0) {
1156
+ var newProperties = state.scene.getIn(['layers', layerID, 'items', itemID, 'properties']).toJS();
1157
+ if (newProperties.hasOwnProperty('depth')) {
1158
+ if (!newProperties.hasOwnProperty('oldDepth')) {
1159
+ newProperties['oldDepth'] = new Map({
1160
+ length: newProperties.depth.length,
1161
+ _length: newProperties.depth._length,
1162
+ _unit: newProperties.depth._unit
1163
+ });
1164
+ }
1165
+ newProperties['depth'] = new Map({
1166
+ length: convert(euro_cds[0].euro_length).from('in').to('cm'),
1167
+ _length: euro_cds[0].euro_length,
1168
+ _unit: 'in'
1169
+ });
1170
+ }
1171
+ if (newProperties.hasOwnProperty('height')) {
1172
+ if (!newProperties.hasOwnProperty('oldHeight')) {
1173
+ newProperties['oldHeight'] = new Map({
1174
+ length: newProperties.height.length,
1175
+ _length: newProperties.height._length,
1176
+ _unit: newProperties.height._unit
1177
+ });
1178
+ }
1179
+ newProperties['height'] = new Map({
1180
+ length: convert(euro_cds[0].euro_height).from('in').to('cm'),
1181
+ _length: euro_cds[0].euro_height,
1182
+ _unit: 'in'
1183
+ });
1184
+ }
1185
+ if (newProperties.hasOwnProperty('width')) {
1186
+ if (!newProperties.hasOwnProperty('oldWidth')) {
1187
+ newProperties['oldWidth'] = new Map({
1188
+ length: newProperties.width.length,
1189
+ _length: newProperties.width._length,
1190
+ _unit: newProperties.width._unit
1191
+ });
1192
+ }
1193
+ newProperties['width'] = new Map({
1194
+ length: convert(euro_cds[0].euro_width).from('in').to('cm') - 10,
1195
+ _length: euro_cds[0].euro_width,
1196
+ _unit: 'in'
1197
+ });
1198
+ }
1199
+ state = _this2.setJsProperties(state, layerID, itemID, newProperties).updatedState;
1200
+ } else {
1201
+ var properties = state.scene.getIn(['layers', layerID, 'items', itemID, 'properties']).toJS();
1202
+ if (properties.hasOwnProperty('oldDepth')) {
1203
+ properties['depth'] = new Map({
1204
+ length: properties.oldDepth.length,
1205
+ _length: properties.oldDepth._length,
1206
+ _unit: properties.oldDepth._unit
1207
+ });
1208
+ }
1209
+ if (properties.hasOwnProperty('oldHeight')) {
1210
+ properties['height'] = new Map({
1211
+ length: properties.oldHeight.length,
1212
+ _length: properties.oldHeight._length,
1213
+ _unit: properties.oldHeight._unit
1214
+ });
1215
+ }
1216
+ if (properties.hasOwnProperty('oldWidth')) {
1217
+ properties['width'] = new Map({
1218
+ length: properties.oldWidth.length,
1219
+ _length: properties.oldWidth._length,
1220
+ _unit: properties.oldWidth._unit
1221
+ });
1222
+ }
1223
+ state = _this2.setJsProperties(state, layerID, itemID, properties).updatedState;
1224
+ }
1225
+ var tmpDS = {
1226
+ id: doorStyle.id,
1227
+ brightness: doorStyle.brightness,
1228
+ color: doorStyle.color,
1229
+ glossness: doorStyle.glossness,
1230
+ name: doorStyle.name,
1231
+ door_style_name: doorStyle.door_style_name,
1232
+ texture: doorStyle.texture,
1233
+ thumbnail: doorStyle.thumbnail,
1234
+ type: doorStyle.type,
1235
+ sku: doorStyle.sku,
1236
+ color_sku_alias: doorStyle.color_sku_alias,
1237
+ // alias name of color_sku for the current dealer
1238
+ install: getInstallationSuffix(INSTALLATION_SUFFIX_TYPE.NAME, doorStyle),
1239
+ doorStyles: _objectSpread(_objectSpread({}, tmp), {}, {
1240
+ cds: cds_data
1241
+ })
1242
+ };
1243
+ state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'doorStyle'], fromJS(tmpDS));
1244
+ };
1245
+ if (isAll) {
1246
+ var items = state.scene.layers.get(layerID).items;
1247
+ items.forEach(setDoorStyleOfItem);
1248
+ } else {
1249
+ if (itemIDs.length > 0) {
1250
+ var _loop = function _loop() {
1251
+ var itemID = itemIDs[i];
1252
+ var items = state.scene.layers.get(layerID).items;
1253
+ items.forEach(function (data) {
1254
+ if (itemID === data.id) {
1255
+ setDoorStyleOfItem(data);
1256
+ }
1257
+ });
1258
+ };
1259
+ for (var i = 0; i < itemIDs.length; i++) {
1260
+ _loop();
1261
+ }
1262
+ }
1263
+ }
1264
+ return {
1265
+ updatedState: state
1266
+ };
1267
+ }
1268
+ }, {
1269
+ key: "changeDistance",
1270
+ value: function changeDistance(state, distancePayload) {
1271
+ var _state9 = state,
1272
+ scene = _state9.scene;
1273
+ var Left = distancePayload.distanceLeft;
1274
+ var Right = distancePayload.distanceRight;
1275
+ var Back = distancePayload.distanceBack;
1276
+ var Front = distancePayload.distanceFront;
1277
+ var LeftRotRad = Left ? 180 : null;
1278
+ var RightRotRad = Right ? 0 : null;
1279
+ var BackRotRad = Back ? -90 : null;
1280
+ var FrontRotRad = Front ? 90 : null;
1281
+ var directR = LeftRotRad || RightRotRad || BackRotRad || FrontRotRad;
1282
+ var dist = Left || Right || Back || Front;
1283
+ var layerID = scene.get('selectedLayer');
1284
+ var layer = scene.layers.get(layerID).toJS();
1285
+ var selectedItemId = layer.selected.items[0];
1286
+ var selectedItem = layer.items[selectedItemId];
1287
+ if (selectedItem) {
1288
+ var renderedR = selectedItem.rotation || 0;
1289
+ var rotRad = (directR + renderedR) / 180 * Math.PI;
1290
+ var newX = selectedItem.x + convert(dist * Math.cos(rotRad)).from('in').to('cm');
1291
+ var newY = selectedItem.y + convert(dist * Math.sin(rotRad)).from('in').to('cm');
1292
+ state = state.setIn(['scene', 'layers', layerID, 'items', layer.selected.items[0], 'x'], newX);
1293
+ state = state.setIn(['scene', 'layers', layerID, 'items', layer.selected.items[0], 'y'], newY);
1294
+ }
1295
+ return {
1296
+ updatedState: state
1297
+ };
1298
+ }
1299
+ }, {
1300
+ key: "setCounterTop",
1301
+ value: function setCounterTop(state, counterTop) {
1302
+ var _state0 = state,
1303
+ scene = _state0.scene;
1304
+ var layerID = scene.get('selectedLayer');
1305
+ var layers = scene.layers.get(layerID);
1306
+ layers = layers.mergeIn(['counterTop'], counterTop);
1307
+ state = state.merge({
1308
+ scene: scene.mergeIn(['layers', layerID], layers)
1309
+ });
1310
+ var items = layers.items;
1311
+ items.forEach(function (data) {
1312
+ {
1313
+ var dataJSON = data.toJS();
1314
+ var itemID = dataJSON.id;
1315
+ var newCounter = dataJSON.counterTop;
1316
+ newCounter = _objectSpread(_objectSpread({}, newCounter), counterTop);
1317
+ data = data.mergeIn(['counterTop'], newCounter);
1318
+ layers = layers.mergeIn(['items', itemID], data);
1319
+ state = state.merge({
1320
+ scene: scene.mergeIn(['layers', layerID], layers)
1321
+ });
1322
+ }
1323
+ });
1324
+ return {
1325
+ updatedState: state
1326
+ };
1327
+ }
1328
+ }, {
1329
+ key: "setItemsDoorHandle",
1330
+ value: function setItemsDoorHandle(state, scene, layer, layerID, elements_item) {
1331
+ var _this3 = this;
1332
+ elements_item.forEach(function (data) {
1333
+ var itemID = data.id;
1334
+ var item = _this3.updateDoorHandle(data, layer);
1335
+ layer = layer.mergeIn(['items', itemID], item);
1336
+ state = state.merge({
1337
+ scene: scene.mergeIn(['layers', layerID], layer)
1338
+ });
1339
+ });
1340
+ return {
1341
+ updatedState: state
1342
+ };
1343
+ }
1344
+ }, {
1345
+ key: "setDoorHandle",
1346
+ value: function setDoorHandle(state, doorHandle) {
1347
+ var _state1 = state,
1348
+ scene = _state1.scene;
1349
+ var layerID = scene.get('selectedLayer');
1350
+ var layer = scene.layers.get(layerID);
1351
+ layer = layer.mergeIn(['doorHandle'], doorHandle);
1352
+ state = state.merge({
1353
+ scene: scene.mergeIn(['layers', layerID], layer)
1354
+ });
1355
+ var items = layer.items;
1356
+ var selectedItems = items.filter(function (element) {
1357
+ return element.selected === true;
1358
+ }); // find selected items (default 1 selected)
1359
+
1360
+ if (selectedItems.size === 0) {
1361
+ state = this.setItemsDoorHandle(state, scene, layer, layerID, items).updatedState;
1362
+ } else {
1363
+ state = this.setItemsDoorHandle(state, scene, layer, layerID, selectedItems).updatedState;
1364
+ }
1365
+ return {
1366
+ updatedState: state
1367
+ };
1368
+ }
1369
+ }, {
1370
+ key: "setHandleMaterial",
1371
+ value: function setHandleMaterial(state, material) {
1372
+ var _state10 = state,
1373
+ scene = _state10.scene;
1374
+ var layerID = scene.get('selectedLayer');
1375
+ var layers = scene.layers.get(layerID);
1376
+ var items = layers.items;
1377
+ items.forEach(function (data) {
1378
+ var dataJSON = data.toJS();
1379
+ var itemID = dataJSON.id;
1380
+ var doorStyle = dataJSON.doorStyle;
1381
+ var tmpDS = _objectSpread(_objectSpread({}, doorStyle), {}, {
1382
+ metalness: material.metalness,
1383
+ roughness: material.roughness
1384
+ });
1385
+ data = data.mergeIn(['doorStyle'], fromJS(tmpDS));
1386
+ layers = layers.mergeIn(['items', itemID], data);
1387
+ state = state.merge({
1388
+ scene: scene.mergeIn(['layers', layerID], layers)
1389
+ });
1390
+ });
1391
+ return {
1392
+ updatedState: state
1393
+ };
1394
+ }
1395
+ }, {
1396
+ key: "setWallColor",
1397
+ value: function setWallColor(state, wallColor) {
1398
+ var _state11 = state,
1399
+ scene = _state11.scene;
1400
+ var layerID = scene.get('selectedLayer');
1401
+ var layer = scene.layers.get(layerID);
1402
+ layer = layer.merge({
1403
+ wallColor: wallColor
1404
+ });
1405
+ state = state.merge({
1406
+ scene: scene.mergeIn(['layers', layerID], layer)
1407
+ });
1408
+ var lines = layer.lines;
1409
+ lines.forEach(function (data) {
1410
+ var dataJSON = data.toJS();
1411
+ var lineID = dataJSON.id;
1412
+ data = data.mergeIn(['wallColor'], wallColor);
1413
+ layer = layer.mergeIn(['lines', lineID], data);
1414
+ state = state.merge({
1415
+ scene: scene.mergeIn(['layers', layerID], layer)
1416
+ });
1417
+ });
1418
+ return {
1419
+ updatedState: state
1420
+ };
1421
+ }
1422
+ }, {
1423
+ key: "setBacksplash",
1424
+ value: function setBacksplash(state, backsplash) {
1425
+ var _state12 = state,
1426
+ scene = _state12.scene;
1427
+ var layerID = scene.get('selectedLayer');
1428
+ var layer = scene.layers.get(layerID);
1429
+ var dataJSON = layer.toJS();
1430
+ var newBack = dataJSON.backsplash;
1431
+ var flag = true; // selected or not
1432
+ // if backsplash is already set
1433
+ if (layer.getIn(['backsplash']).uri === backsplash.uri) {
1434
+ // unselect
1435
+ newBack = _objectSpread(_objectSpread({}, newBack), {}, {
1436
+ uri: ''
1437
+ });
1438
+ flag = false;
1439
+ }
1440
+ // else then, set backsplash
1441
+ else newBack = _objectSpread(_objectSpread({}, newBack), backsplash);
1442
+ layer = layer.mergeIn(['backsplash'], newBack);
1443
+ layer = layer.set('backsplashApplied', flag);
1444
+ state = state.merge({
1445
+ scene: scene.mergeIn(['layers', layerID], layer)
1446
+ });
1447
+ return {
1448
+ updatedState: state
1449
+ };
1450
+ }
1451
+ }, {
1452
+ key: "setMolding",
1453
+ value: function setMolding(state, molding, isAll) {
1454
+ var _state13 = state,
1455
+ scene = _state13.scene;
1456
+ var layerID = scene.get('selectedLayer');
1457
+ var layer = scene.layers.get(layerID);
1458
+ if (isAll) {
1459
+ var tempLayerMolding = layer.molding;
1460
+ var flag = tempLayerMolding.some(function (mol) {
1461
+ return mol.name === molding.name;
1462
+ });
1463
+ if (flag) {
1464
+ tempLayerMolding = tempLayerMolding.filter(function (mol) {
1465
+ return mol.name !== molding.name;
1466
+ });
1467
+ } else {
1468
+ if (tempLayerMolding.some(function (mol) {
1469
+ return mol.molding_type === molding.molding_type && mol.location_type === molding.location_type;
1470
+ })) {
1471
+ tempLayerMolding = tempLayerMolding.filter(function (mol) {
1472
+ return mol.molding_type !== molding.molding_type || mol.location_type !== molding.location_type;
1473
+ });
1474
+ }
1475
+ tempLayerMolding = tempLayerMolding.concat(molding);
1476
+ }
1477
+ layer = layer.set('molding', tempLayerMolding);
1478
+ state = state.merge({
1479
+ scene: scene.mergeIn(['layers', layerID], layer)
1480
+ });
1481
+ layer.items.toArray().forEach(function (item) {
1482
+ if (MoldingUtils.isEnableItemForMolding(layer, item, molding)) {
1483
+ var tempItemMolding = item.molding;
1484
+ if (flag) {
1485
+ if (tempItemMolding.some(function (mol) {
1486
+ return mol.name === molding.name;
1487
+ })) {
1488
+ tempItemMolding = tempItemMolding.filter(function (mol) {
1489
+ return mol.name !== molding.name;
1490
+ });
1491
+ }
1492
+ } else {
1493
+ if (tempItemMolding.some(function (mol) {
1494
+ return mol.molding_type === molding.molding_type && mol.location_type === molding.location_type;
1495
+ })) {
1496
+ tempItemMolding = tempItemMolding.filter(function (mol) {
1497
+ return mol.molding_type !== molding.molding_type || mol.location_type !== molding.location_type;
1498
+ });
1499
+ }
1500
+ tempItemMolding = tempItemMolding.concat(molding);
1501
+ }
1502
+ state = state.setIn(['scene', 'layers', layerID, 'items', item.id, 'molding'], tempItemMolding);
1503
+ }
1504
+ });
1505
+ } else {
1506
+ var selectedItem = layer.getIn(['items', layer.selected.toJS().items[0]]);
1507
+ if (MoldingUtils.isEnableItemForMolding(layer, selectedItem, molding)) {
1508
+ var moldingGroup = MoldingUtils.getItemGroupFromMolding(layer, selectedItem, molding);
1509
+ var tempSelItemMolding = selectedItem.molding;
1510
+ var _flag = tempSelItemMolding.some(function (mol) {
1511
+ return mol.name === molding.name;
1512
+ });
1513
+ moldingGroup.forEach(function (item) {
1514
+ var tempItemMolding = item.molding;
1515
+ if (_flag) {
1516
+ if (tempItemMolding.some(function (mol) {
1517
+ return mol.name === molding.name;
1518
+ })) {
1519
+ tempItemMolding = tempItemMolding.filter(function (mol) {
1520
+ return mol.name !== molding.name;
1521
+ });
1522
+ }
1523
+ } else {
1524
+ if (tempItemMolding.some(function (mol) {
1525
+ return mol.molding_type === molding.molding_type && mol.location_type === molding.location_type;
1526
+ })) {
1527
+ tempItemMolding = tempItemMolding.filter(function (mol) {
1528
+ return mol.molding_type !== molding.molding_type || mol.location_type !== molding.location_type;
1529
+ });
1530
+ }
1531
+ tempItemMolding = tempItemMolding.concat(molding);
1532
+ }
1533
+ state = state.setIn(['scene', 'layers', layerID, 'items', item.id, 'molding'], tempItemMolding);
1534
+ });
1535
+ }
1536
+ }
1537
+ return {
1538
+ updatedState: state
1539
+ };
1540
+ }
1541
+ }, {
1542
+ key: "updateMolding",
1543
+ value: function updateMolding(state) {
1544
+ var _state14 = state,
1545
+ scene = _state14.scene;
1546
+ var layerID = scene.get('selectedLayer');
1547
+ var layer = scene.layers.get(layerID);
1548
+ var selectedItem = layer.getIn(['items', layer.selected.toJS().items[0]]);
1549
+ var snappedItemGroup = []; // The array that include snapped items with selected item.
1550
+ if (!!selectedItem && selectedItem.category === 'cabinet') {
1551
+ var itemGroups = [];
1552
+ layer.items.toArray().forEach(function (curItem) {
1553
+ if (selectedItem.id !== curItem.id && curItem.category === 'cabinet') {
1554
+ if (MoldingUtils.isItemSnappedItem(selectedItem, curItem)) {
1555
+ snappedItemGroup.push(curItem); // add the snapped item.
1556
+ // add the snapped item that has same molding location type, layoutpos and height to itemGroups.
1557
+ if (curItem.molding.length) {
1558
+ curItem.molding.forEach(function (md) {
1559
+ // This code check whether the curItem can be grouped with selected Item in molding.
1560
+ if (MoldingUtils.tryMergeMDItem(layer, selectedItem, curItem, [selectedItem], md)) {
1561
+ itemGroups.push({
1562
+ base_item: curItem,
1563
+ group: MoldingUtils.getItemGroupFromMolding(layer, curItem, md),
1564
+ molding: md
1565
+ });
1566
+ }
1567
+ });
1568
+ }
1569
+ }
1570
+ }
1571
+ });
1572
+ var updateSelectItemMolding = function updateSelectItemMolding() {
1573
+ var _loop2 = function _loop2() {
1574
+ // check whether snapped item is same as selected item in layoutpos(Wall, Tall, Base)
1575
+ if (MoldingUtils.isSameMoldingLayoutpos(selectedItem, snappedItemGroup[i])) {
1576
+ // check whether snapped item is same in location(same location type and height).
1577
+ var delMoldings = [];
1578
+ for (var k = 0; k < selectedItem.molding.length; k++) {
1579
+ if (MoldingUtils.isItemSameItemByLocation(selectedItem, snappedItemGroup[i], selectedItem.molding[k].location_type)) {
1580
+ delMoldings.push(selectedItem.molding[k].itemID);
1581
+ }
1582
+ }
1583
+ var resultMol = [];
1584
+ selectedItem.molding.forEach(function (mol) {
1585
+ if (!delMoldings.some(function (id) {
1586
+ return id === mol.itemID;
1587
+ })) {
1588
+ resultMol.push(mol);
1589
+ }
1590
+ });
1591
+ state = state.setIn(['scene', 'layers', layerID, 'items', selectedItem.id, 'molding'], resultMol);
1592
+ }
1593
+ };
1594
+ for (var i = 0; i < snappedItemGroup.length; i++) {
1595
+ _loop2();
1596
+ }
1597
+ };
1598
+ var emptyMoldingArray = function emptyMoldingArray() {
1599
+ var temp_items = [selectedItem];
1600
+ var groupMoldings = [];
1601
+ itemGroups.forEach(function (itGroup) {
1602
+ groupMoldings.push(itGroup.molding);
1603
+ itGroup.group.forEach(function (it) {
1604
+ if (!temp_items.some(function (i) {
1605
+ return i.id === it.id;
1606
+ })) {
1607
+ temp_items.push(it);
1608
+ }
1609
+ });
1610
+ });
1611
+ temp_items.forEach(function (item) {
1612
+ var finalMoldings = [];
1613
+ var tempMoldings = state.getIn(['scene', 'layers', layerID, 'items', item.id, 'molding']);
1614
+ tempMoldings.forEach(function (molding) {
1615
+ if (!groupMoldings.some(function (ml) {
1616
+ return ml.itemID === molding.itemID;
1617
+ })) {
1618
+ finalMoldings.push(molding);
1619
+ }
1620
+ });
1621
+ state = state.setIn(['scene', 'layers', layerID, 'items', item.id, 'molding'], finalMoldings);
1622
+ });
1623
+ updateSelectItemMolding();
1624
+ };
1625
+ var setLocationMolding = function setLocationMolding(location) {
1626
+ var locationMolding = itemGroups.filter(function (it) {
1627
+ return it.molding.location_type === location;
1628
+ }).sort(function (a, b) {
1629
+ if (a.group.length === b.group.length) {
1630
+ return GeometryUtils.pointsDistance(a.base_item.x, a.base_item.y, selectedItem.x, selectedItem.y) - GeometryUtils.pointsDistance(b.base_item.x, b.base_item.y, selectedItem.x, selectedItem.y);
1631
+ } else {
1632
+ return a.group.length - b.group.length;
1633
+ }
1634
+ });
1635
+ if (locationMolding.length) {
1636
+ var locationMoldingItems = MoldingUtils.getItemGroupFromMolding(layer, selectedItem, locationMolding[0].molding);
1637
+ locationMoldingItems.forEach(function (item) {
1638
+ var tempMoldings = state.getIn(['scene', 'layers', layerID, 'items', item.id, 'molding']);
1639
+ if (!tempMoldings.some(function (mol) {
1640
+ return mol.itemID === locationMolding[0].molding.itemID;
1641
+ })) tempMoldings.push(locationMolding[0].molding);
1642
+ state = state.setIn(['scene', 'layers', layerID, 'items', item.id, 'molding'], tempMoldings);
1643
+ });
1644
+ }
1645
+ };
1646
+ if (itemGroups.length && layer.items.some(function (it) {
1647
+ return MoldingUtils.isItemSnappedItem(selectedItem, it) && it.category === 'cabinet';
1648
+ })) {
1649
+ emptyMoldingArray();
1650
+ for (var i = 0; i < MOLDING_LOCATIONS.length; i++) {
1651
+ setLocationMolding(MOLDING_LOCATIONS[i]);
1652
+ }
1653
+ } else if (!itemGroups.length && selectedItem.molding.length) {
1654
+ // Delete the selected Item's molding property if selItem attached the group that has no molding.
1655
+ // If snapped items have no moldings and one item's property is same as selected Item, selected Item's molding should be deleted.
1656
+ updateSelectItemMolding();
1657
+ }
1658
+ }
1659
+ return {
1660
+ updatedState: state
1661
+ };
1662
+ }
1663
+ }, {
1664
+ key: "setBacksplashVisible",
1665
+ value: function setBacksplashVisible(state, itemID, backsplashVisible) {
1666
+ var _state15 = state,
1667
+ scene = _state15.scene;
1668
+ var layerID = scene.get('selectedLayer');
1669
+ var layer = scene.layers.get(layerID);
1670
+ layer = layer.mergeIn(['items', itemID, 'backsplashVisible'], backsplashVisible);
1671
+ // let cabinet_category = layer.getIn(["items"], itemID).toJS()[itemID].cabinet_category;
1672
+ // if (cabinet_category && (cabinet_category.search("Sink") !== -1 || cabinet_category.search("End/Angle") !== -1)) {
1673
+ // layer = layer.mergeIn(["items", itemID, "backsplashVisible"], true);
1674
+ // } else {
1675
+ // layer = layer.mergeIn(["items", itemID, "backsplashVisible"], false);
1676
+ // }
1677
+ state = state.merge({
1678
+ scene: scene.mergeIn(['layers', layerID], layer)
1679
+ });
1680
+ return {
1681
+ updatedState: state
1682
+ };
1683
+ }
1684
+ }, {
1685
+ key: "setApplianceMaterial",
1686
+ value: function setApplianceMaterial(state, material) {
1687
+ var _state16 = state,
1688
+ scene = _state16.scene;
1689
+ var layerID = scene.get('selectedLayer');
1690
+ var layers = scene.layers.get(layerID);
1691
+ var items = layers.items;
1692
+ items.forEach(function (data) {
1693
+ var dataJSON = data.toJS();
1694
+ var itemID = dataJSON.id;
1695
+ var newMaterial = {
1696
+ metalness: material.metalness,
1697
+ roughness: material.roughness
1698
+ };
1699
+ data = data.mergeIn(['applianceMaterial'], newMaterial);
1700
+ layers = layers.mergeIn(['items', itemID], data);
1701
+ state = state.merge({
1702
+ scene: scene.mergeIn(['layers', layerID], layers)
1703
+ });
1704
+ });
1705
+ return {
1706
+ updatedState: state
1707
+ };
1708
+ }
1709
+ }, {
1710
+ key: "setModelling",
1711
+ value: function setModelling(state, molding) {
1712
+ var _state17 = state,
1713
+ scene = _state17.scene;
1714
+ var layerID = scene.get('selectedLayer');
1715
+ var layers = scene.layers.get(layerID);
1716
+ var items = layers.items;
1717
+ items.forEach(function (data) {
1718
+ var dataJSON = data.toJS();
1719
+ var itemID = dataJSON.id;
1720
+ });
1721
+ state = state.merge({
1722
+ scene: scene.mergeIn(['layers', layerID], layers)
1723
+ });
1724
+ return {
1725
+ updatedState: state
1726
+ };
1727
+ }
1728
+ }, {
1729
+ key: "updateItemsAltitude",
1730
+ value: function updateItemsAltitude(state, layerID, itemID, value) {
1731
+ var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
1732
+ var properties = item.get('properties');
1733
+ var altitude = properties.get('altitude');
1734
+ var length = altitude.get('length');
1735
+ var _length = altitude.get('_length');
1736
+ var _unit = altitude.get('_unit');
1737
+ length = length - value;
1738
+ switch (_unit) {
1739
+ case 'mm':
1740
+ _length = length * 10;
1741
+ break;
1742
+ case 'm':
1743
+ _length = length * 0.01;
1744
+ break;
1745
+ default:
1746
+ _length = length;
1747
+ }
1748
+ if (length <= 0) {
1749
+ length = 0;
1750
+ _length = 0;
1751
+ }
1752
+ state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'properties', 'altitude'], new Map({
1753
+ length: length,
1754
+ _length: _length,
1755
+ _unit: _unit
1756
+ }));
1757
+ return {
1758
+ updatedState: state
1759
+ };
1760
+ }
1761
+ }, {
1762
+ key: "createHole",
1763
+ value: function createHole(state, layerID, type, lineID, offset, properties) {
1764
+ var holeID = IDBroker.acquireID();
1765
+ var hole = state.catalog.factoryElement(type, {
1766
+ id: holeID,
1767
+ url: state.catalog.getIn(['elements', type, 'info', 'url']),
1768
+ type: type,
1769
+ offset: offset,
1770
+ line: lineID
1771
+ }, properties);
1772
+ state = state.setIn(['scene', 'layers', layerID, 'holes', holeID], hole);
1773
+ state = state.updateIn(['scene', 'layers', layerID, 'lines', lineID, 'holes'], function (holes) {
1774
+ return holes && holes.push(holeID);
1775
+ });
1776
+ // get vertex order/////
1777
+ var element = state.scene.layers.getIn([layerID, 'lines', lineID]);
1778
+ var layer = state.getIn(['scene', 'layers', layerID]);
1779
+ var vetName0 = element.vertices.get(0);
1780
+ var vetName1 = element.vertices.get(1);
1781
+ var verticesArray = [];
1782
+ layer.areas.forEach(function (data) {
1783
+ verticesArray.push(data.vertices.toJS());
1784
+ });
1785
+ for (var i = 0; i < verticesArray.length; i++) {
1786
+ var vertices = verticesArray[i];
1787
+ if (vertices.includes(vetName0) && vertices.includes(vetName1)) {
1788
+ var index0 = vertices.indexOf(vetName0);
1789
+ var index1 = vertices.indexOf(vetName1);
1790
+ // if vertex order chanege//
1791
+ if (index1 + 1 == index0) {
1792
+ return {
1793
+ updatedState: state,
1794
+ hole: hole
1795
+ };
1796
+ }
1797
+ if (index0 == 0 && index1 == vertices.length - 1) {
1798
+ return {
1799
+ updatedState: state,
1800
+ hole: hole
1801
+ };
1802
+ }
1803
+ // ////////////////////////
1804
+ }
1805
+ }
1806
+ // ///////////////////////////
1807
+ properties = hole.properties.toJS();
1808
+ if (properties.hasOwnProperty('flip_orizzontal')) {
1809
+ properties['flip_orizzontal'] = true;
1810
+ }
1811
+ if (properties.hasOwnProperty('flip_horizontal')) {
1812
+ properties['flip_horizontal'] = true;
1813
+ }
1814
+ state = Hole.setJsProperties(state, layerID, holeID, properties).updatedState;
1815
+ return {
1816
+ updatedState: state,
1817
+ hole: hole
1818
+ };
1819
+ }
1820
+ }, {
1821
+ key: "toggleLoadingCabinet",
1822
+ value: function toggleLoadingCabinet(state) {
1823
+ var _state18 = state,
1824
+ scene = _state18.scene;
1825
+ console.log('scene.isLoadingCabinet: ', !scene.isLoadingCabinet);
1826
+ // scene = scene.set('isLoadingCabinet', !scene.isLoadingCabinet);
1827
+ // state = state.set('scene', scene);
1828
+ state = state.setIn(['scene', 'isLoadingCabinet'], !scene.isLoadingCabinet);
1829
+ return {
1830
+ updatedState: state
1831
+ };
1832
+ }
1833
+ }, {
1834
+ key: "endLoading",
1835
+ value: function endLoading(state) {
1836
+ var _state19 = state,
1837
+ scene = _state19.scene;
1838
+ state = state.setIn(['scene', 'loadFlag'], true);
1839
+ return {
1840
+ updatedState: state
1841
+ };
1842
+ }
1843
+ }]);
1844
+ }();
1845
+ export { Item as default };