blue-chestnut-solar-expert 0.0.69 → 0.0.71

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 (331) hide show
  1. package/dist/{collection/config.js → stencil-library/config-CWfV1nKn.js} +10 -4
  2. package/dist/stencil-library/config-CWfV1nKn.js.map +1 -0
  3. package/dist/stencil-library/constants-hboFofU4.js +1522 -0
  4. package/dist/stencil-library/constants-hboFofU4.js.map +1 -0
  5. package/dist/stencil-library/decoder-DafVsihn.js +39 -0
  6. package/dist/stencil-library/decoder-DafVsihn.js.map +1 -0
  7. package/dist/stencil-library/deflate-BOWpTFAE.js +21 -0
  8. package/dist/{esm/deflate-DHgPf9CO.js.map → stencil-library/deflate-BOWpTFAE.js.map} +1 -1
  9. package/dist/stencil-library/eraser-icon.entry.esm.js.map +1 -0
  10. package/dist/{components/p-CL74Q4VR.js → stencil-library/eraser-icon.entry.js} +9 -27
  11. package/dist/stencil-library/eraser-icon.entry.js.map +1 -0
  12. package/dist/stencil-library/house-icon.entry.esm.js.map +1 -0
  13. package/dist/{components/p-D8w3bTPO.js → stencil-library/house-icon.entry.js} +9 -27
  14. package/dist/stencil-library/house-icon.entry.js.map +1 -0
  15. package/dist/{components/loading-widget.js → stencil-library/icon-selector.entry.esm.js.map} +1 -38
  16. package/dist/stencil-library/icon-selector.entry.js +47 -0
  17. package/dist/stencil-library/icon-selector.entry.js.map +1 -0
  18. package/dist/stencil-library/index-CChkgM3J.js +414 -0
  19. package/dist/stencil-library/index-CChkgM3J.js.map +1 -0
  20. package/dist/stencil-library/index-ICfDNUMe.js +4172 -0
  21. package/dist/stencil-library/index-ICfDNUMe.js.map +1 -0
  22. package/dist/stencil-library/index.esm.js +13 -1
  23. package/dist/stencil-library/index.esm.js.map +1 -1
  24. package/dist/{esm/jpeg-CJLm1GkA.js → stencil-library/jpeg-DWgO3UMT.js} +11 -3
  25. package/dist/stencil-library/jpeg-DWgO3UMT.js.map +1 -0
  26. package/dist/{components/p-DLWzgdrw.js → stencil-library/lerc-BQV9jxbc.js} +27 -1981
  27. package/dist/stencil-library/lerc-BQV9jxbc.js.map +1 -0
  28. package/dist/{esm → stencil-library}/loading-widget.entry.js +3 -3
  29. package/dist/{components/p-P28NBglk.js.map → stencil-library/loading-widget.entry.js.map} +1 -1
  30. package/dist/{esm/lzw-DaOzWJUD.js → stencil-library/lzw-fGokKIJR.js} +10 -4
  31. package/dist/stencil-library/lzw-fGokKIJR.js.map +1 -0
  32. package/dist/stencil-library/map-draw-DHsfxmE8.js +25567 -0
  33. package/dist/stencil-library/map-draw-DHsfxmE8.js.map +1 -0
  34. package/dist/stencil-library/map-draw.entry.esm.js.map +1 -0
  35. package/dist/stencil-library/map-draw.entry.js +12 -0
  36. package/dist/stencil-library/map-draw.entry.js.map +1 -0
  37. package/dist/stencil-library/map-selector.entry.esm.js.map +1 -0
  38. package/dist/{components/p-C5QieOat.js → stencil-library/map-selector.entry.js} +164 -96
  39. package/dist/stencil-library/map-selector.entry.js.map +1 -0
  40. package/dist/{components/loading-widget.js.map → stencil-library/marker-icon.entry.esm.js.map} +1 -1
  41. package/dist/{components/p-Umz6nJIv.js → stencil-library/marker-icon.entry.js} +9 -27
  42. package/dist/stencil-library/marker-icon.entry.js.map +1 -0
  43. package/dist/stencil-library/move-icon.entry.esm.js.map +1 -0
  44. package/dist/{components/p-FdEV2qPo.js → stencil-library/move-icon.entry.js} +9 -27
  45. package/dist/stencil-library/move-icon.entry.js.map +1 -0
  46. package/dist/{components/p-DTXeHbuh.js.map → stencil-library/octagon-minus-icon.entry.esm.js.map} +1 -1
  47. package/dist/{components/p-BJLO76Yi.js → stencil-library/octagon-minus-icon.entry.js} +9 -27
  48. package/dist/stencil-library/octagon-minus-icon.entry.js.map +1 -0
  49. package/dist/{components/p-ByX6QP-E.js → stencil-library/packbits-vWMrdouf.js} +9 -3
  50. package/dist/stencil-library/packbits-vWMrdouf.js.map +1 -0
  51. package/dist/stencil-library/pako.esm-CPorU236.js +6881 -0
  52. package/dist/{esm/pako.esm-B5WTRCh8.js.map → stencil-library/pako.esm-CPorU236.js.map} +1 -1
  53. package/dist/{components/p-Ddk3b30j.js.map → stencil-library/polygon-buttons.entry.esm.js.map} +1 -1
  54. package/dist/{cjs/loading-widget.cjs.entry.js → stencil-library/polygon-buttons.entry.js} +16 -10
  55. package/dist/stencil-library/polygon-buttons.entry.js.map +1 -0
  56. package/dist/{cjs/loading-widget.cjs.entry.js.map → stencil-library/polygon-information.entry.esm.js.map} +1 -1
  57. package/dist/{components/p-OxUYjaAL.js → stencil-library/polygon-information.entry.js} +13 -70
  58. package/dist/stencil-library/polygon-information.entry.js.map +1 -0
  59. package/dist/stencil-library/raw-BZExdvHz.js +20 -0
  60. package/dist/stencil-library/raw-BZExdvHz.js.map +1 -0
  61. package/dist/stencil-library/search-icon.entry.esm.js.map +1 -0
  62. package/dist/{components/p-DBwr8xSB.js → stencil-library/search-icon.entry.js} +9 -27
  63. package/dist/stencil-library/{p-9b4e52c3.entry.js → search-icon.entry.js.map} +1 -2
  64. package/dist/stencil-library/settings-icon.entry.esm.js.map +1 -0
  65. package/dist/{components/p-DTXeHbuh.js → stencil-library/settings-icon.entry.js} +9 -27
  66. package/dist/stencil-library/settings-icon.entry.js.map +1 -0
  67. package/dist/stencil-library/settings-modal.entry.esm.js.map +1 -0
  68. package/dist/{components/p-Ddk3b30j.js → stencil-library/settings-modal.entry.js} +20 -38
  69. package/dist/stencil-library/settings-modal.entry.js.map +1 -0
  70. package/dist/stencil-library/solar-expert.entry.esm.js.map +1 -0
  71. package/dist/{components/solar-expert.js → stencil-library/solar-expert.entry.js} +16 -151
  72. package/dist/stencil-library/solar-expert.entry.js.map +1 -0
  73. package/dist/stencil-library/solar-system-form.entry.esm.js.map +1 -0
  74. package/dist/{components/p-C3ZXE525.js → stencil-library/solar-system-form.entry.js} +183 -549
  75. package/dist/stencil-library/solar-system-form.entry.js.map +1 -0
  76. package/dist/stencil-library/stencil-library.esm.js +52 -1
  77. package/dist/stencil-library/stencil-library.esm.js.map +1 -1
  78. package/dist/{components/p-DfzSejIb.js → stencil-library/store-CcqrFuBK.js} +3 -3
  79. package/dist/stencil-library/store-CcqrFuBK.js.map +1 -0
  80. package/dist/{components/p-D2AHNjbG.js.map → stencil-library/toast-notification.entry.esm.js.map} +1 -1
  81. package/dist/{components/p-P28NBglk.js → stencil-library/toast-notification.entry.js} +9 -30
  82. package/dist/stencil-library/toast-notification.entry.js.map +1 -0
  83. package/dist/stencil-library/tool-box.entry.esm.js.map +1 -0
  84. package/dist/{components/p-26DHwbCE.js → stencil-library/tool-box.entry.js} +27 -35
  85. package/dist/stencil-library/tool-box.entry.js.map +1 -0
  86. package/dist/{collection/utils/render/tools.js → stencil-library/tools-BNYKV5H5.js} +14 -8
  87. package/dist/stencil-library/tools-BNYKV5H5.js.map +1 -0
  88. package/dist/stencil-library/tutorial-component.entry.esm.js.map +1 -0
  89. package/dist/{components/p-D2AHNjbG.js → stencil-library/tutorial-component.entry.js} +13 -38
  90. package/dist/stencil-library/tutorial-component.entry.js.map +1 -0
  91. package/dist/stencil-library/undo-icon.entry.esm.js.map +1 -0
  92. package/dist/{components/p-waOPoUcA.js → stencil-library/undo-icon.entry.js} +9 -27
  93. package/dist/stencil-library/undo-icon.entry.js.map +1 -0
  94. package/dist/{collection/utils/utils.js → stencil-library/utils-BCUZxI9u.js} +9 -3
  95. package/dist/stencil-library/utils-BCUZxI9u.js.map +1 -0
  96. package/dist/{esm/webimage-BiHardhv.js → stencil-library/webimage-DzcyYZ7I.js} +9 -3
  97. package/dist/{esm/webimage-BiHardhv.js.map → stencil-library/webimage-DzcyYZ7I.js.map} +1 -1
  98. package/dist/types/components/map-draw/map-draw.d.ts +1 -0
  99. package/dist/types/components/solar-expert/solar-expert.d.ts +1 -0
  100. package/dist/types/components/solar-system-form/solar-system-form.d.ts +10 -6
  101. package/dist/types/components.d.ts +4 -0
  102. package/package.json +1 -1
  103. package/dist/cjs/app-globals-I24yU8do.js +0 -10
  104. package/dist/cjs/app-globals-I24yU8do.js.map +0 -1
  105. package/dist/cjs/basedecoder-CQuzfSgz.js +0 -116
  106. package/dist/cjs/basedecoder-CQuzfSgz.js.map +0 -1
  107. package/dist/cjs/deflate-AzGzQSW2.js +0 -17
  108. package/dist/cjs/deflate-AzGzQSW2.js.map +0 -1
  109. package/dist/cjs/eraser-icon_19.cjs.entry.js +0 -31
  110. package/dist/cjs/eraser-icon_19.cjs.entry.js.map +0 -1
  111. package/dist/cjs/index-HgRXF6kp.js +0 -1470
  112. package/dist/cjs/index-HgRXF6kp.js.map +0 -1
  113. package/dist/cjs/index.cjs.js +0 -7
  114. package/dist/cjs/index.cjs.js.map +0 -1
  115. package/dist/cjs/jpeg-Bx3bTm32.js +0 -904
  116. package/dist/cjs/jpeg-Bx3bTm32.js.map +0 -1
  117. package/dist/cjs/lerc-Bdx5y-yw.js +0 -4427
  118. package/dist/cjs/lerc-Bdx5y-yw.js.map +0 -1
  119. package/dist/cjs/loader.cjs.js +0 -18
  120. package/dist/cjs/loader.cjs.js.map +0 -1
  121. package/dist/cjs/loading-widget.entry.cjs.js.map +0 -1
  122. package/dist/cjs/lzw-BmFug486.js +0 -140
  123. package/dist/cjs/lzw-BmFug486.js.map +0 -1
  124. package/dist/cjs/packbits-CYx9fB0v.js +0 -35
  125. package/dist/cjs/packbits-CYx9fB0v.js.map +0 -1
  126. package/dist/cjs/pako.esm-0mKI6Jik.js +0 -3243
  127. package/dist/cjs/pako.esm-0mKI6Jik.js.map +0 -1
  128. package/dist/cjs/raw-DC82yoyr.js +0 -16
  129. package/dist/cjs/raw-DC82yoyr.js.map +0 -1
  130. package/dist/cjs/stencil-library.cjs.js +0 -30
  131. package/dist/cjs/stencil-library.cjs.js.map +0 -1
  132. package/dist/cjs/webimage-Dc0t2xAB.js +0 -49
  133. package/dist/cjs/webimage-Dc0t2xAB.js.map +0 -1
  134. package/dist/collection/collection-manifest.json +0 -31
  135. package/dist/collection/components/icons/eraser.js +0 -64
  136. package/dist/collection/components/icons/eraser.js.map +0 -1
  137. package/dist/collection/components/icons/house.js +0 -64
  138. package/dist/collection/components/icons/house.js.map +0 -1
  139. package/dist/collection/components/icons/icon.js +0 -108
  140. package/dist/collection/components/icons/icon.js.map +0 -1
  141. package/dist/collection/components/icons/marker.js +0 -64
  142. package/dist/collection/components/icons/marker.js.map +0 -1
  143. package/dist/collection/components/icons/move.js +0 -64
  144. package/dist/collection/components/icons/move.js.map +0 -1
  145. package/dist/collection/components/icons/octagonMinus.js +0 -64
  146. package/dist/collection/components/icons/octagonMinus.js.map +0 -1
  147. package/dist/collection/components/icons/search.js +0 -64
  148. package/dist/collection/components/icons/search.js.map +0 -1
  149. package/dist/collection/components/icons/settings.js +0 -64
  150. package/dist/collection/components/icons/settings.js.map +0 -1
  151. package/dist/collection/components/icons/undo.js +0 -64
  152. package/dist/collection/components/icons/undo.js.map +0 -1
  153. package/dist/collection/components/map-draw/map-draw.js +0 -824
  154. package/dist/collection/components/map-draw/map-draw.js.map +0 -1
  155. package/dist/collection/components/map-draw/map-selector.js +0 -246
  156. package/dist/collection/components/map-draw/map-selector.js.map +0 -1
  157. package/dist/collection/components/map-draw/polygon-buttons.js +0 -86
  158. package/dist/collection/components/map-draw/polygon-buttons.js.map +0 -1
  159. package/dist/collection/components/map-draw/polygon-information.js +0 -211
  160. package/dist/collection/components/map-draw/polygon-information.js.map +0 -1
  161. package/dist/collection/components/map-draw/tool-box.js +0 -108
  162. package/dist/collection/components/map-draw/tool-box.js.map +0 -1
  163. package/dist/collection/components/map-draw/tutorial-component.js +0 -219
  164. package/dist/collection/components/map-draw/tutorial-component.js.map +0 -1
  165. package/dist/collection/components/settings/settings.js +0 -127
  166. package/dist/collection/components/settings/settings.js.map +0 -1
  167. package/dist/collection/components/solar-expert/solar-expert.js +0 -241
  168. package/dist/collection/components/solar-expert/solar-expert.js.map +0 -1
  169. package/dist/collection/components/solar-system-form/solar-system-form.js +0 -617
  170. package/dist/collection/components/solar-system-form/solar-system-form.js.map +0 -1
  171. package/dist/collection/components/widgets/loading-widget.js +0 -18
  172. package/dist/collection/components/widgets/loading-widget.js.map +0 -1
  173. package/dist/collection/components/widgets/toast-notification.js +0 -133
  174. package/dist/collection/components/widgets/toast-notification.js.map +0 -1
  175. package/dist/collection/config.js.map +0 -1
  176. package/dist/collection/constants.js +0 -90
  177. package/dist/collection/constants.js.map +0 -1
  178. package/dist/collection/index.js +0 -2
  179. package/dist/collection/index.js.map +0 -1
  180. package/dist/collection/output.css +0 -1126
  181. package/dist/collection/store.js +0 -43
  182. package/dist/collection/store.js.map +0 -1
  183. package/dist/collection/types/lang.js +0 -2
  184. package/dist/collection/types/lang.js.map +0 -1
  185. package/dist/collection/types/shapes.js +0 -2
  186. package/dist/collection/types/shapes.js.map +0 -1
  187. package/dist/collection/utils/api.js +0 -94
  188. package/dist/collection/utils/api.js.map +0 -1
  189. package/dist/collection/utils/images.js +0 -2
  190. package/dist/collection/utils/images.js.map +0 -1
  191. package/dist/collection/utils/lang/english.js +0 -164
  192. package/dist/collection/utils/lang/english.js.map +0 -1
  193. package/dist/collection/utils/lang/general.js +0 -30
  194. package/dist/collection/utils/lang/general.js.map +0 -1
  195. package/dist/collection/utils/lang/german.js +0 -164
  196. package/dist/collection/utils/lang/german.js.map +0 -1
  197. package/dist/collection/utils/lang/spanish.js +0 -164
  198. package/dist/collection/utils/lang/spanish.js.map +0 -1
  199. package/dist/collection/utils/render/tools.js.map +0 -1
  200. package/dist/collection/utils/solar.js +0 -135
  201. package/dist/collection/utils/solar.js.map +0 -1
  202. package/dist/collection/utils/theme.js +0 -97
  203. package/dist/collection/utils/theme.js.map +0 -1
  204. package/dist/collection/utils/utils.js.map +0 -1
  205. package/dist/components/eraser-icon.js +0 -11
  206. package/dist/components/eraser-icon.js.map +0 -1
  207. package/dist/components/house-icon.js +0 -11
  208. package/dist/components/house-icon.js.map +0 -1
  209. package/dist/components/icon-selector.js +0 -11
  210. package/dist/components/icon-selector.js.map +0 -1
  211. package/dist/components/index.js +0 -1269
  212. package/dist/components/index.js.map +0 -1
  213. package/dist/components/map-draw.js +0 -11
  214. package/dist/components/map-draw.js.map +0 -1
  215. package/dist/components/map-selector.js +0 -11
  216. package/dist/components/map-selector.js.map +0 -1
  217. package/dist/components/marker-icon.js +0 -11
  218. package/dist/components/marker-icon.js.map +0 -1
  219. package/dist/components/move-icon.js +0 -11
  220. package/dist/components/move-icon.js.map +0 -1
  221. package/dist/components/octagon-minus-icon.js +0 -11
  222. package/dist/components/octagon-minus-icon.js.map +0 -1
  223. package/dist/components/p-26DHwbCE.js.map +0 -1
  224. package/dist/components/p-B54Ul0nf.js +0 -15
  225. package/dist/components/p-B54Ul0nf.js.map +0 -1
  226. package/dist/components/p-B5WTRCh8.js +0 -3241
  227. package/dist/components/p-B5WTRCh8.js.map +0 -1
  228. package/dist/components/p-BGoSj_DR.js +0 -902
  229. package/dist/components/p-BGoSj_DR.js.map +0 -1
  230. package/dist/components/p-BJLO76Yi.js.map +0 -1
  231. package/dist/components/p-BOe-Z8rz.js +0 -16323
  232. package/dist/components/p-BOe-Z8rz.js.map +0 -1
  233. package/dist/components/p-Bduzzygj.js +0 -623
  234. package/dist/components/p-Bduzzygj.js.map +0 -1
  235. package/dist/components/p-ByX6QP-E.js.map +0 -1
  236. package/dist/components/p-C3ZXE525.js.map +0 -1
  237. package/dist/components/p-C5QieOat.js.map +0 -1
  238. package/dist/components/p-CL74Q4VR.js.map +0 -1
  239. package/dist/components/p-Cgchl6bA.js +0 -47
  240. package/dist/components/p-Cgchl6bA.js.map +0 -1
  241. package/dist/components/p-Cx7fffWb.js +0 -163
  242. package/dist/components/p-Cx7fffWb.js.map +0 -1
  243. package/dist/components/p-D8w3bTPO.js.map +0 -1
  244. package/dist/components/p-DBwr8xSB.js.map +0 -1
  245. package/dist/components/p-DLWzgdrw.js.map +0 -1
  246. package/dist/components/p-DfzSejIb.js.map +0 -1
  247. package/dist/components/p-FdEV2qPo.js.map +0 -1
  248. package/dist/components/p-OxUYjaAL.js.map +0 -1
  249. package/dist/components/p-Umz6nJIv.js.map +0 -1
  250. package/dist/components/p-WmcSqXD8.js +0 -14
  251. package/dist/components/p-WmcSqXD8.js.map +0 -1
  252. package/dist/components/p-j-vOrhhh.js +0 -114
  253. package/dist/components/p-j-vOrhhh.js.map +0 -1
  254. package/dist/components/p-q8auDIJ2.js +0 -138
  255. package/dist/components/p-q8auDIJ2.js.map +0 -1
  256. package/dist/components/p-waOPoUcA.js.map +0 -1
  257. package/dist/components/polygon-buttons.js +0 -11
  258. package/dist/components/polygon-buttons.js.map +0 -1
  259. package/dist/components/polygon-information.js +0 -11
  260. package/dist/components/polygon-information.js.map +0 -1
  261. package/dist/components/search-icon.js +0 -11
  262. package/dist/components/search-icon.js.map +0 -1
  263. package/dist/components/settings-icon.js +0 -11
  264. package/dist/components/settings-icon.js.map +0 -1
  265. package/dist/components/settings-modal.js +0 -11
  266. package/dist/components/settings-modal.js.map +0 -1
  267. package/dist/components/solar-expert.js.map +0 -1
  268. package/dist/components/solar-system-form.js +0 -11
  269. package/dist/components/solar-system-form.js.map +0 -1
  270. package/dist/components/toast-notification.js +0 -11
  271. package/dist/components/toast-notification.js.map +0 -1
  272. package/dist/components/tool-box.js +0 -11
  273. package/dist/components/tool-box.js.map +0 -1
  274. package/dist/components/tutorial-component.js +0 -11
  275. package/dist/components/tutorial-component.js.map +0 -1
  276. package/dist/components/undo-icon.js +0 -11
  277. package/dist/components/undo-icon.js.map +0 -1
  278. package/dist/esm/basedecoder-j-vOrhhh.js +0 -114
  279. package/dist/esm/basedecoder-j-vOrhhh.js.map +0 -1
  280. package/dist/esm/deflate-DHgPf9CO.js +0 -15
  281. package/dist/esm/eraser-icon_19.entry.js +0 -7
  282. package/dist/esm/eraser-icon_19.entry.js.map +0 -1
  283. package/dist/esm/index-C2JRBB5c.js +0 -1458
  284. package/dist/esm/index-C2JRBB5c.js.map +0 -1
  285. package/dist/esm/index.js +0 -5
  286. package/dist/esm/index.js.map +0 -1
  287. package/dist/esm/jpeg-CJLm1GkA.js.map +0 -1
  288. package/dist/esm/lerc-DF5Lrv5A.js +0 -4424
  289. package/dist/esm/lerc-DF5Lrv5A.js.map +0 -1
  290. package/dist/esm/loader.js +0 -16
  291. package/dist/esm/loader.js.map +0 -1
  292. package/dist/esm/loading-widget.entry.js.map +0 -1
  293. package/dist/esm/lzw-DaOzWJUD.js.map +0 -1
  294. package/dist/esm/packbits-CZPyx9kx.js +0 -33
  295. package/dist/esm/packbits-CZPyx9kx.js.map +0 -1
  296. package/dist/esm/pako.esm-B5WTRCh8.js +0 -3241
  297. package/dist/esm/raw-pqeeWc2_.js +0 -14
  298. package/dist/esm/raw-pqeeWc2_.js.map +0 -1
  299. package/dist/esm/stencil-library.js +0 -26
  300. package/dist/esm/stencil-library.js.map +0 -1
  301. package/dist/index.cjs.js +0 -1
  302. package/dist/index.js +0 -1
  303. package/dist/stencil-library/p-9b4e52c3.entry.js.map +0 -1
  304. package/dist/stencil-library/p-B54Ul0nf.js +0 -2
  305. package/dist/stencil-library/p-B54Ul0nf.js.map +0 -1
  306. package/dist/stencil-library/p-B5WTRCh8.js +0 -2
  307. package/dist/stencil-library/p-B5WTRCh8.js.map +0 -1
  308. package/dist/stencil-library/p-BGoSj_DR.js +0 -2
  309. package/dist/stencil-library/p-BGoSj_DR.js.map +0 -1
  310. package/dist/stencil-library/p-ByX6QP-E.js +0 -2
  311. package/dist/stencil-library/p-ByX6QP-E.js.map +0 -1
  312. package/dist/stencil-library/p-C2JRBB5c.js +0 -3
  313. package/dist/stencil-library/p-C2JRBB5c.js.map +0 -1
  314. package/dist/stencil-library/p-CX8V3eiN.js +0 -2
  315. package/dist/stencil-library/p-CX8V3eiN.js.map +0 -1
  316. package/dist/stencil-library/p-Cgchl6bA.js +0 -2
  317. package/dist/stencil-library/p-Cgchl6bA.js.map +0 -1
  318. package/dist/stencil-library/p-CymYGBJH.js +0 -2
  319. package/dist/stencil-library/p-CymYGBJH.js.map +0 -1
  320. package/dist/stencil-library/p-DHgjDQwz.js +0 -10
  321. package/dist/stencil-library/p-DHgjDQwz.js.map +0 -1
  322. package/dist/stencil-library/p-WmcSqXD8.js +0 -2
  323. package/dist/stencil-library/p-WmcSqXD8.js.map +0 -1
  324. package/dist/stencil-library/p-ba64c5e4.entry.js +0 -2
  325. package/dist/stencil-library/p-ba64c5e4.entry.js.map +0 -1
  326. package/dist/stencil-library/p-j-vOrhhh.js +0 -2
  327. package/dist/stencil-library/p-j-vOrhhh.js.map +0 -1
  328. package/dist/stencil-library/p-q8auDIJ2.js +0 -2
  329. package/dist/stencil-library/p-q8auDIJ2.js.map +0 -1
  330. /package/dist/{esm → stencil-library}/app-globals-CX8V3eiN.js +0 -0
  331. /package/dist/{esm → stencil-library}/app-globals-CX8V3eiN.js.map +0 -0
@@ -1,824 +0,0 @@
1
- import { getAssetPath, h, } from "@stencil/core";
2
- import { fetchSolarData, getBestFittingRoofSegment, getOptimalSolarPositionFully, } from "harmonia-sim";
3
- import { getBuildingImages } from "../../utils/solar";
4
- import { CanvasManager, CanvasUtils, renderRGB, Tool, } from "harmonia-draw";
5
- import { markRoofEdgeTool, moveTool, obstructionTool, roofTool, } from "../../utils/render/tools";
6
- import { DEFAULT_SOLAR_EXPERT_CONFIG, DEFAULT_SOLAR_PANEL_TYPE, } from "../../config";
7
- import { getPixelInMeters } from "../../utils/utils";
8
- import { BORDER_INSET } from "../../constants";
9
- import { getLanguageStrings } from "../../utils/lang/general";
10
- import { onChange, state } from "../../store";
11
- export class MapDraw {
12
- apiKey = "";
13
- config = DEFAULT_SOLAR_EXPERT_CONFIG;
14
- solarPanel = DEFAULT_SOLAR_PANEL_TYPE;
15
- enableSettings = false;
16
- showInstructions = true;
17
- showSettings = false;
18
- showTutorial = false;
19
- showMarkEdgeTutorial = false;
20
- showAdditionalToolsTutorial = false;
21
- additionalToolsTutorialShown = false;
22
- showObstacleTutorial = false;
23
- obstacleTutorialShown = false;
24
- firstPolygonClosed = false;
25
- zoom = 1;
26
- loadingState = "empty";
27
- rgbTiff = null;
28
- currentTool = roofTool;
29
- buildingInsights = null;
30
- pixelInMeters = 0.2;
31
- interaction = {
32
- isDrawing: false,
33
- isDragging: false,
34
- lastTouchTime: 0,
35
- };
36
- currentPolygon = null;
37
- solarSystem = {};
38
- showToast = false;
39
- toastMessage = "";
40
- toastType = "success";
41
- el;
42
- canvasElement;
43
- polygonCanvas;
44
- polygonCtx;
45
- canvasManager;
46
- preventDefaultTouch;
47
- gestureStartHandler;
48
- gestureChangeHandler;
49
- gestureEndHandler;
50
- latitudeChangeListener;
51
- longitudeChangeListener;
52
- componentDidLoad() {
53
- // Set up change listeners for latitude and longitude
54
- this.latitudeChangeListener = () => {
55
- if (state.latitude && state.longitude) {
56
- this.loadingState = "loading";
57
- this.getBuildingImages();
58
- this.getBuildingInsights();
59
- // Reset tutorial states for new location
60
- this.resetTutorials();
61
- // Show tutorial when coordinates are first set
62
- this.showTutorial = true;
63
- }
64
- };
65
- this.longitudeChangeListener = () => {
66
- if (state.latitude && state.longitude) {
67
- this.loadingState = "loading";
68
- this.getBuildingImages();
69
- this.getBuildingInsights();
70
- // Reset tutorial states for new location
71
- this.resetTutorials();
72
- // Show tutorial when coordinates are first set
73
- this.showTutorial = true;
74
- }
75
- };
76
- onChange("latitude", this.latitudeChangeListener);
77
- onChange("longitude", this.longitudeChangeListener);
78
- // Load data if coordinates already exist
79
- if (state.latitude && state.longitude) {
80
- this.loadingState = "loading";
81
- this.getBuildingInsights();
82
- this.getBuildingImages();
83
- // Show tutorial if coordinates already exist
84
- this.showTutorial = true;
85
- }
86
- // Wait for the next frame to ensure DOM is ready
87
- requestAnimationFrame(() => {
88
- this.initializeCanvas();
89
- const rect = this.canvasElement.getBoundingClientRect();
90
- this.sizeCanvas(rect.width, rect.height);
91
- });
92
- }
93
- initializeCanvas() {
94
- if (this.canvasElement && this.polygonCanvas) {
95
- // Set initial canvas sizes based on container
96
- const rect = this.canvasElement.getBoundingClientRect();
97
- if (rect.width > 0 && rect.height > 0) {
98
- this.canvasElement.width = rect.width;
99
- this.canvasElement.height = rect.height;
100
- this.polygonCanvas.width = rect.width;
101
- this.polygonCanvas.height = rect.height;
102
- this.polygonCtx = this.polygonCanvas.getContext("2d");
103
- }
104
- }
105
- // Add resize listener
106
- window.addEventListener("resize", this.handleResize);
107
- }
108
- handleResize = () => {
109
- if (this.rgbTiff) {
110
- this.drawMap();
111
- }
112
- };
113
- disconnectedCallback() {
114
- this.removeEventListeners();
115
- window.removeEventListener("resize", this.handleResize);
116
- window.removeEventListener("resize", this.handleResize);
117
- }
118
- setupCanvasManager() {
119
- if (!this.rgbTiff)
120
- return;
121
- if (!this.rgbTiff)
122
- return;
123
- // if (this.canvasManager) return;
124
- let managerConfig = {};
125
- if (state.isMobile) {
126
- managerConfig = {
127
- ...managerConfig,
128
- closeDistance: 20,
129
- };
130
- }
131
- this.canvasManager = new CanvasManager({
132
- coordinateSystem: {
133
- width: this.rgbTiff.width,
134
- height: this.rgbTiff.height,
135
- },
136
- onStateChange: () => {
137
- const currentPolygon = this.canvasManager
138
- ?.getCurrentPolygon();
139
- // Calculate area and create a copy to trigger Stencil re-render
140
- this.currentPolygon = currentPolygon
141
- ? {
142
- ...currentPolygon,
143
- points: [...currentPolygon.points],
144
- area: currentPolygon.area,
145
- }
146
- : null;
147
- CanvasUtils.drawState(this.polygonCtx, this.canvasManager.getState(), this.solarPanel, {
148
- showGrid: false,
149
- showPreview: !state.isMobile,
150
- });
151
- },
152
- onPolygonChange: (polygon) => this.handlePolygonsChange(polygon),
153
- onLowerRoofEdgeMarked: () => {
154
- this.calculateSolarPanels(false);
155
- // Show additional tools tutorial after mark edge tutorial is completed
156
- if (!this.additionalToolsTutorialShown) {
157
- this.showAdditionalToolsTutorial = true;
158
- this.additionalToolsTutorialShown = true;
159
- }
160
- },
161
- }, managerConfig);
162
- console.log("debug", this.canvasManager?.getDebugString());
163
- // Add event listeners after canvas is initialized
164
- this.setupEventListeners();
165
- // Draw map after canvas manager is set up
166
- requestAnimationFrame(() => {
167
- this.drawMap();
168
- });
169
- // Draw map after canvas manager is set up
170
- requestAnimationFrame(() => {
171
- this.drawMap();
172
- });
173
- }
174
- setupEventListeners() {
175
- if (!this.polygonCanvas)
176
- return;
177
- this.polygonCanvas.addEventListener("mousedown", this.handleMouseDown, {
178
- passive: false,
179
- });
180
- this.polygonCanvas.addEventListener("touchstart", this.handleTouchStart, {
181
- passive: false,
182
- });
183
- this.polygonCanvas.addEventListener("mousemove", this.handleMouseMove, {
184
- passive: true,
185
- });
186
- this.polygonCanvas.addEventListener("mouseleave", this.handleMouseLeave, {
187
- passive: true,
188
- });
189
- // Document-level event listeners for drag operations
190
- document.addEventListener("mousemove", this.handleMouseMove, {
191
- passive: true,
192
- });
193
- document.addEventListener("touchmove", this.handleTouchMove, {
194
- passive: false,
195
- });
196
- document.addEventListener("mouseup", this.handleMouseUp, {
197
- passive: true,
198
- });
199
- document.addEventListener("touchend", this.handleTouchEnd, {
200
- passive: false,
201
- });
202
- // Additional touch event prevention
203
- this.preventDefaultTouch = (e) => {
204
- if (e.touches.length > 1) {
205
- e.preventDefault();
206
- }
207
- };
208
- this.gestureStartHandler = (e) => e.preventDefault();
209
- this.gestureChangeHandler = (e) => e.preventDefault();
210
- this.gestureEndHandler = (e) => e.preventDefault();
211
- this.polygonCanvas.addEventListener("touchmove", this.preventDefaultTouch, {
212
- passive: false,
213
- });
214
- this.polygonCanvas.addEventListener("gesturestart", this.gestureStartHandler, {
215
- passive: false,
216
- });
217
- this.polygonCanvas.addEventListener("gesturechange", this.gestureChangeHandler, {
218
- passive: false,
219
- });
220
- this.polygonCanvas.addEventListener("gestureend", this.gestureEndHandler, {
221
- passive: false,
222
- });
223
- }
224
- removeEventListeners() {
225
- if (!this.polygonCanvas)
226
- return;
227
- this.polygonCanvas.removeEventListener("mousedown", this.handleMouseDown);
228
- this.polygonCanvas.removeEventListener("touchstart", this.handleTouchStart);
229
- this.polygonCanvas.removeEventListener("mousemove", this.handleMouseMove);
230
- this.polygonCanvas.removeEventListener("mouseleave", this.handleMouseLeave);
231
- document.removeEventListener("mousemove", this.handleMouseMove);
232
- document.removeEventListener("touchmove", this.handleTouchMove);
233
- document.removeEventListener("mouseup", this.handleMouseUp);
234
- document.removeEventListener("touchend", this.handleTouchEnd);
235
- if (this.preventDefaultTouch) {
236
- this.polygonCanvas.removeEventListener("touchmove", this.preventDefaultTouch);
237
- }
238
- if (this.gestureStartHandler) {
239
- this.polygonCanvas.removeEventListener("gesturestart", this.gestureStartHandler);
240
- }
241
- if (this.gestureChangeHandler) {
242
- this.polygonCanvas.removeEventListener("gesturechange", this.gestureChangeHandler);
243
- }
244
- if (this.gestureEndHandler) {
245
- this.polygonCanvas.removeEventListener("gestureend", this.gestureEndHandler);
246
- }
247
- }
248
- handlePolygonsChange(polygon) {
249
- this.currentPolygon = polygon;
250
- // Check if this is the first polygon being closed
251
- if (polygon.closed && !this.firstPolygonClosed &&
252
- polygon.type === "roof") {
253
- this.firstPolygonClosed = true;
254
- // Show obstacle tutorial first instead of mark edge tutorial
255
- this.showObstacleTutorial = true;
256
- }
257
- // Show mark edge tutorial when an obstacle polygon is closed (if obstacle tutorial was shown)
258
- if (polygon.closed &&
259
- polygon.type === "obstruction" &&
260
- this.obstacleTutorialShown &&
261
- !this.showMarkEdgeTutorial &&
262
- !this.showObstacleTutorial) {
263
- this.showMarkEdgeTutorial = true;
264
- }
265
- if (polygon.closed || this.currentTool !== moveTool) {
266
- this.handleToolSelect(moveTool);
267
- if (polygon.azimuth && polygon.pitch) {
268
- if (this.canvasManager?.getPositionedSolarPanels(polygon.id)) {
269
- this.calculateSolarPanels(false);
270
- }
271
- return;
272
- }
273
- const bestMatch = getBestFittingRoofSegment(polygon, this.buildingInsights?.solarPotential.roofSegmentStats ?? [], this.rgbTiff.bounds, this.canvasElement);
274
- if (!bestMatch) {
275
- const newPolygon = {
276
- ...polygon,
277
- azimuth: 180,
278
- pitch: 35,
279
- };
280
- this.canvasManager?.updatePolygon(newPolygon);
281
- return;
282
- }
283
- const newPolygon = {
284
- ...polygon,
285
- azimuth: polygon.azimuth || bestMatch.azimuthDegrees,
286
- pitch: polygon.pitch || bestMatch.pitchDegrees,
287
- };
288
- this.canvasManager?.updatePolygon(newPolygon);
289
- }
290
- if (polygon.closed &&
291
- this.canvasManager?.getPositionedSolarPanels(polygon.id)) {
292
- this.calculateSolarPanels(false);
293
- }
294
- }
295
- handleMouseUp = (event) => {
296
- if (!this.canvasManager)
297
- return;
298
- this.canvasManager.handleMouseUp(event);
299
- };
300
- handleTouchEnd = (event) => {
301
- if (!this.polygonCanvas || !this.canvasManager)
302
- return;
303
- // Only prevent default if the touch is on the canvas
304
- const target = event.target;
305
- if (this.isTargetCanvas(target)) {
306
- event.preventDefault();
307
- event.stopPropagation();
308
- }
309
- this.canvasManager.handleTouchEnd(event);
310
- };
311
- handleTouchMove = (event) => {
312
- if (!this.polygonCanvas || !this.canvasManager)
313
- return;
314
- // Only prevent default if the touch is on the canvas
315
- const target = event.target;
316
- if (this.isTargetCanvas(target)) {
317
- event.preventDefault();
318
- event.stopPropagation();
319
- }
320
- const rect = this.polygonCanvas.getBoundingClientRect();
321
- this.canvasManager.handleTouchMove(event, rect);
322
- };
323
- handleMouseMove = (event) => {
324
- if (!this.canvasManager)
325
- return;
326
- const rect = this.polygonCanvas?.getBoundingClientRect();
327
- this.canvasManager.handleMouseMove(event, rect);
328
- };
329
- handleMouseLeave = () => {
330
- if (!this.canvasManager)
331
- return;
332
- this.canvasManager.handleMouseLeave();
333
- };
334
- handleMouseDown = (event) => {
335
- if (!this.canvasManager)
336
- return;
337
- const rect = this.polygonCanvas?.getBoundingClientRect();
338
- this.canvasManager.handleMouseDown(event, rect);
339
- };
340
- handleTouchStart = (event) => {
341
- if (!this.polygonCanvas || !this.canvasManager)
342
- return;
343
- // Only prevent default if the touch is on the canvas
344
- const target = event.target;
345
- if (!this.isTargetCanvas(target)) {
346
- return;
347
- }
348
- event.preventDefault();
349
- event.stopPropagation();
350
- const now = Date.now();
351
- // Prevent double tap zoom with a longer timeout
352
- if (now - this.interaction.lastTouchTime < 500) {
353
- event.preventDefault();
354
- return;
355
- }
356
- this.interaction = {
357
- ...this.interaction,
358
- lastTouchTime: now,
359
- };
360
- const rect = this.polygonCanvas.getBoundingClientRect();
361
- this.canvasManager.handleTouchStart(event, rect);
362
- };
363
- isTargetCanvas(target) {
364
- if (!this.polygonCanvas || !this.canvasElement)
365
- return false;
366
- return target === this.polygonCanvas ||
367
- target === this.canvasElement ||
368
- this.polygonCanvas.contains(target) ||
369
- this.canvasElement.contains(target);
370
- }
371
- sizeCanvas(width, height) {
372
- if (this.canvasElement) {
373
- this.canvasElement.width = width;
374
- this.canvasElement.height = height;
375
- }
376
- if (this.polygonCanvas) {
377
- this.polygonCanvas.width = width;
378
- this.polygonCanvas.height = height;
379
- this.polygonCtx = this.polygonCanvas.getContext("2d");
380
- if (this.canvasManager) {
381
- this.canvasManager.updateCanvasSize({
382
- width: width,
383
- height: height,
384
- });
385
- }
386
- }
387
- }
388
- async getBuildingInsights() {
389
- if (!state.latitude || !state.longitude) {
390
- return;
391
- }
392
- if (this.buildingInsights) {
393
- const sameLocation = this.buildingInsights.center.latitude === state.latitude &&
394
- this.buildingInsights.center.longitude === state.longitude;
395
- if (sameLocation) {
396
- return;
397
- }
398
- this.solarSystem = {};
399
- this.canvasElement?.getContext("2d")?.clearRect(0, 0, this.canvasElement.width, this.canvasElement.height);
400
- this.polygonCtx?.clearRect(0, 0, this.polygonCanvas.width, this.polygonCanvas.height);
401
- this.rgbTiff = null;
402
- this.canvasManager?.clearPolygons();
403
- // Reset tutorial states for new location
404
- this.resetTutorials();
405
- }
406
- try {
407
- this.buildingInsights = await fetchSolarData(state.latitude, state.longitude, this.apiKey);
408
- if (!this.buildingInsights) {
409
- console.error("No building insights found. Please enter them manually.");
410
- }
411
- }
412
- catch (error) {
413
- console.error("Failed to get building insights:", error);
414
- }
415
- }
416
- async getBuildingImages() {
417
- if (!state.latitude || !state.longitude) {
418
- return;
419
- }
420
- // Check if we already have building insights for the same location
421
- if (this.buildingInsights) {
422
- const sameLocation = this.buildingInsights.center.latitude === state.latitude &&
423
- this.buildingInsights.center.longitude === state.longitude;
424
- if (sameLocation) {
425
- return;
426
- }
427
- }
428
- try {
429
- this.rgbTiff = await getBuildingImages(state.latitude, state.longitude, this.apiKey, state.radiusMeters);
430
- if (this.rgbTiff) {
431
- this.pixelInMeters = getPixelInMeters(this.rgbTiff);
432
- if (this.canvasManager) {
433
- this.canvasManager.setMeterToPixelRatio(this.pixelInMeters);
434
- }
435
- // this.loadingState = "loaded";
436
- }
437
- else {
438
- this.loadingState = "error";
439
- }
440
- }
441
- catch (error) {
442
- console.error("Failed to get building images:", error);
443
- this.loadingState = "error";
444
- }
445
- }
446
- async drawMap() {
447
- if (!this.canvasElement || !this.rgbTiff) {
448
- return;
449
- }
450
- // Ensure canvas is properly sized
451
- if (!this.canvasElement || !this.rgbTiff) {
452
- return;
453
- }
454
- // Ensure canvas is properly sized
455
- this.sizeCanvas(this.rgbTiff.width, this.rgbTiff.height);
456
- // Add a small delay to ensure canvas sizing is complete
457
- await new Promise((resolve) => setTimeout(resolve, 0));
458
- // Add a small delay to ensure canvas sizing is complete
459
- await new Promise((resolve) => setTimeout(resolve, 0));
460
- try {
461
- renderRGB(this.rgbTiff, undefined, this.canvasElement);
462
- this.loadingState = "loaded";
463
- }
464
- catch (error) {
465
- console.error("Failed to render RGB image:", error);
466
- }
467
- }
468
- undo() {
469
- if (this.canvasManager?.canUndo()) {
470
- this.canvasManager.undo();
471
- // Map harmonia-draw Tool enum back to local Tool
472
- const harmoniaTool = this.canvasManager.getState().selectedTool;
473
- switch (harmoniaTool) {
474
- case Tool.ROOF_POLYGON:
475
- this.currentTool = roofTool;
476
- break;
477
- case Tool.OBSTRUCTION_POLYGON:
478
- this.currentTool = obstructionTool;
479
- break;
480
- case Tool.MOVE:
481
- this.currentTool = moveTool;
482
- break;
483
- case Tool.MARK_ROOF_EDGE:
484
- this.currentTool = markRoofEdgeTool;
485
- break;
486
- default:
487
- this.currentTool = moveTool;
488
- break;
489
- }
490
- // Show toast message
491
- const t = getLanguageStrings(state.settings.language);
492
- this.showToastMessage(t.mapDraw.toast.undoSuccess, "success");
493
- // if (!this.currentPolygon?.closed) {
494
- // this.handleToolSelect(roofTool);
495
- // }
496
- }
497
- }
498
- calculateSolarPanels(showToast = false) {
499
- if (this.currentPolygon) {
500
- this.calculateSolarPanelsForPolygon(this.currentPolygon, false);
501
- // Show toast message only when explicitly requested
502
- if (showToast) {
503
- const t = getLanguageStrings(state.settings.language);
504
- this.showToastMessage(t.mapDraw.toast.calculateSolarPanelsSuccess, "success");
505
- }
506
- }
507
- }
508
- markAsFlatRoof() {
509
- if (this.currentPolygon) {
510
- const newPolygon = {
511
- ...this.currentPolygon,
512
- pitch: 15,
513
- azimuth: 180, // East orientation
514
- };
515
- this.canvasManager?.updatePolygon(newPolygon);
516
- this.currentPolygon = newPolygon;
517
- this.calculateSolarPanelsForPolygon(newPolygon, true);
518
- // Show toast message
519
- const t = getLanguageStrings(state.settings.language);
520
- this.showToastMessage(t.mapDraw.toast.markAsFlatRoofSuccess, "info");
521
- // Auto-select the mark roof edge tool
522
- this.handleToolSelect(markRoofEdgeTool);
523
- }
524
- }
525
- calculateSolarPanelsForPolygon(polygon, isFlatRoof) {
526
- const convertedSolarPanel = {
527
- ...this.solarPanel,
528
- widthMeters: this.solarPanel.widthMeters / this.pixelInMeters,
529
- heightMeters: this.solarPanel.heightMeters / this.pixelInMeters,
530
- };
531
- const inset = BORDER_INSET / this.pixelInMeters;
532
- const solarPanels = getOptimalSolarPositionFully(polygon, this.canvasManager.getObstacles(), convertedSolarPanel, polygon.azimuth, inset, polygon.pitch, state.settings.columnSpacing, state.settings.rowSpacing);
533
- this.canvasManager.setPositionedSolarPanel(polygon.id, solarPanels);
534
- // Convert PositionedSolarPanel[] to SolarPanelSystemPart format
535
- const allPositionedPanels = this.canvasManager
536
- .getAllPositionedSolarPanels();
537
- this.solarSystem = Object.keys(allPositionedPanels).reduce((acc, polygonId) => {
538
- acc[polygonId] = {
539
- numberOfPanels: allPositionedPanels[polygonId].length,
540
- panelType: this.solarPanel,
541
- pitch: polygon.pitch,
542
- azimuth: polygon.azimuth,
543
- roofArea: polygon.area,
544
- isFlatRoof: isFlatRoof,
545
- inverterType: "central",
546
- };
547
- return acc;
548
- }, {});
549
- }
550
- handlePitchChange(event) {
551
- const target = event.target;
552
- const pitch = parseFloat(target.value);
553
- if (this.currentPolygon) {
554
- const newPolygon = {
555
- ...this.currentPolygon,
556
- pitch: pitch,
557
- };
558
- this.canvasManager?.updatePolygon(newPolygon);
559
- this.currentPolygon = newPolygon;
560
- }
561
- if (this.currentPolygon?.type === "roof" &&
562
- this.canvasManager?.getPositionedSolarPanels(this.currentPolygon.id)) {
563
- this.calculateSolarPanels(false);
564
- return;
565
- }
566
- }
567
- handleAzimuthChange(event) {
568
- const target = event.target;
569
- const displayAzimuth = parseFloat(target.value);
570
- const azimuth = (displayAzimuth + 270) % 360;
571
- if (this.currentPolygon) {
572
- const newPolygon = {
573
- ...this.currentPolygon,
574
- azimuth: azimuth,
575
- };
576
- this.canvasManager?.updatePolygon(newPolygon);
577
- this.currentPolygon = newPolygon;
578
- }
579
- if (this.currentPolygon?.type === "roof" &&
580
- this.canvasManager?.getPositionedSolarPanels(this.currentPolygon.id)) {
581
- this.calculateSolarPanels(false);
582
- return;
583
- }
584
- }
585
- handleToolSelect(tool) {
586
- if (this.currentPolygon && !this.currentPolygon.closed &&
587
- this.currentPolygon.points.length > 0) {
588
- alert("Please close the polygon before selecting a tool");
589
- return;
590
- }
591
- this.currentTool = tool;
592
- // Map legacy tools to harmonia-draw tools
593
- if (this.canvasManager) {
594
- switch (tool.name) {
595
- case "roof":
596
- this.canvasManager.setSelectedTool(Tool.ROOF_POLYGON);
597
- break;
598
- case "obstruction":
599
- this.canvasManager.setSelectedTool(Tool.OBSTRUCTION_POLYGON);
600
- break;
601
- case "move":
602
- this.canvasManager.setSelectedTool(Tool.MOVE);
603
- break;
604
- case "markRoofEdge":
605
- this.canvasManager.setSelectedTool(Tool.MARK_ROOF_EDGE);
606
- break;
607
- default:
608
- // For other tools like delete, etc., we handle them manually
609
- break;
610
- }
611
- }
612
- }
613
- handleSettingsClose = () => {
614
- this.showSettings = false;
615
- };
616
- handleSettingsSave = (event) => {
617
- state.settings = event.detail;
618
- state.settingsVersion++;
619
- };
620
- handleTutorialClose = () => {
621
- this.showTutorial = false;
622
- };
623
- handleMarkEdgeTutorialClose = () => {
624
- this.showMarkEdgeTutorial = false;
625
- this.handleToolSelect(markRoofEdgeTool);
626
- };
627
- handleAdditionalToolsTutorialClose = () => {
628
- this.showAdditionalToolsTutorial = false;
629
- this.additionalToolsTutorialShown = true;
630
- };
631
- handleObstacleTutorialClose = () => {
632
- this.showObstacleTutorial = false;
633
- this.obstacleTutorialShown = true;
634
- this.handleToolSelect(obstructionTool);
635
- };
636
- handleObstacleTutorialSkip = () => {
637
- this.showObstacleTutorial = false;
638
- this.obstacleTutorialShown = true;
639
- this.showMarkEdgeTutorial = true;
640
- };
641
- showToastMessage(message, type = "success") {
642
- this.toastMessage = message;
643
- this.toastType = type;
644
- this.showToast = true;
645
- // Hide toast after 3 seconds
646
- setTimeout(() => {
647
- this.showToast = false;
648
- }, 3000);
649
- }
650
- resetTutorials() {
651
- this.showTutorial = false;
652
- this.showMarkEdgeTutorial = false;
653
- this.showAdditionalToolsTutorial = false;
654
- this.showObstacleTutorial = false;
655
- this.additionalToolsTutorialShown = false;
656
- this.obstacleTutorialShown = false;
657
- this.firstPolygonClosed = false;
658
- }
659
- render() {
660
- const t = getLanguageStrings(state.settings.language);
661
- return (h("div", { key: 'bb9de30bfdc8c301648b4e555ee91dd10790cfe1', class: "flex flex-col justify-center items-center w-full h-full gap-4", id: "map-draw" }, this.showTutorial && (h("tutorial-component", { key: '55fb0534409ded5116ef5d0848ef4e18429125dc', onClose: this.handleTutorialClose, title: t.mapDraw.tutorial.title, description: t.mapDraw.tutorial.description, videoSource: getAssetPath("./assets/tutorial1.mp4") })), this.showMarkEdgeTutorial && (h("tutorial-component", { key: '106bb6504bd30cc9fbaa45ea81bce7bc8e35ad89', onClose: this.handleMarkEdgeTutorialClose, title: t.mapDraw.tutorial.markEdge.title, description: t.mapDraw.tutorial.markEdge
662
- .description, videoSource: getAssetPath("./assets/tutorial2.mp4") })), this.showAdditionalToolsTutorial && (h("tutorial-component", { key: '60e9697dc04c89ce174265021ec2f725fc894887', onClose: this
663
- .handleAdditionalToolsTutorialClose, title: t.mapDraw.tutorial.additionalTools.title, description: t.mapDraw.tutorial.additionalTools
664
- .description, videoSource: getAssetPath("./assets/tutorial3.mp4") })), this.showObstacleTutorial && (h("tutorial-component", { key: 'b8ee4d273be4405f0e75433f3c3bfaf8fd38f6ea', onClose: this.handleObstacleTutorialClose, onSkip: this.handleObstacleTutorialSkip, showSkipButton: true, title: t.mapDraw.tutorial.obstacle.title, description: t.mapDraw.tutorial.obstacle.description, videoSource: getAssetPath("./assets/tutorial4.mp4") })), (state.latitude && state.longitude &&
665
- this.loadingState === "loading") && (h("div", { key: '1d9795783a5a4001e8942214f9291ff17e5c9e81', class: "flex items-center justify-center w-full bg-opacity-75 z-20 pt-7 rounded-4xl" }, h("div", { key: '4fe8c9ed7e0f951047ade565c7c7d7c284880af7', class: "animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-secondary" }))), (state.latitude && state.longitude &&
666
- this.loadingState === "error") && (h("div", { key: 'b573fea2e40fe903464df2f9c87418e10645bdbe', class: "flex items-center justify-center w-full bg-opacity-75 z-20 pt-7 rounded-4xl" }, h("div", { key: '8ca895577317ed846e88a74f460bacac13ba1102', class: "text-red-500 text-center text-lg font-semibold" }, t.mapDraw.imageLoadError))), h("div", { key: '5727a6899c7ef16fd65b328f879f382200cd0099', class: "flex items-start justify-center w-full bg-primary rounded-4xl" }, h("div", { key: '8d0cb90847e01380e795426f4eb0d82ee4472fc3', class: "relative flex items-center justify-center w-full rounded-4xl bg-secondary", style: {
667
- aspectRatio: this.rgbTiff
668
- ? `${this.rgbTiff.width}/${this.rgbTiff.height}`
669
- : "",
670
- } }, h("canvas", { key: 'e5dace6eed7f881f26c453ec4a37786940618cea', ref: (el) => this.canvasElement = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", id: "map-draw-canvas", style: {
671
- cursor: this.currentTool.cursor,
672
- } }), h("canvas", { key: '1e4bbef400cd1d95cd0c2bbfbe5c75de77687744', ref: (el) => this.polygonCanvas = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", style: {
673
- cursor: this.currentTool.cursor,
674
- } }))), this.rgbTiff && (h("div", { key: '19e7119b1f12ea5a4380a6b1b1bd5aa70ce9be77', class: "w-full" }, h("div", { key: '3e192ed5048aaeeb3a251ef11b30eda3a5b78668', class: "w-full pb-4" }, h("tool-box", { key: '5d3ee6c1e561b836dfe3566fb95573f669d6e692', currentTool: this.currentTool, onToolSelect: (tool) => this.handleToolSelect(tool), undoCallback: () => this.undo() })), h("div", { key: 'e7a98bcf23ea1653547d7b3eeabd3f784ac7114e', class: "w-full" }, h("polygon-information", { key: 'ca3092abaea53001bf5d008e9e9128e91e07cf01', currentPolygon: this.currentPolygon, numberOfPanels: this.currentPolygon
675
- ? this
676
- .solarSystem[this.currentPolygon.id]
677
- ?.numberOfPanels
678
- : undefined, handleAzimuthChange: (event) => this.handleAzimuthChange(event), handlePitchChange: (event) => this.handlePitchChange(event), calculateSolarPanels: () => this.calculateSolarPanels(true), markAsFlatRoof: () => this.markAsFlatRoof(), currentTool: this.currentTool.name })), h("div", { key: '004d65f46355bb244a1e7ddfa6c6df28ad3f31ad', class: "w-full" }, h("solar-system-form", { key: 'b9c095e76b308a5ab5de11de436eef7401516318', systemConfigs: this.solarSystem, polygons: this.canvasManager?.getPolygons(), roofCanvas: this.canvasElement, polygonCanvas: this.polygonCanvas, pixelInMeters: this.pixelInMeters })))), this.showSettings && (h("settings-modal", { key: 'adfa4fe395cb1a3a275cb1012b05ee7dce24ec45', settings: state.settings, onClose: this.handleSettingsClose, onSave: this.handleSettingsSave })), this.showToast && (h("toast-notification", { key: '5413c46de3d34e9910d011f49e9e39f778f40a69', message: this.toastMessage, type: this.toastType, duration: 3000 }))));
679
- }
680
- static get is() { return "map-draw"; }
681
- static get originalStyleUrls() {
682
- return {
683
- "$": ["../../output.css"]
684
- };
685
- }
686
- static get styleUrls() {
687
- return {
688
- "$": ["../../output.css"]
689
- };
690
- }
691
- static get properties() {
692
- return {
693
- "apiKey": {
694
- "type": "string",
695
- "attribute": "api-key",
696
- "mutable": false,
697
- "complexType": {
698
- "original": "string",
699
- "resolved": "string",
700
- "references": {}
701
- },
702
- "required": false,
703
- "optional": false,
704
- "docs": {
705
- "tags": [],
706
- "text": ""
707
- },
708
- "getter": false,
709
- "setter": false,
710
- "reflect": false,
711
- "defaultValue": "\"\""
712
- },
713
- "config": {
714
- "type": "unknown",
715
- "attribute": "config",
716
- "mutable": false,
717
- "complexType": {
718
- "original": "SolarExpertConfig",
719
- "resolved": "SolarExpertConfig",
720
- "references": {
721
- "SolarExpertConfig": {
722
- "location": "import",
723
- "path": "../../config",
724
- "id": "src/config.ts::SolarExpertConfig"
725
- }
726
- }
727
- },
728
- "required": false,
729
- "optional": false,
730
- "docs": {
731
- "tags": [],
732
- "text": ""
733
- },
734
- "getter": false,
735
- "setter": false,
736
- "defaultValue": "DEFAULT_SOLAR_EXPERT_CONFIG"
737
- },
738
- "solarPanel": {
739
- "type": "unknown",
740
- "attribute": "solar-panel",
741
- "mutable": false,
742
- "complexType": {
743
- "original": "SolarPanelType",
744
- "resolved": "SolarPanelType",
745
- "references": {
746
- "SolarPanelType": {
747
- "location": "import",
748
- "path": "harmonia-types",
749
- "id": "../../../harmonia/packages/harmonia-types/dist/index.d.ts::SolarPanelType"
750
- }
751
- }
752
- },
753
- "required": false,
754
- "optional": false,
755
- "docs": {
756
- "tags": [],
757
- "text": ""
758
- },
759
- "getter": false,
760
- "setter": false,
761
- "defaultValue": "DEFAULT_SOLAR_PANEL_TYPE"
762
- },
763
- "enableSettings": {
764
- "type": "boolean",
765
- "attribute": "enable-settings",
766
- "mutable": false,
767
- "complexType": {
768
- "original": "boolean",
769
- "resolved": "boolean",
770
- "references": {}
771
- },
772
- "required": false,
773
- "optional": false,
774
- "docs": {
775
- "tags": [],
776
- "text": ""
777
- },
778
- "getter": false,
779
- "setter": false,
780
- "reflect": false,
781
- "defaultValue": "false"
782
- }
783
- };
784
- }
785
- static get states() {
786
- return {
787
- "showInstructions": {},
788
- "showSettings": {},
789
- "showTutorial": {},
790
- "showMarkEdgeTutorial": {},
791
- "showAdditionalToolsTutorial": {},
792
- "additionalToolsTutorialShown": {},
793
- "showObstacleTutorial": {},
794
- "obstacleTutorialShown": {},
795
- "firstPolygonClosed": {},
796
- "zoom": {},
797
- "loadingState": {},
798
- "rgbTiff": {},
799
- "currentTool": {},
800
- "buildingInsights": {},
801
- "pixelInMeters": {},
802
- "interaction": {},
803
- "currentPolygon": {},
804
- "solarSystem": {},
805
- "showToast": {},
806
- "toastMessage": {},
807
- "toastType": {}
808
- };
809
- }
810
- static get elementRef() { return "el"; }
811
- static get watchers() {
812
- return [{
813
- "propName": "rgbTiff",
814
- "methodName": "setupCanvasManager"
815
- }, {
816
- "propName": "rgbTiff",
817
- "methodName": "drawMap"
818
- }, {
819
- "propName": "canvasElement",
820
- "methodName": "drawMap"
821
- }];
822
- }
823
- }
824
- //# sourceMappingURL=map-draw.js.map