@excalidraw/excalidraw 0.15.2-6546-81bee8a → 0.15.2-a89952e

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 (316) hide show
  1. package/dist/excalidraw-assets/locales/{ar-SA-json-af9f33573806a2b17db5.js → ar-SA-json-0a59aece60276ed11321.js} +1 -1
  2. package/dist/excalidraw-assets/locales/{bg-BG-json-a3f29bd627c85a3b0c09.js → bg-BG-json-9194ad23121157147546.js} +1 -1
  3. package/dist/excalidraw-assets/locales/{bn-BD-json-3f24d6535bb251542bb5.js → bn-BD-json-ebf1d26fdb12c5bb181e.js} +1 -1
  4. package/dist/excalidraw-assets/locales/{ca-ES-json-7ba6318a6ce18b150755.js → ca-ES-json-79f84ac70a367a68e9a0.js} +1 -1
  5. package/dist/excalidraw-assets/locales/{cs-CZ-json-5d11ff0ce2122c3bbf9d.js → cs-CZ-json-26c3db7e8a6c4e8bcf23.js} +1 -1
  6. package/dist/excalidraw-assets/locales/{da-DK-json-274791ee26d07767950e.js → da-DK-json-547418996cfd8bb285be.js} +1 -1
  7. package/dist/excalidraw-assets/locales/{de-DE-json-725680257d7a1d7db20e.js → de-DE-json-b03af65bb5eff6d7023b.js} +1 -1
  8. package/dist/excalidraw-assets/locales/{el-GR-json-b1a0f73643adea39ed31.js → el-GR-json-ca506c54e42e135959b0.js} +1 -1
  9. package/dist/excalidraw-assets/locales/{es-ES-json-3ca4ab2ad942b5cf8d9a.js → es-ES-json-265b459985c4898b7781.js} +1 -1
  10. package/dist/excalidraw-assets/locales/eu-ES-json-8714a4293a6a397560c4.js +1 -0
  11. package/dist/excalidraw-assets/locales/{fa-IR-json-e00ed81abe02d242bdb3.js → fa-IR-json-d891247fdcbdfc77d42a.js} +1 -1
  12. package/dist/excalidraw-assets/locales/{fi-FI-json-7dcc36b84a5d99012192.js → fi-FI-json-1640f182578a4d4a77ba.js} +1 -1
  13. package/dist/excalidraw-assets/locales/{fr-FR-json-9d97947d53501a0a341e.js → fr-FR-json-08f595b2a14a7f1b5c3f.js} +1 -1
  14. package/dist/excalidraw-assets/locales/{gl-ES-json-2576befc81eaed5aa65e.js → gl-ES-json-190e4b913c120f078129.js} +1 -1
  15. package/dist/excalidraw-assets/locales/{he-IL-json-df9689750e6a9e3fc2b9.js → he-IL-json-a3aadae77e5d8f9d9477.js} +1 -1
  16. package/dist/excalidraw-assets/locales/{hi-IN-json-15b2d720e1b2b20158cb.js → hi-IN-json-f7636cdb60eac7c6d0e9.js} +1 -1
  17. package/dist/excalidraw-assets/locales/{hu-HU-json-484077f149c645102803.js → hu-HU-json-7137c9d42ad71e4291e1.js} +1 -1
  18. package/dist/excalidraw-assets/locales/{id-ID-json-2a2270978704bae8b567.js → id-ID-json-d1156d23b30643d02794.js} +1 -1
  19. package/dist/excalidraw-assets/locales/it-IT-json-304768049d19d44f8b7c.js +1 -0
  20. package/dist/excalidraw-assets/locales/{ja-JP-json-00427e1b4759220948e1.js → ja-JP-json-46cf12c4be04cc8b452d.js} +1 -1
  21. package/dist/excalidraw-assets/locales/{kaa-json-b8a1931a54affae6ce6f.js → kaa-json-52971f5d051ddd65887f.js} +1 -1
  22. package/dist/excalidraw-assets/locales/kab-KAB-json-3d0babc84b87ba5a6c40.js +1 -0
  23. package/dist/excalidraw-assets/locales/{kk-KZ-json-a8e8bbe5119dd3a53af4.js → kk-KZ-json-f7739980a0373cac0448.js} +1 -1
  24. package/dist/excalidraw-assets/locales/{km-KH-json-51759d5379a45b355944.js → km-KH-json-93e08aa0ef1c18f9abe6.js} +1 -1
  25. package/dist/excalidraw-assets/locales/{ko-KR-json-81f8d97ebb8f67b66cbb.js → ko-KR-json-d347255ddd5b17936d70.js} +1 -1
  26. package/dist/excalidraw-assets/locales/{ku-TR-json-24ea9bad0f5c166fcdfa.js → ku-TR-json-1ce02dc10f8f18a3e609.js} +1 -1
  27. package/dist/excalidraw-assets/locales/{lt-LT-json-c97807dbd05b378d19a8.js → lt-LT-json-21dccba82996be6c9978.js} +1 -1
  28. package/dist/excalidraw-assets/locales/{lv-LV-json-4aa8653ffc57472135d1.js → lv-LV-json-2754b00cb2959287583a.js} +1 -1
  29. package/dist/excalidraw-assets/locales/{mr-IN-json-c7e95d47af75ea8f507b.js → mr-IN-json-9fbf7ef2fc6a57f19633.js} +1 -1
  30. package/dist/excalidraw-assets/locales/{my-MM-json-ae47996f76e07c62f2e2.js → my-MM-json-09e2cd449c159b515bd5.js} +1 -1
  31. package/dist/excalidraw-assets/locales/{nb-NO-json-ce4166112fa056369a3d.js → nb-NO-json-fa893095b70cefc2f7e2.js} +1 -1
  32. package/dist/excalidraw-assets/locales/{nl-NL-json-8001e673fb3f434f00ba.js → nl-NL-json-3117b157902ca19b9cc3.js} +1 -1
  33. package/dist/excalidraw-assets/locales/{nn-NO-json-4fe3b63e7c0949e035a1.js → nn-NO-json-e630a5b8e3fd3e0d98d4.js} +1 -1
  34. package/dist/excalidraw-assets/locales/{oc-FR-json-2a7b244777a29ac4540d.js → oc-FR-json-8bfe443f96fa0cc7073b.js} +1 -1
  35. package/dist/excalidraw-assets/locales/pa-IN-json-5b1c3903004d63ad7bda.js +1 -0
  36. package/dist/excalidraw-assets/locales/{pl-PL-json-093569bfd3a5afeda0a3.js → pl-PL-json-85d9c16b934129641849.js} +1 -1
  37. package/dist/excalidraw-assets/locales/pt-BR-json-fc4b878ac107c23255dd.js +1 -0
  38. package/dist/excalidraw-assets/locales/pt-PT-json-47032f63e88e79dd73f2.js +1 -0
  39. package/dist/excalidraw-assets/locales/{ro-RO-json-1cd4bc568653407afe44.js → ro-RO-json-cbce5205231a582024d7.js} +1 -1
  40. package/dist/excalidraw-assets/locales/{ru-RU-json-6f16105f9e3a666bcca9.js → ru-RU-json-99829b1ba9d5093b157b.js} +1 -1
  41. package/dist/excalidraw-assets/locales/{si-LK-json-69b88abfac862b65241d.js → si-LK-json-def580f91ccb834e3c2a.js} +1 -1
  42. package/dist/excalidraw-assets/locales/{sk-SK-json-c53b73a632863f5f447f.js → sk-SK-json-48d5acc83691a9e45243.js} +1 -1
  43. package/dist/excalidraw-assets/locales/{sl-SI-json-571553f7ef1f32c44b9e.js → sl-SI-json-2d3159666a9b694373e0.js} +1 -1
  44. package/dist/excalidraw-assets/locales/{sv-SE-json-29f8fd0f6fe182274d55.js → sv-SE-json-81f406cec5a178dfc603.js} +1 -1
  45. package/dist/excalidraw-assets/locales/{ta-IN-json-3ffe4cded65c2f0ae4b6.js → ta-IN-json-aa166453a01a662a3e07.js} +1 -1
  46. package/dist/excalidraw-assets/locales/{th-TH-json-35e29f56952088017288.js → th-TH-json-56e28d7ee80115f5dc07.js} +1 -1
  47. package/dist/excalidraw-assets/locales/{tr-TR-json-18de81acaa52d2e0f6c6.js → tr-TR-json-abd9e64817a5f1bf722a.js} +1 -1
  48. package/dist/excalidraw-assets/locales/uk-UA-json-f41664cf41fa0a75d303.js +1 -0
  49. package/dist/excalidraw-assets/locales/{vi-VN-json-d4b137a881014828d846.js → vi-VN-json-79622fb3b0a457d8c17b.js} +1 -1
  50. package/dist/excalidraw-assets/locales/zh-CN-json-a4a9d3ae663b3dadfc4a.js +1 -0
  51. package/dist/excalidraw-assets/locales/{zh-HK-json-1fb52905cf97d0b1c945.js → zh-HK-json-b5ebaab9e5576589fd75.js} +1 -1
  52. package/dist/excalidraw-assets/locales/{zh-TW-json-f4a4d2bf76e17e58994d.js → zh-TW-json-666cdd14005847709d40.js} +1 -1
  53. package/dist/excalidraw-assets-dev/locales/{ar-SA-json-e8e481885098e57829de.js → ar-SA-json-70a5f1a783a785b7e93c.js} +1 -1
  54. package/dist/excalidraw-assets-dev/locales/{bg-BG-json-7d3264c2a5893345bf63.js → bg-BG-json-13911f22e77da62aed30.js} +1 -1
  55. package/dist/excalidraw-assets-dev/locales/{bn-BD-json-699c6189a7d8085d681e.js → bn-BD-json-46d393116092c755f0f3.js} +1 -1
  56. package/dist/excalidraw-assets-dev/locales/{ca-ES-json-d981eba7a9f53160ff51.js → ca-ES-json-3498504fc6da812b3058.js} +1 -1
  57. package/dist/excalidraw-assets-dev/locales/{cs-CZ-json-4d677ad1941def4e93fc.js → cs-CZ-json-dde6031123de5441f318.js} +1 -1
  58. package/dist/excalidraw-assets-dev/locales/{da-DK-json-1da0ee18f6134ecc310e.js → da-DK-json-1ad7d7f19aec114ebe50.js} +1 -1
  59. package/dist/excalidraw-assets-dev/locales/{de-DE-json-0be3ec99525c61bdcba3.js → de-DE-json-a7a0a7a8f371bc7ba5c0.js} +1 -1
  60. package/dist/excalidraw-assets-dev/locales/{el-GR-json-388edf089413073931eb.js → el-GR-json-f4a6ef403e57a5227a3a.js} +1 -1
  61. package/dist/excalidraw-assets-dev/locales/{es-ES-json-85cfca766fae1f406fd7.js → es-ES-json-b8442d54aabef318e2dc.js} +1 -1
  62. package/dist/excalidraw-assets-dev/locales/eu-ES-json-43e4d2f5e87feec87329.js +22 -0
  63. package/dist/excalidraw-assets-dev/locales/{fa-IR-json-e5d56b7aca5dc354f7af.js → fa-IR-json-51cdec085b5f875af21b.js} +1 -1
  64. package/dist/excalidraw-assets-dev/locales/{fi-FI-json-cb29a42edf8f5291f8c3.js → fi-FI-json-f97e2e7d43641c0e840a.js} +1 -1
  65. package/dist/excalidraw-assets-dev/locales/{fr-FR-json-b0dbe7d058f2a1a49121.js → fr-FR-json-8979cd243e0bbc81c99b.js} +1 -1
  66. package/dist/excalidraw-assets-dev/locales/{gl-ES-json-d8d0f4cb2490aa386e7f.js → gl-ES-json-36750301d902ad2b2806.js} +1 -1
  67. package/dist/excalidraw-assets-dev/locales/{he-IL-json-105198ac3a4c03bd8c4e.js → he-IL-json-2093e314b87cdcfdd126.js} +1 -1
  68. package/dist/excalidraw-assets-dev/locales/{hi-IN-json-3a90a39ee45b0a25acf0.js → hi-IN-json-cb93e43b65701ce90198.js} +1 -1
  69. package/dist/excalidraw-assets-dev/locales/{hu-HU-json-0b100a81d35a9fbacedc.js → hu-HU-json-4239cb5f99d6fda36fbe.js} +1 -1
  70. package/dist/excalidraw-assets-dev/locales/{id-ID-json-ce0c7798d61b01b6de8e.js → id-ID-json-40f01633ae6046a20158.js} +1 -1
  71. package/dist/excalidraw-assets-dev/locales/it-IT-json-395bb09586a95a3c7a0c.js +22 -0
  72. package/dist/excalidraw-assets-dev/locales/{ja-JP-json-c3b89682cb079237d4b1.js → ja-JP-json-a7e58b0f0528b0d9adee.js} +1 -1
  73. package/dist/excalidraw-assets-dev/locales/{kaa-json-022d123c622de36b2ffd.js → kaa-json-8c158b975f7ac7595487.js} +1 -1
  74. package/dist/excalidraw-assets-dev/locales/kab-KAB-json-16bc09201bc75389e0c2.js +22 -0
  75. package/dist/excalidraw-assets-dev/locales/{kk-KZ-json-2f67b4e257c72ba296ea.js → kk-KZ-json-9d3bab1e41bdd0593cba.js} +1 -1
  76. package/dist/excalidraw-assets-dev/locales/{km-KH-json-6044125ce86d33e4d013.js → km-KH-json-5f033ad55694d12c770d.js} +1 -1
  77. package/dist/excalidraw-assets-dev/locales/{ko-KR-json-7527e56cd2a14c8f4d38.js → ko-KR-json-2d7d04482b8f94ac8f65.js} +1 -1
  78. package/dist/excalidraw-assets-dev/locales/{ku-TR-json-37b6c9f37d164c0a8750.js → ku-TR-json-0dfab20d9c6ac0da2776.js} +1 -1
  79. package/dist/excalidraw-assets-dev/locales/{lt-LT-json-6c724317d3a154ee0922.js → lt-LT-json-f6b8a91c2d0af70bb40a.js} +1 -1
  80. package/dist/excalidraw-assets-dev/locales/{lv-LV-json-d3456c9eed9db873851c.js → lv-LV-json-200fd554e6f50cdb198f.js} +1 -1
  81. package/dist/excalidraw-assets-dev/locales/{mr-IN-json-68c33362d2688cf9a86a.js → mr-IN-json-3fd24dfc0b92db0ecaa3.js} +1 -1
  82. package/dist/excalidraw-assets-dev/locales/{my-MM-json-8bcf2c1106b41d299b22.js → my-MM-json-622c3f7b4b996f4d9675.js} +1 -1
  83. package/dist/excalidraw-assets-dev/locales/{nb-NO-json-1e91626c5141406d4171.js → nb-NO-json-06218da2a78c0389ca45.js} +1 -1
  84. package/dist/excalidraw-assets-dev/locales/{nl-NL-json-d59fb9cdb3694c05d4d3.js → nl-NL-json-558c43ecce00b4f632ed.js} +1 -1
  85. package/dist/excalidraw-assets-dev/locales/{nn-NO-json-2110d3022652857f0d4e.js → nn-NO-json-b1cdc9fe9e3ef6661443.js} +1 -1
  86. package/dist/excalidraw-assets-dev/locales/{oc-FR-json-f59199dae5b5fd1cd73e.js → oc-FR-json-aff7d8ffc8d29dcadf9f.js} +1 -1
  87. package/dist/excalidraw-assets-dev/locales/pa-IN-json-1676618fa49328bc0ecc.js +22 -0
  88. package/dist/excalidraw-assets-dev/locales/{pl-PL-json-89fa28aabd2914fe0396.js → pl-PL-json-52763bf24013775cc692.js} +1 -1
  89. package/dist/excalidraw-assets-dev/locales/pt-BR-json-cc1554e6671be344e008.js +22 -0
  90. package/dist/excalidraw-assets-dev/locales/{pt-PT-json-60936bdd0cb60fa61754.js → pt-PT-json-0b332e1305fa14c732d0.js} +1 -1
  91. package/dist/excalidraw-assets-dev/locales/{ro-RO-json-f55c1fc1cc7a03bf14ec.js → ro-RO-json-672a25ac3a7165011576.js} +1 -1
  92. package/dist/excalidraw-assets-dev/locales/{ru-RU-json-32b411f319cb3486effb.js → ru-RU-json-e88fc7d0b0022da65cd7.js} +1 -1
  93. package/dist/excalidraw-assets-dev/locales/{si-LK-json-b46d31c3231c1a5a9bef.js → si-LK-json-988cd28b7f15bfd7b612.js} +1 -1
  94. package/dist/excalidraw-assets-dev/locales/{sk-SK-json-d32509ca142ed0b8cdcd.js → sk-SK-json-0b543a434ec1a4cc2831.js} +1 -1
  95. package/dist/excalidraw-assets-dev/locales/{sl-SI-json-fa5755e107a0fd45fba1.js → sl-SI-json-3e7849fcb1fe7ed8e146.js} +1 -1
  96. package/dist/excalidraw-assets-dev/locales/{sv-SE-json-246b162a13d49e29a4da.js → sv-SE-json-e594c928d13f0183f9bc.js} +1 -1
  97. package/dist/excalidraw-assets-dev/locales/{ta-IN-json-ece6caa568e593236b8f.js → ta-IN-json-97670b76df151af63fbe.js} +1 -1
  98. package/dist/excalidraw-assets-dev/locales/{th-TH-json-a157cfe4042b491f8a6a.js → th-TH-json-750c74d47969f873875a.js} +1 -1
  99. package/dist/excalidraw-assets-dev/locales/{tr-TR-json-66680580284c2db06be2.js → tr-TR-json-55711d39e393bde4d8e1.js} +1 -1
  100. package/dist/excalidraw-assets-dev/locales/uk-UA-json-1ad24b86d9998c472afe.js +22 -0
  101. package/dist/excalidraw-assets-dev/locales/{vi-VN-json-508428e8e4c39aa390aa.js → vi-VN-json-67cf288dc185122c6fbd.js} +1 -1
  102. package/dist/excalidraw-assets-dev/locales/zh-CN-json-8682588312662adaa170.js +22 -0
  103. package/dist/excalidraw-assets-dev/locales/{zh-HK-json-e69824cc96d688bf90d2.js → zh-HK-json-f5a427054479f0a5781f.js} +1 -1
  104. package/dist/excalidraw-assets-dev/locales/{zh-TW-json-7dbf8aee365138759c72.js → zh-TW-json-b4ebc4c389ccf204d77e.js} +1 -1
  105. package/dist/excalidraw.development.js +566 -71
  106. package/dist/excalidraw.production.min.js +1 -1
  107. package/package.json +2 -2
  108. package/types/actions/actionAddToLibrary.d.ts +6 -6
  109. package/types/actions/actionBoundText.d.ts +4 -4
  110. package/types/actions/actionCanvas.d.ts +21 -21
  111. package/types/actions/actionClipboard.d.ts +10 -10
  112. package/types/actions/actionDeleteSelected.d.ts +6 -6
  113. package/types/actions/actionElementLock.d.ts +243 -0
  114. package/types/actions/actionExport.d.ts +27 -27
  115. package/types/actions/actionFinalize.d.ts +4 -4
  116. package/types/actions/actionHistory.d.ts +1 -1
  117. package/types/actions/actionLinearEditor.d.ts +2 -2
  118. package/types/actions/actionMenu.d.ts +6 -6
  119. package/types/actions/actionProperties.d.ts +28 -28
  120. package/types/actions/actionStyles.d.ts +2 -2
  121. package/types/actions/actionToggleGridMode.d.ts +2 -2
  122. package/types/actions/actionToggleStats.d.ts +2 -2
  123. package/types/actions/actionToggleViewMode.d.ts +2 -2
  124. package/types/actions/actionToggleZenMode.d.ts +2 -2
  125. package/types/actions/actionZindex.d.ts +2 -2
  126. package/types/actions/index.d.ts +1 -1
  127. package/types/actions/shortcuts.d.ts +1 -1
  128. package/types/actions/types.d.ts +7 -7
  129. package/types/appState.d.ts +2 -2
  130. package/types/charts.d.ts +2 -2
  131. package/types/clients.d.ts +4 -1
  132. package/types/colors.d.ts +59 -5
  133. package/types/components/App.d.ts +3 -0
  134. package/types/components/Avatar.d.ts +1 -1
  135. package/types/components/ColorPicker/ColorInput.d.ts +7 -0
  136. package/types/components/ColorPicker/ColorPicker.d.ts +18 -0
  137. package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
  138. package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
  139. package/types/components/ColorPicker/Picker.d.ts +16 -0
  140. package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
  141. package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
  142. package/types/components/ColorPicker/ShadeList.d.ts +8 -0
  143. package/types/components/ColorPicker/TopPicks.d.ts +9 -0
  144. package/types/components/ColorPicker/colorPickerUtils.d.ts +41 -0
  145. package/types/components/ColorPicker/keyboardNavHandlers.d.ts +16 -0
  146. package/types/components/ContextMenu.d.ts +3 -3
  147. package/types/components/FixedSideContainer.d.ts +1 -1
  148. package/types/components/HandButton.d.ts +1 -1
  149. package/types/components/HelpButton.d.ts +1 -1
  150. package/types/components/ImageExportDialog.d.ts +6 -10
  151. package/types/components/Island.d.ts +1 -1
  152. package/types/components/JSONExportDialog.d.ts +1 -1
  153. package/types/components/LayerUI.d.ts +3 -2
  154. package/types/components/LibraryMenuControlButtons.d.ts +4 -4
  155. package/types/components/LibraryMenuHeaderContent.d.ts +3 -1
  156. package/types/components/LockButton.d.ts +1 -1
  157. package/types/components/MobileMenu.d.ts +1 -1
  158. package/types/components/PenModeButton.d.ts +1 -1
  159. package/types/components/Popover.d.ts +1 -1
  160. package/types/components/ProjectName.d.ts +1 -1
  161. package/types/components/Sidebar/common.d.ts +3 -3
  162. package/types/components/Stack.d.ts +1 -1
  163. package/types/components/ToolButton.d.ts +3 -3
  164. package/types/components/Tooltip.d.ts +1 -1
  165. package/types/components/icons.d.ts +1 -1
  166. package/types/constants.d.ts +5 -0
  167. package/types/context/tunnels.d.ts +2 -2
  168. package/types/data/encode.d.ts +1 -1
  169. package/types/data/filesystem.d.ts +1 -1
  170. package/types/data/restore.d.ts +2 -2
  171. package/types/data/types.d.ts +3 -14
  172. package/types/element/Hyperlink.d.ts +2 -2
  173. package/types/element/binding.d.ts +2 -2
  174. package/types/element/bounds.d.ts +1 -1
  175. package/types/element/linearElementEditor.d.ts +2 -2
  176. package/types/element/mutateElement.d.ts +1 -1
  177. package/types/element/newElement.d.ts +4 -5
  178. package/types/element/textElement.d.ts +3 -11
  179. package/types/element/transformHandles.d.ts +5 -5
  180. package/types/element/types.d.ts +35 -35
  181. package/types/errors.d.ts +1 -1
  182. package/types/ga.d.ts +5 -5
  183. package/types/i18n.d.ts +2 -2
  184. package/types/keys.d.ts +1 -1
  185. package/types/packages/excalidraw/example/initialData.d.ts +0 -122
  186. package/types/packages/excalidraw/index.d.ts +1 -1
  187. package/types/packages/utils.d.ts +1 -1
  188. package/types/renderer/renderElement.d.ts +2 -2
  189. package/types/scene/Scene.d.ts +4 -4
  190. package/types/scene/types.d.ts +4 -4
  191. package/types/shapes.d.ts +1 -1
  192. package/types/types.d.ts +35 -33
  193. package/types/utility-types.d.ts +13 -13
  194. package/types/utils.d.ts +4 -4
  195. package/types/zindex.d.ts +2 -2
  196. package/dist/excalidraw-assets/locales/eu-ES-json-7d9398c86be603c5b8bd.js +0 -1
  197. package/dist/excalidraw-assets/locales/it-IT-json-45824e053eb867323aaa.js +0 -1
  198. package/dist/excalidraw-assets/locales/kab-KAB-json-d3b57bc235e6986200cb.js +0 -1
  199. package/dist/excalidraw-assets/locales/pa-IN-json-7a43cceaf71ab41aa772.js +0 -1
  200. package/dist/excalidraw-assets/locales/pt-BR-json-b2e52cb153719f9fcc21.js +0 -1
  201. package/dist/excalidraw-assets/locales/pt-PT-json-37f6807c2e30c2c04e0a.js +0 -1
  202. package/dist/excalidraw-assets/locales/uk-UA-json-ddb1a218e27b6516f707.js +0 -1
  203. package/dist/excalidraw-assets/locales/zh-CN-json-006110a878ce56805814.js +0 -1
  204. package/dist/excalidraw-assets-dev/locales/eu-ES-json-ac9c079dfafc1c496aa6.js +0 -22
  205. package/dist/excalidraw-assets-dev/locales/it-IT-json-0bb94a9b829e3d7eae49.js +0 -22
  206. package/dist/excalidraw-assets-dev/locales/kab-KAB-json-1f7aa99a00c2764bbd6a.js +0 -22
  207. package/dist/excalidraw-assets-dev/locales/pa-IN-json-eee62a309aa298c6a042.js +0 -22
  208. package/dist/excalidraw-assets-dev/locales/pt-BR-json-3cbcf214f049d5e746fd.js +0 -22
  209. package/dist/excalidraw-assets-dev/locales/uk-UA-json-a212f26f95b2989f0430.js +0 -22
  210. package/dist/excalidraw-assets-dev/locales/zh-CN-json-63cf3f7b69e2e58cf7af.js +0 -22
  211. package/types/actions/actionToggleLock.d.ts +0 -122
  212. package/types/components/ColorPicker.d.ts +0 -14
  213. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ar-SA-json-af9f33573806a2b17db5.d.ts → ar-SA-json-0a59aece60276ed11321.d.ts} +0 -0
  214. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{bg-BG-json-a3f29bd627c85a3b0c09.d.ts → bg-BG-json-9194ad23121157147546.d.ts} +0 -0
  215. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{bn-BD-json-3f24d6535bb251542bb5.d.ts → bn-BD-json-ebf1d26fdb12c5bb181e.d.ts} +0 -0
  216. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ca-ES-json-7ba6318a6ce18b150755.d.ts → ca-ES-json-79f84ac70a367a68e9a0.d.ts} +0 -0
  217. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{cs-CZ-json-5d11ff0ce2122c3bbf9d.d.ts → cs-CZ-json-26c3db7e8a6c4e8bcf23.d.ts} +0 -0
  218. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{da-DK-json-274791ee26d07767950e.d.ts → da-DK-json-547418996cfd8bb285be.d.ts} +0 -0
  219. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{de-DE-json-725680257d7a1d7db20e.d.ts → de-DE-json-b03af65bb5eff6d7023b.d.ts} +0 -0
  220. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{el-GR-json-b1a0f73643adea39ed31.d.ts → el-GR-json-ca506c54e42e135959b0.d.ts} +0 -0
  221. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{es-ES-json-3ca4ab2ad942b5cf8d9a.d.ts → es-ES-json-265b459985c4898b7781.d.ts} +0 -0
  222. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{eu-ES-json-7d9398c86be603c5b8bd.d.ts → eu-ES-json-8714a4293a6a397560c4.d.ts} +0 -0
  223. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{fa-IR-json-e00ed81abe02d242bdb3.d.ts → fa-IR-json-d891247fdcbdfc77d42a.d.ts} +0 -0
  224. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{fi-FI-json-7dcc36b84a5d99012192.d.ts → fi-FI-json-1640f182578a4d4a77ba.d.ts} +0 -0
  225. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{fr-FR-json-9d97947d53501a0a341e.d.ts → fr-FR-json-08f595b2a14a7f1b5c3f.d.ts} +0 -0
  226. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{gl-ES-json-2576befc81eaed5aa65e.d.ts → gl-ES-json-190e4b913c120f078129.d.ts} +0 -0
  227. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{he-IL-json-df9689750e6a9e3fc2b9.d.ts → he-IL-json-a3aadae77e5d8f9d9477.d.ts} +0 -0
  228. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{hi-IN-json-15b2d720e1b2b20158cb.d.ts → hi-IN-json-f7636cdb60eac7c6d0e9.d.ts} +0 -0
  229. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{hu-HU-json-484077f149c645102803.d.ts → hu-HU-json-7137c9d42ad71e4291e1.d.ts} +0 -0
  230. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{id-ID-json-2a2270978704bae8b567.d.ts → id-ID-json-d1156d23b30643d02794.d.ts} +0 -0
  231. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{it-IT-json-45824e053eb867323aaa.d.ts → it-IT-json-304768049d19d44f8b7c.d.ts} +0 -0
  232. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ja-JP-json-00427e1b4759220948e1.d.ts → ja-JP-json-46cf12c4be04cc8b452d.d.ts} +0 -0
  233. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{kaa-json-b8a1931a54affae6ce6f.d.ts → kaa-json-52971f5d051ddd65887f.d.ts} +0 -0
  234. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{kab-KAB-json-d3b57bc235e6986200cb.d.ts → kab-KAB-json-3d0babc84b87ba5a6c40.d.ts} +0 -0
  235. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{kk-KZ-json-a8e8bbe5119dd3a53af4.d.ts → kk-KZ-json-f7739980a0373cac0448.d.ts} +0 -0
  236. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{km-KH-json-51759d5379a45b355944.d.ts → km-KH-json-93e08aa0ef1c18f9abe6.d.ts} +0 -0
  237. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ko-KR-json-81f8d97ebb8f67b66cbb.d.ts → ko-KR-json-d347255ddd5b17936d70.d.ts} +0 -0
  238. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ku-TR-json-24ea9bad0f5c166fcdfa.d.ts → ku-TR-json-1ce02dc10f8f18a3e609.d.ts} +0 -0
  239. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{lt-LT-json-c97807dbd05b378d19a8.d.ts → lt-LT-json-21dccba82996be6c9978.d.ts} +0 -0
  240. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{lv-LV-json-4aa8653ffc57472135d1.d.ts → lv-LV-json-2754b00cb2959287583a.d.ts} +0 -0
  241. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{mr-IN-json-c7e95d47af75ea8f507b.d.ts → mr-IN-json-9fbf7ef2fc6a57f19633.d.ts} +0 -0
  242. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{my-MM-json-ae47996f76e07c62f2e2.d.ts → my-MM-json-09e2cd449c159b515bd5.d.ts} +0 -0
  243. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{nb-NO-json-ce4166112fa056369a3d.d.ts → nb-NO-json-fa893095b70cefc2f7e2.d.ts} +0 -0
  244. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{nl-NL-json-8001e673fb3f434f00ba.d.ts → nl-NL-json-3117b157902ca19b9cc3.d.ts} +0 -0
  245. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{nn-NO-json-4fe3b63e7c0949e035a1.d.ts → nn-NO-json-e630a5b8e3fd3e0d98d4.d.ts} +0 -0
  246. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{oc-FR-json-2a7b244777a29ac4540d.d.ts → oc-FR-json-8bfe443f96fa0cc7073b.d.ts} +0 -0
  247. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{pa-IN-json-7a43cceaf71ab41aa772.d.ts → pa-IN-json-5b1c3903004d63ad7bda.d.ts} +0 -0
  248. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{pl-PL-json-093569bfd3a5afeda0a3.d.ts → pl-PL-json-85d9c16b934129641849.d.ts} +0 -0
  249. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{pt-BR-json-b2e52cb153719f9fcc21.d.ts → pt-BR-json-fc4b878ac107c23255dd.d.ts} +0 -0
  250. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{pt-PT-json-37f6807c2e30c2c04e0a.d.ts → pt-PT-json-47032f63e88e79dd73f2.d.ts} +0 -0
  251. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ro-RO-json-1cd4bc568653407afe44.d.ts → ro-RO-json-cbce5205231a582024d7.d.ts} +0 -0
  252. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ru-RU-json-6f16105f9e3a666bcca9.d.ts → ru-RU-json-99829b1ba9d5093b157b.d.ts} +0 -0
  253. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{si-LK-json-69b88abfac862b65241d.d.ts → si-LK-json-def580f91ccb834e3c2a.d.ts} +0 -0
  254. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{sk-SK-json-c53b73a632863f5f447f.d.ts → sk-SK-json-48d5acc83691a9e45243.d.ts} +0 -0
  255. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{sl-SI-json-571553f7ef1f32c44b9e.d.ts → sl-SI-json-2d3159666a9b694373e0.d.ts} +0 -0
  256. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{sv-SE-json-29f8fd0f6fe182274d55.d.ts → sv-SE-json-81f406cec5a178dfc603.d.ts} +0 -0
  257. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ta-IN-json-3ffe4cded65c2f0ae4b6.d.ts → ta-IN-json-aa166453a01a662a3e07.d.ts} +0 -0
  258. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{th-TH-json-35e29f56952088017288.d.ts → th-TH-json-56e28d7ee80115f5dc07.d.ts} +0 -0
  259. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{tr-TR-json-18de81acaa52d2e0f6c6.d.ts → tr-TR-json-abd9e64817a5f1bf722a.d.ts} +0 -0
  260. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{uk-UA-json-ddb1a218e27b6516f707.d.ts → uk-UA-json-f41664cf41fa0a75d303.d.ts} +0 -0
  261. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{vi-VN-json-d4b137a881014828d846.d.ts → vi-VN-json-79622fb3b0a457d8c17b.d.ts} +0 -0
  262. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{zh-CN-json-006110a878ce56805814.d.ts → zh-CN-json-a4a9d3ae663b3dadfc4a.d.ts} +0 -0
  263. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{zh-HK-json-1fb52905cf97d0b1c945.d.ts → zh-HK-json-b5ebaab9e5576589fd75.d.ts} +0 -0
  264. /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{zh-TW-json-f4a4d2bf76e17e58994d.d.ts → zh-TW-json-666cdd14005847709d40.d.ts} +0 -0
  265. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ar-SA-json-e8e481885098e57829de.d.ts → ar-SA-json-70a5f1a783a785b7e93c.d.ts} +0 -0
  266. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{bg-BG-json-7d3264c2a5893345bf63.d.ts → bg-BG-json-13911f22e77da62aed30.d.ts} +0 -0
  267. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{bn-BD-json-699c6189a7d8085d681e.d.ts → bn-BD-json-46d393116092c755f0f3.d.ts} +0 -0
  268. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ca-ES-json-d981eba7a9f53160ff51.d.ts → ca-ES-json-3498504fc6da812b3058.d.ts} +0 -0
  269. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{cs-CZ-json-4d677ad1941def4e93fc.d.ts → cs-CZ-json-dde6031123de5441f318.d.ts} +0 -0
  270. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{da-DK-json-1da0ee18f6134ecc310e.d.ts → da-DK-json-1ad7d7f19aec114ebe50.d.ts} +0 -0
  271. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{de-DE-json-0be3ec99525c61bdcba3.d.ts → de-DE-json-a7a0a7a8f371bc7ba5c0.d.ts} +0 -0
  272. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{el-GR-json-388edf089413073931eb.d.ts → el-GR-json-f4a6ef403e57a5227a3a.d.ts} +0 -0
  273. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{es-ES-json-85cfca766fae1f406fd7.d.ts → es-ES-json-b8442d54aabef318e2dc.d.ts} +0 -0
  274. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{eu-ES-json-ac9c079dfafc1c496aa6.d.ts → eu-ES-json-43e4d2f5e87feec87329.d.ts} +0 -0
  275. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{fa-IR-json-e5d56b7aca5dc354f7af.d.ts → fa-IR-json-51cdec085b5f875af21b.d.ts} +0 -0
  276. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{fi-FI-json-cb29a42edf8f5291f8c3.d.ts → fi-FI-json-f97e2e7d43641c0e840a.d.ts} +0 -0
  277. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{fr-FR-json-b0dbe7d058f2a1a49121.d.ts → fr-FR-json-8979cd243e0bbc81c99b.d.ts} +0 -0
  278. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{gl-ES-json-d8d0f4cb2490aa386e7f.d.ts → gl-ES-json-36750301d902ad2b2806.d.ts} +0 -0
  279. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{he-IL-json-105198ac3a4c03bd8c4e.d.ts → he-IL-json-2093e314b87cdcfdd126.d.ts} +0 -0
  280. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{hi-IN-json-3a90a39ee45b0a25acf0.d.ts → hi-IN-json-cb93e43b65701ce90198.d.ts} +0 -0
  281. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{hu-HU-json-0b100a81d35a9fbacedc.d.ts → hu-HU-json-4239cb5f99d6fda36fbe.d.ts} +0 -0
  282. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{id-ID-json-ce0c7798d61b01b6de8e.d.ts → id-ID-json-40f01633ae6046a20158.d.ts} +0 -0
  283. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{it-IT-json-0bb94a9b829e3d7eae49.d.ts → it-IT-json-395bb09586a95a3c7a0c.d.ts} +0 -0
  284. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ja-JP-json-c3b89682cb079237d4b1.d.ts → ja-JP-json-a7e58b0f0528b0d9adee.d.ts} +0 -0
  285. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{kaa-json-022d123c622de36b2ffd.d.ts → kaa-json-8c158b975f7ac7595487.d.ts} +0 -0
  286. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{kab-KAB-json-1f7aa99a00c2764bbd6a.d.ts → kab-KAB-json-16bc09201bc75389e0c2.d.ts} +0 -0
  287. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{kk-KZ-json-2f67b4e257c72ba296ea.d.ts → kk-KZ-json-9d3bab1e41bdd0593cba.d.ts} +0 -0
  288. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{km-KH-json-6044125ce86d33e4d013.d.ts → km-KH-json-5f033ad55694d12c770d.d.ts} +0 -0
  289. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ko-KR-json-7527e56cd2a14c8f4d38.d.ts → ko-KR-json-2d7d04482b8f94ac8f65.d.ts} +0 -0
  290. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ku-TR-json-37b6c9f37d164c0a8750.d.ts → ku-TR-json-0dfab20d9c6ac0da2776.d.ts} +0 -0
  291. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{lt-LT-json-6c724317d3a154ee0922.d.ts → lt-LT-json-f6b8a91c2d0af70bb40a.d.ts} +0 -0
  292. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{lv-LV-json-d3456c9eed9db873851c.d.ts → lv-LV-json-200fd554e6f50cdb198f.d.ts} +0 -0
  293. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{mr-IN-json-68c33362d2688cf9a86a.d.ts → mr-IN-json-3fd24dfc0b92db0ecaa3.d.ts} +0 -0
  294. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{my-MM-json-8bcf2c1106b41d299b22.d.ts → my-MM-json-622c3f7b4b996f4d9675.d.ts} +0 -0
  295. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{nb-NO-json-1e91626c5141406d4171.d.ts → nb-NO-json-06218da2a78c0389ca45.d.ts} +0 -0
  296. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{nl-NL-json-d59fb9cdb3694c05d4d3.d.ts → nl-NL-json-558c43ecce00b4f632ed.d.ts} +0 -0
  297. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{nn-NO-json-2110d3022652857f0d4e.d.ts → nn-NO-json-b1cdc9fe9e3ef6661443.d.ts} +0 -0
  298. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{oc-FR-json-f59199dae5b5fd1cd73e.d.ts → oc-FR-json-aff7d8ffc8d29dcadf9f.d.ts} +0 -0
  299. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{pa-IN-json-eee62a309aa298c6a042.d.ts → pa-IN-json-1676618fa49328bc0ecc.d.ts} +0 -0
  300. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{pl-PL-json-89fa28aabd2914fe0396.d.ts → pl-PL-json-52763bf24013775cc692.d.ts} +0 -0
  301. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{pt-BR-json-3cbcf214f049d5e746fd.d.ts → pt-BR-json-cc1554e6671be344e008.d.ts} +0 -0
  302. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{pt-PT-json-60936bdd0cb60fa61754.d.ts → pt-PT-json-0b332e1305fa14c732d0.d.ts} +0 -0
  303. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ro-RO-json-f55c1fc1cc7a03bf14ec.d.ts → ro-RO-json-672a25ac3a7165011576.d.ts} +0 -0
  304. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ru-RU-json-32b411f319cb3486effb.d.ts → ru-RU-json-e88fc7d0b0022da65cd7.d.ts} +0 -0
  305. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{si-LK-json-b46d31c3231c1a5a9bef.d.ts → si-LK-json-988cd28b7f15bfd7b612.d.ts} +0 -0
  306. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{sk-SK-json-d32509ca142ed0b8cdcd.d.ts → sk-SK-json-0b543a434ec1a4cc2831.d.ts} +0 -0
  307. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{sl-SI-json-fa5755e107a0fd45fba1.d.ts → sl-SI-json-3e7849fcb1fe7ed8e146.d.ts} +0 -0
  308. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{sv-SE-json-246b162a13d49e29a4da.d.ts → sv-SE-json-e594c928d13f0183f9bc.d.ts} +0 -0
  309. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ta-IN-json-ece6caa568e593236b8f.d.ts → ta-IN-json-97670b76df151af63fbe.d.ts} +0 -0
  310. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{th-TH-json-a157cfe4042b491f8a6a.d.ts → th-TH-json-750c74d47969f873875a.d.ts} +0 -0
  311. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{tr-TR-json-66680580284c2db06be2.d.ts → tr-TR-json-55711d39e393bde4d8e1.d.ts} +0 -0
  312. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{uk-UA-json-a212f26f95b2989f0430.d.ts → uk-UA-json-1ad24b86d9998c472afe.d.ts} +0 -0
  313. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{vi-VN-json-508428e8e4c39aa390aa.d.ts → vi-VN-json-67cf288dc185122c6fbd.d.ts} +0 -0
  314. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{zh-CN-json-63cf3f7b69e2e58cf7af.d.ts → zh-CN-json-8682588312662adaa170.d.ts} +0 -0
  315. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{zh-HK-json-e69824cc96d688bf90d2.d.ts → zh-HK-json-f5a427054479f0a5781f.d.ts} +0 -0
  316. /package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{zh-TW-json-7dbf8aee365138759c72.d.ts → zh-TW-json-b4ebc4c389ccf204d77e.d.ts} +0 -0
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see excalidraw.production.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ExcalidrawLib=t(require("react"),require("react-dom")):e.ExcalidrawLib=t(e.React,e.ReactDOM)}(self,(function(e,t){return function(){var n,r,o,i,a={45:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function o(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}n.d(t,{Z:function(){return o}})},6233:function(e,t){var n;n=function(e){e.version="0.3.0";var t=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),n="undefined"!=typeof Buffer;function r(e){for(var n=-1,r=0,o=e.length-7;r<o;)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])];for(;r<o+7;)n=n>>>8^t[255&(n^e[r++])];return-1^n}e.table=t,e.bstr=function(e){if(e.length>32768&&n)return r(new Buffer(e));for(var o=-1,i=e.length-1,a=0;a<i;)o=t[255&(o^e.charCodeAt(a++))]^o>>>8,o=t[255&(o^e.charCodeAt(a++))]^o>>>8;return a===i&&(o=o>>>8^t[255&(o^e.charCodeAt(a))]),-1^o},e.buf=function(e){if(e.length>1e4)return r(e);for(var n=-1,o=0,i=e.length-3;o<i;)n=(n=(n=(n=n>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])];for(;o<i+3;)n=n>>>8^t[255&(n^e[o++])];return-1^n},e.str=function(e){for(var n,r,o=-1,i=0,a=e.length;i<a;)(n=e.charCodeAt(i++))<128?o=o>>>8^t[255&(o^n)]:n<2048?o=(o=o>>>8^t[255&(o^(192|n>>6&31))])>>>8^t[255&(o^(128|63&n))]:n>=55296&&n<57344?(n=64+(1023&n),r=1023&e.charCodeAt(i++),o=(o=(o=(o=o>>>8^t[255&(o^(240|n>>8&7))])>>>8^t[255&(o^(128|n>>2&63))])>>>8^t[255&(o^(128|r>>6&15|3&n))])>>>8^t[255&(o^(128|63&r))]):o=(o=(o=o>>>8^t[255&(o^(224|n>>12&15))])>>>8^t[255&(o^(128|n>>6&63))])>>>8^t[255&(o^(128|63&n))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?n(t):n({})},4739:function(e,t,n){"use strict";n.d(t,{Dv:function(){return N},KO:function(){return H},Vv:function(){return k},b9:function(){return B},cn:function(){return R},zt:function(){return Z}});var r=n(9787);const o=Symbol(),i=e=>!!e[o],a=e=>{var t,n;null==(n=(t=e[o]).c)||n.call(t)},l=(e,t)=>{const n=e[o].o,r=t[o].o;return n===r||e===r||i(n)&&l(n,t)},c=e=>{const t={o:e,c:null},n=new Promise((n=>{t.c=()=>{t.c=null,n()},e.then(t.c,t.c)}));return n[o]=t,n};var s=Object.defineProperty,u=Object.defineProperties,d=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,m=(e,t,n)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const g=e=>"init"in e,v="r",b="w",y="c",x="s",w=e=>{const t=new WeakMap,n=new WeakMap,r=new Map;let s,w;if(s=new Set,w=new Set,e)for(const[n,r]of e){const e={v:r,r:0,d:new Map};Object.freeze(e),g(n)||console.warn("Found initial value for derived atom which can cause unexpected behavior",n),t.set(n,e)}const k=new WeakMap,E=new WeakMap,j=e=>{let t=E.get(e);return t||(t=new Map,E.set(e,t)),t},S=(e,n)=>{if(e){const t=j(e);let r=t.get(n);return r||(r=S(e.p,n),r&&("p"in r&&r.p.then((()=>t.delete(n))),t.set(n,r))),r}return t.get(n)},O=(e,n,o)=>{if(Object.freeze(o),e){j(e).set(n,o)}else{const e=t.get(n);t.set(n,o),r.has(n)||r.set(n,e)}},_=(e,t=new Map,n)=>{if(!n)return t;const r=new Map;let o=!1;return n.forEach((n=>{var i;const a=(null==(i=S(e,n))?void 0:i.r)||0;r.set(n,a),t.get(n)!==a&&(o=!0)})),t.size!==r.size||o?r:t},C=(e,t,n,r,o)=>{const i=S(e,t);if(i){if(o&&(!("p"in i)||!l(i.p,o)))return i;"p"in i&&a(i.p)}const c={v:n,r:(null==i?void 0:i.r)||0,d:_(e,null==i?void 0:i.d,r)};return i&&"v"in i&&Object.is(i.v,n)?c.d===i.d||c.d.size===i.d.size&&Array.from(c.d.keys()).every((e=>i.d.has(e)))||Promise.resolve().then((()=>{W(e)})):(++c.r,c.d.has(t)&&(c.d=new Map(c.d).set(t,c.r))),O(e,t,c),c},I=(e,t,n,r,o)=>{const i=S(e,t);if(i){if(o&&(!("p"in i)||!l(i.p,o)))return i;"p"in i&&a(i.p)}const c={e:n,r:(null==i?void 0:i.r)||0,d:_(e,null==i?void 0:i.d,r)};return O(e,t,c),c},T=(e,t,n,r)=>{const o=S(e,t);if(o&&"p"in o){if(l(o.p,n))return o;a(o.p)}((e,t,n)=>{let r=k.get(t);r||(r=new Map,k.set(t,r)),n.then((()=>{r.get(e)===n&&(r.delete(e),r.size||k.delete(t))})),r.set(e,n)})(e,t,n);const i={p:n,r:(null==o?void 0:o.r)||0,d:_(e,null==o?void 0:o.d,r)};return O(e,t,i),i},P=(e,t,n,r)=>{if(n instanceof Promise){const o=c(n.then((n=>{C(e,t,n,r,o),W(e)})).catch((n=>{if(n instanceof Promise)return i(n)?n.then((()=>{D(e,t,!0)})):n;I(e,t,n,r,o),W(e)})));return T(e,t,o,r)}return C(e,t,n,r)},M=(e,t)=>{const n=S(e,t);if(n){"p"in n&&a(n.p);const i=(r=((e,t)=>{for(var n in t||(t={}))p.call(t,n)&&m(e,n,t[n]);if(f)for(var n of f(t))h.call(t,n)&&m(e,n,t[n]);return e})({},n),o={i:n.r},u(r,d(o)));O(e,t,i)}else console.warn("[Bug] could not invalidate non existing atom",t);var r,o},D=(e,t,r)=>{if(!r){const r=S(e,t);if(r){if(r.r!==r.i&&"p"in r&&r.p[o].c)return r;if(r.d.forEach(((r,o)=>{if(o!==t)if(n.has(o)){const t=S(e,o);t&&t.r===t.i&&D(e,o)}else D(e,o)})),Array.from(r.d).every((([t,n])=>{const r=S(e,t);return r&&"v"in r&&r.r===n})))return r}}const i=new Set;try{const n=t.read((n=>{i.add(n);const r=n===t?S(e,n):D(e,n);if(r){if("e"in r)throw r.e;if("p"in r)throw r.p;return r.v}if(g(n))return n.init;throw new Error("no atom init")}));return P(e,t,n,i)}catch(n){if(n instanceof Promise){const r=c(n);return T(e,t,r,i)}return I(e,t,n,i)}},A=(e,t)=>D(t,e),L=(e,t)=>!t.l.size&&(!t.t.size||1===t.t.size&&t.t.has(e)),Z=(e,t)=>{const r=n.get(t);null==r||r.t.forEach((n=>{n!==t&&(M(e,n),Z(e,n))}))},z=(e,t,n)=>{let r=!0;const o=(t,n)=>{const r=D(e,t);if("e"in r)throw r.e;if("p"in r){if(null==n?void 0:n.unstable_promise)return r.p.then((()=>o(t,n)));throw console.info("Reading pending atom state in write operation. We throw a promise for now.",t),r.p}if("v"in r)return r.v;throw console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",t),new Error("no value found")},i=t.write(o,((n,o)=>{let i;if(n===t){if(!g(n))throw new Error("atom not writable");const t=(e=>{const t=new Set,n=k.get(e);return n&&(k.delete(e),n.forEach(((e,n)=>{a(e),t.add(n)}))),t})(n);t.forEach((t=>{t!==e&&P(t,n,o)})),P(e,n,o),Z(e,n)}else i=z(e,n,o);return r||W(e),i}),n);return r=!1,e=void 0,i},R=(e,t,n)=>{const r=z(n,e,t);return W(n),r},N=(e,t)=>{const r={t:new Set(t&&[t]),l:new Set};n.set(e,r),w.add(e);if(D(void 0,e).d.forEach(((t,r)=>{const o=n.get(r);o?o.t.add(e):r!==e&&N(r,e)})),(e=>!!e.write)(e)&&e.onMount){const t=t=>R(e,t),n=e.onMount(t);n&&(r.u=n)}return r},B=e=>{var t;const r=null==(t=n.get(e))?void 0:t.u;r&&r(),n.delete(e),w.delete(e);const o=S(void 0,e);o?o.d.forEach(((t,r)=>{if(r!==e){const t=n.get(r);t&&(t.t.delete(e),L(r,t)&&B(r))}})):console.warn("[Bug] could not find atom state to unmount",e)},H=(e,t,r)=>{const o=new Set(t.d.keys());null==r||r.forEach(((t,r)=>{if(o.has(r))return void o.delete(r);const i=n.get(r);i&&(i.t.delete(e),L(r,i)&&B(r))})),o.forEach((t=>{const r=n.get(t);r?r.t.add(e):n.has(e)&&N(t,e)}))},W=e=>{if(e){j(e).forEach(((r,o)=>{if(r!==t.get(o)){const t=n.get(o);null==t||t.l.forEach((t=>t(e)))}}))}else{for(;r.size;){const e=Array.from(r);r.clear(),e.forEach((([e,t])=>{const r=S(void 0,e);r&&r.d!==(null==t?void 0:t.d)&&H(e,r,null==t?void 0:t.d);const o=n.get(e);null==o||o.l.forEach((e=>e()))}))}s.forEach((e=>e()))}},F=(e,n)=>{n&&(e=>{j(e).forEach(((e,n)=>{const r=t.get(n);(e.r>((null==r?void 0:r.r)||0)||"v"in e&&e.r===(null==r?void 0:r.r)&&e.d!==(null==r?void 0:r.d))&&(t.set(n,e),e.d!==(null==r?void 0:r.d)&&H(n,e,null==r?void 0:r.d))}))})(n),W(void 0)},U=(e,t)=>{const r=(e=>{let t=n.get(e);return t||(t=N(e)),t})(e).l;return r.add(t),()=>{r.delete(t),(e=>{const t=n.get(e);t&&L(e,t)&&B(e)})(e)}},K=(e,t)=>{for(const[n,r]of e)g(n)&&(P(t,n,r),Z(t,n));W(t)};return{[v]:A,[b]:R,[y]:F,[x]:U,h:K,n:e=>(s.add(e),()=>{s.delete(e)}),l:()=>w.values(),a:e=>t.get(e),m:e=>n.get(e)}},k=e=>{const t=w(e),n=e=>new Promise(((r,o)=>{const i=t.r(e);"e"in i?o(i.e):r("p"in i?i.p.then((()=>n(e))):i.v)}));return{get:e=>{const n=t.r(e);if("e"in n)throw n.e;if(!("p"in n))return n.v},asyncGet:n,set:(e,n)=>t.w(e,n),sub:(e,n)=>t.s(e,n),SECRET_INTERNAL_store:t}},E=(e,t)=>({s:t?t(e).SECRET_INTERNAL_store:w(e)}),j=new Map,S=e=>(j.has(e)||j.set(e,(0,r.createContext)(E())),j.get(e));var O=Object.defineProperty,_=Object.defineProperties,C=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,M=(e,t,n)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,D=(e,t)=>{for(var n in t||(t={}))T.call(t,n)&&M(e,n,t[n]);if(I)for(var n of I(t))P.call(t,n)&&M(e,n,t[n]);return e};const A=e=>e.debugLabel||e.toString(),L=([e,t])=>Object.fromEntries(t.flatMap((t=>{var n,r;const o=null==(n=e.m)?void 0:n.call(e,t);if(!o)return[];const i=o.t,a=(null==(r=e.a)?void 0:r.call(e,t))||{};return[[A(t),(l=D(D(D({},"e"in a&&{error:a.e}),"p"in a&&{promise:a.p}),"v"in a&&{value:a.v}),c={dependents:Array.from(i).map(A)},_(l,C(c)))]];var l,c}))),Z=({children:e,initialValues:t,scope:n,unstable_createStore:o,unstable_enableVersionedWrite:i})=>{const[a,l]=(0,r.useState)();(0,r.useEffect)((()=>{a&&(c.current.s.c(null,a),delete a.p)}),[a]);const c=(0,r.useRef)();c.current||(c.current=E(t,o),i&&(c.current.w=e=>{l((t=>{const n=t?{p:t}:{};return e(n),n}))})),i||(e=>{const{s:t}=e,[n,o]=(0,r.useState)([]);(0,r.useEffect)((()=>{var e;const n=()=>{var e;o(Array.from((null==(e=t.l)?void 0:e.call(t))||[]))},r=null==(e=t.n)?void 0:e.call(t,n);return n(),r}),[t]),(0,r.useDebugValue)([t,n],L)})(c.current);const s=S(n);return(0,r.createElement)(s.Provider,{value:c.current},e)};let z=0;function R(e,t){const n="atom"+ ++z,r={toString:()=>n};return"function"==typeof e?r.read=e:(r.init=e,r.read=e=>e(r),r.write=(e,t,n)=>t(r,"function"==typeof n?n(e(r)):n)),t&&(r.write=t),r}function N(e,t){const n=S(t),{s:o}=(0,r.useContext)(n),i=(0,r.useCallback)((t=>{const n=o.r(e,t);if("e"in n)throw n.e;if("p"in n)throw n.p;if("v"in n)return n.v;throw new Error("no atom value")}),[o,e]),[[a,l,c],s]=(0,r.useReducer)((0,r.useCallback)(((t,n)=>{const r=i(n);return Object.is(t[1],r)&&t[2]===e?t:[n,r,e]}),[i,e]),void 0,(()=>{const t=void 0;return[t,i(t),e]}));return c!==e&&s(void 0),(0,r.useEffect)((()=>{const t=o.s(e,s);return s(void 0),t}),[o,e]),(0,r.useEffect)((()=>{o.c(e,a)})),(0,r.useDebugValue)(l),l}function B(e,t){const n=S(t),{s:o,w:i}=(0,r.useContext)(n);return(0,r.useCallback)((t=>{if(!("write"in e))throw new Error("not writable atom");const n=n=>o.w(e,t,n);return i?i(n):n()}),[o,i,e])}function H(e,t){return"scope"in e&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),t=e.scope),[N(e,t),B(e,t)]}},200:function(e,t,n){var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=s||u||Function("return this")(),f=Object.prototype.toString,p=Math.max,h=Math.min,m=function(){return d.Date.now()};function g(e,t,n){var o,i,a,l,c,s,u=0,d=!1,f=!1,g=!0;if("function"!=typeof e)throw new TypeError(r);function y(t){var n=o,r=i;return o=i=void 0,u=t,l=e.apply(r,n)}function x(e){return u=e,c=setTimeout(k,t),d?y(e):l}function w(e){var n=e-s;return void 0===s||n>=t||n<0||f&&e-u>=a}function k(){var e=m();if(w(e))return E(e);c=setTimeout(k,function(e){var n=t-(e-s);return f?h(n,a-(e-u)):n}(e))}function E(e){return c=void 0,g&&o?y(e):(o=i=void 0,l)}function j(){var e=m(),n=w(e);if(o=arguments,i=this,s=e,n){if(void 0===c)return x(s);if(f)return c=setTimeout(k,t),y(s)}return void 0===c&&(c=setTimeout(k,t)),l}return t=b(t)||0,v(n)&&(d=!!n.leading,a=(f="maxWait"in n)?p(b(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g),j.cancel=function(){void 0!==c&&clearTimeout(c),u=0,o=s=i=c=void 0},j.flush=function(){return void 0===c?l:E(m())},j}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return v(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),g(e,t,{leading:o,maxWait:t,trailing:i})}},2744:function(e,t,n){"use strict";var r={};(0,n(9187).assign)(r,n(4395),n(578),n(2684)),e.exports=r},4395:function(e,t,n){"use strict";var r=n(7651),o=n(9187),i=n(8592),a=n(5604),l=n(249),c=Object.prototype.toString;function s(e){if(!(this instanceof s))return new s(e);this.options=o.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var u;if(u="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,u)))throw new Error(a[n]);this._dict_set=!0}}function u(e,t){var n=new s(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}s.prototype.push=function(e,t){var n,a,l=this.strm,s=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?l.input=i.string2buf(e):"[object ArrayBuffer]"===c.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new o.Buf8(s),l.next_out=0,l.avail_out=s),1!==(n=r.deflate(l,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==l.avail_out&&(0!==l.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(i.buf2binstring(o.shrinkBuf(l.output,l.next_out))):this.onData(o.shrinkBuf(l.output,l.next_out)))}while((l.avail_in>0||0===l.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),l.avail_out=0,!0)},s.prototype.onData=function(e){this.chunks.push(e)},s.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=s,t.deflate=u,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,u(e,t)}},578:function(e,t,n){"use strict";var r=n(7823),o=n(9187),i=n(8592),a=n(2684),l=n(5604),c=n(249),s=n(9968),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(l[n]);if(this.header=new s,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=i.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(l[n])}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||l[n.err];return n.result}d.prototype.push=function(e,t){var n,l,c,s,d,f=this.strm,p=this.options.chunkSize,h=this.options.dictionary,m=!1;if(this.ended)return!1;l=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=i.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new o.Buf8(p),f.next_out=0,f.avail_out=p),(n=r.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&h&&(n=r.inflateSetDictionary(this.strm,h)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==a.Z_STREAM_END&&(0!==f.avail_in||l!==a.Z_FINISH&&l!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(c=i.utf8border(f.output,f.next_out),s=f.next_out-c,d=i.buf2string(f.output,c),f.next_out=s,f.avail_out=p-s,s&&o.arraySet(f.output,f.output,c,s,0),this.onData(d)):this.onData(o.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(l=a.Z_FINISH),l===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):l!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},9187:function(e,t){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var o in n)r(n,o)&&(e[o]=n[o])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,r,o){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),o);else for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){var t,n,r,o,i,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),o=0,t=0,n=e.length;t<n;t++)i=e[t],a.set(i,o),o+=i.length;return a}},i={arraySet:function(e,t,n,r,o){for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,i))},t.setTyped(n)},8592:function(e,t,n){"use strict";var r=n(9187),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(e){o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){i=!1}for(var a=new r.Buf8(256),l=0;l<256;l++)a[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;function c(e,t){if(t<65534&&(e.subarray&&i||!e.subarray&&o))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,t.string2buf=function(e){var t,n,o,i,a,l=e.length,c=0;for(i=0;i<l;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<l&&56320==(64512&(o=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(o-56320),i++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(c),a=0,i=0;a<c;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<l&&56320==(64512&(o=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(o-56320),i++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return c(e,e.length)},t.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,o=t.length;n<o;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,r,o,i,l=t||e.length,s=new Array(2*l);for(r=0,n=0;n<l;)if((o=e[n++])<128)s[r++]=o;else if((i=a[o])>4)s[r++]=65533,n+=i-1;else{for(o&=2===i?31:3===i?15:7;i>1&&n<l;)o=o<<6|63&e[n++],i--;i>1?s[r++]=65533:o<65536?s[r++]=o:(o-=65536,s[r++]=55296|o>>10&1023,s[r++]=56320|1023&o)}return c(s,r)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},3693:function(e){"use strict";e.exports=function(e,t,n,r){for(var o=65535&e|0,i=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{i=i+(o=o+t[r++]|0)|0}while(--a);o%=65521,i%=65521}return o|i<<16|0}},2684:function(e){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},8464:function(e){"use strict";var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,n,r,o){var i=t,a=o+r;e^=-1;for(var l=o;l<a;l++)e=e>>>8^i[255&(e^n[l])];return-1^e}},7651:function(e,t,n){"use strict";var r,o=n(9187),i=n(8676),a=n(3693),l=n(8464),c=n(5604),s=-2,u=258,d=262,f=103,p=113,h=666;function m(e,t){return e.msg=c[t],t}function g(e){return(e<<1)-(e>4?9:0)}function v(e){for(var t=e.length;--t>=0;)e[t]=0}function b(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(o.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function y(e,t){i._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,b(e.strm)}function x(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function k(e,t){var n,r,o=e.max_chain_length,i=e.strstart,a=e.prev_length,l=e.nice_match,c=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,s=e.window,f=e.w_mask,p=e.prev,h=e.strstart+u,m=s[i+a-1],g=s[i+a];e.prev_length>=e.good_match&&(o>>=2),l>e.lookahead&&(l=e.lookahead);do{if(s[(n=t)+a]===g&&s[n+a-1]===m&&s[n]===s[i]&&s[++n]===s[i+1]){i+=2,n++;do{}while(s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&i<h);if(r=u-(h-i),i=h-u,r>a){if(e.match_start=t,a=r,r>=l)break;m=s[i+a-1],g=s[i+a]}}}while((t=p[t&f])>c&&0!=--o);return a<=e.lookahead?a:e.lookahead}function E(e){var t,n,r,i,c,s,u,f,p,h,m=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-d)){o.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=m?r-m:0}while(--n);t=n=m;do{r=e.prev[--t],e.prev[t]=r>=m?r-m:0}while(--n);i+=m}if(0===e.strm.avail_in)break;if(s=e.strm,u=e.window,f=e.strstart+e.lookahead,p=i,h=void 0,(h=s.avail_in)>p&&(h=p),n=0===h?0:(s.avail_in-=h,o.arraySet(u,s.input,s.next_in,h,f),1===s.state.wrap?s.adler=a(s.adler,u,h,f):2===s.state.wrap&&(s.adler=l(s.adler,u,h,f)),s.next_in+=h,s.total_in+=h,h),e.lookahead+=n,e.lookahead+e.insert>=3)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+3-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<d&&0!==e.strm.avail_in)}function j(e,t){for(var n,r;;){if(e.lookahead<d){if(E(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-d&&(e.match_length=k(e,n)),e.match_length>=3)if(r=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function S(e,t){for(var n,r,o;;){if(e.lookahead<d){if(E(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-d&&(e.match_length=k(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,r=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(y(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=i._tr_tally(e,0,e.window[e.strstart-1]))&&y(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function O(e,t,n,r,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=o}function _(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),v(this.dyn_ltree),v(this.dyn_dtree),v(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),v(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),v(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function C(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:p,e.adler=2===t.wrap?0:1,t.last_flush=0,i._tr_init(t),0):m(e,s)}function I(e){var t,n=C(e);return 0===n&&((t=e.state).window_size=2*t.w_size,v(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function T(e,t,n,r,i,a){if(!e)return s;var l=1;if(-1===t&&(t=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return m(e,s);8===r&&(r=9);var c=new _;return e.state=c,c.strm=e,c.wrap=l,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=i+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+3-1)/3),c.window=new o.Buf8(2*c.w_size),c.head=new o.Buf16(c.hash_size),c.prev=new o.Buf16(c.w_size),c.lit_bufsize=1<<i+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new o.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=a,c.method=n,I(e)}r=[new O(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(E(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)})),new O(4,4,8,4,j),new O(4,5,16,8,j),new O(4,6,32,32,j),new O(4,4,16,16,S),new O(8,16,32,32,S),new O(8,16,128,128,S),new O(8,32,128,256,S),new O(32,128,258,1024,S),new O(32,258,258,4096,S)],t.deflateInit=function(e,t){return T(e,t,8,15,8,0)},t.deflateInit2=T,t.deflateReset=I,t.deflateResetKeep=C,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?s:(e.state.gzhead=t,0):s},t.deflate=function(e,t){var n,o,a,c;if(!e||!e.state||t>5||t<0)return e?m(e,s):s;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||o.status===h&&4!==t)return m(e,0===e.avail_out?-5:s);if(o.strm=e,n=o.last_flush,o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,x(o,31),x(o,139),x(o,8),o.gzhead?(x(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),x(o,255&o.gzhead.time),x(o,o.gzhead.time>>8&255),x(o,o.gzhead.time>>16&255),x(o,o.gzhead.time>>24&255),x(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),x(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(x(o,255&o.gzhead.extra.length),x(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=l(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(x(o,0),x(o,0),x(o,0),x(o,0),x(o,0),x(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),x(o,3),o.status=p);else{var d=8+(o.w_bits-8<<4)<<8;d|=(o.strategy>=2||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(d|=32),d+=31-d%31,o.status=p,w(o,d),0!==o.strstart&&(w(o,e.adler>>>16),w(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending!==o.pending_buf_size));)x(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending===o.pending_buf_size)){c=1;break}c=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,x(o,c)}while(0!==c);o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),0===c&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending===o.pending_buf_size)){c=1;break}c=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,x(o,c)}while(0!==c);o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),0===c&&(o.status=f)}else o.status=f;if(o.status===f&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&b(e),o.pending+2<=o.pending_buf_size&&(x(o,255&e.adler),x(o,e.adler>>8&255),e.adler=0,o.status=p)):o.status=p),0!==o.pending){if(b(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(n)&&4!==t)return m(e,-5);if(o.status===h&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&o.status!==h){var k=2===o.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(E(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var n,r,o,a,l=e.window;;){if(e.lookahead<=u){if(E(e),e.lookahead<=u&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=l[o=e.strstart-1])===l[++o]&&r===l[++o]&&r===l[++o]){a=e.strstart+u;do{}while(r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&o<a);e.match_length=u-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):r[o.level].func(o,t);if(3!==k&&4!==k||(o.status=h),1===k||3===k)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===k&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(v(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),b(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(x(o,255&e.adler),x(o,e.adler>>8&255),x(o,e.adler>>16&255),x(o,e.adler>>24&255),x(o,255&e.total_in),x(o,e.total_in>>8&255),x(o,e.total_in>>16&255),x(o,e.total_in>>24&255)):(w(o,e.adler>>>16),w(o,65535&e.adler)),b(e),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==f&&t!==p&&t!==h?m(e,s):(e.state=null,t===p?m(e,-3):0):s},t.deflateSetDictionary=function(e,t){var n,r,i,l,c,u,d,f,p=t.length;if(!e||!e.state)return s;if(2===(l=(n=e.state).wrap)||1===l&&42!==n.status||n.lookahead)return s;for(1===l&&(e.adler=a(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===l&&(v(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new o.Buf8(n.w_size),o.arraySet(f,t,p-n.w_size,n.w_size,0),t=f,p=n.w_size),c=e.avail_in,u=e.next_in,d=e.input,e.avail_in=p,e.next_in=0,e.input=t,E(n);n.lookahead>=3;){r=n.strstart,i=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--i);n.strstart=r,n.lookahead=2,E(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=u,e.input=d,e.avail_in=c,n.wrap=l,0},t.deflateInfo="pako deflate (from Nodeca project)"},9968:function(e){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},9365:function(e){"use strict";e.exports=function(e,t){var n,r,o,i,a,l,c,s,u,d,f,p,h,m,g,v,b,y,x,w,k,E,j,S,O;n=e.state,r=e.next_in,S=e.input,o=r+(e.avail_in-5),i=e.next_out,O=e.output,a=i-(t-e.avail_out),l=i+(e.avail_out-257),c=n.dmax,s=n.wsize,u=n.whave,d=n.wnext,f=n.window,p=n.hold,h=n.bits,m=n.lencode,g=n.distcode,v=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),y=m[p&v];t:for(;;){if(p>>>=x=y>>>24,h-=x,0===(x=y>>>16&255))O[i++]=65535&y;else{if(!(16&x)){if(0==(64&x)){y=m[(65535&y)+(p&(1<<x)-1)];continue t}if(32&x){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}w=65535&y,(x&=15)&&(h<x&&(p+=S[r++]<<h,h+=8),w+=p&(1<<x)-1,p>>>=x,h-=x),h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),y=g[p&b];n:for(;;){if(p>>>=x=y>>>24,h-=x,!(16&(x=y>>>16&255))){if(0==(64&x)){y=g[(65535&y)+(p&(1<<x)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&y,h<(x&=15)&&(p+=S[r++]<<h,(h+=8)<x&&(p+=S[r++]<<h,h+=8)),(k+=p&(1<<x)-1)>c){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=x,h-=x,k>(x=i-a)){if((x=k-x)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=0,j=f,0===d){if(E+=s-x,x<w){w-=x;do{O[i++]=f[E++]}while(--x);E=i-k,j=O}}else if(d<x){if(E+=s+d-x,(x-=d)<w){w-=x;do{O[i++]=f[E++]}while(--x);if(E=0,d<w){w-=x=d;do{O[i++]=f[E++]}while(--x);E=i-k,j=O}}}else if(E+=d-x,x<w){w-=x;do{O[i++]=f[E++]}while(--x);E=i-k,j=O}for(;w>2;)O[i++]=j[E++],O[i++]=j[E++],O[i++]=j[E++],w-=3;w&&(O[i++]=j[E++],w>1&&(O[i++]=j[E++]))}else{E=i-k;do{O[i++]=O[E++],O[i++]=O[E++],O[i++]=O[E++],w-=3}while(w>2);w&&(O[i++]=O[E++],w>1&&(O[i++]=O[E++]))}break}}break}}while(r<o&&i<l);r-=w=h>>3,p&=(1<<(h-=w<<3))-1,e.next_in=r,e.next_out=i,e.avail_in=r<o?o-r+5:5-(r-o),e.avail_out=i<l?l-i+257:257-(i-l),n.hold=p,n.bits=h}},7823:function(e,t,n){"use strict";var r=n(9187),o=n(3693),i=n(8464),a=n(9365),l=n(6446),c=-2,s=12,u=30;function d(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):c}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):c}function m(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?c:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,h(e))):c}function g(e,t){var n,r;return e?(r=new f,e.state=r,r.window=null,0!==(n=m(e,t))&&(e.state=null),n):c}var v,b,y=!0;function x(e){if(y){var t;for(v=new r.Buf32(512),b=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(l(1,e.lens,0,288,v,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;l(2,e.lens,0,32,b,0,e.work,{bits:5}),y=!1}e.lencode=v,e.lenbits=9,e.distcode=b,e.distbits=5}function w(e,t,n,o){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),o>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>o&&(i=o),r.arraySet(a.window,t,n-o,i,a.wnext),(o-=i)?(r.arraySet(a.window,t,n-o,o,0),a.wnext=o,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}t.inflateReset=h,t.inflateReset2=m,t.inflateResetKeep=p,t.inflateInit=function(e){return g(e,15)},t.inflateInit2=g,t.inflate=function(e,t){var n,f,p,h,m,g,v,b,y,k,E,j,S,O,_,C,I,T,P,M,D,A,L,Z,z=0,R=new r.Buf8(4),N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return c;(n=e.state).mode===s&&(n.mode=13),m=e.next_out,p=e.output,v=e.avail_out,h=e.next_in,f=e.input,g=e.avail_in,b=n.hold,y=n.bits,k=g,E=v,A=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;y<16;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(2&n.wrap&&35615===b){n.check=0,R[0]=255&b,R[1]=b>>>8&255,n.check=i(n.check,R,2,0),b=0,y=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg="incorrect header check",n.mode=u;break}if(8!=(15&b)){e.msg="unknown compression method",n.mode=u;break}if(y-=4,D=8+(15&(b>>>=4)),0===n.wbits)n.wbits=D;else if(D>n.wbits){e.msg="invalid window size",n.mode=u;break}n.dmax=1<<D,e.adler=n.check=1,n.mode=512&b?10:s,b=0,y=0;break;case 2:for(;y<16;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(n.flags=b,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=u;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=u;break}n.head&&(n.head.text=b>>8&1),512&n.flags&&(R[0]=255&b,R[1]=b>>>8&255,n.check=i(n.check,R,2,0)),b=0,y=0,n.mode=3;case 3:for(;y<32;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.head&&(n.head.time=b),512&n.flags&&(R[0]=255&b,R[1]=b>>>8&255,R[2]=b>>>16&255,R[3]=b>>>24&255,n.check=i(n.check,R,4,0)),b=0,y=0,n.mode=4;case 4:for(;y<16;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.head&&(n.head.xflags=255&b,n.head.os=b>>8),512&n.flags&&(R[0]=255&b,R[1]=b>>>8&255,n.check=i(n.check,R,2,0)),b=0,y=0,n.mode=5;case 5:if(1024&n.flags){for(;y<16;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.length=b,n.head&&(n.head.extra_len=b),512&n.flags&&(R[0]=255&b,R[1]=b>>>8&255,n.check=i(n.check,R,2,0)),b=0,y=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((j=n.length)>g&&(j=g),j&&(n.head&&(D=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,f,h,j,D)),512&n.flags&&(n.check=i(n.check,f,j,h)),g-=j,h+=j,n.length-=j),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===g)break e;j=0;do{D=f[h+j++],n.head&&D&&n.length<65536&&(n.head.name+=String.fromCharCode(D))}while(D&&j<g);if(512&n.flags&&(n.check=i(n.check,f,j,h)),g-=j,h+=j,D)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===g)break e;j=0;do{D=f[h+j++],n.head&&D&&n.length<65536&&(n.head.comment+=String.fromCharCode(D))}while(D&&j<g);if(512&n.flags&&(n.check=i(n.check,f,j,h)),g-=j,h+=j,D)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;y<16;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(b!==(65535&n.check)){e.msg="header crc mismatch",n.mode=u;break}b=0,y=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=s;break;case 10:for(;y<32;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}e.adler=n.check=d(b),b=0,y=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=b,n.bits=y,2;e.adler=n.check=1,n.mode=s;case s:if(5===t||6===t)break e;case 13:if(n.last){b>>>=7&y,y-=7&y,n.mode=27;break}for(;y<3;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}switch(n.last=1&b,y-=1,3&(b>>>=1)){case 0:n.mode=14;break;case 1:if(x(n),n.mode=20,6===t){b>>>=2,y-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=u}b>>>=2,y-=2;break;case 14:for(b>>>=7&y,y-=7&y;y<32;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if((65535&b)!=(b>>>16^65535)){e.msg="invalid stored block lengths",n.mode=u;break}if(n.length=65535&b,b=0,y=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(j=n.length){if(j>g&&(j=g),j>v&&(j=v),0===j)break e;r.arraySet(p,f,h,j,m),g-=j,h+=j,v-=j,m+=j,n.length-=j;break}n.mode=s;break;case 17:for(;y<14;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(n.nlen=257+(31&b),b>>>=5,y-=5,n.ndist=1+(31&b),b>>>=5,y-=5,n.ncode=4+(15&b),b>>>=4,y-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=u;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;y<3;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.lens[N[n.have++]]=7&b,b>>>=3,y-=3}for(;n.have<19;)n.lens[N[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},A=l(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,A){e.msg="invalid code lengths set",n.mode=u;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;C=(z=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,I=65535&z,!((_=z>>>24)<=y);){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(I<16)b>>>=_,y-=_,n.lens[n.have++]=I;else{if(16===I){for(Z=_+2;y<Z;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(b>>>=_,y-=_,0===n.have){e.msg="invalid bit length repeat",n.mode=u;break}D=n.lens[n.have-1],j=3+(3&b),b>>>=2,y-=2}else if(17===I){for(Z=_+3;y<Z;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}y-=_,D=0,j=3+(7&(b>>>=_)),b>>>=3,y-=3}else{for(Z=_+7;y<Z;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}y-=_,D=0,j=11+(127&(b>>>=_)),b>>>=7,y-=7}if(n.have+j>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=u;break}for(;j--;)n.lens[n.have++]=D}}if(n.mode===u)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=u;break}if(n.lenbits=9,L={bits:n.lenbits},A=l(1,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,A){e.msg="invalid literal/lengths set",n.mode=u;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},A=l(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,A){e.msg="invalid distances set",n.mode=u;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(g>=6&&v>=258){e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=b,n.bits=y,a(e,E),m=e.next_out,p=e.output,v=e.avail_out,h=e.next_in,f=e.input,g=e.avail_in,b=n.hold,y=n.bits,n.mode===s&&(n.back=-1);break}for(n.back=0;C=(z=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,I=65535&z,!((_=z>>>24)<=y);){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(C&&0==(240&C)){for(T=_,P=C,M=I;C=(z=n.lencode[M+((b&(1<<T+P)-1)>>T)])>>>16&255,I=65535&z,!(T+(_=z>>>24)<=y);){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}b>>>=T,y-=T,n.back+=T}if(b>>>=_,y-=_,n.back+=_,n.length=I,0===C){n.mode=26;break}if(32&C){n.back=-1,n.mode=s;break}if(64&C){e.msg="invalid literal/length code",n.mode=u;break}n.extra=15&C,n.mode=22;case 22:if(n.extra){for(Z=n.extra;y<Z;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.length+=b&(1<<n.extra)-1,b>>>=n.extra,y-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;C=(z=n.distcode[b&(1<<n.distbits)-1])>>>16&255,I=65535&z,!((_=z>>>24)<=y);){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(0==(240&C)){for(T=_,P=C,M=I;C=(z=n.distcode[M+((b&(1<<T+P)-1)>>T)])>>>16&255,I=65535&z,!(T+(_=z>>>24)<=y);){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}b>>>=T,y-=T,n.back+=T}if(b>>>=_,y-=_,n.back+=_,64&C){e.msg="invalid distance code",n.mode=u;break}n.offset=I,n.extra=15&C,n.mode=24;case 24:if(n.extra){for(Z=n.extra;y<Z;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.offset+=b&(1<<n.extra)-1,b>>>=n.extra,y-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=u;break}n.mode=25;case 25:if(0===v)break e;if(j=E-v,n.offset>j){if((j=n.offset-j)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=u;break}j>n.wnext?(j-=n.wnext,S=n.wsize-j):S=n.wnext-j,j>n.length&&(j=n.length),O=n.window}else O=p,S=m-n.offset,j=n.length;j>v&&(j=v),v-=j,n.length-=j;do{p[m++]=O[S++]}while(--j);0===n.length&&(n.mode=21);break;case 26:if(0===v)break e;p[m++]=n.length,v--,n.mode=21;break;case 27:if(n.wrap){for(;y<32;){if(0===g)break e;g--,b|=f[h++]<<y,y+=8}if(E-=v,e.total_out+=E,n.total+=E,E&&(e.adler=n.check=n.flags?i(n.check,p,E,m-E):o(n.check,p,E,m-E)),E=v,(n.flags?b:d(b))!==n.check){e.msg="incorrect data check",n.mode=u;break}b=0,y=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;y<32;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(b!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=u;break}b=0,y=0}n.mode=29;case 29:A=1;break e;case u:A=-3;break e;case 31:return-4;default:return c}return e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=b,n.bits=y,(n.wsize||E!==e.avail_out&&n.mode<u&&(n.mode<27||4!==t))&&w(e,e.output,e.next_out,E-e.avail_out)?(n.mode=31,-4):(k-=e.avail_in,E-=e.avail_out,e.total_in+=k,e.total_out+=E,n.total+=E,n.wrap&&E&&(e.adler=n.check=n.flags?i(n.check,p,E,e.next_out-E):o(n.check,p,E,e.next_out-E)),e.data_type=n.bits+(n.last?64:0)+(n.mode===s?128:0)+(20===n.mode||15===n.mode?256:0),(0===k&&0===E||4===t)&&0===A&&(A=-5),A)},t.inflateEnd=function(e){if(!e||!e.state)return c;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?c:(n.head=t,t.done=!1,0):c},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?c:11===n.mode&&o(1,t,r,0)!==n.check?-3:w(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):c},t.inflateInfo="pako inflate (from Nodeca project)"},6446:function(e,t,n){"use strict";var r=n(9187),o=15,i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,s,u,d,f,p){var h,m,g,v,b,y,x,w,k,E=p.bits,j=0,S=0,O=0,_=0,C=0,I=0,T=0,P=0,M=0,D=0,A=null,L=0,Z=new r.Buf16(16),z=new r.Buf16(16),R=null,N=0;for(j=0;j<=o;j++)Z[j]=0;for(S=0;S<s;S++)Z[t[n+S]]++;for(C=E,_=o;_>=1&&0===Z[_];_--);if(C>_&&(C=_),0===_)return u[d++]=20971520,u[d++]=20971520,p.bits=1,0;for(O=1;O<_&&0===Z[O];O++);for(C<O&&(C=O),P=1,j=1;j<=o;j++)if(P<<=1,(P-=Z[j])<0)return-1;if(P>0&&(0===e||1!==_))return-1;for(z[1]=0,j=1;j<o;j++)z[j+1]=z[j]+Z[j];for(S=0;S<s;S++)0!==t[n+S]&&(f[z[t[n+S]]++]=S);if(0===e?(A=R=f,y=19):1===e?(A=i,L-=257,R=a,N-=257,y=256):(A=l,R=c,y=-1),D=0,S=0,j=O,b=d,I=C,T=0,g=-1,v=(M=1<<C)-1,1===e&&M>852||2===e&&M>592)return 1;for(;;){x=j-T,f[S]<y?(w=0,k=f[S]):f[S]>y?(w=R[N+f[S]],k=A[L+f[S]]):(w=96,k=0),h=1<<j-T,O=m=1<<I;do{u[b+(D>>T)+(m-=h)]=x<<24|w<<16|k|0}while(0!==m);for(h=1<<j-1;D&h;)h>>=1;if(0!==h?(D&=h-1,D+=h):D=0,S++,0==--Z[j]){if(j===_)break;j=t[n+f[S]]}if(j>C&&(D&v)!==g){for(0===T&&(T=C),b+=O,P=1<<(I=j-T);I+T<_&&!((P-=Z[I+T])<=0);)I++,P<<=1;if(M+=1<<I,1===e&&M>852||2===e&&M>592)return 1;u[g=D&v]=C<<24|I<<16|b-d|0}}return 0!==D&&(u[b+D]=j-T<<24|64<<16|0),p.bits=C,0}},5604:function(e){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},8676:function(e,t,n){"use strict";var r=n(9187);function o(e){for(var t=e.length;--t>=0;)e[t]=0}var i=256,a=286,l=30,c=15,s=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);o(p);var h=new Array(60);o(h);var m=new Array(512);o(m);var g=new Array(256);o(g);var v=new Array(29);o(v);var b,y,x,w=new Array(l);function k(e,t,n,r,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function j(e){return e<256?m[e]:m[256+(e>>>7)]}function S(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function O(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,S(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function _(e,t,n){O(e,n[2*t],n[2*t+1])}function C(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function I(e,t,n){var r,o,i=new Array(16),a=0;for(r=1;r<=c;r++)i[r]=a=a+n[r-1]<<1;for(o=0;o<=t;o++){var l=e[2*o+1];0!==l&&(e[2*o]=C(i[l]++,l))}}function T(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<l;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function P(e){e.bi_valid>8?S(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function M(e,t,n,r){var o=2*t,i=2*n;return e[o]<e[i]||e[o]===e[i]&&r[t]<=r[n]}function D(e,t,n){for(var r=e.heap[n],o=n<<1;o<=e.heap_len&&(o<e.heap_len&&M(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!M(t,r,e.heap[o],e.depth));)e.heap[n]=e.heap[o],n=o,o<<=1;e.heap[n]=r}function A(e,t,n){var r,o,a,l,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],o=e.pending_buf[e.l_buf+c],c++,0===r?_(e,o,t):(_(e,(a=g[o])+i+1,t),0!==(l=s[a])&&O(e,o-=v[a],l),_(e,a=j(--r),n),0!==(l=u[a])&&O(e,r-=w[a],l))}while(c<e.last_lit);_(e,256,t)}function L(e,t){var n,r,o,i=t.dyn_tree,a=t.stat_desc.static_tree,l=t.stat_desc.has_stree,s=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<s;n++)0!==i[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):i[2*n+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[o]=0,e.opt_len--,l&&(e.static_len-=a[2*o+1]);for(t.max_code=u,n=e.heap_len>>1;n>=1;n--)D(e,i,n);o=s;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D(e,i,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,i[2*o]=i[2*n]+i[2*r],e.depth[o]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,i[2*n+1]=i[2*r+1]=o,e.heap[1]=o++,D(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,o,i,a,l,s=t.dyn_tree,u=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,m=t.stat_desc.max_length,g=0;for(i=0;i<=c;i++)e.bl_count[i]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(i=s[2*s[2*(r=e.heap[n])+1]+1]+1)>m&&(i=m,g++),s[2*r+1]=i,r>u||(e.bl_count[i]++,a=0,r>=h&&(a=p[r-h]),l=s[2*r],e.opt_len+=l*(i+a),f&&(e.static_len+=l*(d[2*r+1]+a)));if(0!==g){do{for(i=m-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[m]--,g-=2}while(g>0);for(i=m;0!==i;i--)for(r=e.bl_count[i];0!==r;)(o=e.heap[--n])>u||(s[2*o+1]!==i&&(e.opt_len+=(i-s[2*o+1])*s[2*o],s[2*o+1]=i),r--)}}(e,t),I(i,u,e.bl_count)}function Z(e,t,n){var r,o,i=-1,a=t[1],l=0,c=7,s=4;for(0===a&&(c=138,s=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)o=a,a=t[2*(r+1)+1],++l<c&&o===a||(l<s?e.bl_tree[2*o]+=l:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):l<=10?e.bl_tree[34]++:e.bl_tree[36]++,l=0,i=o,0===a?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4))}function z(e,t,n){var r,o,i=-1,a=t[1],l=0,c=7,s=4;for(0===a&&(c=138,s=3),r=0;r<=n;r++)if(o=a,a=t[2*(r+1)+1],!(++l<c&&o===a)){if(l<s)do{_(e,o,e.bl_tree)}while(0!=--l);else 0!==o?(o!==i&&(_(e,o,e.bl_tree),l--),_(e,16,e.bl_tree),O(e,l-3,2)):l<=10?(_(e,17,e.bl_tree),O(e,l-3,3)):(_(e,18,e.bl_tree),O(e,l-11,7));l=0,i=o,0===a?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4)}}o(w);var R=!1;function N(e,t,n,o){O(e,0+(o?1:0),3),function(e,t,n,o){P(e),o&&(S(e,n),S(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}t._tr_init=function(e){R||(!function(){var e,t,n,r,o,i=new Array(16);for(n=0,r=0;r<28;r++)for(v[r]=n,e=0;e<1<<s[r];e++)g[n++]=r;for(g[n-1]=r,o=0,r=0;r<16;r++)for(w[r]=o,e=0;e<1<<u[r];e++)m[o++]=r;for(o>>=7;r<l;r++)for(w[r]=o<<7,e=0;e<1<<u[r]-7;e++)m[256+o++]=r;for(t=0;t<=c;t++)i[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,i[8]++;for(;e<=255;)p[2*e+1]=9,e++,i[9]++;for(;e<=279;)p[2*e+1]=7,e++,i[7]++;for(;e<=287;)p[2*e+1]=8,e++,i[8]++;for(I(p,287,i),e=0;e<l;e++)h[2*e+1]=5,h[2*e]=C(e,5);b=new k(p,s,257,a,c),y=new k(h,u,0,l,c),x=new k(new Array(0),d,0,19,7)}(),R=!0),e.l_desc=new E(e.dyn_ltree,b),e.d_desc=new E(e.dyn_dtree,y),e.bl_desc=new E(e.bl_tree,x),e.bi_buf=0,e.bi_valid=0,T(e)},t._tr_stored_block=N,t._tr_flush_block=function(e,t,n,r){var o,a,l=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<i;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),L(e,e.l_desc),L(e,e.d_desc),l=function(e){var t;for(Z(e,e.dyn_ltree,e.l_desc.max_code),Z(e,e.dyn_dtree,e.d_desc.max_code),L(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*f[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=n+5,n+4<=o&&-1!==t?N(e,t,n,r):4===e.strategy||a===o?(O(e,2+(r?1:0),3),A(e,p,h)):(O(e,4+(r?1:0),3),function(e,t,n,r){var o;for(O(e,t-257,5),O(e,n-1,5),O(e,r-4,4),o=0;o<r;o++)O(e,e.bl_tree[2*f[o]+1],3);z(e,e.dyn_ltree,t-1),z(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),A(e,e.dyn_ltree,e.dyn_dtree)),T(e),r&&P(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(g[n]+i+1)]++,e.dyn_dtree[2*j(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){O(e,2,3),_(e,256,p),function(e){16===e.bi_valid?(S(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},249:function(e){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},9066:function(e){e.exports=function(e){e.data&&e.name&&(e=e.data);for(var t=!0,n="",r="",o=0;o<e.length;o++){var i=e[o];if(t)i?r+=String.fromCharCode(i):t=!1;else{if(!i)throw new Error("Invalid NULL character found. 0x00 character is not permitted in tEXt content");n+=String.fromCharCode(i)}}return{keyword:r,text:n}}},9686:function(e){e.exports=function(e,t){if(e=String(e),t=String(t),!/^[\x00-\xFF]+$/.test(e)||!/^[\x00-\xFF]+$/.test(t))throw new Error("Only Latin-1 characters are permitted in PNG tEXt chunks. You might want to consider base64 encoding and/or zEXt compression");if(e.length>=80)throw new Error('Keyword "'+e+'" is longer than the 79-character limit imposed by the PNG specification');for(var n,r=e.length+t.length+1,o=new Uint8Array(r),i=0,a=0;a<e.length;a++){if(!(n=e.charCodeAt(a)))throw new Error("0x00 character is not permitted in tEXt keywords");o[i++]=n}o[i++]=0;for(var l=0;l<t.length;l++){if(!(n=t.charCodeAt(l)))throw new Error("0x00 character is not permitted in tEXt content");o[i++]=n}return{name:"tEXt",data:o}}},1194:function(e,t,n){t.encode=n(9686),t.decode=n(9066)},3434:function(e,t,n){var r=n(5714),o=n(6233);e.exports=function(e){var t,n=8,c=n;for(t=0;t<e.length;t++)n+=e[t].data.length,n+=12;var s=new Uint8Array(n);for(s[0]=137,s[1]=80,s[2]=78,s[3]=71,s[4]=13,s[5]=10,s[6]=26,s[7]=10,t=0;t<e.length;t++){var u=e[t],d=u.name,f=u.data,p=f.length,h=[d.charCodeAt(0),d.charCodeAt(1),d.charCodeAt(2),d.charCodeAt(3)];l[0]=p,s[c++]=i[3],s[c++]=i[2],s[c++]=i[1],s[c++]=i[0],s[c++]=h[0],s[c++]=h[1],s[c++]=h[2],s[c++]=h[3];for(var m=0;m<p;)s[c++]=f[m++];var g=h.concat(r(f)),v=o.buf(g);a[0]=v,s[c++]=i[3],s[c++]=i[2],s[c++]=i[1],s[c++]=i[0]}return s};var i=new Uint8Array(4),a=new Int32Array(i.buffer),l=new Uint32Array(i.buffer)},2983:function(e,t,n){var r=n(6233);e.exports=function(e){if(137!==e[0])throw new Error("Invalid .png file header");if(80!==e[1])throw new Error("Invalid .png file header");if(78!==e[2])throw new Error("Invalid .png file header");if(71!==e[3])throw new Error("Invalid .png file header");if(13!==e[4])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(10!==e[5])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(26!==e[6])throw new Error("Invalid .png file header");if(10!==e[7])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");var t=!1,n=[],l=8;for(;l<e.length;){o[3]=e[l++],o[2]=e[l++],o[1]=e[l++],o[0]=e[l++];var c=a[0]+4,s=new Uint8Array(c);s[0]=e[l++],s[1]=e[l++],s[2]=e[l++],s[3]=e[l++];var u=String.fromCharCode(s[0])+String.fromCharCode(s[1])+String.fromCharCode(s[2])+String.fromCharCode(s[3]);if(!n.length&&"IHDR"!==u)throw new Error("IHDR header missing");if("IEND"===u){t=!0,n.push({name:u,data:new Uint8Array(0)});break}for(var d=4;d<c;d++)s[d]=e[l++];o[3]=e[l++],o[2]=e[l++],o[1]=e[l++],o[0]=e[l++];var f=i[0];if(r.buf(s)!==f)throw new Error("CRC values for "+u+" header do not match, PNG file is likely corrupted");var p=new Uint8Array(s.buffer.slice(4));n.push({name:u,data:p})}if(!t)throw new Error(".png file ended prematurely: no IEND header was found");return n};var o=new Uint8Array(4),i=new Int32Array(o.buffer),a=new Uint32Array(o.buffer)},1493:function(e,t,n){"use strict";function r(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function o(e,t,n){const o=r(t,n);if(0===o)return r(e,t);let a=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/o;return a=Math.max(0,Math.min(1,a)),r(e,i(t,n,a))}function i(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function a(e,t,n,o){const l=o||[];if(function(e,t){const n=e[t+0],r=e[t+1],o=e[t+2],i=e[t+3];let a=3*r[0]-2*n[0]-i[0];a*=a;let l=3*r[1]-2*n[1]-i[1];l*=l;let c=3*o[0]-2*i[0]-n[0];c*=c;let s=3*o[1]-2*i[1]-n[1];return s*=s,a<c&&(a=c),l<s&&(l=s),a+l}(e,t)<n){const n=e[t+0];if(l.length){(c=l[l.length-1],s=n,Math.sqrt(r(c,s)))>1&&l.push(n)}else l.push(n);l.push(e[t+3])}else{const r=.5,o=e[t+0],c=e[t+1],s=e[t+2],u=e[t+3],d=i(o,c,r),f=i(c,s,r),p=i(s,u,r),h=i(d,f,r),m=i(f,p,r),g=i(h,m,r);a([o,d,h,g],0,n,l),a([g,m,p,u],0,n,l)}var c,s;return l}function l(e,t){return c(e,0,e.length,t)}function c(e,t,n,r,i){const a=i||[],l=e[t],s=e[n-1];let u=0,d=1;for(let r=t+1;r<n-1;++r){const t=o(e[r],l,s);t>u&&(u=t,d=r)}return Math.sqrt(u)>r?(c(e,t,d+1,r,a),c(e,d,n,r,a)):(a.length||a.push(l),a.push(s)),a}function s(e,t=.15,n){const r=[],o=(e.length-1)/3;for(let n=0;n<o;n++){a(e,3*n,t,r)}return n&&n>0?c(r,0,r.length,n):r}n.d(t,{o:function(){return l},s:function(){return s}})},6094:function(e,t,n){"use strict";var r=n(9787),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,i={},s=null,u=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:u,props:i,_owner:l.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},4512:function(e,t,n){"use strict";e.exports=n(6094)},8152:function(e,t,n){"use strict";function r(){return Math.floor(Math.random()*2**31)}n.d(t,{W:function(){return r},k:function(){return o}});class o{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}},8234:function(e,t,n){"use strict";function r(e,t,n){if(e&&e.length){const[r,o]=t,i=Math.PI/180*n,a=Math.cos(i),l=Math.sin(i);e.forEach((e=>{const[t,n]=e;e[0]=(t-r)*a-(n-o)*l+r,e[1]=(t-r)*l+(n-o)*a+o}))}}function o(e){const t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}function i(e,t){const n=t.hachureAngle+90;let o=t.hachureGap;o<0&&(o=4*t.strokeWidth),o=Math.max(o,.1);const i=[0,0];if(n)for(const t of e)r(t,i,n);const a=function(e,t){const n=[];for(const t of e){const e=[...t];e[0].join(",")!==e[e.length-1].join(",")&&e.push([e[0][0],e[0][1]]),e.length>2&&n.push(e)}const r=[];t=Math.max(t,.1);const o=[];for(const e of n)for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];if(n[1]!==r[1]){const e=Math.min(n[1],r[1]);o.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(o.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!o.length)return r;let i=[],a=o[0].ymin;for(;i.length||o.length;){if(o.length){let e=-1;for(let t=0;t<o.length&&!(o[t].ymin>a);t++)e=t;o.splice(0,e+1).forEach((e=>{i.push({s:a,edge:e})}))}if(i=i.filter((e=>!(e.edge.ymax<=a))),i.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),i.length>1)for(let e=0;e<i.length;e+=2){const t=e+1;if(t>=i.length)break;const n=i[e].edge,o=i[t].edge;r.push([[Math.round(n.x),a],[Math.round(o.x),a]])}a+=t,i.forEach((e=>{e.edge.x=e.edge.x+t*e.edge.islope}))}return r}(e,o);if(n){for(const t of e)r(t,i,-n);!function(e,t,n){const o=[];e.forEach((e=>o.push(...e))),r(o,t,n)}(a,i,-n)}return a}n.d(t,{Z:function(){return G}});class a{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){const n=i(e,t);return{type:"fillSketch",ops:this.renderLines(n,t)}}renderLines(e,t){const n=[];for(const r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}}class l extends a{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);const r=i(e,Object.assign({},t,{hachureGap:n})),a=Math.PI/180*t.hachureAngle,l=[],c=.5*n*Math.cos(a),s=.5*n*Math.sin(a);for(const[e,t]of r)o([e,t])&&l.push([[e[0]-c,e[1]+s],[...t]],[[e[0]+c,e[1]-s],[...t]]);return{type:"fillSketch",ops:this.renderLines(l,t)}}}class c extends a{fillPolygons(e,t){const n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),o=this._fillPolygons(e,r);return n.ops=n.ops.concat(o.ops),n}}class s{constructor(e){this.helper=e}fillPolygons(e,t){const n=i(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){const n=[];let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);const a=r/4;for(const l of e){const e=o(l),c=e/r,s=Math.ceil(c)-1,u=e-s*r,d=(l[0][0]+l[1][0])/2-r/4,f=Math.min(l[0][1],l[1][1]);for(let e=0;e<s;e++){const o=f+u+e*r,l=d-a+2*Math.random()*a,c=o-a+2*Math.random()*a,s=this.helper.ellipse(l,c,i,i,t);n.push(...s.ops)}}return{type:"fillSketch",ops:n}}}class u{constructor(e){this.helper=e}fillPolygons(e,t){const n=i(e,t);return{type:"fillSketch",ops:this.dashedLine(n,t)}}dashedLine(e,t){const n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((e=>{const a=o(e),l=Math.floor(a/(n+r)),c=(a+r-l*(n+r))/2;let s=e[0],u=e[1];s[0]>u[0]&&(s=e[1],u=e[0]);const d=Math.atan((u[1]-s[1])/(u[0]-s[0]));for(let e=0;e<l;e++){const o=e*(n+r),a=o+n,l=[s[0]+o*Math.cos(d)+c*Math.cos(d),s[1]+o*Math.sin(d)+c*Math.sin(d)],u=[s[0]+a*Math.cos(d)+c*Math.cos(d),s[1]+a*Math.sin(d)+c*Math.sin(d)];i.push(...this.helper.doubleLineOps(l[0],l[1],u[0],u[1],t))}})),i}}class d{constructor(e){this.helper=e}fillPolygons(e,t){const n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,o=i(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:"fillSketch",ops:this.zigzagLines(o,r,t)}}zigzagLines(e,t,n){const r=[];return e.forEach((e=>{const i=o(e),a=Math.round(i/(2*t));let l=e[0],c=e[1];l[0]>c[0]&&(l=e[1],c=e[0]);const s=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let e=0;e<a;e++){const o=2*e*t,i=2*(e+1)*t,a=Math.sqrt(2*Math.pow(t,2)),c=[l[0]+o*Math.cos(s),l[1]+o*Math.sin(s)],u=[l[0]+i*Math.cos(s),l[1]+i*Math.sin(s)],d=[c[0]+a*Math.cos(s+Math.PI/4),c[1]+a*Math.sin(s+Math.PI/4)];r.push(...this.helper.doubleLineOps(c[0],c[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}})),r}}const f={};var p=n(8152);const h={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function m(e,t){return e.type===t}function g(e){const t=[],n=function(e){const t=new Array;for(;""!==e;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:0,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:1,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:2,text:""},t}(e);let r="BOD",o=0,i=n[o];for(;!m(i,2);){let a=0;const l=[];if("BOD"===r){if("M"!==i.text&&"m"!==i.text)return g("M0,0"+e);o++,a=h[i.text],r=i.text}else m(i,1)?a=h[r]:(o++,a=h[i.text],r=i.text);if(!(o+a<n.length))throw new Error("Path data ended short");for(let e=o;e<o+a;e++){const t=n[e];if(!m(t,1))throw new Error("Param not a number: "+r+","+t.text);l[l.length]=+t.text}if("number"!=typeof h[r])throw new Error("Bad segment: "+r);{const e={key:r,data:l};t.push(e),o+=a,i=n[o],"M"===r&&(r="L"),"m"===r&&(r="l")}}return t}function v(e){let t=0,n=0,r=0,o=0;const i=[];for(const{key:a,data:l}of e)switch(a){case"M":i.push({key:"M",data:[...l]}),[t,n]=l,[r,o]=l;break;case"m":t+=l[0],n+=l[1],i.push({key:"M",data:[t,n]}),r=t,o=n;break;case"L":i.push({key:"L",data:[...l]}),[t,n]=l;break;case"l":t+=l[0],n+=l[1],i.push({key:"L",data:[t,n]});break;case"C":i.push({key:"C",data:[...l]}),t=l[4],n=l[5];break;case"c":{const e=l.map(((e,r)=>r%2?e+n:e+t));i.push({key:"C",data:e}),t=e[4],n=e[5];break}case"Q":i.push({key:"Q",data:[...l]}),t=l[2],n=l[3];break;case"q":{const e=l.map(((e,r)=>r%2?e+n:e+t));i.push({key:"Q",data:e}),t=e[2],n=e[3];break}case"A":i.push({key:"A",data:[...l]}),t=l[5],n=l[6];break;case"a":t+=l[5],n+=l[6],i.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],t,n]});break;case"H":i.push({key:"H",data:[...l]}),t=l[0];break;case"h":t+=l[0],i.push({key:"H",data:[t]});break;case"V":i.push({key:"V",data:[...l]}),n=l[0];break;case"v":n+=l[0],i.push({key:"V",data:[n]});break;case"S":i.push({key:"S",data:[...l]}),t=l[2],n=l[3];break;case"s":{const e=l.map(((e,r)=>r%2?e+n:e+t));i.push({key:"S",data:e}),t=e[2],n=e[3];break}case"T":i.push({key:"T",data:[...l]}),t=l[0],n=l[1];break;case"t":t+=l[0],n+=l[1],i.push({key:"T",data:[t,n]});break;case"Z":case"z":i.push({key:"Z",data:[]}),t=r,n=o}return i}function b(e){const t=[];let n="",r=0,o=0,i=0,a=0,l=0,c=0;for(const{key:s,data:u}of e){switch(s){case"M":t.push({key:"M",data:[...u]}),[r,o]=u,[i,a]=u;break;case"C":t.push({key:"C",data:[...u]}),r=u[4],o=u[5],l=u[2],c=u[3];break;case"L":t.push({key:"L",data:[...u]}),[r,o]=u;break;case"H":r=u[0],t.push({key:"L",data:[r,o]});break;case"V":o=u[0],t.push({key:"L",data:[r,o]});break;case"S":{let e=0,i=0;"C"===n||"S"===n?(e=r+(r-l),i=o+(o-c)):(e=r,i=o),t.push({key:"C",data:[e,i,...u]}),l=u[0],c=u[1],r=u[2],o=u[3];break}case"T":{const[e,i]=u;let a=0,s=0;"Q"===n||"T"===n?(a=r+(r-l),s=o+(o-c)):(a=r,s=o);const d=r+2*(a-r)/3,f=o+2*(s-o)/3,p=e+2*(a-e)/3,h=i+2*(s-i)/3;t.push({key:"C",data:[d,f,p,h,e,i]}),l=a,c=s,r=e,o=i;break}case"Q":{const[e,n,i,a]=u,s=r+2*(e-r)/3,d=o+2*(n-o)/3,f=i+2*(e-i)/3,p=a+2*(n-a)/3;t.push({key:"C",data:[s,d,f,p,i,a]}),l=e,c=n,r=i,o=a;break}case"A":{const e=Math.abs(u[0]),n=Math.abs(u[1]),i=u[2],a=u[3],l=u[4],c=u[5],s=u[6];if(0===e||0===n)t.push({key:"C",data:[r,o,c,s,c,s]}),r=c,o=s;else if(r!==c||o!==s){x(r,o,c,s,e,n,i,a,l).forEach((function(e){t.push({key:"C",data:e})})),r=c,o=s}break}case"Z":t.push({key:"Z",data:[]}),r=i,o=a}n=s}return t}function y(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function x(e,t,n,r,o,i,a,l,c,s){const u=(d=a,Math.PI*d/180);var d;let f=[],p=0,h=0,m=0,g=0;if(s)[p,h,m,g]=s;else{[e,t]=y(e,t,-u),[n,r]=y(n,r,-u);const a=(e-n)/2,s=(t-r)/2;let d=a*a/(o*o)+s*s/(i*i);d>1&&(d=Math.sqrt(d),o*=d,i*=d);const f=o*o,v=i*i,b=f*v-f*s*s-v*a*a,x=f*s*s+v*a*a,w=(l===c?-1:1)*Math.sqrt(Math.abs(b/x));m=w*o*s/i+(e+n)/2,g=w*-i*a/o+(t+r)/2,p=Math.asin(parseFloat(((t-g)/i).toFixed(9))),h=Math.asin(parseFloat(((r-g)/i).toFixed(9))),e<m&&(p=Math.PI-p),n<m&&(h=Math.PI-h),p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),c&&p>h&&(p-=2*Math.PI),!c&&h>p&&(h-=2*Math.PI)}let v=h-p;if(Math.abs(v)>120*Math.PI/180){const e=h,t=n,l=r;h=c&&h>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=x(n=m+o*Math.cos(h),r=g+i*Math.sin(h),t,l,o,i,a,0,c,[h,e,m,g])}v=h-p;const b=Math.cos(p),w=Math.sin(p),k=Math.cos(h),E=Math.sin(h),j=Math.tan(v/4),S=4/3*o*j,O=4/3*i*j,_=[e,t],C=[e+S*w,t-O*b],I=[n+S*E,r-O*k],T=[n,r];if(C[0]=2*_[0]-C[0],C[1]=2*_[1]-C[1],s)return[C,I,T].concat(f);{f=[C,I,T].concat(f);const e=[];for(let t=0;t<f.length;t+=3){const n=y(f[t][0],f[t][1],u),r=y(f[t+1][0],f[t+1][1],u),o=y(f[t+2][0],f[t+2][1],u);e.push([n[0],n[1],r[0],r[1],o[0],o[1]])}return e}}const w={randOffset:function(e,t){return D(e,t)},randOffsetWithRange:function(e,t,n){return M(e,t,n)},ellipse:function(e,t,n,r,o){const i=O(n,r,o);return _(e,t,o,i).opset},doubleLineOps:function(e,t,n,r,o){return A(e,t,n,r,o,!0)}};function k(e,t,n,r,o){return{type:"path",ops:A(e,t,n,r,o)}}function E(e,t,n){const r=(e||[]).length;if(r>2){const o=[];for(let t=0;t<r-1;t++)o.push(...A(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&o.push(...A(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:o}}return 2===r?k(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function j(e,t,n,r,o){return function(e,t){return E(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],o)}function S(e,t){let n=Z(e,1*(1+.2*t.roughness),t);if(!t.disableMultiStroke){const r=Z(e,1.5*(1+.22*t.roughness),function(e){const t=Object.assign({},e);t.randomizer=void 0,e.seed&&(t.seed=e.seed+1);return t}(t));n=n.concat(r)}return{type:"path",ops:n}}function O(e,t,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),i=2*Math.PI/o;let a=Math.abs(e/2),l=Math.abs(t/2);const c=1-n.curveFitting;return a+=D(a*c,n),l+=D(l*c,n),{increment:i,rx:a,ry:l}}function _(e,t,n,r){const[o,i]=R(r.increment,e,t,r.rx,r.ry,1,r.increment*M(.1,M(.4,1,n),n),n);let a=z(o,null,n);if(!n.disableMultiStroke&&0!==n.roughness){const[o]=R(r.increment,e,t,r.rx,r.ry,1.5,0,n),i=z(o,null,n);a=a.concat(i)}return{estimatedPoints:i,opset:{type:"path",ops:a}}}function C(e,t,n,r,o,i,a,l,c){const s=e,u=t;let d=Math.abs(n/2),f=Math.abs(r/2);d+=D(.01*d,c),f+=D(.01*f,c);let p=o,h=i;for(;p<0;)p+=2*Math.PI,h+=2*Math.PI;h-p>2*Math.PI&&(p=0,h=2*Math.PI);const m=2*Math.PI/c.curveStepCount,g=Math.min(m/2,(h-p)/2),v=N(g,s,u,d,f,p,h,1,c);if(!c.disableMultiStroke){const e=N(g,s,u,d,f,p,h,1.5,c);v.push(...e)}return a&&(l?v.push(...A(s,u,s+d*Math.cos(p),u+f*Math.sin(p),c),...A(s,u,s+d*Math.cos(h),u+f*Math.sin(h),c)):v.push({op:"lineTo",data:[s,u]},{op:"lineTo",data:[s+d*Math.cos(p),u+f*Math.sin(p)]})),{type:"path",ops:v}}function I(e,t){const n=[];for(const r of e)if(r.length){const e=t.maxRandomnessOffset||0,o=r.length;if(o>2){n.push({op:"move",data:[r[0][0]+D(e,t),r[0][1]+D(e,t)]});for(let i=1;i<o;i++)n.push({op:"lineTo",data:[r[i][0]+D(e,t),r[i][1]+D(e,t)]})}}return{type:"fillPath",ops:n}}function T(e,t){return function(e,t){let n=e.fillStyle||"hachure";if(!f[n])switch(n){case"zigzag":f[n]||(f[n]=new l(t));break;case"cross-hatch":f[n]||(f[n]=new c(t));break;case"dots":f[n]||(f[n]=new s(t));break;case"dashed":f[n]||(f[n]=new u(t));break;case"zigzag-line":f[n]||(f[n]=new d(t));break;default:n="hachure",f[n]||(f[n]=new a(t))}return f[n]}(t,w).fillPolygons(e,t)}function P(e){return e.randomizer||(e.randomizer=new p.k(e.seed||0)),e.randomizer.next()}function M(e,t,n,r=1){return n.roughness*r*(P(n)*(t-e)+e)}function D(e,t,n=1){return M(-e,e,t,n)}function A(e,t,n,r,o,i=!1){const a=i?o.disableMultiStrokeFill:o.disableMultiStroke,l=L(e,t,n,r,o,!0,!1);if(a)return l;const c=L(e,t,n,r,o,!0,!0);return l.concat(c)}function L(e,t,n,r,o,i,a){const l=Math.pow(e-n,2)+Math.pow(t-r,2),c=Math.sqrt(l);let s=1;s=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=o.maxRandomnessOffset||0;u*u*100>l&&(u=c/10);const d=u/2,f=.2+.2*P(o);let p=o.bowing*o.maxRandomnessOffset*(r-t)/200,h=o.bowing*o.maxRandomnessOffset*(e-n)/200;p=D(p,o,s),h=D(h,o,s);const m=[],g=()=>D(d,o,s),v=()=>D(u,o,s),b=o.preserveVertices;return i&&(a?m.push({op:"move",data:[e+(b?0:g()),t+(b?0:g())]}):m.push({op:"move",data:[e+(b?0:D(u,o,s)),t+(b?0:D(u,o,s))]})),a?m.push({op:"bcurveTo",data:[p+e+(n-e)*f+g(),h+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),h+t+2*(r-t)*f+g(),n+(b?0:g()),r+(b?0:g())]}):m.push({op:"bcurveTo",data:[p+e+(n-e)*f+v(),h+t+(r-t)*f+v(),p+e+2*(n-e)*f+v(),h+t+2*(r-t)*f+v(),n+(b?0:v()),r+(b?0:v())]}),m}function Z(e,t,n){const r=[];r.push([e[0][0]+D(t,n),e[0][1]+D(t,n)]),r.push([e[0][0]+D(t,n),e[0][1]+D(t,n)]);for(let o=1;o<e.length;o++)r.push([e[o][0]+D(t,n),e[o][1]+D(t,n)]),o===e.length-1&&r.push([e[o][0]+D(t,n),e[o][1]+D(t,n)]);return z(r,null,n)}function z(e,t,n){const r=e.length,o=[];if(r>3){const i=[],a=1-n.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){const n=e[t];i[0]=[n[0],n[1]],i[1]=[n[0]+(a*e[t+1][0]-a*e[t-1][0])/6,n[1]+(a*e[t+1][1]-a*e[t-1][1])/6],i[2]=[e[t+1][0]+(a*e[t][0]-a*e[t+2][0])/6,e[t+1][1]+(a*e[t][1]-a*e[t+2][1])/6],i[3]=[e[t+1][0],e[t+1][1]],o.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[3][0],i[3][1]]})}if(t&&2===t.length){const e=n.maxRandomnessOffset;o.push({op:"lineTo",data:[t[0]+D(e,n),t[1]+D(e,n)]})}}else 3===r?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):2===r&&o.push(...A(e[0][0],e[0][1],e[1][0],e[1][1],n));return o}function R(e,t,n,r,o,i,a,l){const c=[],s=[];if(0===l.roughness){e/=4,s.push([t+r*Math.cos(-e),n+o*Math.sin(-e)]);for(let i=0;i<=2*Math.PI;i+=e){const e=[t+r*Math.cos(i),n+o*Math.sin(i)];c.push(e),s.push(e)}s.push([t+r*Math.cos(0),n+o*Math.sin(0)]),s.push([t+r*Math.cos(e),n+o*Math.sin(e)])}else{const u=D(.5,l)-Math.PI/2;s.push([D(i,l)+t+.9*r*Math.cos(u-e),D(i,l)+n+.9*o*Math.sin(u-e)]);const d=2*Math.PI+u-.01;for(let a=u;a<d;a+=e){const e=[D(i,l)+t+r*Math.cos(a),D(i,l)+n+o*Math.sin(a)];c.push(e),s.push(e)}s.push([D(i,l)+t+r*Math.cos(u+2*Math.PI+.5*a),D(i,l)+n+o*Math.sin(u+2*Math.PI+.5*a)]),s.push([D(i,l)+t+.98*r*Math.cos(u+a),D(i,l)+n+.98*o*Math.sin(u+a)]),s.push([D(i,l)+t+.9*r*Math.cos(u+.5*a),D(i,l)+n+.9*o*Math.sin(u+.5*a)])}return[s,c]}function N(e,t,n,r,o,i,a,l,c){const s=i+D(.1,c),u=[];u.push([D(l,c)+t+.9*r*Math.cos(s-e),D(l,c)+n+.9*o*Math.sin(s-e)]);for(let i=s;i<=a;i+=e)u.push([D(l,c)+t+r*Math.cos(i),D(l,c)+n+o*Math.sin(i)]);return u.push([t+r*Math.cos(a),n+o*Math.sin(a)]),u.push([t+r*Math.cos(a),n+o*Math.sin(a)]),z(u,null,c)}function B(e,t,n,r,o,i,a,l){const c=[],s=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3];let u=[0,0];const d=l.disableMultiStroke?1:2,f=l.preserveVertices;for(let p=0;p<d;p++)0===p?c.push({op:"move",data:[a[0],a[1]]}):c.push({op:"move",data:[a[0]+(f?0:D(s[0],l)),a[1]+(f?0:D(s[0],l))]}),u=f?[o,i]:[o+D(s[p],l),i+D(s[p],l)],c.push({op:"bcurveTo",data:[e+D(s[p],l),t+D(s[p],l),n+D(s[p],l),r+D(s[p],l),u[0],u[1]]});return c}function H(e){return[...e]}var W=n(1493);const F="none";class U{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return(0,p.W)()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,o){const i=this._o(o);return this._d("line",[k(e,t,n,r,i)],i)}rectangle(e,t,n,r,o){const i=this._o(o),a=[],l=j(e,t,n,r,i);if(i.fill){const o=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];"solid"===i.fillStyle?a.push(I([o],i)):a.push(T([o],i))}return i.stroke!==F&&a.push(l),this._d("rectangle",a,i)}ellipse(e,t,n,r,o){const i=this._o(o),a=[],l=O(n,r,i),c=_(e,t,i,l);if(i.fill)if("solid"===i.fillStyle){const n=_(e,t,i,l).opset;n.type="fillPath",a.push(n)}else a.push(T([c.estimatedPoints],i));return i.stroke!==F&&a.push(c.opset),this._d("ellipse",a,i)}circle(e,t,n,r){const o=this.ellipse(e,t,n,n,r);return o.shape="circle",o}linearPath(e,t){const n=this._o(t);return this._d("linearPath",[E(e,!1,n)],n)}arc(e,t,n,r,o,i,a=!1,l){const c=this._o(l),s=[],u=C(e,t,n,r,o,i,a,!0,c);if(a&&c.fill)if("solid"===c.fillStyle){const a=Object.assign({},c);a.disableMultiStroke=!0;const l=C(e,t,n,r,o,i,!0,!1,a);l.type="fillPath",s.push(l)}else s.push(function(e,t,n,r,o,i,a){const l=e,c=t;let s=Math.abs(n/2),u=Math.abs(r/2);s+=D(.01*s,a),u+=D(.01*u,a);let d=o,f=i;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);const p=(f-d)/a.curveStepCount,h=[];for(let e=d;e<=f;e+=p)h.push([l+s*Math.cos(e),c+u*Math.sin(e)]);return h.push([l+s*Math.cos(f),c+u*Math.sin(f)]),h.push([l,c]),T([h],a)}(e,t,n,r,o,i,c));return c.stroke!==F&&s.push(u),this._d("arc",s,c)}curve(e,t){const n=this._o(t),r=[],o=S(e,n);if(n.fill&&n.fill!==F&&e.length>=3){const t=function(e,t=0){const n=e.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(3===n)r.push(H(e[0]),H(e[1]),H(e[2]),H(e[2]));else{const n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);const o=[],i=1-t;r.push(H(n[0]));for(let e=1;e+2<n.length;e++){const t=n[e];o[0]=[t[0],t[1]],o[1]=[t[0]+(i*n[e+1][0]-i*n[e-1][0])/6,t[1]+(i*n[e+1][1]-i*n[e-1][1])/6],o[2]=[n[e+1][0]+(i*n[e][0]-i*n[e+2][0])/6,n[e+1][1]+(i*n[e][1]-i*n[e+2][1])/6],o[3]=[n[e+1][0],n[e+1][1]],r.push(o[1],o[2],o[3])}}return r}(e),o=(0,W.s)(t,10,(1+n.roughness)/2);"solid"===n.fillStyle?r.push(I([o],n)):r.push(T([o],n))}return n.stroke!==F&&r.push(o),this._d("curve",r,n)}polygon(e,t){const n=this._o(t),r=[],o=E(e,!0,n);return n.fill&&("solid"===n.fillStyle?r.push(I([e],n)):r.push(T([e],n))),n.stroke!==F&&r.push(o),this._d("polygon",r,n)}path(e,t){const n=this._o(t),r=[];if(!e)return this._d("path",r,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=n.fill&&"transparent"!==n.fill&&n.fill!==F,i=n.stroke!==F,a=!!(n.simplification&&n.simplification<1),l=function(e,t,n){const r=b(v(g(e))),o=[];let i=[],a=[0,0],l=[];const c=()=>{l.length>=4&&i.push(...(0,W.s)(l,t)),l=[]},s=()=>{c(),i.length&&(o.push(i),i=[])};for(const{key:e,data:t}of r)switch(e){case"M":s(),a=[t[0],t[1]],i.push(a);break;case"L":c(),i.push([t[0],t[1]]);break;case"C":if(!l.length){const e=i.length?i[i.length-1]:a;l.push([e[0],e[1]])}l.push([t[0],t[1]]),l.push([t[2],t[3]]),l.push([t[4],t[5]]);break;case"Z":c(),i.push([a[0],a[1]])}if(s(),!n)return o;const u=[];for(const e of o){const t=(0,W.o)(e,n);t.length&&u.push(t)}return u}(e,1,a?4-4*n.simplification:(1+n.roughness)/2);return o&&("solid"===n.fillStyle?r.push(I(l,n)):r.push(T(l,n))),i&&(a?l.forEach((e=>{r.push(E(e,!1,n))})):r.push(function(e,t){const n=b(v(g(e))),r=[];let o=[0,0],i=[0,0];for(const{key:e,data:a}of n)switch(e){case"M":{const e=1*(t.maxRandomnessOffset||0),n=t.preserveVertices;r.push({op:"move",data:a.map((r=>r+(n?0:D(e,t))))}),i=[a[0],a[1]],o=[a[0],a[1]];break}case"L":r.push(...A(i[0],i[1],a[0],a[1],t)),i=[a[0],a[1]];break;case"C":{const[e,n,o,l,c,s]=a;r.push(...B(e,n,o,l,c,s,i,t)),i=[c,s];break}case"Z":r.push(...A(i[0],i[1],o[0],o[1],t)),i=[o[0],o[1]]}return{type:"path",ops:r}}(e,n))),this._d("path",r,n)}opsToPath(e,t){let n="";for(const r of e.ops){const e="number"==typeof t&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case"move":n+=`M${e[0]} ${e[1]} `;break;case"bcurveTo":n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case"lineTo":n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){const t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(const e of t){let t=null;switch(e.type){case"path":t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:F};break;case"fillPath":t={d:this.opsToPath(e),stroke:F,strokeWidth:0,fill:n.fill||F};break;case"fillSketch":t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||F,strokeWidth:n,fill:F}}}class K{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new U(t)}draw(e){const t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const i of t)switch(i.type){case"path":r.save(),r.strokeStyle="none"===n.stroke?"transparent":n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,i,o),r.restore();break;case"fillPath":{r.save(),r.fillStyle=n.fill||"";const t="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(r,i,o,t),r.restore();break}case"fillSketch":this.fillSketch(r,i,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r="nonzero"){e.beginPath();for(const r of t.ops){const t="number"==typeof n&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case"move":e.moveTo(t[0],t[1]);break;case"bcurveTo":e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case"lineTo":e.lineTo(t[0],t[1])}}"fillPath"===t.type?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,o){const i=this.gen.line(e,t,n,r,o);return this.draw(i),i}rectangle(e,t,n,r,o){const i=this.gen.rectangle(e,t,n,r,o);return this.draw(i),i}ellipse(e,t,n,r,o){const i=this.gen.ellipse(e,t,n,r,o);return this.draw(i),i}circle(e,t,n,r){const o=this.gen.circle(e,t,n,r);return this.draw(o),o}linearPath(e,t){const n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){const n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,o,i,a=!1,l){const c=this.gen.arc(e,t,n,r,o,i,a,l);return this.draw(c),c}curve(e,t){const n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){const n=this.gen.path(e,t);return this.draw(n),n}}const Y="http://www.w3.org/2000/svg";class V{constructor(e,t){this.svg=e,this.gen=new U(t)}draw(e){const t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,o=r.createElementNS(Y,"g"),i=e.options.fixedDecimalPlaceDigits;for(const a of t){let t=null;switch(a.type){case"path":t=r.createElementNS(Y,"path"),t.setAttribute("d",this.opsToPath(a,i)),t.setAttribute("stroke",n.stroke),t.setAttribute("stroke-width",n.strokeWidth+""),t.setAttribute("fill","none"),n.strokeLineDash&&t.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":t=r.createElementNS(Y,"path"),t.setAttribute("d",this.opsToPath(a,i)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",n.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(r,a,n)}t&&o.appendChild(t)}return o}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);const o=e.createElementNS(Y,"path");return o.setAttribute("d",this.opsToPath(t,n.fixedDecimalPlaceDigits)),o.setAttribute("stroke",n.fill||""),o.setAttribute("stroke-width",r+""),o.setAttribute("fill","none"),n.fillLineDash&&o.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,o){const i=this.gen.line(e,t,n,r,o);return this.draw(i)}rectangle(e,t,n,r,o){const i=this.gen.rectangle(e,t,n,r,o);return this.draw(i)}ellipse(e,t,n,r,o){const i=this.gen.ellipse(e,t,n,r,o);return this.draw(i)}circle(e,t,n,r){const o=this.gen.circle(e,t,n,r);return this.draw(o)}linearPath(e,t){const n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){const n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,o,i,a=!1,l){const c=this.gen.arc(e,t,n,r,o,i,a,l);return this.draw(c)}curve(e,t){const n=this.gen.curve(e,t);return this.draw(n)}path(e,t){const n=this.gen.path(e,t);return this.draw(n)}}var G={canvas:(e,t)=>new K(e,t),svg:(e,t)=>new V(e,t),generator:e=>new U(e),newSeed:()=>U.newSeed()}},5714:function(e){e.exports=function(e,t,n){var r=[],o=e.length;if(0===o)return r;var i=t<0?Math.max(0,t+o):t||0;for(void 0!==n&&(o=n<0?n+o:n);o-- >i;)r[o-i]=e[o];return r}},5422:function(e,t,n){"use strict";var r=n(487),o=n.n(r),i=n(631),a=n.n(i),l=n(2052),c=n.n(l),s=n(4010),u=n.n(s),d=n(1469),f=n.n(d),p=n(9329),h=n.n(p),m=n(2044),g={};g.styleTagTransform=h(),g.setAttributes=u(),g.insert=c().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=f();o()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals},487:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],l=0;l<e.length;l++){var c=e[l],s=r.base?c[0]+r.base:c[0],u=i[s]||0,d="".concat(s," ").concat(u);i[s]=u+1;var f=n(d),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==f)t[f].references++,t[f].updater(p);else{var h=o(p,r);r.byIndex=l,t.splice(l,0,{identifier:d,updater:h,references:1})}a.push(d)}return a}function o(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var l=n(i[a]);t[l].references--}for(var c=r(e,o),s=0;s<i.length;s++){var u=n(i[s]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=c}}},2052:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},1469:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},4010:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},631:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9329:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},2173:function(e,t,n){"use strict";var r=n(9787);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,l=r.useLayoutEffect,c=r.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return l((function(){o.value=n,o.getSnapshot=t,s(o)&&u({inst:o})}),[e,n,t]),a((function(){return s(o)&&u({inst:o}),e((function(){s(o)&&u({inst:o})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},5917:function(e,t,n){"use strict";var r=n(9787),o=n(1374);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,l=r.useRef,c=r.useEffect,s=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=l(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s((function(){function e(e){if(!c){if(c=!0,a=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return l=t}return l=e}if(t=l,i(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(a=e,l=n)}var a,l,c=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,n,r,o]);var p=a(e,d[0],d[1]);return c((function(){f.hasValue=!0,f.value=p}),[p]),u(p),p}},1374:function(e,t,n){"use strict";e.exports=n(2173)},5668:function(e,t,n){"use strict";e.exports=n(5917)},940:function(e,t,n){var r={"./ar-SA.json":[7822,2091],"./bg-BG.json":[1203,1628],"./bn-BD.json":[8525,7429],"./ca-ES.json":[510,5130],"./cs-CZ.json":[7605,6265],"./da-DK.json":[2392,1790],"./de-DE.json":[2853,3082],"./el-GR.json":[9876,1513],"./en.json":[1463],"./es-ES.json":[9952,8759],"./eu-ES.json":[5658,8081],"./fa-IR.json":[3747,5330],"./fi-FI.json":[9490,3512],"./fr-FR.json":[7830,3682],"./gl-ES.json":[5199,2943],"./he-IL.json":[1994,2312],"./hi-IN.json":[4646,9828],"./hu-HU.json":[6373,7368],"./id-ID.json":[3247,3808],"./it-IT.json":[3257,6239],"./ja-JP.json":[198,1204],"./kaa.json":[7941,663],"./kab-KAB.json":[228,9551],"./kk-KZ.json":[8972,22],"./km-KH.json":[5845,6566],"./ko-KR.json":[7596,6844],"./ku-TR.json":[2508,3031],"./lt-LT.json":[3755,8340],"./lv-LV.json":[2327,6768],"./mr-IN.json":[5297,3397],"./my-MM.json":[7704,1477],"./nb-NO.json":[1167,2359],"./nl-NL.json":[290,3024],"./nn-NO.json":[4481,3885],"./oc-FR.json":[2284,1690],"./pa-IN.json":[5383,3162],"./percentages.json":[4451],"./pl-PL.json":[3661,3674],"./pt-BR.json":[8881,3721],"./pt-PT.json":[5622,5395],"./ro-RO.json":[2013,5089],"./ru-RU.json":[2253,8124],"./si-LK.json":[5497,1302],"./sk-SK.json":[4570,8750],"./sl-SI.json":[1984,6071],"./sv-SE.json":[6006,8534],"./ta-IN.json":[3952,2404],"./th-TH.json":[2596,537],"./tr-TR.json":[7315,4977],"./uk-UA.json":[334,7759],"./vi-VN.json":[456,4e3],"./zh-CN.json":[1037,4680],"./zh-HK.json":[5334,7920],"./zh-TW.json":[931,3421]};function o(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],o=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n.t(o,19)}))}o.keys=function(){return Object.keys(r)},o.id=940,e.exports=o},9713:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},6479:function(e,t,n){var r=n(7316);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},7316:function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},4295:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(3940),n.b),u=new URL(n(3147),n.b),d=new URL(n(8303),n.b),f=new URL(n(1273),n.b),p=new URL(n(9577),n.b),h=new URL(n(9729),n.b),m=a()(o()),g=c()(s),v=c()(u),b=c()(d),y=c()(f),x=c()(p),w=c()(h);m.push([e.id,'@font-face{font-family:"Virgil";src:url('+g+');font-display:swap}@font-face{font-family:"Cascadia";src:url('+v+');font-display:swap}@font-face{font-family:"Assistant";src:url('+b+');font-display:swap;font-weight:400}@font-face{font-family:"Assistant";src:url('+y+');font-display:swap;font-weight:500}@font-face{font-family:"Assistant";src:url('+x+');font-display:swap;font-weight:600}@font-face{font-family:"Assistant";src:url('+w+");font-display:swap;font-weight:700}",""]),t.Z=m},6086:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".zoom-actions,.undo-redo-buttons{background-color:var(--island-bg-color);border-radius:var(--border-radius-lg)}.zoom-button,.undo-redo-buttons button{border:1px solid var(--default-border-color) !important;border-radius:0 !important;background-color:rgba(0,0,0,0) !important;font-size:.875rem !important;width:var(--lg-button-size);height:var(--lg-button-size)}.zoom-button svg,.undo-redo-buttons button svg{width:var(--lg-icon-size) !important;height:var(--lg-icon-size) !important}.zoom-button .ToolIcon__icon,.undo-redo-buttons button .ToolIcon__icon{width:100%;height:100%}.reset-zoom-button{border-left:0 !important;border-right:0 !important;padding:0 .625rem !important;width:3.75rem !important;justify-content:center;color:var(--text-primary-color)}.zoom-out-button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important}:root[dir=rtl] .zoom-out-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-out-button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.zoom-in-button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir=rtl] .zoom-in-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-in-button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.undo-redo-buttons .undo-button-container button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important;border-right:0 !important}:root[dir=rtl] .undo-redo-buttons .undo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .undo-button-container button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.undo-redo-buttons .redo-button-container button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir=rtl] .undo-redo-buttons .redo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .redo-button-container button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}",""]),t.Z=a},3729:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Avatar{width:1.25rem;height:1.25rem;position:relative;border-radius:100%;outline-offset:2px;display:flex;justify-content:center;align-items:center;color:#fff;cursor:pointer;font-size:.625rem;font-weight:500;line-height:1}.excalidraw .Avatar-img{width:100%;height:100%;border-radius:100%}.excalidraw .Avatar::before{content:"";position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border:1px solid var(--avatar-border-color);border-radius:100%}',""]),t.Z=a},3137:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(7984),n.b),u=new URL(n(1639),n.b),d=a()(o()),f=c()(s),p=c()(u);d.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+f+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-gray-80);--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: rgba(255, 255, 255, 0.96);--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: #ffffff;--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top);--select-highlight-color: #339af0;--shadow-island: 0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702);--button-hover-bg: var(--color-gray-10);--default-border-color: var(--color-gray-30);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-gray-20);--sidebar-bg-color: #fff;--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-gray-80);--color-selection: #6965db;--color-icon-white: #ffffff;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-primary-light-darker: #d7d5ff;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-promo: #e70078;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+p+");--focus-highlight-color: #228be6;--icon-fill-color: var(--color-gray-40);--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: #262627;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-bg-color: #2c2c2c;--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--text-primary-color: var(--color-gray-40);--button-hover-bg: var(--color-gray-80);--default-border-color: var(--color-gray-80);--shadow-island: 0px 13px 33px rgba(0, 0, 0, 0.07), 0px 4.13px 9.94853px rgba(0, 0, 0, 0.0456112), 0px 1.13px 4.13211px rgba(0, 0, 0, 0.035), 0px 0.769896px 1.4945px rgba(0, 0, 0, 0.0243888);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--sidebar-border-color: var(--color-gray-85);--sidebar-bg-color: #191919;--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-icon-white: var(--color-gray-90);--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-primary-light-darker: #43415e;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-promo: #d297ff}.excalidraw .excalidraw-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color))}.excalidraw .excalidraw-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .excalidraw-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .excalidraw-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .excalidraw-button.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .excalidraw-button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .excalidraw-button.active svg{color:var(--button-color, var(--color-primary-darker))}",""]),t.Z=d},4241:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Card{display:flex;flex-direction:column;align-items:center;max-width:290px;margin:1em;text-align:center}.excalidraw .Card .Card-icon{font-size:2.6em;display:flex;flex:0 0 auto;padding:1.4rem;border-radius:50%;background:var(--card-color);color:#fff}.excalidraw .Card .Card-icon svg{width:2.8rem;height:2.8rem}.excalidraw .Card .Card-details{font-size:.96em;min-height:90px;padding:0 1em;margin-bottom:auto}.excalidraw .Card .Card-button.ToolIcon_type_button{height:2.5rem;margin-top:1em;margin-bottom:.3em;background-color:var(--card-color)}.excalidraw .Card .Card-button.ToolIcon_type_button:hover{background-color:var(--card-color-darker)}.excalidraw .Card .Card-button.ToolIcon_type_button:active{background-color:var(--card-color-darkest)}.excalidraw .Card .Card-button.ToolIcon_type_button .ToolIcon__label{color:#fff}.excalidraw .Card .Card-button.ToolIcon_type_button .Spinner{--spinner-color: #fff}",""]),t.Z=a},6029:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Checkbox{margin:4px .3em;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus){box-shadow:0 0 0 2px #4dabf7}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus) svg{display:block;opacity:.3}.excalidraw .Checkbox:active .Checkbox-box{box-shadow:0 0 2px 1px inset #1c7ed6 !important}.excalidraw .Checkbox:hover .Checkbox-box{background-color:rgba(208,235,255,.2)}.excalidraw .Checkbox.is-checked .Checkbox-box{background-color:#d0ebff}.excalidraw .Checkbox.is-checked .Checkbox-box svg{display:block}.excalidraw .Checkbox.is-checked:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .Checkbox .Checkbox-box{width:22px;height:22px;padding:0;flex:0 0 auto;margin:0 1em;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #1c7ed6;background-color:rgba(0,0,0,0);border-radius:4px;color:#1c7ed6;border:0}.excalidraw .Checkbox .Checkbox-box:focus{box-shadow:0 0 0 3px #1c7ed6}.excalidraw .Checkbox .Checkbox-box svg{display:none;width:16px;height:16px;stroke-width:3px}.excalidraw .Checkbox .Checkbox-label{display:flex;align-items:center}.excalidraw .Checkbox .excalidraw-tooltip-icon{width:1em;height:1em}",""]),t.Z=a},2345:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(9669),n.b),u=a()(o()),d=c()(s);u.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .color-picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 0 1px 4px;border-radius:4px;position:absolute}:root[dir=ltr] .excalidraw .color-picker{left:-5.5px}:root[dir=rtl] .excalidraw .color-picker{right:-5.5px}.excalidraw .color-picker-control-container{display:grid;grid-template-columns:auto 1fr;align-items:center;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .color-picker-control-container+.popover{position:static}.excalidraw .color-picker-popover-container{margin-top:-0.25rem}:root[dir=ltr] .excalidraw .color-picker-popover-container{margin-left:.5rem}:root[dir=rtl] .excalidraw .color-picker-popover-container{margin-left:-3rem}.excalidraw .color-picker-triangle{width:0;height:0;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color);position:absolute;top:10px}:root[dir=ltr] .excalidraw .color-picker-triangle{-webkit-transform:rotate(270deg);transform:rotate(270deg);left:-14px}:root[dir=rtl] .excalidraw .color-picker-triangle{-webkit-transform:rotate(90deg);transform:rotate(90deg);right:-14px}.excalidraw .color-picker-triangle-shadow{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1)}:root[dir=ltr] .excalidraw .color-picker-triangle-shadow{left:-14px}:root[dir=rtl] .excalidraw .color-picker-triangle-shadow{right:-16px}.excalidraw .color-picker-content--default{padding:.5rem;display:grid;grid-template-columns:repeat(5, auto);grid-gap:.5rem;border-radius:4px}.excalidraw .color-picker-content--default:focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-picker-content--canvas{display:flex;flex-direction:column;padding:.25rem}.excalidraw .color-picker-content--canvas-title{color:#868e96;font-size:12px;padding:0 .25rem}.excalidraw .color-picker-content--canvas-colors{padding:.5rem 0}.excalidraw .color-picker-content--canvas-colors .color-picker-swatch{margin:0 .25rem}.excalidraw .color-picker-content .color-input-container{grid-column:1/span 5}.excalidraw .color-picker-swatch{position:relative;height:1.875rem;width:1.875rem;cursor:pointer;border-radius:4px;margin:0;box-sizing:border-box;border:1px solid #ddd;background-color:currentColor !important;-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker-swatch:focus{box-shadow:0 0 4px 1px currentColor;border-color:var(--select-highlight-color)}.excalidraw .color-picker-transparent{border-radius:4px;box-shadow:rgba(0,0,0,.1) 0 0 0 1px inset;position:absolute;top:0;right:0;bottom:0;left:0}.excalidraw .color-picker-transparent,.excalidraw .color-picker-label-swatch{background:url("+d+') left center}.excalidraw .color-picker-hash{height:var(--default-button-size);flex-shrink:0;padding:.5rem .5rem .5rem .75rem;border:1px solid var(--default-border-color);border-right:0;box-sizing:border-box;color:var(--input-label-color);display:flex;align-items:center;justify-content:center;position:relative}:root[dir=ltr] .excalidraw .color-picker-hash{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg)}:root[dir=rtl] .excalidraw .color-picker-hash{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0;border-right:1px solid var(--default-border-color);border-left:0}.excalidraw .color-input-container{display:flex}.excalidraw .color-input-container:focus-within{box-shadow:0 0 0 1px var(--color-primary-darkest);border-radius:var(--border-radius-lg)}.excalidraw .color-picker-input{box-sizing:border-box;width:100%;margin:0;font-size:.875rem;font-family:inherit;background-color:rgba(0,0,0,0);color:var(--text-primary-color);border:0;outline:none;height:var(--default-button-size);border:1px solid var(--default-border-color);border-left:0;letter-spacing:.4px;padding:.5rem;padding-left:.25rem;-webkit-appearance:none;appearance:none}:root[dir=ltr] .excalidraw .color-picker-input{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0}:root[dir=rtl] .excalidraw .color-picker-input{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg);border-left:1px solid var(--default-border-color);border-right:0}.excalidraw .color-picker-input:focus-visible{box-shadow:none}.excalidraw .color-picker-label-swatch-container{border:1px solid var(--default-border-color);border-radius:var(--border-radius-lg);width:var(--default-button-size);height:var(--default-button-size);box-sizing:border-box;overflow:hidden}.excalidraw .color-picker-label-swatch{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--swatch-color) !important;overflow:hidden;position:relative;-webkit-filter:var(--theme-filter);filter:var(--theme-filter);border:0 !important}.excalidraw .color-picker-label-swatch svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .color-picker-label-swatch:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .color-picker-label-swatch:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .color-picker-label-swatch.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .color-picker-label-swatch.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .color-picker-label-swatch.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .color-picker-label-swatch:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--swatch-color)}.excalidraw .color-picker-keybinding{position:absolute;bottom:2px;font-size:.7em}:root[dir=ltr] .excalidraw .color-picker-keybinding{right:2px}:root[dir=rtl] .excalidraw .color-picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .color-picker-keybinding{display:none}.excalidraw .color-picker-type-canvasBackground .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementBackground .color-picker-keybinding{color:#fff}.excalidraw .color-picker-swatch[aria-label=transparent] .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementStroke .color-picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .color-picker-type-elementBackground .color-picker-keybinding{color:#000}.excalidraw.theme--dark .color-picker-swatch[aria-label=transparent] .color-picker-keybinding{color:#000}',""]),t.Z=u},9393:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .confirm-dialog-buttons{display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;justify-content:flex-end}",""]),t.Z=a},6578:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .context-menu{position:relative;border-radius:4px;box-shadow:0 3px 10px rgba(0,0,0,.2);padding:0;list-style:none;-webkit-user-select:none;user-select:none;margin:-0.25rem 0 0 .125rem;padding:.5rem 0;background-color:var(--popup-secondary-bg-color);border:1px solid var(--button-gray-3);cursor:default}.excalidraw .context-menu button{color:var(--popup-text-color)}.excalidraw .context-menu-item{position:relative;width:100%;min-width:9.5rem;margin:0;padding:.25rem 1rem .25rem 1.25rem;text-align:start;border-radius:0;background-color:rgba(0,0,0,0);border:none;white-space:nowrap;font-family:inherit;display:grid;grid-template-columns:1fr .2fr;align-items:center}.excalidraw .context-menu-item.checkmark::before{position:absolute;left:6px;margin-bottom:1px;content:"✓"}.excalidraw .context-menu-item.dangerous .context-menu-item__label{color:#f03e3e}.excalidraw .context-menu-item .context-menu-item__label{justify-self:start;-webkit-margin-end:20px;margin-inline-end:20px}.excalidraw .context-menu-item .context-menu-item__shortcut{justify-self:end;opacity:.6;font-family:inherit;font-size:.7rem}.excalidraw .context-menu-item:hover{color:var(--popup-bg-color);background-color:var(--select-highlight-color)}.excalidraw .context-menu-item:hover.dangerous{background-color:#fa5252}.excalidraw .context-menu-item:hover.dangerous .context-menu-item__label{color:var(--popup-bg-color)}.excalidraw .context-menu-item:focus{z-index:1}.excalidraw--mobile.excalidraw .context-menu-item{display:block}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__label{-webkit-margin-end:0;margin-inline-end:0}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__shortcut{display:none}.excalidraw .context-menu-item-separator{border:none;border-top:1px solid #adb5bd}',""]),t.Z=a},9482:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Dialog{-webkit-user-select:text;user-select:text;cursor:auto}.excalidraw .Dialog__title{margin:0;text-align:left;font-size:1.25rem;border-bottom:1px solid var(--dialog-border-color);padding:0 0 .75rem;margin-bottom:1.5rem}",""]),t.Z=a},6148:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .Dialog__action-button{position:relative;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;padding:.5rem 1.5rem;border:1px solid var(--default-border-color);background-color:rgba(0,0,0,0);height:3rem;border-radius:var(--border-radius-lg);letter-spacing:.4px;color:inherit;font-family:inherit;font-size:.875rem;font-weight:600;-webkit-user-select:none;user-select:none}.excalidraw .Dialog__action-button svg{display:block;width:1rem;height:1rem}.excalidraw .Dialog__action-button--danger{background-color:var(--color-danger);border-color:var(--color-danger);color:#fff}.excalidraw .Dialog__action-button--primary{background-color:var(--color-primary);border-color:var(--color-primary);color:#fff}.excalidraw.theme--dark .Dialog__action-button--danger{color:var(--color-gray-100)}.excalidraw.theme--dark .Dialog__action-button--primary{color:var(--color-gray-100)}",""]),t.Z=a},7955:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(9669),n.b),u=a()(o()),d=c()(s);u.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExportDialog__preview{--preview-padding: calc(var(--space-factor) * 4);background:url("+d+") left center;text-align:center;padding:var(--preview-padding);margin-bottom:calc(var(--space-factor)*3);display:flex;justify-content:center;align-items:center}.excalidraw .ExportDialog__preview canvas{max-width:calc(100% - var(--preview-padding)*2);max-height:25rem}.excalidraw.theme--dark .ExportDialog__preview canvas{-webkit-filter:none;filter:none}.excalidraw .ExportDialog__actions{width:100%;display:flex;grid-gap:calc(var(--space-factor)*2);align-items:top;justify-content:space-between}.excalidraw--mobile.excalidraw .ExportDialog{display:flex;flex-direction:column}.excalidraw--mobile.excalidraw .ExportDialog__actions{flex-direction:column;align-items:center}.excalidraw--mobile.excalidraw .ExportDialog__actions>*{margin-bottom:calc(var(--space-factor)*3)}.excalidraw--mobile.excalidraw .ExportDialog__preview canvas{max-height:30vh}.excalidraw--mobile.excalidraw .ExportDialog__dialog,.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{height:100%;box-sizing:border-box}.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{overflow-y:auto}.excalidraw .ExportDialog--json .ExportDialog-cards{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));justify-items:center;row-gap:2em}@media(max-width: 460px){.excalidraw .ExportDialog--json .ExportDialog-cards{grid-template-columns:repeat(auto-fit, minmax(240px, 1fr))}.excalidraw .ExportDialog--json .ExportDialog-cards .Card-details{min-height:40px}}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:1em auto;align-items:flex-start;flex-direction:column}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName .TextInput{width:auto}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName-label{margin:.625em 0;font-weight:bold}.excalidraw button.ExportDialog-imageExportButton{border:0;width:5rem;height:5rem;margin:0 .2em;padding:0;display:flex;align-items:center;justify-content:center;border-radius:1rem;background-color:var(--button-color);box-shadow:0 3px 5px -1px rgba(0,0,0,.28),0 6px 10px 0 rgba(0,0,0,.14);font-family:Cascadia;font-size:1.8em;color:#fff}.excalidraw button.ExportDialog-imageExportButton:hover{background-color:var(--button-color-darker)}.excalidraw button.ExportDialog-imageExportButton:active{background-color:var(--button-color-darkest);box-shadow:none}.excalidraw button.ExportDialog-imageExportButton svg{width:.9em}",""]),t.Z=u},3195:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .FixedSideContainer{position:absolute;pointer-events:none}.excalidraw .FixedSideContainer>*{pointer-events:all}.excalidraw .FixedSideContainer_side_top{left:var(--editor-container-padding);top:var(--editor-container-padding);right:var(--editor-container-padding);bottom:var(--editor-container-padding);z-index:2}.excalidraw .FixedSideContainer_side_top.zen-mode{right:42px}",""]),t.Z=a},2978:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HelpDialog .Modal__content{max-width:960px}.excalidraw .HelpDialog h3{margin:1.5rem 0;font-weight:bold;font-size:1.125rem}.excalidraw .HelpDialog__header{display:flex;flex-wrap:wrap;gap:.75rem}.excalidraw .HelpDialog__btn{display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;border:1px solid var(--default-border-color);padding:.625rem 1rem;border-radius:var(--border-radius-lg);color:var(--text-primary-color);font-weight:600;font-size:.75rem;letter-spacing:.4px}.excalidraw .HelpDialog__btn:hover{text-decoration:none}.excalidraw .HelpDialog__link-icon{line-height:0}.excalidraw .HelpDialog__link-icon svg{width:1rem;height:1rem}.excalidraw .HelpDialog__islands-container{display:grid;grid-column-gap:1.5rem;grid-row-gap:2rem}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__islands-container{grid-template-columns:1fr 1fr}}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__island--tools{grid-area:1/1/2/2}.excalidraw .HelpDialog__island--view{grid-area:2/1/3/2}.excalidraw .HelpDialog__island--editor{grid-area:1/2/3/3}}.excalidraw .HelpDialog__island h4{font-size:1rem;font-weight:bold;margin:0;margin-bottom:.625rem}.excalidraw .HelpDialog__island-content{border:1px solid var(--dialog-border-color);border-radius:var(--border-radius-lg)}.excalidraw .HelpDialog__shortcut{border-bottom:1px solid var(--dialog-border-color);padding:.375rem .75rem;display:flex;justify-content:space-between;align-items:center;font-size:.875rem;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .HelpDialog__shortcut:last-child{border-bottom:none}.excalidraw .HelpDialog__key-container{display:flex;align-items:center;-webkit-column-gap:.25rem;column-gap:.25rem;flex-shrink:0}.excalidraw .HelpDialog__key{display:flex;box-sizing:border-box;font-size:.625rem;background-color:var(--color-primary-light);border-radius:var(--border-radius-md);padding:.5rem;word-break:keep-all;align-items:center;font-family:inherit;line-height:1}",""]),t.Z=a},1587:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HintViewer{pointer-events:none;box-sizing:border-box;position:absolute;display:flex;justify-content:center;left:0;top:100%;max-width:100%;width:100%;margin-top:.5rem;text-align:center;color:var(--color-gray-40);font-size:.75rem}.excalidraw--mobile.excalidraw .HintViewer{position:static;padding-right:2rem}.excalidraw .HintViewer>span{padding:.25rem}.excalidraw.theme--dark .HintViewer{color:var(--color-gray-60)}",""]),t.Z=a},9478:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .picker-container{display:inline-block;box-sizing:border-box;margin-right:.25rem}.excalidraw .picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 2px 2px 4px 2px;border-radius:4px;position:absolute}.excalidraw .picker-container button,.excalidraw .picker button{position:relative;display:flex;align-items:center;justify-content:center}.excalidraw .picker-container button:focus-visible,.excalidraw .picker button:focus-visible{outline:rgba(0,0,0,0);background-color:var(--button-gray-2)}.excalidraw .picker-container button:focus-visible svg,.excalidraw .picker button:focus-visible svg{opacity:1}.excalidraw .picker-container button:hover,.excalidraw .picker button:hover{background-color:var(--button-gray-2)}.excalidraw .picker-container button:active,.excalidraw .picker button:active{background-color:var(--button-gray-3)}.excalidraw .picker-container button:disabled,.excalidraw .picker button:disabled{cursor:not-allowed}.excalidraw .picker-container button svg,.excalidraw .picker button svg{margin:0;width:36px;height:18px;pointer-events:none}.excalidraw .picker button{padding:.25rem .28rem .35rem .25rem}.excalidraw .picker-triangle{width:0;height:0;position:relative;top:-10px;z-index:10}:root[dir=ltr] .excalidraw .picker-triangle{left:12px}:root[dir=rtl] .excalidraw .picker-triangle{right:12px}.excalidraw .picker-triangle:before{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-1px}.excalidraw .picker-triangle:after{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color)}.excalidraw .picker-content{padding:.5rem;display:grid;grid-template-columns:repeat(3, auto);grid-gap:.5rem;border-radius:4px}:root[dir=rtl] .excalidraw .picker-content{padding:.4rem}.excalidraw .picker-keybinding{position:absolute;bottom:2px;font-size:.7em;color:var(--keybinding-color)}:root[dir=ltr] .excalidraw .picker-keybinding{right:2px}:root[dir=rtl] .excalidraw .picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .picker-keybinding{display:none}.excalidraw .picker-type-canvasBackground .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementBackground .picker-keybinding{color:#fff}.excalidraw .picker-swatch[aria-label=transparent] .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementStroke .picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .picker-type-elementBackground .picker-keybinding{color:#000}.excalidraw.theme--dark .picker-swatch[aria-label=transparent] .picker-keybinding{color:#000}',""]),t.Z=a},7369:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .Island{--padding: 0;box-sizing:border-box;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .Island.zen-mode{box-shadow:none}",""]),t.Z=a},1434:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .layer-ui__wrapper.animate{transition:width .1s ease-in-out}.excalidraw .layer-ui__wrapper{position:absolute;width:100%;height:100%;pointer-events:none;z-index:var(--zIndex-layerUI)}.excalidraw .layer-ui__wrapper__top-right{display:flex;gap:.75rem}.excalidraw .layer-ui__wrapper__footer{width:100%}.excalidraw .layer-ui__wrapper__footer-right{z-index:100;display:flex}.excalidraw .layer-ui__wrapper .zen-mode-transition{transition:-webkit-transform .5s ease-in-out;transition:transform .5s ease-in-out;transition:transform .5s ease-in-out, -webkit-transform .5s ease-in-out}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}.excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-bottom{-webkit-transform:translate(0, 92px);transform:translate(0, 92px)}.excalidraw .layer-ui__wrapper .disable-zen-mode{height:30px;position:absolute;bottom:10px;font-size:10px;padding:10px;font-weight:500;opacity:0;visibility:hidden;transition:visibility 0s linear 0s,opacity .5s}[dir=ltr] .excalidraw .layer-ui__wrapper .disable-zen-mode{right:15px}[dir=rtl] .excalidraw .layer-ui__wrapper .disable-zen-mode{left:15px}.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{opacity:1;visibility:visible;transition:visibility 0s linear 300ms,opacity .5s;transition-delay:.8s}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left,.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right,.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{pointer-events:all}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right{margin-top:auto;margin-bottom:auto}",""]),t.Z=a},8923:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .library-menu-items-container{height:100%;width:100%}.excalidraw .layer-ui__library{display:flex;flex-direction:column;flex:1 1 auto}.excalidraw .library-actions-counter{background-color:var(--color-primary);color:var(--color-primary-light);font-weight:bold;display:flex;align-items:center;justify-content:center;border-radius:50%;width:1rem;height:1rem;position:absolute;bottom:-0.25rem;right:-0.25rem;font-size:.625rem;pointer-events:none}.excalidraw .layer-ui__library-message{padding:2rem;min-width:200px;display:flex;flex-direction:column;align-items:center;flex-grow:1;justify-content:center}.excalidraw .layer-ui__library-message span{font-size:.8em}.excalidraw .publish-library-success .Dialog__content{display:flex;flex-direction:column}.excalidraw .publish-library-success-close.ToolIcon_type_button{background-color:#228be6;align-self:flex-end}.excalidraw .publish-library-success-close.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library-success-close.ToolIcon_type_button .ToolIcon__icon{width:auto;font-size:1rem;color:#fff;padding:0 .5rem}.excalidraw .library-menu-control-buttons{display:flex;align-items:center;justify-content:center;gap:.625rem}.excalidraw .library-menu-browse-button{flex:1;height:var(--lg-button-size);display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;border-radius:var(--border-radius-lg);background-color:var(--color-primary);color:#fff;text-align:center;white-space:nowrap;text-decoration:none !important;font-weight:600;font-size:.75rem}.excalidraw .library-menu-browse-button:hover{background-color:var(--color-primary-darker)}.excalidraw .library-menu-browse-button:active{background-color:var(--color-primary-darkest)}.excalidraw.theme--dark .library-menu-browse-button{color:var(--color-gray-100)}.excalidraw.excalidraw--mobile .library-menu-browse-button{height:var(--default-button-size)}.excalidraw .layer-ui__library .dropdown-menu{width:auto;top:initial;right:0;left:initial;bottom:100%;margin-bottom:.625rem}.excalidraw .layer-ui__library .dropdown-menu .dropdown-menu-container{width:196px;box-shadow:var(--library-dropdown-shadow);border-radius:var(--border-radius-lg);padding:.25rem .5rem}",""]),t.Z=a},6440:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw{--container-padding-y: 1.5rem;--container-padding-x: 0.75rem}.excalidraw .library-menu-items__no-items{text-align:center;color:var(--color-gray-70);line-height:1.5;font-size:.875rem;width:100%}.excalidraw .library-menu-items__no-items__label{color:var(--color-primary);font-weight:bold;font-size:1.125rem;margin-bottom:.75rem}.excalidraw.theme--dark .library-menu-items__no-items{color:var(--color-gray-40)}.excalidraw .library-menu-items-container{display:flex;flex-grow:1;flex-shrink:1;flex-basis:0;overflow-y:auto;flex-direction:column;height:100%;justify-content:center;margin:0;border-bottom:1px solid var(--sidebar-border-color);position:relative}.excalidraw .library-menu-items-container__row{display:grid;grid-template-columns:repeat(4, 1fr);gap:1rem}.excalidraw .library-menu-items-container__items{row-gap:.5rem;padding:var(--container-padding-y) 0;flex:1;overflow-y:auto;overflow-x:hidden;margin-bottom:1rem}.excalidraw .library-menu-items-container__header{color:var(--color-primary);font-size:1.125rem;font-weight:bold;margin-bottom:.75rem}.excalidraw .library-menu-items-container__header--excal{margin-top:2rem}.excalidraw .library-menu-items-container .separator{width:100%;display:flex;align-items:center;font-weight:500;font-size:.9rem;margin:.6em .2em;color:var(--text-primary-color)}",""]),t.Z=a},2701:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .library-unit{align-items:center;border:1px solid rgba(0,0,0,0);display:flex;justify-content:center;position:relative;width:55px;height:55px;box-sizing:border-box;border-radius:var(--border-radius-lg)}.excalidraw .library-unit--hover{border-color:var(--color-primary)}.excalidraw .library-unit--selected{border-color:var(--color-primary);border-width:1px}.excalidraw .library-unit__dragger{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.excalidraw .library-unit__dragger>svg{-webkit-filter:var(--theme-filter);filter:var(--theme-filter);flex-grow:1;max-height:100%;max-width:100%}.excalidraw .library-unit__checkbox-container,.excalidraw .library-unit__checkbox-container:hover,.excalidraw .library-unit__checkbox-container:active{align-items:center;background:none;border:none;color:var(--icon-fill-color);display:flex;justify-content:center;margin:0;padding:.5rem;position:absolute;left:2rem;bottom:2rem;cursor:pointer}.excalidraw .library-unit__checkbox-container input,.excalidraw .library-unit__checkbox-container:hover input,.excalidraw .library-unit__checkbox-container:active input{cursor:pointer}.excalidraw .library-unit__checkbox{position:absolute;top:.125rem;right:.125rem;margin:0}.excalidraw .library-unit__checkbox .Checkbox-box{margin:0;width:1rem;height:1rem;border-radius:4px;background-color:var(--color-primary-light);border:1px solid var(--color-primary);box-shadow:none !important;padding:2px}.excalidraw .library-unit__checkbox.Checkbox:hover .Checkbox-box{background-color:var(--color-primary-light)}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box{background-color:var(--color-primary) !important}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box svg{color:var(--color-primary-light)}.excalidraw .library-unit__removeFromLibrary>svg{height:16px;width:16px}.excalidraw .library-unit__adder{-webkit-transform:scale(1);transform:scale(1);-webkit-animation:library-unit__adder-animation 1s ease-in infinite;animation:library-unit__adder-animation 1s ease-in infinite;position:absolute;width:1.5rem;height:1.5rem;background-color:var(--color-primary);border-radius:var(--border-radius-md);display:flex;justify-content:center;align-items:center;pointer-events:none}.excalidraw .library-unit__adder svg{color:var(--color-primary-light);width:1rem;height:1rem}.excalidraw .library-unit:active .library-unit__adder{-webkit-animation:none;animation:none;-webkit-transform:scale(0.8);transform:scale(0.8)}.excalidraw .library-unit__active{cursor:pointer}@-webkit-keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}@keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}",""]),t.Z=a},6843:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw.excalidraw-modal-container{position:absolute;z-index:10}.excalidraw .Modal{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:calc(var(--space-factor)*10)}.excalidraw .Modal .Island{padding:2.5rem !important}.excalidraw .Modal__background{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(18,18,18,.2)}.excalidraw .Modal__content{position:relative;z-index:2;width:100%;max-width:var(--max-width);max-height:100%;opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-animation:Modal__content_fade-in .1s ease-out .05s forwards;animation:Modal__content_fade-in .1s ease-out .05s forwards;position:relative;overflow-y:auto;background:var(--island-bg-color);border:1px solid var(--dialog-border-color);box-shadow:var(--modal-shadow);border-radius:6px;box-sizing:border-box}.excalidraw .Modal__content:focus{outline:none}.excalidraw--mobile.excalidraw .Modal__content{max-width:100%;border:0;border-radius:0}@-webkit-keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.excalidraw .Modal__close{color:var(--icon-fill-color);margin:0;padding:.375rem;position:absolute;top:1rem;right:1rem;border:0;background-color:rgba(0,0,0,0);line-height:0;cursor:pointer}.excalidraw .Modal__close svg{width:1.5rem;height:1.5rem}.excalidraw--mobile.excalidraw .Modal{padding:0}.excalidraw--mobile.excalidraw .Modal__content{position:absolute;top:0;left:0;right:0;bottom:0}",""]),t.Z=a},8461:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw--mobile.excalidraw .PasteChartDialog .Island{display:flex;flex-direction:column}.excalidraw .PasteChartDialog .container{display:flex;align-items:center;justify-content:space-around;flex-wrap:wrap}.excalidraw--mobile.excalidraw .PasteChartDialog .container{flex-direction:column;justify-content:center}.excalidraw .PasteChartDialog .ChartPreview{margin:8px;text-align:center;width:192px;height:128px;border-radius:2px;padding:1px;border:1px solid #ced4da;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0)}.excalidraw .PasteChartDialog .ChartPreview div{display:inline-block}.excalidraw .PasteChartDialog .ChartPreview svg{max-height:120px;max-width:186px}.excalidraw .PasteChartDialog .ChartPreview:hover{padding:0;border:2px solid #339af0}",""]),t.Z=a},9935:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .popover{position:absolute;z-index:10;padding:5px 0 5px;outline:none}",""]),t.Z=a},532:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".ProjectName{margin:auto;display:flex;align-items:center}.ProjectName .TextInput{height:calc(1rem - 3px);width:200px;overflow:hidden;text-align:center;margin-left:8px;text-overflow:ellipsis}.ProjectName .TextInput--readonly{background:none;border:none;width:auto;max-width:200px;padding-left:2px}.ProjectName .TextInput--readonly:hover{background:none}",""]),t.Z=a},7589:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .publish-library__fields{display:flex;flex-direction:column}.excalidraw .publish-library__fields label{padding:1em 0;display:flex;justify-content:space-between;align-items:center}.excalidraw .publish-library__fields label span{font-weight:500;font-size:1rem;color:#868e96}.excalidraw .publish-library__fields label input,.excalidraw .publish-library__fields label textarea{width:70%;padding:.6em;font-family:var(--ui-font)}.excalidraw .publish-library__fields label .required{color:#e03131;margin:.2rem}.excalidraw .publish-library__buttons{display:flex;padding:.2rem 0;justify-content:flex-end;gap:.5rem}.excalidraw .publish-library__buttons .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .publish-library__buttons .ToolIcon_type_button{margin-left:1rem;padding:0 .5rem}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button{background-color:#228be6}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button{background-color:#adb5bd}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button:hover{background-color:#868e96}.excalidraw .publish-library__buttons .ToolIcon__icon{color:#fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner{--spinner-color: #fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner svg{padding:.5rem}.excalidraw .publish-library .selected-library-items{display:flex;flex-wrap:wrap}.excalidraw .publish-library .selected-library-items .single-library-item-wrapper{width:9rem}.excalidraw .publish-library-warning{color:#fa5252}.excalidraw .publish-library-note{padding:1em 0;font-style:italic;font-size:14px;display:block}.excalidraw .single-library-item{position:relative}.excalidraw .single-library-item-status{position:absolute;top:.3rem;left:.3rem;font-size:.7rem;color:#f03e3e;background:rgba(255,255,255,.9);padding:.1rem .2rem;border-radius:.2rem}.excalidraw .single-library-item__svg{background-color:#fff;padding:.3rem;width:7.5rem;height:7.5rem;border:1px solid var(--button-gray-2)}.excalidraw .single-library-item__svg svg{width:100%;height:100%}.excalidraw .single-library-item .ToolIcon__icon{background-color:#fff;width:auto;height:auto;margin:0 .5rem}.excalidraw .single-library-item .ToolIcon,.excalidraw .single-library-item .ToolIcon_type_button:hover{background-color:#fff}.excalidraw .single-library-item .required,.excalidraw .single-library-item .error{color:#e03131;font-weight:bold;font-size:1rem;margin:.2rem}.excalidraw .single-library-item .error{font-weight:500;margin:0;padding:.3em 0}.excalidraw .single-library-item--remove{position:absolute;top:.2rem;right:1rem}.excalidraw .single-library-item--remove .ToolIcon__icon{margin:0}.excalidraw .single-library-item--remove .ToolIcon__icon{background-color:#fa5252}.excalidraw .single-library-item--remove .ToolIcon__icon:hover{background-color:#f03e3e}.excalidraw .single-library-item--remove .ToolIcon__icon:active{background-color:#e03131}.excalidraw .single-library-item--remove svg{color:#fff;padding:.26rem;border-radius:.3em;width:1rem;height:1rem}",""]),t.Z=a},8208:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .sidebar{display:flex;flex-direction:column;position:absolute;top:0;bottom:0;right:0;z-index:5;margin:0;padding:0;box-sizing:border-box;background-color:var(--sidebar-bg-color);box-shadow:var(--sidebar-shadow);overflow:hidden;border-radius:0;width:calc(302px - var(--space-factor) * 2);border-left:1px solid var(--sidebar-border-color)}:root[dir=rtl] .excalidraw .sidebar{left:0;right:auto}.excalidraw .sidebar--docked{box-shadow:none}:root[dir=rtl] .excalidraw .sidebar{border-right:1px solid var(--sidebar-border-color);border-left:0}.excalidraw .sidebar__header{box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;width:100%;padding-top:1rem;padding-bottom:1rem}.excalidraw .sidebar__header__buttons{gap:0;display:flex;align-items:center;margin-left:auto}.excalidraw .sidebar__header__buttons button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));--button-bg: transparent;border:0 !important;width:var(--lg-button-size);height:var(--lg-button-size);padding:0}.excalidraw .sidebar__header__buttons button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .sidebar__header__buttons button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .sidebar__header__buttons button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .sidebar__header__buttons button.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .sidebar__header__buttons button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .sidebar__header__buttons button.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .sidebar__header__buttons button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .sidebar__header__buttons button:hover{background:var(--button-hover-bg, var(--island-bg-color))}.excalidraw .sidebar__header__buttons .sidebar__dock.selected svg{stroke:var(--color-primary);fill:var(--color-primary)}.excalidraw .sidebar-tabs-root{display:flex;flex-direction:column;flex:1 1 auto;padding:1rem .75rem}.excalidraw .sidebar-tabs-root [role=tabpanel]{flex:1;outline:none;flex:1 1 auto;display:flex;flex-direction:column;outline:none}.excalidraw .sidebar-tabs-root [role=tabpanel][data-state=inactive]{display:none !important}.excalidraw .sidebar-tabs-root [role=tablist]{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit, minmax(0, 1fr))}.excalidraw .sidebar-tabs-root>.sidebar__header{padding-top:0;padding-bottom:1rem}.excalidraw .sidebar-tab-trigger{--button-width: auto;--button-bg: transparent;--button-hover-bg: transparent;--button-active-bg: var(--color-primary);--button-hover-color: var(--color-primary);--button-hover-border: var(--color-primary)}.excalidraw .sidebar-tab-trigger[data-state=active]{--button-bg: var(--color-primary);--button-hover-bg: var(--color-primary-darker);--button-hover-color: var(--color-icon-white);--button-border: var(--color-primary);color:var(--color-icon-white)}.excalidraw .default-sidebar{display:flex;flex-direction:column}.excalidraw .default-sidebar .sidebar-triggers{display:flex;gap:0;padding:2px;margin-top:-3px;margin-bottom:-3px;border:1px solid var(--sidebar-border-color);background:var(--default-bg-color);border-radius:.625rem}.excalidraw .default-sidebar .sidebar-triggers .sidebar-tab-trigger{height:var(--lg-button-size);width:var(--lg-button-size);border:none}.excalidraw .default-sidebar .sidebar__header{border-bottom:1px solid var(--sidebar-border-color)}",""]),t.Z=a},7051:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .sidebar-trigger{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:auto;height:var(--lg-button-size);display:flex;align-items:center;gap:.5rem;line-height:0;font-size:.75rem;letter-spacing:.4px}.excalidraw .sidebar-trigger svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .sidebar-trigger:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .sidebar-trigger:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .sidebar-trigger.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .sidebar-trigger.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .sidebar-trigger.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .sidebar-trigger svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .default-sidebar-trigger .sidebar-trigger__label{display:none}@media screen and (min-width: 1024px){.excalidraw .default-sidebar-trigger .sidebar-trigger__label{display:block}}",""]),t.Z=a},5892:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .Spinner{display:flex;align-items:center;justify-content:center;height:100%;margin-left:auto;margin-right:auto;--spinner-color: var(--icon-fill-color)}.excalidraw .Spinner svg{-webkit-animation:rotate 1.6s linear infinite;animation:rotate 1.6s linear infinite;-webkit-transform-origin:center center;transform-origin:center center}.excalidraw .Spinner circle{stroke:var(--spinner-color);-webkit-animation:dash 1.6s linear 0s infinite;animation:dash 1.6s linear 0s infinite;stroke-linecap:round}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}@keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}",""]),t.Z=a},3874:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .Stack{--gap: 0;display:grid;gap:calc(var(--space-factor)*var(--gap))}.excalidraw .Stack_vertical{grid-template-columns:auto;grid-auto-flow:row;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content}.excalidraw .Stack_horizontal{grid-template-rows:auto;grid-auto-flow:column;grid-auto-columns:-webkit-min-content;grid-auto-columns:min-content}",""]),t.Z=a},2681:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Stats{position:absolute;top:64px;right:12px;font-size:12px;z-index:10;pointer-events:all}.excalidraw .Stats h3{margin:0 24px 8px 0;white-space:nowrap}.excalidraw .Stats .close{float:right;height:16px;width:16px;cursor:pointer}.excalidraw .Stats .close svg{width:100%;height:100%}.excalidraw .Stats table{width:100%}.excalidraw .Stats table th{border-bottom:1px solid var(--input-border-color);padding:4px}.excalidraw .Stats table tr td:nth-child(2){min-width:24px;text-align:right}:root[dir=rtl] .excalidraw .Stats{left:12px;right:initial}:root[dir=rtl] .excalidraw .Stats h3{margin:0 0 8px 24px}:root[dir=rtl] .excalidraw .Stats .close{float:left}",""]),t.Z=a},6759:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .TextInput{display:inline-block}",""]),t.Z=a},9650:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Toast{-webkit-animation:fade-in .5s;animation:fade-in .5s;background-color:var(--button-gray-1);border-radius:4px;bottom:10px;box-sizing:border-box;cursor:default;left:50%;margin-left:-150px;padding:4px 0;position:absolute;text-align:center;width:300px;z-index:999999}.excalidraw .Toast .Toast__message{padding:0 1.6rem;color:var(--popup-text-color);white-space:pre-wrap}.excalidraw .Toast .close{position:absolute;top:0;right:0;padding:.4rem}.excalidraw .Toast .close .ToolIcon__icon{width:1.2rem;height:1.2rem}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}",""]),t.Z=a},2044:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ToolIcon{border-radius:var(--border-radius-lg);display:inline-flex;align-items:center;position:relative;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;user-select:none}.excalidraw .ToolIcon__hidden{display:none !important}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon{--icon-fill-color: var(--color-primary-darker)}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{fill:var(--icon-fill-color)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary-light);--keybinding-color: var(--color-gray-60)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{color:var(--color-primary-darker)}.excalidraw .ToolIcon .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .ToolIcon .ToolIcon__icon:hover{background:var(--button-hover-bg)}.excalidraw .ToolIcon .ToolIcon__icon:active{background:var(--button-hover-bg);border:1px solid var(--color-primary-darkest)}.excalidraw .ToolIcon--plain{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon--plain .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .ToolIcon_type_radio,.excalidraw .ToolIcon_type_checkbox{position:absolute;opacity:0;pointer-events:none}.excalidraw .ToolIcon__icon{box-sizing:border-box;width:var(--default-button-size);height:var(--default-button-size);color:var(--icon-fill-color);display:flex;justify-content:center;align-items:center;border-radius:var(--border-radius-lg)}.excalidraw .ToolIcon__icon+.ToolIcon__label{-webkit-margin-start:0;margin-inline-start:0}.excalidraw .ToolIcon__icon svg{position:relative;width:var(--default-icon-size);height:var(--default-icon-size);color:var(--icon-fill-color)}.excalidraw .ToolIcon__label{display:flex;align-items:center;color:var(--icon-fill-color);font-family:var(--ui-font);margin:0 .8em;text-overflow:ellipsis}.excalidraw .ToolIcon__label .Spinner{margin-left:.6em}.excalidraw .ToolIcon_size_small .ToolIcon__icon{width:2rem;height:2rem;font-size:.8em}.excalidraw .ToolIcon_type_button,.excalidraw .Modal .ToolIcon_type_button,.excalidraw .ToolIcon_type_button{padding:0;border:none;margin:0;font-size:inherit;background-color:initial}.excalidraw .ToolIcon_type_button:focus-visible,.excalidraw .Modal .ToolIcon_type_button:focus-visible,.excalidraw .ToolIcon_type_button:focus-visible{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .ToolIcon_type_button.ToolIcon--selected,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,.excalidraw .ToolIcon_type_button.ToolIcon--selected{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .ToolIcon_type_button.ToolIcon--selected:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button:active,.excalidraw .Modal .ToolIcon_type_button:active,.excalidraw .ToolIcon_type_button:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button--show,.excalidraw .Modal .ToolIcon_type_button--show,.excalidraw .ToolIcon_type_button--show{visibility:visible}.excalidraw .ToolIcon_type_button--hide,.excalidraw .Modal .ToolIcon_type_button--hide,.excalidraw .ToolIcon_type_button--hide{display:none !important}.excalidraw .ToolIcon_type_floating{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:hover{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:active{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon{background-color:var(--button-gray-1);width:2rem;height:2rem}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__keybinding{position:absolute;bottom:2px;right:3px;font-size:.625rem;color:var(--keybinding-color);font-family:var(--ui-font);-webkit-user-select:none;user-select:none}:root[dir=ltr] .excalidraw .unlocked-icon{left:2px}:root[dir=rtl] .excalidraw .unlocked-icon{right:2px}.excalidraw .App-toolbar-container .ToolIcon__icon{width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .App-toolbar-container .ToolIcon__icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}",""]),t.Z=a},9144:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,.excalidraw .App-toolbar.zen-mode .HintViewer{display:none}.excalidraw .App-toolbar__divider{width:1px;height:1.5rem;align-self:center;background-color:var(--default-border-color);margin:0 .5rem}",""]),t.Z=a},6626:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-tooltip{--ui-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-family:var(--ui-font);position:fixed;z-index:1000;padding:8px;border-radius:6px;box-sizing:border-box;pointer-events:none;word-wrap:break-word;background:#000;line-height:1.5;text-align:center;font-size:13px;font-weight:500;color:#fff;display:none}.excalidraw-tooltip.excalidraw-tooltip--visible{display:block}.excalidraw-tooltip-wrapper{display:flex}.excalidraw-tooltip-icon{width:.9em;height:.9em;margin-left:5px;margin-top:1px;display:flex}.excalidraw--mobile.excalidraw-tooltip-icon{display:none}",""]),t.Z=a},6359:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .UserList{pointer-events:none;padding:var(--space-factor) var(--space-factor) var(--space-factor) var(--space-factor);display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.625rem;max-height:140px;max-width:290px;overflow:hidden}.excalidraw .UserList:empty{display:none}.excalidraw .UserList>*{pointer-events:all}.excalidraw .UserList_mobile{padding:0;justify-content:normal;margin:.5rem 0}",""]),t.Z=a},7399:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .dropdown-menu{position:absolute;top:100%;margin-top:.25rem}.excalidraw .dropdown-menu--mobile{bottom:55px;top:auto;left:0;width:100%;display:flex;flex-direction:column;row-gap:.75rem}.excalidraw .dropdown-menu--mobile .dropdown-menu-container{padding:8px 8px;box-sizing:border-box;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .dropdown-menu--mobile .dropdown-menu-container.zen-mode{box-shadow:none}.excalidraw .dropdown-menu .dropdown-menu-container{background-color:#fff !important;max-height:calc(100vh - 150px);overflow-y:auto;--gap: 2}.excalidraw .dropdown-menu .dropdown-menu-item-base{display:flex;padding:0 .625rem;-webkit-column-gap:.625rem;column-gap:.625rem;font-size:.875rem;color:var(--color-gray-100);width:100%;box-sizing:border-box;font-weight:normal;font-family:inherit}.excalidraw .dropdown-menu .dropdown-menu-item{background-color:rgba(0,0,0,0);border:0;align-items:center;height:2rem;cursor:pointer;border-radius:var(--border-radius-md)}@media screen and (min-width: 1921px){.excalidraw .dropdown-menu .dropdown-menu-item{height:2.25rem}}.excalidraw .dropdown-menu .dropdown-menu-item__text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.excalidraw .dropdown-menu .dropdown-menu-item__shortcut{-webkit-margin-start:auto;margin-inline-start:auto;opacity:.5}.excalidraw .dropdown-menu .dropdown-menu-item:hover{background-color:var(--button-hover-bg);text-decoration:none}.excalidraw .dropdown-menu .dropdown-menu-item svg{width:1rem;height:1rem;display:block}.excalidraw .dropdown-menu .dropdown-menu-item-custom{margin-top:.5rem}.excalidraw .dropdown-menu .dropdown-menu-group-title{font-size:14px;text-align:left;margin:10px 0;font-weight:500}.excalidraw.theme--dark .dropdown-menu-item{color:var(--color-gray-40)}.excalidraw.theme--dark .dropdown-menu-container{background-color:var(--color-gray-90) !important}.excalidraw .dropdown-menu-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .dropdown-menu-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .dropdown-menu-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .dropdown-menu-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .dropdown-menu-button.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .dropdown-menu-button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .dropdown-menu-button.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .dropdown-menu-button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .dropdown-menu-button--mobile{border:none;margin:0;padding:0;width:var(--default-button-size);height:var(--default-button-size)}",""]),t.Z=a},8793:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".footer-center{pointer-events:none;display:flex;width:100%;justify-content:flex-start}.footer-center>*{pointer-events:all}",""]),t.Z=a},3397:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .collab-button{--button-bg: var(--color-primary);--button-color: white;--button-border: var(--color-primary);--button-width: var(--lg-button-size);--button-height: var(--lg-button-size);--button-hover-bg: var(--color-primary-darker);--button-hover-border: var(--color-primary-darker);--button-active-bg: var(--color-primary-darker);flex-shrink:0}.excalidraw .collab-button.active.active{background-color:#0fb884;border-color:#0fb884}.excalidraw .collab-button.active.active svg{color:#fff}.excalidraw .collab-button.active.active:hover,.excalidraw .collab-button.active.active:active{background-color:#0fb884;border-color:#0fb884}.excalidraw.theme--dark .collab-button{color:var(--color-gray-90)}.excalidraw .CollabButton.is-collaborating{background-color:var(--button-special-active-bg-color)}.excalidraw .CollabButton.is-collaborating .ToolIcon__icon svg,.excalidraw .CollabButton.is-collaborating .ToolIcon__label{color:var(--icon-green-fill-color)}.excalidraw .CollabButton-collaborators{min-width:1em;min-height:1em;line-height:1;position:absolute;bottom:-5px;padding:3px;border-radius:50%;background-color:#b2f2bb;color:#2b8a3e;font-size:.6rem;font-family:"Cascadia"}:root[dir=ltr] .excalidraw .CollabButton-collaborators{right:-5px}:root[dir=rtl] .excalidraw .CollabButton-collaborators{left:-5px}',""]),t.Z=a},4343:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .ActiveFile .ActiveFile__fileName{display:flex;align-items:center}.excalidraw .ActiveFile .ActiveFile__fileName span{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:9.3em}.excalidraw .ActiveFile .ActiveFile__fileName svg{width:1.15em;-webkit-margin-end:.3em;margin-inline-end:.3em;-webkit-transform:scaleY(0.9);transform:scaleY(0.9)}",""]),t.Z=a},1569:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,'.excalidraw .virgil{font-family:"Virgil"}.excalidraw .welcome-screen-decor{pointer-events:none;color:var(--color-gray-40)}.excalidraw.theme--dark .welcome-screen-decor{color:var(--color-gray-60)}@media(max-height: 599px){.excalidraw .welcome-screen-decor-hint{display:none !important}}@media(max-width: 1024px),(max-width: 800px){.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--help,.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--menu{display:none}}.excalidraw .welcome-screen-decor-hint--help{display:flex;position:absolute;right:0;bottom:100%}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--help{left:0;right:auto}.excalidraw .welcome-screen-decor-hint--help svg{margin-top:.5rem;width:85px;height:71px;-webkit-transform:scaleX(-1) rotate(80deg);transform:scaleX(-1) rotate(80deg)}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--help svg{-webkit-transform:rotate(80deg);transform:rotate(80deg)}.excalidraw .welcome-screen-decor-hint--toolbar{position:absolute;top:100%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-top:2.5rem;display:flex;align-items:baseline}.excalidraw .welcome-screen-decor-hint--toolbar .welcome-screen-decor-hint__label{width:120px;position:relative;top:-0.5rem}.excalidraw .welcome-screen-decor-hint--toolbar svg{width:38px;height:78px}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--toolbar svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .welcome-screen-decor-hint--menu{position:absolute;width:320px;font-size:1rem;top:100%;margin-top:.25rem;-webkit-margin-start:.6rem;margin-inline-start:.6rem;display:flex;align-items:flex-end;gap:.5rem}.excalidraw .welcome-screen-decor-hint--menu svg{width:41px;height:94px}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--menu svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@media(max-width: 860px){.excalidraw .welcome-screen-decor-hint--menu .welcome-screen-decor-hint__label{max-width:160px}}.excalidraw .welcome-screen-center{display:flex;flex-direction:column;gap:2rem;justify-content:center;align-items:center;position:absolute;pointer-events:none;left:1rem;top:1rem;right:1rem;bottom:1rem}.excalidraw .welcome-screen-center__logo{display:flex;align-items:center;-webkit-column-gap:.75rem;column-gap:.75rem;font-size:2.25rem}.excalidraw .welcome-screen-center__logo svg{width:1.625rem;height:auto}.excalidraw .welcome-screen-center__heading{font-size:1.125rem;text-align:center}.excalidraw .welcome-screen-menu{display:flex;flex-direction:column;gap:2px;justify-content:center;align-items:center}.excalidraw .welcome-screen-menu-item{box-sizing:border-box;pointer-events:all;color:var(--color-gray-50);font-size:.875rem;width:100%;min-width:300px;max-width:400px;display:grid;align-items:center;justify-content:space-between;background:none;border:none;padding:.75rem;border-radius:var(--border-radius-md);grid-template-columns:calc(var(--default-icon-size) + .5rem) 1fr 3rem}.excalidraw .welcome-screen-menu-item__text{display:flex;align-items:center;margin-right:auto;text-align:left;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .welcome-screen-menu-item__icon{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .welcome-screen-menu-item__shortcut{margin-left:auto;color:var(--color-gray-40);font-size:.75rem}.excalidraw:not(:active) .welcome-screen-menu-item:hover{text-decoration:none;background:var(--color-gray-10)}.excalidraw:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active{background:var(--color-gray-20)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active--promo{color:var(--color-promo) !important}.excalidraw .welcome-screen-menu-item:active--promo:hover .welcome-screen-menu-item__text{color:var(--color-promo) !important}.excalidraw.theme--dark .welcome-screen-menu-item{color:var(--color-gray-60)}.excalidraw.theme--dark .welcome-screen-menu-item__shortcut{color:var(--color-gray-60)}.excalidraw.theme--dark:not(:active) .welcome-screen-menu-item:hover{background:var(--color-gray-85)}.excalidraw.theme--dark:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw.theme--dark:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-10)}.excalidraw.theme--dark .welcome-screen-menu-item:active{background-color:var(--color-gray-90)}.excalidraw.theme--dark .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-10)}@media(max-height: 599px){.excalidraw .welcome-screen-center{margin-top:4rem}}@media(min-height: 600px)and (max-height: 900px){.excalidraw .welcome-screen-center{margin-top:8rem}}@media(max-height: 500px),(max-width: 320px){.excalidraw .welcome-screen-center{display:none}}',""]),t.Z=a},9915:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".visually-hidden{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);white-space:nowrap;-webkit-user-select:none;user-select:none}.LoadingMessage{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.LoadingMessage .Spinner{font-size:2.8em}.LoadingMessage .LoadingMessage-text{margin-top:1em;font-size:.8em}.LoadingMessage--dark{background-color:#121212;color:#ced4da}",""]),t.Z=a},9310:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(7984),n.b),u=new URL(n(1639),n.b),d=a()(o()),f=c()(s),p=c()(u);d.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}:export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+f+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-gray-80);--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: rgba(255, 255, 255, 0.96);--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: #ffffff;--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top);--select-highlight-color: #339af0;--shadow-island: 0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702);--button-hover-bg: var(--color-gray-10);--default-border-color: var(--color-gray-30);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-gray-20);--sidebar-bg-color: #fff;--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-gray-80);--color-selection: #6965db;--color-icon-white: #ffffff;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-primary-light-darker: #d7d5ff;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-promo: #e70078;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+p+');--focus-highlight-color: #228be6;--icon-fill-color: var(--color-gray-40);--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: #262627;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-bg-color: #2c2c2c;--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--text-primary-color: var(--color-gray-40);--button-hover-bg: var(--color-gray-80);--default-border-color: var(--color-gray-80);--shadow-island: 0px 13px 33px rgba(0, 0, 0, 0.07), 0px 4.13px 9.94853px rgba(0, 0, 0, 0.0456112), 0px 1.13px 4.13211px rgba(0, 0, 0, 0.035), 0px 0.769896px 1.4945px rgba(0, 0, 0, 0.0243888);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--sidebar-border-color: var(--color-gray-85);--sidebar-bg-color: #191919;--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-icon-white: var(--color-gray-90);--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-primary-light-darker: #43415e;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-promo: #d297ff}:root{--zIndex-canvas: 1;--zIndex-wysiwyg: 2;--zIndex-layerUI: 3}.excalidraw{--ui-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-family:var(--ui-font);position:relative;overflow:hidden;color:var(--text-primary-color);display:flex;top:0;bottom:0;left:0;right:0;height:100%;width:100%;-webkit-user-select:none;user-select:none}.excalidraw button{cursor:pointer}.excalidraw:focus{outline:none}.excalidraw a{font-weight:500;text-decoration:none;color:var(--link-color)}.excalidraw a:hover{text-decoration:underline}.excalidraw canvas{touch-action:none;image-rendering:pixelated;image-rendering:-moz-crisp-edges;z-index:var(--zIndex-canvas)}.excalidraw__canvas{position:absolute}.excalidraw.theme--dark canvas{-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .FixedSideContainer{padding-top:var(--sat, 0);padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0)}.excalidraw .panelRow{display:flex;justify-content:space-between}.excalidraw .panelColumn{display:flex;flex-direction:column;row-gap:.75rem}.excalidraw .panelColumn h3,.excalidraw .panelColumn legend,.excalidraw .panelColumn .control-label{margin:0;margin-bottom:.25rem;font-size:.75rem;color:var(--text-primary-color);font-weight:normal;display:block}.excalidraw .panelColumn .control-label input{display:block;width:100%}.excalidraw .panelColumn legend{padding:0}.excalidraw .panelColumn .iconSelectList{flex-wrap:wrap;position:relative}.excalidraw .panelColumn .buttonList{flex-wrap:wrap;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem}.excalidraw .panelColumn .buttonList label{font-size:.75rem}.excalidraw .panelColumn .buttonList input[type=radio],.excalidraw .panelColumn .buttonList input[type=button]{opacity:0;position:absolute;pointer-events:none}.excalidraw .panelColumn .buttonList .iconRow{margin-top:8px}.excalidraw .panelColumn fieldset{margin:0;padding:0;border:none}.excalidraw .divider{width:1px;background-color:#e9ecef;margin:1px}.excalidraw .welcome-screen-menu-item:focus-visible,.excalidraw .dropdown-menu-item:focus-visible,.excalidraw button:focus-visible,.excalidraw .buttonList label:focus-within,.excalidraw input:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .buttonList .ToolIcon__icon{all:unset !important;display:flex !important}.excalidraw .buttonList button{background-color:rgba(0,0,0,0)}.excalidraw .buttonList label,.excalidraw .buttonList button,.excalidraw .buttonList .zIndexButton{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));padding:0}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .buttonList label:hover,.excalidraw .buttonList button:hover,.excalidraw .buttonList .zIndexButton:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .buttonList label:active,.excalidraw .buttonList button:active,.excalidraw .buttonList .zIndexButton:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .buttonList label.active,.excalidraw .buttonList button.active,.excalidraw .buttonList .zIndexButton.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .buttonList label.active:hover,.excalidraw .buttonList button.active:hover,.excalidraw .buttonList .zIndexButton.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .buttonList label.active svg,.excalidraw .buttonList button.active svg,.excalidraw .buttonList .zIndexButton.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .App-top-bar{z-index:var(--zIndex-layerUI);display:flex;flex-direction:column;align-items:center}.excalidraw .App-bottom-bar{position:absolute;top:0;bottom:0;left:0;right:0;--bar-padding: calc(4 * var(--space-factor));padding-top:max(var(--bar-padding), var(--sat,0));padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0);z-index:4;display:flex;align-items:flex-end;pointer-events:none}.excalidraw .App-bottom-bar>.Island{width:100%;max-width:100%;min-width:100%;box-sizing:border-box;max-height:100%;display:flex;flex-direction:column;pointer-events:initial}.excalidraw .App-bottom-bar>.Island .panelColumn{padding:8px 8px 0 8px}.excalidraw .App-toolbar{width:100%}.excalidraw .App-toolbar .eraser.ToolIcon:hover{--icon-fill-color: #fff;--keybinding-color: #fff}.excalidraw .App-toolbar .eraser.active{background-color:var(--color-primary)}.excalidraw .App-toolbar-content{display:flex;align-items:center;justify-content:space-between;padding:8px}.excalidraw .App-mobile-menu{width:100%;overflow-x:visible;overflow-y:auto;box-sizing:border-box;margin-bottom:var(--bar-padding)}.excalidraw .App-menu{display:grid;color:var(--icon-fill-color)}.excalidraw .shapes-section{display:flex;justify-content:center;pointer-events:none !important}.excalidraw .shapes-section>*{pointer-events:all}.excalidraw .App-menu_top{grid-template-columns:1fr 2fr 1fr;grid-gap:2rem;align-items:flex-start;cursor:default;pointer-events:none !important}@media(min-width: 1536px){.excalidraw .App-menu_top{grid-template-columns:1fr 1fr 1fr;grid-gap:3rem}}.excalidraw .layer-ui__wrapper:not(.disable-pointerEvents) .App-menu_top>*{pointer-events:all}.excalidraw .App-menu_top>*:first-child{justify-self:flex-start}.excalidraw .App-menu_top>*:last-child{justify-self:flex-end}.excalidraw .App-menu_bottom{position:absolute;bottom:1rem;display:flex;justify-content:space-between;align-items:flex-start;cursor:default;pointer-events:none !important;box-sizing:border-box;padding:0 1rem}.excalidraw .App-menu_bottom--transition-left section{width:185px}.excalidraw .App-menu_bottom section{display:flex}.excalidraw .App-menu_bottom>*:first-child{justify-self:flex-start}.excalidraw .App-menu_bottom>*:last-child{justify-self:flex-end}.excalidraw .App-menu_left{grid-template-rows:1fr auto 1fr;height:100%}.excalidraw .App-menu_right{grid-template-rows:1fr;height:100%}.excalidraw .App-menu__left{overflow-y:auto;padding:.75rem;width:202px;box-sizing:border-box;position:absolute}.excalidraw .dropdown-select{height:1.5rem;padding:0;-webkit-padding-start:.5rem;padding-inline-start:.5rem;-webkit-padding-end:1.5rem;padding-inline-end:1.5rem;color:var(--icon-fill-color);background-color:var(--button-gray-1);border-radius:var(--space-factor);border:1px solid var(--button-gray-2);font-size:.8rem;font-family:inherit;outline:none;-webkit-appearance:none;appearance:none;background-image:var(--dropdown-icon);background-repeat:no-repeat;background-position:right .7rem top 50%,0 0;background-size:.65em auto,100%}:root[dir=rtl] .excalidraw .dropdown-select{background-position:left .7rem top 50%,0 0}.excalidraw .dropdown-select:focus{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .dropdown-select:hover{background-color:var(--button-gray-2)}.excalidraw .dropdown-select:active{background-color:var(--button-gray-2)}.excalidraw .dropdown-select__language{height:2rem;background-color:var(--island-bg-color);border-color:var(--default-border-color) !important;cursor:pointer}.excalidraw .dropdown-select__language:hover{background-color:var(--island-bg-color)}.excalidraw .disable-zen-mode{border-radius:var(--border-radius-lg);background-color:var(--color-gray-20);border:1px solid var(--color-gray-30);padding:10px 20px}.excalidraw .disable-zen-mode:hover{background-color:var(--color-gray-30)}.excalidraw .scroll-back-to-content{border-radius:var(--border-radius-lg);background-color:var(--island-bg-color);color:var(--icon-fill-color);border:1px solid var(--default-border-color);padding:10px 20px;position:absolute;left:50%;bottom:30px;-webkit-transform:translateX(-50%);transform:translateX(-50%);pointer-events:all;font-family:inherit}.excalidraw .scroll-back-to-content:hover{background-color:var(--button-hover-bg)}.excalidraw .scroll-back-to-content:active{border:1px solid var(--color-primary-darkest)}.excalidraw .help-icon{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .help-icon svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .help-icon:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .help-icon:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .help-icon.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .help-icon.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .help-icon.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .help-icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .reset-zoom-button{font-family:var(--ui-font)}.excalidraw .finalize-button{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw .undo-redo-buttons,.excalidraw .eraser-buttons{display:grid;grid-auto-flow:column;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw--mobile.excalidraw aside{display:none}.excalidraw--mobile.excalidraw .scroll-back-to-content{bottom:calc(80px + var(--sab, 0));z-index:-1}:root[dir=rtl] .excalidraw .rtl-mirror{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .zen-mode-visibility{visibility:visible;opacity:1;height:auto;width:auto;transition:opacity .5s}.excalidraw .zen-mode-visibility.zen-mode-visibility--hidden{visibility:hidden;opacity:0;height:0;width:0;transition:opacity .5s}.excalidraw .disable-pointerEvents{pointer-events:none !important}.excalidraw.excalidraw--view-mode .App-menu{display:flex;justify-content:space-between}.excalidraw input[type=text],.excalidraw textarea:not(.excalidraw-wysiwyg){color:var(--text-primary-color);border:1.5px solid var(--input-border-color);padding:.75rem;white-space:nowrap;border-radius:var(--space-factor);background-color:var(--input-bg-color)}.excalidraw input[type=text]:not(:focus):hover,.excalidraw textarea:not(.excalidraw-wysiwyg):not(:focus):hover{background-color:var(--input-hover-bg-color)}.excalidraw input[type=text]:focus,.excalidraw textarea:not(.excalidraw-wysiwyg):focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}@media print{.excalidraw .App-bottom-bar,.excalidraw .FixedSideContainer,.excalidraw .layer-ui__wrapper{display:none}}.excalidraw ::-webkit-scrollbar{width:3px;height:3px}.excalidraw ::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:10px}.excalidraw ::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}.excalidraw ::-webkit-scrollbar-thumb:active{background:var(--scrollbar-thumb)}.excalidraw .mobile-misc-tools-container{position:absolute;top:calc(5rem - var(--editor-container-padding));right:calc(var(--editor-container-padding)*-1);display:flex;flex-direction:column;border:1px solid var(--sidebar-border-color);border-top-left-radius:var(--border-radius-lg);border-bottom-left-radius:var(--border-radius-lg);border-right:0;overflow:hidden;background-color:var(--island-bg-color)}.excalidraw .mobile-misc-tools-container .ToolIcon__icon{border-radius:0}.excalidraw .mobile-misc-tools-container .default-sidebar-trigger{border:0}.excalidraw .App-toolbar--mobile{overflow-x:auto;max-width:90vw}.excalidraw .App-toolbar--mobile .ToolIcon__keybinding{display:none}.excalidraw .UserList-Wrapper{margin:0;padding:0;border:none;text-align:left}.excalidraw .UserList-Wrapper legend{display:block;font-size:.75rem;font-weight:400;margin:0 0 .25rem;padding:0}.ErrorSplash.excalidraw{min-height:100vh;padding:20px 0;overflow:auto;display:flex;align-items:center;justify-content:center;-webkit-user-select:text;user-select:text}.ErrorSplash.excalidraw .ErrorSplash-messageContainer{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;background-color:#ffe3e3;border:3px solid #c92a2a}.ErrorSplash.excalidraw .ErrorSplash-paragraph{margin:15px 0;max-width:600px}.ErrorSplash.excalidraw .ErrorSplash-paragraph.align-center{text-align:center}.ErrorSplash.excalidraw .bigger,.ErrorSplash.excalidraw .bigger button{font-size:1.1em}.ErrorSplash.excalidraw .smaller,.ErrorSplash.excalidraw .smaller button{font-size:.9em}.ErrorSplash.excalidraw .ErrorSplash-details{display:flex;flex-direction:column;align-items:flex-start}.ErrorSplash.excalidraw .ErrorSplash-details textarea{width:100%;margin:10px 0;font-family:"Cascadia";font-size:.8em}',""]),t.Z=d},6464:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,"",""]),a.locals={themeFilter:"invert(93%) hue-rotate(180deg)",rightSidebarWidth:"302px"},t.Z=a},5260:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-hyperlinkContainer{display:flex;align-items:center;justify-content:space-between;position:absolute;box-shadow:0px 2px 4px 0 rgba(0,0,0,.3);z-index:100;background:var(--island-bg-color);border-radius:var(--border-radius-md);box-sizing:border-box;min-height:42px}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer button{z-index:100}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer-link{height:24px;padding:0 8px;line-height:24px;font-size:.9rem;font-weight:500;font-family:var(--ui-font)}.excalidraw-hyperlinkContainer-input{width:18rem;border:none;background-color:rgba(0,0,0,0);color:var(--text-primary-color);outline:none;border:none;box-shadow:none !important}.excalidraw-hyperlinkContainer-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:15rem}.excalidraw-hyperlinkContainer button{color:#228be6;background-color:rgba(0,0,0,0) !important;font-weight:500}.excalidraw-hyperlinkContainer button.excalidraw-hyperlinkContainer--remove{color:#c92a2a}.excalidraw-hyperlinkContainer .d-none{display:none}.excalidraw-hyperlinkContainer--remove .ToolIcon__icon svg{color:#fa5252}.excalidraw-hyperlinkContainer .ToolIcon__icon{width:2rem;height:2rem}.excalidraw-hyperlinkContainer__buttons{flex:0 0 auto}",""]),t.Z=a},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var l=0;l<this.length;l++){var c=this[l][0];null!=c&&(a[c]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);r&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},1667:function(e){"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},8081:function(e){"use strict";e.exports=function(e){return e[1]}},202:function(e,t,n){"use strict";n.d(t,{JQ:function(){return w},vD:function(){return y},y7:function(){return b}});var r=n(1930),o=n(7169),i=n(2335),a=n(1047),l=n(1935),c=n(5710),s=n(6906),u=n(1974),d=n(75),f=n(6340),p=n(7901);function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=(0,p.z)({name:"unbindText",contextItemLabel:"labels.unbindText",trackEvent:{category:"element"},predicate:function(e,t){return(0,d.eD)(e,t).some((function(e){return(0,u.Xo)(e)}))},perform:function(e,t){return(0,d.eD)((0,a.Lm)(e),t).forEach((function(e){var t=(0,c.WJ)(e);if(t){var n,r=(0,c.X1)(t.originalText,(0,f.mO)(t),t.lineHeight),o=r.width,i=r.height,a=r.baseline,u=(0,s.eR)(e.id);(0,s.kT)(e.id);var d=(0,c.FE)(e,t),p=d.x,h=d.y;(0,l.DR)(t,{containerId:null,width:o,height:i,baseline:a,text:t.originalText,x:p,y:h}),(0,l.DR)(e,{boundElements:null===(n=e.boundElements)||void 0===n?void 0:n.filter((function(e){return e.id!==t.id})),height:u||e.height})}})),{elements:e,appState:t,commitToHistory:!0}}}),y=(0,p.z)({name:"bindText",contextItemLabel:"labels.bindText",trackEvent:{category:"element"},predicate:function(e,t){var n=(0,d.eD)(e,t);if(2===n.length){var r,o=(0,a.iB)(n[0])||(0,a.iB)(n[1]);if((0,u.mG)(n[0])?r=n[0]:(0,u.mG)(n[1])&&(r=n[1]),o&&r&&null===(0,c.WJ)(r))return!0}return!1},perform:function(e,t){var n,r,f=(0,d.eD)((0,a.Lm)(e),t);(0,a.iB)(f[0])&&(0,u.mG)(f[1])?(n=f[0],r=f[1]):(n=f[1],r=f[0]),(0,l.DR)(n,{containerId:r.id,verticalAlign:i.oX.MIDDLE,textAlign:i.I8.CENTER}),(0,l.DR)(r,{boundElements:(r.boundElements||[]).concat({type:"text",id:n.id})});var p=r.height;return(0,c.oN)(n,r),(0,s.h_)(r.id,p),{elements:x(e,r,n),appState:v(v({},t),{},{selectedElementIds:(0,o.Z)({},r.id,!0)}),commitToHistory:!0}}}),x=function(e,t,n){var r=e.slice(),o=r.findIndex((function(e){return e.id===n.id}));r.splice(o,1);var i=r.findIndex((function(e){return e.id===t.id}));return r.splice(i+1,0,n),r},w=(0,p.z)({name:"wrapTextInContainer",contextItemLabel:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:function(e,t){var n=(0,d.eD)(e,t),r=n.every((function(e){return(0,a.iB)(e)}));return n.length>0&&r},perform:function(e,t){var n,o=(0,d.eD)((0,a.Lm)(e),t),s=e.slice(),f={},p=h(o);try{var m=function(){var e=n.value;if((0,a.iB)(e)){var o,d=(0,a.Up)({type:"rectangle",backgroundColor:t.currentItemBackgroundColor,boundElements:[].concat((0,r.Z)(e.boundElements||[]),[{id:e.id,type:"text"}]),angle:e.angle,fillStyle:t.currentItemFillStyle,strokeColor:t.currentItemStrokeColor,roughness:t.currentItemRoughness,strokeWidth:t.currentItemStrokeWidth,strokeStyle:t.currentItemStrokeStyle,roundness:"round"===t.currentItemRoundness?{type:(0,u.QI)("rectangle")?i.a6.ADAPTIVE_RADIUS:i.a6.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:e.x-i.gK,y:e.y-i.gK,width:(0,c.NS)(e.width,"rectangle"),height:(0,c.NS)(e.height,"rectangle"),groupIds:e.groupIds});if(null!==(o=e.boundElements)&&void 0!==o&&o.length){var p=e.boundElements.filter((function(e){return"arrow"===e.type})).map((function(e){return e.id}));s.filter((function(e){return p.includes(e.id)})).forEach((function(t){var n,r,o=t.startBinding,i=t.endBinding;(null===(n=o)||void 0===n?void 0:n.elementId)===e.id&&(o=v(v({},o),{},{elementId:d.id})),(null===(r=i)||void 0===r?void 0:r.elementId)===e.id&&(i=v(v({},i),{},{elementId:d.id})),(o||i)&&(0,l.DR)(t,{startBinding:o,endBinding:i},!1)}))}(0,l.DR)(e,{containerId:d.id,verticalAlign:i.oX.MIDDLE,boundElements:null,textAlign:i.I8.CENTER},!1),(0,c.oN)(e,d),s=function(e,t,n){var r=e.slice(),o=r.findIndex((function(e){return e.id===t.id}));r.splice(o,1);var i=r.findIndex((function(e){return e.id===n.id}));return r.splice(i,0,t),r}([].concat((0,r.Z)(s),[d]),d,e),f[d.id]=!0}};for(p.s();!(n=p.n()).done;)m()}catch(e){p.e(e)}finally{p.f()}return{elements:s,appState:v(v({},t),{},{selectedElementIds:f}),commitToHistory:!0}}})},2416:function(e,t,n){"use strict";n.d(t,{CZ:function(){return S},Lo:function(){return j},Zp:function(){return C},eF:function(){return I},md:function(){return _},mo:function(){return E}});var r=n(2577),o=n(7169),i=n(4499),a=n(3646),l=n(1319),c=n(2335),s=n(1047),u=n(8211),d=n(6066),f=n(75),p=n(2264),h=n(746),m=n(6340),g=n(7901),v=n(1894),b=n(1935),y=n(8897),x=n(4512);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,g.z)({name:"changeViewBackgroundColor",trackEvent:!1,predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.changeViewBackgroundColor&&!t.viewModeEnabled},perform:function(e,t,n){return{appState:k(k({},t),n),commitToHistory:!!n.viewBackgroundColor}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,x.jsx)("div",{style:{position:"relative"},children:(0,x.jsx)(i.z,{label:(0,u.t)("labels.canvasBackground"),type:"canvasBackground",color:n.viewBackgroundColor,onChange:function(e){return r({viewBackgroundColor:e})},isActive:"canvasColorPicker"===n.openPopup,setActive:function(e){return r({openPopup:e?"canvasColorPicker":null})},"data-testid":"canvas-background-picker",elements:t,appState:n})})}});var E=(0,g.z)({name:"clearCanvas",trackEvent:{category:"canvas"},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.clearCanvas&&!t.viewModeEnabled},perform:function(e,t,n,r){return r.imageCache.clear(),{elements:e.map((function(e){return(0,b.BE)(e,{isDeleted:!0})})),appState:k(k({},(0,y.im)()),{},{files:{},theme:t.theme,penMode:t.penMode,penDetected:t.penDetected,exportBackground:t.exportBackground,exportEmbedScene:t.exportEmbedScene,gridSize:t.gridSize,showStats:t.showStats,pasteDialog:t.pasteDialog,activeTool:"image"===t.activeTool.type?k(k({},t.activeTool),{},{type:"selection"}):t.activeTool}),commitToHistory:!0}}}),j=(0,g.z)({name:"zoomIn",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:k(k({},t),(0,h.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,f.j)(t.zoom.value+c.V4)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData;return(0,x.jsx)(l.V,{type:"button",className:"zoom-in-button zoom-button",icon:a.Sd,title:"".concat((0,u.t)("buttons.zoomIn")," — ").concat((0,m.uY)("CtrlOrCmd++")),"aria-label":(0,u.t)("buttons.zoomIn"),onClick:function(){t(null)}})},keyTest:function(e){return(e.code===d.aU.EQUAL||e.code===d.aU.NUM_ADD)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}}),S=(0,g.z)({name:"zoomOut",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:k(k({},t),(0,h.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,f.j)(t.zoom.value-c.V4)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData;return(0,x.jsx)(l.V,{type:"button",className:"zoom-out-button zoom-button",icon:a.xL,title:"".concat((0,u.t)("buttons.zoomOut")," — ").concat((0,m.uY)("CtrlOrCmd+-")),"aria-label":(0,u.t)("buttons.zoomOut"),onClick:function(){t(null)}})},keyTest:function(e){return(e.code===d.aU.MINUS||e.code===d.aU.NUM_SUBTRACT)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}}),O=((0,g.z)({name:"resetZoom",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:k(k({},t),(0,h.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,f.j)(1)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData,n=e.appState;return(0,x.jsx)(v.u,{label:(0,u.t)("buttons.resetZoom"),style:{height:"100%"},children:(0,x.jsxs)(l.V,{type:"button",className:"reset-zoom-button zoom-button",title:(0,u.t)("buttons.resetZoom"),"aria-label":(0,u.t)("buttons.resetZoom"),onClick:function(){t(null)},children:[(100*n.zoom.value).toFixed(0),"%"]})})},keyTest:function(e){return(e.code===d.aU.ZERO||e.code===d.aU.NUM_ZERO)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}}),function(e,t){var n=(0,r.Z)(e,4),o=n[0],i=n[1],a=n[2],l=n[3],s=a-o,u=t.width/s,d=l-i,f=t.height/d,p=Math.min(u,f),h=Math.floor(p/c.V4)*c.V4;return Math.min(Math.max(h,c.Zj),1)}),_=function(e,t,n){var o=(0,s.Lm)(e),i=(0,f.eD)(o,t),a=n&&i.length>0?(0,s.KP)(i):(0,s.KP)(o),l={value:O(a,{width:t.width,height:t.height})},c=(0,r.Z)(a,4),u=c[0],d=c[1],h=(u+c[2])/2,m=(d+c[3])/2;return{appState:k(k(k({},t),(0,p.s)({scenePoint:{x:h,y:m},viewportDimensions:{width:t.width,height:t.height},zoom:l})),{},{zoom:l}),commitToHistory:!1}},C=((0,g.z)({name:"zoomToSelection",trackEvent:{category:"canvas"},perform:function(e,t){return _(e,t,!0)},keyTest:function(e){return e.code===d.aU.TWO&&e.shiftKey&&!e.altKey&&!e[d.tW.CTRL_OR_CMD]}}),(0,g.z)({name:"zoomToFit",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t){return _(e,t,!1)},keyTest:function(e){return e.code===d.aU.ONE&&e.shiftKey&&!e.altKey&&!e[d.tW.CTRL_OR_CMD]}}),(0,g.z)({name:"toggleTheme",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n){return{appState:k(k({},t),{},{theme:n||(t.theme===c.C6.LIGHT?c.C6.DARK:c.C6.LIGHT)}),commitToHistory:!1}},keyTest:function(e){return e.altKey&&e.shiftKey&&e.code===d.aU.D},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.toggleTheme}})),I=((0,g.z)({name:"toggleEraserTool",trackEvent:{category:"toolbar"},perform:function(e,t){var n;return n=(0,y.EN)(t)?(0,m.Om)(t,k(k({},t.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,m.Om)(t,{type:"eraser",lastActiveToolBeforeEraser:t.activeTool}),{appState:k(k({},t),{},{selectedElementIds:{},selectedGroupIds:{},activeTool:n}),commitToHistory:!0}},keyTest:function(e){return e.key===d.tW.E}}),(0,g.z)({name:"toggleHandTool",trackEvent:{category:"toolbar"},perform:function(e,t,n,r){var o;return(0,y.l$)(t)?o=(0,m.Om)(t,k(k({},t.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(o=(0,m.Om)(t,{type:"hand",lastActiveToolBeforeEraser:t.activeTool}),(0,m.KJ)(r.canvas,c.oc.GRAB)),{appState:k(k({},t),{},{selectedElementIds:{},selectedGroupIds:{},activeTool:o}),commitToHistory:!0}},keyTest:function(e){return e.key===d.tW.H}}))},4688:function(e,t,n){"use strict";n.d(t,{FA:function(){return k},ZM:function(){return w},jK:function(){return E},uN:function(){return y},yQ:function(){return x},zp:function(){return j}});var r=n(7169),o=n(8950),i=n(2975),a=n.n(i),l=n(6066),c=n(7901),s=n(6665),u=n(533),d=n(1868),f=n(9485),p=n(1047),h=n(8211);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v,b,y=(0,c.z)({name:"copy",trackEvent:{category:"element"},perform:function(e,t,n,r){var o=(0,d.eD)(e,t,!0);return(0,s.vQ)(o,r.files),{commitToHistory:!1}},predicate:function(e,t,n,r){return r.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.copy",keyTest:void 0}),x=(0,c.z)({name:"paste",trackEvent:{category:"element"},perform:function(e,t,n,r){return r.pasteFromClipboard(null),{commitToHistory:!1}},predicate:function(e,t,n,r){return r.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.paste",keyTest:void 0}),w=(0,c.z)({name:"cut",trackEvent:{category:"element"},perform:function(e,t,n,r){return y.perform(e,t,n,r),u.X.perform(e,t)},predicate:function(e,t,n,r){return r.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.cut",keyTest:function(e){return e[l.tW.CTRL_OR_CMD]&&e.key===l.tW.X}}),k=(0,c.z)({name:"copyAsSvg",trackEvent:{category:"element"},perform:(v=(0,o.Z)(a().mark((function e(t,n,r,o){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.canvas){e.next=2;break}return e.abrupt("return",{commitToHistory:!1});case 2:return i=(0,d.eD)((0,p.Lm)(t),n,!0),e.prev=3,e.next=6,(0,f.p1)("clipboard-svg",i.length?i:(0,p.Lm)(t),n,o.files,n);case 6:return e.abrupt("return",{commitToHistory:!1});case 9:return e.prev=9,e.t0=e.catch(3),console.error(e.t0),e.abrupt("return",{appState:g(g({},n),{},{errorMessage:e.t0.message}),commitToHistory:!1});case 13:case"end":return e.stop()}}),e,null,[[3,9]])}))),function(e,t,n,r){return v.apply(this,arguments)}),predicate:function(e){return s.wx&&e.length>0},contextItemLabel:"labels.copyAsSvg"}),E=(0,c.z)({name:"copyAsPng",trackEvent:{category:"element"},perform:(b=(0,o.Z)(a().mark((function e(t,n,r,o){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.canvas){e.next=2;break}return e.abrupt("return",{commitToHistory:!1});case 2:return i=(0,d.eD)((0,p.Lm)(t),n,!0),e.prev=3,e.next=6,(0,f.p1)("clipboard",i.length?i:(0,p.Lm)(t),n,o.files,n);case 6:return e.abrupt("return",{appState:g(g({},n),{},{toast:{message:(0,h.t)("toast.copyToClipboardAsPng",{exportSelection:i.length?(0,h.t)("toast.selection"):(0,h.t)("toast.canvas"),exportColorScheme:n.exportWithDarkMode?(0,h.t)("buttons.darkMode"):(0,h.t)("buttons.lightMode")})}}),commitToHistory:!1});case 9:return e.prev=9,e.t0=e.catch(3),console.error(e.t0),e.abrupt("return",{appState:g(g({},n),{},{errorMessage:e.t0.message}),commitToHistory:!1});case 13:case"end":return e.stop()}}),e,null,[[3,9]])}))),function(e,t,n,r){return b.apply(this,arguments)}),predicate:function(e){return s.vt&&e.length>0},contextItemLabel:"labels.copyAsPng",keyTest:function(e){return e.code===l.aU.C&&e.altKey&&e.shiftKey}}),j=(0,c.z)({name:"copyText",trackEvent:{category:"element"},perform:function(e,t){var n=(0,d.eD)((0,p.Lm)(e),t,!0).reduce((function(e,t){return(0,p.iB)(t)&&e.push(t.text),e}),[]).join("\n\n");return(0,s.dd)(n),{commitToHistory:!1}},predicate:function(e,t){return s.wx&&(0,d.eD)(e,t,!0).some(p.iB)},contextItemLabel:"labels.copyText"})},533:function(e,t,n){"use strict";n.d(t,{X:function(){return w}});var r=n(7169),o=n(75),i=n(6066),a=n(1319),l=n(8211),c=n(7901),s=n(1047),u=n(1935),d=n(242),f=n(6938),p=n(8290),h=n(1974),m=n(6340),g=n(3646),v=n(4512);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=function(e,t){if(e.editingGroupId){var n=(0,d.Fb)((0,s.Lm)(t),e.editingGroupId);if(n.length)return y(y({},e),{},{selectedElementIds:(0,r.Z)({},n[0].id,!0)})}return e},w=(0,c.z)({name:"deleteSelectedElements",trackEvent:{category:"element",action:"delete"},perform:function(e,t){if(t.editingLinearElement){var n=t.editingLinearElement,r=n.elementId,i=n.selectedPointsIndices,a=n.startBindingElement,l=n.endBindingElement,c=f._.getElement(r);if(!c)return!1;if(null==i)return!1;if(c.points.length<2){var d=e.map((function(e){return e.id===c.id?(0,u.BE)(e,{isDeleted:!0}):e}));return{elements:d,appState:y(y({},x(t,d)),{},{editingLinearElement:null}),commitToHistory:!1}}var g={startBindingElement:null!=i&&i.includes(0)?null:a,endBindingElement:null!=i&&i.includes(c.points.length-1)?null:l};return f._.deletePoints(c,i),{elements:e,appState:y(y({},t),{},{editingLinearElement:y(y(y({},t.editingLinearElement),g),{},{selectedPointsIndices:(null==i?void 0:i[0])>0?[i[0]-1]:[0]})}),commitToHistory:!0}}var v=function(e,t){return{elements:e.map((function(e){return t.selectedElementIds[e.id]||(0,h.Xh)(e)&&t.selectedElementIds[e.containerId]?(0,u.BE)(e,{isDeleted:!0}):e})),appState:y(y({},t),{},{selectedElementIds:{}})}}(e,t),b=v.elements,w=v.appState;return(0,p.$q)(b,e.filter((function(e){var n=e.id;return t.selectedElementIds[n]}))),{elements:b,appState:y(y({},w=x(w,b)),{},{activeTool:(0,m.Om)(t,{type:"selection"}),multiElement:null}),commitToHistory:(0,o.N)((0,s.Lm)(e),t)}},contextItemLabel:"labels.delete",keyTest:function(e,t,n){return(e.key===i.tW.BACKSPACE||e.key===i.tW.DELETE)&&!e[i.tW.CTRL_OR_CMD]},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,v.jsx)(a.V,{type:"button",icon:g.XH,title:(0,l.t)("labels.delete"),"aria-label":(0,l.t)("labels.delete"),onClick:function(){return r(null)},visible:(0,o.N)((0,s.Lm)(t),n)})}})},8671:function(e,t,n){"use strict";n.d(t,{_d:function(){return te},mM:function(){return ee},ns:function(){return Q}});var r=n(8950),o=n(2577),i=n(7169),a=n(2975),l=n.n(a),c=n(3646),s=n(487),u=n.n(s),d=n(631),f=n.n(d),p=n(2052),h=n.n(p),m=n(4010),g=n.n(m),v=n(1469),b=n.n(v),y=n(9329),x=n.n(y),w=n(6759),k={};k.styleTagTransform=x(),k.setAttributes=g(),k.insert=h().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=b();u()(w.Z,k),w.Z&&w.Z.locals&&w.Z.locals;var E=n(9787),j=n(6340),S=n(532),O={};O.styleTagTransform=x(),O.setAttributes=g(),O.insert=h().bind(null,"head"),O.domAPI=f(),O.insertStyleElement=b();u()(S.Z,O),S.Z&&S.Z.locals&&S.Z.locals;var _=n(6936),C=n(4512),I=function(e){var t=(0,_.J0)().id,n=(0,E.useState)(e.value),r=(0,o.Z)(n,2),i=r[0],a=r[1];return(0,C.jsxs)("div",{className:"ProjectName",children:[(0,C.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:"".concat(e.label).concat(e.isNameEditable?"":":")}),e.isNameEditable?(0,C.jsx)("input",{type:"text",className:"TextInput",onBlur:function(t){(0,j.qz)(t.target);var n=t.target.value;n!==e.value&&e.onChange(n)},onKeyDown:function(e){if("Enter"===e.key){if(e.preventDefault(),e.nativeEvent.isComposing||229===e.keyCode)return;e.currentTarget.blur()}},id:"".concat(t,"-filename"),value:i,onChange:function(e){return a(e.target.value)}}):(0,C.jsx)("span",{className:"TextInput TextInput--readonly",id:"".concat(t,"-filename"),children:e.value})]})},T=n(1319),P=n(1894),M=(n(5422),n(8211)),D=n(2335),A=function(e){var t=e.title||("dark"===e.value?(0,M.t)("buttons.lightMode"):(0,M.t)("buttons.darkMode"));return(0,C.jsx)(T.V,{type:"icon",icon:e.value===D.C6.LIGHT?L.MOON:L.SUN,title:t,"aria-label":t,onClick:function(){return e.onChange(e.value===D.C6.DARK?D.C6.LIGHT:D.C6.DARK)},"data-testid":"toggle-dark-mode"})},L={SUN:(0,C.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,C.jsx)("path",{fill:"currentColor",d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"})}),MOON:(0,C.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,C.jsx)("path",{fill:"currentColor",d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"})})},Z=n(9485),z=n(1047),R=n(434);function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var H=function(){var e=(0,r.Z)(l().mark((function e(t,n,r){var o,i,a,c,s,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(o=n).exportBackground,a=o.viewBackgroundColor,c=o.name,s=o.fileHandle,u=(0,R.Qk)(s),s&&(0,R.DQ)(u)){e.next=4;break}throw new Error("fileHandle should exist and should be of type svg or png when resaving");case 4:return n=B(B({},n),{},{exportEmbedScene:!0}),e.next=7,(0,Z.p1)(u,(0,z.Lm)(t),n,r,{exportBackground:i,viewBackgroundColor:a,name:c,fileHandle:s});case 7:return e.abrupt("return",{fileHandle:s});case 8:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),W=n(6066),F=n(7901),U=n(3807),K=n(4162),Y=n(75),V=n(1393);function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,F.z)({name:"changeProjectName",trackEvent:!1,perform:function(e,t,n){return{appState:X(X({},t),{},{name:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData,r=e.appProps;return(0,C.jsx)(I,{label:(0,M.t)("labels.fileTitle"),value:t.name||"Unnamed",onChange:function(e){return n(e)},isNameEditable:void 0===r.name&&!t.viewModeEnabled})}}),(0,F.z)({name:"changeExportScale",trackEvent:{category:"export",action:"scale"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportScale:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,i=(0,z.Lm)(t),a=(0,Y.N)(i,n)?(0,Y.eD)(i,n):i;return(0,C.jsx)(C.Fragment,{children:D.ZB.map((function(e){var t=(0,K.Cg)(a,D.qy,e),i=(0,o.Z)(t,2),l=i[0],c=i[1],s="".concat((0,M.t)("buttons.scale")," ").concat(e,"x (").concat(l,"x").concat(c,")");return(0,C.jsx)(T.V,{size:"small",type:"radio",icon:"".concat(e,"x"),name:"export-canvas-scale",title:s,"aria-label":s,id:"export-canvas-scale",checked:e===n.exportScale,onChange:function(){return r(e)}},e)}))})}}),(0,F.z)({name:"changeExportBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportBackground:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,C.jsx)(U.o,{checked:t.exportBackground,onChange:function(e){return n(e)},children:(0,M.t)("labels.withBackground")})}}),(0,F.z)({name:"changeExportEmbedScene",trackEvent:{category:"export",action:"embedScene"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportEmbedScene:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,C.jsxs)(U.o,{checked:t.exportEmbedScene,onChange:function(e){return n(e)},children:[(0,M.t)("labels.exportEmbedScene"),(0,C.jsx)(P.u,{label:(0,M.t)("labels.exportEmbedScene_details"),long:!0,children:(0,C.jsx)("div",{className:"excalidraw-tooltip-icon",children:c.Vl})})]})}});var q,J,$,Q=(0,F.z)({name:"saveToActiveFile",trackEvent:{category:"export"},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.saveToActiveFile&&!!t.fileHandle&&!t.viewModeEnabled},perform:(q=(0,r.Z)(l().mark((function e(t,n,r,o){var i,a,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!!n.fileHandle,e.prev=1,!(0,R.g8)(n.fileHandle)){e.next=8;break}return e.next=5,H(t,n,o.files);case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,(0,Z.Um)(t,n,o.files);case 10:e.t0=e.sent;case 11:return a=e.t0,c=a.fileHandle,e.abrupt("return",{commitToHistory:!1,appState:X(X({},n),{},{fileHandle:c,toast:i?{message:null!=c&&c.name?(0,M.t)("toast.fileSavedToFilename").replace("{filename}",'"'.concat(c.name,'"')):(0,M.t)("toast.fileSaved")}:null})});case 16:return e.prev=16,e.t1=e.catch(1),"AbortError"!==(null===e.t1||void 0===e.t1?void 0:e.t1.name)?console.error(e.t1):console.warn(e.t1),e.abrupt("return",{commitToHistory:!1});case 20:case"end":return e.stop()}}),e,null,[[1,16]])}))),function(e,t,n,r){return q.apply(this,arguments)}),keyTest:function(e){return e.key===W.tW.S&&e[W.tW.CTRL_OR_CMD]&&!e.shiftKey}}),ee=(0,F.z)({name:"saveFileToDisk",viewMode:!0,trackEvent:{category:"export"},perform:(J=(0,r.Z)(l().mark((function e(t,n,r,o){var i,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,Z.Um)(t,X(X({},n),{},{fileHandle:null}),o.files);case 3:return i=e.sent,a=i.fileHandle,e.abrupt("return",{commitToHistory:!1,appState:X(X({},n),{},{fileHandle:a})});case 8:return e.prev=8,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)?console.error(e.t0):console.warn(e.t0),e.abrupt("return",{commitToHistory:!1});case 12:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,t,n,r){return J.apply(this,arguments)}),keyTest:function(e){return e.key===W.tW.S&&e.shiftKey&&e[W.tW.CTRL_OR_CMD]},PanelComponent:function(e){var t=e.updateData;return(0,C.jsx)(T.V,{type:"button",icon:c.po,title:(0,M.t)("buttons.saveAs"),"aria-label":(0,M.t)("buttons.saveAs"),showAriaLabel:(0,_.Fy)().isMobile,hidden:!V.kr,onClick:function(){return t(null)},"data-testid":"save-as-button"})}}),te=(0,F.z)({name:"loadScene",trackEvent:{category:"export"},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.loadScene&&!t.viewModeEnabled},perform:($=(0,r.Z)(l().mark((function e(t,n,r,o){var i,a,c,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,Z.n8)(n,t);case 3:return i=e.sent,a=i.elements,c=i.appState,s=i.files,e.abrupt("return",{elements:a,appState:c,files:s,commitToHistory:!0});case 10:if(e.prev=10,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=15;break}return console.warn(e.t0),e.abrupt("return",!1);case 15:return e.abrupt("return",{elements:t,appState:X(X({},n),{},{errorMessage:e.t0.message}),files:o.files,commitToHistory:!1});case 16:case"end":return e.stop()}}),e,null,[[0,10]])}))),function(e,t,n,r){return $.apply(this,arguments)}),keyTest:function(e){return e[W.tW.CTRL_OR_CMD]&&e.key===W.tW.O}});(0,F.z)({name:"exportWithDarkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportWithDarkMode:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,C.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:(0,C.jsx)(A,{value:t.exportWithDarkMode?D.C6.DARK:D.C6.LIGHT,onChange:function(e){n(e===D.C6.DARK)},title:(0,M.t)("labels.toggleExportColorScheme")})})}})},6208:function(e,t,n){"use strict";n.d(t,{Tu:function(){return q},Zq:function(){return J}});var r=n(1930),o=n(7169),i=n(7047),a=n(45),l=n(4512),c=function(e){return(0,l.jsx)("div",{className:"buttonList buttonListIcon",children:e.options.map((function(t){var n;return"button"===e.type?(0,l.jsx)("button",{onClick:function(n){return e.onClick(t.value,n)},className:(0,a.Z)({active:null!==(n=t.active)&&void 0!==n?n:e.value===t.value}),"data-testid":t.testId,title:t.text,children:t.icon},t.text):(0,l.jsxs)("label",{className:(0,a.Z)({active:e.value===t.value}),title:t.text,children:[(0,l.jsx)("input",{type:"radio",name:e.group,onChange:function(){return e.onChange(t.value)},checked:e.value===t.value,"data-testid":t.testId}),t.icon]},t.text)}))})},s=n(4499),u=n(2577),d=n(9787),f=n.n(d),p=n(2891),h=n(487),m=n.n(h),g=n(631),v=n.n(g),b=n(2052),y=n.n(b),x=n(4010),w=n.n(x),k=n(1469),E=n.n(k),j=n(9329),S=n.n(j),O=n(9478),_={};_.styleTagTransform=S(),_.setAttributes=w(),_.insert=y().bind(null,"head"),_.domAPI=v(),_.insertStyleElement=E();m()(O.Z,_),O.Z&&O.Z.locals&&O.Z.locals;var C=n(6066),I=n(8211);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(e){var t=e.options,n=e.value,r=e.label,o=e.onChange,i=e.onClose,c=f().useRef(),s=f().useRef(),u=f().useRef(null);f().useEffect((function(){s.current?s.current.focus():u.current&&u.current.focus()}),[]);return(0,l.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":r,onKeyDown:function(e){var n=t.find((function(t){return t.keyBinding===e.key.toLowerCase()}));if(e.metaKey||e.altKey||e.ctrlKey||!n)if(e.key===C.tW.TAB)setTimeout((function(){s.current!==document.activeElement&&i()}),0);else if((0,C.Wl)(e.key)){var r=document.activeElement,o=(0,I.G3)().rtl,a=Array.prototype.indexOf.call(u.current.children,r);if(-1!==a){var l=t.length,c=a;switch(e.key){case o?C.tW.ARROW_LEFT:C.tW.ARROW_RIGHT:case C.tW.ARROW_DOWN:c=(a+1)%l;break;case o?C.tW.ARROW_RIGHT:C.tW.ARROW_LEFT:case C.tW.ARROW_UP:c=(l+a-1)%l}u.current.children[c].focus()}e.preventDefault()}else e.key!==C.tW.ESCAPE&&e.key!==C.tW.ENTER||(e.preventDefault(),i());else{var d=t.indexOf(n);u.current.children[d].focus(),e.preventDefault()}e.nativeEvent.stopImmediatePropagation(),e.stopPropagation()},children:(0,l.jsx)("div",{className:"picker-content",ref:u,children:t.map((function(e,t){return(0,l.jsxs)("button",{className:(0,a.Z)("picker-option",{active:n===e.value}),onClick:function(t){t.currentTarget.focus(),o(e.value)},title:"".concat(e.text," — ").concat(e.keyBinding.toUpperCase()),"aria-label":e.text||"none","aria-keyshortcuts":e.keyBinding,ref:function(r){r&&0===t&&(c.current=r),r&&e.value===n&&(s.current=r)},onFocus:function(){o(e.value)},children:[e.icon,(0,l.jsx)("span",{className:"picker-keybinding",children:e.keyBinding})]},e.text)}))})})}function D(e){var t,n=e.value,r=e.label,o=e.options,i=e.onChange,a=e.group,c=void 0===a?"":a,s=f().useState(!1),d=(0,u.Z)(s,2),h=d[0],m=d[1],g=f().useRef(null),v=(0,I.G3)().rtl;return(0,l.jsxs)("div",{children:[(0,l.jsx)("button",{name:c,className:h?"active":"","aria-label":r,onClick:function(){return m(!h)},ref:g,children:null===(t=o.find((function(e){return e.value===n})))||void 0===t?void 0:t.icon}),(0,l.jsx)(f().Suspense,{fallback:"",children:h?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p.J,P(P({onCloseRequest:function(e){return e.target!==g.current&&m(!1)}},v?{right:5.5}:{left:-5.5}),{},{children:(0,l.jsx)(M,{options:o,value:n,label:r,onChange:i,onClose:function(){var e;m(!1),null===(e=g.current)||void 0===e||e.focus()}})})),(0,l.jsx)("div",{className:"picker-triangle"})]}):null})]})}var A=n(3646),L=n(2335),Z=n(1047),z=n(1935),R=n(5710),N=n(1974),B=n(6954),H=n(75),W=n(8120),F=n(6340),U=n(7901);function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=(0,F.xn)((0,H.eD)(e,t,r));return e.map((function(e){var r;return o.get(e.id)||e.id===(null===(r=t.editingElement)||void 0===r?void 0:r.id)?n(e):e}))},G=function(e,t,n,r){var o,i,a=t.editingElement,l=(0,Z.Lm)(e);return null!==(o=null!==(i=a&&n(a))&&void 0!==i?i:(0,H.N)(l,t)?(0,H.PR)(l,t,n):r)&&void 0!==o?o:null},X=function(e,t,n,o){var i=new Set;return{elements:V(e,t,(function(e){if((0,Z.iB)(e)){var t=n(e);i.add(t);var r=(0,z.BE)(e,{fontSize:t});return(0,Z.oN)(r,(0,R.tl)(e)),o=e,a=r,r=(0,N.Xh)(a)?a:(0,z.DR)(a,{x:"left"===o.textAlign?o.x:o.x+(o.width-a.width)/("center"===o.textAlign?2:1),y:o.y+(o.height-a.height)/2},!1)}var o,a;return e}),!0),appState:Y(Y({},t),{},{currentItemFontSize:1===i.size?(0,r.Z)(i)[0]:null!=o?o:t.currentItemFontSize}),commitToHistory:!0}},q=((0,U.z)({name:"changeStrokeColor",trackEvent:!1,perform:function(e,t,n){return Y(Y({},n.currentItemStrokeColor&&{elements:V(e,t,(function(e){return(0,W.PD)(e.type)?(0,z.BE)(e,{strokeColor:n.currentItemStrokeColor}):e}),!0)}),{},{appState:Y(Y({},t),n),commitToHistory:!!n.currentItemStrokeColor})},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{"aria-hidden":"true",children:(0,I.t)("labels.stroke")}),(0,l.jsx)(s.z,{type:"elementStroke",label:(0,I.t)("labels.stroke"),color:G(t,n,(function(e){return e.strokeColor}),n.currentItemStrokeColor),onChange:function(e){return r({currentItemStrokeColor:e})},isActive:"strokeColorPicker"===n.openPopup,setActive:function(e){return r({openPopup:e?"strokeColorPicker":null})},elements:t,appState:n})]})}}),(0,U.z)({name:"changeBackgroundColor",trackEvent:!1,perform:function(e,t,n){return Y(Y({},n.currentItemBackgroundColor&&{elements:V(e,t,(function(e){return(0,z.BE)(e,{backgroundColor:n.currentItemBackgroundColor})}))}),{},{appState:Y(Y({},t),n),commitToHistory:!!n.currentItemBackgroundColor})},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{"aria-hidden":"true",children:(0,I.t)("labels.background")}),(0,l.jsx)(s.z,{type:"elementBackground",label:(0,I.t)("labels.background"),color:G(t,n,(function(e){return e.backgroundColor}),n.currentItemBackgroundColor),onChange:function(e){return r({currentItemBackgroundColor:e})},isActive:"backgroundColorPicker"===n.openPopup,setActive:function(e){return r({openPopup:e?"backgroundColorPicker":null})},elements:t,appState:n})]})}}),(0,U.z)({name:"changeFillStyle",trackEvent:!1,perform:function(e,t,n,r){return(0,i.L)("element","changeFillStyle","".concat(n," (").concat(r.device.isMobile?"mobile":"desktop",")")),{elements:V(e,t,(function(e){return(0,z.BE)(e,{fillStyle:n})})),appState:Y(Y({},t),{},{currentItemFillStyle:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,H.eD)(t,n),i=o.length>0&&o.every((function(e){return"zigzag"===e.fillStyle}));return(0,l.jsxs)("fieldset",{children:[(0,l.jsx)("legend",{children:(0,I.t)("labels.fill")}),(0,l.jsx)(c,{type:"button",options:[{value:"hachure",text:"".concat(i?(0,I.t)("labels.zigzag"):(0,I.t)("labels.hachure")," (").concat((0,F.uY)("Alt-Click"),")"),icon:i?A.lF:A.a0,active:!!i||void 0},{value:"cross-hatch",text:(0,I.t)("labels.crossHatch"),icon:A.np},{value:"solid",text:(0,I.t)("labels.solid"),icon:A.X7}],value:G(t,n,(function(e){return e.fillStyle}),n.currentItemFillStyle),onClick:function(e,t){var n=t.altKey&&"hachure"===e&&o.every((function(e){return"hachure"===e.fillStyle}))?"zigzag":e;r(n)}})]})}}),(0,U.z)({name:"changeStrokeWidth",trackEvent:!1,perform:function(e,t,n){return{elements:V(e,t,(function(e){return(0,z.BE)(e,{strokeWidth:n})})),appState:Y(Y({},t),{},{currentItemStrokeWidth:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,l.jsxs)("fieldset",{children:[(0,l.jsx)("legend",{children:(0,I.t)("labels.strokeWidth")}),(0,l.jsx)(c,{group:"stroke-width",options:[{value:1,text:(0,I.t)("labels.thin"),icon:A.ZA},{value:2,text:(0,I.t)("labels.bold"),icon:A.Wl},{value:4,text:(0,I.t)("labels.extraBold"),icon:A.m9}],value:G(t,n,(function(e){return e.strokeWidth}),n.currentItemStrokeWidth),onChange:function(e){return r(e)}})]})}}),(0,U.z)({name:"changeSloppiness",trackEvent:!1,perform:function(e,t,n){return{elements:V(e,t,(function(e){return(0,z.BE)(e,{seed:(0,B.LU)(),roughness:n})})),appState:Y(Y({},t),{},{currentItemRoughness:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,l.jsxs)("fieldset",{children:[(0,l.jsx)("legend",{children:(0,I.t)("labels.sloppiness")}),(0,l.jsx)(c,{group:"sloppiness",options:[{value:0,text:(0,I.t)("labels.architect"),icon:A.bf},{value:1,text:(0,I.t)("labels.artist"),icon:A.kM},{value:2,text:(0,I.t)("labels.cartoonist"),icon:A.W2}],value:G(t,n,(function(e){return e.roughness}),n.currentItemRoughness),onChange:function(e){return r(e)}})]})}}),(0,U.z)({name:"changeStrokeStyle",trackEvent:!1,perform:function(e,t,n){return{elements:V(e,t,(function(e){return(0,z.BE)(e,{strokeStyle:n})})),appState:Y(Y({},t),{},{currentItemStrokeStyle:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,l.jsxs)("fieldset",{children:[(0,l.jsx)("legend",{children:(0,I.t)("labels.strokeStyle")}),(0,l.jsx)(c,{group:"strokeStyle",options:[{value:"solid",text:(0,I.t)("labels.strokeStyle_solid"),icon:A.ZA},{value:"dashed",text:(0,I.t)("labels.strokeStyle_dashed"),icon:A.a5},{value:"dotted",text:(0,I.t)("labels.strokeStyle_dotted"),icon:A.aT}],value:G(t,n,(function(e){return e.strokeStyle}),n.currentItemStrokeStyle),onChange:function(e){return r(e)}})]})}}),(0,U.z)({name:"changeOpacity",trackEvent:!1,perform:function(e,t,n){return{elements:V(e,t,(function(e){return(0,z.BE)(e,{opacity:n})}),!0),appState:Y(Y({},t),{},{currentItemOpacity:n}),commitToHistory:!0}},PanelComponent:function(e){var t,n=e.elements,r=e.appState,o=e.updateData;return(0,l.jsxs)("label",{className:"control-label",children:[(0,I.t)("labels.opacity"),(0,l.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:function(e){return o(+e.target.value)},value:null!==(t=G(n,r,(function(e){return e.opacity}),r.currentItemOpacity))&&void 0!==t?t:void 0})]})}}),(0,U.z)({name:"changeFontSize",trackEvent:!1,perform:function(e,t,n){return X(e,t,(function(){return n}),n)},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,l.jsxs)("fieldset",{children:[(0,l.jsx)("legend",{children:(0,I.t)("labels.fontSize")}),(0,l.jsx)(c,{group:"font-size",options:[{value:16,text:(0,I.t)("labels.small"),icon:A.q0,testId:"fontSize-small"},{value:20,text:(0,I.t)("labels.medium"),icon:A.nq,testId:"fontSize-medium"},{value:28,text:(0,I.t)("labels.large"),icon:A.tW,testId:"fontSize-large"},{value:36,text:(0,I.t)("labels.veryLarge"),icon:A.OA,testId:"fontSize-veryLarge"}],value:G(t,n,(function(e){if((0,Z.iB)(e))return e.fontSize;var t=(0,R.WJ)(e);return t?t.fontSize:null}),n.currentItemFontSize||L.n5),onChange:function(e){return r(e)}})]})}}),(0,U.z)({name:"decreaseFontSize",trackEvent:!1,perform:function(e,t,n){return X(e,t,(function(e){return Math.round(1/1.1*e.fontSize)}))},keyTest:function(e){return e[C.tW.CTRL_OR_CMD]&&e.shiftKey&&(e.key===C.tW.CHEVRON_LEFT||e.key===C.tW.COMMA)}})),J=(0,U.z)({name:"increaseFontSize",trackEvent:!1,perform:function(e,t,n){return X(e,t,(function(e){return Math.round(1.1*e.fontSize)}))},keyTest:function(e){return e[C.tW.CTRL_OR_CMD]&&e.shiftKey&&(e.key===C.tW.CHEVRON_RIGHT||e.key===C.tW.PERIOD)}});(0,U.z)({name:"changeFontFamily",trackEvent:!1,perform:function(e,t,n){return{elements:V(e,t,(function(e){if((0,Z.iB)(e)){var t=(0,z.BE)(e,{fontFamily:n,lineHeight:(0,R.PT)(n)});return(0,Z.oN)(t,(0,R.tl)(e)),t}return e}),!0),appState:Y(Y({},t),{},{currentItemFontFamily:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=[{value:L.ut.Virgil,text:(0,I.t)("labels.handDrawn"),icon:A.Pm},{value:L.ut.Helvetica,text:(0,I.t)("labels.normal"),icon:A.vo},{value:L.ut.Cascadia,text:(0,I.t)("labels.code"),icon:A.z6}];return(0,l.jsxs)("fieldset",{children:[(0,l.jsx)("legend",{children:(0,I.t)("labels.fontFamily")}),(0,l.jsx)(c,{group:"font-family",options:o,value:G(t,n,(function(e){if((0,Z.iB)(e))return e.fontFamily;var t=(0,R.WJ)(e);return t?t.fontFamily:null}),n.currentItemFontFamily||L.rk),onChange:function(e){return r(e)}})]})}}),(0,U.z)({name:"changeTextAlign",trackEvent:!1,perform:function(e,t,n){return{elements:V(e,t,(function(e){if((0,Z.iB)(e)){var t=(0,z.BE)(e,{textAlign:n});return(0,Z.oN)(t,(0,R.tl)(e)),t}return e}),!0),appState:Y(Y({},t),{},{currentItemTextAlign:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,l.jsxs)("fieldset",{children:[(0,l.jsx)("legend",{children:(0,I.t)("labels.textAlign")}),(0,l.jsx)(c,{group:"text-align",options:[{value:"left",text:(0,I.t)("labels.left"),icon:A.rr,testId:"align-left"},{value:"center",text:(0,I.t)("labels.center"),icon:A.o3,testId:"align-horizontal-center"},{value:"right",text:(0,I.t)("labels.right"),icon:A.oT,testId:"align-right"}],value:G(t,n,(function(e){if((0,Z.iB)(e))return e.textAlign;var t=(0,R.WJ)(e);return t?t.textAlign:null}),n.currentItemTextAlign),onChange:function(e){return r(e)}})]})}}),(0,U.z)({name:"changeVerticalAlign",trackEvent:{category:"element"},perform:function(e,t,n){return{elements:V(e,t,(function(e){if((0,Z.iB)(e)){var t=(0,z.BE)(e,{verticalAlign:n});return(0,Z.oN)(t,(0,R.tl)(e)),t}return e}),!0),appState:Y({},t),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,l.jsx)("fieldset",{children:(0,l.jsx)(c,{group:"text-align",options:[{value:L.oX.TOP,text:(0,I.t)("labels.alignTop"),icon:(0,l.jsx)(A.EO,{theme:n.theme}),testId:"align-top"},{value:L.oX.MIDDLE,text:(0,I.t)("labels.centerVertically"),icon:(0,l.jsx)(A.P7,{theme:n.theme}),testId:"align-middle"},{value:L.oX.BOTTOM,text:(0,I.t)("labels.alignBottom"),icon:(0,l.jsx)(A.aA,{theme:n.theme}),testId:"align-bottom"}],value:G(t,n,(function(e){if((0,Z.iB)(e)&&e.containerId)return e.verticalAlign;var t=(0,R.WJ)(e);return t?t.verticalAlign:null})),onChange:function(e){return r(e)}})})}}),(0,U.z)({name:"changeRoundness",trackEvent:!1,perform:function(e,t,n){return{elements:V(e,t,(function(e){return(0,z.BE)(e,{roundness:"round"===n?{type:(0,N.QI)(e.type)?L.a6.ADAPTIVE_RADIUS:L.a6.PROPORTIONAL_RADIUS}:null})})),appState:Y(Y({},t),{},{currentItemRoundness:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,H.Zs)((0,Z.Lm)(t),n).some((function(e){var t;return(null===(t=e.roundness)||void 0===t?void 0:t.type)===L.a6.LEGACY}));return(0,l.jsxs)("fieldset",{children:[(0,l.jsx)("legend",{children:(0,I.t)("labels.edges")}),(0,l.jsx)(c,{group:"edges",options:[{value:"sharp",text:(0,I.t)("labels.sharp"),icon:A.wr},{value:"round",text:(0,I.t)("labels.round"),icon:A.DS}],value:G(t,n,(function(e){return o?null:e.roundness?"round":"sharp"}),(0,H.sh)(n.activeTool.type)&&n.currentItemRoundness||null),onChange:function(e){return r(e)}})]})}}),(0,U.z)({name:"changeArrowhead",trackEvent:!1,perform:function(e,t,n){return{elements:V(e,t,(function(e){if((0,N.bt)(e)){var t=n.position,r=n.type;if("start"===t)return(0,z.BE)(e,{startArrowhead:r});if("end"===t)return(0,z.BE)(e,{endArrowhead:r})}return e})),appState:Y(Y({},t),{},(0,o.Z)({},"start"===n.position?"currentItemStartArrowhead":"currentItemEndArrowhead",n.type)),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,I.G3)().rtl;return(0,l.jsxs)("fieldset",{children:[(0,l.jsx)("legend",{children:(0,I.t)("labels.arrowheads")}),(0,l.jsxs)("div",{className:"iconSelectList buttonList",children:[(0,l.jsx)(D,{label:"arrowhead_start",options:[{value:null,text:(0,I.t)("labels.arrowhead_none"),icon:A.fr,keyBinding:"q"},{value:"arrow",text:(0,I.t)("labels.arrowhead_arrow"),icon:(0,l.jsx)(A.il,{flip:!o}),keyBinding:"w"},{value:"bar",text:(0,I.t)("labels.arrowhead_bar"),icon:(0,l.jsx)(A.m,{flip:!o}),keyBinding:"e"},{value:"dot",text:(0,I.t)("labels.arrowhead_dot"),icon:(0,l.jsx)(A.tn,{flip:!o}),keyBinding:"r"},{value:"triangle",text:(0,I.t)("labels.arrowhead_triangle"),icon:(0,l.jsx)(A.j8,{flip:!o}),keyBinding:"t"}],value:G(t,n,(function(e){return(0,N.bt)(e)&&(0,H.Un)(e.type)?e.startArrowhead:n.currentItemStartArrowhead}),n.currentItemStartArrowhead),onChange:function(e){return r({position:"start",type:e})}}),(0,l.jsx)(D,{label:"arrowhead_end",group:"arrowheads",options:[{value:null,text:(0,I.t)("labels.arrowhead_none"),keyBinding:"q",icon:A.fr},{value:"arrow",text:(0,I.t)("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,l.jsx)(A.il,{flip:o})},{value:"bar",text:(0,I.t)("labels.arrowhead_bar"),keyBinding:"e",icon:(0,l.jsx)(A.m,{flip:o})},{value:"dot",text:(0,I.t)("labels.arrowhead_dot"),keyBinding:"r",icon:(0,l.jsx)(A.tn,{flip:o})},{value:"triangle",text:(0,I.t)("labels.arrowhead_triangle"),icon:(0,l.jsx)(A.j8,{flip:o}),keyBinding:"t"}],value:G(t,n,(function(e){return(0,N.bt)(e)&&(0,H.Un)(e.type)?e.endArrowhead:n.currentItemEndArrowhead}),n.currentItemEndArrowhead),onChange:function(e){return r({position:"end",type:e})}})]})]})}})},4958:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r=n(7169),o=n(7901),i=n(6066);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=(0,o.z)({name:"stats",viewMode:!0,trackEvent:{category:"menu"},perform:function(e,t){return{appState:l(l({},t),{},{showStats:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.showStats},contextItemLabel:"stats.title",keyTest:function(e){return!e[i.tW.CTRL_OR_CMD]&&e.altKey&&e.code===i.aU.SLASH}})},6710:function(e,t,n){"use strict";n.d(t,{FL:function(){return We},vD:function(){return mt.vD},yA:function(){return O},BZ:function(){return C},mo:function(){return X.mo},uN:function(){return lt.uN},jK:function(){return lt.jK},FA:function(){return lt.FA},pw:function(){return ie},ZM:function(){return lt.ZM},X9:function(){return r.X},xF:function(){return V},pL:function(){return ee},jl:function(){return tt},kt:function(){return nt},EQ:function(){return ve},nz:function(){return gt.nz},_d:function(){return te._d},W3:function(){return ae},ns:function(){return te.ns},Yy:function(){return L},V:function(){return S},zi:function(){return _},jY:function(){return se},Pb:function(){return ut},Qs:function(){return Et},iL:function(){return yt},u0:function(){return ht.u},Zp:function(){return X.Zp},JN:function(){return pt},y7:function(){return mt.y7},s:function(){return be},zp:function(){return lt.zp}});var r=n(533),o=n(1930),i=n(1935),a=n(242),l=n(75),c=n(1564),s=n(6340),u=function(e,t){for(var n=[],r=[],o=null,i=-1,a=(0,s.xn)((0,l.eD)(e,t,!0));++i<e.length;)a.get(e[i].id)?(r.length&&(n=n.concat(r),r=[]),n.push(i),o=i+1):e[i].isDeleted&&o===i?(o=i+1,r.push(i)):r=[];return n},d=function(e,t,n){if("containerId"in e&&e.containerId){if("left"!==n)return t.indexOf(e);var r=c.Z.getScene(e).getElement(e.containerId);if(r)return t.indexOf(r)}else{var o,i,a=null===(o=e.boundElements)||void 0===o||null===(i=o.find((function(e){return"arrow"!==e.type})))||void 0===i?void 0:i.id;if(a){if("left"===n)return t.indexOf(e);var l=c.Z.getScene(e).getElement(a);if(l)return t.indexOf(l)}}},f=function(e,t){return t.reduce((function(t,n){var r=e[n];return t[r.id]=r,t}),{})},p=function(e,t,n){var r,l,c=u(t,e),p=f(t,c),h=(l=0,(r=c).reduce((function(e,t,n){return n>0&&r[n-1]!==t-1&&(l=++l),(e[l]||(e[l]=[])).push(t),e}),[]));return"right"===n&&(h=h.reverse()),h.forEach((function(r,i){var l=r[0],c=r[r.length-1],u="left"===n?l:c,f=function(e,t,n,r){var o,i=t[n],l=function(t){return!t.isDeleted&&(!e.editingGroupId||t.groupIds.includes(e.editingGroupId))},c="left"===r?(0,s.qr)(t,l,Math.max(0,n-1)):(0,s.cx)(t,l,n+1),u=t[c];if(!u)return-1;if(e.editingGroupId){var f;if((null==i?void 0:i.groupIds.join(""))===(null==u?void 0:u.groupIds.join("")))return null!==(f=d(u,t,r))&&void 0!==f?f:c;if(null==u||!u.groupIds.includes(e.editingGroupId))return-1}if(!u.groupIds.length)return null!==(o=d(u,t,r))&&void 0!==o?o:c;var p=e.editingGroupId?u.groupIds[u.groupIds.indexOf(e.editingGroupId)-1]:u.groupIds[u.groupIds.length-1],h=(0,a.Fb)(t,p);return h.length?"left"===r?t.indexOf(h[0]):t.indexOf(h[h.length-1]):c}(e,t,u,n);if(-1!==f&&u!==f){var p="left"===n?t.slice(0,f):t.slice(0,l),h=t.slice(l,c+1),m="left"===n?t.slice(f,l):t.slice(c+1,f+1),g="left"===n?t.slice(c+1):t.slice(f+1);t="left"===n?[].concat((0,o.Z)(p),(0,o.Z)(h),(0,o.Z)(m),(0,o.Z)(g)):[].concat((0,o.Z)(p),(0,o.Z)(m),(0,o.Z)(h),(0,o.Z)(g))}})),t.map((function(e){return p[e.id]?(0,i.ZP)(e):e}))},h=function(e,t,n){var r,l,c=u(e,t),s=f(e,c),d=[];if("left"===n){if(t.editingGroupId){var p=(0,a.Fb)(e,t.editingGroupId);if(!p.length)return e;r=e.indexOf(p[0])}else r=0;l=c[c.length-1]}else{if(t.editingGroupId){var h=(0,a.Fb)(e,t.editingGroupId);if(!h.length)return e;l=e.indexOf(h[h.length-1])}else l=e.length-1;r=c[0]}for(var m=r;m<l+1;m++)c.includes(m)||d.push(e[m]);var g=Object.values(s).map((function(e){return(0,i.ZP)(e)})),v=e.slice(0,r),b=e.slice(l+1);return"left"===n?[].concat((0,o.Z)(v),(0,o.Z)(g),d,(0,o.Z)(b)):[].concat((0,o.Z)(v),d,(0,o.Z)(g),(0,o.Z)(b))},m=function(e,t){return p(t,e,"left")},g=function(e,t){return p(t,e,"right")},v=function(e,t){return h(e,t,"left")},b=function(e,t){return h(e,t,"right")},y=n(6066),x=n(8211),w=n(7901),k=n(3646),E=n(2335),j=n(4512),S=(0,w.z)({name:"sendBackward",trackEvent:{category:"element"},perform:function(e,t){return{elements:m(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.sendBackward",keyPriority:40,keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&!e.shiftKey&&e.code===y.aU.BRACKET_LEFT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,j.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,x.t)("labels.sendBackward")," — ").concat((0,s.uY)("CtrlOrCmd+[")),children:k.Gc})}}),O=(0,w.z)({name:"bringForward",trackEvent:{category:"element"},perform:function(e,t){return{elements:g(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.bringForward",keyPriority:40,keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&!e.shiftKey&&e.code===y.aU.BRACKET_RIGHT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,j.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,x.t)("labels.bringForward")," — ").concat((0,s.uY)("CtrlOrCmd+]")),children:k.t5})}}),_=(0,w.z)({name:"sendToBack",trackEvent:{category:"element"},perform:function(e,t){return{elements:v(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.sendToBack",keyTest:function(e){return E.Um?e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.BRACKET_LEFT:e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.code===y.aU.BRACKET_LEFT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,j.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,x.t)("labels.sendToBack")," — ").concat(E.Um?(0,s.uY)("CtrlOrCmd+Alt+["):(0,s.uY)("CtrlOrCmd+Shift+[")),children:k.pw})}}),C=(0,w.z)({name:"bringToFront",trackEvent:{category:"element"},perform:function(e,t){return{elements:b(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.bringToFront",keyTest:function(e){return E.Um?e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.BRACKET_RIGHT:e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.code===y.aU.BRACKET_RIGHT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,j.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(e){return t(null)},title:"".concat((0,x.t)("labels.bringToFront")," — ").concat(E.Um?(0,s.uY)("CtrlOrCmd+Alt+]"):(0,s.uY)("CtrlOrCmd+Shift+]")),children:k.IN})}}),I=n(7169),T=n(1047),P=n(1974),M=n(6938);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L=(0,w.z)({name:"selectAll",trackEvent:{category:"canvas"},perform:function(e,t,n,r){if(t.editingLinearElement)return!1;var o=e.reduce((function(e,t){return t.isDeleted||(0,T.iB)(t)&&t.containerId||t.locked||(e[t.id]=!0),e}),{});return{appState:(0,a.bO)(A(A({},t),{},{selectedLinearElement:1===Object.keys(o).length&&(0,P.bt)(e[0])?new M._(e[0],r.scene):null,editingGroupId:null,selectedElementIds:o}),(0,T.Lm)(e)),commitToHistory:!0}},contextItemLabel:"labels.selectAll",keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.key===y.tW.A}}),Z=n(1319),z=n(8290),R=n(5710);function N(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var H=function(e){var t=e.slice(),n=new Set,r=function e(t){var n,r,i,a=null===(n=t[0])||void 0===n||null===(r=n.groupIds)||void 0===r?void 0:r.join(""),l=[t[0]],c=[],s=N(t.slice(1));try{for(s.s();!(i=s.n()).done;){var u,d=i.value;(null===(u=d.groupIds)||void 0===u?void 0:u.join(""))===a?l.push(d):c.push(d)}}catch(e){s.e(e)}finally{s.f()}return c.length?[].concat(l,(0,o.Z)(e(c))):l},i=new Map;return t.forEach((function(e,o){var a;if(!i.has(e.id))if(null!==(a=e.groupIds)&&void 0!==a&&a.length){var l,c=e.groupIds[e.groupIds.length-1],s=t.slice(o).filter((function(e){var t,n=null==e||null===(t=e.groupIds)||void 0===t?void 0:t.some((function(e){return e===c}));return n&&i.set(e.id,!0),n})),u=N(r(s));try{for(u.s();!(l=u.n()).done;){var d=l.value;n.add(d)}}catch(e){u.e(e)}finally{u.f()}}else n.add(e)})),n.size!==e.length?(console.error("normalizeGroupElementOrder: lost some elements... bailing!"),e):(0,o.Z)(n)},W=function(e){var t=function(e){var t=(0,s.I4)(e),n=e.slice(),r=new Set;return n.forEach((function(e,o){var i;if(e)if(null!==(i=e.boundElements)&&void 0!==i&&i.length)r.add(e),n[o]=null,e.boundElements.forEach((function(e){var o=t.get(e.id);o&&"text"===e.type&&(r.add(o[0]),n[o[1]]=null)}));else if("text"===e.type&&e.containerId){var a,l=t.get(e.containerId);null!=l&&null!==(a=l[0].boundElements)&&void 0!==a&&a.find((function(t){return t.id===e.id}))||(r.add(e),n[o]=null)}else r.add(e),n[o]=null})),r.size!==e.length?(console.error("normalizeBoundElementsOrder: lost some elements... bailing!"),e):(0,o.Z)(r)}(H(e));return t};function F(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return U(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V=(0,w.z)({name:"duplicateSelection",trackEvent:{category:"element"},perform:function(e,t){if(t.editingLinearElement){var n=M._.duplicateSelectedPoints(t);return!!n&&{elements:e,appState:n.appState,commitToHistory:!0}}return Y(Y({},G(e,t)),{},{commitToHistory:!0})},contextItemLabel:"labels.duplicateSelection",keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.key===y.tW.D},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{type:"button",icon:k.NA,title:"".concat((0,x.t)("labels.duplicateSelection")," — ").concat((0,s.uY)("CtrlOrCmd+D")),"aria-label":(0,x.t)("labels.duplicateSelection"),onClick:function(){return r(null)},visible:(0,l.N)((0,T.Lm)(t),n)})}}),G=function(e,t){for(var n=W(e),r=new Map,i=[],c=[],u=new Map,d=function(e){var n=(0,T.Sy)(t.editingGroupId,r,e,{x:e.x+E.k/2,y:e.y+E.k/2});return u.set(e.id,n.id),c.push(e),i.push(n),n},f=(0,s.xn)((0,l.eD)(n,t,!0)),p=new Map,h=function(e){var t,n=F(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;p.set(r.id,!0)}}catch(e){n.e(e)}finally{n.f()}return e},m=[],g=-1;++g<n.length;){var v=n[g];if(!p.get(v.id)){var b=(0,R.WJ)(v);if(f.get(v.id)){if(v.groupIds.length||b){var y=(0,a.yO)(t,v);if(y){var x=(0,a.Fb)(n,y);m.push.apply(m,(0,o.Z)(h([].concat((0,o.Z)(x),(0,o.Z)(x.map((function(e){return d(e)})))))));continue}if(b){m.push.apply(m,(0,o.Z)(h([v,b,d(v),d(b)])));continue}}m.push.apply(m,(0,o.Z)(h([v,d(v)])))}else m.push.apply(m,(0,o.Z)(h([v])))}}var w=[],k=new Map;for(g=m.length;--g>=0;){var j=m[g];k.get(j.id)||(k.set(j.id,!0),w.push(j))}var S=w.reverse();return(0,R.P7)(m,c,u),(0,z.ek)(m,c,u),{elements:S,appState:(0,a.bO)(Y(Y({},t),{},{selectedGroupIds:{},selectedElementIds:i.reduce((function(e,t){return(0,P.Xh)(t)||(e[t.id]=!0),e}),{})}),(0,T.Lm)(S))}},X=(n(6208),n(2416)),q=n(2577),J=n(6552);function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ee=(0,w.z)({name:"finalize",trackEvent:!1,perform:function(e,t,n,r){var o,a=r.canvas,l=r.focusContainer,u=r.scene;if(t.editingLinearElement){var d=t.editingLinearElement,f=d.elementId,p=d.startBindingElement,h=d.endBindingElement,m=M._.getElement(f);if(m)return(0,P.Mn)(m)&&(0,z.HG)(m,p,h),{elements:m.points.length<2||(0,T.QD)(m)?e.filter((function(e){return e.id!==m.id})):void 0,appState:Q(Q({},t),{},{cursorButton:"up",editingLinearElement:null}),commitToHistory:!0}}var g=e,v=t.pendingImageElementId&&u.getElement(t.pendingImageElementId);v&&(0,i.DR)(v,{isDeleted:!0},!1),window.document.activeElement instanceof HTMLElement&&l();var b,y=t.multiElement?t.multiElement:"freedraw"===(null===(o=t.editingElement)||void 0===o?void 0:o.type)?t.editingElement:null;if(y){if("freedraw"!==y.type&&"touch"!==t.lastPointerDownWith){var x=y.points,w=y.lastCommittedPoint;w&&x[x.length-1]===w||(0,i.DR)(y,{points:y.points.slice(0,-1)})}(0,T.QD)(y)&&(g=g.slice(0,-1));var k=(0,J.g6)(y.points,t.zoom.value);if(("line"===y.type||"freedraw"===y.type)&&k){var E=y.points,j=E[0];(0,i.DR)(y,{points:E.map((function(e,t){return t===E.length-1?[j[0],j[1]]:e}))})}if((0,P.Mn)(y)&&!k&&y.points.length>1){var S=M._.getPointAtIndexGlobalCoordinates(y,-1),O=(0,q.Z)(S,2),_=O[0],C=O[1];(0,z.R)(y,t,c.Z.getScene(y),{x:_,y:C})}t.activeTool.locked||"freedraw"===t.activeTool.type||(t.selectedElementIds[y.id]=!0)}return(t.activeTool.locked||"freedraw"===t.activeTool.type)&&y||(0,s.z8)(a),b="eraser"===t.activeTool.type?(0,s.Om)(t,Q(Q({},t.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,s.Om)(t,{type:"selection"}),{elements:g,appState:Q(Q({},t),{},{cursorButton:"up",activeTool:(t.activeTool.locked||"freedraw"===t.activeTool.type)&&y?t.activeTool:b,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:y&&!t.activeTool.locked&&"freedraw"!==t.activeTool.type?Q(Q({},t.selectedElementIds),{},(0,I.Z)({},y.id,!0)):t.selectedElementIds,selectedLinearElement:y&&(0,P.bt)(y)?new M._(y,u):t.selectedLinearElement,pendingImageElementId:null}),commitToHistory:"freedraw"===t.activeTool.type}},keyTest:function(e,t){return e.key===y.tW.ESCAPE&&(null!==t.editingLinearElement||!t.draggingElement&&null===t.multiElement)||(e.key===y.tW.ESCAPE||e.key===y.tW.ENTER)&&null!==t.multiElement},PanelComponent:function(e){var t=e.appState,n=e.updateData,r=e.data;return(0,j.jsx)(Z.V,{type:"button",icon:k.$c,title:(0,x.t)("buttons.done"),"aria-label":(0,x.t)("buttons.done"),onClick:n,visible:null!=t.multiElement,size:(null==r?void 0:r.size)||"medium"})}}),te=n(8671);function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe="{}",ie=(0,w.z)({name:"copyStyles",trackEvent:{category:"element"},perform:function(e,t){var n=[],r=e.find((function(e){return t.selectedElementIds[e.id]}));if(n.push(r),r&&(0,P.Xo)(r)){var o=(0,R.WJ)(r);n.push(o)}return r&&(oe=JSON.stringify(n)),{appState:re(re({},t),{},{toast:{message:(0,x.t)("toast.copyStyles")}}),commitToHistory:!1}},contextItemLabel:"labels.copyStyles",keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.C}}),ae=(0,w.z)({name:"pasteStyles",trackEvent:{category:"element"},perform:function(e,t){var n=JSON.parse(oe),r=n[0],o=n[1];if(!(0,T.r2)(r))return{elements:e,commitToHistory:!1};var a=(0,l.eD)(e,t,!0),c=a.map((function(e){return e.id}));return{elements:e.map((function(e){if(c.includes(e.id)){var t,n,l,s,u,d,f,p=r;if((0,T.iB)(e)&&e.containerId&&(p=o),!p)return e;var h=(0,i.BE)(e,{backgroundColor:null===(t=p)||void 0===t?void 0:t.backgroundColor,strokeWidth:null===(n=p)||void 0===n?void 0:n.strokeWidth,strokeColor:null===(l=p)||void 0===l?void 0:l.strokeColor,strokeStyle:null===(s=p)||void 0===s?void 0:s.strokeStyle,fillStyle:null===(u=p)||void 0===u?void 0:u.fillStyle,opacity:null===(d=p)||void 0===d?void 0:d.opacity,roughness:null===(f=p)||void 0===f?void 0:f.roughness,roundness:p.roundness?(0,P.eK)(p.roundness.type,e)?p.roundness:(0,P.UQ)(e):null});if((0,T.iB)(h)){var m,g,v,b=(null===(m=p)||void 0===m?void 0:m.fontSize)||E.n5,y=(null===(g=p)||void 0===g?void 0:g.fontFamily)||E.rk,x=null;(h=(0,i.BE)(h,{fontSize:b,fontFamily:y,textAlign:(null===(v=p)||void 0===v?void 0:v.textAlign)||E.Hg,lineHeight:p.lineHeight||(0,R.PT)(y)})).containerId&&(x=a.find((function(e){return(0,T.iB)(h)&&e.id===h.containerId}))||null),(0,T.oN)(h,x)}return"arrow"===h.type&&(h=(0,i.BE)(h,{startArrowhead:p.startArrowhead,endArrowhead:p.endArrowhead})),h}return e})),commitToHistory:!0}},contextItemLabel:"labels.pasteStyles",keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.V}});function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,w.z)({name:"toggleCanvasMenu",trackEvent:{category:"menu"},perform:function(e,t){return{appState:ce(ce({},t),{},{openMenu:"canvas"===t.openMenu?null:"canvas"}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,j.jsx)(Z.V,{type:"button",icon:k.RY,"aria-label":(0,x.t)("buttons.menu"),onClick:n,selected:"canvas"===t.openMenu})}}),(0,w.z)({name:"toggleEditMenu",trackEvent:{category:"menu"},perform:function(e,t){return{appState:ce(ce({},t),{},{openMenu:"shape"===t.openMenu?null:"shape"}),commitToHistory:!1}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{visible:(0,T.RT)(n,(0,T.Lm)(t)),type:"button",icon:k.DG,"aria-label":(0,x.t)("buttons.edit"),onClick:r,selected:"shape"===n.openMenu})}}),(0,w.z)({name:"toggleFullScreen",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!(0,s.rB)()}},perform:function(){return(0,s.rB)()||(0,s.wo)(),(0,s.rB)()&&(0,s.Pr)(),{commitToHistory:!1}},keyTest:function(e){return e.key===y.tW.F&&!e[y.tW.CTRL_OR_CMD]}});var se=(0,w.z)({name:"toggleShortcuts",viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:function(e,t,n,r){var o=r.focusContainer;return"help"===t.openDialog&&o(),{appState:ce(ce({},t),{},{openDialog:"help"===t.openDialog?null:"help"}),commitToHistory:!1}},keyTest:function(e){return e.key===y.tW.QUESTION_MARK}}),ue=n(6655),de=n(6954);function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function he(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return me(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ge=function(e,t){var n=(0,l.eD)((0,T.Lm)(e),t,!0);return n.length>=2&&!function(e){if(e.length>=2){var t,n=he(e[0].groupIds);try{var r=function(){var n=t.value;if(e.reduce((function(e,t){return e&&(0,a.Nd)(t,n)}),!0))return{v:!0}};for(n.s();!(t=n.n()).done;){var o=r();if("object"===(0,ue.Z)(o))return o.v}}catch(e){n.e(e)}finally{n.f()}}return!1}(n)},ve=(0,w.z)({name:"group",trackEvent:{category:"element"},perform:function(e,t){var n=(0,l.eD)((0,T.Lm)(e),t,!0);if(n.length<2)return{appState:t,elements:e,commitToHistory:!1};var r=(0,a.iJ)(t);if(1===r.length){var c=r[0],u=new Set((0,a.Fb)(e,c).map((function(e){return e.id}))),d=new Set(n.map((function(e){return e.id})));if(new Set([].concat((0,o.Z)(Array.from(u)),(0,o.Z)(Array.from(d)))).size===u.size)return{appState:t,elements:e,commitToHistory:!1}}var f=(0,de.kb)(),p=(0,s.xn)(n),h=e.map((function(e){return p.get(e.id)?(0,i.BE)(e,{groupIds:(0,a.S_)(e.groupIds,f,t.editingGroupId)}):e})),m=(0,a.Fb)(h,f),g=m[m.length-1],v=h.lastIndexOf(g),b=h.slice(v+1),y=h.slice(0,v).filter((function(e){return!(0,a.Nd)(e,f)})),x=[].concat((0,o.Z)(y),(0,o.Z)(m),(0,o.Z)(b));return{appState:(0,a.F$)(f,pe(pe({},t),{},{selectedGroupIds:{}}),(0,T.Lm)(x)),elements:x,commitToHistory:!0}},contextItemLabel:"labels.group",predicate:function(e,t){return ge(e,t)},keyTest:function(e){return!e.shiftKey&&e[y.tW.CTRL_OR_CMD]&&e.key===y.tW.G},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!ge(t,n),type:"button",icon:(0,j.jsx)(k.BF,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.group")," — ").concat((0,s.uY)("CtrlOrCmd+G")),"aria-label":(0,x.t)("labels.group"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),be=(0,w.z)({name:"ungroup",trackEvent:{category:"element"},perform:function(e,t){if(0===(0,a.iJ)(t).length)return{appState:t,elements:e,commitToHistory:!1};var n=[],r=e.map((function(e){(0,P.Xh)(e)&&n.push(e.id);var r=(0,a.h6)(e.groupIds,t.selectedGroupIds);return r.length===e.groupIds.length?e:(0,i.BE)(e,{groupIds:r})})),o=(0,a.bO)(pe(pe({},t),{},{selectedGroupIds:{}}),(0,T.Lm)(r));return n.forEach((function(e){return o.selectedElementIds[e]=!1})),{appState:o,elements:r,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&e[y.tW.CTRL_OR_CMD]&&e.key===y.tW.G.toUpperCase()},contextItemLabel:"labels.ungroup",predicate:function(e,t){return(0,a.iJ)(t).length>0},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{type:"button",hidden:0===(0,a.iJ)(n).length,icon:(0,j.jsx)(k.RJ,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.ungroup")," — ").concat((0,s.uY)("CtrlOrCmd+Shift+G")),"aria-label":(0,x.t)("labels.ungroup"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),ye=n(8982),xe=n(487),we=n.n(xe),ke=n(631),Ee=n.n(ke),je=n(2052),Se=n.n(je),Oe=n(4010),_e=n.n(Oe),Ce=n(1469),Ie=n.n(Ce),Te=n(9329),Pe=n.n(Te),Me=n(3729),De={};De.styleTagTransform=Pe(),De.setAttributes=_e(),De.insert=Se().bind(null,"head"),De.domAPI=Ee(),De.insertStyleElement=Ie();we()(Me.Z,De),Me.Z&&Me.Z.locals&&Me.Z.locals;var Ae=n(9787),Le=function(e){var t=e.color,n=e.onClick,r=e.name,o=e.src,i=(0,ye.f)(r),a=(0,Ae.useState)(!1),l=(0,q.Z)(a,2),c=l[0],s=l[1],u=!c&&o,d=u?void 0:{background:t};return(0,j.jsx)("div",{className:"Avatar",style:d,onClick:n,children:u?(0,j.jsx)("img",{className:"Avatar-img",src:o,alt:i,referrerPolicy:"no-referrer",onError:function(){return s(!0)}}):i})},Ze=n(2264);function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,w.z)({name:"goToCollaborator",viewMode:!0,trackEvent:{category:"collab"},perform:function(e,t,n){var r=n;return r?{appState:Re(Re(Re({},t),(0,Ze.s)({scenePoint:r,viewportDimensions:{width:t.width,height:t.height},zoom:t.zoom})),{},{openMenu:"canvas"===t.openMenu?null:t.openMenu}),commitToHistory:!1}:{appState:t,commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData,r=e.data,o=(0,q.Z)(r,2),i=o[0],a=o[1],l=(0,ye.X)(i,t),c=l.background,s=l.stroke;return(0,j.jsx)(Le,{color:c,border:s,onClick:function(){return n(a.pointer)},name:a.username||"",src:a.avatarUrl})}});var Ne=n(2791);function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var We=(0,w.z)({name:"addToLibrary",trackEvent:{category:"element"},perform:function(e,t,n,r){var i=(0,l.eD)((0,T.Lm)(e),t,!0);return i.some((function(e){return"image"===e.type}))?{commitToHistory:!1,appState:He(He({},t),{},{errorMessage:"Support for adding images to the library coming soon!"})}:r.library.getLatestLibrary().then((function(e){return r.library.setLibrary([{id:(0,de.kb)(),status:"unpublished",elements:i.map(Ne.OL),created:Date.now()}].concat((0,o.Z)(e)))})).then((function(){return{commitToHistory:!1,appState:He(He({},t),{},{toast:{message:(0,x.t)("toast.addedToLibrary")}})}})).catch((function(e){return{commitToHistory:!1,appState:He(He({},t),{},{errorMessage:e.message})}}))},contextItemLabel:"labels.addToLibrary"}),Fe=n(8925);function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ye=function(e,t,n){var r=n.axis,o=n.position,i=(0,Fe.v2)(e),a="x"===r?["minX","maxX"]:["minY","maxY"],l=(0,q.Z)(a,2),c=l[0],s=l[1],u={x:0,y:0};return Ke(Ke({},u),{},"start"===o?(0,I.Z)({},r,t[c]-i[c]):"end"===o?(0,I.Z)({},r,t[s]-i[s]):(0,I.Z)({},r,(t[c]+t[s])/2-(i[c]+i[s])/2))},Ve=function(e,t){return(0,l.eD)((0,T.Lm)(e),t).length>1},Ge=function(e,t,n){var r=function(e,t){var n=(0,a.AI)(e),r=(0,Fe.v2)(e);return n.flatMap((function(e){var n=Ye(e,r,t);return e.map((function(e){return(0,i.BE)(e,{x:e.x+n.x,y:e.y+n.y})}))}))}((0,l.eD)((0,T.Lm)(e),t),n),o=(0,s.xn)(r);return e.map((function(e){return o.get(e.id)||e}))};(0,w.z)({name:"alignTop",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"start",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===y.tW.ARROW_UP},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.Ct,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.alignTop")," — ").concat((0,s.uY)("CtrlOrCmd+Shift+Up")),"aria-label":(0,x.t)("labels.alignTop"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"alignBottom",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"end",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===y.tW.ARROW_DOWN},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.HL,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.alignBottom")," — ").concat((0,s.uY)("CtrlOrCmd+Shift+Down")),"aria-label":(0,x.t)("labels.alignBottom"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"alignLeft",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"start",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===y.tW.ARROW_LEFT},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.xs,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.alignLeft")," — ").concat((0,s.uY)("CtrlOrCmd+Shift+Left")),"aria-label":(0,x.t)("labels.alignLeft"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"alignRight",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"end",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===y.tW.ARROW_RIGHT},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.mh,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.alignRight")," — ").concat((0,s.uY)("CtrlOrCmd+Shift+Right")),"aria-label":(0,x.t)("labels.alignRight"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"alignVerticallyCentered",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"center",axis:"y"}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.ST,onClick:function(){return r(null)},title:(0,x.t)("labels.centerVertically"),"aria-label":(0,x.t)("labels.centerVertically"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"alignHorizontallyCentered",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"center",axis:"x"}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.gK,onClick:function(){return r(null)},title:(0,x.t)("labels.centerHorizontally"),"aria-label":(0,x.t)("labels.centerHorizontally"),visible:(0,l.N)((0,T.Lm)(t),n)})}});function Xe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Je=function(e,t){return(0,l.eD)((0,T.Lm)(e),t).length>1},$e=function(e,t,n){var r=function(e,t){var n,r="x"===t.axis?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],o=(0,q.Z)(r,4),l=o[0],c=o[1],s=o[2],u=o[3],d=(0,Fe.v2)(e),f=(0,a.AI)(e).map((function(e){return[e,(0,Fe.v2)(e)]})).sort((function(e,t){return e[1][c]-t[1][c]})),p=0,h=Xe(f);try{for(h.s();!(n=h.n()).done;)p+=n.value[1][u]}catch(e){h.e(e)}finally{h.f()}var m=(d[u]-p)/(f.length-1);if(m<0){var g=f.findIndex((function(e){return e[1][l]===d[l]})),v=f.findIndex((function(e){return e[1][s]===d[s]})),b=(f[v][1][c]-f[g][1][c])/(f.length-1),y=f[g][1][c];return f.flatMap((function(e,n){var r=(0,q.Z)(e,2),o=r[0],a=r[1],l={x:0,y:0};return n!==g&&n!==v&&(y+=b,l[t.axis]=y-a[c]),o.map((function(e){return(0,i.BE)(e,{x:e.x+l.x,y:e.y+l.y})}))}))}var x=d[l];return f.flatMap((function(e){var n=(0,q.Z)(e,2),r=n[0],o=n[1],a={x:0,y:0};return a[t.axis]=x-o[l],x+=m,x+=o[u],r.map((function(e){return(0,i.BE)(e,{x:e.x+a.x,y:e.y+a.y})}))}))}((0,l.eD)((0,T.Lm)(e),t),n),o=(0,s.xn)(r);return e.map((function(e){return o.get(e.id)||e}))},Qe=((0,w.z)({name:"distributeHorizontally",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:$e(e,t,{space:"between",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return!e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.H},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Je(t,n),type:"button",icon:k.uD,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.distributeHorizontally")," — ").concat((0,s.uY)("Alt+H")),"aria-label":(0,x.t)("labels.distributeHorizontally"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"distributeVertically",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:$e(e,t,{space:"between",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return!e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.V},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Je(t,n),type:"button",icon:k.W5,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.distributeVertically")," — ").concat((0,s.uY)("Alt+V")),"aria-label":(0,x.t)("labels.distributeVertically"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),n(8634)),et=n(267),tt=(0,w.z)({name:"flipHorizontal",trackEvent:{category:"element"},perform:function(e,t){return{elements:rt(e,t,"horizontal"),appState:t,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&"KeyH"===e.code},contextItemLabel:"labels.flipHorizontal",predicate:function(e,t){return function(e,t){var n=(0,l.eD)((0,T.Lm)(e),t);return 1===n.length&&"text"!==n[0].type}(e,t)}}),nt=(0,w.z)({name:"flipVertical",trackEvent:{category:"element"},perform:function(e,t){return{elements:rt(e,t,"vertical"),appState:t,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&"KeyV"===e.code&&!e[y.tW.CTRL_OR_CMD]},contextItemLabel:"labels.flipVertical",predicate:function(e,t){return function(e,t){return 1===(0,l.eD)((0,T.Lm)(e),t).length}(e,t)}}),rt=function(e,t,n){var r=(0,l.eD)((0,T.Lm)(e),t);if(r.length>1)return e;var o=ot(r,t,n),i=(0,s.xn)(o);return e.map((function(e){return i.get(e.id)||e}))},ot=function(e,t,n){return e.forEach((function(e){it(e,t),"vertical"===n&&at(e,Math.PI)})),e},it=function(e,t){var n=e.x,r=e.y,o=e.width,a=e.height,l=(0,Qe.LW)(e.angle);(0,i.DR)(e,{angle:(0,Qe.LW)(0)});var c=(0,et.PC)(e,t.zoom),s=!0,u=c.nw;if(u||(s=!1,u=c.ne)){var d,f=0;(0,P.bt)(e)&&e.points.length<3&&(f=2*e.points.reduce((function(e,t){return Math.max(e,t[0])}),0)-e.width),(0,P.bt)(e)&&(d=(0,Fe.Ut)(e,e.points));var p=(0,Fe.qf)(e);if((0,P.bt)(e)&&e.points.length<3){for(var h=1;h<e.points.length;h++)M._.movePoints(e,[{index:h,point:[-e.points[h][0],e.points[h][1]]}]);M._.normalizePoints(e)}else{var m=d?d[2]-d[0]:p[2]-p[0],g=d?[d[0],d[1]]:[p[0],p[1]];(0,Qe.l2)((new Map).set(e.id,e),!1,e,s?"nw":"ne",!0,s?g[0]+m:g[0]-m,g[1])}var v=(0,Qe.LW)(2*Math.PI-l);if(v<0&&(v=(0,Qe.LW)(v+2*Math.PI)),(0,i.DR)(e,{angle:v}),(0,i.DR)(e,{x:n+f,y:r,width:o,height:a}),(0,z.Ww)(e),d&&(0,P.bt)(e)){var b=(0,Fe.Ut)(e,e.points),y=d[0]-b[0]+(d[2]-b[2]);(0,i.DR)(e,{x:e.x+.5*y,y:e.y,width:o,height:a})}}else(0,i.DR)(e,{angle:l})},at=function(e,t){var n=e.x,r=e.y,o=(0,Qe.LW)(e.angle+t);o<0&&(o=(0,Qe.LW)(2*Math.PI+o)),(0,i.DR)(e,{angle:o}),(0,i.DR)(e,{x:n,y:r})},lt=n(4688);function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function st(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ut=(0,w.z)({name:"gridMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!e.gridSize}},perform:function(e,t){return{appState:st(st({},t),{},{gridSize:this.checked(t)?null:E.k}),commitToHistory:!1}},checked:function(e){return null!==e.gridSize},predicate:function(e,t,n){return void 0===n.gridModeEnabled},contextItemLabel:"labels.showGrid",keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.code===y.aU.QUOTE}});function dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pt=(0,w.z)({name:"zenMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!e.zenModeEnabled}},perform:function(e,t){return{appState:ft(ft({},t),{},{zenModeEnabled:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.zenModeEnabled},predicate:function(e,t,n){return void 0===n.zenModeEnabled},contextItemLabel:"buttons.zenMode",keyTest:function(e){return!e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.Z}}),ht=n(4958),mt=n(202),gt=n(4929);function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yt=(0,w.z)({name:"toggleLock",trackEvent:{category:"element"},perform:function(e,t){var n=(0,l.eD)(e,t,!0);if(!n.length)return!1;var r=xt(n),o=(0,s.xn)(n),a="lock"===r;return{elements:e.map((function(e){return o.has(e.id)?(0,i.BE)(e,{locked:a}):e})),appState:bt(bt({},t),{},{selectedLinearElement:a?null:t.selectedLinearElement}),commitToHistory:!0}},contextItemLabel:function(e,t){var n=(0,l.eD)(e,t,!1);return 1===n.length?n[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock":"lock"===xt(n)?"labels.elementLock.lockAll":"labels.elementLock.unlockAll"},keyTest:function(e,t,n){return e.key.toLocaleLowerCase()===y.tW.L&&e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&(0,l.eD)(n,t,!1).length>0}}),xt=function(e){return e.some((function(e){return!e.locked}))?"lock":"unlock"};function wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(n),!0).forEach((function(t){(0,I.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Et=(0,w.z)({name:"toggleLinearEditor",trackEvent:{category:"element"},predicate:function(e,t){var n=(0,l.eD)(e,t);return!(1!==n.length||!(0,P.bt)(n[0]))},perform:function(e,t,n,r){var o,i=(0,l.eD)((0,T.Lm)(e),t,!0)[0],a=(null===(o=t.editingLinearElement)||void 0===o?void 0:o.elementId)===i.id?null:new M._(i,r.scene);return{appState:kt(kt({},t),{},{editingLinearElement:a}),commitToHistory:!1}},contextItemLabel:function(e,t){var n,r=(0,l.eD)((0,T.Lm)(e),t,!0)[0];return(null===(n=t.editingLinearElement)||void 0===n?void 0:n.elementId)===r.id?"labels.lineEditor.exit":"labels.lineEditor.edit"}})},7901:function(e,t,n){"use strict";n.d(t,{N:function(){return r},z:function(){return o}});var r=[],o=function(e){return r=r.concat(e),e}},785:function(e,t,n){"use strict";n.d(t,{C:function(){return l}});var r=n(2335),o=n(8211),i=n(6340),a={toggleTheme:[(0,i.uY)("Shift+Alt+D")],saveScene:[(0,i.uY)("CtrlOrCmd+S")],loadScene:[(0,i.uY)("CtrlOrCmd+O")],clearCanvas:[(0,i.uY)("CtrlOrCmd+Delete")],imageExport:[(0,i.uY)("CtrlOrCmd+Shift+E")],cut:[(0,i.uY)("CtrlOrCmd+X")],copy:[(0,i.uY)("CtrlOrCmd+C")],paste:[(0,i.uY)("CtrlOrCmd+V")],copyStyles:[(0,i.uY)("CtrlOrCmd+Alt+C")],pasteStyles:[(0,i.uY)("CtrlOrCmd+Alt+V")],selectAll:[(0,i.uY)("CtrlOrCmd+A")],deleteSelectedElements:[(0,i.uY)("Delete")],duplicateSelection:[(0,i.uY)("CtrlOrCmd+D"),(0,i.uY)("Alt+".concat((0,o.t)("helpDialog.drag")))],sendBackward:[(0,i.uY)("CtrlOrCmd+[")],bringForward:[(0,i.uY)("CtrlOrCmd+]")],sendToBack:[r.Um?(0,i.uY)("CtrlOrCmd+Alt+["):(0,i.uY)("CtrlOrCmd+Shift+[")],bringToFront:[r.Um?(0,i.uY)("CtrlOrCmd+Alt+]"):(0,i.uY)("CtrlOrCmd+Shift+]")],copyAsPng:[(0,i.uY)("Shift+Alt+C")],copyAsSvg:[],group:[(0,i.uY)("CtrlOrCmd+G")],ungroup:[(0,i.uY)("CtrlOrCmd+Shift+G")],gridMode:[(0,i.uY)("CtrlOrCmd+'")],zenMode:[(0,i.uY)("Alt+Z")],stats:[(0,i.uY)("Alt+/")],addToLibrary:[],flipHorizontal:[(0,i.uY)("Shift+H")],flipVertical:[(0,i.uY)("Shift+V")],viewMode:[(0,i.uY)("Alt+R")],hyperlink:[(0,i.uY)("CtrlOrCmd+K")],toggleLock:[(0,i.uY)("CtrlOrCmd+Shift+L")]},l=function(e){var t=a[e];return t&&t.length>0?t[0]:""}},7047:function(e,t,n){"use strict";n.d(t,{L:function(){return r}});var r=function(e,t,n,r){try{if("undefined"==typeof window||{REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_MATOMO_URL:"https://excalidraw.matomo.cloud/",REACT_APP_CDN_MATOMO_TRACKER_URL:"//cdn.matomo.cloud/excalidraw.matomo.cloud/matomo.js",REACT_APP_MATOMO_SITE_ID:"1",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",PKG_VERSION:"0.15.2-6546-81bee8a",IS_EXCALIDRAW_NPM_PACKAGE:!0}.JEST_WORKER_ID)return;window.gtag&&window.gtag("event",t,{event_category:e,event_label:n,value:r}),window.sa_event&&window.sa_event(t,{category:e,label:n,value:r}),window.fathom&&window.fathom.trackEvent(t,{category:e,label:n,value:r})}catch(e){console.error("error during analytics",e)}}},8897:function(e,t,n){"use strict";n.d(t,{EN:function(){return p},eS:function(){return f},im:function(){return c},l$:function(){return h},s:function(){return d}});var r=n(5284),o=n(2335),i=n(8211),a=n(6340),l=o.ZB.includes(devicePixelRatio)?devicePixelRatio:1,c=function(){return{showWelcomeScreen:!1,theme:o.C6.LIGHT,collaborators:new Map,currentChartType:"bar",currentItemBackgroundColor:o.HN.backgroundColor,currentItemEndArrowhead:"arrow",currentItemFillStyle:o.HN.fillStyle,currentItemFontFamily:o.rk,currentItemFontSize:o.n5,currentItemOpacity:o.HN.opacity,currentItemRoughness:o.HN.roughness,currentItemStartArrowhead:null,currentItemStrokeColor:o.HN.strokeColor,currentItemRoundness:"round",currentItemStrokeStyle:o.HN.strokeStyle,currentItemStrokeWidth:o.HN.strokeWidth,currentItemTextAlign:o.Hg,cursorButton:"up",draggingElement:null,editingElement:null,editingGroupId:null,editingLinearElement:null,activeTool:{type:"selection",customType:null,locked:o.HN.locked,lastActiveTool:null},penMode:!1,penDetected:!1,errorMessage:null,exportBackground:!0,exportScale:l,exportEmbedScene:!1,exportWithDarkMode:!1,fileHandle:null,gridSize:null,isBindingEnabled:!0,defaultSidebarDockedPreference:!1,isLoading:!1,isResizing:!1,isRotating:!1,lastPointerDownWith:"mouse",multiElement:null,name:"".concat((0,i.t)("labels.untitled"),"-").concat((0,a.Fc)()),contextMenu:null,openMenu:null,openPopup:null,openSidebar:null,openDialog:null,pasteDialog:{shown:!1,data:null},previousSelectedElementIds:{},resizingElement:null,scrolledOutside:!1,scrollX:0,scrollY:0,selectedElementIds:{},selectedGroupIds:{},selectionElement:null,shouldCacheIgnoreZoom:!1,showStats:!1,startBoundElement:null,suggestedBindings:[],toast:null,viewBackgroundColor:r.white,zenModeEnabled:!1,zoom:{value:1},viewModeEnabled:!1,pendingImageElementId:null,showHyperlinkPopup:!1,selectedLinearElement:null}},s={showWelcomeScreen:{browser:!0,export:!1,server:!1},theme:{browser:!0,export:!1,server:!1},collaborators:{browser:!1,export:!1,server:!1},currentChartType:{browser:!0,export:!1,server:!1},currentItemBackgroundColor:{browser:!0,export:!1,server:!1},currentItemEndArrowhead:{browser:!0,export:!1,server:!1},currentItemFillStyle:{browser:!0,export:!1,server:!1},currentItemFontFamily:{browser:!0,export:!1,server:!1},currentItemFontSize:{browser:!0,export:!1,server:!1},currentItemRoundness:{browser:!0,export:!1,server:!1},currentItemOpacity:{browser:!0,export:!1,server:!1},currentItemRoughness:{browser:!0,export:!1,server:!1},currentItemStartArrowhead:{browser:!0,export:!1,server:!1},currentItemStrokeColor:{browser:!0,export:!1,server:!1},currentItemStrokeStyle:{browser:!0,export:!1,server:!1},currentItemStrokeWidth:{browser:!0,export:!1,server:!1},currentItemTextAlign:{browser:!0,export:!1,server:!1},cursorButton:{browser:!0,export:!1,server:!1},draggingElement:{browser:!1,export:!1,server:!1},editingElement:{browser:!1,export:!1,server:!1},editingGroupId:{browser:!0,export:!1,server:!1},editingLinearElement:{browser:!1,export:!1,server:!1},activeTool:{browser:!0,export:!1,server:!1},penMode:{browser:!0,export:!1,server:!1},penDetected:{browser:!0,export:!1,server:!1},errorMessage:{browser:!1,export:!1,server:!1},exportBackground:{browser:!0,export:!1,server:!1},exportEmbedScene:{browser:!0,export:!1,server:!1},exportScale:{browser:!0,export:!1,server:!1},exportWithDarkMode:{browser:!0,export:!1,server:!1},fileHandle:{browser:!1,export:!1,server:!1},gridSize:{browser:!0,export:!0,server:!0},height:{browser:!1,export:!1,server:!1},isBindingEnabled:{browser:!1,export:!1,server:!1},defaultSidebarDockedPreference:{browser:!0,export:!1,server:!1},isLoading:{browser:!1,export:!1,server:!1},isResizing:{browser:!1,export:!1,server:!1},isRotating:{browser:!1,export:!1,server:!1},lastPointerDownWith:{browser:!0,export:!1,server:!1},multiElement:{browser:!1,export:!1,server:!1},name:{browser:!0,export:!1,server:!1},offsetLeft:{browser:!1,export:!1,server:!1},offsetTop:{browser:!1,export:!1,server:!1},contextMenu:{browser:!1,export:!1,server:!1},openMenu:{browser:!0,export:!1,server:!1},openPopup:{browser:!1,export:!1,server:!1},openSidebar:{browser:!0,export:!1,server:!1},openDialog:{browser:!1,export:!1,server:!1},pasteDialog:{browser:!1,export:!1,server:!1},previousSelectedElementIds:{browser:!0,export:!1,server:!1},resizingElement:{browser:!1,export:!1,server:!1},scrolledOutside:{browser:!0,export:!1,server:!1},scrollX:{browser:!0,export:!1,server:!1},scrollY:{browser:!0,export:!1,server:!1},selectedElementIds:{browser:!0,export:!1,server:!1},selectedGroupIds:{browser:!0,export:!1,server:!1},selectionElement:{browser:!1,export:!1,server:!1},shouldCacheIgnoreZoom:{browser:!0,export:!1,server:!1},showStats:{browser:!0,export:!1,server:!1},startBoundElement:{browser:!1,export:!1,server:!1},suggestedBindings:{browser:!1,export:!1,server:!1},toast:{browser:!1,export:!1,server:!1},viewBackgroundColor:{browser:!0,export:!0,server:!0},width:{browser:!1,export:!1,server:!1},zenModeEnabled:{browser:!0,export:!1,server:!1},zoom:{browser:!0,export:!1,server:!1},viewModeEnabled:{browser:!1,export:!1,server:!1},pendingImageElementId:{browser:!1,export:!1,server:!1},showHyperlinkPopup:{browser:!1,export:!1,server:!1},selectedLinearElement:{browser:!0,export:!1,server:!1}},u=function(e,t){for(var n={},r=0,o=Object.keys(e);r<o.length;r++){var i=o[r],a=s[i];if(null!=a&&a[t]){var l=e[i];n[i]=l}}return n},d=function(e){return u(e,"export")},f=function(e){return u(e,"server")},p=function(e){return"eraser"===e.activeTool.type},h=function(e){return"hand"===e.activeTool.type}},5674:function(e,t,n){"use strict";n.d(t,{dz:function(){return k},i$:function(){return b},ps:function(){return _}});var r=n(1930),o=n(7169),i=n(2577),a=n(56),l=n(2335),c=n(1047),s=n(6954);function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=32,m=12,g=256,v="NOT_SPREADSHEET",b="VALID_SPREADSHEET",y=function(e){var t=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return t?parseFloat("".concat((t[1]||t[2])+t[3]).replace(/,/g,"")):null},x=function(e,t){return e.slice(1).every((function(e){return null!==y(e[t])}))},w=function(e){var t=e[0].length;if(t>2)return{type:v,reason:"More than 2 columns"};if(1===t){if(!x(e,0))return{type:v,reason:"Value is not numeric"};var n=null===y(e[0][0]),r=(n?e.slice(1):e).map((function(e){return y(e[0])}));return r.length<2?{type:v,reason:"Less than two rows"}:{type:b,spreadsheet:{title:n?e[0][0]:null,labels:null,values:r}}}var o=x(e,0),a=x(e,1);if(!o&&!a)return{type:v,reason:"Value is not numeric"};var l=a?[0,1]:[1,0],c=(0,i.Z)(l,2),s=c[0],u=c[1],d=null===y(e[0][u]),f=d?e.slice(1):e;return f.length<2?{type:v,reason:"Less than 2 rows"}:{type:b,spreadsheet:{title:d?e[0][u]:null,labels:f.map((function(e){return e[s]})),values:f.map((function(e){return y(e[u])}))}}},k=function(e){var t=e.trim().split("\n").map((function(e){return e.trim().split("\t")}));if(t.length&&2!==t[0].length&&(t=e.trim().split("\n").map((function(e){return e.trim().split(",")}))),0===t.length)return{type:v,reason:"No values"};var n=t[0].length;if(!t.every((function(e){return e.length===n})))return{type:v,reason:"All rows don't have same number of columns"};var r=w(t);if(r.type!==b){var o=w(function(e){for(var t=[],n=0;n<e[0].length;n++){for(var r=[],o=0;o<e.length;o++)r.push(e[o][n]);t.push(r)}return t}(t));if(o.type===b)return o}return r},E=a.Z.elementBackground.slice(2,a.Z.elementBackground.length),j={strokeColor:a.Z.elementStroke[0]},S=function(e){return{chartWidth:44*e.values.length+m,chartHeight:280}},O=function(e,t,n,o,i,s){var u=S(e),d=u.chartWidth,f=u.chartHeight,v=e.title?(0,c.VL)(p(p({backgroundColor:i,groupIds:[o]},j),{},{text:e.title,x:t+d/2,y:n-g-24-l.n5,roundness:null,textAlign:"center"})):null,b=s?(0,c.Up)(p(p({backgroundColor:i,groupIds:[o]},j),{},{type:"rectangle",x:t,y:n-f,width:d,height:f,strokeColor:a.Z.elementStroke[0],fillStyle:"solid",opacity:6})):null;return[].concat((0,r.Z)(b?[b]:[]),(0,r.Z)(v?[v]:[]),(0,r.Z)(function(e,t,n,r,o){var i;return(null===(i=e.labels)||void 0===i?void 0:i.map((function(e,i){return(0,c.VL)(p(p({groupIds:[r],backgroundColor:o},j),{},{text:e.length>8?"".concat(e.slice(0,5),"..."):e,x:t+44*i+24,y:n+6,width:h,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))})))||[]}(e,t,n,o,i)),(0,r.Z)(function(e,t,n,o,i){var a=(0,c.VL)(p(p({groupIds:[o],backgroundColor:i},j),{},{x:t-m,y:n-m,text:"0",textAlign:"right"}));return[a,(0,c.VL)(p(p({groupIds:[o],backgroundColor:i},j),{},{x:t-m,y:n-g-a.height/2,text:Math.max.apply(Math,(0,r.Z)(e.values)).toLocaleString(),textAlign:"right"}))]}(e,t,n,o,i)),(0,r.Z)(function(e,t,n,r,o){var i=S(e),a=i.chartWidth,l=i.chartHeight;return[(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},j),{},{type:"line",x:t,y:n,startArrowhead:null,endArrowhead:null,width:a,points:[[0,0],[a,0]]})),(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},j),{},{type:"line",x:t,y:n,startArrowhead:null,endArrowhead:null,height:l,points:[[0,0],[0,-l]]})),(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},j),{},{type:"line",x:t,y:n-g-m,startArrowhead:null,endArrowhead:null,strokeStyle:"dotted",width:a,opacity:50,points:[[0,0],[a,0]]}))]}(e,t,n,o,i)))},_=function(e,t,n,o){return"line"===e?function(e,t,n){var o,i=Math.max.apply(Math,(0,r.Z)(e.values)),a=(0,s.kb)(),d=E[Math.floor(Math.random()*E.length)],f=0,h=[],v=u(e.values);try{for(v.s();!(o=v.n()).done;){var b=o.value,y=44*f,x=-b/i*g;h.push([y,x]),f++}}catch(e){v.e(e)}finally{v.f()}var w=Math.max.apply(Math,(0,r.Z)(h.map((function(e){return e[0]})))),k=Math.max.apply(Math,(0,r.Z)(h.map((function(e){return e[1]})))),S=Math.min.apply(Math,(0,r.Z)(h.map((function(e){return e[0]})))),_=Math.min.apply(Math,(0,r.Z)(h.map((function(e){return e[1]})))),C=(0,c.y8)(p(p({backgroundColor:d,groupIds:[a]},j),{},{type:"line",x:t+m+16,y:n-m,startArrowhead:null,endArrowhead:null,height:k-_,width:w-S,strokeWidth:2,points:h})),I=e.values.map((function(e,r){var o=44*r+6,l=-e/i*g+6;return(0,c.Up)(p(p({backgroundColor:d,groupIds:[a]},j),{},{fillStyle:"solid",strokeWidth:2,type:"ellipse",x:t+o+16,y:n+l-24,width:m,height:m}))})),T=e.values.map((function(e,r){var o=44*r+6,l=e/i*g+6+m;return(0,c.y8)(p(p({backgroundColor:d,groupIds:[a]},j),{},{type:"line",x:t+o+16+6,y:n-l,startArrowhead:null,endArrowhead:null,height:l,strokeStyle:"dotted",opacity:50,points:[[0,0],[0,l]]}))}));return[].concat((0,r.Z)(O(e,t,n,a,d,"production"===l.Vi.DEVELOPMENT)),[C],(0,r.Z)(T),(0,r.Z)(I))}(t,n,o):function(e,t,n){var o=Math.max.apply(Math,(0,r.Z)(e.values)),i=(0,s.kb)(),a=E[Math.floor(Math.random()*E.length)],u=e.values.map((function(e,r){var l=e/o*g;return(0,c.Up)(p(p({backgroundColor:a,groupIds:[i]},j),{},{type:"rectangle",x:t+44*r+m,y:n-l-m,width:h,height:l}))}));return[].concat((0,r.Z)(u),(0,r.Z)(O(e,t,n,i,a,"production"===l.Vi.DEVELOPMENT)))}(t,n,o)}},8982:function(e,t,n){"use strict";n.d(t,{X:function(){return o},f:function(){return i}});var r=n(56),o=function(e,t){if(null!=t&&t.collaborators){var n=t.collaborators.get(e);if(null!=n&&n.color)return n.color}var o=e.split("").reduce((function(e,t){return e+t.charCodeAt(0)}),0),i=r.Z.elementBackground.slice(3),a=r.Z.elementStroke.slice(3);return{background:i[o%i.length],stroke:a[o%a.length]}},i=function(e){return null!=e&&e.trim()?e.trim()[0].toUpperCase():"?"}},6665:function(e,t,n){"use strict";n.d(t,{dd:function(){return O},mQ:function(){return j},uR:function(){return S},vQ:function(){return x},vt:function(){return b},wx:function(){return v}});var r=n(7169),o=n(8950),i=n(2975),a=n.n(i),l=n(4162),c=n(5674),s=n(2335),u=n(1974),d=n(6340);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h="",m=!1,g="clipboard"in navigator&&"readText"in navigator.clipboard,v="clipboard"in navigator&&"writeText"in navigator.clipboard,b="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,y=function(e){return!(![s.r8.excalidraw,s.r8.excalidrawClipboard].includes(null==e?void 0:e.type)||!Array.isArray(e.elements))},x=function(){var e=(0,o.Z)(a().mark((function e(t,n){var r,o,i,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!1,o=t.reduce((function(e,t){return(0,u.wi)(t)&&(r=!0,n&&n[t.fileId]&&(e[t.fileId]=n[t.fileId])),e}),{}),r&&!n&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object."),i={type:s.r8.excalidrawClipboard,elements:t,files:n?o:void 0},l=JSON.stringify(i),!(0,d.h2)()){e.next=7;break}return e.abrupt("return",l);case 7:return h=l,e.prev=8,m=!1,e.next=12,O(l);case 12:e.next=18;break;case 14:e.prev=14,e.t0=e.catch(8),m=!0,console.error(e.t0);case 18:case"end":return e.stop()}}),e,null,[[8,14]])})));return function(t,n){return e.apply(this,arguments)}}(),w=function(){if(!h)return{};try{return JSON.parse(h)}catch(e){return console.error(e),{}}},k=function(e){var t=(0,c.dz)(e);return t.type===c.i$?{spreadsheet:t.spreadsheet}:null},E=function(){var e=(0,o.Z)(a().mark((function e(t){var n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t){e.next=5;break}e.t0=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/plain"),e.next=11;break;case 5:if(e.t1=g,!e.t1){e.next=10;break}return e.next=9,navigator.clipboard.readText();case 9:e.t1=e.sent;case 10:e.t0=e.t1;case 11:return r=e.t0,e.abrupt("return",(r||"").trim());case 15:return e.prev=15,e.t2=e.catch(0),e.abrupt("return","");case 18:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=(0,o.Z)(a().mark((function e(t){var n,r,o,i,c,s=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]&&s[1],e.next=3,E(t);case 3:if((r=e.sent)&&(n||!r.includes(l.oj))){e.next=6;break}return e.abrupt("return",w());case 6:if(!(o=!n&&k(r))){e.next=9;break}return e.abrupt("return",o);case 9:if(i=w(),e.prev=10,c=JSON.parse(r),!y(c)){e.next=14;break}return e.abrupt("return",{elements:c.elements,files:c.files,text:n?JSON.stringify(c.elements,null,2):void 0});case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(10);case 18:return e.abrupt("return",m&&i.elements?p(p({},i),{},{text:n?JSON.stringify(i.elements,null,2):void 0}):{text:r});case 19:case"end":return e.stop()}}),e,null,[[10,16]])})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=(0,o.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.clipboard.write([new window.ClipboardItem((0,r.Z)({},s.LO.png,t))]);case 3:case 21:e.next=24;break;case 5:if(e.prev=5,e.t0=e.catch(0),!(0,d.y8)(t)){e.next=23;break}return e.t1=navigator.clipboard,e.t2=window.ClipboardItem,e.t3=r.Z,e.t4={},e.t5=s.LO.png,e.next=15,t;case 15:return e.t6=e.sent,e.t7=(0,e.t3)(e.t4,e.t5,e.t6),e.t8=new e.t2(e.t7),e.t9=[e.t8],e.next=21,e.t1.write.call(e.t1,e.t9);case 23:throw e.t0;case 24:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=(0,o.Z)(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!1,!v){e.next=11;break}return e.prev=2,e.next=5,navigator.clipboard.writeText(t||"");case 5:n=!0,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0);case 11:if(n||_(t||" ")){e.next=13;break}throw new Error("couldn't copy");case 13:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}(),_=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;n.style.top="".concat(r,"px"),n.style.fontSize="12pt",n.setAttribute("readonly",""),n.value=e,document.body.appendChild(n);var o=!1;try{n.select(),n.setSelectionRange(0,n.value.length),o=document.execCommand("copy")}catch(e){console.error(e)}return n.remove(),o}},56:function(e,t,n){"use strict";var r=n(1930),o=n(5284),i=function(e){return[o.red[e],o.pink[e],o.grape[e],o.violet[e],o.indigo[e],o.blue[e],o.cyan[e],o.teal[e],o.green[e],o.lime[e],o.yellow[e],o.orange[e]]};t.Z={canvasBackground:[o.white,o.gray[0],o.gray[1]].concat((0,r.Z)(i(0))),elementBackground:["transparent",o.gray[4],o.gray[6]].concat((0,r.Z)(i(6))),elementStroke:[o.black,o.gray[8],o.gray[7]].concat((0,r.Z)(i(9)))}},6798:function(e,t,n){"use strict";n.d(t,{o:function(){return f},w:function(){return d}});var r=n(2577),o=n(4739),i=n(6710),a=n(8211),l=n(9487),c=n(6936),s=n(7046),u=n(4512),d=(0,o.cn)(null),f=function(){var e=(0,o.KO)(d,l.yE),t=(0,r.Z)(e,2),n=t[0],f=t[1],p=(0,c.eh)();return n&&"clearCanvas"===n?(0,u.jsx)(s.Z,{onConfirm:function(){p.executeAction(i.mo),f(null)},onCancel:function(){return f(null)},title:(0,a.t)("clearCanvasDialog.title"),children:(0,u.jsxs)("p",{className:"clear-canvas__content",children:[" ",(0,a.t)("alerts.clearReset")]})}):null}},6936:function(e,t,n){"use strict";n.d(t,{ZP:function(){return Tr},qD:function(){return or},hY:function(){return ir},Fy:function(){return ar},eh:function(){return dr},gF:function(){return sr},J0:function(){return lr},bd:function(){return cr},n9:function(){return ur}});var r=n(6655),o=n(2577),i=n(1930),a=n(8950),l=n(8821),c=n(5169),s=n(3173),u=n(2248),d=n(7245),f=n(2312),p=n(7169),h=n(2975),m=n.n(h),g=n(9787),v=n.n(g),b=n(5156),y=n(8234),x=n(45),w=n(5605),k=n(6710),E=n(3646),j=n(1319),S=n(8211),O=n(6066),_=n(1935),C=n(8290),I=n(6340),T=n(2335),P=n(4512);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=function(e,t,n){var r=!1;if(!(t.multiElement||t.resizingElement||t.editingElement||t.draggingElement)){var o=n();if(null===o)return{commitToHistory:r};var i=(0,I.xn)(e),a=o.elements,l=(0,I.xn)(a),c=e.filter((function(e){return!l.has(e.id)})),s=a.map((function(e){return(0,_.BE)(i.get(e.id)||e,e)})).concat(c.map((function(e){return(0,_.BE)(e,{isDeleted:!0})})));return(0,C.$q)(s,c),{elements:s,appState:D(D({},t),o.appState),commitToHistory:r,syncHistory:!0}}return{commitToHistory:r}},L=n(7047),Z=function(e,t,n,o,i,a){if(e.trackEvent)try{if("object"===(0,r.Z)(e.trackEvent))(!e.trackEvent.predicate||e.trackEvent.predicate(n,o,a))&&(0,L.L)(e.trackEvent.category,e.trackEvent.action||e.name,"".concat(t," (").concat(i.device.isMobile?"mobile":"desktop",")"))}catch(e){console.error("error while logging action:",e)}},z=function(){function e(t,n,r,o){var i=this;(0,l.Z)(this,e),this.actions={},this.renderAction=function(e,t){var n=i.app.props.UIOptions.canvasActions;if(i.actions[e]&&"PanelComponent"in i.actions[e]&&(!(e in n)||n[e])){var r=i.actions[e],o=r.PanelComponent;o.displayName="PanelComponent";var a=i.getElementsIncludingDeleted(),l=i.getAppState();return(0,P.jsx)(o,{elements:i.getElementsIncludingDeleted(),appState:i.getAppState(),updateData:function(e){Z(r,"ui",l,a,i.app,e),i.updater(r.perform(i.getElementsIncludingDeleted(),i.getAppState(),e,i.app))},appProps:i.app.props,data:t})}return null},this.isActionEnabled=function(e){var t=i.getElementsIncludingDeleted(),n=i.getAppState();return!e.predicate||e.predicate(t,n,i.app.props,i.app)},this.updater=function(e){if(!e||!("then"in e))return t(e);e.then((function(e){return t(e)}))},this.getAppState=n,this.getElementsIncludingDeleted=r,this.app=o}return(0,c.Z)(e,[{key:"registerAction",value:function(e){this.actions[e.name]=e}},{key:"registerAll",value:function(e){var t=this;e.forEach((function(e){return t.registerAction(e)}))}},{key:"handleKeyDown",value:function(e){var t=this,n=this.app.props.UIOptions.canvasActions,r=Object.values(this.actions).sort((function(e,t){return(t.keyPriority||0)-(e.keyPriority||0)})).filter((function(r){return(!(r.name in n)||n[r.name])&&r.keyTest&&r.keyTest(e,t.getAppState(),t.getElementsIncludingDeleted())}));if(1!==r.length)return r.length>1&&console.warn("Canceling as multiple actions match this shortcut",r),!1;var o=r[0];if(this.getAppState().viewModeEnabled&&!0!==o.viewMode)return!1;var i=this.getElementsIncludingDeleted(),a=this.getAppState();return Z(o,"keyboard",a,i,this.app,null),e.preventDefault(),e.stopPropagation(),this.updater(r[0].perform(i,a,null,this.app)),!0}},{key:"executeAction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api",n=this.getElementsIncludingDeleted(),r=this.getAppState(),o=null;Z(e,t,r,n,this.app,o),this.updater(e.perform(n,r,o,this.app))}}]),e}(),R=n(7901),N=n(8897),B=n(6665),H=n(9485),W=n(7053),F=n(679),U=n(1047),K=n(6938),Y=n(2791),V=n(1974),G=function(e){var t=Array.from(e.values());return{x:q(t,(function(e){return e.x}))/t.length,y:q(t,(function(e){return e.y}))/t.length}},X=function(e){var t=(0,o.Z)(e,2),n=t[0],r=t[1];return Math.hypot(n.x-r.x,n.y-r.y)},q=function(e,t){return e.reduce((function(e,n){return e+t(n)}),0)},J=n(242);function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ee=function(e){return{selectedElementIds:e.selectedElementIds,selectedGroupIds:e.selectedGroupIds,viewBackgroundColor:e.viewBackgroundColor,editingLinearElement:e.editingLinearElement,editingGroupId:e.editingGroupId,name:e.name}},te=function(){function e(){var t=this;(0,l.Z)(this,e),this.elementCache=new Map,this.recording=!0,this.stateHistory=[],this.redoStack=[],this.lastEntry=null,this.generateEntry=function(e,n){return t.dehydrateHistoryEntry({appState:ee(e),elements:n.reduce((function(t,n){if((0,V.bt)(n)&&e.multiElement&&e.multiElement.id===n.id){if(e.multiElement&&e.multiElement.id===n.id&&n.points.length<2)return t;t.push(Q(Q({},n),{},{points:n.lastCommittedPoint!==n.points[n.points.length-1]?n.points.slice(0,-1):n.points}))}else t.push(n);return t}),[])})}}return(0,c.Z)(e,[{key:"hydrateHistoryEntry",value:function(e){var t=this,n=e.appState,r=e.elements;return{appState:JSON.parse(n),elements:r.map((function(e){var n,r=null===(n=t.elementCache.get(e.id))||void 0===n?void 0:n.get(e.versionNonce);if(!r)throw new Error("Element not found: ".concat(e.id,":").concat(e.versionNonce));return r}))}}},{key:"dehydrateHistoryEntry",value:function(e){var t=this,n=e.appState,r=e.elements;return{appState:JSON.stringify(n),elements:r.map((function(e){t.elementCache.has(e.id)||t.elementCache.set(e.id,new Map);var n=t.elementCache.get(e.id);return n.has(e.versionNonce)||n.set(e.versionNonce,(0,Y.OL)(e)),{id:e.id,versionNonce:e.versionNonce}}))}}},{key:"getSnapshotForTest",value:function(){var e=this;return{recording:this.recording,stateHistory:this.stateHistory.map((function(t){return e.hydrateHistoryEntry(t)})),redoStack:this.redoStack.map((function(t){return e.hydrateHistoryEntry(t)}))}}},{key:"clear",value:function(){this.stateHistory.length=0,this.redoStack.length=0,this.lastEntry=null,this.elementCache.clear()}},{key:"shouldCreateEntry",value:function(e){var t,n=this.lastEntry;if(!n)return!0;if(e.elements.length!==n.elements.length)return!0;for(var r=e.elements.length-1;r>-1;r--){var o=e.elements[r],i=n.elements[r];if(!o||!i||o.id!==i.id||o.versionNonce!==i.versionNonce)return!0}for(t in e.appState){var a,l;if("editingLinearElement"===t)if((null===(a=e.appState[t])||void 0===a?void 0:a.elementId)===(null===(l=n.appState[t])||void 0===l?void 0:l.elementId))continue;if("selectedElementIds"!==t&&"selectedGroupIds"!==t&&e.appState[t]!==n.appState[t])return!0}return!1}},{key:"pushEntry",value:function(e,t){var n=this.generateEntry(e,t),r=this.hydrateHistoryEntry(n);if(r){if(!this.shouldCreateEntry(r))return;this.stateHistory.push(n),this.lastEntry=r,this.clearRedoStack()}}},{key:"clearRedoStack",value:function(){this.redoStack.splice(0,this.redoStack.length)}},{key:"redoOnce",value:function(){if(0===this.redoStack.length)return null;var e=this.redoStack.pop();return void 0!==e?(this.stateHistory.push(e),this.hydrateHistoryEntry(e)):null}},{key:"undoOnce",value:function(){if(1===this.stateHistory.length)return null;var e=this.stateHistory.pop(),t=this.stateHistory[this.stateHistory.length-1];return void 0!==e?(this.redoStack.push(e),this.hydrateHistoryEntry(t)):null}},{key:"setCurrentState",value:function(e,t){this.lastEntry=this.hydrateHistoryEntry(this.generateEntry(e,t))}},{key:"resumeRecording",value:function(){this.recording=!0}},{key:"record",value:function(e,t){this.recording&&(this.pushEntry(e,t),this.recording=!1)}}]),e}(),ne=n(6552),re=n(3547),oe=n(3063),ie=n(75),ae=n(1564),le=n(746),ce=[{icon:E.zu,value:"selection",key:O.tW.V,numericKey:O.tW[1],fillable:!0},{icon:E.OW,value:"rectangle",key:O.tW.R,numericKey:O.tW[2],fillable:!0},{icon:E.nb,value:"diamond",key:O.tW.D,numericKey:O.tW[3],fillable:!0},{icon:E.Re,value:"ellipse",key:O.tW.O,numericKey:O.tW[4],fillable:!0},{icon:E.e0,value:"arrow",key:O.tW.A,numericKey:O.tW[5],fillable:!0},{icon:E.zb,value:"line",key:O.tW.L,numericKey:O.tW[6],fillable:!0},{icon:E.Pm,value:"freedraw",key:[O.tW.P,O.tW.X],numericKey:O.tW[7],fillable:!1},{icon:E.VL,value:"text",key:O.tW.T,numericKey:O.tW[8],fillable:!1},{icon:E.XB,value:"image",key:null,numericKey:O.tW[9],fillable:!1},{icon:E.$q,value:"eraser",key:O.tW.E,numericKey:O.tW[0],fillable:!1}],se=n(2891),ue=n(487),de=n.n(ue),fe=n(631),pe=n.n(fe),he=n(2052),me=n.n(he),ge=n(4010),ve=n.n(ge),be=n(1469),ye=n.n(be),xe=n(9329),we=n.n(xe),ke=n(6578),Ee={};Ee.styleTagTransform=we(),Ee.setAttributes=ve(),Ee.insert=me().bind(null,"head"),Ee.domAPI=pe(),Ee.insertStyleElement=ye();de()(ke.Z,Ee),ke.Z&&ke.Z.locals&&ke.Z.locals;var je=n(785),Se="separator",Oe=v().memo((function(e){var t=e.actionManager,n=e.items,r=e.top,o=e.left,i=sr(),a=ur(),l=cr(),c=n.reduce((function(e,n){return!n||n!==Se&&n.predicate&&!n.predicate(l,i,t.app.props,t.app)||e.push(n),e}),[]);return(0,P.jsx)(se.J,{onCloseRequest:function(){return a({contextMenu:null})},top:r,left:o,fitInViewport:!0,offsetLeft:i.offsetLeft,offsetTop:i.offsetTop,viewportWidth:i.width,viewportHeight:i.height,children:(0,P.jsx)("ul",{className:"context-menu",onContextMenu:function(e){return e.preventDefault()},children:c.map((function(e,n){var r;if(e===Se)return c[n-1]&&c[n-1]!==Se?(0,P.jsx)("hr",{className:"context-menu-item-separator"},n):null;var o=e.name,s="";return e.contextItemLabel&&(s="function"==typeof e.contextItemLabel?(0,S.t)(e.contextItemLabel(l,i)):(0,S.t)(e.contextItemLabel)),(0,P.jsx)("li",{"data-testid":o,onClick:function(){a({contextMenu:null},(function(){t.executeAction(e,"contextMenu")}))},children:(0,P.jsxs)("button",{className:(0,x.Z)("context-menu-item",{dangerous:"deleteSelectedElements"===o,checkmark:null===(r=e.checked)||void 0===r?void 0:r.call(e,i)}),children:[(0,P.jsx)("div",{className:"context-menu-item__label",children:s}),(0,P.jsx)("kbd",{className:"context-menu-item__shortcut",children:o?(0,je.C)(o):""})]})},n)}))})})})),_e=n(2726),Ce=n(7239),Ie=n(8120),Te=n(1894),Pe=n(5710),Me=n(6086),De={};De.styleTagTransform=we(),De.setAttributes=ve(),De.insert=me().bind(null,"head"),De.domAPI=pe(),De.insertStyleElement=ye();de()(Me.Z,De),Me.Z&&Me.Z.locals&&Me.Z.locals;function Ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ze(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ze(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Re=function(e){var t,n=e.appState,r=e.elements,o=e.renderAction,i=(0,ie.Zs)((0,U.Lm)(r),n),a=!1;2===i.length&&((0,V.Xo)(i[0])||(0,V.Xo)(i[1]))&&(a=!0);var l,c=Boolean(n.editingElement),s=ar(),u="rtl"===document.documentElement.getAttribute("dir"),d=(0,ie.$b)(n.activeTool.type)||i.some((function(e){return(0,ie.$b)(e.type)&&!(0,I.Qm)(e.backgroundColor)})),f=(0,ie.$b)(n.activeTool.type)||i.some((function(e){return(0,ie.$b)(e.type)})),p=1===i.length||a,h=(null===(t=i[0])||void 0===t?void 0:t.type)||null,m=Ze(i);try{for(m.s();!(l=m.n()).done;){if(l.value.type!==h){h=null;break}}}catch(e){m.e(e)}finally{m.f()}return(0,P.jsxs)("div",{className:"panelColumn",children:[(0,P.jsx)("div",{children:((0,Ie.PD)(n.activeTool.type)&&"image"!==n.activeTool.type&&"image"!==h||i.some((function(e){return(0,Ie.PD)(e.type)})))&&o("changeStrokeColor")}),f&&(0,P.jsx)("div",{children:o("changeBackgroundColor")}),d&&o("changeFillStyle"),((0,ie.Zd)(n.activeTool.type)||i.some((function(e){return(0,ie.Zd)(e.type)})))&&o("changeStrokeWidth"),("freedraw"===n.activeTool.type||i.some((function(e){return"freedraw"===e.type})))&&o("changeStrokeShape"),((0,ie.M9)(n.activeTool.type)||i.some((function(e){return(0,ie.M9)(e.type)})))&&(0,P.jsxs)(P.Fragment,{children:[o("changeStrokeStyle"),o("changeSloppiness")]}),((0,ie.sh)(n.activeTool.type)||i.some((function(e){return(0,ie.sh)(e.type)})))&&(0,P.jsx)(P.Fragment,{children:o("changeRoundness")}),((0,ie.bZ)(n.activeTool.type)||i.some((function(e){return(0,ie.bZ)(e.type)})))&&(0,P.jsxs)(P.Fragment,{children:[o("changeFontSize"),o("changeFontFamily"),(0,Pe.aV)(i)&&o("changeTextAlign")]}),(0,Pe.cn)(i)&&o("changeVerticalAlign"),((0,ie.Un)(n.activeTool.type)||i.some((function(e){return(0,ie.Un)(e.type)})))&&(0,P.jsx)(P.Fragment,{children:o("changeArrowhead")}),o("changeOpacity"),(0,P.jsxs)("fieldset",{children:[(0,P.jsx)("legend",{children:(0,S.t)("labels.layers")}),(0,P.jsxs)("div",{className:"buttonList",children:[o("sendToBack"),o("sendBackward"),o("bringToFront"),o("bringForward")]})]}),i.length>1&&!a&&(0,P.jsxs)("fieldset",{children:[(0,P.jsx)("legend",{children:(0,S.t)("labels.align")}),(0,P.jsxs)("div",{className:"buttonList",children:[u?(0,P.jsxs)(P.Fragment,{children:[o("alignRight"),o("alignHorizontallyCentered"),o("alignLeft")]}):(0,P.jsxs)(P.Fragment,{children:[o("alignLeft"),o("alignHorizontallyCentered"),o("alignRight")]}),i.length>2&&o("distributeHorizontally"),(0,P.jsx)("div",{style:{flexBasis:"100%",height:0}}),(0,P.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[o("alignTop"),o("alignVerticallyCentered"),o("alignBottom"),i.length>2&&o("distributeVertically")]})]})]}),!c&&i.length>0&&(0,P.jsxs)("fieldset",{children:[(0,P.jsx)("legend",{children:(0,S.t)("labels.actions")}),(0,P.jsxs)("div",{className:"buttonList",children:[!s.isMobile&&o("duplicateSelection"),!s.isMobile&&o("deleteSelectedElements"),o("group"),o("ungroup"),p&&o("hyperlink")]})]})]})},Ne=function(e){var t=e.canvas,n=e.activeTool,r=e.setAppState,o=e.onImageAction,i=e.appState;return(0,P.jsx)(P.Fragment,{children:ce.map((function(e,a){var l=e.value,c=e.icon,s=e.key,u=e.numericKey,d=e.fillable,f=(0,S.t)("toolBar.".concat(l)),p=s&&(0,I.Oo)("string"==typeof s?s:s[0]),h=p?"".concat(p," ").concat((0,S.t)("helpDialog.or")," ").concat(u):"".concat(u);return(0,P.jsx)(j.V,{className:(0,x.Z)("Shape",{fillable:d}),type:"radio",icon:c,checked:n.type===l,name:"editor-current-shape",title:"".concat((0,I.Oo)(f)," — ").concat(h),keyBindingLabel:u||p,"aria-label":(0,I.Oo)(f),"aria-keyshortcuts":h,"data-testid":"toolbar-".concat(l),onPointerDown:function(e){var t=e.pointerType;i.penDetected||"pen"!==t||r({penDetected:!0,penMode:!0})},onChange:function(e){var n=e.pointerType;i.activeTool.type!==l&&(0,L.L)("toolbar",l,"ui");var a=(0,I.Om)(i,{type:l});r({activeTool:a,multiElement:null,selectedElementIds:{}}),(0,I.Uk)(t,Le(Le({},i),{},{activeTool:a})),"image"===l&&o({pointerType:n})}},l)}))})},Be=function(e){var t=e.renderAction;e.zoom;return(0,P.jsx)(Ce.Z.Col,{gap:1,className:"zoom-actions",children:(0,P.jsxs)(Ce.Z.Row,{align:"center",children:[t("zoomOut"),t("resetZoom"),t("zoomIn")]})})},He=function(e){var t=e.renderAction,n=e.className;return(0,P.jsxs)("div",{className:"undo-redo-buttons ".concat(n),children:[(0,P.jsx)("div",{className:"undo-button-container",children:(0,P.jsx)(Te.u,{label:(0,S.t)("buttons.undo"),children:t("undo")})}),(0,P.jsx)("div",{className:"redo-button-container",children:(0,P.jsxs)(Te.u,{label:(0,S.t)("buttons.redo"),children:[" ",t("redo")]})})]})},We=function(e){var t=e.actionManager,n=e.showExitZenModeBtn;return(0,P.jsx)("button",{className:(0,x.Z)("disable-zen-mode",{"disable-zen-mode--visible":n}),onClick:function(){return t.executeAction(k.JN)},children:(0,S.t)("buttons.exitZenMode")})},Fe=function(e){var t=e.renderAction,n=e.className;return(0,P.jsx)("div",{className:"finalize-button ".concat(n),children:t("finalize",{size:"small"})})},Ue=n(8396),Ke=function(e){var t=e.children,n=e.onClose,r=(0,g.useState)(!!t),i=(0,o.Z)(r,2),a=i[0],l=i[1],c=lr().container,s=v().useCallback((function(){l(!1),n&&n(),null==c||c.focus()}),[n,c]);return(0,P.jsx)(P.Fragment,{children:a&&(0,P.jsx)(Ue.V,{small:!0,onCloseRequest:s,title:(0,S.t)("errorDialog.title"),children:(0,P.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:t})})})},Ye=n(434),Ve=n(5284),Ge=n(3807),Xe=n(1393),qe=n(3024),Je=n(7955),$e={};$e.styleTagTransform=we(),$e.setAttributes=ve(),$e.insert=me().bind(null,"head"),$e.domAPI=pe(),$e.insertStyleElement=ye();de()(Je.Z,$e),Je.Z&&Je.Z.locals&&Je.Z.locals;var Qe="filter"in document.createElement("canvas").getContext("2d"),et=function(){return(0,P.jsxs)("div",{children:[(0,P.jsx)("h3",{children:(0,S.t)("canvasError.cannotShowPreview")}),(0,P.jsx)("p",{children:(0,P.jsx)("span",{children:(0,S.t)("canvasError.canvasTooBig")})}),(0,P.jsxs)("em",{children:["(",(0,S.t)("canvasError.canvasTooBigTip"),")"]})]})},tt=function(e){var t,n=e.children,r=e.title,o=e.onClick,i=e.color,a=e.shade,l=void 0===a?6:a;return(0,P.jsx)("button",{className:"ExportDialog-imageExportButton",style:(t={},(0,p.Z)(t,"--button-color",Ve[i][l]),(0,p.Z)(t,"--button-color-darker",Ve[i][l+1]),(0,p.Z)(t,"--button-color-darkest",Ve[i][l+2]),t),title:r,"aria-label":r,onClick:o,children:n})},nt=function(e){var t=e.elements,n=e.appState,r=e.files,i=e.exportPadding,a=void 0===i?T.qy:i,l=e.actionManager,c=e.onExportToPng,s=e.onExportToSvg,u=e.onExportToClipboard,d=(0,ie.N)(t,n),f=(0,g.useState)(d),p=(0,o.Z)(f,2),h=p[0],m=p[1],v=(0,g.useRef)(null),b=(0,g.useState)(null),y=(0,o.Z)(b,2),x=y[0],w=y[1],k=h?(0,ie.eD)(t,n,!0):t;return(0,g.useEffect)((function(){m(d)}),[d]),(0,g.useEffect)((function(){var e=v.current;if(e){var t=e.offsetWidth;t&&(0,qe.NL)({elements:k,appState:n,files:r,exportPadding:a,maxWidthOrHeight:t}).then((function(t){return w(null),(0,Ye._c)(t).then((function(){e.replaceChildren(t)}))})).catch((function(e){console.error(e),w(e)}))}}),[n,r,k,a]),(0,P.jsxs)("div",{className:"ExportDialog",children:[(0,P.jsx)("div",{className:"ExportDialog__preview",ref:v,children:x&&(0,P.jsx)(et,{})}),Qe&&l.renderAction("exportWithDarkMode"),(0,P.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr"},children:(0,P.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(190px, 1fr))",overflow:"hidden"},children:[l.renderAction("changeExportBackground"),d&&(0,P.jsx)(Ge.o,{checked:h,onChange:function(e){return m(e)},children:(0,S.t)("labels.onlySelected")}),l.renderAction("changeExportEmbedScene")]})}),(0,P.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:".6em"},children:[(0,P.jsx)(Ce.Z.Row,{gap:2,children:l.renderAction("changeExportScale")}),(0,P.jsx)("p",{style:{marginLeft:"1em",userSelect:"none"},children:(0,S.t)("buttons.scale")})]}),(0,P.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",margin:".6em 0"},children:!Xe.kr&&l.renderAction("changeProjectName")}),(0,P.jsxs)(Ce.Z.Row,{gap:2,justifyContent:"center",style:{margin:"2em 0"},children:[(0,P.jsx)(tt,{color:"indigo",title:(0,S.t)("buttons.exportToPng"),"aria-label":(0,S.t)("buttons.exportToPng"),onClick:function(){return c(k)},children:"PNG"}),(0,P.jsx)(tt,{color:"red",title:(0,S.t)("buttons.exportToSvg"),"aria-label":(0,S.t)("buttons.exportToSvg"),onClick:function(){return s(k)},children:"SVG"}),(B.vt||T.vU)&&(0,P.jsx)(tt,{title:(0,S.t)("buttons.copyPngToClipboard"),onClick:function(){return u(k)},color:"gray",shade:7,children:E.BR})]})]})},rt=function(e){var t=e.elements,n=e.appState,r=e.setAppState,o=e.files,i=e.exportPadding,a=void 0===i?T.qy:i,l=e.actionManager,c=e.onExportToPng,s=e.onExportToSvg,u=e.onExportToClipboard,d=v().useCallback((function(){r({openDialog:null})}),[r]);return(0,P.jsx)(P.Fragment,{children:"imageExport"===n.openDialog&&(0,P.jsx)(Ue.V,{onCloseRequest:d,title:(0,S.t)("buttons.exportImage"),children:(0,P.jsx)(nt,{elements:t,appState:n,files:o,exportPadding:a,actionManager:l,onExportToPng:c,onExportToSvg:s,onExportToClipboard:u,onCloseRequest:d})})})},ot=n(3195),it={};it.styleTagTransform=we(),it.setAttributes=ve(),it.insert=me().bind(null,"head"),it.domAPI=pe(),it.insertStyleElement=ye();de()(ot.Z,it),ot.Z&&ot.Z.locals&&ot.Z.locals;var at=function(e){var t=e.children,n=e.side,r=e.className;return(0,P.jsx)("div",{className:(0,x.Z)("FixedSideContainer","FixedSideContainer_side_".concat(n),r),children:t})},lt=n(1587),ct={};ct.styleTagTransform=we(),ct.setAttributes=ve(),ct.insert=me().bind(null,"head"),ct.domAPI=pe(),ct.insertStyleElement=ye();de()(lt.Z,ct),lt.Z&&lt.Z.locals&&lt.Z.locals;var st=function(e){var t=function(e){var t=e.appState,n=e.elements,r=e.isMobile,o=e.device,i=t.activeTool,a=t.isResizing,l=t.isRotating,c=t.lastPointerDownWith,s=null!==t.multiElement;if(t.openSidebar&&!o.canDeviceFitSidebar)return null;if((0,N.EN)(t))return(0,S.t)("hints.eraserRevert");if("arrow"===i.type||"line"===i.type)return s?(0,S.t)("hints.linearElementMulti"):(0,S.t)("hints.linearElement");if("freedraw"===i.type)return(0,S.t)("hints.freeDraw");if("text"===i.type)return(0,S.t)("hints.text");if("image"===t.activeTool.type&&t.pendingImageElementId)return(0,S.t)("hints.placeImage");var u=(0,ie.eD)(n,t);if(a&&"mouse"===c&&1===u.length){var d=u[0];return(0,V.bt)(d)&&2===d.points.length?(0,S.t)("hints.lockAngle"):(0,V.pC)(d)?(0,S.t)("hints.resizeImage"):(0,S.t)("hints.resize")}if(l&&"mouse"===c)return(0,S.t)("hints.rotate");if(1===u.length&&(0,V.iB)(u[0]))return(0,S.t)("hints.text_selected");if(t.editingElement&&(0,V.iB)(t.editingElement))return(0,S.t)("hints.text_editing");if("selection"===i.type){var f;if("selection"===(null===(f=t.draggingElement)||void 0===f?void 0:f.type)&&!t.editingElement&&!t.editingLinearElement)return(0,S.t)("hints.deepBoxSelect");if(!u.length&&!r)return(0,S.t)("hints.canvasPanning")}if(1===u.length){if((0,V.bt)(u[0]))return t.editingLinearElement?t.editingLinearElement.selectedPointsIndices?(0,S.t)("hints.lineEditor_pointSelected"):(0,S.t)("hints.lineEditor_nothingSelected"):(0,S.t)("hints.lineEditor_info");if((0,V.mG)(u[0]))return(0,S.t)("hints.bindTextToElement")}return null}({appState:e.appState,elements:e.elements,isMobile:e.isMobile,device:e.device});return t?(t=(0,I.uY)(t),(0,P.jsx)("div",{className:"HintViewer",children:(0,P.jsx)("span",{children:t})})):null},ut=n(1881),dt=n(5440),ft=(n(5422),{CHECKED:E.FC,UNCHECKED:E._C}),pt=function(e){return(0,P.jsxs)("label",{className:(0,x.Z)("ToolIcon ToolIcon__lock","ToolIcon_size_".concat("medium"),{"is-mobile":e.isMobile}),title:"".concat(e.title," — Q"),children:[(0,P.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title,"data-testid":"toolbar-lock"}),(0,P.jsx)("div",{className:"ToolIcon__icon",children:e.checked?ft.CHECKED:ft.UNCHECKED})]})},ht=["heading","children"];function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vt=function(e){var t=e.heading,n=e.children,r=(0,_e.Z)(e,ht),o=lr().id,i=(0,P.jsx)("h2",{className:"visually-hidden",id:"".concat(o,"-").concat(t,"-title"),children:(0,S.t)("headings.".concat(t))});return(0,P.jsx)("section",gt(gt({},r),{},{"aria-labelledby":"".concat(o,"-").concat(t,"-title"),children:"function"==typeof n?n(i):(0,P.jsxs)(P.Fragment,{children:[i,n]})}))},bt=n(756),yt=function(e){return e.penDetected?(0,P.jsxs)("label",{className:(0,x.Z)("ToolIcon ToolIcon__penMode","ToolIcon_size_".concat("medium"),{"is-mobile":e.isMobile}),title:"".concat(e.title),children:[(0,P.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),(0,P.jsx)("div",{className:"ToolIcon__icon",children:E.tb})]}):null},xt=n(8925),wt=n(2681),kt={};kt.styleTagTransform=we(),kt.setAttributes=ve(),kt.insert=me().bind(null,"head"),kt.domAPI=pe(),kt.insertStyleElement=ye();de()(wt.Z,kt),wt.Z&&wt.Z.locals&&wt.Z.locals;var Et=function(e){var t,n=(0,xt.KP)(e.elements),r=(0,ie.Zs)(e.elements,e.appState),o=(0,xt.KP)(r);return(0,P.jsx)("div",{className:"Stats",children:(0,P.jsxs)(ut.W,{padding:2,children:[(0,P.jsx)("div",{className:"close",onClick:e.onClose,children:E.Tw}),(0,P.jsx)("h3",{children:(0,S.t)("stats.title")}),(0,P.jsx)("table",{children:(0,P.jsxs)("tbody",{children:[(0,P.jsx)("tr",{children:(0,P.jsx)("th",{colSpan:2,children:(0,S.t)("stats.scene")})}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.elements")}),(0,P.jsx)("td",{children:e.elements.length})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.width")}),(0,P.jsx)("td",{children:Math.round(n[2])-Math.round(n[0])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.height")}),(0,P.jsx)("td",{children:Math.round(n[3])-Math.round(n[1])})]}),1===r.length&&(0,P.jsx)("tr",{children:(0,P.jsx)("th",{colSpan:2,children:(0,S.t)("stats.element")})}),r.length>1&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("tr",{children:(0,P.jsx)("th",{colSpan:2,children:(0,S.t)("stats.selected")})}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.elements")}),(0,P.jsx)("td",{children:r.length})]})]}),r.length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:"x"}),(0,P.jsx)("td",{children:Math.round(o[0])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:"y"}),(0,P.jsx)("td",{children:Math.round(o[1])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.width")}),(0,P.jsx)("td",{children:Math.round(o[2]-o[0])})]}),(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.height")}),(0,P.jsx)("td",{children:Math.round(o[3]-o[1])})]})]}),1===r.length&&(0,P.jsxs)("tr",{children:[(0,P.jsx)("td",{children:(0,S.t)("stats.angle")}),(0,P.jsx)("td",{children:"".concat(Math.round(180*r[0].angle/Math.PI),"°")})]}),null===(t=e.renderCustomStats)||void 0===t?void 0:t.call(e,e.elements,e.appState)]})})]})})},jt=function(e){return(0,P.jsx)(j.V,{className:(0,x.Z)("Shape",{fillable:!1}),type:"radio",icon:E.Hk,name:"editor-current-shape",checked:e.checked,title:"".concat(e.title," — H"),keyBindingLabel:e.isMobile?void 0:O.tW.H.toLocaleUpperCase(),"aria-label":"".concat(e.title," — H"),"aria-keyshortcuts":O.tW.H,"data-testid":"toolbar-hand",onChange:function(){var t;return null===(t=e.onChange)||void 0===t?void 0:t.call(e)}})},St=n(7681);function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var _t=function(e){var t=e.appState,n=e.elements,r=e.actionManager,o=e.setAppState,i=e.onLockToggle,a=e.onHandToolToggle,l=e.onPenModeToggle,c=e.canvas,s=e.onImageAction,u=e.renderTopRightUI,d=e.renderCustomStats,f=e.renderSidebars,h=e.device,m=e.renderWelcomeScreen,g=(0,St.R6)(),v=g.WelcomeScreenCenterTunnel,b=g.MainMenuTunnel,y=g.DefaultSidebarTriggerTunnel;return(0,P.jsxs)(P.Fragment,{children:[f(),!t.viewModeEnabled&&(0,P.jsxs)(at,{side:"top",className:"App-top-bar",children:[m&&(0,P.jsx)(v.Out,{}),(0,P.jsx)(vt,{heading:"shapes",children:function(e){return(0,P.jsx)(Ce.Z.Col,{gap:4,align:"center",children:(0,P.jsxs)(Ce.Z.Row,{gap:1,className:"App-toolbar-container",children:[(0,P.jsxs)(ut.W,{padding:1,className:"App-toolbar App-toolbar--mobile",children:[e,(0,P.jsx)(Ce.Z.Row,{gap:1,children:(0,P.jsx)(Ne,{appState:t,canvas:c,activeTool:t.activeTool,setAppState:o,onImageAction:function(e){var t=e.pointerType;s({insertOnCanvasDirectly:"mouse"!==t})}})})]}),u&&u(!0,t),(0,P.jsxs)("div",{className:"mobile-misc-tools-container",children:[!t.viewModeEnabled&&(0,P.jsx)(y.Out,{}),(0,P.jsx)(yt,{checked:t.penMode,onChange:l,title:(0,S.t)("toolBar.penMode"),isMobile:!0,penDetected:t.penDetected}),(0,P.jsx)(pt,{checked:t.activeTool.locked,onChange:i,title:(0,S.t)("toolBar.lock"),isMobile:!0}),(0,P.jsx)(jt,{checked:(0,N.l$)(t),onChange:function(){return a()},title:(0,S.t)("toolBar.hand"),isMobile:!0})]})]})})}}),(0,P.jsx)(st,{appState:t,elements:n,isMobile:!0,device:h})]}),!t.openMenu&&t.showStats&&(0,P.jsx)(Et,{appState:t,setAppState:o,elements:n,onClose:function(){r.executeAction(k.u0)},renderCustomStats:d}),(0,P.jsx)("div",{className:"App-bottom-bar",style:{marginBottom:bt.nn+2*bt.WM,marginLeft:bt.nn+2*bt.WM,marginRight:bt.nn+2*bt.WM},children:(0,P.jsxs)(ut.W,{padding:0,children:["shape"===t.openMenu&&!t.viewModeEnabled&&(0,U.RT)(t,n)?(0,P.jsx)(vt,{className:"App-mobile-menu",heading:"selectedShapeActions",children:(0,P.jsx)(Re,{appState:t,elements:n,renderAction:r.renderAction})}):null,(0,P.jsxs)("footer",{className:"App-toolbar",children:[t.viewModeEnabled?(0,P.jsx)("div",{className:"App-toolbar-content",children:(0,P.jsx)(b.Out,{})}):(0,P.jsxs)("div",{className:"App-toolbar-content",children:[(0,P.jsx)(b.Out,{}),r.renderAction("toggleEditMenu"),r.renderAction("undo"),r.renderAction("redo"),r.renderAction(t.multiElement?"finalize":"duplicateSelection"),r.renderAction("deleteSelectedElements")]}),t.scrolledOutside&&!t.openMenu&&!t.openSidebar&&(0,P.jsx)("button",{className:"scroll-back-to-content",onClick:function(){o((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,ie.W)(n,e,c))}))},children:(0,S.t)("buttons.scrollBackToContent")})]})]})})]})},Ct=n(5674),It=n(4162),Tt=n(8461),Pt={};Pt.styleTagTransform=we(),Pt.setAttributes=ve(),Pt.insert=me().bind(null,"head"),Pt.domAPI=pe(),Pt.insertStyleElement=ye();de()(Tt.Z,Pt),Tt.Z&&Tt.Z.locals&&Tt.Z.locals;var Mt=function(e){var t=(0,g.useRef)(null),n=(0,g.useState)(null),r=(0,o.Z)(n,2),i=r[0],l=r[1];return(0,g.useLayoutEffect)((function(){if(e.spreadsheet){var n,r=(0,Ct.ps)(e.chartType,e.spreadsheet,0,0);l(r);var o=t.current;return(0,a.Z)(m().mark((function t(){var i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,It.$D)(r,{exportBackground:!1,viewBackgroundColor:Ve.white},null);case 2:n=t.sent,null===(i=n.querySelector(".style-fonts"))||void 0===i||i.remove(),o.replaceChildren(),o.appendChild(n),e.selected&&o.parentNode.focus();case 7:case"end":return t.stop()}}),t)})))(),function(){o.replaceChildren()}}}),[e.spreadsheet,e.chartType,e.selected]),(0,P.jsx)("button",{className:"ChartPreview",onClick:function(){i&&e.onClick(e.chartType,i)},children:(0,P.jsx)("div",{ref:t})})},Dt=function(e){var t=e.setAppState,n=e.appState,r=e.onClose,o=or().onInsertElements,i=v().useCallback((function(){r&&r()}),[r]),a=function(e,n){o(n),(0,L.L)("magic","chart",e),t({currentChartType:e,pasteDialog:{shown:!1,data:null}})};return(0,P.jsx)(Ue.V,{small:!0,onCloseRequest:i,title:(0,S.t)("labels.pasteCharts"),className:"PasteChartDialog",autofocus:!1,children:(0,P.jsxs)("div",{className:"container",children:[(0,P.jsx)(Mt,{chartType:"bar",spreadsheet:n.pasteDialog.data,selected:"bar"===n.currentChartType,onClick:a}),(0,P.jsx)(Mt,{chartType:"line",spreadsheet:n.pasteDialog.data,selected:"line"===n.currentChartType,onClick:a})]})})},At=n(2978),Lt={};Lt.styleTagTransform=we(),Lt.setAttributes=ve(),Lt.insert=me().bind(null,"head"),Lt.domAPI=pe(),Lt.insertStyleElement=ye();de()(At.Z,Lt),At.Z&&At.Z.locals&&At.Z.locals;function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var zt=m().mark(Ft);function Rt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nt(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Bt=function(){return(0,P.jsxs)("div",{className:"HelpDialog__header",children:[(0,P.jsxs)("a",{className:"HelpDialog__btn",href:"https://github.com/excalidraw/excalidraw#documentation",target:"_blank",rel:"noopener noreferrer",children:[(0,S.t)("helpDialog.documentation"),(0,P.jsx)("div",{className:"HelpDialog__link-icon",children:E.h0})]}),(0,P.jsxs)("a",{className:"HelpDialog__btn",href:"https://blog.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:[(0,S.t)("helpDialog.blog"),(0,P.jsx)("div",{className:"HelpDialog__link-icon",children:E.h0})]}),(0,P.jsxs)("a",{className:"HelpDialog__btn",href:"https://github.com/excalidraw/excalidraw/issues",target:"_blank",rel:"noopener noreferrer",children:[(0,S.t)("helpDialog.github"),(0,P.jsx)("div",{className:"HelpDialog__link-icon",children:E.h0})]})]})},Ht=function(e){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("h3",{children:e.title}),(0,P.jsx)("div",{className:"HelpDialog__islands-container",children:e.children})]})},Wt=function(e){return(0,P.jsxs)("div",{className:"HelpDialog__island ".concat(e.className),children:[(0,P.jsx)("h4",{className:"HelpDialog__island-title",children:e.caption}),(0,P.jsx)("div",{className:"HelpDialog__island-content",children:e.children})]})};function Ft(e,t){var n,r,o,i;return m().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:n=!0,r=Rt(e),a.prev=2,r.s();case 4:if((o=r.n()).done){a.next=14;break}if(i=o.value,n){a.next=9;break}return a.next=9,t;case 9:return n=!1,a.next=12,i;case 12:a.next=4;break;case 14:a.next=19;break;case 16:a.prev=16,a.t0=a.catch(2),r.e(a.t0);case 19:return a.prev=19,r.f(),a.finish(19);case 22:case"end":return a.stop()}}),zt,null,[[2,16,19,22]])}var Ut=function(e){var t=e.label,n=e.shortcuts,r=e.isOr,o=void 0===r||r,a=n.map((function(e){return(e.endsWith("++")?[].concat((0,i.Z)(e.slice(0,-2).split("+")),["+"]):e.split("+")).map((function(e){return(0,P.jsx)(Kt,{children:(t=e,t.replace(/\b[a-z]\b/,(function(e){return e.toUpperCase()})))},e);var t}))}));return(0,P.jsxs)("div",{className:"HelpDialog__shortcut",children:[(0,P.jsx)("div",{children:t}),(0,P.jsx)("div",{className:"HelpDialog__key-container",children:(0,i.Z)(Ft(a,o?(0,S.t)("helpDialog.or"):null))})]})},Kt=function(e){return(0,P.jsx)("kbd",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:"HelpDialog__key"},e))},Yt=function(e){var t=e.onClose,n=v().useCallback((function(){t&&t()}),[t]);return(0,P.jsx)(P.Fragment,{children:(0,P.jsxs)(Ue.V,{onCloseRequest:n,title:(0,S.t)("helpDialog.title"),className:"HelpDialog",children:[(0,P.jsx)(Bt,{}),(0,P.jsxs)(Ht,{title:(0,S.t)("helpDialog.shortcuts"),children:[(0,P.jsxs)(Wt,{className:"HelpDialog__island--tools",caption:(0,S.t)("helpDialog.tools"),children:[(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.hand"),shortcuts:[O.tW.H]}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.selection"),shortcuts:[O.tW.V,O.tW[1]]}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.rectangle"),shortcuts:[O.tW.R,O.tW[2]]}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.diamond"),shortcuts:[O.tW.D,O.tW[3]]}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.ellipse"),shortcuts:[O.tW.O,O.tW[4]]}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.arrow"),shortcuts:[O.tW.A,O.tW[5]]}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.line"),shortcuts:[O.tW.L,O.tW[6]]}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.freedraw"),shortcuts:[O.tW.P,O.tW[7]]}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.text"),shortcuts:[O.tW.T,O.tW[8]]}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.image"),shortcuts:[O.tW[9]]}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.eraser"),shortcuts:[O.tW.E,O.tW[0]]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.editLineArrowPoints"),shortcuts:[(0,I.uY)("CtrlOrCmd+Enter")]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.editText"),shortcuts:[(0,I.uY)("Enter")]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.textNewLine"),shortcuts:[(0,I.uY)("Enter"),(0,I.uY)("Shift+Enter")]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.textFinish"),shortcuts:[(0,I.uY)("Esc"),(0,I.uY)("CtrlOrCmd+Enter")]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.curvedArrow"),shortcuts:["A",(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click")],isOr:!1}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.curvedLine"),shortcuts:["L",(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click")],isOr:!1}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.lock"),shortcuts:[O.tW.Q]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.preventBinding"),shortcuts:[(0,I.uY)("CtrlOrCmd")]}),(0,P.jsx)(Ut,{label:(0,S.t)("toolBar.link"),shortcuts:[(0,I.uY)("CtrlOrCmd+K")]})]}),(0,P.jsxs)(Wt,{className:"HelpDialog__island--view",caption:(0,S.t)("helpDialog.view"),children:[(0,P.jsx)(Ut,{label:(0,S.t)("buttons.zoomIn"),shortcuts:[(0,I.uY)("CtrlOrCmd++")]}),(0,P.jsx)(Ut,{label:(0,S.t)("buttons.zoomOut"),shortcuts:[(0,I.uY)("CtrlOrCmd+-")]}),(0,P.jsx)(Ut,{label:(0,S.t)("buttons.resetZoom"),shortcuts:[(0,I.uY)("CtrlOrCmd+0")]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.zoomToFit"),shortcuts:["Shift+1"]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.zoomToSelection"),shortcuts:["Shift+2"]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.movePageUpDown"),shortcuts:["PgUp/PgDn"]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.movePageLeftRight"),shortcuts:["Shift+PgUp/PgDn"]}),(0,P.jsx)(Ut,{label:(0,S.t)("buttons.fullScreen"),shortcuts:["F"]}),(0,P.jsx)(Ut,{label:(0,S.t)("buttons.zenMode"),shortcuts:[(0,I.uY)("Alt+Z")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.showGrid"),shortcuts:[(0,I.uY)("CtrlOrCmd+'")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.viewMode"),shortcuts:[(0,I.uY)("Alt+R")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.toggleTheme"),shortcuts:[(0,I.uY)("Alt+Shift+D")]}),(0,P.jsx)(Ut,{label:(0,S.t)("stats.title"),shortcuts:[(0,I.uY)("Alt+/")]})]}),(0,P.jsxs)(Wt,{className:"HelpDialog__island--editor",caption:(0,S.t)("helpDialog.editor"),children:[(0,P.jsx)(Ut,{label:(0,S.t)("labels.moveCanvas"),shortcuts:[(0,I.uY)("Space+".concat((0,S.t)("helpDialog.drag"))),(0,I.uY)("Wheel+".concat((0,S.t)("helpDialog.drag")))],isOr:!0}),(0,P.jsx)(Ut,{label:(0,S.t)("buttons.clearReset"),shortcuts:[(0,I.uY)("CtrlOrCmd+Delete")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.delete"),shortcuts:[(0,I.uY)("Delete")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.cut"),shortcuts:[(0,I.uY)("CtrlOrCmd+X")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.copy"),shortcuts:[(0,I.uY)("CtrlOrCmd+C")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.paste"),shortcuts:[(0,I.uY)("CtrlOrCmd+V")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.pasteAsPlaintext"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+V")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.selectAll"),shortcuts:[(0,I.uY)("CtrlOrCmd+A")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.multiSelect"),shortcuts:[(0,I.uY)("Shift+".concat((0,S.t)("helpDialog.click")))]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.deepSelect"),shortcuts:[(0,I.uY)("CtrlOrCmd+".concat((0,S.t)("helpDialog.click")))]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.deepBoxSelect"),shortcuts:[(0,I.uY)("CtrlOrCmd+".concat((0,S.t)("helpDialog.drag")))]}),(B.vt||T.vU)&&(0,P.jsx)(Ut,{label:(0,S.t)("labels.copyAsPng"),shortcuts:[(0,I.uY)("Shift+Alt+C")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.copyStyles"),shortcuts:[(0,I.uY)("CtrlOrCmd+Alt+C")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.pasteStyles"),shortcuts:[(0,I.uY)("CtrlOrCmd+Alt+V")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.sendToBack"),shortcuts:[T.Um?(0,I.uY)("CtrlOrCmd+Alt+["):(0,I.uY)("CtrlOrCmd+Shift+[")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.bringToFront"),shortcuts:[T.Um?(0,I.uY)("CtrlOrCmd+Alt+]"):(0,I.uY)("CtrlOrCmd+Shift+]")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.sendBackward"),shortcuts:[(0,I.uY)("CtrlOrCmd+[")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.bringForward"),shortcuts:[(0,I.uY)("CtrlOrCmd+]")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.alignTop"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+Up")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.alignBottom"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+Down")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.alignLeft"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+Left")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.alignRight"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+Right")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.duplicateSelection"),shortcuts:[(0,I.uY)("CtrlOrCmd+D"),(0,I.uY)("Alt+".concat((0,S.t)("helpDialog.drag")))]}),(0,P.jsx)(Ut,{label:(0,S.t)("helpDialog.toggleElementLock"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+L")]}),(0,P.jsx)(Ut,{label:(0,S.t)("buttons.undo"),shortcuts:[(0,I.uY)("CtrlOrCmd+Z")]}),(0,P.jsx)(Ut,{label:(0,S.t)("buttons.redo"),shortcuts:T.ED?[(0,I.uY)("CtrlOrCmd+Y"),(0,I.uY)("CtrlOrCmd+Shift+Z")]:[(0,I.uY)("CtrlOrCmd+Shift+Z")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.group"),shortcuts:[(0,I.uY)("CtrlOrCmd+G")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.ungroup"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+G")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.flipHorizontal"),shortcuts:[(0,I.uY)("Shift+H")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.flipVertical"),shortcuts:[(0,I.uY)("Shift+V")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.showStroke"),shortcuts:[(0,I.uY)("S")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.showBackground"),shortcuts:[(0,I.uY)("G")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.decreaseFontSize"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+<")]}),(0,P.jsx)(Ut,{label:(0,S.t)("labels.increaseFontSize"),shortcuts:[(0,I.uY)("CtrlOrCmd+Shift+>")]})]})]})]})})},Vt=n(6773),Gt=n(8671),Xt=n(4241),qt={};qt.styleTagTransform=we(),qt.setAttributes=ve(),qt.insert=me().bind(null,"head"),qt.domAPI=pe(),qt.insertStyleElement=ye();de()(Xt.Z,qt),Xt.Z&&Xt.Z.locals&&Xt.Z.locals;var Jt=function(e){var t,n=e.children,r=e.color;return(0,P.jsx)("div",{className:"Card",style:(t={},(0,p.Z)(t,"--card-color","primary"===r?"var(--color-primary)":Ve[r][7]),(0,p.Z)(t,"--card-color-darker","primary"===r?"var(--color-primary-darker)":Ve[r][8]),(0,p.Z)(t,"--card-color-darkest","primary"===r?"var(--color-primary-darkest)":Ve[r][9]),t),children:n})},$t=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.actionManager,i=e.exportOpts,a=e.canvas,l=i.onExportToBackend;return(0,P.jsx)("div",{className:"ExportDialog ExportDialog--json",children:(0,P.jsxs)("div",{className:"ExportDialog-cards",children:[i.saveFileToDisk&&(0,P.jsxs)(Jt,{color:"lime",children:[(0,P.jsx)("div",{className:"Card-icon",children:E.TP}),(0,P.jsx)("h2",{children:(0,S.t)("exportDialog.disk_title")}),(0,P.jsxs)("div",{className:"Card-details",children:[(0,S.t)("exportDialog.disk_details"),!Xe.kr&&o.renderAction("changeProjectName")]}),(0,P.jsx)(j.V,{className:"Card-button",type:"button",title:(0,S.t)("exportDialog.disk_button"),"aria-label":(0,S.t)("exportDialog.disk_button"),showAriaLabel:!0,onClick:function(){o.executeAction(Gt.mM,"ui")}})]}),l&&(0,P.jsxs)(Jt,{color:"pink",children:[(0,P.jsx)("div",{className:"Card-icon",children:E.xP}),(0,P.jsx)("h2",{children:(0,S.t)("exportDialog.link_title")}),(0,P.jsx)("div",{className:"Card-details",children:(0,S.t)("exportDialog.link_details")}),(0,P.jsx)(j.V,{className:"Card-button",type:"button",title:(0,S.t)("exportDialog.link_button"),"aria-label":(0,S.t)("exportDialog.link_button"),showAriaLabel:!0,onClick:function(){l(t,n,r,a),(0,L.L)("export","link","ui (".concat((0,I.$h)(),")"))}})]}),i.renderCustomUI&&i.renderCustomUI(t,n,r,a)]})})},Qt=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.actionManager,i=e.exportOpts,a=e.canvas,l=e.setAppState,c=v().useCallback((function(){l({openDialog:null})}),[l]);return(0,P.jsx)(P.Fragment,{children:"jsonExport"===n.openDialog&&(0,P.jsx)(Ue.V,{onCloseRequest:c,title:(0,S.t)("buttons.export"),children:(0,P.jsx)($t,{elements:t,appState:n,files:r,actionManager:o,onCloseRequest:c,exportOpts:i,canvas:a})})})},en=n(4958),tn=function(e){return(0,P.jsx)("button",{className:"help-icon",onClick:e.onClick,type:"button",title:"".concat((0,S.t)("helpDialog.title")," — ?"),"aria-label":(0,S.t)("helpDialog.title"),children:E.by})},nn=function(e){var t=e.appState,n=e.actionManager,r=e.showExitZenModeBtn,o=e.renderWelcomeScreen,i=(0,St.R6)(),a=i.FooterCenterTunnel,l=i.WelcomeScreenHelpHintTunnel,c=ar(),s=!t.viewModeEnabled&&t.multiElement&&c.isTouchScreen;return(0,P.jsxs)("footer",{role:"contentinfo",className:"layer-ui__wrapper__footer App-menu App-menu_bottom",children:[(0,P.jsx)("div",{className:(0,x.Z)("layer-ui__wrapper__footer-left zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":t.zenModeEnabled}),children:(0,P.jsx)(Ce.Z.Col,{gap:2,children:(0,P.jsxs)(vt,{heading:"canvasActions",children:[(0,P.jsx)(Be,{renderAction:n.renderAction,zoom:t.zoom}),!t.viewModeEnabled&&(0,P.jsx)(He,{renderAction:n.renderAction,className:(0,x.Z)("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":t.zenModeEnabled})}),s&&(0,P.jsx)(Fe,{renderAction:n.renderAction,className:(0,x.Z)("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":t.zenModeEnabled})})]})})}),(0,P.jsx)(a.Out,{}),(0,P.jsx)("div",{className:(0,x.Z)("layer-ui__wrapper__footer-right zen-mode-transition",{"transition-right disable-pointerEvents":t.zenModeEnabled}),children:(0,P.jsxs)("div",{style:{position:"relative"},children:[o&&(0,P.jsx)(l.Out,{}),(0,P.jsx)(tn,{onClick:function(){return n.executeAction(k.jY)}})]})}),(0,P.jsx)(We,{actionManager:n,showExitZenModeBtn:r})]})},rn=nn;nn.displayName="Footer";var on=n(8519),an=n(9487),ln=n(4739),cn=n(6756),sn=n(6798),un=n(96),dn=n(704),fn=n(1434),pn={};pn.styleTagTransform=we(),pn.setAttributes=ve(),pn.insert=me().bind(null,"head"),pn.domAPI=pe(),pn.insertStyleElement=ye();de()(fn.Z,pn),fn.Z&&fn.Z.locals&&fn.Z.locals;var hn=n(9144),mn={};mn.styleTagTransform=we(),mn.setAttributes=ve(),mn.insert=me().bind(null,"head"),mn.domAPI=pe(),mn.insertStyleElement=ye();de()(hn.Z,mn),hn.Z&&hn.Z.locals&&hn.Z.locals;var gn=["suggestedBindings","startBoundElement","cursorButton","scrollX","scrollY"],vn=["canvas","appState"],bn=["canvas","appState"];function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var xn=function(e){var t=e.UIOptions;return(0,P.jsxs)(cn.Z,{__fallback:!0,children:[(0,P.jsx)(cn.Z.DefaultItems.LoadScene,{}),(0,P.jsx)(cn.Z.DefaultItems.SaveToActiveFile,{}),t.canvasActions.export&&(0,P.jsx)(cn.Z.DefaultItems.Export,{}),t.canvasActions.saveAsImage&&(0,P.jsx)(cn.Z.DefaultItems.SaveAsImage,{}),(0,P.jsx)(cn.Z.DefaultItems.Help,{}),(0,P.jsx)(cn.Z.DefaultItems.ClearCanvas,{}),(0,P.jsx)(cn.Z.Separator,{}),(0,P.jsx)(cn.Z.Group,{title:"Excalidraw links",children:(0,P.jsx)(cn.Z.DefaultItems.Socials,{})}),(0,P.jsx)(cn.Z.Separator,{}),(0,P.jsx)(cn.Z.DefaultItems.ToggleTheme,{}),(0,P.jsx)(cn.Z.DefaultItems.ChangeCanvasBackground,{})]})},wn=function(e){var t,n,r=e.actionManager,o=e.appState,i=e.files,l=e.setAppState,c=e.elements,s=e.canvas,u=e.onLockToggle,d=e.onHandToolToggle,f=e.onPenModeToggle,h=e.showExitZenModeBtn,g=e.renderTopRightUI,v=e.renderCustomStats,b=e.UIOptions,y=e.onImageAction,w=e.renderWelcomeScreen,k=e.children,j=ar(),O=(0,St.ZC)(),_=function(){return b.canvasActions.export?(0,P.jsx)(Qt,{elements:c,appState:o,files:i,actionManager:r,exportOpts:b.canvasActions.export,canvas:s,setAppState:l}):null},C=function(){if(!b.canvasActions.saveAsImage)return null;var e=function(e){return function(){var t=(0,a.Z)(m().mark((function t(n){var r;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,L.L)("export",e,"ui"),t.next=3,(0,H.p1)(e,n,o,i,{exportBackground:o.exportBackground,name:o.name,viewBackgroundColor:o.viewBackgroundColor}).catch(I.FG).catch((function(e){console.error(e),l({errorMessage:e.message})}));case 3:r=t.sent,o.exportEmbedScene&&r&&(0,Ye.g8)(r)&&l({fileHandle:r});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()};return(0,P.jsx)(rt,{elements:c,appState:o,setAppState:l,files:i,actionManager:r,onExportToPng:e("png"),onExportToSvg:e("svg"),onExportToClipboard:e("clipboard")})},M=function(){return(0,P.jsx)(dn.O,{__fallback:!0,onDock:function(e){(0,L.L)("sidebar","toggleDock (".concat(e?"dock":"undock",")"),"(".concat(j.isMobile?"mobile":"desktop",")"))}})},D=(0,ln.Dv)(on.t6,an.yE),A=(0,P.jsxs)(P.Fragment,{children:[k,(0,P.jsx)(xn,{UIOptions:b}),(0,P.jsx)(dn.O.Trigger,{__fallback:!0,icon:E.Vq,title:(0,I.Oo)((0,S.t)("toolBar.library")),onToggle:function(e){e&&(0,L.L)("sidebar","".concat(T.Cc.name," (open)"),"button (".concat(j.isMobile?"mobile":"desktop",")"))},tab:T.Cc.defaultTab,children:(0,S.t)("toolBar.library")}),o.isLoading&&(0,P.jsx)(dt.z,{delay:250}),o.errorMessage&&(0,P.jsx)(Ke,{onClose:function(){return l({errorMessage:null})},children:o.errorMessage}),"help"===o.openDialog&&(0,P.jsx)(Yt,{onClose:function(){l({openDialog:null})}}),(0,P.jsx)(sn.o,{}),C(),_(),o.pasteDialog.shown&&(0,P.jsx)(Dt,{setAppState:l,appState:o,onClose:function(){return l({pasteDialog:{shown:!1,data:null}})}}),j.isMobile&&(0,P.jsx)(_t,{appState:o,elements:c,actionManager:r,renderJSONExportDialog:_,renderImageExportDialog:C,setAppState:l,onLockToggle:u,onHandToolToggle:d,onPenModeToggle:f,canvas:s,onImageAction:y,renderTopRightUI:g,renderCustomStats:v,renderSidebars:M,device:j,renderWelcomeScreen:w}),!j.isMobile&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:(0,x.Z)("layer-ui__wrapper",{"disable-pointerEvents":o.draggingElement||o.resizingElement||o.editingElement&&!(0,U.iB)(o.editingElement)}),style:o.openSidebar&&D&&j.canDeviceFitSidebar?{width:"calc(100% - ".concat(T.EE,"px)")}:{},children:[w&&(0,P.jsx)(O.WelcomeScreenCenterTunnel.Out,{}),(n=(0,U.RT)(o,c),(0,P.jsx)(at,{side:"top",children:(0,P.jsxs)("div",{className:"App-menu App-menu_top",children:[(0,P.jsxs)(Ce.Z.Col,{gap:6,className:(0,x.Z)("App-menu_top__left",{"disable-pointerEvents":o.zenModeEnabled}),children:[(0,P.jsxs)("div",{style:{position:"relative"},children:[(0,P.jsx)(O.MainMenuTunnel.Out,{}),w&&(0,P.jsx)(O.WelcomeScreenMenuHintTunnel.Out,{})]}),n&&(0,P.jsx)(vt,{heading:"selectedShapeActions",className:(0,x.Z)("selected-shape-actions zen-mode-transition",{"transition-left":o.zenModeEnabled}),children:(0,P.jsx)(ut.W,{className:T.$C.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:"".concat(o.height-166,"px")},children:(0,P.jsx)(Re,{appState:o,elements:c,renderAction:r.renderAction})})})]}),!o.viewModeEnabled&&(0,P.jsx)(vt,{heading:"shapes",className:"shapes-section",children:function(e){return(0,P.jsxs)("div",{style:{position:"relative"},children:[w&&(0,P.jsx)(O.WelcomeScreenToolbarHintTunnel.Out,{}),(0,P.jsx)(Ce.Z.Col,{gap:4,align:"start",children:(0,P.jsx)(Ce.Z.Row,{gap:1,className:(0,x.Z)("App-toolbar-container",{"zen-mode":o.zenModeEnabled}),children:(0,P.jsxs)(ut.W,{padding:1,className:(0,x.Z)("App-toolbar",{"zen-mode":o.zenModeEnabled}),children:[(0,P.jsx)(st,{appState:o,elements:c,isMobile:j.isMobile,device:j}),e,(0,P.jsxs)(Ce.Z.Row,{gap:1,children:[(0,P.jsx)(yt,{zenModeEnabled:o.zenModeEnabled,checked:o.penMode,onChange:f,title:(0,S.t)("toolBar.penMode"),penDetected:o.penDetected}),(0,P.jsx)(pt,{checked:o.activeTool.locked,onChange:u,title:(0,S.t)("toolBar.lock")}),(0,P.jsx)("div",{className:"App-toolbar__divider"}),(0,P.jsx)(jt,{checked:(0,N.l$)(o),onChange:function(){return d()},title:(0,S.t)("toolBar.hand"),isMobile:!0}),(0,P.jsx)(Ne,{appState:o,canvas:s,activeTool:o.activeTool,setAppState:l,onImageAction:function(e){var t=e.pointerType;y({insertOnCanvasDirectly:"mouse"!==t})}})]})]})})})]})}}),(0,P.jsxs)("div",{className:(0,x.Z)("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":o.zenModeEnabled}),children:[(0,P.jsx)(Vt.Z,{collaborators:o.collaborators}),null==g?void 0:g(j.isMobile,o),!o.viewModeEnabled&&(!D||(null===(t=o.openSidebar)||void 0===t?void 0:t.name)!==T.Cc.name)&&(0,P.jsx)(O.DefaultSidebarTriggerTunnel.Out,{})]})]})})),(0,P.jsx)(rn,{appState:o,actionManager:r,showExitZenModeBtn:h,renderWelcomeScreen:w}),o.showStats&&(0,P.jsx)(Et,{appState:o,setAppState:l,elements:c,onClose:function(){r.executeAction(en.u)},renderCustomStats:v}),o.scrolledOutside&&(0,P.jsx)("button",{className:"scroll-back-to-content",onClick:function(){l((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,ie.W)(c,e,s))}))},children:(0,S.t)("buttons.scrollBackToContent")})]}),M()]})]});return(0,P.jsx)(un.k.Provider,{value:o,children:(0,P.jsx)(ln.zt,{scope:O.jotaiScope,children:(0,P.jsx)(St.A3.Provider,{value:O,children:A})})})},kn=function(e){e.suggestedBindings,e.startBoundElement,e.cursorButton,e.scrollX,e.scrollY;return(0,_e.Z)(e,gn)},En=function(e,t){if(e.children!==t.children)return!1;e.canvas;var n=e.appState,r=(0,_e.Z)(e,vn),o=(t.canvas,t.appState),i=(0,_e.Z)(t,bn);return(0,I.w8)(kn(n),kn(o),{selectedElementIds:I.w8,selectedGroupIds:I.w8})&&(0,I.w8)(r,i)},jn=v().memo(wn,En),Sn=n(9650),On={};On.styleTagTransform=we(),On.setAttributes=ve(),On.insert=me().bind(null,"head"),On.domAPI=pe(),On.insertStyleElement=ye();de()(Sn.Z,On),Sn.Z&&Sn.Z.locals&&Sn.Z.locals;var _n=function(e){var t=e.message,n=e.onClose,r=e.closable,o=void 0!==r&&r,i=e.duration,a=void 0===i?5e3:i,l=(0,g.useRef)(0),c=a!==1/0,s=(0,g.useCallback)((function(){c&&(l.current=window.setTimeout((function(){return n()}),a))}),[n,a,c]);(0,g.useEffect)((function(){if(c)return s(),function(){return clearTimeout(l.current)}}),[s,t,a,c]);var u=c?function(){return clearTimeout(null==l?void 0:l.current)}:void 0,d=c?s:void 0;return(0,P.jsxs)("div",{className:"Toast",onMouseEnter:u,onMouseLeave:d,children:[(0,P.jsx)("p",{className:"Toast__message",children:t}),o&&(0,P.jsx)(j.V,{icon:E.Tw,"aria-label":"close",type:"icon",onClick:n,className:"close"})]})};function Cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tn=(0,R.z)({name:"viewMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!e.viewModeEnabled}},perform:function(e,t){return{appState:In(In({},t),{},{viewModeEnabled:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.viewModeEnabled},predicate:function(e,t,n){return void 0===n.viewModeEnabled},contextItemLabel:"labels.viewMode",keyTest:function(e){return!e[O.tW.CTRL_OR_CMD]&&e.altKey&&e.code===O.aU.R}}),Pn=n(5637),Mn=n(200),Dn=n.n(Mn),An=n(2325),Ln=n(4929),Zn=n(267);function zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Rn=(0,c.Z)((function e(t){var n=this,r=t.scene,o=t.onSceneUpdated;(0,l.Z)(this,e),this.onFontsLoaded=function(t){if(t.every((function(t){var n="".concat(t.family,"-").concat(t.style,"-").concat(t.weight);return!!e.loadedFontFaces.has(n)||(e.loadedFontFaces.add(n),!1)})))return!1;var r=!1;n.scene.mapElements((function(e){return(0,U.iB)(e)&&!(0,V.Xh)(e)?((0,oe.bI)(e),r=!0,(0,_.BE)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,U.JZ)(e)))):e})),r&&n.onSceneUpdated()},this.loadFontsForElements=function(){var e=(0,a.Z)(m().mark((function e(t){var r;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all((0,i.Z)(new Set(t.filter((function(e){return(0,U.iB)(e)})).map((function(e){return e.fontFamily})))).map((function(e){var t,n,r,o,i=(0,I.mO)({fontFamily:e,fontSize:16});if(null===(t=document.fonts)||void 0===t||null===(n=t.check)||void 0===n||!n.call(t,i))return null===(r=document.fonts)||void 0===r||null===(o=r.load)||void 0===o?void 0:o.call(r,i)})));case 2:r=e.sent,n.onFontsLoaded(r.flat().filter(Boolean));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.scene=r,this.onSceneUpdated=o}));Rn.loadedFontFaces=new Set;var Nn=n(4688),Bn=n(2416),Hn=n(202),Wn=n(2242),Fn=function(){return(0,P.jsxs)("div",{"data-testid":"brave-measure-text-error",children:[(0,P.jsx)("p",{children:(0,P.jsx)(Wn.Z,{i18nKey:"errors.brave_measure_text_error.line1",bold:function(e){return(0,P.jsx)("span",{style:{fontWeight:600},children:e})}})}),(0,P.jsx)("p",{children:(0,P.jsx)(Wn.Z,{i18nKey:"errors.brave_measure_text_error.line2",bold:function(e){return(0,P.jsx)("span",{style:{fontWeight:600},children:e})}})}),(0,P.jsx)("p",{children:(0,P.jsx)(Wn.Z,{i18nKey:"errors.brave_measure_text_error.line3",link:function(e){return(0,P.jsx)("a",{href:"http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser",children:e})}})}),(0,P.jsx)("p",{children:(0,P.jsx)(Wn.Z,{i18nKey:"errors.brave_measure_text_error.line4",issueLink:function(e){return(0,P.jsx)("a",{href:"https://github.com/excalidraw/excalidraw/issues/new",children:e})},discordLink:function(e){return(0,P.jsxs)("a",{href:"https://discord.gg/UexuTaE",children:[e,"."]})}})})]})};function Un(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.Z)(e);if(t){var o=(0,f.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,d.Z)(this,n)}}function Vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vn(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xn=v().createContext(null),qn=v().createContext(null),Jn={isSmScreen:!1,isMobile:!1,isTouchScreen:!1,canDeviceFitSidebar:!1},$n=v().createContext(Jn);$n.displayName="DeviceContext";var Qn=v().createContext({container:null,id:null});Qn.displayName="ExcalidrawContainerContext";var er=v().createContext([]);er.displayName="ExcalidrawElementsContext";var tr=v().createContext(Gn(Gn({},(0,N.im)()),{},{width:0,height:0,offsetLeft:0,offsetTop:0}));tr.displayName="ExcalidrawAppStateContext";var nr=v().createContext((function(){console.warn("unitialized ExcalidrawSetAppStateContext context!")}));nr.displayName="ExcalidrawSetAppStateContext";var rr=v().createContext(null);rr.displayName="ExcalidrawActionManagerContext";var or=function(){return(0,g.useContext)(Xn)},ir=function(){return(0,g.useContext)(qn)},ar=function(){return(0,g.useContext)($n)},lr=function(){return(0,g.useContext)(Qn)},cr=function(){return(0,g.useContext)(er)},sr=function(){return(0,g.useContext)(tr)},ur=function(){return(0,g.useContext)(nr)},dr=function(){return(0,g.useContext)(rr)},fr=!1,pr=0,hr=0,mr=0,gr=!1,vr=!1,br=!1,yr={horizontal:null,vertical:null},xr=0,wr=!1,kr=!0,Er=!1,jr=0,Sr=!1,Or=null,_r={pointers:new Map,lastCenter:null,initialDistance:null,initialScale:null},Cr=function(e){(0,u.Z)(d,e);var t,n,r=Yn(d);function d(e){var t;(0,l.Z)(this,d),t=r.call(this,e),Ir.call((0,s.Z)(t));var n,o=(0,N.im)(),i=e.excalidrawRef,a=e.viewModeEnabled,c=void 0!==a&&a,u=e.zenModeEnabled,f=void 0!==u&&u,p=e.gridModeEnabled,h=void 0!==p&&p,m=e.theme,g=void 0===m?o.theme:m,v=e.name,b=void 0===v?o.name:v;if(t.state=Gn(Gn(Gn({},o),{},{theme:g,isLoading:!0},t.getCanvasOffsets()),{},{viewModeEnabled:c,zenModeEnabled:f,gridSize:h?T.k:null,name:b,width:window.innerWidth,height:window.innerHeight,showHyperlinkPopup:!1,defaultSidebarDockedPreference:!1}),t.id=(0,w.x0)(),t.library=new W.ZP((0,s.Z)(t)),i){var y,x="current"in i&&(null===(y=i.current)||void 0===y?void 0:y.readyPromise)||(0,I.PI)(),k={ready:!0,readyPromise:x,updateScene:t.updateScene,updateLibrary:t.library.updateLibrary,addFiles:t.addFiles,resetScene:t.resetScene,getSceneElementsIncludingDeleted:t.getSceneElementsIncludingDeleted,history:{clear:t.resetHistory},scrollToContent:t.scrollToContent,getSceneElements:t.getSceneElements,getAppState:function(){return t.state},getFiles:function(){return t.files},refresh:t.refresh,setToast:t.setToast,id:t.id,setActiveTool:t.setActiveTool,setCursor:t.setCursor,resetCursor:t.resetCursor,toggleSidebar:t.toggleSidebar};"function"==typeof i?i(k):i.current=k,x.resolve(k)}return t.excalidrawContainerValue={container:t.excalidrawContainerRef.current,id:t.id},t.scene=new ae.Z,t.fonts=new Rn({scene:t.scene,onSceneUpdated:t.onSceneUpdated}),t.history=new te,t.actionManager=new z(t.syncActionResult,(function(){return t.state}),(function(){return t.scene.getElementsIncludingDeleted()}),(0,s.Z)(t)),t.actionManager.registerAll(R.N),t.actionManager.registerAction((n=t.history,{name:"undo",trackEvent:{category:"history"},perform:function(e,t){return A(e,t,(function(){return n.undoOnce()}))},keyTest:function(e){return e[O.tW.CTRL_OR_CMD]&&e.key.toLowerCase()===O.tW.Z&&!e.shiftKey},PanelComponent:function(e){var t=e.updateData,n=e.data;return(0,P.jsx)(j.V,{type:"button",icon:E.UE,"aria-label":(0,S.t)("buttons.undo"),onClick:t,size:(null==n?void 0:n.size)||"medium"})},commitToHistory:function(){return!1}})),t.actionManager.registerAction(function(e){return{name:"redo",trackEvent:{category:"history"},perform:function(t,n){return A(t,n,(function(){return e.redoOnce()}))},keyTest:function(e){return e[O.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===O.tW.Z||T.ED&&e.ctrlKey&&!e.shiftKey&&e.key===O.tW.Y},PanelComponent:function(e){var t=e.updateData,n=e.data;return(0,P.jsx)(j.V,{type:"button",icon:E.zG,"aria-label":(0,S.t)("buttons.redo"),onClick:t,size:(null==n?void 0:n.size)||"medium"})},commitToHistory:function(){return!1}}}(t.history)),t}return(0,c.Z)(d,[{key:"renderCanvas",value:function(){var e=window.devicePixelRatio,t=this.state,n=t.width,r=t.height,o=n*e,i=r*e;return t.viewModeEnabled?(0,P.jsx)("canvas",{className:"excalidraw__canvas",style:{width:n,height:r,cursor:T.oc.GRAB},width:o,height:i,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,children:(0,S.t)("labels.drawingCanvas")}):(0,P.jsx)("canvas",{className:"excalidraw__canvas",style:{width:n,height:r},width:o,height:i,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerDown:this.handleCanvasPointerDown,onDoubleClick:this.handleCanvasDoubleClick,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,children:(0,S.t)("labels.drawingCanvas")})}},{key:"render",value:function(){var e,t=this,n=(0,ie.eD)(this.scene.getNonDeletedElements(),this.state),r=this.props,o=r.renderTopRightUI,i=r.renderCustomStats;return(0,P.jsx)("div",{className:(0,x.Z)("excalidraw excalidraw-container",{"excalidraw--view-mode":this.state.viewModeEnabled,"excalidraw--mobile":this.device.isMobile}),ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,children:(0,P.jsx)(Xn.Provider,{value:this,children:(0,P.jsx)(qn.Provider,{value:this.props,children:(0,P.jsx)(Qn.Provider,{value:this.excalidrawContainerValue,children:(0,P.jsx)($n.Provider,{value:this.device,children:(0,P.jsx)(nr.Provider,{value:this.setAppState,children:(0,P.jsxs)(tr.Provider,{value:this.state,children:[(0,P.jsx)(er.Provider,{value:this.scene.getNonDeletedElements(),children:(0,P.jsxs)(rr.Provider,{value:this.actionManager,children:[(0,P.jsx)(jn,{canvas:this.canvas,appState:this.state,files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onHandToolToggle:this.onHandToolToggle,langCode:(0,S.G3)().code,renderTopRightUI:o,renderCustomStats:i,showExitZenModeBtn:void 0===(null===(e=this.props)||void 0===e?void 0:e.zenModeEnabled)&&this.state.zenModeEnabled,UIOptions:this.props.UIOptions,onImageAction:this.onImageAction,renderWelcomeScreen:!this.state.isLoading&&this.state.showWelcomeScreen&&"selection"===this.state.activeTool.type&&!this.scene.getElementsIncludingDeleted().length,children:this.props.children}),(0,P.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,P.jsx)("div",{className:"excalidraw-contextMenuContainer"}),1===n.length&&!this.state.contextMenu&&this.state.showHyperlinkPopup&&(0,P.jsx)(Ln.nW,{element:n[0],setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen},n[0].id),null!==this.state.toast&&(0,P.jsx)(_n,{message:this.state.toast.message,onClose:function(){return t.setToast(null)},duration:this.state.toast.duration,closable:this.state.toast.closable}),this.state.contextMenu&&(0,P.jsx)(Oe,{items:this.state.contextMenu.items,top:this.state.contextMenu.top,left:this.state.contextMenu.left,actionManager:this.actionManager}),(0,P.jsx)("main",{children:this.renderCanvas()})]})})," "]})})})})})})})}},{key:"componentDidMount",value:(n=(0,a.Z)(m().mark((function e(){var t,n,r,o,i,a,l=this;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.unmounted=!1,this.excalidrawContainerValue.container=this.excalidrawContainerRef.current,"production"!==T.Vi.TEST&&"production"!==T.Vi.DEVELOPMENT||(this.setState.bind(this),Object.defineProperties(window.h,{state:{configurable:!0,get:function(){return l.state}},setState:{configurable:!0,value:function(){return l.setState.apply(l,arguments)}},app:{configurable:!0,value:this},history:{configurable:!0,value:this.history}})),this.scene.addCallback(this.onSceneUpdated),this.addEventListeners(),this.props.autoFocus&&this.excalidrawContainerRef.current&&this.focusContainer(),this.excalidrawContainerRef.current&&this.refreshDeviceState(this.excalidrawContainerRef.current),"ResizeObserver"in window&&null!==(t=this.excalidrawContainerRef)&&void 0!==t&&t.current?(this.resizeObserver=new ResizeObserver((function(){kr=!1,l.refreshDeviceState(l.excalidrawContainerRef.current),l.updateDOMRect()})),null===(n=this.resizeObserver)||void 0===n||n.observe(this.excalidrawContainerRef.current)):window.matchMedia&&(r=window.matchMedia("(max-width: ".concat(T.kV,"px), (max-height: ").concat(T.Yx,"px) and (max-width: ").concat(T.sS,"px)")),o=window.matchMedia("(max-width: ".concat(T.eF,"px)")),i=window.matchMedia("(min-width: ".concat(null!=this.props.UIOptions.dockedSidebarBreakpoint?this.props.UIOptions.dockedSidebarBreakpoint:T.sk,"px)")),a=function(){l.excalidrawContainerRef.current.getBoundingClientRect(),l.device=(0,I.v4)(l.device,{isSmScreen:o.matches,isMobile:r.matches,canDeviceFitSidebar:i.matches})},r.addListener(a),this.detachIsMobileMqHandler=function(){return r.removeListener(a)}),new URLSearchParams(window.location.search.slice(1)).has("web-share-target")?this.restoreFileFromShare():this.updateDOMRect(this.initializeScene),(0,T.jP)()&&!(0,Pe.eB)()&&this.setState({errorMessage:(0,P.jsx)(Fn,{})});case 11:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){var e;this.files={},this.imageCache.clear(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.unmounted=!0,this.removeEventListeners(),this.scene.destroy(),clearTimeout(xr),xr=0}},{key:"removeEventListeners",value:function(){var e,t,n,r,o;document.removeEventListener(T.Ks.POINTER_UP,this.removePointer),document.removeEventListener(T.Ks.COPY,this.onCopy),document.removeEventListener(T.Ks.PASTE,this.pasteFromClipboard),document.removeEventListener(T.Ks.CUT,this.onCut),null===(e=this.excalidrawContainerRef.current)||void 0===e||e.removeEventListener(T.Ks.WHEEL,this.onWheel),null===(t=this.nearestScrollableContainer)||void 0===t||t.removeEventListener(T.Ks.SCROLL,this.onScroll),document.removeEventListener(T.Ks.KEYDOWN,this.onKeyDown,!1),document.removeEventListener(T.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition,!1),document.removeEventListener(T.Ks.KEYUP,this.onKeyUp),window.removeEventListener(T.Ks.RESIZE,this.onResize,!1),window.removeEventListener(T.Ks.UNLOAD,this.onUnload,!1),window.removeEventListener(T.Ks.BLUR,this.onBlur,!1),null===(n=this.excalidrawContainerRef.current)||void 0===n||n.removeEventListener(T.Ks.DRAG_OVER,this.disableEvent,!1),null===(r=this.excalidrawContainerRef.current)||void 0===r||r.removeEventListener(T.Ks.DROP,this.disableEvent,!1),document.removeEventListener(T.Ks.GESTURE_START,this.onGestureStart,!1),document.removeEventListener(T.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.removeEventListener(T.Ks.GESTURE_END,this.onGestureEnd,!1),null===(o=this.detachIsMobileMqHandler)||void 0===o||o.call(this)}},{key:"addEventListeners",value:function(){var e,t,n,r,o,i=this;this.removeEventListeners(),document.addEventListener(T.Ks.POINTER_UP,this.removePointer),document.addEventListener(T.Ks.COPY,this.onCopy),null===(e=this.excalidrawContainerRef.current)||void 0===e||e.addEventListener(T.Ks.WHEEL,this.onWheel,{passive:!1}),this.props.handleKeyboardGlobally&&document.addEventListener(T.Ks.KEYDOWN,this.onKeyDown,!1),document.addEventListener(T.Ks.KEYUP,this.onKeyUp,{passive:!0}),document.addEventListener(T.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition),null===(t=document.fonts)||void 0===t||null===(n=t.addEventListener)||void 0===n||n.call(t,"loadingdone",(function(e){var t=e.fontfaces;i.fonts.onFontsLoaded(t)})),document.addEventListener(T.Ks.GESTURE_START,this.onGestureStart,!1),document.addEventListener(T.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.addEventListener(T.Ks.GESTURE_END,this.onGestureEnd,!1),this.state.viewModeEnabled||(document.addEventListener(T.Ks.PASTE,this.pasteFromClipboard),document.addEventListener(T.Ks.CUT,this.onCut),this.props.detectScroll&&(this.nearestScrollableContainer=(0,I.Ip)(this.excalidrawContainerRef.current),this.nearestScrollableContainer.addEventListener(T.Ks.SCROLL,this.onScroll)),window.addEventListener(T.Ks.RESIZE,this.onResize,!1),window.addEventListener(T.Ks.UNLOAD,this.onUnload,!1),window.addEventListener(T.Ks.BLUR,this.onBlur,!1),null===(r=this.excalidrawContainerRef.current)||void 0===r||r.addEventListener(T.Ks.DRAG_OVER,this.disableEvent,!1),null===(o=this.excalidrawContainerRef.current)||void 0===o||o.addEventListener(T.Ks.DROP,this.disableEvent,!1))}},{key:"componentDidUpdate",value:function(e,t){var n,r,o,i=this;(this.state.showWelcomeScreen||this.scene.getElementsIncludingDeleted().length||this.setState({showWelcomeScreen:!0}),this.excalidrawContainerRef.current&&e.UIOptions.dockedSidebarBreakpoint!==this.props.UIOptions.dockedSidebarBreakpoint&&this.refreshDeviceState(this.excalidrawContainerRef.current),t.scrollX!==this.state.scrollX||t.scrollY!==this.state.scrollY)&&(null===(r=this.props)||void 0===r||null===(o=r.onScrollChange)||void 0===o||o.call(r,this.state.scrollX,this.state.scrollY));Object.keys(this.state.selectedElementIds).length&&(0,N.EN)(this.state)&&this.setState({activeTool:(0,I.Om)(this.state,{type:"selection"})}),"eraser"===this.state.activeTool.type&&t.theme!==this.state.theme&&(0,I.OF)(this.canvas,this.state.theme),"selection"===t.activeTool.type&&"selection"!==this.state.activeTool.type&&this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1}),e.langCode!==this.props.langCode&&this.updateLanguage(),e.viewModeEnabled!==this.props.viewModeEnabled&&this.setState({viewModeEnabled:!!this.props.viewModeEnabled}),t.viewModeEnabled!==this.state.viewModeEnabled&&(this.addEventListeners(),this.deselectElements()),e.zenModeEnabled!==this.props.zenModeEnabled&&this.setState({zenModeEnabled:!!this.props.zenModeEnabled}),e.theme!==this.props.theme&&this.props.theme&&this.setState({theme:this.props.theme}),e.gridModeEnabled!==this.props.gridModeEnabled&&this.setState({gridSize:this.props.gridModeEnabled?T.k:null}),this.props.name&&e.name!==this.props.name&&this.setState({name:this.props.name}),null===(n=this.excalidrawContainerRef.current)||void 0===n||n.classList.toggle("theme--dark","dark"===this.state.theme),this.state.editingLinearElement&&!this.state.selectedElementIds[this.state.editingLinearElement.elementId]&&setTimeout((function(){i.state.editingLinearElement&&i.actionManager.executeAction(k.pL)})),this.state.selectedLinearElement&&!this.state.selectedElementIds[this.state.selectedLinearElement.elementId]&&this.setState({selectedLinearElement:null});var a,l,c=t.multiElement;(t.activeTool!==this.state.activeTool&&null!=c&&(0,C.N1)(this.state)&&(0,V.Mn)(c,!1)&&(0,C.R)(c,this.state,this.scene,(0,I.AK)(K._.getPointAtIndexGlobalCoordinates(c,-1))),this.renderScene(),this.history.record(this.state,this.scene.getElementsIncludingDeleted()),this.state.isLoading)||(null===(a=(l=this.props).onChange)||void 0===a||a.call(l,this.scene.getElementsIncludingDeleted(),this.state,this.files))}},{key:"addTextFromPaste",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,I.dE)({clientX:hr,clientY:mr},this.state),r=n.x,o=n.y,a={x:r,y:o,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roundness:null,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,text:e,fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily,textAlign:this.state.currentItemTextAlign,verticalAlign:T.hs,locked:!1},l=10,c=o,s=t?[e]:e.split("\n"),u=s.reduce((function(e,t,n){var o=t.trim(),i=(0,Pe.PT)(a.fontFamily);if(o.length){var u=(0,U.VL)(Gn(Gn({},a),{},{x:r,y:c,text:o,lineHeight:i}));e.push(u),c+=u.height+l}else{var d;(null===(d=s[n-1])||void 0===d?void 0:d.trim())&&(c+=(0,Pe.Rg)(a.fontSize,i)+l)}return e}),[]);0!==u.length&&(this.scene.replaceAllElements([].concat((0,i.Z)(this.scene.getElementsIncludingDeleted()),(0,i.Z)(u))),this.setState({selectedElementIds:Object.fromEntries(u.map((function(e){return[e.id,!0]})))}),!t&&u.length>1&&!1===Sr&&!this.device.isMobile&&(this.setToast({message:(0,S.t)("toast.pasteAsSingleElement",{shortcut:(0,I.uY)("CtrlOrCmd+Shift+V")}),duration:5e3}),Sr=!0),this.history.resumeRecording())}},{key:"handleTextWysiwyg",value:function(e,t){var n=this,r=t.isExistingElement,o=void 0!==r&&r,a=function(t,r,o){n.scene.replaceAllElements((0,i.Z)(n.scene.getElementsIncludingDeleted().map((function(n){return n.id===e.id&&(0,U.iB)(n)?(0,U.N_)(n,{text:t,isDeleted:o,originalText:r}):n}))))};(0,U.b_)({id:e.id,canvas:this.canvas,getViewportCoords:function(e,t){var r=(0,I._i)({sceneX:e,sceneY:t},n.state),o=r.x,i=r.y;return[o-n.state.offsetLeft,i-n.state.offsetTop]},onChange:(0,I.tH)((function(t){a(t,t,!1),(0,U.qP)(e)&&(0,C.Ww)(e)})),onSubmit:(0,I.tH)((function(t){var r=t.text,i=t.viaKeyboard,l=t.originalText,c=!r.trim();if(a(r,l,c),!c&&i){var s=e.containerId?e.containerId:e.id;n.setState((function(e){return{selectedElementIds:Gn(Gn({},e.selectedElementIds),{},(0,p.Z)({},s,!0))}}))}c&&(0,C.$q)(n.scene.getNonDeletedElements(),[e]),c&&!o||n.history.resumeRecording(),n.setState({draggingElement:null,editingElement:null}),n.state.activeTool.locked&&(0,I.Uk)(n.canvas,n.state),n.focusContainer()})),element:e,excalidrawContainer:this.excalidrawContainerRef.current,app:this}),this.deselectElements(),a(e.text,e.originalText,!1)}},{key:"deselectElements",value:function(){this.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}},{key:"getTextElementAtPosition",value:function(e,t){var n=this.getElementAtPosition(e,t,{includeBoundTextElement:!0});return n&&(0,U.iB)(n)&&!n.isDeleted?n:null}},{key:"getElementAtPosition",value:function(e,t,n){var r=this.getElementsAtPosition(e,t,null==n?void 0:n.includeBoundTextElement,null==n?void 0:n.includeLockedElements);if(r.length>1){if(null!=n&&n.preferSelected)for(var o=r.length-1;o>-1;o--)if(this.state.selectedElementIds[r[o].id])return r[o];var i=r[r.length-1];return(0,U.wB)(i,this.state,e,t)?r[r.length-2]:i}return 1===r.length?r[0]:null}},{key:"getElementsAtPosition",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=r&&o?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter((function(e){return(o||!e.locked)&&(r||!((0,U.iB)(e)&&e.containerId))}));return(0,ie.CJ)(i,(function(r){return(0,U.wX)(r,n.state,e,t)}))}},{key:"handleHoverSelectedLinearElement",value:function(e,t,n){var r=K._.getElement(e.elementId),o=(0,Pe.WJ)(r);if(r)if(this.state.selectedLinearElement){var i=-1,a=null;(0,An.Qu)(r,this.state,[t,n])?(i=K._.getPointIndexUnderCursor(r,this.state.zoom,t,n),a=K._.getSegmentMidpointHitCoords(e,{x:t,y:n},this.state),i>=0||a?(0,I.KJ)(this.canvas,T.oc.POINTER):(0,I.KJ)(this.canvas,T.oc.MOVE)):((0,Zn.oY)([r],this.state)&&(0,U.wB)(r,this.state,t,n)||o&&(0,U.wX)(o,this.state,t,n))&&(0,I.KJ)(this.canvas,T.oc.MOVE),this.state.selectedLinearElement.hoverPointIndex!==i&&this.setState({selectedLinearElement:Gn(Gn({},this.state.selectedLinearElement),{},{hoverPointIndex:i})}),K._.arePointsEqual(this.state.selectedLinearElement.segmentMidPointHoveredCoords,a)||this.setState({selectedLinearElement:Gn(Gn({},this.state.selectedLinearElement),{},{segmentMidPointHoveredCoords:a})})}else(0,I.KJ)(this.canvas,T.oc.AUTO)}},{key:"maybeCleanupAfterMissingPointerUp",value:function(e){null!==Or&&Or(e)}},{key:"updateGestureOnPointerDown",value:function(e){_r.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),2===_r.pointers.size&&(_r.lastCenter=G(_r.pointers),_r.initialScale=this.state.zoom.value,_r.initialDistance=X(Array.from(_r.pointers.values())))}},{key:"initialPointerDownState",value:function(e){var t=(0,I.dE)(e,this.state),n=(0,ie.eD)(this.scene.getNonDeletedElements(),this.state),r=(0,U.KP)(n),i=(0,o.Z)(r,4),a=i[0],l=i[1],c=i[2],s=i[3];return{origin:t,withCmdOrCtrl:e[O.tW.CTRL_OR_CMD],originInGrid:(0,I.AK)((0,ne.wC)(t.x,t.y,this.state.gridSize)),scrollbars:(0,ie._4)(yr,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop),lastCoords:Gn({},t),originalElements:this.scene.getNonDeletedElements().reduce((function(e,t){return e.set(t.id,(0,Y.OL)(t)),e}),new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(c+a)/2,y:(s+l)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(t,n)},drag:{hasOccurred:!1,offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1},elementIdsToErase:{}}}},{key:"handleDraggingScrollBar",value:function(e,t){var n=this;if(!t.scrollbars.isOverEither||this.state.multiElement)return!1;br=!0,t.lastCoords.x=e.clientX,t.lastCoords.y=e.clientY;var r=(0,I.$9)((function(e){e.target instanceof HTMLElement&&n.handlePointerMoveOverScrollbars(e,t)})),o=(0,I.tH)((function(){br=!1,(0,I.Uk)(n.canvas,n.state),Or=null,n.setState({cursorButton:"up"}),n.savePointer(e.clientX,e.clientY,"up"),window.removeEventListener(T.Ks.POINTER_MOVE,r),window.removeEventListener(T.Ks.POINTER_UP,o),r.flush()}));return Or=o,window.addEventListener(T.Ks.POINTER_MOVE,r),window.addEventListener(T.Ks.POINTER_UP,o),!0}},{key:"isASelectedElement",value:function(e){return null!=e&&this.state.selectedElementIds[e.id]}},{key:"isHittingCommonBoundingBoxOfSelectedElements",value:function(e,t){if(t.length<2)return!1;var n=10/this.state.zoom.value,r=(0,U.KP)(t),i=(0,o.Z)(r,4),a=i[0],l=i[1],c=i[2],s=i[3];return e.x>a-n&&e.x<c+n&&e.y>l-n&&e.y<s+n}},{key:"onKeyDownFromPointerDownHandler",value:function(e){var t=this;return(0,I.tH)((function(n){t.maybeHandleResize(e,n)||t.maybeDragNewGenericElement(e,n)}))}},{key:"onKeyUpFromPointerDownHandler",value:function(e){var t=this;return(0,I.tH)((function(n){n.key===O.tW.ALT&&n.preventDefault(),t.maybeHandleResize(e,n)||t.maybeDragNewGenericElement(e,n)}))}},{key:"onPointerMoveFromPointerDownHandler",value:function(e){var t=this;return(0,I.$9)((function(n){var r;if(null===e.drag.offset&&(e.drag.offset=(0,I.AK)((0,U.$V)((0,ie.eD)(t.scene.getNonDeletedElements(),t.state),e.origin.x,e.origin.y))),n.target instanceof HTMLElement&&!t.handlePointerMoveOverScrollbars(n,e)){var a=(0,I.dE)(n,t.state);if((0,N.EN)(t.state))t.handleEraser(n,e,a);else{var l=(0,ne.wC)(a.x,a.y,t.state.gridSize),c=(0,o.Z)(l,2),s=c[0],u=c[1];if(e.drag.hasOccurred||"arrow"!==t.state.activeTool.type&&"line"!==t.state.activeTool.type||!((0,ne.LW)(a.x,a.y,e.origin.x,e.origin.y)<T.f)){if(e.resize.isResizing&&(e.lastCoords.x=a.x,e.lastCoords.y=a.y,t.maybeHandleResize(e,n)))return!0;if(t.state.selectedLinearElement){var d=t.state.editingLinearElement||t.state.selectedLinearElement;if(K._.shouldAddMidpoint(t.state.selectedLinearElement,a,t.state)){var f=K._.addMidpoint(t.state.selectedLinearElement,a,t.state);if(!f)return;return void(0,b.flushSync)((function(){t.state.selectedLinearElement&&t.setState({selectedLinearElement:Gn(Gn({},t.state.selectedLinearElement),{},{pointerDownState:f.pointerDownState,selectedPointsIndices:f.selectedPointsIndices})}),t.state.editingLinearElement&&t.setState({editingLinearElement:Gn(Gn({},t.state.editingLinearElement),{},{pointerDownState:f.pointerDownState,selectedPointsIndices:f.selectedPointsIndices})})}))}if(null!==d.pointerDownState.segmentMidpoint.value&&!d.pointerDownState.segmentMidpoint.added)return;var h=K._.handlePointDragging(n,t.state,a.x,a.y,(function(e,n){t.maybeSuggestBindingsForLinearElementAtCoords(e,n)}),d);if(h)return e.lastCoords.x=a.x,e.lastCoords.y=a.y,e.drag.hasOccurred=!0,t.state.editingLinearElement&&!t.state.editingLinearElement.isDragging&&t.setState({editingLinearElement:Gn(Gn({},t.state.editingLinearElement),{},{isDragging:!0})}),void(t.state.selectedLinearElement.isDragging||t.setState({selectedLinearElement:Gn(Gn({},t.state.selectedLinearElement),{},{isDragging:!0})}))}var m=e.hit.allHitElements.some((function(e){return t.isASelectedElement(e)})),g=t.state.editingLinearElement&&n.shiftKey&&t.state.editingLinearElement.elementId===(null===(r=e.hit.element)||void 0===r?void 0:r.id);if((m||e.hit.hasHitCommonBoundingBoxOfSelectedElements)&&!g){var v=(0,ie.eD)(t.scene.getNonDeletedElements(),t.state);if(v.every((function(e){return e.locked})))return;if(e.drag.hasOccurred=!0,v.length>0&&!e.withCmdOrCtrl&&!t.state.editingElement){var y=(0,ne.wC)(a.x-e.drag.offset.x,a.y-e.drag.offset.y,t.state.gridSize),x=(0,o.Z)(y,2),w=x[0],k=x[1],E=[Math.abs(a.x-e.origin.x),Math.abs(a.y-e.origin.y)],j=E[0],S=E[1],P=n.shiftKey;if((0,U.o8)(e,v,w,k,P,j,S,t.state),t.maybeSuggestBindingForAll(v),n.altKey&&!e.hit.hasBeenDuplicated){e.hit.hasBeenDuplicated=!0;var M,D=[],A=[],L=new Map,Z=new Map,z=e.hit.element,R=t.scene.getElementsIncludingDeleted(),B=(0,ie.eD)(R,t.state,!0).map((function(e){return e.id})),H=Un(R);try{for(H.s();!(M=H.n()).done;){var W=M.value;if(B.includes(W.id)||W.id===(null==z?void 0:z.id)&&e.hit.wasAddedToSelection){var F=(0,U.Sy)(t.state.editingGroupId,L,W),Y=(0,ne.wC)(e.origin.x-e.drag.offset.x,e.origin.y-e.drag.offset.y,t.state.gridSize),G=(0,o.Z)(Y,2),X=G[0],q=G[1];(0,_.DR)(F,{x:F.x+(X-w),y:F.y+(q-k)}),D.push(F),A.push(W),Z.set(W.id,F.id)}else D.push(W)}}catch(e){H.e(e)}finally{H.f()}var $=[].concat(D,A);(0,Pe.P7)(D,A,Z),(0,C.ek)($,A,Z,"duplicatesServeAsOld"),t.scene.replaceAllElements($)}return}}var Q=t.state.draggingElement;if(Q){if("freedraw"===Q.type){var ee=Q.points,te=a.x-Q.x,re=a.y-Q.y,oe=ee.length>0&&ee[ee.length-1];if(!(oe&&oe[0]===te&&oe[1]===re)){var ae=Q.simulatePressure?Q.pressures:[].concat((0,i.Z)(Q.pressures),[n.pressure]);(0,_.DR)(Q,{points:[].concat((0,i.Z)(ee),[[te,re]]),pressures:ae})}}else if((0,V.bt)(Q)){e.drag.hasOccurred=!0;var le=Q.points,ce=s-Q.x,se=u-Q.y;if((0,O.Ge)(n)&&2===le.length){var ue=(0,U.o4)(Q.x,Q.y,a.x,a.y);ce=ue.width,se=ue.height}1===le.length?(0,_.DR)(Q,{points:[].concat((0,i.Z)(le),[[ce,se]])}):2===le.length&&(0,_.DR)(Q,{points:[].concat((0,i.Z)(le.slice(0,-1)),[[ce,se]])}),(0,V.Mn)(Q,!1)&&t.maybeSuggestBindingsForLinearElementAtCoords(Q,[a],t.state.startBoundElement)}else e.lastCoords.x=a.x,e.lastCoords.y=a.y,t.maybeDragNewGenericElement(e,n);if("selection"===t.state.activeTool.type){e.boxSelection.hasOccurred=!0;var de=t.scene.getNonDeletedElements();if(n.shiftKey||t.state.editingLinearElement||!(0,ie.N)(de,t.state)||(e.withCmdOrCtrl&&e.hit.element?t.setState((function(n){return(0,J.bO)(Gn(Gn({},n),{},{selectedElementIds:(0,p.Z)({},e.hit.element.id,!0)}),t.scene.getNonDeletedElements())})):t.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),t.state.editingLinearElement)K._.handleBoxSelection(n,t.state,t.setState.bind(t));else{var fe=(0,ie.Yp)(de,Q);t.setState((function(n){return(0,J.bO)(Gn(Gn({},n),{},{selectedElementIds:Gn(Gn(Gn({},n.selectedElementIds),fe.reduce((function(e,t){return e[t.id]=!0,e}),{})),e.hit.element?(0,p.Z)({},e.hit.element.id,!fe.length):null),showHyperlinkPopup:!(1!==fe.length||!fe[0].link)&&"info",selectedLinearElement:1===fe.length&&(0,V.bt)(fe[0])?new K._(fe[0],t.scene):null}),t.scene.getNonDeletedElements())}))}}}}}}}))}},{key:"handlePointerMoveOverScrollbars",value:function(e,t){if(t.scrollbars.isOverHorizontal){var n=e.clientX,r=n-t.lastCoords.x;return this.translateCanvas({scrollX:this.state.scrollX-r/this.state.zoom.value}),t.lastCoords.x=n,!0}if(t.scrollbars.isOverVertical){var o=e.clientY,i=o-t.lastCoords.y;return this.translateCanvas({scrollY:this.state.scrollY-i/this.state.zoom.value}),t.lastCoords.y=o,!0}return!1}},{key:"onPointerUpFromPointerDownHandler",value:function(e){var t=this;return(0,I.tH)((function(n){var r,o,a,l=t.state,c=l.draggingElement,s=l.resizingElement,u=l.multiElement,d=l.activeTool,f=l.isResizing,h=l.isRotating;if(t.setState({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,cursorButton:"up",editingElement:u||(0,U.iB)(t.state.editingElement)?t.state.editingElement:null}),t.savePointer(n.clientX,n.clientY,"up"),t.state.editingLinearElement)if(e.boxSelection.hasOccurred||(null===(o=e.hit)||void 0===o||null===(a=o.element)||void 0===a?void 0:a.id)===t.state.editingLinearElement.elementId){var m=K._.handlePointerUp(n,t.state.editingLinearElement,t.state);m!==t.state.editingLinearElement&&t.setState({editingLinearElement:m,suggestedBindings:[]})}else t.actionManager.executeAction(k.pL);else if(t.state.selectedLinearElement){var g,v;if((null===(g=e.hit)||void 0===g||null===(v=g.element)||void 0===v?void 0:v.id)!==t.state.selectedLinearElement.elementId){(0,ie.eD)(t.scene.getNonDeletedElements(),t.state).length>1&&t.setState({selectedLinearElement:null})}else{var b=K._.handlePointerUp(n,t.state.selectedLinearElement,t.state),y=b.startBindingElement,x=b.endBindingElement,w=t.scene.getElement(b.elementId);(0,V.Mn)(w)&&(0,C.HG)(w,y,x),b!==t.state.selectedLinearElement&&t.setState({selectedLinearElement:Gn(Gn({},b),{},{selectedPointsIndices:null}),suggestedBindings:[]})}}if(Or=null,e.eventListeners.onMove&&e.eventListeners.onMove.flush(),window.removeEventListener(T.Ks.POINTER_MOVE,e.eventListeners.onMove),window.removeEventListener(T.Ks.POINTER_UP,e.eventListeners.onUp),window.removeEventListener(T.Ks.KEYDOWN,e.eventListeners.onKeyDown),window.removeEventListener(T.Ks.KEYUP,e.eventListeners.onKeyUp),t.state.pendingImageElementId&&t.setState({pendingImageElementId:null}),"freedraw"===(null==c?void 0:c.type)){var E=(0,I.dE)(n,t.state),j=c.points,S=E.x-c.x,O=E.y-c.y;S===j[0][0]&&O===j[0][1]&&(O+=1e-4,S+=1e-4);var P=c.simulatePressure?[]:[].concat((0,i.Z)(c.pressures),[n.pressure]);return(0,_.DR)(c,{points:[].concat((0,i.Z)(j),[[S,O]]),pressures:P,lastCommittedPoint:[S,O]}),void t.actionManager.executeAction(k.pL)}if((0,V.pC)(c)){var M=c;try{t.initializeImageDimensions(M),t.setState({selectedElementIds:(0,p.Z)({},M.id,!0)},(function(){t.actionManager.executeAction(k.pL)}))}catch(e){console.error(e),t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==M.id}))),t.actionManager.executeAction(k.pL)}}else if((0,V.bt)(c)){c.points.length>1&&t.history.resumeRecording();var D=(0,I.dE)(n,t.state);e.drag.hasOccurred||!c||u?e.drag.hasOccurred&&!u&&((0,C.N1)(t.state)&&(0,V.Mn)(c,!1)&&(0,C.R)(c,t.state,t.scene,D),t.setState({suggestedBindings:[],startBoundElement:null}),d.locked?t.setState((function(e){return{draggingElement:null}})):((0,I.z8)(t.canvas),t.setState((function(e){return{draggingElement:null,activeTool:(0,I.Om)(t.state,{type:"selection"}),selectedElementIds:Gn(Gn({},e.selectedElementIds),{},(0,p.Z)({},c.id,!0)),selectedLinearElement:new K._(c,t.scene)}})))):((0,_.DR)(c,{points:[].concat((0,i.Z)(c.points),[[D.x-c.x,D.y-c.y]])}),t.setState({multiElement:c,editingElement:t.state.draggingElement}))}else{if("selection"!==d.type&&c&&(0,U.QD)(c))return t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().slice(0,-1)),void t.setState({draggingElement:null});c&&(0,_.DR)(c,(0,U.Qp)(c)),s&&t.history.resumeRecording(),s&&(0,U.QD)(s)&&t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==s.id})));var A=e.hit.element;if((null===(r=t.state.selectedLinearElement)||void 0===r?void 0:r.elementId)!==(null==A?void 0:A.id)&&(0,V.bt)(A))1===(0,ie.eD)(t.scene.getNonDeletedElements(),t.state).length&&t.setState({selectedLinearElement:new K._(A,t.scene)});if((0,N.EN)(t.state)){if(0===(0,ne.LW)(t.lastPointerDown.clientX,t.lastPointerDown.clientY,t.lastPointerUp.clientX,t.lastPointerUp.clientY)){var L=(0,I.dE)({clientX:t.lastPointerUp.clientX,clientY:t.lastPointerUp.clientY},t.state);t.getElementsAtPosition(L.x,L.y).forEach((function(t){return e.elementIdsToErase[t.id]={erase:!0,opacity:t.opacity}}))}t.eraseElements(e)}else{var Z;if(Object.keys(e.elementIdsToErase).length&&t.restoreReadyToEraseElements(e),A&&!e.drag.hasOccurred&&!e.hit.wasAddedToSelection&&(!t.state.editingLinearElement||!e.boxSelection.hasOccurred))if(n.shiftKey&&!t.state.editingLinearElement)if(t.state.selectedElementIds[A.id])if((0,J.zq)(t.state,A)){var z=A.groupIds.flatMap((function(e){return(0,J.Fb)(t.scene.getNonDeletedElements(),e)})).map((function(e){return(0,p.Z)({},e.id,!1)})).reduce((function(e,t){return Gn(Gn({},e),t)}),{});t.setState((function(e){return{selectedGroupIds:Gn(Gn({},e.selectedElementIds),A.groupIds.map((function(e){return(0,p.Z)({},e,!1)})).reduce((function(e,t){return Gn(Gn({},e),t)}),{})),selectedElementIds:Gn(Gn({},e.selectedElementIds),z)}}))}else null!==(Z=t.state.selectedLinearElement)&&void 0!==Z&&Z.isDragging||t.setState((function(e){var n=Gn(Gn({},e.selectedElementIds),{},(0,p.Z)({},A.id,!1)),r=(0,ie.eD)(t.scene.getNonDeletedElements(),Gn(Gn({},e),{},{selectedElementIds:n}));return(0,J.bO)(Gn(Gn({},e),{},{selectedElementIds:n,selectedLinearElement:1===r.length&&(0,V.bt)(r[0])?new K._(r[0],t.scene):e.selectedLinearElement}),t.scene.getNonDeletedElements())}));else t.setState((function(e){return{selectedElementIds:Gn(Gn({},e.selectedElementIds),{},(0,p.Z)({},A.id,!0))}}));else t.setState((function(e){var n;return Gn({},(0,J.bO)(Gn(Gn({},e),{},{selectedElementIds:(0,p.Z)({},A.id,!0),selectedLinearElement:(0,V.bt)(A)&&(null===(n=e.selectedLinearElement)||void 0===n?void 0:n.elementId)!==A.id?new K._(A,t.scene):e.selectedLinearElement}),t.scene.getNonDeletedElements()))}));e.drag.hasOccurred||t.state.isResizing||!(A&&(0,U.wB)(A,t.state,e.origin.x,e.origin.y)||!A&&e.hit.hasHitCommonBoundingBoxOfSelectedElements)?(!d.locked&&"freedraw"!==d.type&&c&&t.setState((function(e){return{selectedElementIds:Gn(Gn({},e.selectedElementIds),{},(0,p.Z)({},c.id,!0))}})),("selection"!==d.type||(0,ie.N)(t.scene.getNonDeletedElements(),t.state))&&t.history.resumeRecording(),(e.drag.hasOccurred||f||h)&&((0,C.N1)(t.state)?C.el:C.H)((0,ie.eD)(t.scene.getNonDeletedElements(),t.state)),d.locked||"freedraw"===d.type?t.setState({draggingElement:null,suggestedBindings:[]}):((0,I.z8)(t.canvas),t.setState({draggingElement:null,suggestedBindings:[],activeTool:(0,I.Om)(t.state,{type:"selection"})}))):t.state.editingLinearElement?t.setState({editingLinearElement:null}):t.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}}}))}},{key:"maybeSuggestBindingForAll",value:function(e){var t=(0,C.ZB)(e);this.setState({suggestedBindings:t})}},{key:"clearSelection",value:function(e){this.setState((function(t){return{selectedElementIds:{},selectedGroupIds:{},editingGroupId:t.editingGroupId&&null!=e&&(0,J.Nd)(e,t.editingGroupId)?t.editingGroupId:null}})),this.setState({selectedElementIds:{},previousSelectedElementIds:this.state.selectedElementIds})}},{key:"getTextWysiwygSnappedToCenterPosition",value:function(e,t,n,r){if(r){var o=r.x+r.width/2,i=r.y+r.height/2,a=(0,Pe.TP)(r,n);if(a&&(o=a.x,i=a.y),Math.hypot(e-o,t-i)<T.wZ){var l=(0,I._i)({sceneX:o,sceneY:i},n);return{viewportX:l.x,viewportY:l.y,elementCenterX:o,elementCenterY:i}}}}},{key:"getCanvasOffsets",value:function(){var e;if(null!==(e=this.excalidrawContainerRef)&&void 0!==e&&e.current){var t=this.excalidrawContainerRef.current.getBoundingClientRect();return{offsetLeft:t.left,offsetTop:t.top}}return{offsetLeft:0,offsetTop:0}}},{key:"updateLanguage",value:(t=(0,a.Z)(m().mark((function e(){var t,n=this;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=S.Mj.find((function(e){return e.code===n.props.langCode}))||S.Fp,e.next=3,(0,S.m0)(t);case 3:this.setAppState({});case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"resetTapTwice",value:function(){fr=!1}}]),d}(v().Component);Cr.defaultProps={UIOptions:T.cW};var Ir=function(){var e=this;this.canvas=null,this.rc=null,this.unmounted=!1,this.device=Jn,this.excalidrawContainerRef=v().createRef(),this.files={},this.imageCache=new Map,this.lastPointerDown=null,this.lastPointerUp=null,this.lastScenePointer=null,this.focusContainer=function(){var t;null===(t=e.excalidrawContainerRef.current)||void 0===t||t.focus()},this.getSceneElementsIncludingDeleted=function(){return e.scene.getElementsIncludingDeleted()},this.getSceneElements=function(){return e.scene.getNonDeletedElements()},this.onInsertElements=function(t){e.addElementsFromPasteOrLibrary({elements:t,position:"center",files:null})},this.syncActionResult=(0,I.tH)((function(t){if(!e.unmounted&&!1!==t){var n=null;if(t.elements&&(t.elements.forEach((function(t){var r;(null===(r=e.state.editingElement)||void 0===r?void 0:r.id)===t.id&&e.state.editingElement!==t&&(0,U.qP)(t)&&(n=t)})),e.scene.replaceAllElements(t.elements),t.commitToHistory&&e.history.resumeRecording()),t.files&&(e.files=t.replaceFiles?t.files:Gn(Gn({},e.files),t.files),e.addNewImagesToImageCache()),t.appState||n||e.state.contextMenu){var r,o,i,a,l,c,s,u;t.commitToHistory&&e.history.resumeRecording();var d=(null==t||null===(r=t.appState)||void 0===r?void 0:r.viewModeEnabled)||!1,f=(null==t||null===(o=t.appState)||void 0===o?void 0:o.zenModeEnabled)||!1,p=(null==t||null===(i=t.appState)||void 0===i?void 0:i.gridSize)||null,h=(null==t||null===(a=t.appState)||void 0===a?void 0:a.theme)||e.props.theme||T.C6.LIGHT,m=null!==(l=null==t||null===(c=t.appState)||void 0===c?void 0:c.name)&&void 0!==l?l:e.state.name,g=null!==(s=null==t||null===(u=t.appState)||void 0===u?void 0:u.errorMessage)&&void 0!==s?s:e.state.errorMessage;void 0!==e.props.viewModeEnabled&&(d=e.props.viewModeEnabled),void 0!==e.props.zenModeEnabled&&(f=e.props.zenModeEnabled),void 0!==e.props.gridModeEnabled&&(p=e.props.gridModeEnabled?T.k:null),void 0!==e.props.name&&(m=e.props.name),e.setState((function(e){var r;return Object.assign(t.appState||{},{contextMenu:null,editingElement:n||(null===(r=t.appState)||void 0===r?void 0:r.editingElement)||null,viewModeEnabled:d,zenModeEnabled:f,gridSize:p,theme:h,name:m,errorMessage:g})}),(function(){t.syncHistory&&e.history.setCurrentState(e.state,e.scene.getElementsIncludingDeleted())}))}}})),this.onBlur=(0,I.tH)((function(){gr=!1,e.setState({isBindingEnabled:!0})})),this.onUnload=function(){e.onBlur()},this.disableEvent=function(e){e.preventDefault()},this.resetHistory=function(){e.history.clear()},this.resetScene=(0,I.tH)((function(t){e.scene.replaceAllElements([]),e.setState((function(n){return Gn(Gn({},(0,N.im)()),{},{isLoading:(null==t||!t.resetLoadingState)&&n.isLoading,theme:e.state.theme})})),e.resetHistory()})),this.initializeScene=(0,a.Z)(m().mark((function t(){var n,r,o,i,l;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer(function(){var t=(0,a.Z)(m().mark((function t(n){var r,o;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.files.length){t.next=2;break}return t.abrupt("return");case 2:return r=n.files[0],t.next=5,r.getFile();case 5:o=t.sent,e.loadFileToCanvas(new File([o],o.name||"",{type:o.type}),r);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e.props.theme&&e.setState({theme:e.props.theme}),e.state.isLoading||e.setState({isLoading:!0}),o=null,t.prev=4,t.next=7,e.props.initialData;case 7:if(t.t0=t.sent,t.t0){t.next=10;break}t.t0=null;case 10:o=t.t0,null!==(i=o)&&void 0!==i&&i.libraryItems&&e.library.updateLibrary({libraryItems:o.libraryItems,merge:!0}).catch((function(e){console.error(e)})),t.next=18;break;case 14:t.prev=14,t.t1=t.catch(4),console.error(t.t1),o={appState:{errorMessage:t.t1.message||"Encountered an error during importing or restoring scene data"}};case 18:(l=(0,F.nu)(o,null,null,{repairBindings:!0})).appState=Gn(Gn({},l.appState),{},{theme:e.props.theme||l.appState.theme,openSidebar:(null===(n=l.appState)||void 0===n?void 0:n.openSidebar)||e.state.openSidebar,activeTool:"image"===l.appState.activeTool.type?Gn(Gn({},l.appState.activeTool),{},{type:"selection"}):l.appState.activeTool,isLoading:!1,toast:e.state.toast}),null!==(r=o)&&void 0!==r&&r.scrollToContent&&(l.appState=Gn(Gn({},l.appState),(0,ie.W)(l.elements,Gn(Gn({},l.appState),{},{width:e.state.width,height:e.state.height,offsetTop:e.state.offsetTop,offsetLeft:e.state.offsetLeft}),null))),e.fonts.loadFontsForElements(l.elements),e.resetHistory(),e.syncActionResult(Gn(Gn({},l),{},{commitToHistory:!0}));case 24:case"end":return t.stop()}}),t,null,[[4,14]])}))),this.refreshDeviceState=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height,i=null!=e.props.UIOptions.dockedSidebarBreakpoint?e.props.UIOptions.dockedSidebarBreakpoint:T.sk;e.device=(0,I.v4)(e.device,{isSmScreen:r<T.eF,isMobile:r<T.kV||o<T.Yx&&r<T.sS,canDeviceFitSidebar:r>i})},this.onResize=(0,I.tH)((function(){e.scene.getElementsIncludingDeleted().forEach((function(e){return(0,oe.bI)(e)})),e.setState({})})),this.renderScene=function(){var t={},n={},r={},o={},i={};e.state.collaborators.forEach((function(a,l){if(a.selectedElementIds)for(var c=0,s=Object.keys(a.selectedElementIds);c<s.length;c++){var u=s[c];u in r||(r[u]=[]),r[u].push(l)}a.pointer&&(a.username&&(o[l]=a.username),a.userState&&(i[l]=a.userState),n[l]=(0,I._i)({sceneX:a.pointer.x,sceneY:a.pointer.y},e.state),t[l]=a.button)}));var a=e.scene.getNonDeletedElements().filter((function(t){return(!(0,V.pC)(t)||e.state.pendingImageElementId!==t.id)&&(!e.state.editingElement||"text"!==e.state.editingElement.type||t.id!==e.state.editingElement.id)})),l=getComputedStyle(document.querySelector(".excalidraw")).getPropertyValue("--color-selection");(0,re.Eu)({elements:a,appState:e.state,scale:window.devicePixelRatio,rc:e.rc,canvas:e.canvas,renderConfig:{selectionColor:l,scrollX:e.state.scrollX,scrollY:e.state.scrollY,viewBackgroundColor:e.state.viewBackgroundColor,zoom:e.state.zoom,remotePointerViewportCoords:n,remotePointerButton:t,remoteSelectedElementIds:r,remotePointerUsernames:o,remotePointerUserStates:i,shouldCacheIgnoreZoom:e.state.shouldCacheIgnoreZoom,theme:e.state.theme,imageCache:e.imageCache,isExporting:!1,renderScrollbars:!e.device.isMobile},callback:function(t){var n=t.atLeastOneVisibleElement,r=t.scrollBars;r&&(yr=r);var o=!(0,U.iB)(e.state.editingElement)&&(!n&&a.length>0);e.state.scrolledOutside!==o&&e.setState({scrolledOutside:o}),e.scheduleImageRefresh()}},kr&&!0===window.EXCALIDRAW_THROTTLE_RENDER),kr||(kr=!0)},this.onScroll=(0,I.Ds)((function(){var t=e.getCanvasOffsets(),n=t.offsetTop,r=t.offsetLeft;e.setState((function(e){return e.offsetLeft===r&&e.offsetTop===n?null:{offsetTop:n,offsetLeft:r}}))}),T.HM),this.onCut=(0,I.tH)((function(t){var n;(null===(n=e.excalidrawContainerRef.current)||void 0===n?void 0:n.contains(document.activeElement))&&!(0,I.s)(t.target)&&(e.cutAll(),t.preventDefault(),t.stopPropagation())})),this.onCopy=(0,I.tH)((function(t){var n;(null===(n=e.excalidrawContainerRef.current)||void 0===n?void 0:n.contains(document.activeElement))&&!(0,I.s)(t.target)&&(e.copyAll(),t.preventDefault(),t.stopPropagation())})),this.cutAll=function(){e.actionManager.executeAction(k.ZM,"keyboard")},this.copyAll=function(){e.actionManager.executeAction(k.uN,"keyboard")},this.onTapStart=function(t){if(T.Dt||t.preventDefault(),!fr)return fr=!0,clearTimeout(pr),void(pr=window.setTimeout(Cr.resetTapTwice,T.Gj));if(fr&&1===t.touches.length){var n=(0,o.Z)(t.touches,1)[0];e.handleCanvasDoubleClick({clientX:n.clientX,clientY:n.clientY}),fr=!1,clearTimeout(pr)}T.Dt&&t.preventDefault(),2===t.touches.length&&e.setState({selectedElementIds:{}})},this.onTapEnd=function(t){e.resetContextMenuTimer(),t.touches.length>0?e.setState({previousSelectedElementIds:{},selectedElementIds:e.state.previousSelectedElementIds}):_r.pointers.clear()},this.pasteFromClipboard=(0,I.tH)(function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s,u,d,f,h,g,v;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=!(!Er||!n),a=document.activeElement,l=null===(r=e.excalidrawContainerRef.current)||void 0===r?void 0:r.contains(a),!n||l){t.next=5;break}return t.abrupt("return");case 5:if(c=document.elementFromPoint(hr,mr),!n||c instanceof HTMLCanvasElement&&!(0,I.s)(a)){t.next=8;break}return t.abrupt("return");case 8:return s=null==n||null===(o=n.clipboardData)||void 0===o?void 0:o.files[0],t.next=11,(0,B.mQ)(n,i);case 11:if(u=t.sent,s||!u.text||i||(d=u.text.trim()).startsWith("<svg")&&d.endsWith("</svg>")&&(s=(0,Ye.Pn)(d)),!(0,Ye.Wr)(s)||u.spreadsheet){t.next=20;break}return f=(0,I.dE)({clientX:hr,clientY:mr},e.state),h=f.x,g=f.y,v=e.createImageElement({sceneX:h,sceneY:g}),e.insertImageElement(v,s),e.initializeImageDimensions(v),e.setState({selectedElementIds:(0,p.Z)({},v.id,!0)}),t.abrupt("return");case 20:if(!e.props.onPaste){t.next=32;break}return t.prev=21,t.next=24,e.props.onPaste(u,n);case 24:if(t.t0=t.sent,!1!==t.t0){t.next=27;break}return t.abrupt("return");case 27:t.next=32;break;case 29:t.prev=29,t.t1=t.catch(21),console.error(t.t1);case 32:u.errorMessage?e.setState({errorMessage:u.errorMessage}):u.spreadsheet&&!i?e.setState({pasteDialog:{data:u.spreadsheet,shown:!0}}):u.elements?e.addElementsFromPasteOrLibrary({elements:u.elements,files:u.files||null,position:"cursor",retainSeed:i}):u.text&&e.addTextFromPaste(u.text,i),e.setActiveTool({type:"selection"}),null==n||n.preventDefault();case 35:case"end":return t.stop()}}),t,null,[[21,29]])})));return function(e){return t.apply(this,arguments)}}()),this.addElementsFromPasteOrLibrary=function(t){var n=(0,F.ET)(t.elements,null),a=(0,U.KP)(n),l=(0,o.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3],f=(0,I.TE)(c,u)/2,p=(0,I.TE)(s,d)/2,h="object"===(0,r.Z)(t.position)?t.position.clientX:"cursor"===t.position?hr:e.state.width/2+e.state.offsetLeft,m="object"===(0,r.Z)(t.position)?t.position.clientY:"cursor"===t.position?mr:e.state.height/2+e.state.offsetTop,g=(0,I.dE)({clientX:h,clientY:m},e.state),v=g.x-f,b=g.y-p,y=(0,ne.wC)(v,b,e.state.gridSize),x=(0,o.Z)(y,2),w=x[0],k=x[1],E=(0,Y._N)(n.map((function(e){return(0,_.BE)(e,{x:e.x+w-c,y:e.y+k-s})})),{randomizeSeed:!t.retainSeed}),j=[].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),(0,i.Z)(E));e.scene.replaceAllElements(j),E.forEach((function(e){if((0,U.iB)(e)&&(0,V.Xh)(e)){var t=(0,Pe.tl)(e);(0,U.oN)(e,t)}})),t.files&&(e.files=Gn(Gn({},e.files),t.files)),e.history.resumeRecording(),e.setState((0,J.bO)(Gn(Gn({},e.state),{},{openSidebar:e.state.openSidebar&&e.device.canDeviceFitSidebar&&e.state.defaultSidebarDockedPreference?e.state.openSidebar:null,selectedElementIds:E.reduce((function(e,t){return(0,V.Xh)(t)||(e[t.id]=!0),e}),{}),selectedGroupIds:{}}),e.scene.getNonDeletedElements()),(function(){t.files&&e.addNewImagesToImageCache()})),e.setActiveTool({type:"selection"})},this.setAppState=function(t,n){e.setState(t,n)},this.removePointer=function(t){xr&&e.resetContextMenuTimer(),_r.pointers.delete(t.pointerId)},this.toggleLock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ui";e.state.activeTool.locked||(0,L.L)("toolbar","toggleLock","".concat(t," (").concat(e.device.isMobile?"mobile":"desktop",")")),e.setState((function(t){return{activeTool:Gn(Gn(Gn({},t.activeTool),(0,I.Om)(e.state,t.activeTool.locked?{type:"selection"}:t.activeTool)),{},{locked:!t.activeTool.locked})}}))},this.togglePenMode=function(){e.setState((function(e){return{penMode:!e.penMode}}))},this.onHandToolToggle=function(){e.actionManager.executeAction(Bn.eF)},this.zoomCanvas=function(t){e.setState(Gn({},(0,le.E)({viewportX:e.state.width/2+e.state.offsetLeft,viewportY:e.state.height/2+e.state.offsetTop,nextZoom:(0,ie.j)(t)},e.state)))},this.cancelInProgresAnimation=null,this.scrollToContent=function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.scene.getNonDeletedElements(),r=arguments.length>1?arguments[1]:void 0;null===(t=e.cancelInProgresAnimation)||void 0===t||t.call(e);var o=Array.isArray(n)?n:[n],i=e.state.zoom,a=e.state.scrollX,l=e.state.scrollY;if(null!=r&&r.fitToContent){var c=(0,Bn.md)(o,e.state,!1),s=c.appState;i=s.zoom,a=s.scrollX,l=s.scrollY}else{var u=(0,ie.W)(o,e.state,e.canvas);a=u.scrollX,l=u.scrollY}if(null!=r&&r.animate){var d,f=e.state.scrollX,p=e.state.scrollY;e.zoomCanvas(i.value);var h=(0,I.B4)([f,p],[a,l],(function(t,n){return e.setState({scrollX:t,scrollY:n})}),{duration:null!==(d=null==r?void 0:r.duration)&&void 0!==d?d:500});e.cancelInProgresAnimation=function(){h(),e.cancelInProgresAnimation=null}}else e.setState({scrollX:a,scrollY:l,zoom:i})},this.translateCanvas=function(t){var n;null===(n=e.cancelInProgresAnimation)||void 0===n||n.call(e),e.setState(t)},this.setToast=function(t){e.setState({toast:t})},this.restoreFileFromShare=(0,a.Z)(m().mark((function t(){var n,r,o,i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,caches.open("web-share-target");case 3:return n=t.sent,t.next=6,n.match("shared-file");case 6:if(!(r=t.sent)){t.next=16;break}return t.next=10,r.blob();case 10:return o=t.sent,i=new File([o],o.name||"",{type:o.type}),e.loadFileToCanvas(i,null),t.next=15,n.delete("shared-file");case 15:window.history.replaceState(null,T.iC,window.location.pathname);case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),e.setState({errorMessage:t.t0.message});case 21:case"end":return t.stop()}}),t,null,[[0,18]])}))),this.addFiles=(0,I.tH)((function(t){var n=t.reduce((function(e,t){return e.set(t.id,t),e}),new Map);e.files=Gn(Gn({},e.files),Object.fromEntries(n)),e.scene.getNonDeletedElements().forEach((function(t){(0,V.wi)(t)&&n.has(t.fileId)&&(e.imageCache.delete(t.fileId),(0,oe.bI)(t))})),e.scene.informMutation(),e.addNewImagesToImageCache()})),this.updateScene=(0,I.tH)((function(t){t.commitToHistory&&e.history.resumeRecording(),t.appState&&e.setState(t.appState),t.elements&&e.scene.replaceAllElements((0,Y.wc)(t.elements)),t.collaborators&&e.setState({collaborators:t.collaborators})})),this.onSceneUpdated=function(){e.setState({})},this.toggleSidebar=function(t){var n,r,o=t.name,i=t.tab,a=t.force;void 0===a?n=(null===(r=e.state.openSidebar)||void 0===r?void 0:r.name)===o?null:o:n=a?o:null;return e.setState({openSidebar:n?{name:n,tab:i}:null}),!!n},this.updateCurrentCursorPosition=(0,I.tH)((function(e){hr=e.clientX,mr=e.clientY})),this.onKeyDown=(0,I.tH)((function(t){if("Proxy"in window&&(!t.shiftKey&&/^[A-Z]$/.test(t.key)||t.shiftKey&&/^[a-z]$/.test(t.key))&&(t=new Proxy(t,{get:function(e,n){var r=e[n];return"function"==typeof r?r.bind(e):"key"===n?t.shiftKey?e.key.toUpperCase():e.key.toLowerCase():r}})),t[O.tW.CTRL_OR_CMD]&&t.key.toLowerCase()===O.tW.V&&(Er=t.shiftKey,clearTimeout(jr),jr=window.setTimeout((function(){Er=!1}),100)),!t[O.tW.CTRL_OR_CMD]||!(0,I.s)(t.target)||t.code!==O.aU.MINUS&&t.code!==O.aU.EQUAL){if(!((0,I.s)(t.target)&&t.key!==O.tW.ESCAPE||(0,O.Wl)(t.key)&&(0,I._Z)(t.target)))if(t.key!==O.tW.QUESTION_MARK)if(t.key.toLowerCase()===O.tW.E&&t.shiftKey&&t[O.tW.CTRL_OR_CMD])e.setState({openDialog:"imageExport"});else{if(t.key===O.tW.PAGE_UP||t.key===O.tW.PAGE_DOWN){var n=(t.shiftKey?e.state.width:e.state.height)/e.state.zoom.value;t.key===O.tW.PAGE_DOWN&&(n=-n),t.shiftKey?e.translateCanvas((function(e){return{scrollX:e.scrollX+n}})):e.translateCanvas((function(e){return{scrollY:e.scrollY+n}}))}if(!e.actionManager.handleKeyDown(t)&&!e.state.viewModeEnabled){if(t[O.tW.CTRL_OR_CMD]&&e.state.isBindingEnabled&&e.setState({isBindingEnabled:!1}),(0,O.Wl)(t.key)){var r=e.state.gridSize&&(t.shiftKey?T.$e:e.state.gridSize)||(t.shiftKey?T.Iw:T.$e),o=0,i=0;t.key===O.tW.ARROW_LEFT?o=-r:t.key===O.tW.ARROW_RIGHT?o=r:t.key===O.tW.ARROW_UP?i=-r:t.key===O.tW.ARROW_DOWN&&(i=r);var a=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state,!0);a.forEach((function(e){(0,_.DR)(e,{x:e.x+o,y:e.y+i}),(0,C.Ww)(e,{simultaneouslyUpdated:a})})),e.maybeSuggestBindingForAll(a),t.preventDefault()}else if(t.key===O.tW.ENTER){var l=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state);if(1===l.length){var c=l[0];if(t[O.tW.CTRL_OR_CMD])(0,V.bt)(c)&&(e.state.editingLinearElement&&e.state.editingLinearElement.elementId===l[0].id||(e.history.resumeRecording(),e.setState({editingLinearElement:new K._(c,e.scene)})));else if((0,U.iB)(c)||(0,Pe.Zr)(c)){var s;(0,U.iB)(c)||(s=c);var u=(0,Pe.TP)(c,e.state),d=u.x,f=u.y;return e.startTextEditing({sceneX:d,sceneY:f,container:s}),void t.preventDefault()}}}else if(!t.ctrlKey&&!t.altKey&&!t.metaKey&&null===e.state.draggingElement){var p=function(e){var t=ce.find((function(t,n){return null!=t.numericKey&&e===t.numericKey.toString()||t.key&&("string"==typeof t.key?t.key===e:t.key.includes(e))}));return(null==t?void 0:t.value)||null}(t.key);p?(e.state.activeTool.type!==p&&(0,L.L)("toolbar",p,"keyboard (".concat(e.device.isMobile?"mobile":"desktop",")")),e.setActiveTool({type:p}),t.stopPropagation()):t.key===O.tW.Q&&(e.toggleLock("keyboard"),t.stopPropagation())}if(t.key===O.tW.SPACE&&0===_r.pointers.size&&(gr=!0,(0,I.KJ)(e.canvas,T.oc.GRAB),t.preventDefault()),!(t.key!==O.tW.G&&t.key!==O.tW.S||t.altKey||t[O.tW.CTRL_OR_CMD])){var h=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state);if("selection"===e.state.activeTool.type&&!h.length)return;t.key===O.tW.G&&((0,ie.$b)(e.state.activeTool.type)||h.some((function(e){return(0,ie.$b)(e.type)})))&&(e.setState({openPopup:"backgroundColorPicker"}),t.stopPropagation()),t.key===O.tW.S&&(e.setState({openPopup:"strokeColorPicker"}),t.stopPropagation())}!t[O.tW.CTRL_OR_CMD]||t.key!==O.tW.BACKSPACE&&t.key!==O.tW.DELETE||an.e_.set(sn.w,"clearCanvas")}}else e.setState({openDialog:"help"})}else t.preventDefault()})),this.onWheel=(0,I.tH)((function(e){e.target instanceof HTMLCanvasElement||!e.ctrlKey||e.preventDefault()})),this.onKeyUp=(0,I.tH)((function(t){if(t.key===O.tW.SPACE&&(e.state.viewModeEnabled?(0,I.KJ)(e.canvas,T.oc.GRAB):"selection"===e.state.activeTool.type?(0,I.z8)(e.canvas):((0,I.Uk)(e.canvas,e.state),e.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),gr=!1),t[O.tW.CTRL_OR_CMD]||e.state.isBindingEnabled||e.setState({isBindingEnabled:!0}),(0,O.Wl)(t.key)){var n=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state);(0,C.N1)(e.state)?(0,C.el)(n):(0,C.H)(n),e.setState({suggestedBindings:[]})}})),this.setActiveTool=function(t){var n=(0,I.Om)(e.state,t);"hand"===n.type?(0,I.KJ)(e.canvas,T.oc.GRAB):gr||(0,I.Uk)(e.canvas,e.state),(0,I.wO)(document.activeElement)&&e.focusContainer(),(0,V.dt)(n.type)||e.setState({suggestedBindings:[]}),"image"===n.type&&e.onImageAction(),"selection"!==n.type?e.setState({activeTool:n,selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}):e.setState({activeTool:n})},this.setCursor=function(t){(0,I.KJ)(e.canvas,t)},this.resetCursor=function(){(0,I.z8)(e.canvas)},this.isTouchScreenMultiTouchGesture=function(){return _r.pointers.size>=2},this.onGestureStart=(0,I.tH)((function(t){t.preventDefault(),e.isTouchScreenMultiTouchGesture()&&e.setState({selectedElementIds:{}}),_r.initialScale=e.state.zoom.value})),this.onGestureChange=(0,I.tH)((function(t){if(t.preventDefault(),!e.isTouchScreenMultiTouchGesture()){var n=_r.initialScale;n&&e.setState((function(e){return Gn({},(0,le.E)({viewportX:hr,viewportY:mr,nextZoom:(0,ie.j)(n*t.scale)},e))}))}})),this.onGestureEnd=(0,I.tH)((function(t){t.preventDefault(),e.isTouchScreenMultiTouchGesture()&&e.setState({previousSelectedElementIds:{},selectedElementIds:e.state.previousSelectedElementIds}),_r.initialScale=null})),this.startTextEditing=function(t){var n,r,o,a,l=t.sceneX,c=t.sceneY,s=t.insertAtParentCenter,u=void 0===s||s,d=t.container,f=!1,p=u&&e.getTextWysiwygSnappedToCenterPosition(l,c,e.state,d);d&&p&&(f=!0);var h=null,m=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state),g=(null===(n=h=1===m.length?(0,U.iB)(m[0])?m[0]:d?(0,Pe.WJ)(m[0]):e.getTextElementAtPosition(l,c):e.getTextElementAtPosition(l,c))||void 0===n?void 0:n.fontFamily)||e.state.currentItemFontFamily,v=(null===(r=h)||void 0===r?void 0:r.lineHeight)||(0,Pe.PT)(g),b=e.state.currentItemFontSize;if(!h&&f&&d&&!(0,V.Yv)(d)){var y={fontSize:b,fontFamily:g},x=(0,Pe.AT)((0,I.mO)(y),v),w=(0,Pe.w_)(b,v),k=(0,Pe.HE)(d),E=Math.max(k.height,w),j=Math.max(k.width,x);(0,_.DR)(d,{height:E,width:j}),l=d.x+j/2,c=d.y+E/2,p&&(p=e.getTextWysiwygSnappedToCenterPosition(l,c,e.state,d))}var S=h||(0,U.VL)({x:p?p.elementCenterX:l,y:p?p.elementCenterY:c,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,text:"",fontSize:b,fontFamily:g,textAlign:p?"center":e.state.currentItemTextAlign,verticalAlign:p?T.oX.MIDDLE:T.hs,containerId:f?null==d?void 0:d.id:void 0,groupIds:null!==(o=null==d?void 0:d.groupIds)&&void 0!==o?o:[],lineHeight:v,angle:null!==(a=null==d?void 0:d.angle)&&void 0!==a?a:0});if(!h&&f&&d&&(0,_.DR)(d,{boundElements:(d.boundElements||[]).concat({type:"text",id:S.id})}),e.setState({editingElement:S}),!h)if(d&&f){var O=e.scene.getElementIndex(d.id);e.scene.insertElementAtIndex(S,O+1)}else e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[S]));e.setState({editingElement:S}),e.handleTextWysiwyg(S,{isExistingElement:!!h})},this.handleCanvasDoubleClick=function(t){if(!e.state.multiElement&&"selection"===e.state.activeTool.type){var n=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state);if(1===n.length&&(0,V.bt)(n[0])){if(t[O.tW.CTRL_OR_CMD]&&(!e.state.editingLinearElement||e.state.editingLinearElement.elementId!==n[0].id))return e.history.resumeRecording(),void e.setState({editingLinearElement:new K._(n[0],e.scene)});if(e.state.editingLinearElement&&e.state.editingLinearElement.elementId===n[0].id)return}(0,I.z8)(e.canvas);var r=(0,I.dE)(t,e.state),o=r.x,i=r.y;if((0,J.iJ)(e.state).length>0){var a=e.getElementAtPosition(o,i),l=a&&(0,J.YS)(a,e.state.selectedGroupIds);if(l)return void e.setState((function(t){return(0,J.bO)(Gn(Gn({},t),{},{editingGroupId:l,selectedElementIds:(0,p.Z)({},a.id,!0),selectedGroupIds:{}}),e.scene.getNonDeletedElements())}))}if((0,I.z8)(e.canvas),!t[O.tW.CTRL_OR_CMD]&&!e.state.viewModeEnabled){var c=(0,Pe.OW)(e.scene.getNonDeletedElements(),e.state,o,i);if(c&&((0,V.Xo)(c)||!(0,I.Qm)(c.backgroundColor)||(0,An.Qu)(c,e.state,[o,i]))){var s=(0,Pe.TP)(c,e.state);o=s.x,i=s.y}e.startTextEditing({sceneX:o,sceneY:i,insertAtParentCenter:!t.altKey,container:c})}}},this.getElementLinkAtPosition=function(t,n){var r=e.scene.getNonDeletedElements().slice().reverse(),o=1/0;return r.find((function(r,i){return n&&r.id===n.id&&(o=i),r.link&&i<=o&&(0,Ln.wq)(r,e.state,[t.x,t.y],e.device.isMobile)}))},this.redirectToLink=function(t,n){var r=(0,ne.LW)(e.lastPointerDown.clientX,e.lastPointerDown.clientY,e.lastPointerUp.clientX,e.lastPointerUp.clientY);if(!(!e.hitLinkElement||n&&r>T.f||!n&&0!==r)){var o=(0,I.dE)(e.lastPointerDown,e.state),i=(0,Ln.wq)(e.hitLinkElement,e.state,[o.x,o.y],e.device.isMobile),a=(0,I.dE)(e.lastPointerUp,e.state),l=(0,Ln.wq)(e.hitLinkElement,e.state,[a.x,a.y],e.device.isMobile);if(i&&l){var c,s,u=e.hitLinkElement.link;if(u)if(e.props.onLinkOpen&&(s=(0,I.ag)(T.Ks.EXCALIDRAW_LINK,t.nativeEvent),e.props.onLinkOpen(e.hitLinkElement,s)),null===(c=s)||void 0===c||!c.defaultPrevented){var d=(0,Ln.q$)(u)?"_self":"_blank",f=window.open(void 0,d);f&&(f.opener=null,f.location=(0,Ln.$u)(u))}}}},this.handleCanvasPointerMove=function(t){e.savePointer(t.clientX,t.clientY,e.state.cursorButton),_r.pointers.has(t.pointerId)&&_r.pointers.set(t.pointerId,{x:t.clientX,y:t.clientY});var n=_r.initialScale;if(2===_r.pointers.size&&_r.lastCenter&&n&&_r.initialDistance){var r=G(_r.pointers),a=r.x-_r.lastCenter.x,l=r.y-_r.lastCenter.y;_r.lastCenter=r;var c=X(Array.from(_r.pointers.values())),s="freedraw"===e.state.activeTool.type&&e.state.penMode?1:c/_r.initialDistance,u=s?(0,ie.j)(n*s):e.state.zoom.value;e.setState((function(t){var n=(0,le.E)({viewportX:r.x,viewportY:r.y,nextZoom:u},t);e.translateCanvas({zoom:n.zoom,scrollX:n.scrollX+a/u,scrollY:n.scrollY+l/u,shouldCacheIgnoreZoom:!0})})),e.resetShouldCacheIgnoreZoomDebounced()}else _r.lastCenter=_r.initialDistance=_r.initialScale=null;if(!(gr||vr||br||(0,N.l$)(e.state))){var d=(0,ie._4)(yr,t.clientX-e.state.offsetLeft,t.clientY-e.state.offsetTop).isOverEither;e.state.draggingElement||e.state.multiElement||(d?(0,I.z8)(e.canvas):(0,I.Uk)(e.canvas,e.state));var f=(0,I.dE)(t,e.state),p=f.x,h=f.y;if(e.state.editingLinearElement&&!e.state.editingLinearElement.isDragging){var m=K._.handlePointerMove(t,p,h,e.state);m&&m!==e.state.editingLinearElement&&(0,b.flushSync)((function(){e.setState({editingLinearElement:m})})),null!=(null==m?void 0:m.lastUncommittedPoint)?e.maybeSuggestBindingAtCursor(f):(0,b.flushSync)((function(){e.setState({suggestedBindings:[]})}))}if((0,V.Lx)(e.state.activeTool.type)){var g=e.state.draggingElement;(0,V.Mn)(g,!1)?e.maybeSuggestBindingsForLinearElementAtCoords(g,[f],e.state.startBoundElement):e.maybeSuggestBindingAtCursor(f)}if(e.state.multiElement){var v=e.state.multiElement,y=v.x,x=v.y,w=v.points,k=v.lastCommittedPoint,E=w[w.length-1];if((0,I.Uk)(e.canvas,e.state),E===k)(0,ne.LW)(p-y,h-x,E[0],E[1])>=T.qx?(0,_.DR)(v,{points:[].concat((0,i.Z)(w),[[p-y,h-x]])}):(0,I.KJ)(e.canvas,T.oc.POINTER);else if(w.length>2&&k&&(0,ne.LW)(p-y,h-x,k[0],k[1])<T.qx)(0,I.KJ)(e.canvas,T.oc.POINTER),(0,_.DR)(v,{points:w.slice(0,-1)});else{var j,S=(0,ne.wC)(p,h,e.state.gridSize),C=(0,o.Z)(S,2),P=C[0],M=C[1],D=null!==(j=null==v?void 0:v.lastCommittedPoint)&&void 0!==j?j:[0,0],A=(0,o.Z)(D,2),L=A[0],Z=A[1],z=P-y-L,R=M-x-Z;if((0,O.Ge)(t)){var B=(0,U.o4)(L+y,Z+x,P,M);z=B.width,R=B.height}(0,ne.g6)(w,e.state.zoom.value)&&(0,I.KJ)(e.canvas,T.oc.POINTER),(0,_.DR)(v,{points:[].concat((0,i.Z)(w.slice(0,-1)),[[L+z,Z+R]])})}}else{if(!(Boolean(t.buttons)||"selection"!==e.state.activeTool.type&&"text"!==e.state.activeTool.type&&"eraser"!==e.state.activeTool.type)){var H=e.scene.getNonDeletedElements(),W=(0,ie.eD)(H,e.state);if(1!==W.length||d||e.state.editingLinearElement){if(W.length>1&&!d){var F=(0,U.n2)((0,U.KP)(W),p,h,e.state.zoom,t.pointerType);if(F)return void(0,I.KJ)(e.canvas,(0,U.Un)({transformHandleType:F}))}}else{var Y=(0,U.jt)(H,e.state,p,h,e.state.zoom,t.pointerType);if(Y&&Y.transformHandleType)return void(0,I.KJ)(e.canvas,(0,U.Un)(Y))}var q=e.getElementAtPosition(f.x,f.y);e.hitLinkElement=e.getElementLinkAtPosition(f,q),(0,N.EN)(e.state)||(e.hitLinkElement&&!e.state.selectedElementIds[e.hitLinkElement.id]?((0,I.KJ)(e.canvas,T.oc.POINTER),(0,Ln.Pp)(e.hitLinkElement,e.state)):((0,Ln.lV)(),q&&q.link&&e.state.selectedElementIds[q.id]&&!e.state.contextMenu&&!e.state.showHyperlinkPopup?e.setState({showHyperlinkPopup:"info"}):"text"===e.state.activeTool.type?(0,I.KJ)(e.canvas,(0,U.iB)(q)?T.oc.TEXT:T.oc.CROSSHAIR):e.state.viewModeEnabled?(0,I.KJ)(e.canvas,T.oc.GRAB):d?(0,I.KJ)(e.canvas,T.oc.AUTO):e.state.selectedLinearElement?e.handleHoverSelectedLinearElement(e.state.selectedLinearElement,p,h):t[O.tW.CTRL_OR_CMD]?(0,I.KJ)(e.canvas,T.oc.AUTO):!q&&!e.isHittingCommonBoundingBoxOfSelectedElements(f,W)||null!=q&&q.locked||(0,I.KJ)(e.canvas,T.oc.MOVE)))}}}},this.handleEraser=function(t,n,r){for(var o=function(e){e.forEach((function(e){e.locked||(i.push(e.id),t.altKey?n.elementIdsToErase[e.id]&&n.elementIdsToErase[e.id].erase&&(n.elementIdsToErase[e.id].erase=!1):n.elementIdsToErase[e.id]||(n.elementIdsToErase[e.id]={erase:!0,opacity:e.opacity}))}))},i=[],a=(0,ne.LW)(n.lastCoords.x,n.lastCoords.y,r.x,r.y),l=10/e.state.zoom.value,c=Gn({},n.lastCoords),s=0;s<=a;){if(o(e.getElementsAtPosition(c.x,c.y)),s===a)break;var u=(s=Math.min(s+l,a))/a,d=(1-u)*c.x+u*r.x,f=(1-u)*c.y+u*r.y;c.x=d,c.y=f}var p=e.scene.getElementsIncludingDeleted().map((function(e){var r=(0,V.Xh)(e)&&i.includes(e.containerId)?e.containerId:e.id;if(i.includes(r)){if(!t.altKey)return(0,_.BE)(e,{opacity:T.xY});if(n.elementIdsToErase[r]&&!1===n.elementIdsToErase[r].erase)return(0,_.BE)(e,{opacity:n.elementIdsToErase[r].opacity})}return e}));e.scene.replaceAllElements(p),n.lastCoords.x=r.x,n.lastCoords.y=r.y},this.handleTouchMove=function(e){wr=!0},this.handleCanvasPointerDown=function(t){var n,r;if(e.state.contextMenu&&e.setState({contextMenu:null}),e.updateGestureOnPointerDown(t),"touch"===t.pointerType&&e.state.draggingElement&&"freedraw"===e.state.draggingElement.type){var o=e.state.draggingElement;e.updateScene(Gn(Gn({},o.points.length<10?{elements:e.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==o.id}))}:{}),{},{appState:{draggingElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:Object.keys(e.state.selectedElementIds).filter((function(e){return e!==o.id})).reduce((function(t,n){return t[n]=e.state.selectedElementIds[n],t}),{})}}))}else{var i=document.getSelection();if(null!=i&&i.anchorNode&&i.removeAllRanges(),e.maybeOpenContextMenuAfterPointerDownOnTouchDevices(t),e.maybeCleanupAfterMissingPointerUp(t),e.state.penDetected||"pen"!==t.pointerType||e.setState((function(e){return{penMode:!0,penDetected:!0}})),!e.device.isTouchScreen&&["pen","touch"].includes(t.pointerType)&&(e.device=(0,I.v4)(e.device,{isTouchScreen:!0})),!vr&&(e.lastPointerDown=t,e.setState({lastPointerDownWith:t.pointerType,cursorButton:"down"}),e.savePointer(t.clientX,t.clientY,"down"),!e.handleCanvasPanUsingWheelOrSpaceDrag(t)&&!(t.button!==T.Oh.MAIN&&t.button!==T.Oh.TOUCH||_r.pointers.size>1))){var a=e.initialPointerDownState(t);if(!e.handleDraggingScrollBar(t,a))if(e.clearSelectionIfNotUsingSelection(),e.updateBindingEnabledOnPointerMove(t),!e.handleSelectionOnPointerDown(t,a))if(!e.state.penMode||"touch"!==t.pointerType||"selection"===e.state.activeTool.type||"text"===e.state.activeTool.type||"image"===e.state.activeTool.type)if("text"!==e.state.activeTool.type){if("arrow"===e.state.activeTool.type||"line"===e.state.activeTool.type)e.handleLinearElementOnPointerDown(t,e.state.activeTool.type,a);else if("image"===e.state.activeTool.type){(0,I.KJ)(e.canvas,T.oc.CROSSHAIR);var l=e.state.pendingImageElementId&&e.scene.getElement(e.state.pendingImageElementId);if(!l)return;e.setState({draggingElement:l,editingElement:l,pendingImageElementId:null,multiElement:null});var c=(0,I.dE)(t,e.state),s=c.x,u=c.y;(0,_.DR)(l,{x:s,y:u})}else"freedraw"===e.state.activeTool.type?e.handleFreeDrawElementOnPointerDown(t,e.state.activeTool.type,a):"custom"===e.state.activeTool.type?(0,I.KJ)(e.canvas,T.oc.AUTO):"eraser"!==e.state.activeTool.type&&"hand"!==e.state.activeTool.type&&e.createGenericElementOnPointerDown(e.state.activeTool.type,a);null===(n=e.props)||void 0===n||null===(r=n.onPointerDown)||void 0===r||r.call(n,e.state.activeTool,a);var d=e.onPointerMoveFromPointerDownHandler(a),f=e.onPointerUpFromPointerDownHandler(a),p=e.onKeyDownFromPointerDownHandler(a),h=e.onKeyUpFromPointerDownHandler(a);Or=f,e.state.viewModeEnabled||(window.addEventListener(T.Ks.POINTER_MOVE,d),window.addEventListener(T.Ks.POINTER_UP,f),window.addEventListener(T.Ks.KEYDOWN,p),window.addEventListener(T.Ks.KEYUP,h),a.eventListeners.onMove=d,a.eventListeners.onUp=f,a.eventListeners.onKeyUp=h,a.eventListeners.onKeyDown=p)}else e.handleTextOnPointerDown(t,a)}}},this.handleCanvasPointerUp=function(t){if(e.lastPointerUp=t,e.device.isTouchScreen){var n=(0,I.dE)({clientX:t.clientX,clientY:t.clientY},e.state),r=e.getElementAtPosition(n.x,n.y);e.hitLinkElement=e.getElementLinkAtPosition(n,r)}e.hitLinkElement&&!e.state.selectedElementIds[e.hitLinkElement.id]&&e.redirectToLink(t,e.device.isTouchScreen),e.removePointer(t)},this.maybeOpenContextMenuAfterPointerDownOnTouchDevices=function(t){"touch"===t.pointerType&&(wr=!1,xr?wr=!0:xr=window.setTimeout((function(){xr=0,wr||e.handleCanvasContextMenu(t)}),T.nM))},this.resetContextMenuTimer=function(){clearTimeout(xr),xr=0,wr=!1},this.handleCanvasPanUsingWheelOrSpaceDrag=function(t){if(!(_r.pointers.size<=1&&(t.button===T.Oh.WHEEL||t.button===T.Oh.MAIN&&gr||(0,N.l$)(e.state)||e.state.viewModeEnabled))||(0,U.iB)(e.state.editingElement))return!1;vr=!0,t.preventDefault();var n=!1,r=/Linux/.test(window.navigator.platform);(0,I.KJ)(e.canvas,T.oc.GRABBING);var o=t.clientX,i=t.clientY,a=(0,I.$9)((function(t){var a=o-t.clientX,l=i-t.clientY;if(o=t.clientX,i=t.clientY,r&&!n&&(Math.abs(a)>1||Math.abs(l)>1)){n=!0;var c=function e(t){document.body.removeEventListener(T.Ks.PASTE,e),t.stopPropagation()};document.body.addEventListener(T.Ks.PASTE,c),window.addEventListener(T.Ks.POINTER_UP,(function e(){setTimeout((function(){document.body.removeEventListener(T.Ks.PASTE,c),window.removeEventListener(T.Ks.POINTER_UP,e)}),100)}))}e.translateCanvas({scrollX:e.state.scrollX-a/e.state.zoom.value,scrollY:e.state.scrollY-l/e.state.zoom.value})})),l=(0,I.tH)(Or=function(){Or=null,vr=!1,gr||(e.state.viewModeEnabled?(0,I.KJ)(e.canvas,T.oc.GRAB):(0,I.Uk)(e.canvas,e.state)),e.setState({cursorButton:"up"}),e.savePointer(t.clientX,t.clientY,"up"),window.removeEventListener(T.Ks.POINTER_MOVE,a),window.removeEventListener(T.Ks.POINTER_UP,l),window.removeEventListener(T.Ks.BLUR,l),a.flush()});return window.addEventListener(T.Ks.BLUR,l),window.addEventListener(T.Ks.POINTER_MOVE,a,{passive:!0}),window.addEventListener(T.Ks.POINTER_UP,l),!0},this.clearSelectionIfNotUsingSelection=function(){"selection"!==e.state.activeTool.type&&e.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})},this.handleSelectionOnPointerDown=function(t,n){if("selection"===e.state.activeTool.type){var r=e.scene.getNonDeletedElements(),o=(0,ie.eD)(r,e.state);if(1!==o.length||e.state.editingLinearElement)o.length>1&&(n.resize.handleType=(0,U.n2)((0,U.KP)(o),n.origin.x,n.origin.y,e.state.zoom,t.pointerType));else{var i=(0,U.jt)(r,e.state,n.origin.x,n.origin.y,e.state.zoom,t.pointerType);null!=i&&(e.setState({resizingElement:i.element}),n.resize.handleType=i.transformHandleType)}if(n.resize.handleType)(0,I.KJ)(e.canvas,(0,U.Un)({transformHandleType:n.resize.handleType})),n.resize.isResizing=!0,n.resize.offset=(0,I.AK)((0,U.xx)(n.resize.handleType,o,n.origin.x,n.origin.y)),1===o.length&&(0,V.bt)(o[0])&&2===o[0].points.length&&(n.resize.arrowDirection=(0,U.T)(n.resize.handleType,o[0]));else{var a;if(e.state.selectedLinearElement){var l=e.state.editingLinearElement||e.state.selectedLinearElement,c=K._.handlePointerDown(t,e.state,e.history,n.origin,l);if(c.hitElement&&(n.hit.element=c.hitElement),c.linearElementEditor&&(e.setState({selectedLinearElement:c.linearElementEditor}),e.state.editingLinearElement&&e.setState({editingLinearElement:c.linearElementEditor})),c.didAddPoint)return!0}if(n.hit.element=null!==(a=n.hit.element)&&void 0!==a?a:e.getElementAtPosition(n.origin.x,n.origin.y),n.hit.element)if(e.getElementLinkAtPosition({x:n.origin.x,y:n.origin.y},n.hit.element))return!1;n.hit.allHitElements=e.getElementsAtPosition(n.origin.x,n.origin.y);var s=n.hit.element,u=n.hit.allHitElements.some((function(t){return e.isASelectedElement(t)}));if(null!==s&&u||t.shiftKey||n.hit.hasHitCommonBoundingBoxOfSelectedElements||e.clearSelection(s),e.state.editingLinearElement)e.setState({selectedElementIds:(0,p.Z)({},e.state.editingLinearElement.elementId,!0)});else if(null!=s){if(t[O.tW.CTRL_OR_CMD])return e.state.selectedElementIds[s.id]||(n.hit.wasAddedToSelection=!0),e.setState((function(t){return Gn(Gn({},(0,J.iE)(t,s)),{},{previousSelectedElementIds:e.state.selectedElementIds})})),!1;e.state.selectedElementIds[s.id]||(e.state.editingGroupId&&!(0,J.Nd)(s,e.state.editingGroupId)&&e.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}),u||n.hit.hasHitCommonBoundingBoxOfSelectedElements||(e.setState((function(t){return(0,J.bO)(Gn(Gn({},t),{},{selectedElementIds:Gn(Gn({},t.selectedElementIds),{},(0,p.Z)({},s.id,!0)),showHyperlinkPopup:!!s.link&&"info"}),e.scene.getNonDeletedElements())})),n.hit.wasAddedToSelection=!0))}e.setState({previousSelectedElementIds:e.state.selectedElementIds})}}return!1},this.handleTextOnPointerDown=function(t,n){if(!(0,U.iB)(e.state.editingElement)){var r=n.origin.x,o=n.origin.y,i=e.getElementAtPosition(r,o,{includeBoundTextElement:!0}),a=(0,Pe.OW)(e.scene.getNonDeletedElements(),e.state,r,o);(0,V.Xo)(i)&&(a=i,r=i.x+i.width/2,o=i.y+i.height/2),e.startTextEditing({sceneX:r,sceneY:o,insertAtParentCenter:!t.altKey,container:a}),(0,I.z8)(e.canvas),e.state.activeTool.locked||e.setState({activeTool:(0,I.Om)(e.state,{type:"selection"})})}},this.handleFreeDrawElementOnPointerDown=function(t,n,r){var a=(0,ne.wC)(r.origin.x,r.origin.y,null),l=(0,o.Z)(a,2),c=l[0],s=l[1],u=(0,Y.KE)({type:n,x:c,y:s,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,roundness:null,simulatePressure:.5===t.pressure,locked:!1});e.setState((function(e){return{selectedElementIds:Gn(Gn({},e.selectedElementIds),{},(0,p.Z)({},u.id,!1))}}));var d=u.simulatePressure?u.pressures:[].concat((0,i.Z)(u.pressures),[t.pressure]);(0,_.DR)(u,{points:[[0,0]],pressures:d});var f=(0,C.Y9)(r.origin,e.scene);e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[u])),e.setState({draggingElement:u,editingElement:u,startBoundElement:f,suggestedBindings:[]})},this.createImageElement=function(t){var n=t.sceneX,r=t.sceneY,i=(0,ne.wC)(n,r,e.state.gridSize),a=(0,o.Z)(i,2),l=a[0],c=a[1];return(0,U.vw)({type:"image",x:l,y:c,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,roundness:null,opacity:e.state.currentItemOpacity,locked:!1})},this.handleLinearElementOnPointerDown=function(t,n,r){if(e.state.multiElement){var a=e.state.multiElement;if("line"===a.type&&(0,ne.g6)(a.points,e.state.zoom.value))return(0,_.DR)(a,{lastCommittedPoint:a.points[a.points.length-1]}),void e.actionManager.executeAction(k.pL);var l=a.x,c=a.y,s=a.lastCommittedPoint;if(a.points.length>1&&s&&(0,ne.LW)(r.origin.x-l,r.origin.y-c,s[0],s[1])<T.qx)return void e.actionManager.executeAction(k.pL);e.setState((function(e){return{selectedElementIds:Gn(Gn({},e.selectedElementIds),{},(0,p.Z)({},a.id,!0))}})),(0,_.DR)(a,{lastCommittedPoint:a.points[a.points.length-1]}),(0,I.KJ)(e.canvas,T.oc.POINTER)}else{var u=(0,ne.wC)(r.origin.x,r.origin.y,e.state.gridSize),d=(0,o.Z)(u,2),f=d[0],h=d[1],m=e.state,g=m.currentItemStartArrowhead,v=m.currentItemEndArrowhead,b="arrow"===n?[g,v]:[null,null],y=(0,o.Z)(b,2),x=y[0],w=y[1],E=(0,U.y8)({type:n,x:f,y:h,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,roundness:"round"===e.state.currentItemRoundness?{type:T.a6.PROPORTIONAL_RADIUS}:null,startArrowhead:x,endArrowhead:w,locked:!1});e.setState((function(e){return{selectedElementIds:Gn(Gn({},e.selectedElementIds),{},(0,p.Z)({},E.id,!1))}})),(0,_.DR)(E,{points:[].concat((0,i.Z)(E.points),[[0,0]])});var j=(0,C.Y9)(r.origin,e.scene);e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[E])),e.setState({draggingElement:E,editingElement:E,startBoundElement:j,suggestedBindings:[]})}},this.createGenericElementOnPointerDown=function(t,n){var r=(0,ne.wC)(n.origin.x,n.origin.y,e.state.gridSize),a=(0,o.Z)(r,2),l=a[0],c=a[1],s=(0,U.Up)({type:t,x:l,y:c,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,roundness:"round"===e.state.currentItemRoundness?{type:(0,V.QI)(t)?T.a6.ADAPTIVE_RADIUS:T.a6.PROPORTIONAL_RADIUS}:null,locked:!1});"selection"===s.type?e.setState({selectionElement:s,draggingElement:s}):(e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[s])),e.setState({multiElement:null,draggingElement:s,editingElement:s}))},this.restoreReadyToEraseElements=function(t){var n=e.scene.getElementsIncludingDeleted().map((function(e){return t.elementIdsToErase[e.id]&&t.elementIdsToErase[e.id].erase?(0,_.BE)(e,{opacity:t.elementIdsToErase[e.id].opacity}):(0,V.Xh)(e)&&t.elementIdsToErase[e.containerId]&&t.elementIdsToErase[e.containerId].erase?(0,_.BE)(e,{opacity:t.elementIdsToErase[e.containerId].opacity}):e}));e.scene.replaceAllElements(n)},this.eraseElements=function(t){var n=e.scene.getElementsIncludingDeleted().map((function(e){return t.elementIdsToErase[e.id]&&t.elementIdsToErase[e.id].erase||(0,V.Xh)(e)&&t.elementIdsToErase[e.containerId]&&t.elementIdsToErase[e.containerId].erase?(0,_.BE)(e,{isDeleted:!0}):e}));e.history.resumeRecording(),e.scene.replaceAllElements(n)},this.initializeImage=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,l,c,s,u,d,f,h,g,v,b,y,x;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=n.imageFile,c=n.imageElement,s=n.showCursorImagePreview,u=void 0!==s&&s,(0,Ye.Wr)(l)){t.next=3;break}throw new Error((0,S.t)("errors.unsupportedFileType"));case 3:if(d=l.type,(0,I.KJ)(e.canvas,"wait"),d!==T.LO.svg){t.next=23;break}return t.prev=6,t.t0=Ye.Pn,t.t1=Pn.bp,t.next=11,l.text();case 11:return t.t2=t.sent,t.next=14,(0,t.t1)(t.t2);case 14:t.t3=t.sent,t.t4=l.name,l=(0,t.t0)(t.t3,t.t4),t.next=23;break;case 19:throw t.prev=19,t.t5=t.catch(6),console.warn(t.t5),new Error((0,S.t)("errors.svgImageInsertError"));case 23:return t.next=25,(null===(r=(o=e.props).generateIdForFile)||void 0===r?void 0:r.call(o,l))||(0,Ye.tW)(l);case 25:if(f=t.sent){t.next=29;break}throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),new Error((0,S.t)("errors.imageInsertError"));case 29:if(null!=(h=e.files[f])&&h.dataURL){t.next=42;break}return t.prev=31,t.next=34,(0,Ye.Tu)(l,{maxWidthOrHeight:T.h6});case 34:l=t.sent,t.next=40;break;case 37:t.prev=37,t.t6=t.catch(31),console.error("error trying to resing image file on insertion",t.t6);case 40:if(!(l.size>T.$n)){t.next=42;break}throw new Error((0,S.t)("errors.fileTooBig",{maxSize:"".concat(Math.trunc(T.$n/1024/1024),"MB")}));case 42:if(u&&(v=null===(g=e.files[f])||void 0===g?void 0:g.dataURL,b=v&&(0,Ye.KG)(v),e.setImagePreviewCursor(b||l)),t.t7=null===(i=e.files[f])||void 0===i?void 0:i.dataURL,t.t7){t.next=48;break}return t.next=47,(0,Ye.Sf)(l);case 47:t.t7=t.sent;case 48:return y=t.t7,x=(0,_.DR)(c,{fileId:f},!1),t.abrupt("return",new Promise(function(){var t=(0,a.Z)(m().mark((function t(n,r){var o,i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e.files=Gn(Gn({},e.files),{},(0,p.Z)({},f,{mimeType:d,id:f,dataURL:y,created:Date.now(),lastRetrieved:Date.now()})),i=e.imageCache.get(f)){t.next=7;break}return e.addNewImagesToImageCache(),t.next=7,e.updateImageCache([x]);case 7:if(!((null==i?void 0:i.image)instanceof Promise)){t.next=10;break}return t.next=10,i.image;case 10:e.state.pendingImageElementId!==x.id&&(null===(o=e.state.draggingElement)||void 0===o?void 0:o.id)!==x.id&&e.initializeImageDimensions(x,!0),n(x),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(0),console.error(t.t0),r(new Error((0,S.t)("errors.imageInsertError")));case 18:return t.prev=18,u||(0,I.z8)(e.canvas),t.finish(18);case 21:case"end":return t.stop()}}),t,null,[[0,14,18,21]])})));return function(e,n){return t.apply(this,arguments)}}()));case 51:case"end":return t.stop()}}),t,null,[[6,19],[31,37]])})));return function(e){return t.apply(this,arguments)}}(),this.insertImageElement=function(){var t=(0,a.Z)(m().mark((function t(n,r,o){return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[n])),t.prev=1,t.next=4,e.initializeImage({imageFile:r,imageElement:n,showCursorImagePreview:o});case 4:t.next=11;break;case 6:t.prev=6,t.t0=t.catch(1),(0,_.DR)(n,{isDeleted:!0}),e.actionManager.executeAction(k.pL),e.setState({errorMessage:t.t0.message||(0,S.t)("errors.imageInsertError")});case 11:case"end":return t.stop()}}),t,null,[[1,6]])})));return function(e,n,r){return t.apply(this,arguments)}}(),this.setImagePreviewCursor=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=96,t.next=3,(0,Ye.Tu)(n,{maxWidthOrHeight:r});case 3:return o=t.sent,t.next=6,(0,Ye.Sf)(o);case 6:if(i=t.sent,n.type!==T.LO.svg){t.next=20;break}return t.next=10,(0,Pn.PK)(i);case 10:a=t.sent,l=Math.min(a.height,r),(c=l*(a.width/a.height))>r&&(l=(c=r)*(a.height/a.width)),(s=document.createElement("canvas")).height=l,s.width=c,s.getContext("2d").drawImage(a,0,0,c,l),i=s.toDataURL(T.LO.svg);case 20:e.state.pendingImageElementId&&(0,I.KJ)(e.canvas,"url(".concat(i,") 4 4, auto"));case 21:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onImageAction=(0,a.Z)(m().mark((function t(){var n,r,o,i,a,l,c,s,u,d=arguments;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=d.length>0&&void 0!==d[0]?d[0]:{insertOnCanvasDirectly:!1},r=n.insertOnCanvasDirectly,t.prev=1,o=e.state.width/2+e.state.offsetLeft,i=e.state.height/2+e.state.offsetTop,a=(0,I.dE)({clientX:o,clientY:i},e.state),l=a.x,c=a.y,t.next=7,(0,Xe.I$)({description:"Image",extensions:Object.keys(T.KL)});case 7:s=t.sent,u=e.createImageElement({sceneX:l,sceneY:c}),r?(e.insertImageElement(u,s),e.initializeImageDimensions(u),e.setState({selectedElementIds:(0,p.Z)({},u.id,!0)},(function(){e.actionManager.executeAction(k.pL)}))):e.setState({pendingImageElementId:u.id},(function(){e.insertImageElement(u,s,!0)})),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(1),"AbortError"!==t.t0.name?console.error(t.t0):console.warn(t.t0),e.setState({pendingImageElementId:null,editingElement:null,activeTool:(0,I.Om)(e.state,{type:"selection"})},(function(){e.actionManager.executeAction(k.pL)}));case 16:case"end":return t.stop()}}),t,null,[[1,12]])}))),this.initializeImageDimensions=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(0,V.wi)(t)&&(null===(n=e.imageCache.get(t.fileId))||void 0===n?void 0:n.image);if(!o||o instanceof Promise){if(t.width<T.f/e.state.zoom.value&&t.height<T.f/e.state.zoom.value){var i=100/e.state.zoom.value;(0,_.DR)(t,{x:t.x-i/2,y:t.y-i/2,width:i,height:i})}}else if(r||t.width<T.f/e.state.zoom.value&&t.height<T.f/e.state.zoom.value){var a=Math.max(e.state.height-120,160),l=Math.min(a,Math.floor(.5*e.state.height)/e.state.zoom.value),c=Math.min(o.naturalHeight,l),s=c*(o.naturalWidth/o.naturalHeight),u=t.x+t.width/2-s/2,d=t.y+t.height/2-c/2;(0,_.DR)(t,{x:u,y:d,width:s,height:c})}},this.updateImageCache=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s,u=arguments;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:e.files,t.next=3,(0,Pn.Xx)({imageCache:e.imageCache,fileIds:n.map((function(e){return e.fileId})),files:r});case 3:if(o=t.sent,i=o.updatedFiles,a=o.erroredFiles,i.size||a.size){l=Un(n);try{for(l.s();!(c=l.n()).done;)s=c.value,i.has(s.fileId)&&(0,oe.bI)(s)}catch(e){l.e(e)}finally{l.f()}}return a.size&&e.scene.replaceAllElements(e.scene.getElementsIncludingDeleted().map((function(e){return(0,V.wi)(e)&&a.has(e.fileId)?(0,_.BE)(e,{status:"error"}):e}))),t.abrupt("return",{updatedFiles:i,erroredFiles:a});case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.addNewImagesToImageCache=(0,a.Z)(m().mark((function t(){var n,r,o,i,a=arguments;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:(0,Pn.oA)(e.scene.getNonDeletedElements()),r=a.length>1&&void 0!==a[1]?a[1]:e.files,!(o=n.filter((function(t){return!t.isDeleted&&!e.imageCache.has(t.fileId)}))).length){t.next=9;break}return t.next=6,e.updateImageCache(o,r);case 6:i=t.sent,i.updatedFiles.size&&e.scene.informMutation();case 9:case"end":return t.stop()}}),t)}))),this.scheduleImageRefresh=Dn()((function(){e.addNewImagesToImageCache()}),T.LL),this.updateBindingEnabledOnPointerMove=function(t){var n=(0,C.cz)(t);e.state.isBindingEnabled!==n&&e.setState({isBindingEnabled:n})},this.maybeSuggestBindingAtCursor=function(t){var n=(0,C.Y9)(t,e.scene);e.setState({suggestedBindings:null!=n?[n]:[]})},this.maybeSuggestBindingsForLinearElementAtCoords=function(t,n,r){if(n.length){var o=n.reduce((function(n,o){var i=(0,C.Y9)(o,e.scene);return null==i||(0,C.DK)(t,null==r?void 0:r.id,i)||n.push(i),n}),[]);e.setState({suggestedBindings:o})}},this.handleCanvasRef=function(t){var n,r,o;null!==t?(e.canvas=t,e.rc=y.Z.canvas(e.canvas),e.canvas.addEventListener(T.Ks.WHEEL,e.handleWheel,{passive:!1}),e.canvas.addEventListener(T.Ks.TOUCH_START,e.onTapStart),e.canvas.addEventListener(T.Ks.TOUCH_END,e.onTapEnd)):(null===(n=e.canvas)||void 0===n||n.removeEventListener(T.Ks.WHEEL,e.handleWheel),null===(r=e.canvas)||void 0===r||r.removeEventListener(T.Ks.TOUCH_START,e.onTapStart),null===(o=e.canvas)||void 0===o||o.removeEventListener(T.Ks.TOUCH_END,e.onTapEnd))},this.handleAppOnDrop=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s,u,d,f;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ye.bv)(n);case 2:if(r=t.sent,o=r.file,i=r.fileHandle,t.prev=5,!(0,Ye.Wr)(o)){t.next=26;break}if((null==o?void 0:o.type)!==T.LO.png&&(null==o?void 0:o.type)!==T.LO.svg){t.next=20;break}return t.prev=8,t.next=11,(0,H.cT)(o,e.state,e.scene.getElementsIncludingDeleted(),i);case 11:return a=t.sent,e.syncActionResult(Gn(Gn({},a),{},{appState:Gn(Gn({},a.appState||e.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),t.abrupt("return");case 16:if(t.prev=16,t.t0=t.catch(8),"EncodingError"===t.t0.name){t.next=20;break}throw t.t0;case 20:return l=(0,I.dE)(n,e.state),c=l.x,s=l.y,u=e.createImageElement({sceneX:c,sceneY:s}),e.insertImageElement(u,o),e.initializeImageDimensions(u),e.setState({selectedElementIds:(0,p.Z)({},u.id,!0)}),t.abrupt("return");case 26:t.next=31;break;case 28:return t.prev=28,t.t1=t.catch(5),t.abrupt("return",e.setState({isLoading:!1,errorMessage:t.t1.message}));case 31:if(!(d=n.dataTransfer.getData(T.LO.excalidrawlib))||"string"!=typeof d){t.next=35;break}try{f=(0,Ye.wf)(d),e.addElementsFromPasteOrLibrary({elements:(0,W.WV)(f),position:n,files:null})}catch(t){e.setState({errorMessage:t.message})}return t.abrupt("return");case 35:if(!o){t.next=38;break}return t.next=38,e.loadFileToCanvas(o,i);case 38:case"end":return t.stop()}}),t,null,[[5,28],[8,16]])})));return function(e){return t.apply(this,arguments)}}(),this.loadFileToCanvas=function(){var t=(0,a.Z)(m().mark((function t(n,r){var o;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ye.gY)(n);case 2:return n=t.sent,t.prev=3,t.next=6,(0,Ye.ZY)(n,e.state,e.scene.getElementsIncludingDeleted(),r);case 6:if((o=t.sent).type!==T.LO.excalidraw){t.next=12;break}e.setState({isLoading:!0}),e.syncActionResult(Gn(Gn({},o.data),{},{appState:Gn(Gn({},o.data.appState||e.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),t.next=15;break;case 12:if(o.type!==T.LO.excalidrawlib){t.next=15;break}return t.next=15,e.library.updateLibrary({libraryItems:n,merge:!0,openLibraryMenu:!0}).catch((function(t){console.error(t),e.setState({errorMessage:(0,S.t)("errors.importLibraryError")})}));case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(3),e.setState({isLoading:!1,errorMessage:t.t0.message});case 20:case"end":return t.stop()}}),t,null,[[3,17]])})));return function(e,n){return t.apply(this,arguments)}}(),this.handleCanvasContextMenu=function(t){if(t.preventDefault(),"touch"!==t.nativeEvent.pointerType&&("pen"!==t.nativeEvent.pointerType||t.button===T.Oh.SECONDARY)||"selection"===e.state.activeTool.type){var n=(0,I.dE)(t,e.state),r=n.x,o=n.y,i=e.getElementAtPosition(r,o,{preferSelected:!0,includeLockedElements:!0}),a=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state),l=e.isHittingCommonBoundingBoxOfSelectedElements({x:r,y:o},a),c=i||l?"element":"canvas",s=e.excalidrawContainerRef.current.getBoundingClientRect(),u=s.top,d=s.left,f=t.clientX-d,h=t.clientY-u;(0,L.L)("contextMenu","openContextMenu",c),e.setState(Gn(Gn({},i&&!e.state.selectedElementIds[i.id]?(0,J.bO)(Gn(Gn({},e.state),{},{selectedElementIds:(0,p.Z)({},i.id,!0),selectedLinearElement:(0,V.bt)(i)?new K._(i,e.scene):null}),e.scene.getNonDeletedElements()):e.state),{},{showHyperlinkPopup:!1}),(function(){e.setState({contextMenu:{top:h,left:f,items:e.getContextMenuItems(c)}})}))}},this.maybeDragNewGenericElement=function(t,n){var r=e.state.draggingElement,i=t.lastCoords;if(r)if("selection"===r.type&&"eraser"!==e.state.activeTool.type)(0,U.EJ)(r,e.state.activeTool.type,t.origin.x,t.origin.y,i.x,i.y,(0,I.TE)(t.origin.x,i.x),(0,I.TE)(t.origin.y,i.y),(0,O.E0)(n),(0,O.OA)(n));else{var a,l=(0,ne.wC)(i.x,i.y,e.state.gridSize),c=(0,o.Z)(l,2),s=c[0],u=c[1],d=(0,V.wi)(r)&&(null===(a=e.imageCache.get(r.fileId))||void 0===a?void 0:a.image),f=!d||d instanceof Promise?null:d.width/d.height;(0,U.EJ)(r,e.state.activeTool.type,t.originInGrid.x,t.originInGrid.y,s,u,(0,I.TE)(t.originInGrid.x,s),(0,I.TE)(t.originInGrid.y,u),(0,V.pC)(r)?!(0,O.E0)(n):(0,O.E0)(n),(0,O.OA)(n),f),e.maybeSuggestBindingForAll([r])}},this.maybeHandleResize=function(t,n){var r=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state),i=t.resize.handleType;e.setState({isResizing:i&&"rotation"!==i,isRotating:"rotation"===i});var a=t.lastCoords,l=(0,ne.wC)(a.x-t.resize.offset.x,a.y-t.resize.offset.y,e.state.gridSize),c=(0,o.Z)(l,2),s=c[0],u=c[1];return!!(0,U.vY)(t,i,r,t.resize.arrowDirection,(0,O.Ge)(n),(0,O.OA)(n),1===r.length&&(0,V.pC)(r[0])?!(0,O.E0)(n):(0,O.E0)(n),s,u,t.resize.center.x,t.resize.center.y)&&(e.maybeSuggestBindingForAll(r),!0)},this.getContextMenuItems=function(t){var n=[];return n.push(k.jK,k.FA),"canvas"===t?e.state.viewModeEnabled?[].concat(n,[k.Pb,k.JN,Tn,k.u0]):[Nn.yQ,Se,k.jK,k.FA,k.zp,Se,k.Yy,Se,k.Pb,k.JN,Tn,k.u0]:(n.push(k.zp),e.state.viewModeEnabled?[k.uN].concat(n):[k.ZM,k.uN,Nn.yQ,Se].concat(n,[Se,k.pw,k.W3,Se,k.EQ,k.y7,k.vD,Hn.JQ,k.s,Se,k.FL,Se,k.V,k.yA,k.zi,k.BZ,Se,k.jl,k.kt,Se,k.Qs,k.nz,k.xF,k.iL,Se,k.X9]))},this.handleWheel=(0,I.tH)((function(t){if(t.preventDefault(),!vr){var n=t.deltaX,r=t.deltaY;if(t.metaKey||t.ctrlKey){var o=Math.sign(r),i=100*T.V4,a=Math.abs(r),l=r;a>i&&(l=i*o);var c=e.state.zoom.value-l/100;return c+=Math.log10(Math.max(1,e.state.zoom.value))*-o*Math.min(1,a/20),e.translateCanvas((function(e){return Gn(Gn({},(0,le.E)({viewportX:hr,viewportY:mr,nextZoom:(0,ie.j)(c)},e)),{},{shouldCacheIgnoreZoom:!0})})),void e.resetShouldCacheIgnoreZoomDebounced()}t.shiftKey?e.translateCanvas((function(e){var t=e.zoom;return{scrollX:e.scrollX-(r||n)/t.value}})):e.translateCanvas((function(e){var t=e.zoom,o=e.scrollX,i=e.scrollY;return{scrollX:o-n/t.value,scrollY:i-r/t.value}}))}})),this.savePointer=function(t,n,r){var o,i;if(t&&n){var a=(0,I.dE)({clientX:t,clientY:n},e.state);isNaN(a.x)||isNaN(a.y),null===(o=(i=e.props).onPointerUpdate)||void 0===o||o.call(i,{pointer:a,button:r,pointersMap:_r.pointers})}},this.resetShouldCacheIgnoreZoomDebounced=(0,I.Ds)((function(){e.unmounted||e.setState({shouldCacheIgnoreZoom:!1})}),300),this.updateDOMRect=function(t){var n;if(null!==(n=e.excalidrawContainerRef)&&void 0!==n&&n.current){var r=e.excalidrawContainerRef.current.getBoundingClientRect(),o=r.width,i=r.height,a=r.left,l=r.top,c=e.state,s=c.width,u=c.height,d=c.offsetTop,f=c.offsetLeft;if(o===s&&i===u&&a===f&&l===d)return void(t&&t());e.setState({width:o,height:i,offsetLeft:a,offsetTop:l},(function(){t&&t()}))}},this.refresh=function(){e.setState(Gn({},e.getCanvasOffsets()))}};"production"!==T.Vi.TEST&&"production"!==T.Vi.DEVELOPMENT||(window.h=window.h||{},Object.defineProperties(window.h,{elements:{configurable:!0,get:function(){var e;return null===(e=this.app)||void 0===e?void 0:e.scene.getElementsIncludingDeleted()},set:function(e){var t;return null===(t=this.app)||void 0===t?void 0:t.scene.replaceAllElements(e)}}}));var Tr=Cr},7172:function(e,t,n){"use strict";n.d(t,{z:function(){return S}});var r=n(7169),o=n(2726),i=n(45),a=n(6340),l=n(487),c=n.n(l),s=n(631),u=n.n(s),d=n(2052),f=n.n(d),p=n(4010),h=n.n(p),m=n(1469),g=n.n(m),v=n(9329),b=n.n(v),y=n(3137),x={};x.styleTagTransform=b(),x.setAttributes=h(),x.insert=f().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=g();c()(y.Z,x),y.Z&&y.Z.locals&&y.Z.locals;var w=n(4512),k=["type","onSelect","selected","children","className"];function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=function(e){var t=e.type,n=void 0===t?"button":t,r=e.onSelect,l=e.selected,c=e.children,s=e.className,u=void 0===s?"":s,d=(0,o.Z)(e,k);return(0,w.jsx)("button",j(j({onClick:(0,a.Mj)(d.onClick,(function(e){r()})),type:n,className:(0,i.Z)("excalidraw-button",u,{selected:l})},d),{},{children:c}))}},3807:function(e,t,n){"use strict";n.d(t,{o:function(){return x}});var r=n(45),o=n(3646),i=n(487),a=n.n(i),l=n(631),c=n.n(l),s=n(2052),u=n.n(s),d=n(4010),f=n.n(d),p=n(1469),h=n.n(p),m=n(9329),g=n.n(m),v=n(6029),b={};b.styleTagTransform=g(),b.setAttributes=f(),b.insert=u().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=h();a()(v.Z,b),v.Z&&v.Z.locals&&v.Z.locals;var y=n(4512),x=function(e){var t=e.children,n=e.checked,i=e.onChange,a=e.className;return(0,y.jsxs)("div",{className:(0,r.Z)("Checkbox",a,{"is-checked":n}),onClick:function(e){i(!n,e),e.currentTarget.querySelector(".Checkbox-box").focus()},children:[(0,y.jsx)("button",{className:"Checkbox-box",role:"checkbox","aria-checked":n,children:o.eQ}),(0,y.jsx)("div",{className:"Checkbox-label",children:t})]})}},4499:function(e,t,n){"use strict";n.d(t,{z:function(){return P}});var r=n(2577),o=n(9787),i=n.n(o),a=n(2891),l=n(6340),c=n(487),s=n.n(c),u=n(631),d=n.n(u),f=n(2052),p=n.n(f),h=n(4010),m=n.n(h),g=n(1469),v=n.n(g),b=n(9329),y=n.n(b),x=n(2345),w={};w.styleTagTransform=y(),w.setAttributes=m(),w.insert=p().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=v();s()(x.Z,w),x.Z&&x.Z.locals&&x.Z.locals;var k=n(6066),E=n(8211),j=n(56),S=n(4512),O=function(e,t){return!j.Z[t].includes(e)},_=function(e){var t=(new Option).style;return t.color=e,!!t.color},C=[["1","2","3","4","5"],["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),I=function(e){var t=e.colors,n=e.color,o=e.onChange,a=e.onClose,c=e.label,s=e.showInput,u=void 0===s||s,d=e.type,f=e.elements,p=i().useRef(),h=i().useRef(),m=i().useRef(),g=i().useRef(),v=i().useState((function(){return"canvasBackground"===d?[]:function(e,t){for(var n=[],r=e.filter((function(e){return!e.isDeleted})).sort((function(e,t){return t.updated-e.updated})),o=0,i={elementBackground:"backgroundColor",elementStroke:"strokeColor"}[t];o<r.length&&n.length<5;){var a=r[o];n.length<5&&O(a[i],t)&&!n.includes(a[i])&&n.push(a[i]),o++}return n}(f,d)})),b=(0,r.Z)(v,1)[0];i().useEffect((function(){h.current?h.current.focus():g.current?g.current.focus():m.current&&m.current.focus()}),[]);var y=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.map((function(e,r){var i=e.replace("#",""),a=t?C[r+15]:C[r],c=t?i:(0,E.t)("colors.".concat(i));return(0,S.jsxs)("button",{className:"color-picker-swatch",onClick:function(t){t.currentTarget.focus(),o(e)},title:"".concat(c).concat((0,l.Qm)(e)?"":" (".concat(e,")")," — ").concat(a.toUpperCase()),"aria-label":c,"aria-keyshortcuts":C[r],style:{color:e},ref:function(o){!t&&o&&0===r&&(p.current=o),o&&e===n&&(h.current=o)},onFocus:function(){o(e)},children:[(0,l.Qm)(e)?(0,S.jsx)("div",{className:"color-picker-transparent"}):void 0,(0,S.jsx)("span",{className:"color-picker-keybinding",children:a})]},e)}))};return(0,S.jsxs)("div",{className:"color-picker color-picker-type-".concat(d),role:"dialog","aria-modal":"true","aria-label":(0,E.t)("labels.colorPicker"),onKeyDown:function(e){var t=!1;if((0,k.Wl)(e.key)){var n,r,o;t=!0;var i,c=document.activeElement,s=(0,E.G3)().rtl,d=!1,f=Array.prototype.indexOf.call(null===(n=m.current.querySelector(".color-picker-content--default"))||void 0===n?void 0:n.children,c);if(-1===f)-1!==(f=Array.prototype.indexOf.call(null===(i=m.current.querySelector(".color-picker-content--canvas-colors"))||void 0===i?void 0:i.children,c))&&(d=!0);var p=d?null===(r=m.current)||void 0===r?void 0:r.querySelector(".color-picker-content--canvas-colors"):null===(o=m.current)||void 0===o?void 0:o.querySelector(".color-picker-content--default");if(p&&-1!==f){var h,g=p.children.length-(u?1:0),v=e.key===(s?k.tW.ARROW_LEFT:k.tW.ARROW_RIGHT)?(f+1)%g:e.key===(s?k.tW.ARROW_RIGHT:k.tW.ARROW_LEFT)?(g+f-1)%g:d||e.key!==k.tW.ARROW_DOWN?d||e.key!==k.tW.ARROW_UP?f:(g+f-5)%g:(f+5)%g;null===(h=p.children[v])||void 0===h||h.focus()}e.preventDefault()}else if(!C.includes(e.key.toLowerCase())||e[k.tW.CTRL_OR_CMD]||e.altKey||(0,l.s)(e.target))e.key!==k.tW.ESCAPE&&e.key!==k.tW.ENTER||(t=!0,e.preventDefault(),a());else{var b,y,x;t=!0;var w=C.indexOf(e.key.toLowerCase()),j=w>=15,S=j?null==m||null===(b=m.current)||void 0===b?void 0:b.querySelector(".color-picker-content--canvas-colors"):null==m||null===(y=m.current)||void 0===y?void 0:y.querySelector(".color-picker-content--default"),O=j?w-15:w;null==S||null===(x=S.children[O])||void 0===x||x.focus(),e.preventDefault()}t&&(e.nativeEvent.stopImmediatePropagation(),e.stopPropagation())},children:[(0,S.jsx)("div",{className:"color-picker-triangle color-picker-triangle-shadow"}),(0,S.jsx)("div",{className:"color-picker-triangle"}),(0,S.jsxs)("div",{className:"color-picker-content",ref:function(e){e&&(m.current=e)},tabIndex:-1,children:[(0,S.jsx)("div",{className:"color-picker-content--default",children:y(t)}),!!b.length&&(0,S.jsxs)("div",{className:"color-picker-content--canvas",children:[(0,S.jsx)("span",{className:"color-picker-content--canvas-title",children:(0,E.t)("labels.canvasColors")}),(0,S.jsx)("div",{className:"color-picker-content--canvas-colors",children:y(b,!0)})]}),u&&(0,S.jsx)(T,{color:n,label:c,onChange:function(e){o(e)},ref:g})]})]})},T=i().forwardRef((function(e,t){var n=e.color,o=e.onChange,a=e.label,c=i().useState(n),s=(0,r.Z)(c,2),u=s[0],d=s[1],f=i().useRef(null);i().useEffect((function(){d(n)}),[n]),i().useImperativeHandle(t,(function(){return f.current}));var p=i().useCallback((function(e){var t=e.toLowerCase(),n=function(e){return(0,l.Qm)(e)?e:_("#".concat(e))?"#".concat(e):_(e)?e:null}(t);n&&o(n),d(t)}),[o]);return(0,S.jsxs)("label",{className:"color-input-container",children:[(0,S.jsx)("div",{className:"color-picker-hash",children:"#"}),(0,S.jsx)("input",{spellCheck:!1,className:"color-picker-input","aria-label":a,onChange:function(e){return p(e.target.value)},value:(u||"").replace(/^#/,""),onBlur:function(){return d(n)},ref:f})]})}));T.displayName="ColorInput";var P=function(e){var t,n=e.type,r=e.color,o=e.onChange,l=e.label,c=e.isActive,s=e.setActive,u=e.elements,d=(e.appState,i().useRef(null)),f=null===(t=d.current)||void 0===t?void 0:t.getBoundingClientRect();return(0,S.jsxs)("div",{children:[(0,S.jsxs)("div",{className:"color-picker-control-container",children:[(0,S.jsx)("div",{className:"color-picker-label-swatch-container",children:(0,S.jsx)("button",{className:"color-picker-label-swatch","aria-label":l,style:r?{"--swatch-color":r}:void 0,onClick:function(){return s(!c)},ref:d})}),(0,S.jsx)(T,{color:r,label:l,onChange:function(e){o(e)}})]}),(0,S.jsx)(i().Suspense,{fallback:"",children:c?(0,S.jsx)("div",{className:"color-picker-popover-container",style:{position:"fixed",top:null==f?void 0:f.top,left:null==f?void 0:f.right,zIndex:1},children:(0,S.jsx)(a.J,{onCloseRequest:function(e){return e.target!==d.current&&s(!1)},children:(0,S.jsx)(I,{colors:j.Z[n],color:r||null,onChange:function(e){o(e)},onClose:function(){var e;s(!1),null===(e=d.current)||void 0===e||e.focus()},label:l,showInput:!1,type:n,elements:u})})}):null})]})}},7046:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var r=n(7169),o=n(2726),i=n(8211),a=n(8396),l=n(487),c=n.n(l),s=n(631),u=n.n(s),d=n(2052),f=n.n(d),p=n(4010),h=n.n(p),m=n(1469),g=n.n(m),v=n(9329),b=n.n(v),y=n(9393),x={};x.styleTagTransform=b(),x.setAttributes=h(),x.insert=f().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=g();c()(y.Z,x),y.Z&&y.Z.locals&&y.Z.locals;var w=n(6428),k=n(4739),E=n(6527),j=n(6936),S=n(9487),O=n(4512),_=["onConfirm","onCancel","children","confirmText","cancelText","className"];function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=function(e){var t=e.onConfirm,n=e.onCancel,r=e.children,l=e.confirmText,c=void 0===l?(0,i.t)("buttons.confirm"):l,s=e.cancelText,u=void 0===s?(0,i.t)("buttons.cancel"):s,d=e.className,f=void 0===d?"":d,p=(0,o.Z)(e,_),h=(0,j.n9)(),m=(0,k.b9)(E.uh,S.yE),g=(0,j.J0)().container;return(0,O.jsxs)(a.V,I(I({onCloseRequest:n,small:!0},p),{},{className:"confirm-dialog ".concat(f),children:[r,(0,O.jsxs)("div",{className:"confirm-dialog-buttons",children:[(0,O.jsx)(w.Z,{label:u,onClick:function(){h({openMenu:null}),m(!1),n(),null==g||g.focus()}}),(0,O.jsx)(w.Z,{label:c,onClick:function(){h({openMenu:null}),m(!1),t(),null==g||g.focus()},actionType:"danger"})]})]}))}},704:function(e,t,n){"use strict";n.d(t,{O:function(){return E}});var r=n(2726),o=n(7169),i=n(45),a=n(2335),l=n(7681),c=n(96),s=n(8211),u=n(6340),d=n(6936),f=n(7145),p=n(6527),h=n(8519),m=n(4512),g=n(9787),v=["children"],b=["children","className","onDock","docked"];function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=(0,f.$)("DefaultSidebarTrigger",(function(e){var t=(0,l.R6)().DefaultSidebarTriggerTunnel;return(0,m.jsx)(t.In,{children:(0,m.jsx)(h.YE.Trigger,x(x({},e),{},{className:"default-sidebar-trigger",name:a.Cc.name}))})}));w.displayName="DefaultSidebarTrigger";var k=function(e){var t=e.children,n=(0,r.Z)(e,v),o=(0,l.R6)().DefaultSidebarTabTriggersTunnel;return(0,m.jsx)(o.In,{children:(0,m.jsx)(h.YE.TabTriggers,x(x({},n),{},{children:t}))})};k.displayName="DefaultTabTriggers";var E=Object.assign((0,f.$)("DefaultSidebar",(function(e){var t=e.children,n=e.className,o=e.onDock,f=e.docked,v=(0,r.Z)(e,b),y=(0,c.I)(),w=(0,d.n9)(),k=(0,l.R6)().DefaultSidebarTabTriggersTunnel;return(0,g.createElement)(h.YE,x(x({},v),{},{name:"default",key:"default",className:(0,i.Z)("default-sidebar",n),docked:null!=f?f:y.defaultSidebarDockedPreference,onDock:!1===o||!o&&null!=f?void 0:(0,u.Mj)(o,(function(e){w({defaultSidebarDockedPreference:e})}))}),(0,m.jsxs)(h.YE.Tabs,{children:[(0,m.jsxs)(h.YE.Header,{children:[v.__fallback&&(0,m.jsx)("div",{style:{color:"var(--color-primary)",fontSize:"1.2em",fontWeight:"bold",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",paddingRight:"1em"},children:(0,s.t)("toolBar.library")}),(0,m.jsx)(k.Out,{})]}),(0,m.jsx)(h.YE.Tab,{tab:a.tf,children:(0,m.jsx)(p.rY,{})}),t]}))})),{Trigger:w,TabTriggers:k})},8396:function(e,t,n){"use strict";n.d(t,{V:function(){return Z}});var r=n(2577),o=n(45),i=n(9787),a=n(8211),l=n(6936),c=n(6066),s=n(487),u=n.n(s),d=n(631),f=n.n(d),p=n(2052),h=n.n(p),m=n(4010),g=n.n(m),v=n(1469),b=n.n(v),y=n(9329),x=n.n(y),w=n(9482),k={};k.styleTagTransform=x(),k.setAttributes=g(),k.insert=h().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=b();u()(w.Z,k),w.Z&&w.Z.locals&&w.Z.locals;var E=n(3646),j=n(1881),S=n(6843),O={};O.styleTagTransform=x(),O.setAttributes=g(),O.insert=h().bind(null,"head"),O.domAPI=f(),O.insertStyleElement=b();u()(S.Z,O),S.Z&&S.Z.locals&&S.Z.locals;var _=n(5156),C=n(2335),I=n(4512),T=function(e){var t=e.theme,n=void 0===t?C.C6.LIGHT:t,r=e.closeOnClickOutside,i=void 0===r||r,a=P(n);if(!a)return null;return(0,_.createPortal)((0,I.jsxs)("div",{className:(0,o.Z)("Modal",e.className),role:"dialog","aria-modal":"true",onKeyDown:function(t){t.key===c.tW.ESCAPE&&(t.nativeEvent.stopImmediatePropagation(),t.stopPropagation(),e.onCloseRequest())},"aria-labelledby":e.labelledBy,"data-prevent-outside-click":!0,children:[(0,I.jsx)("div",{className:"Modal__background",onClick:i?e.onCloseRequest:void 0}),(0,I.jsx)("div",{className:"Modal__content",style:{"--max-width":"".concat(e.maxWidth,"px")},tabIndex:0,children:e.children})]}),a)},P=function(e){var t=(0,i.useState)(null),n=(0,r.Z)(t,2),o=n[0],a=n[1],c=(0,l.Fy)(),s=(0,i.useRef)(c.isMobile);s.current=c.isMobile;var u=(0,l.J0)().container;return(0,i.useLayoutEffect)((function(){o&&o.classList.toggle("excalidraw--mobile",c.isMobile)}),[o,c.isMobile]),(0,i.useLayoutEffect)((function(){var t=!(null==u||!u.classList.contains("theme--dark"))||"dark"===e,n=document.createElement("div");return n.classList.add("excalidraw","excalidraw-modal-container"),n.classList.toggle("excalidraw--mobile",s.current),t&&(n.classList.add("theme--dark"),n.classList.add("theme--dark-background-none")),document.body.appendChild(n),a(n),function(){document.body.removeChild(n)}}),[u,e]),o},M=n(6340),D=n(4739),A=n(6527),L=n(9487),Z=function(e){var t=function(){var e=(0,i.useState)(null),t=(0,r.Z)(e,2),n=t[0],o=t[1];return[n,(0,i.useCallback)((function(e){return o(e)}),[])]}(),n=(0,r.Z)(t,2),s=n[0],u=n[1],d=(0,i.useState)(document.activeElement),f=(0,r.Z)(d,1)[0],p=(0,l.J0)().id;(0,i.useEffect)((function(){if(s){var t=(0,M.xp)(s);t.length>0&&!1!==e.autofocus&&(t[1]||t[0]).focus();var n=function(e){if(e.key===c.tW.TAB){var t=(0,M.xp)(s),n=document.activeElement,r=t.findIndex((function(e){return e===n}));0===r&&e.shiftKey?(t[t.length-1].focus(),e.preventDefault()):r!==t.length-1||e.shiftKey||(t[0].focus(),e.preventDefault())}};return s.addEventListener("keydown",n),function(){return s.removeEventListener("keydown",n)}}}),[s,e.autofocus]);var h=(0,l.n9)(),m=(0,D.b9)(A.uh,L.yE),g=function(){h({openMenu:null}),m(!1),f.focus(),e.onCloseRequest()};return(0,I.jsx)(T,{className:(0,o.Z)("Dialog",e.className),labelledBy:"dialog-title",maxWidth:e.small?550:800,onCloseRequest:g,theme:e.theme,closeOnClickOutside:e.closeOnClickOutside,children:(0,I.jsxs)(j.W,{ref:u,children:[(0,I.jsxs)("h2",{id:"".concat(p,"-dialog-title"),className:"Dialog__title",children:[(0,I.jsx)("span",{className:"Dialog__titleContent",children:e.title}),(0,I.jsx)("button",{className:"Modal__close",onClick:g,title:(0,a.t)("buttons.close"),"aria-label":(0,a.t)("buttons.close"),children:(0,l.Fy)().isMobile?E.op:E.Tw})]}),(0,I.jsx)("div",{className:"Dialog__content",children:e.children})]})})}},6428:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(7169),o=n(2726),i=n(45),a=n(487),l=n.n(a),c=n(631),s=n.n(c),u=n(2052),d=n.n(u),f=n(4010),p=n.n(f),h=n(1469),m=n.n(h),g=n(9329),v=n.n(g),b=n(6148),y={};y.styleTagTransform=v(),y.setAttributes=p(),y.insert=d().bind(null,"head"),y.domAPI=s(),y.insertStyleElement=m();l()(b.Z,y),b.Z&&b.Z.locals&&b.Z.locals;var x=n(5644),w=n(4512),k=["label","onClick","className","children","actionType","type","isLoading"];function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=function(e){var t=e.label,n=e.onClick,r=e.className,a=e.children,l=e.actionType,c=e.type,s=void 0===c?"button":c,u=e.isLoading,d=(0,o.Z)(e,k),f=l?"Dialog__action-button--".concat(l):"";return(0,w.jsxs)("button",j(j({className:(0,i.Z)("Dialog__action-button",f,r),type:s,"aria-label":t,onClick:n},d),{},{children:[a&&(0,w.jsx)("div",{style:u?{visibility:"hidden"}:{},children:a}),(0,w.jsx)("div",{style:u?{visibility:"hidden"}:{},children:t}),u&&(0,w.jsx)("div",{style:{position:"absolute",inset:0},children:(0,w.jsx)(x.Z,{})})]}))}},1881:function(e,t,n){"use strict";n.d(t,{W:function(){return j}});var r=n(7169),o=n(487),i=n.n(o),a=n(631),l=n.n(a),c=n(2052),s=n.n(c),u=n(4010),d=n.n(u),f=n(1469),p=n.n(f),h=n(9329),m=n.n(h),g=n(7369),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p();i()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=n(9787),y=n.n(b),x=n(45),w=n(4512);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=y().forwardRef((function(e,t){var n=e.children,r=e.padding,o=e.className,i=e.style;return(0,w.jsx)("div",{className:(0,x.Z)("Island",o),style:E({"--padding":r},i),ref:t,children:n})}))},6527:function(e,t,n){"use strict";n.d(t,{rY:function(){return Se},uh:function(){return ke}});var r=n(1930),o=n(8950),i=n(2577),a=n(2975),l=n.n(a),c=n(9787),s=n(7053),u=n(8211),d=n(6954),f=n(7169),p=n(5523),h=n(6340),m=n(45),g=n(5284),v=n(6936),b=n(3024),y=n(487),x=n.n(y),w=n(631),k=n.n(w),E=n(2052),j=n.n(E),S=n(4010),O=n.n(S),_=n(1469),C=n.n(_),I=n(9329),T=n.n(I),P=n(2701),M={};M.styleTagTransform=T(),M.setAttributes=O(),M.insert=j().bind(null,"head"),M.domAPI=k(),M.insertStyleElement=C();x()(P.Z,M),P.Z&&P.Z.locals&&P.Z.locals;var D=n(3807),A=n(3646),L=n(4512),Z=function(e){var t=e.id,n=e.elements,r=e.isPending,a=e.onClick,s=e.selected,u=e.onToggle,d=e.onDrag,f=(0,c.useRef)(null);(0,c.useEffect)((function(){var e=f.current;if(e)return(0,o.Z)(l().mark((function t(){var r,o;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,(0,b.$D)({elements:n,appState:{exportBackground:!1,viewBackgroundColor:g.white},files:null});case 4:o=t.sent,null===(r=o.querySelector(".style-fonts"))||void 0===r||r.remove(),e.innerHTML=o.outerHTML;case 7:case"end":return t.stop()}}),t)})))(),function(){e.innerHTML=""}}),[n]);var p=(0,c.useState)(!1),h=(0,i.Z)(p,2),y=h[0],x=h[1],w=(0,v.Fy)().isMobile,k=r&&(0,L.jsx)("div",{className:"library-unit__adder",children:A.pO});return(0,L.jsxs)("div",{className:(0,m.Z)("library-unit",{"library-unit__active":n,"library-unit--hover":n&&y,"library-unit--selected":s}),onMouseEnter:function(){return x(!0)},onMouseLeave:function(){return x(!1)},children:[(0,L.jsx)("div",{className:(0,m.Z)("library-unit__dragger",{"library-unit__pulse":!!r}),ref:f,draggable:!!n,onClick:n||r?function(e){t&&e.shiftKey?u(t,e):a()}:void 0,onDragStart:function(e){t?(x(!1),d(t,e)):e.preventDefault()}}),k,t&&n&&(y||w||s)&&(0,L.jsx)(D.o,{checked:s,onChange:function(e,n){return u(t,n)},className:"library-unit__checkbox"})]})},z=n(7239),R=n(2335),N=n(5644),B=n(2791),H=function(e){var t=e.theme,n=e.id,r=e.libraryReturnUrl||window.location.origin+window.location.pathname;return(0,L.jsx)("a",{className:"library-menu-browse-button",href:"".concat("https://libraries.excalidraw.com","?target=").concat(window.name||"_blank","&referrer=").concat(r,"&useHash=true&token=").concat(n,"&theme=").concat(t,"&version=").concat(R.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,u.t)("labels.libraries")})},W=n(2242),F=n(9487),U=n(1319),K=n(1393),Y=n(4739),V=n(7046),G=n(8396),X=n(434),q=n(6428),J=n(7589),$={};$.styleTagTransform=T(),$.setAttributes=O(),$.insert=j().bind(null,"head"),$.domAPI=k(),$.insertStyleElement=C();x()(J.Z,$),J.Z&&J.Z.locals&&J.Z.locals;function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function te(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ne(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var re="publish-library-data",oe=function(){var e=(0,o.Z)(l().mark((function e(t){var n,r,o,a,c,s,u,d,f,p,m,v,y,x,w,k,E;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=6,r=128,o=Math.round(r/16),a=Math.max(Math.round(r/64),2),c=(0,h.yo)(t,n),(s=document.createElement("canvas")).width=c[0].length*r+(c[0].length+1)*(2*o)-2*o,s.height=c.length*r+(c.length+1)*(2*o)-2*o,(u=s.getContext("2d")).fillStyle=g.white,u.fillRect(0,0,s.width,s.height),d=te(t.entries()),e.prev=12,d.s();case 14:if((f=d.n()).done){e.next=28;break}return p=(0,i.Z)(f.value,2),m=p[0],v=p[1],e.next=18,(0,b.NL)({elements:v.elements,files:null,maxWidthOrHeight:r});case 18:y=e.sent,x=y.width,w=y.height,k=Math.floor(m/n)*(r+2*o),E=m%n*(r+2*o),u.drawImage(y,E+(r-x)/2+o,k+(r-w)/2+o),u.lineWidth=a,u.strokeStyle=g.gray[4],u.strokeRect(E+o/2,k+o/2,r+o,r+o);case 26:e.next=14;break;case 28:e.next=33;break;case 30:e.prev=30,e.t0=e.catch(12),d.e(e.t0);case 33:return e.prev=33,d.f(),e.finish(33);case 36:return e.t1=X.Tu,e.t2=File,e.next=40,(0,X._c)(s);case 40:return e.t3=e.sent,e.t4=[e.t3],e.t5={type:R.LO.png},e.t6=new e.t2(e.t4,"preview",e.t5),e.t7={outputType:R.LO.jpg,maxWidthOrHeight:5e3},e.next=47,(0,e.t1)(e.t6,e.t7);case 47:return e.abrupt("return",e.sent);case 48:case"end":return e.stop()}}),e,null,[[12,30,33,36]])})));return function(t){return e.apply(this,arguments)}}(),ie=function(e){var t=e.libItem,n=e.appState,r=e.index,i=e.onChange,a=e.onRemove,s=(0,c.useRef)(null),d=(0,c.useRef)(null);return(0,c.useEffect)((function(){var e=s.current;e&&(0,o.Z)(l().mark((function r(){var o;return l().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,b.$D)({elements:t.elements,appState:ee(ee({},n),{},{viewBackgroundColor:g.white,exportBackground:!0}),files:null});case 2:o=r.sent,e.innerHTML=o.outerHTML;case 4:case"end":return r.stop()}}),r)})))()}),[t.elements,n]),(0,L.jsxs)("div",{className:"single-library-item",children:["published"===t.status&&(0,L.jsx)("span",{className:"single-library-item-status",children:(0,u.t)("labels.statusPublished")}),(0,L.jsx)("div",{ref:s,className:"single-library-item__svg"}),(0,L.jsx)(U.V,{"aria-label":(0,u.t)("buttons.remove"),type:"button",icon:A.Tw,className:"single-library-item--remove",onClick:a.bind(null,t.id),title:(0,u.t)("buttons.remove")}),(0,L.jsxs)("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[(0,L.jsxs)("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,L.jsxs)("div",{style:{padding:"0.5em 0"},children:[(0,L.jsx)("span",{style:{fontWeight:500,color:g.gray[6]},children:(0,u.t)("publishDialog.itemName")}),(0,L.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,L.jsx)("input",{type:"text",ref:d,style:{width:"80%",padding:"0.2rem"},defaultValue:t.name,placeholder:"Item name",onChange:function(e){i(e.target.value,r)}})]}),(0,L.jsx)("span",{className:"error",children:t.error})]})]})},ae=function(e){var t=e.onClose,n=e.libraryItems,r=e.appState,a=e.onSuccess,s=e.onError,d=e.updateItemsInStorage,p=e.onRemove,h=(0,c.useState)({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),m=(0,i.Z)(h,2),g=m[0],v=m[1],b=(0,c.useState)(!1),y=(0,i.Z)(b,2),x=y[0],w=y[1];(0,c.useEffect)((function(){var e=function(){try{var e=localStorage.getItem(re);if(e)return JSON.parse(e)}catch(e){console.error(e)}return null}();e&&v(e)}),[]);var k=(0,c.useState)(n.slice()),E=(0,i.Z)(k,2),j=E[0],S=E[1];(0,c.useEffect)((function(){S(n.slice())}),[n]);var O,_=function(e){v(ee(ee({},g),{},(0,f.Z)({},e.target.name,e.target.value)))},C=function(){var e=(0,o.Z)(l().mark((function e(t){var n,r,o,i,c,d,f;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),w(!0),n=[],r=!1,j.forEach((function(e){var t="";e.name||(t=(0,u.t)("publishDialog.errors.required"),r=!0),n.push(ee(ee({},e),{},{error:t}))})),!r){e.next=9;break}return S(n),w(!1),e.abrupt("return");case 9:return e.next=11,oe(j);case 11:o=e.sent,i={type:R.r8.excalidrawLibrary,version:R.Kr.excalidrawLibrary,source:R.pb,libraryItems:j},c=JSON.stringify(i,null,2),d=new Blob([c],{type:"application/json"}),(f=new FormData).append("excalidrawLib",d),f.append("previewImage",o),f.append("previewImageType",o.type),f.append("title",g.name),f.append("authorName",g.authorName),f.append("githubHandle",g.githubHandle),f.append("name",g.name),f.append("description",g.description),f.append("twitterHandle",g.twitterHandle),f.append("website",g.website),fetch("".concat("https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries","/submit"),{method:"post",body:f}).then((function(e){return e.ok?e.json().then((function(e){var t=e.url;localStorage.removeItem(re),a({url:t,authorName:g.authorName,items:j})})):e.json().catch((function(){throw new Error(e.statusText||"something went wrong")})).then((function(t){throw new Error(t.message||e.statusText||"something went wrong")}))}),(function(e){console.error(e),s(e),w(!1)})).catch((function(e){console.error(e),s(e),w(!1)}));case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=(0,c.useCallback)((function(){d(j),function(e){try{localStorage.setItem(re,JSON.stringify(e))}catch(e){console.error(e)}}(g),t()}),[j,t,d,g]),T=!!n.length,P=n.some((function(e){return"published"===e.status}));return(0,L.jsx)(G.V,{onCloseRequest:I,title:(0,u.t)("publishDialog.title"),className:"publish-library",children:T?(0,L.jsxs)("form",{onSubmit:C,children:[(0,L.jsx)("div",{className:"publish-library-note",children:(0,L.jsx)(W.Z,{i18nKey:"publishDialog.noteDescription",link:function(e){return(0,L.jsx)("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:e})}})}),(0,L.jsx)("span",{className:"publish-library-note",children:(0,L.jsx)(W.Z,{i18nKey:"publishDialog.noteGuidelines",link:function(e){return(0,L.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:e})}})}),(0,L.jsx)("div",{className:"publish-library-note",children:(0,u.t)("publishDialog.noteItems")}),P&&(0,L.jsx)("span",{className:"publish-library-note publish-library-warning",children:(0,u.t)("publishDialog.republishWarning")}),(O=[],j.forEach((function(e,t){O.push((0,L.jsx)("div",{className:"single-library-item-wrapper",children:(0,L.jsx)(ie,{libItem:e,appState:r,index:t,onChange:function(e,t){var n=j.slice();n[t].name=e,S(n)},onRemove:p})},t))})),(0,L.jsx)("div",{className:"selected-library-items",children:O})),(0,L.jsxs)("div",{className:"publish-library__fields",children:[(0,L.jsxs)("label",{children:[(0,L.jsxs)("div",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.libraryName")}),(0,L.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,L.jsx)("input",{type:"text",name:"name",required:!0,value:g.name,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.libraryName")})]}),(0,L.jsxs)("label",{style:{alignItems:"flex-start"},children:[(0,L.jsxs)("div",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.libraryDesc")}),(0,L.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,L.jsx)("textarea",{name:"description",rows:4,required:!0,value:g.description,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.libraryDesc")})]}),(0,L.jsxs)("label",{children:[(0,L.jsxs)("div",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.authorName")}),(0,L.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,L.jsx)("input",{type:"text",name:"authorName",required:!0,value:g.authorName,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.authorName")})]}),(0,L.jsxs)("label",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.githubUsername")}),(0,L.jsx)("input",{type:"text",name:"githubHandle",value:g.githubHandle,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.githubHandle")})]}),(0,L.jsxs)("label",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.twitterUsername")}),(0,L.jsx)("input",{type:"text",name:"twitterHandle",value:g.twitterHandle,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.twitterHandle")})]}),(0,L.jsxs)("label",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.website")}),(0,L.jsx)("input",{type:"text",name:"website",pattern:"https?://.+",title:(0,u.t)("publishDialog.errors.website"),value:g.website,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.website")})]}),(0,L.jsx)("span",{className:"publish-library-note",children:(0,L.jsx)(W.Z,{i18nKey:"publishDialog.noteLicense",link:function(e){return(0,L.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:e})}})})]}),(0,L.jsxs)("div",{className:"publish-library__buttons",children:[(0,L.jsx)(q.Z,{label:(0,u.t)("buttons.cancel"),onClick:I,"data-testid":"cancel-clear-canvas-button"}),(0,L.jsx)(q.Z,{type:"submit",label:(0,u.t)("buttons.submit"),actionType:"primary",isLoading:x})]})]}):(0,L.jsx)("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:(0,u.t)("publishDialog.atleastOneLibItem")})})},le=n(9127),ce=n(96),se=function(e,t){return e.filter((function(e){return t.includes(e.id)}))},ue=function(e){var t=e.setAppState,n=e.selectedItems,r=e.library,a=e.onRemoveFromLibrary,d=e.resetLibrary,f=e.onSelectItems,m=e.appState,g=(0,Y.KO)(s.rF,F.yE),v=(0,i.Z)(g,1)[0],b=(0,Y.KO)(ke,F.yE),y=(0,i.Z)(b,2),x=y[0],w=y[1],k=(0,c.useCallback)((function(){var e=n.length?(0,u.t)("alerts.removeItemsFromsLibrary",{count:n.length}):(0,u.t)("alerts.resetLibrary"),t=n.length?(0,u.t)("confirmDialog.removeItemsFromLib"):(0,u.t)("confirmDialog.resetLibrary");return(0,L.jsx)(V.Z,{onConfirm:function(){n.length?a():d(),O(!1)},onCancel:function(){O(!1)},title:t,children:(0,L.jsx)("p",{children:e})})}),[n,a,d]),E=(0,c.useState)(!1),j=(0,i.Z)(E,2),S=j[0],O=j[1],_=!!n.length,C=_?v.libraryItems.filter((function(e){return n.includes(e.id)})):v.libraryItems,I=_?(0,u.t)("buttons.remove"):(0,u.t)("buttons.resetLibrary"),T=(0,c.useState)(!1),P=(0,i.Z)(T,2),M=P[0],D=P[1],Z=(0,c.useState)(null),z=(0,i.Z)(Z,2),R=z[0],N=z[1],B=(0,c.useCallback)((function(){return(0,L.jsxs)(G.V,{onCloseRequest:function(){return N(null)},title:(0,u.t)("publishSuccessDialog.title"),className:"publish-library-success",small:!0,children:[(0,L.jsx)("p",{children:(0,L.jsx)(W.Z,{i18nKey:"publishSuccessDialog.content",authorName:R.authorName,link:function(e){return(0,L.jsx)("a",{href:null==R?void 0:R.url,target:"_blank",rel:"noopener noreferrer",children:e})}})}),(0,L.jsx)(U.V,{type:"button",title:(0,u.t)("buttons.close"),"aria-label":(0,u.t)("buttons.close"),label:(0,u.t)("buttons.close"),onClick:function(){return N(null)},"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]})}),[N,R]),H=(0,c.useCallback)((function(e,t){D(!1),N({url:e.url,authorName:e.authorName});var o=t.slice();o.forEach((function(e){n.includes(e.id)&&(e.status="published")})),r.setLibrary(o)}),[D,N,n,r]),X=function(){var e=(0,o.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.updateLibrary({libraryItems:(0,K.I$)({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0});case 3:e.next=11;break;case 5:if(e.prev=5,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=10;break}return console.warn(e.t0),e.abrupt("return");case 10:t({errorMessage:(0,u.t)("errors.importLibraryError")});case 11:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),q=function(){var e=(0,o.Z)(l().mark((function e(){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!_){e.next=4;break}e.t0=C,e.next=7;break;case 4:return e.next=6,r.getLatestLibrary();case 6:e.t0=e.sent;case 7:n=e.t0,(0,p.t1)(n).catch(h.FG).catch((function(e){t({errorMessage:e.message})}));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,L.jsxs)("div",{style:{position:"relative"},children:[(0,L.jsxs)(le.Z,{open:x,children:[(0,L.jsx)(le.Z.Trigger,{onToggle:function(){return w(!x)},children:A.YA}),(0,L.jsxs)(le.Z.Content,{onClickOutside:function(){return w(!1)},onSelect:function(){return w(!1)},className:"library-menu",children:[!_&&(0,L.jsx)(le.Z.Item,{onSelect:X,icon:A.Tl,"data-testid":"lib-dropdown--load",children:(0,u.t)("buttons.load")}),!!C.length&&(0,L.jsx)(le.Z.Item,{onSelect:q,icon:A.Hy,"data-testid":"lib-dropdown--export",children:(0,u.t)("buttons.export")}),!!C.length&&(0,L.jsx)(le.Z.Item,{onSelect:function(){return O(!0)},icon:A.XH,children:I}),_&&(0,L.jsx)(le.Z.Item,{icon:A.Nw,onSelect:function(){return D(!0)},"data-testid":"lib-dropdown--remove",children:(0,u.t)("buttons.publishLibrary")})]})]}),n.length>0&&(0,L.jsx)("div",{className:"library-actions-counter",children:n.length}),S&&k(),M&&(0,L.jsx)(ae,{onClose:function(){return D(!1)},libraryItems:se(v.libraryItems,n),appState:m,onSuccess:function(e){return H(e,v.libraryItems)},onError:function(e){return window.alert(e)},updateItemsInStorage:function(){return r.setLibrary(v.libraryItems)},onRemove:function(e){return f(n.filter((function(t){return t!==e})))}}),R&&B()]})},de=function(e){var t=e.selectedItems,n=e.onSelectItems,r=(0,v.qD)().library,a=(0,ce.I)(),d=(0,v.n9)(),f=(0,Y.KO)(s.rF,F.yE),p=(0,i.Z)(f,1)[0],h=(0,c.useCallback)(function(){var e=(0,o.Z)(l().mark((function e(o){var i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=o.filter((function(e){return!t.includes(e.id)})),r.setLibrary(i).catch((function(){d({errorMessage:(0,u.t)("alerts.errorRemovingFromLibrary")})})),n([]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[r,d,t,n]),m=(0,c.useCallback)((function(){r.resetLibrary()}),[r]);return(0,L.jsx)(ue,{appState:a,setAppState:d,selectedItems:t,onSelectItems:n,library:r,onRemoveFromLibrary:function(){return h(p.libraryItems)},resetLibrary:m})},fe=function(e){var t=e.selectedItems,n=e.onSelectItems,r=e.libraryReturnUrl,o=e.theme,i=e.id,a=e.style;return(0,L.jsxs)("div",{className:"library-menu-control-buttons",style:a,children:[(0,L.jsx)(H,{id:i,libraryReturnUrl:r,theme:o}),(0,L.jsx)(de,{selectedItems:t,onSelectItems:n})]})},pe=n(6440),he={};he.styleTagTransform=T(),he.setAttributes=O(),he.insert=j().bind(null,"head"),he.domAPI=k(),he.insertStyleElement=C();x()(pe.Z,he),pe.Z&&pe.Z.locals&&pe.Z.locals;function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ve=function(e){var t=e.isLoading,n=e.libraryItems,o=e.onAddToLibrary,a=e.onInsertLibraryItems,l=e.pendingElements,s=e.selectedItems,d=e.onSelectItems,f=e.theme,m=e.id,g=e.libraryReturnUrl,v=(0,c.useState)(null),b=(0,i.Z)(v,2),y=b[0],x=b[1],w=function(e,t){var n=!s.includes(e),o=[].concat((0,r.Z)(S),(0,r.Z)(O));if(n){if(t.shiftKey&&y){var i=o.findIndex((function(e){return e.id===y})),a=o.findIndex((function(t){return t.id===e}));if(-1===i||-1===a)return void d([].concat((0,r.Z)(s),[e]));var l=(0,h.xn)(s),c=o.reduce((function(e,t,n){return(n>=i&&n<=a||l.has(t.id))&&e.push(t.id),e}),[]);d(c)}else d([].concat((0,r.Z)(s),[e]));x(e)}else x(null),d(s.filter((function(t){return t!==e})))},k=function(e){return(s.includes(e)?n.filter((function(e){return s.includes(e.id)})):n.filter((function(t){return t.id===e}))).map((function(e){return ge(ge({},e),{},{elements:(0,B._N)(e.elements,{randomizeSeed:!0})})}))},E=function(e){var t,n,r,o,i;return(0,L.jsx)(z.Z.Col,{children:(0,L.jsx)(Z,{elements:null===(t=e.item)||void 0===t?void 0:t.elements,isPending:!(null!==(n=e.item)&&void 0!==n&&n.id||null===(r=e.item)||void 0===r||!r.elements),onClick:e.onClick||function(){},id:(null===(o=e.item)||void 0===o?void 0:o.id)||null,selected:!(null===(i=e.item)||void 0===i||!i.id)&&s.includes(e.item.id),onToggle:w,onDrag:function(e,t){t.dataTransfer.setData(R.LO.excalidrawlib,(0,p.NI)(k(e)))}})},e.key)},j=function(e){var t=e.map((function(e){return e.id?E({item:e,onClick:function(){return a(k(e.id))},key:e.id}):E({key:"__pending__item__",item:e,onClick:function(){return o(l)}})})),n=(0,h.yo)(t,4);return n.length||(n=[[]]),n.map((function(e,t,n){return t===n.length-1&&(e=e.concat(new Array(4-e.length).fill(null).map((function(e,t){return E({key:"empty_".concat(t),item:null})})))),(0,L.jsx)(z.Z.Row,{align:"center",className:"library-menu-items-container__row",children:e},t)}))},S=n.filter((function(e){return"published"!==e.status})),O=n.filter((function(e){return"published"===e.status})),_=!n.length&&!l.length;return(0,L.jsx)("div",{className:"library-menu-items-container",style:l.length||S.length||O.length?{justifyContent:"flex-start"}:{borderBottom:0},children:(0,L.jsxs)(z.Z.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:O.length>0?1:"0 1 auto",marginBottom:0},children:[(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("div",{children:[(l.length>0||S.length>0||O.length>0)&&(0,L.jsx)("div",{className:"library-menu-items-container__header",children:(0,u.t)("labels.personalLib")}),t&&(0,L.jsx)("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:(0,L.jsx)(N.Z,{})})]}),l.length||S.length?j([].concat((0,r.Z)(l.length?[{id:null,elements:l}]:[]),(0,r.Z)(S))):(0,L.jsxs)("div",{className:"library-menu-items__no-items",children:[(0,L.jsx)("div",{className:"library-menu-items__no-items__label",children:(0,u.t)("library.noItems")}),(0,L.jsx)("div",{className:"library-menu-items__no-items__hint",children:O.length>0?(0,u.t)("library.hint_emptyPrivateLibrary"):(0,u.t)("library.hint_emptyLibrary")})]})]}),(0,L.jsxs)(L.Fragment,{children:[(O.length>0||l.length>0||S.length>0)&&(0,L.jsx)("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",children:(0,u.t)("labels.excalidrawLib")}),O.length>0?j(O):S.length>0?(0,L.jsx)("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:(0,u.t)("library.noItems")}):null]}),_&&(0,L.jsx)(fe,{style:{padding:"16px 0",width:"100%"},id:m,libraryReturnUrl:g,theme:f,selectedItems:s,onSelectItems:d})]})})},be=n(7047),ye=n(75),xe=n(8923),we={};we.styleTagTransform=T(),we.setAttributes=O(),we.insert=j().bind(null,"head"),we.domAPI=k(),we.insertStyleElement=C();x()(xe.Z,we),xe.Z&&xe.Z.locals&&xe.Z.locals;var ke=(0,Y.cn)(!1),Ee=function(e){var t=e.children;return(0,L.jsx)("div",{className:"layer-ui__library",children:t})},je=function(e){var t=e.onInsertLibraryItems,n=e.pendingElements,a=e.onAddToLibrary,f=e.setAppState,p=e.libraryReturnUrl,h=e.library,m=e.id,g=e.appState,v=e.selectedItems,b=e.onSelectItems,y=(0,Y.KO)(s.rF,F.yE),x=(0,i.Z)(y,1)[0],w=(0,c.useCallback)(function(){var e=(0,o.Z)(l().mark((function e(t,n){var o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,be.L)("element","addToLibrary","ui"),!t.some((function(e){return"image"===e.type}))){e.next=3;break}return e.abrupt("return",f({errorMessage:"Support for adding images to the library coming soon!"}));case 3:o=[{status:"unpublished",elements:t,id:(0,d.kb)(),created:Date.now()}].concat((0,r.Z)(n)),a(),h.setLibrary(o).catch((function(){f({errorMessage:(0,u.t)("alerts.errorAddingToLibrary")})}));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[a,h,f]);if("loading"===x.status&&!x.isInitialized)return(0,L.jsx)(Ee,{children:(0,L.jsx)("div",{className:"layer-ui__library-message",children:(0,L.jsxs)("div",{children:[(0,L.jsx)(N.Z,{size:"2em"}),(0,L.jsx)("span",{children:(0,u.t)("labels.libraryLoadingMessage")})]})})});var k=x.libraryItems.length>0||n.length>0;return(0,L.jsxs)(Ee,{children:[(0,L.jsx)(ve,{isLoading:"loading"===x.status,libraryItems:x.libraryItems,onAddToLibrary:function(e){return w(e,x.libraryItems)},onInsertLibraryItems:t,pendingElements:n,selectedItems:v,onSelectItems:b,id:m,libraryReturnUrl:p,theme:g.theme}),k&&(0,L.jsx)(fe,{style:{padding:"16px 12px 0 12px"},id:m,libraryReturnUrl:p,theme:g.theme,selectedItems:v,onSelectItems:b})]})},Se=function(){var e=(0,v.qD)(),t=e.library,n=e.id,r=e.onInsertElements,o=(0,v.hY)(),a=(0,ce.I)(),l=(0,v.n9)(),u=(0,v.bd)(),d=(0,c.useState)([]),f=(0,i.Z)(d,2),p=f[0],h=f[1],m=(0,c.useCallback)((function(){l({selectedElementIds:{},selectedGroupIds:{}})}),[l]);return(0,L.jsx)(je,{pendingElements:(0,ye.eD)(u,a,!0),onInsertLibraryItems:function(e){r((0,s.WV)(e))},onAddToLibrary:m,setAppState:l,libraryReturnUrl:o.libraryReturnUrl,library:t,id:n,appState:a,selectedItems:p,onSelectItems:h})}},5440:function(e,t,n){"use strict";n.d(t,{z:function(){return u}});var r=n(2577),o=n(8211),i=n(9787),a=n(5644),l=n(45),c=n(2335),s=n(4512),u=function(e){var t=e.delay,n=e.theme,u=(0,i.useState)(!!t),d=(0,r.Z)(u,2),f=d[0],p=d[1];return(0,i.useEffect)((function(){if(t){var e=setTimeout((function(){p(!1)}),t);return function(){return clearTimeout(e)}}}),[t]),f?null:(0,s.jsxs)("div",{className:(0,l.Z)("LoadingMessage",{"LoadingMessage--dark":n===c.C6.DARK}),children:[(0,s.jsx)("div",{children:(0,s.jsx)(a.Z,{})}),(0,s.jsx)("div",{className:"LoadingMessage-text",children:(0,o.t)("labels.loadingScene")})]})}},2891:function(e,t,n){"use strict";n.d(t,{J:function(){return k}});var r=n(9787),o=n(487),i=n.n(o),a=n(631),l=n.n(a),c=n(2052),s=n.n(c),u=n(4010),d=n.n(u),f=n(1469),p=n.n(f),h=n(9329),m=n.n(h),g=n(9935),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p();i()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=n(5156),y=n(6340),x=n(6066),w=n(4512),k=function(e){var t=e.children,n=e.left,o=e.top,i=e.onCloseRequest,a=e.fitInViewport,l=void 0!==a&&a,c=e.offsetLeft,s=void 0===c?0:c,u=e.offsetTop,d=void 0===u?0:u,f=e.viewportWidth,p=void 0===f?window.innerWidth:f,h=e.viewportHeight,m=void 0===h?window.innerHeight:h,g=(0,r.useRef)(null);(0,r.useEffect)((function(){var e=g.current;if(e){e.contains(document.activeElement)||e.focus();var t=function(t){if(t.key===x.tW.TAB){var n=(0,y.xp)(e),r=document.activeElement,o=n.findIndex((function(e){return e===r}));if(r===e){var i;if(t.shiftKey)null===(i=n[n.length-1])||void 0===i||i.focus();else n[0].focus();t.preventDefault(),t.stopImmediatePropagation()}else if(0===o&&t.shiftKey){var a;null===(a=n[n.length-1])||void 0===a||a.focus(),t.preventDefault(),t.stopImmediatePropagation()}else if(o===n.length-1&&!t.shiftKey){var l;null===(l=n[0])||void 0===l||l.focus(),t.preventDefault(),t.stopImmediatePropagation()}}};return e.addEventListener("keydown",t),function(){return e.removeEventListener("keydown",t)}}}),[]);var v=(0,r.useRef)(null);return(0,r.useLayoutEffect)((function(){if(l&&g.current&&null!=o&&null!=n){var e,t,r=g.current,i=r.getBoundingClientRect(),a=i.width,c=i.height;if((null===(e=v.current)||void 0===e?void 0:e.top)===o&&(null===(t=v.current)||void 0===t?void 0:t.left)===n)return;v.current={top:o,left:n},a>=p?(r.style.width="".concat(p,"px"),r.style.left="0px",r.style.overflowX="scroll"):r.style.left="".concat(n+a-s>p?p-a-10:n,"px"),c>=m?(r.style.height="".concat(m-20,"px"),r.style.top="10px",r.style.overflowY="scroll"):r.style.top="".concat(o+c-d>m?m-c:o,"px")}}),[o,n,l,p,m,s,d]),(0,r.useEffect)((function(){if(i){var e=function(e){var t;null!==(t=g.current)&&void 0!==t&&t.contains(e.target)||(0,b.unstable_batchedUpdates)((function(){return i(e)}))};return document.addEventListener("pointerdown",e,!1),function(){return document.removeEventListener("pointerdown",e,!1)}}}),[i]),(0,w.jsx)("div",{className:"popover",ref:g,tabIndex:-1,children:t})}},8519:function(e,t,n){"use strict";n.d(t,{YE:function(){return ht},t6:function(){return ft}});var r=n(2577),o=n(7169),i=n(2726),a=n(9787),l=n.n(a),c=n(1881),s=n(4739),u=n(9487),d=l().createContext({}),f=n(45),p=n(8211),h=n(6936),m=n(3646),g=n(1894),v=n(7172),b=n(4512),y=function(e){var t=e.children,n=e.className,r=(0,h.Fy)(),o=(0,a.useContext)(d),i=!(!r.canDeviceFitSidebar||!o.shouldRenderDockButton);return(0,b.jsxs)("div",{className:(0,f.Z)("sidebar__header",n),"data-testid":"sidebar-header",children:[t,(0,b.jsxs)("div",{className:"sidebar__header__buttons",children:[i&&(0,b.jsx)(g.u,{label:(0,p.t)("labels.sidebarLock"),children:(0,b.jsx)(v.z,{onSelect:function(){var e;return null===(e=o.onDock)||void 0===e?void 0:e.call(o,!o.docked)},selected:!!o.docked,className:"sidebar__dock","data-testid":"sidebar-dock","aria-label":(0,p.t)("labels.sidebarLock"),children:m.qQ})}),(0,b.jsx)(v.z,{"data-testid":"sidebar-close",className:"sidebar__close",onSelect:o.onCloseRequest,"aria-label":(0,p.t)("buttons.close"),children:m.Tw})]})]})};y.displayName="SidebarHeader";var x=n(6340),w=n(6066),k=n(2335),E=n(96),j=n(487),S=n.n(j),O=n(631),_=n.n(O),C=n(2052),I=n.n(C),T=n(4010),P=n.n(T),M=n(1469),D=n.n(M),A=n(9329),L=n.n(A),Z=n(7051),z={};z.styleTagTransform=L(),z.setAttributes=P(),z.insert=I().bind(null,"head"),z.domAPI=_(),z.insertStyleElement=D();S()(Z.Z,z),Z.Z&&Z.Z.locals&&Z.Z.locals;var R=function(e){var t,n=e.name,r=e.tab,o=e.icon,i=e.title,a=e.children,l=e.onToggle,c=e.className,s=e.style,u=(0,h.n9)(),d=(0,E.I)();return(0,b.jsxs)("label",{title:i,children:[(0,b.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",onChange:function(e){var t;null===(t=document.querySelector(".layer-ui__wrapper"))||void 0===t||t.classList.remove("animate");var o=e.target.checked;u({openSidebar:o?{name:n,tab:r}:null}),null==l||l(o)},checked:(null===(t=d.openSidebar)||void 0===t?void 0:t.name)===n,"aria-label":i,"aria-keyshortcuts":"0"}),(0,b.jsxs)("div",{className:(0,f.Z)("sidebar-trigger",c),style:s,children:[o&&(0,b.jsx)("div",{children:o}),a&&(0,b.jsx)("div",{className:"sidebar-trigger__label",children:a})]})]})};function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(this,arguments)}function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function H(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>(0,a.createContext)(e)));return function(n){const r=(null==n?void 0:n[e])||t;return(0,a.useMemo)((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=(0,a.createContext)(r),i=n.length;function l(t){const{scope:n,children:r,...l}=t,c=(null==n?void 0:n[e][i])||o,s=(0,a.useMemo)((()=>l),Object.values(l));return(0,a.createElement)(c.Provider,{value:s},r)}return n=[...n,r],l.displayName=t+"Provider",[l,function(n,l){const c=(null==l?void 0:l[e][i])||o,s=(0,a.useContext)(c);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},W(r,...t)]}function W(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return(0,a.useMemo)((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function F(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function U(...e){return(0,a.useCallback)(F(...e),e)}R.displayName="SidebarTrigger";const K=(0,a.forwardRef)(((e,t)=>{const{children:n,...r}=e,o=a.Children.toArray(n),i=o.find(G);if(i){const e=i.props.children,n=o.map((t=>t===i?a.Children.count(e)>1?a.Children.only(null):(0,a.isValidElement)(e)?e.props.children:null:t));return(0,a.createElement)(Y,N({},r,{ref:t}),(0,a.isValidElement)(e)?(0,a.cloneElement)(e,void 0,n):null)}return(0,a.createElement)(Y,N({},r,{ref:t}),n)}));K.displayName="Slot";const Y=(0,a.forwardRef)(((e,t)=>{const{children:n,...r}=e;return(0,a.isValidElement)(n)?(0,a.cloneElement)(n,{...X(r,n.props),ref:F(t,n.ref)}):a.Children.count(n)>1?a.Children.only(null):null}));Y.displayName="SlotClone";const V=({children:e})=>(0,a.createElement)(a.Fragment,null,e);function G(e){return(0,a.isValidElement)(e)&&e.type===V}function X(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const q=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?a.useLayoutEffect:()=>{},J=a["useId".toString()]||(()=>{});let $=0;function Q(e){const[t,n]=a.useState(J());return q((()=>{e||n((e=>null!=e?e:String($++)))}),[e]),e||(t?`radix-${t}`:"")}var ee=n(5156);const te=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=(0,a.forwardRef)(((e,n)=>{const{asChild:r,...o}=e,i=r?K:t;return(0,a.useEffect)((()=>{window[Symbol.for("radix-ui")]=!0}),[]),(0,a.createElement)(i,N({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function ne(e){const t=(0,a.useRef)(e);return(0,a.useEffect)((()=>{t.current=e})),(0,a.useMemo)((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function re({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=(0,a.useState)(e),[r]=n,o=(0,a.useRef)(r),i=ne(t);return(0,a.useEffect)((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,l=i?e:r,c=ne(n);return[l,(0,a.useCallback)((t=>{if(i){const n=t,r="function"==typeof t?n(e):t;r!==e&&c(r)}else o(t)}),[i,e,o,c])]}const oe=(0,a.createContext)(void 0);function ie(e){const t=(0,a.useContext)(oe);return e||t||"ltr"}const ae="rovingFocusGroup.onEntryFocus",le={bubbles:!1,cancelable:!0},ce="RovingFocusGroup",[se,ue,de]=function(e){const t=e+"CollectionProvider",[n,r]=H(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{const{scope:t,children:n}=e,r=l().useRef(null),i=l().useRef(new Map).current;return l().createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},c=e+"CollectionSlot",s=l().forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=U(t,i(c,n).collectionRef);return l().createElement(K,{ref:o},r)})),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=l().forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=l().useRef(null),c=U(t,a),s=i(u,n);return l().useEffect((()=>(s.itemMap.set(a,{ref:a,...o}),()=>{s.itemMap.delete(a)}))),l().createElement(K,{[d]:"",ref:c},r)}));return[{Provider:a,Slot:s,ItemSlot:f},function(t){const n=i(e+"CollectionConsumer",t);return l().useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}(ce),[fe,pe]=H(ce,[de]),[he,me]=fe(ce),ge=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(se.Provider,{scope:e.__scopeRovingFocusGroup},(0,a.createElement)(se.Slot,{scope:e.__scopeRovingFocusGroup},(0,a.createElement)(ve,N({},e,{ref:t})))))),ve=(0,a.forwardRef)(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:s,onEntryFocus:u,...d}=e,f=(0,a.useRef)(null),p=U(t,f),h=ie(i),[m=null,g]=re({prop:l,defaultProp:c,onChange:s}),[v,b]=(0,a.useState)(!1),y=ne(u),x=ue(n),w=(0,a.useRef)(!1),[k,E]=(0,a.useState)(0);return(0,a.useEffect)((()=>{const e=f.current;if(e)return e.addEventListener(ae,y),()=>e.removeEventListener(ae,y)}),[y]),(0,a.createElement)(he,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:m,onItemFocus:(0,a.useCallback)((e=>g(e)),[g]),onItemShiftTab:(0,a.useCallback)((()=>b(!0)),[]),onFocusableItemAdd:(0,a.useCallback)((()=>E((e=>e+1))),[]),onFocusableItemRemove:(0,a.useCallback)((()=>E((e=>e-1))),[])},(0,a.createElement)(te.div,N({tabIndex:v||0===k?-1:0,"data-orientation":r},d,{ref:p,style:{outline:"none",...e.style},onMouseDown:B(e.onMouseDown,(()=>{w.current=!0})),onFocus:B(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(ae,le);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));we([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:B(e.onBlur,(()=>b(!1)))})))})),be="RovingFocusGroupItem",ye=(0,a.forwardRef)(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...l}=e,c=Q(),s=i||c,u=me(be,n),d=u.currentTabStopId===s,f=ue(n),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return(0,a.useEffect)((()=>{if(r)return p(),()=>h()}),[r,p,h]),(0,a.createElement)(se.ItemSlot,{scope:n,id:s,focusable:r,active:o},(0,a.createElement)(te.span,N({tabIndex:d?0:-1,"data-orientation":u.orientation},l,{ref:t,onMouseDown:B(e.onMouseDown,(e=>{r?u.onItemFocus(s):e.preventDefault()})),onFocus:B(e.onFocus,(()=>u.onItemFocus(s))),onKeyDown:B(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:xe[r]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let o=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=u.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>we(o)))}var n,r}))})))})),xe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function we(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const ke=ge,Ee=ye;const je=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=(0,a.useState)(),r=(0,a.useRef)({}),o=(0,a.useRef)(e),i=(0,a.useRef)("none"),l=e?"mounted":"unmounted",[c,s]=function(e,t){return(0,a.useReducer)(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,a.useEffect)((()=>{const e=Se(r.current);i.current="mounted"===c?e:"none"}),[c]),q((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=Se(t);if(e)s("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))s("UNMOUNT");else{const e=r!==a;s(n&&e?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,s]),q((()=>{if(t){const e=e=>{const n=Se(r.current).includes(e.animationName);e.target===t&&n&&(0,ee.flushSync)((()=>s("ANIMATION_END")))},n=e=>{e.target===t&&(i.current=Se(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}s("ANIMATION_END")}),[t,s]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:(0,a.useCallback)((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):a.Children.only(n),i=U(r.ref,o.ref);return"function"==typeof n||r.isPresent?(0,a.cloneElement)(o,{ref:i}):null};function Se(e){return(null==e?void 0:e.animationName)||"none"}je.displayName="Presence";const Oe="Tabs",[_e,Ce]=H(Oe,[pe]),Ie=pe(),[Te,Pe]=_e(Oe),Me=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:l="horizontal",dir:c,activationMode:s="automatic",...u}=e,d=ie(c),[f,p]=re({prop:r,onChange:o,defaultProp:i});return(0,a.createElement)(Te,{scope:n,baseId:Q(),value:f,onValueChange:p,orientation:l,dir:d,activationMode:s},(0,a.createElement)(te.div,N({dir:d,"data-orientation":l},u,{ref:t})))})),De="TabsList",Ae=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Pe(De,n),l=Ie(n);return(0,a.createElement)(ke,N({asChild:!0},l,{orientation:i.orientation,dir:i.dir,loop:r}),(0,a.createElement)(te.div,N({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))})),Le="TabsTrigger",Ze=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,l=Pe(Le,n),c=Ie(n),s=Ne(l.baseId,r),u=Be(l.baseId,r),d=r===l.value;return(0,a.createElement)(Ee,N({asChild:!0},c,{focusable:!o,active:d}),(0,a.createElement)(te.button,N({type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:s},i,{ref:t,onMouseDown:B(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(r)})),onKeyDown:B(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&l.onValueChange(r)})),onFocus:B(e.onFocus,(()=>{const e="manual"!==l.activationMode;d||o||!e||l.onValueChange(r)}))})))})),ze="TabsContent",Re=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...l}=e,c=Pe(ze,n),s=Ne(c.baseId,r),u=Be(c.baseId,r),d=r===c.value,f=(0,a.useRef)(d);return(0,a.useEffect)((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),(0,a.createElement)(je,{present:o||d},(({present:n})=>(0,a.createElement)(te.div,N({"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":s,hidden:!n,id:u,tabIndex:0},l,{ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0}}),n&&i)))}));function Ne(e,t){return`${e}-trigger-${t}`}function Be(e,t){return`${e}-content-${t}`}const He=Me,We=Ae,Fe=Ze,Ue=Re;var Ke=["children"];function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ge=function(e){var t=e.children,n=(0,i.Z)(e,Ke);return(0,b.jsx)(We,Ve(Ve({className:"sidebar-triggers"},n),{},{children:t}))};Ge.displayName="SidebarTabTriggers";var Xe=["children","tab","onSelect"];function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $e=function(e){var t=e.children,n=e.tab,r=e.onSelect,o=(0,i.Z)(e,Xe);return(0,b.jsx)(Fe,{value:n,asChild:!0,onSelect:r,children:(0,b.jsx)("button",Je(Je({type:"button",className:"excalidraw-button sidebar-tab-trigger"},o),{},{children:t}))})};$e.displayName="SidebarTabTrigger";var Qe=["children"];function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nt=function(e){var t=e.children,n=(0,i.Z)(e,Qe),r=(0,E.I)(),o=(0,h.n9)();if(!r.openSidebar)return null;var a=r.openSidebar.name;return(0,b.jsx)(He,tt(tt({className:"sidebar-tabs-root",value:r.openSidebar.tab,onValueChange:function(e){return o((function(t){return tt(tt({},t),{},{openSidebar:tt(tt({},t.openSidebar),{},{name:a,tab:e})})}))}},n),{},{children:t}))};nt.displayName="SidebarTabs";var rt=["tab","children"];function ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var at=function(e){var t=e.tab,n=e.children,r=(0,i.Z)(e,rt);return(0,b.jsx)(Ue,it(it({},r),{},{value:t,children:n}))};at.displayName="SidebarTab";var lt=n(8208),ct={};ct.styleTagTransform=L(),ct.setAttributes=P(),ct.insert=I().bind(null,"head"),ct.domAPI=_(),ct.insertStyleElement=D();S()(lt.Z,ct),lt.Z&&lt.Z.locals&&lt.Z.locals;var st=["name","children","onDock","docked","className"];function ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ft=(0,s.cn)(!1),pt=(0,a.forwardRef)((function(e,t){e.name;var n=e.children,r=e.onDock,o=e.docked,l=e.className,p=(0,i.Z)(e,st);var m=(0,h.n9)(),g=(0,s.b9)(ft,u.yE);(0,a.useLayoutEffect)((function(){return g(!!o),function(){g(!1)}}),[g,o]);var v=(0,a.useRef)({});v.current.onCloseRequest=function(){m({openSidebar:null})},v.current.onDock=function(e){return null==r?void 0:r(e)},v.current=(0,x.v4)(v.current,{docked:o,shouldRenderDockButton:!!r&&null!=o});var y=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(function(){return y.current}));var E=(0,h.Fy)(),j=(0,a.useCallback)((function(){!!document.querySelector(".Dialog")||m({openSidebar:null})}),[m]);return function(e,t){(0,a.useEffect)((function(){var n=function(n){e.current&&(n.target instanceof Element&&(e.current.contains(n.target)||!document.body.contains(n.target))||t(n))};return document.addEventListener("pointerdown",n,!1),function(){document.removeEventListener("pointerdown",n)}}),[e,t])}(y,(0,a.useCallback)((function(e){e.target.closest(".sidebar-trigger")||o&&E.canDeviceFitSidebar||j()}),[j,o,E.canDeviceFitSidebar])),(0,a.useEffect)((function(){var e=function(e){e.key!==w.tW.ESCAPE||o&&E.canDeviceFitSidebar||j()};return document.addEventListener(k.Ks.KEYDOWN,e),function(){document.removeEventListener(k.Ks.KEYDOWN,e)}}),[j,o,E.canDeviceFitSidebar]),(0,b.jsx)(c.W,dt(dt({},p),{},{className:(0,f.Z)("sidebar",{"sidebar--docked":o},l),ref:y,children:(0,b.jsx)(d.Provider,{value:v.current,children:n})}))}));pt.displayName="SidebarInner";var ht=Object.assign((0,a.forwardRef)((function(e,t){var n,o=(0,E.I)(),i=e.onStateChange,l=(0,a.useRef)(o.openSidebar);(0,a.useEffect)((function(){var t,n,r,a,c;(!o.openSidebar&&(null==l||null===(t=l.current)||void 0===t?void 0:t.name)===e.name||(null===(n=o.openSidebar)||void 0===n?void 0:n.name)===e.name&&(null==l||null===(r=l.current)||void 0===r?void 0:r.name)!==e.name||(null===(a=l.current)||void 0===a?void 0:a.name)===e.name)&&o.openSidebar!==l.current&&(null==i||i((null===(c=o.openSidebar)||void 0===c?void 0:c.name)!==e.name?null:o.openSidebar));l.current=o.openSidebar}),[o.openSidebar,i,e.name]);var c=(0,a.useState)(!1),s=(0,r.Z)(c,2),u=s[0],d=s[1];return(0,a.useLayoutEffect)((function(){return d(!0),function(){return d(!1)}}),[]),u&&(null===(n=o.openSidebar)||void 0===n?void 0:n.name)===e.name?(0,a.createElement)(pt,dt(dt({},e),{},{ref:t,key:e.name})):null})),{Header:y,TabTriggers:Ge,TabTrigger:$e,Tabs:nt,Tab:at,Trigger:R});ht.displayName="Sidebar"},5644:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(487),o=n.n(r),i=n(631),a=n.n(i),l=n(2052),c=n.n(l),s=n(4010),u=n.n(s),d=n(1469),f=n.n(d),p=n(9329),h=n.n(p),m=n(5892),g={};g.styleTagTransform=h(),g.setAttributes=u(),g.insert=c().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=f();o()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals;var v=n(4512),b=function(e){var t=e.size,n=void 0===t?"1em":t,r=e.circleWidth,o=void 0===r?8:r;return(0,v.jsx)("div",{className:"Spinner",children:(0,v.jsx)("svg",{viewBox:"0 0 100 100",style:{width:n,height:n},children:(0,v.jsx)("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})}},7239:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(7169),o=n(487),i=n.n(o),a=n(631),l=n.n(a),c=n(2052),s=n.n(c),u=n(4010),d=n.n(u),f=n(1469),p=n.n(f),h=n(9329),m=n.n(h),g=n(3874),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p();i()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=n(45),y=n(4512);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k={Row:function(e){var t=e.children,n=e.gap,r=e.align,o=e.justifyContent,i=e.className,a=e.style;return(0,y.jsx)("div",{className:(0,b.Z)("Stack Stack_horizontal",i),style:w({"--gap":n,alignItems:r,justifyContent:o},a),children:t})},Col:function(e){var t=e.children,n=e.gap,r=e.align,o=e.justifyContent,i=e.className,a=e.style;return(0,y.jsx)("div",{className:(0,b.Z)("Stack Stack_vertical",i),style:w({"--gap":n,justifyItems:r,justifyContent:o},a),children:t})}}},1319:function(e,t,n){"use strict";n.d(t,{V:function(){return h}});var r=n(8950),o=n(2577),i=n(2975),a=n.n(i),l=(n(5422),n(9787)),c=n.n(l),s=n(45),u=n(6936),d=n(6797),f=n(5644),p=n(4512),h=c().forwardRef((function(e,t){var n=(0,u.J0)().id,i=c().useRef(null);c().useImperativeHandle(t,(function(){return i.current}));var h="ToolIcon_size_".concat(e.size),m=(0,l.useState)(!1),g=(0,o.Z)(m,2),v=g[0],b=g[1],y=(0,l.useRef)(!0),x=function(){var t=(0,r.Z)(a().mark((function t(n){var r,o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o="onClick"in e&&(null===(r=e.onClick)||void 0===r?void 0:r.call(e,n)))||!("then"in o)){t.next=18;break}return t.prev=2,b(!0),t.next=6,o;case 6:t.next=15;break;case 8:if(t.prev=8,t.t0=t.catch(2),t.t0 instanceof d._){t.next=14;break}throw t.t0;case 14:console.warn(t.t0);case 15:return t.prev=15,y.current&&b(!1),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[2,8,15,18]])})));return function(e){return t.apply(this,arguments)}}();(0,l.useEffect)((function(){return function(){y.current=!1}}),[]);var w=(0,l.useRef)(null);if("button"===e.type||"icon"===e.type||"submit"===e.type){var k="icon"===e.type?"button":e.type;return(0,p.jsxs)("button",{className:(0,s.Z)("ToolIcon_type_button",h,e.className,e.visible&&!e.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!e.hidden,"ToolIcon--selected":e.selected,"ToolIcon--plain":"icon"===e.type}),"data-testid":e["data-testid"],hidden:e.hidden,title:e.title,"aria-label":e["aria-label"],type:k,onClick:x,ref:i,disabled:v||e.isLoading,children:[(e.icon||e.label)&&(0,p.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[e.icon||e.label,e.keyBindingLabel&&(0,p.jsx)("span",{className:"ToolIcon__keybinding",children:e.keyBindingLabel}),e.isLoading&&(0,p.jsx)(f.Z,{})]}),e.showAriaLabel&&(0,p.jsxs)("div",{className:"ToolIcon__label",children:[e["aria-label"]," ",v&&(0,p.jsx)(f.Z,{})]}),e.children]})}return(0,p.jsxs)("label",{className:(0,s.Z)("ToolIcon",e.className),title:e.title,onPointerDown:function(t){var n;w.current=t.pointerType||null,null===(n=e.onPointerDown)||void 0===n||n.call(e,{pointerType:t.pointerType||null})},onPointerUp:function(){requestAnimationFrame((function(){w.current=null}))},children:[(0,p.jsx)("input",{className:"ToolIcon_type_radio ".concat(h),type:"radio",name:e.name,"aria-label":e["aria-label"],"aria-keyshortcuts":e["aria-keyshortcuts"],"data-testid":e["data-testid"],id:"".concat(n,"-").concat(e.id),onChange:function(){var t;null===(t=e.onChange)||void 0===t||t.call(e,{pointerType:w.current})},checked:e.checked,ref:i}),(0,p.jsxs)("div",{className:"ToolIcon__icon",children:[e.icon,e.keyBindingLabel&&(0,p.jsx)("span",{className:"ToolIcon__keybinding",children:e.keyBindingLabel})]})]})}));h.defaultProps={visible:!0,className:"",size:"medium"},h.displayName="ToolButton"},1894:function(e,t,n){"use strict";n.d(t,{u:function(){return w},bK:function(){return y},Js:function(){return x}});var r=n(487),o=n.n(r),i=n(631),a=n.n(i),l=n(2052),c=n.n(l),s=n(4010),u=n.n(s),d=n(1469),f=n.n(d),p=n(9329),h=n.n(p),m=n(6626),g={};g.styleTagTransform=h(),g.setAttributes=u(),g.insert=c().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=f();o()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals;var v=n(9787),b=n(4512),y=function(){var e=document.querySelector(".excalidraw-tooltip");if(e)return e;var t=document.createElement("div");return document.body.appendChild(t),t.classList.add("excalidraw-tooltip"),t},x=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"bottom",o=e.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,l=5,c=t.left+t.width/2-o.width/2;c<0?c=l:c+o.width>=i&&(c=i-o.width-l),"bottom"===r?(n=t.top+t.height+l)+o.height>=a&&(n=t.top-o.height-l):(n=t.top-o.height-l)<0&&(n=t.top+t.height+l),Object.assign(e.style,{top:"".concat(n,"px"),left:"".concat(c,"px")})},w=function(e){var t=e.children,n=e.label,r=e.long,o=void 0!==r&&r,i=e.style;return(0,v.useEffect)((function(){return function(){return y().classList.remove("excalidraw-tooltip--visible")}}),[]),(0,b.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:function(e){return function(e,t,n,r){t.classList.add("excalidraw-tooltip--visible"),t.style.minWidth=r?"50ch":"10ch",t.style.maxWidth=r?"50ch":"15ch",t.textContent=n;var o=e.getBoundingClientRect();x(t,o)}(e.currentTarget,y(),n,o)},onPointerLeave:function(){return y().classList.remove("excalidraw-tooltip--visible")},style:i,children:t})}},2242:function(e,t,n){"use strict";var r=n(2726),o=n(1930),i=n(9787),a=n.n(i),l=n(8211),c=["i18nKey","children"],s=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,u=/{{([\w-]+)}}/,d=/<([\w-]+)>/,f=/<\/([\w-]+)>/;t.Z=function(e){var t=e.i18nKey,n=(e.children,(0,r.Z)(e,c)),i=(0,l.QT)().t;return a().createElement.apply(a(),[a().Fragment,{}].concat((0,o.Z)(function(e,t){var n=[{name:"",children:[]}];return e.split(s).filter(Boolean).forEach((function(r){var i=r.match(d),l=r.match(f),c=r.match(u);if(null!==i){var s=i[1];t.hasOwnProperty(s)?n.push({name:s,children:[]}):console.warn("Trans: missed to pass in prop ".concat(s," for interpolating ").concat(e))}else if(null!==l)if(l[1]===n[n.length-1].name){var p=n.pop(),h=a().createElement.apply(a(),[a().Fragment,{}].concat((0,o.Z)(p.children))),m=t[p.name];"function"==typeof m&&n[n.length-1].children.push(m(h))}else console.warn("Trans: unexpected end tag ".concat(r," for interpolating ").concat(e));else if(null!==c){var g=c[1];t.hasOwnProperty(g)?n[n.length-1].children.push(t[g]):console.warn("Trans: key ".concat(g," not in props for interpolating ").concat(e))}else n[n.length-1].children.push(r)})),1!==n.length&&console.warn("Trans: stack not empty for interpolating ".concat(e)),n[0].children}(i(t),n))))}},6773:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(2577),o=n(487),i=n.n(o),a=n(631),l=n.n(a),c=n(2052),s=n.n(c),u=n(4010),d=n.n(u),f=n(1469),p=n.n(f),h=n(9329),m=n.n(h),g=n(6359),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p();i()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=n(9787),y=n.n(b),x=n(45),w=n(1894),k=n(6936),E=n(4512),j=function(e){var t=e.className,n=e.mobile,o=e.collaborators,i=(0,k.eh)(),a=new Map;o.forEach((function(e,t){a.set(e.id||t,e)}));var l=a.size>0&&Array.from(a).filter((function(e){var t=(0,r.Z)(e,2),n=(t[0],t[1]);return 0!==Object.keys(n).length})).map((function(e){var t=(0,r.Z)(e,2),o=t[0],a=t[1],l=i.renderAction("goToCollaborator",[o,a]);return n?(0,E.jsx)(w.u,{label:a.username||"Unknown user",children:l},o):(0,E.jsx)(y().Fragment,{children:l},o)}));return(0,E.jsx)("div",{className:(0,x.Z)("UserList",t,{UserList_mobile:n}),children:l})}},9127:function(e,t,n){"use strict";n.d(t,{Z:function(){return U}});var r=n(45),o=n(96),i=n(6936),a=n(4512),l=function(e){var t=e.className,n=void 0===t?"":t,l=e.children,c=e.onToggle,s=(0,o.I)(),u=(0,i.Fy)(),d=(0,r.Z)("dropdown-menu-button ".concat(n),"zen-mode-transition",{"transition-left":s.zenModeEnabled,"dropdown-menu-button--mobile":u.isMobile}).trim();return(0,a.jsx)("button",{"data-prevent-outside-click":!0,className:d,onClick:c,type:"button","data-testid":"dropdown-menu-button",children:l})},c=l;l.displayName="DropdownMenuTrigger";var s=n(2739),u=function(){return(0,a.jsx)("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0"}})},d=u;u.displayName="DropdownMenuSeparator";var f=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.style,i=e.title;return(0,a.jsxs)("div",{className:"dropdown-menu-group ".concat(r),style:o,children:[i&&(0,a.jsx)("p",{className:"dropdown-menu-group-title",children:i}),t]})},p=f;f.displayName="DropdownMenuGroup";var h=n(1930),m=n(9787),g=n.n(m),v=n(1881),b=n(7239),y=n(6772),x=function(e){var t,n,o=e.children,l=e.onClickOutside,c=e.className,s=void 0===c?"":c,u=e.onSelect,d=e.style,f=(0,i.Fy)(),p=(t=function(){null==l||l()},n=(0,m.useRef)(null),(0,m.useEffect)((function(){var e=function(e){var r=n.current;!r||r.contains(e.target)||(0,h.Z)(document.querySelectorAll("[data-prevent-outside-click]")).some((function(t){return t.contains(e.target)}))||t(e)};return document.addEventListener("pointerdown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("pointerdown",e),document.removeEventListener("touchstart",e)}}),[n,t]),n),g=(0,r.Z)("dropdown-menu ".concat(s),{"dropdown-menu--mobile":f.isMobile}).trim();return(0,a.jsx)(y.N7.Provider,{value:{onSelect:u},children:(0,a.jsx)("div",{ref:p,className:g,style:d,"data-testid":"dropdown-menu",children:f.isMobile?(0,a.jsx)(b.Z.Col,{className:"dropdown-menu-container",children:o}):(0,a.jsx)(v.W,{className:"dropdown-menu-container",padding:2,style:{zIndex:1},children:o})})})};x.displayName="DropdownMenuContent";var w=x,k=n(4215),E=n(7169),j=n(2726),S=["children","className"];function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,E.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=(0,j.Z)(e,S);return(0,a.jsx)("div",_(_({},o),{},{className:"dropdown-menu-item-base dropdown-menu-item-custom ".concat(r).trim(),children:t}))},I=n(487),T=n.n(I),P=n(631),M=n.n(P),D=n(2052),A=n.n(D),L=n(4010),Z=n.n(L),z=n(1469),R=n.n(z),N=n(9329),B=n.n(N),H=n(7399),W={};W.styleTagTransform=B(),W.setAttributes=Z(),W.insert=A().bind(null,"head"),W.domAPI=M(),W.insertStyleElement=R();T()(H.Z,W),H.Z&&H.Z.locals&&H.Z.locals;var F=function(e){var t=e.children,n=e.open,r=function(e){return g().Children.toArray(e).find((function(e){return g().isValidElement(e)&&"string"!=typeof e.type&&(null==e?void 0:e.type.displayName)&&"DropdownMenuTrigger"===e.type.displayName}))||null}(t),o=function(e){return g().Children.toArray(e).find((function(e){return g().isValidElement(e)&&"string"!=typeof e.type&&(null==e?void 0:e.type.displayName)&&"DropdownMenuContent"===e.type.displayName}))||null}(t);return(0,a.jsxs)(a.Fragment,{children:[r,n&&o]})};F.Trigger=c,F.Content=w,F.Item=s.Z,F.ItemLink=k.Z,F.ItemCustom=C,F.Group=p,F.Separator=d;var U=F;F.displayName="DropdownMenu"},2739:function(e,t,n){"use strict";var r=n(7169),o=n(2726),i=n(6772),a=n(4122),l=n(4512),c=["icon","onSelect","children","shortcut","className"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){var t,n=e.icon,r=e.onSelect,s=e.children,d=e.shortcut,f=e.className,p=(0,o.Z)(e,c),h=(0,i.qZ)(p.onClick,r);return(0,l.jsx)("button",u(u({},p),{},{onClick:h,type:"button",className:(0,i.n)(f),title:null!==(t=p.title)&&void 0!==t?t:p["aria-label"],children:(0,l.jsx)(a.Z,{icon:n,shortcut:d,children:s})}))};t.Z=d,d.displayName="DropdownMenuItem"},4122:function(e,t,n){"use strict";var r=n(6936),o=n(4512);t.Z=function(e){var t=e.icon,n=e.shortcut,i=e.children,a=(0,r.Fy)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"dropdown-menu-item__icon",children:t}),(0,o.jsx)("div",{className:"dropdown-menu-item__text",children:i}),n&&!a.isMobile&&(0,o.jsx)("div",{className:"dropdown-menu-item__shortcut",children:n})]})}},4215:function(e,t,n){"use strict";var r=n(7169),o=n(2726),i=n(4122),a=n(6772),l=n(4512),c=["icon","shortcut","href","children","onSelect","className"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){var t,n=e.icon,r=e.shortcut,s=e.href,d=e.children,f=e.onSelect,p=e.className,h=void 0===p?"":p,m=(0,o.Z)(e,c),g=(0,a.qZ)(m.onClick,f);return(0,l.jsx)("a",u(u({},m),{},{href:s,target:"_blank",rel:"noreferrer",className:(0,a.n)(h),title:null!==(t=m.title)&&void 0!==t?t:m["aria-label"],onClick:g,children:(0,l.jsx)(i.Z,{icon:n,shortcut:r,children:d})}))};t.Z=d,d.displayName="DropdownMenuItemLink"},6772:function(e,t,n){"use strict";n.d(t,{N7:function(){return l},n:function(){return c},qZ:function(){return s}});var r=n(9787),o=n.n(r),i=n(2335),a=n(6340),l=o().createContext({}),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"dropdown-menu-item dropdown-menu-item-base ".concat(e).trim()},s=function(e,t){var n=(0,r.useContext)(l);return(0,a.Mj)(e,(function(e){var r,o=new CustomEvent(i.Ks.MENU_ITEM_SELECT,{bubbles:!0,cancelable:!0});(null==t||t(o),o.defaultPrevented)||(null===(r=n.onSelect)||void 0===r||r.call(n,o))}))}},7145:function(e,t,n){"use strict";n.d(t,{$:function(){return u}});var r=n(7169),o=n(2577),i=n(4739),a=n(9787),l=n(7681),c=n(4512);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var u=function(e,t){var n=(0,i.cn)(0),u=!1,d=0,f=function(e){var f=(0,l.R6)().jotaiScope,p=(0,i.KO)(n,f),h=(0,o.Z)(p,2)[1];return(0,a.useLayoutEffect)((function(){return h((function(e){var t=e+1;return d=t,t})),function(){h((function(e){var t=e-1;return d=t,t||(u=!1),t}))}}),[h]),e.__fallback||(u=!0),!d&&e.__fallback&&u||d>1&&e.__fallback?null:(0,c.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))};return f.displayName=e,f}},3646:function(e,t,n){"use strict";n.d(t,{$c:function(){return le},$q:function(){return R},BF:function(){return Oe},BR:function(){return re},Ct:function(){return me},D7:function(){return q},DG:function(){return oe},DJ:function(){return O},DS:function(){return He},EO:function(){return nt},ET:function(){return X},FC:function(){return E},Gc:function(){return fe},HL:function(){return ge},Hk:function(){return at},Hy:function(){return Y},IN:function(){return pe},J8:function(){return ie},Mw:function(){return _},NA:function(){return W},NW:function(){return U},Nw:function(){return it},OA:function(){return qe},OW:function(){return I},P7:function(){return ot},Pm:function(){return L},RJ:function(){return _e},RY:function(){return K},Re:function(){return P},ST:function(){return we},Sd:function(){return N},TP:function(){return ae},Tl:function(){return ne},Tw:function(){return je},UE:function(){return ce},VL:function(){return Z},Vl:function(){return ue},Vq:function(){return b},W2:function(){return Ne},W5:function(){return xe},Wl:function(){return De},X7:function(){return Pe},XB:function(){return z},XH:function(){return H},YA:function(){return x},ZA:function(){return Me},Zm:function(){return J},_C:function(){return k},_U:function(){return S},a0:function(){return Ie},a1:function(){return ee},a5:function(){return Le},aA:function(){return rt},aT:function(){return Ze},bf:function(){return ze},by:function(){return V},e0:function(){return M},eQ:function(){return $},fr:function(){return We},gK:function(){return ke},h0:function(){return G},il:function(){return Fe},j8:function(){return Ye},jn:function(){return Ee},kL:function(){return F},kM:function(){return Re},lF:function(){return Ce},m:function(){return Ke},m9:function(){return Ae},mh:function(){return be},nb:function(){return T},np:function(){return Te},nq:function(){return Ge},o3:function(){return et},oQ:function(){return j},oT:function(){return tt},op:function(){return Se},pO:function(){return y},po:function(){return te},pw:function(){return he},q0:function(){return Ve},qQ:function(){return w},rr:function(){return Qe},t5:function(){return de},tW:function(){return Xe},tb:function(){return A},tn:function(){return Ue},uD:function(){return ye},vo:function(){return Je},wr:function(){return Be},xL:function(){return B},xP:function(){return Q},xs:function(){return ve},z6:function(){return $e},zG:function(){return se},zb:function(){return D},zu:function(){return C}});var r=n(7169),o=n(2726),i=n(9787),a=n.n(i),l=n(5284),c=n(45),s=n(2335),u=n(4512),d=["width","height","mirror","style"];function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(e){return e===s.C6.LIGHT?l.white:"#1e1e1e"},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:512,n="number"==typeof t?{width:t}:t,r=n.width,i=void 0===r?512:r,a=n.height,l=void 0===a?i:a,s=n.mirror,f=n.style,h=(0,o.Z)(n,d);return(0,u.jsx)("svg",p(p({"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 ".concat(i," ").concat(l),className:(0,c.Z)({"rtl-mirror":s}),style:f},h),{},{children:"string"==typeof e?(0,u.jsx)("path",{fill:"currentColor",d:e}):e}))},g={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},v={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},b=(m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:3,y:8,width:18,height:4,rx:1}),(0,u.jsx)("line",{x1:12,y1:8,x2:12,y2:21}),(0,u.jsx)("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),(0,u.jsx)("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),g),m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),(0,u.jsx)("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),g)),y=m((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),g),x=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"19",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"5",r:"1"})]}),g),w=m((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),(0,u.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),(0,u.jsx)("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),g),k=m((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:(0,u.jsx)("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),(0,u.jsx)("g",{mask:"url(#UnlockedIcon)",children:(0,u.jsx)("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),v),E=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,u.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),(0,u.jsx)("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),v),j=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),S=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),O=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),_=m((0,u.jsxs)("g",{fill:"currentColor",children:[(0,u.jsx)("path",{d:"M24.296 12.214c0 .112-.134.224-.291.224-.135 0-.516.629-.808 1.392-.897 2.335-9.867 20.096-9.89 19.534 0-.292-.134-.494-.359-.494-.313 0-.358.18-.224 1.055.135 1.01.045 1.236-3.14 7.432-1.793 3.525-3.722 7.208-4.282 8.196-.584 1.032-1.032 2.155-1.077 2.626-.067.809.022.92 1.973 2.605 1.122.988 2.557 2.223 3.185 2.784 2.826 2.582 4.149 3.615 4.508 3.547.538-.09 8.858-8.823 8.88-9.317 0-.225-.403-3.638-.897-7.59-.852-6.735-1.66-14.616-1.57-15.38.068-.47-.269-2.85-.516-3.884-.201-.808-.112-1.145 1.503-4.827.942-2.178 2.176-4.85 2.714-5.928.515-1.077.964-2.02.964-2.088 0-.067-.157-.112-.336-.112-.18 0-.337.09-.337.225Zm-5.158 16.772c.247 1.572.74 5.344 1.099 8.375.695 5.568 1.503 11.742 1.727 13.314.135.786.045.943-1.413 2.56-2.534 2.851-5.225 5.658-6.145 6.376l-.852.674-4.373-4.086c-4.037-3.728-4.373-4.11-4.127-4.558a5154.2 5154.2 0 0 1 2.535-4.626 727.864 727.864 0 0 0 3.678-6.78c.784-1.46 1.502-2.717 1.637-2.785.156-.09.201 2.178.156 7.006-.09 7.207-.067 7.23.651 7.072.09 0 .157-3.637.157-8.06V35.43l2.355-4.715c1.3-2.605 2.377-4.693 2.422-4.67.045.022.27 1.347.493 2.94ZM9.562 1.818C7.903 3.143 5.346 5.388 3.328 7.32L1.735 8.823l.292 1.976c.157 1.078.449 3.188.628 4.67.202 1.482.404 2.874.47 3.077.09.269 0 .404-.246.404-.426 0-.449-.113.718 3.592.286.952.577 1.903.875 2.851.044.158.224.225.425.158.202-.09.314-.27.247-.427-.067-.18.045-.36.224-.427.247-.09.225-.269-.157-.92-.605-1.01-2.152-9.633-2.242-12.416-.067-1.976-.067-1.999.762-3.121.808-1.1 2.67-2.762 5.54-4.873.807-.605 1.614-1.28 1.839-1.504.336-.404.493-.292 3.319 2.717 1.637 1.729 3.453 3.502 4.037 3.952l1.076.808-.83 1.75c-.448.944-2.265 4.581-4.059 8.04-3.745 7.274-2.983 6.578-7.333 6.645l-2.826.023-.942 1.077c-.987 1.146-1.121 1.572-.65 2.29.18.248.313.652.313.898 0 .405.157.472 1.055.517.56.023 1.076.09 1.144.157.067.068.156 1.46.224 3.098l.09 2.965-1.503 3.232C1.735 45.422.749 47.891.749 48.7c0 .427.09.786.18.786.224 0 .224-.022 9.35-19.085a4398.495 4398.495 0 0 1 8.927-18.546c.672-1.369 1.278-2.626 1.323-2.806.045-.202-1.503-1.751-3.97-3.93-2.22-1.975-4.171-3.772-4.35-3.974-.516-.628-1.279-.426-2.647.674ZM8.441 31.231c-.18.472-.65 1.46-1.031 2.2-.629 1.258-.696 1.303-.853.786-.09-.314-.157-1.235-.18-2.066-.022-1.639-.067-1.616 1.817-1.728L8.8 30.4l-.358.831Zm1.884-3.592c-1.032 1.998-1.077 2.02-3.903 2.155-2.489.135-2.533.112-2.533-.36 0-.269-.09-.628-.203-.808-.134-.202-.044-.56.27-1.055l.493-.763H6.69c1.234-.023 2.647-.113 3.14-.202.494-.09.92-.135.965-.113.045.023-.18.54-.471 1.146Zm-.09-20.477c-.404.292-.516.584-.516 1.325 0 .875.067 1.01.673 1.257.605.247.763.224 1.458-.247.92-.629.941-.786.269-1.796-.583-.876-1.166-1.033-1.884-.54Z"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.703 11.793c.166-.291.501-.514.93-.514.38 0 .698.161.82.283.161.162.225.35.225.54a.822.822 0 0 1-.056.289c-.08.218-.5 1.106-.983 2.116-.535 1.071-1.76 3.727-2.699 5.895-.79 1.802-1.209 2.784-1.404 3.416-.142.461-.132.665-.058.961.264 1.103.6 3.647.53 4.132-.088.756.727 8.547 1.57 15.21.5 3.997.903 7.45.903 7.676l-.001.033c-.004.087-.041.288-.211.54-.24.354-.914 1.143-1.8 2.119-2.004 2.21-5.107 5.423-6.463 6.653-.322.292-.566.485-.696.56a.884.884 0 0 1-.289.111c-.194.037-.579-.007-1.11-.349-.707-.453-1.981-1.522-4-3.366-.627-.561-2.061-1.794-3.176-2.776-.81-.699-1.308-1.138-1.612-1.466-.32-.343-.47-.61-.549-.87-.078-.257-.085-.515-.055-.874.05-.52.521-1.769 1.166-2.91.559-.985 2.48-4.654 4.269-8.17 1.579-3.071 2.392-4.663 2.792-5.612.32-.759.329-1 .277-1.387-.085-.553-.092-.891-.052-1.092a.942.942 0 0 1 .274-.52c.164-.157.384-.261.704-.261.094 0 .184.011.27.033 1.924-3.44 8.554-16.632 9.316-18.616.276-.724.64-1.336.848-1.556a.965.965 0 0 1 .32-.228Zm-5.399 16.402c-.49.942-.971 1.888-1.446 2.837l-2.28 4.565v7.871c0 4.023-.06 7.404-.136 8.04-.067.552-.474.691-.654.722l.075-.008c-.317.07-.574.063-.778-.023-.234-.098-.5-.297-.63-.857-.156-.681-.158-2.462-.103-6.893.019-2.022.022-3.592.008-4.725-.156.276-.315.562-.467.843a737.624 737.624 0 0 1-3.682 6.79 3618.972 3618.972 0 0 0-2.462 4.493c.062.088.169.231.289.364.55.61 1.631 1.623 3.624 3.462l3.931 3.674.377-.298c.907-.709 3.554-3.479 6.055-6.293.425-.47.73-.814.946-1.084.175-.22.28-.36.319-.501.031-.117.002-.227-.024-.379l-.004-.02c-.224-1.572-1.032-7.753-1.728-13.33-.358-3.022-.85-6.782-1.096-8.349l-.002-.01c-.042-.301-.087-.603-.132-.891ZM9.118 1.264C9.91.628 10.537.27 11.028.144c.727-.186 1.27.003 1.713.53.186.209 2.107 1.972 4.287 3.912 2.02 1.783 3.434 3.16 3.897 3.743.326.41.322.756.296.873a1.046 1.046 0 0 1-.005.018c-.047.188-.669 1.512-1.374 2.947a4348.55 4348.55 0 0 0-8.923 18.54c-7.335 15.32-8.808 18.396-9.217 19.015-.235.355-.419.404-.525.437a.815.815 0 0 1-.249.036.745.745 0 0 1-.647-.363C.176 49.67.04 49.222.04 48.7c0-.286.09-.754.316-1.434.452-1.356 1.466-3.722 3.225-7.53l1.432-3.083-.084-2.787a72.902 72.902 0 0 0-.156-2.53 7.307 7.307 0 0 0-.539-.046c-.463-.024-.764-.062-.96-.124-.304-.096-.48-.252-.598-.438-.105-.165-.17-.374-.17-.663 0-.134-.081-.348-.178-.481l-.019-.028c-.293-.448-.406-.831-.373-1.234.04-.484.34-1.052 1.08-1.91l.759-.869c-.103-.325-.471-1.513-.854-2.787-.737-2.339-1.004-3.238-1.018-3.578-.016-.393.134-.59.27-.715a.721.721 0 0 1 .192-.125 89.87 89.87 0 0 1-.414-2.782 231.651 231.651 0 0 0-.625-4.652l-.292-1.976a.71.71 0 0 1 .215-.62l1.589-1.501C4.87 4.86 7.446 2.599 9.118 1.264Zm-1.833 33.75a.819.819 0 0 1-.406.208.73.73 0 0 1-.491-.063l.048 1.618v.009l.849-1.773Zm5.874.697c-.035.087-.07.175-.107.261a20.92 20.92 0 0 1-.36.798.688.688 0 0 1 .457.007l.01.004v-1.07Zm.72-1.892-.015.018a.745.745 0 0 1-.407.236c.02.195.027.378 0 .592l.422-.846ZM7.7 31.175c-.268.027-.489.055-.6.07-.006.056-.013.13-.016.194-.005.19 0 .42.004.694.003.111.006.225.011.338.232-.471.459-.956.6-1.296Zm2.12-1.456a2.04 2.04 0 0 1-.415.31c.064.104.099.222.104.341l.132-.277.18-.374Zm-.14-2.374c-.654.079-1.882.153-2.974.173h-1.87l-.281.435c-.09.141-.17.331-.203.414.102.21.189.508.226.788h.007c.364.006.928-.023 1.805-.07 1.243-.06 1.88-.052 2.315-.291.154-.086.266-.215.387-.393.176-.261.354-.605.587-1.056Zm2.136-1.784c-.157.16-.331.3-.52.422a.631.631 0 0 1 .182.281l.337-.703Zm7.205-1.478c-.222.442-.445.883-.667 1.32a.787.787 0 0 1 .61.007c.036.018.145.07.243.2-.032-.165-.067-.33-.105-.493-.088-.351-.137-.633-.08-1.034h-.001ZM11.415 2.546c-.358.319-1.039.879-1.725 1.394C6.903 5.989 5.087 7.59 4.301 8.662c-.28.38-.458.605-.556.852-.15.38-.103.798-.068 1.824.063 1.923.833 6.669 1.493 9.686.262 1.199.483 2.11.654 2.394.25.426.364.71.398.894a.923.923 0 0 1-.184.764l1.27-.01c.863-.014 1.523.003 2.056-.019.424-.017.75-.052 1.034-.187.336-.159.596-.458.921-.955.62-.948 1.373-2.515 2.705-5.103 1.789-3.448 3.6-7.076 4.047-8.015l.582-1.227-.62-.466c-.595-.458-2.45-2.263-4.12-4.027a59.654 59.654 0 0 0-2.498-2.52ZM5.81 24.876v-.001l-.013-.03.013.031Zm-.71-.835.027-.011a.55.55 0 0 0-.028.011Zm19.904-11.777v.01-.01Zm.002-.016v-.034.034ZM9.82 6.587c-.587.424-.81.823-.81 1.9 0 .787.12 1.157.344 1.42.158.186.388.339.77.494.352.144.603.207.838.209.347.002.688-.12 1.285-.525.707-.483.98-.864 1.036-1.238.052-.352-.09-.812-.574-1.54-.412-.619-.853-.95-1.29-1.072-.489-.139-1.016-.05-1.586.342l-.013.01Zm2.015 2.028a6.288 6.288 0 0 0-.306-.52c-.19-.284-.326-.488-.531-.5-.113-.007-.224.058-.352.146-.218.159-.218.34-.218.745 0 .198.02.419.028.504.047.025.133.068.204.097.133.054.222.102.312.103.04 0 .071-.027.12-.054a4.29 4.29 0 0 0 .358-.225c.147-.1.299-.223.385-.296ZM9.12 1.263l-.002.002.002-.002Z"})]}),{width:26,height:62,fill:"none"}),C=m((0,u.jsxs)("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),(0,u.jsx)("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),I=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),g),T=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),g),P=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"})]}),g),M=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),g),D=m((0,u.jsx)("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),v),A=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),(0,u.jsx)("path",{d:"M16 7h4"}),(0,u.jsx)("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),g),L=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),(0,u.jsx)("path",{d:"m11.25 5.417 3.333 3.333"})]}),v),Z=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),(0,u.jsx)("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),(0,u.jsx)("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),(0,u.jsx)("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),(0,u.jsx)("polyline",{points:"5 20 11 4 13 4 20 20"})]}),g),z=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M12.5 6.667h.01"}),(0,u.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),(0,u.jsx)("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),(0,u.jsx)("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),v),R=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),(0,u.jsx)("path",{d:"M18 13.3l-6.3 -6.3"})]}),g),N=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),v),B=m((0,u.jsx)("path",{d:"M5 10h10",strokeWidth:"1.25"}),v),H=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),v),W=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,u.jsx)("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),v),F=m((0,u.jsx)("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),v),U=m((0,u.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),v),K=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),g),Y=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),v),V=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,u.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),g),G=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),v),X=m((0,u.jsx)("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),v),q=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),(0,u.jsx)("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),v),J=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z"})]}),g),$=m((0,u.jsx)("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),Q=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),(0,u.jsx)("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),v),ee=m("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",{width:448,height:512}),te=m("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),ne=m((0,u.jsx)("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),v),re=m("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512}),oe=m("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),ie=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15 8h.01"}),(0,u.jsx)("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),(0,u.jsx)("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),(0,u.jsx)("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),(0,u.jsx)("path",{d:"M19 16v6"}),(0,u.jsx)("path",{d:"M22 19l-3 3l-3 -3"})]}),g),ae=m("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",{width:512,height:512}),le=(m("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),m("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),m("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z")),ce=(m("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"),m((0,u.jsx)("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),v)),se=m((0,u.jsx)("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),v),ue=m("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",{mirror:!0}),de=(m((0,u.jsx)("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),v),m("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24}),m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),(0,u.jsx)("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),m((0,u.jsx)("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v)),fe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388",fill:"currentColor"}),(0,u.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),pe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),he=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",children:[(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"SendToBackIcon",fill:"#fff",children:(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z"})}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z",fill:"currentColor",mask:"url(#SendToBackIcon)"}),(0,u.jsx)("path",{d:"M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z",stroke:"currentColor",strokeWidth:"1.25"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),me=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),ge=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),ve=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),be=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),ye=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),xe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),we=m((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),v),ke=m((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),v),Ee=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,u.jsx)("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),(0,u.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),(0,u.jsx)("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),g),je=(m("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"),m("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"),m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M15 5 5 15M5 5l10 10"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v)),Se=m("M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z",{width:320,height:512,style:{marginLeft:"-0.2rem"},mirror:!0}),Oe=(m("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",{mirror:!0}),m("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24}),m("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",{width:384,height:512}),a().memo((function(e){var t=e.theme;return m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,u.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,u.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,u.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,u.jsxs)("g",{fill:h(t),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})}))),_e=a().memo((function(e){var t=e.theme;return m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,u.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,u.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,u.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,u.jsxs)("g",{fill:h(t),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})})),Ce=m((0,u.jsx)("g",{strokeWidth:1.25,children:(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),v),Ie=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),(0,u.jsx)("g",{mask:"url(#FillHachureIcon)",children:(0,u.jsx)("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),v),Te=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",children:[(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:(0,u.jsx)("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("g",{mask:"url(#FillCrossHatchIcon)",children:(0,u.jsx)("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),Pe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),p(p({},v),{},{fill:"currentColor"})),Me=m((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),v),De=m((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),v),Ae=m((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),v),Le=m((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 12h2"}),(0,u.jsx)("path",{d:"M17 12h2"}),(0,u.jsx)("path",{d:"M11 12h2"})]}),g),Ze=m((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v.01"}),(0,u.jsx)("path",{d:"M8 12v.01"}),(0,u.jsx)("path",{d:"M12 12v.01"}),(0,u.jsx)("path",{d:"M16 12v.01"}),(0,u.jsx)("path",{d:"M20 12v.01"})]}),g),ze=m((0,u.jsx)("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),v),Re=m((0,u.jsx)("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),v),Ne=m((0,u.jsx)("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),v),Be=m((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),(0,u.jsx)("path",{d:"M13.3333 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 6.66669V6.67669"}),(0,u.jsx)("path",{d:"M16.6667 10V10.01"}),(0,u.jsx)("path",{d:"M3.33334 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M16.6667 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M3.33334 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M6.66666 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M10 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M13.3333 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M16.6667 16.6667V16.6767"})]}),v),He=m((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),(0,u.jsx)("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),(0,u.jsx)("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),(0,u.jsx)("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),(0,u.jsx)("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),(0,u.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),(0,u.jsx)("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),(0,u.jsx)("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),g),We=m((0,u.jsx)("path",{d:"M6 10H34",stroke:"currentColor",strokeWidth:2,fill:"none"}),{width:40,height:20}),Fe=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsxs)("g",{transform:n?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[(0,u.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,u.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})})),Ue=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:n?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})})),Ke=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsx)("g",{transform:n?"translate(40, 0) scale(-1, 1)":"",children:(0,u.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})})),Ye=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:n?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})})),Ve=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),Ge=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),Xe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),qe=m((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),v),Je=m((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),v),$e=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),Qe=m((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),g),et=m((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),(0,u.jsx)("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),g),tt=m((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),g),nt=a().memo((function(e){e.theme;return m((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),(0,u.jsx)("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),g)})),rt=a().memo((function(e){e.theme;return m((0,u.jsxs)("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),(0,u.jsx)("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),g)})),ot=a().memo((function(e){e.theme;return m((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),g)})),it=m((0,u.jsx)("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512}),at=(m((0,u.jsx)("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),m((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.jsx)("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),(0,u.jsx)("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.jsx)("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),g))},6756:function(e,t,n){"use strict";n.d(t,{Z:function(){return Y}});var r={};n.r(r),n.d(r,{ChangeCanvasBackground:function(){return R},ClearCanvas:function(){return Z},Export:function(){return N},Help:function(){return L},LiveCollaborationTrigger:function(){return H},LoadScene:function(){return M},SaveAsImage:function(){return A},SaveToActiveFile:function(){return D},Socials:function(){return B},ToggleTheme:function(){return z}});var o=n(6936),i=n(9127),a=n(785),l=n(8211),c=n(3646),s=n(2739),u=n(4215),d=n(6710),f=n(487),p=n.n(f),h=n(631),m=n.n(h),g=n(2052),v=n.n(g),b=n(4010),y=n.n(b),x=n(1469),w=n.n(x),k=n(9329),E=n.n(k),j=n(4343),S={};S.styleTagTransform=E(),S.setAttributes=y(),S.insert=v().bind(null,"head"),S.domAPI=m(),S.insertStyleElement=w();p()(j.Z,S),j.Z&&j.Z.locals&&j.Z.locals;var O=n(45),_=n(4739),C=n(6798),I=n(9487),T=n(96),P=n(4512),M=function(){var e=(0,l.QT)().t,t=(0,o.eh)();return t.isActionEnabled(d._d)?(0,P.jsx)(s.Z,{icon:c.Tl,onSelect:function(){return t.executeAction(d._d)},"data-testid":"load-button",shortcut:(0,a.C)("loadScene"),"aria-label":e("buttons.load"),children:e("buttons.load")}):null};M.displayName="LoadScene";var D=function(){var e=(0,l.QT)().t,t=(0,o.eh)();return t.isActionEnabled(d.ns)?(0,P.jsx)(s.Z,{shortcut:(0,a.C)("saveScene"),"data-testid":"save-button",onSelect:function(){return t.executeAction(d.ns)},icon:c.a1,"aria-label":"".concat(e("buttons.save")),children:"".concat(e("buttons.save"))}):null};D.displayName="SaveToActiveFile";var A=function(){var e=(0,o.n9)(),t=(0,l.QT)().t;return(0,P.jsx)(s.Z,{icon:c.J8,"data-testid":"image-export-button",onSelect:function(){return e({openDialog:"imageExport"})},shortcut:(0,a.C)("imageExport"),"aria-label":t("buttons.exportImage"),children:t("buttons.exportImage")})};A.displayName="SaveAsImage";var L=function(){var e=(0,l.QT)().t,t=(0,o.eh)();return(0,P.jsx)(s.Z,{"data-testid":"help-menu-item",icon:c.by,onSelect:function(){return t.executeAction(d.jY)},shortcut:"?","aria-label":e("helpDialog.title"),children:e("helpDialog.title")})};L.displayName="Help";var Z=function(){var e=(0,l.QT)().t,t=(0,_.b9)(C.w,I.yE);return(0,o.eh)().isActionEnabled(d.mo)?(0,P.jsx)(s.Z,{icon:c.XH,onSelect:function(){return t("clearCanvas")},"data-testid":"clear-canvas-button","aria-label":e("buttons.clearReset"),children:e("buttons.clearReset")}):null};Z.displayName="ClearCanvas";var z=function(){var e=(0,l.QT)().t,t=(0,T.I)(),n=(0,o.eh)();return n.isActionEnabled(d.Zp)?(0,P.jsx)(s.Z,{onSelect:function(e){return e.preventDefault(),n.executeAction(d.Zp)},icon:"dark"===t.theme?c.NW:c.kL,"data-testid":"toggle-dark-mode",shortcut:(0,a.C)("toggleTheme"),"aria-label":"dark"===t.theme?e("buttons.lightMode"):e("buttons.darkMode"),children:"dark"===t.theme?e("buttons.lightMode"):e("buttons.darkMode")}):null};z.displayName="ToggleTheme";var R=function(){var e=(0,l.QT)().t,t=(0,T.I)(),n=(0,o.eh)();return t.viewModeEnabled?null:(0,P.jsxs)("div",{style:{marginTop:"0.5rem"},children:[(0,P.jsx)("div",{style:{fontSize:".75rem",marginBottom:".5rem"},children:e("labels.canvasBackground")}),(0,P.jsx)("div",{style:{padding:"0 0.625rem"},children:n.renderAction("changeViewBackgroundColor")})]})};R.displayName="ChangeCanvasBackground";var N=function(){var e=(0,l.QT)().t,t=(0,o.n9)();return(0,P.jsx)(s.Z,{icon:c.Hy,onSelect:function(){t({openDialog:"jsonExport"})},"data-testid":"json-export-button","aria-label":e("buttons.export"),children:e("buttons.export")})};N.displayName="Export";var B=function(){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(u.Z,{icon:c.ET,href:"https://github.com/excalidraw/excalidraw","aria-label":"GitHub",children:"GitHub"}),(0,P.jsx)(u.Z,{icon:c.D7,href:"https://discord.gg/UexuTaE","aria-label":"Discord",children:"Discord"}),(0,P.jsx)(u.Z,{icon:c.Zm,href:"https://twitter.com/excalidraw","aria-label":"Twitter",children:"Twitter"})]})};B.displayName="Socials";var H=function(e){var t=e.onSelect,n=e.isCollaborating,r=(0,l.QT)().t;return(0,P.jsx)(s.Z,{"data-testid":"collab-button",icon:c.jn,className:(0,O.Z)({"active-collab":n}),onSelect:t,children:r("labels.liveCollaboration")})};H.displayName="LiveCollaborationTrigger";var W=n(6773),F=n(7145),U=n(6340),K=n(7681),Y=Object.assign((0,F.$)("MainMenu",(function(e){var t=e.children,n=e.onSelect,r=(0,K.R6)().MainMenuTunnel,a=(0,o.Fy)(),s=(0,T.I)(),u=(0,o.n9)(),d=a.isMobile?void 0:function(){return u({openMenu:null})};return(0,P.jsx)(r.In,{children:(0,P.jsxs)(i.Z,{open:"canvas"===s.openMenu,children:[(0,P.jsx)(i.Z.Trigger,{onToggle:function(){u({openMenu:"canvas"===s.openMenu?null:"canvas"})},children:c.RY}),(0,P.jsxs)(i.Z.Content,{onClickOutside:d,onSelect:(0,U.Mj)(n,(function(){u({openMenu:null})})),children:[t,a.isMobile&&s.collaborators.size>0&&(0,P.jsxs)("fieldset",{className:"UserList-Wrapper",children:[(0,P.jsx)("legend",{children:(0,l.t)("labels.collaborators")}),(0,P.jsx)(W.Z,{mobile:!0,collaborators:s.collaborators})]})]})]})})})),{Trigger:i.Z.Trigger,Item:i.Z.Item,ItemLink:i.Z.ItemLink,ItemCustom:i.Z.ItemCustom,Group:i.Z.Group,Separator:i.Z.Separator,DefaultItems:r})},2335:function(e,t,n){"use strict";n.d(t,{iC:function(){return C},gK:function(){return we},$C:function(){return R},oc:function(){return L},_9:function(){return Oe},HN:function(){return Ie},qy:function(){return ge},rk:function(){return F},n5:function(){return W},h6:function(){return ve},Rx:function(){return Se},Cc:function(){return Pe},Hg:function(){return U},cW:function(){return le},hs:function(){return K},f:function(){return I},xY:function(){return je},Iw:function(){return P},$e:function(){return M},Vi:function(){return z},Ks:function(){return w},r8:function(){return X},ZB:function(){return me},pb:function(){return q},ut:function(){return N},k:function(){return Y},sA:function(){return re},KL:function(){return V},LL:function(){return J},tf:function(){return Te},EE:function(){return pe},qx:function(){return T},$n:function(){return be},zK:function(){return he},LO:function(){return G},Zj:function(){return ne},Yx:function(){return de},sS:function(){return ue},kV:function(){return se},sk:function(){return fe},eF:function(){return ce},Oh:function(){return Z},WR:function(){return Ce},a6:function(){return _e},HM:function(){return ee},ay:function(){return A},hR:function(){return ye},Gj:function(){return $},I8:function(){return Ee},wZ:function(){return D},C6:function(){return B},ZF:function(){return oe},nM:function(){return Q},ah:function(){return ae},UO:function(){return ie},Kr:function(){return xe},oX:function(){return ke},_D:function(){return H},V4:function(){return te},Dt:function(){return j},jP:function(){return _},Um:function(){return k},vU:function(){return S},G6:function(){return O},ED:function(){return E}});var r=n(7169),o=n(487),i=n.n(o),a=n(631),l=n.n(a),c=n(2052),s=n.n(c),u=n(4010),d=n.n(u),f=n(1469),p=n.n(f),h=n(9329),m=n.n(h),g=n(6464),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p();i()(g.Z,v);var b=g.Z&&g.Z.locals?g.Z.locals:void 0,y=n(5284);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var w,k=/Mac|iPod|iPhone|iPad/.test(navigator.platform),E=/^Win/.test(navigator.platform),j=/\b(android)\b/i.test(navigator.userAgent),S="netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,O=!(-1!==navigator.userAgent.indexOf("Chrome"))&&-1!==navigator.userAgent.indexOf("Safari"),_=function(){var e,t;return"isBrave"===(null===(e=navigator.brave)||void 0===e||null===(t=e.isBrave)||void 0===t?void 0:t.name)},C="Excalidraw",I=10,T=8,P=5,M=1,D=30,A=Math.PI/12,L={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},Z={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1};!function(e){e.COPY="copy",e.PASTE="paste",e.CUT="cut",e.KEYDOWN="keydown",e.KEYUP="keyup",e.MOUSE_MOVE="mousemove",e.RESIZE="resize",e.UNLOAD="unload",e.FOCUS="focus",e.BLUR="blur",e.DRAG_OVER="dragover",e.DROP="drop",e.GESTURE_END="gestureend",e.BEFORE_UNLOAD="beforeunload",e.GESTURE_START="gesturestart",e.GESTURE_CHANGE="gesturechange",e.POINTER_MOVE="pointermove",e.POINTER_UP="pointerup",e.STATE_CHANGE="statechange",e.WHEEL="wheel",e.TOUCH_START="touchstart",e.TOUCH_END="touchend",e.HASHCHANGE="hashchange",e.VISIBILITY_CHANGE="visibilitychange",e.SCROLL="scroll",e.EXCALIDRAW_LINK="excalidraw-link",e.MENU_ITEM_SELECT="menu.itemSelect"}(w||(w={}));var z={TEST:"test",DEVELOPMENT:"development"},R={SHAPE_ACTIONS_MENU:"App-menu__left"},N={Virgil:1,Helvetica:2,Cascadia:3},B={LIGHT:"light",DARK:"dark"},H="Segoe UI Emoji",W=20,F=N.Virgil,U="left",K="top",Y=20,V={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif",jfif:"image/jfif"},G=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json","excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream"},V),X={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib"},q=window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,J=500,$=300,Q=500,ee=100,te=.1,ne=.1,re=300,oe=b.themeFilter,ie={addLibrary:"addLibrary"},ae={addLibrary:"addLibrary"},le={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0}},ce=640,se=730,ue=1e3,de=500,fe=1229,pe=parseInt(b.rightSidebarWidth),he=2,me=[1,2,3],ge=10,ve=1440,be=2097152,ye="http://www.w3.org/2000/svg",xe={excalidraw:2,excalidrawLibrary:2},we=5,ke={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},Ee={LEFT:"left",CENTER:"center",RIGHT:"right"},je=20,Se=.25,Oe=32,_e={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Ce="__precedingElement__",Ie={strokeColor:y.black,backgroundColor:"transparent",fillStyle:"hachure",strokeWidth:1,strokeStyle:"solid",roughness:1,opacity:100,locked:!1},Te="library",Pe={name:"default",defaultTab:Te}},7681:function(e,t,n){"use strict";n.d(t,{A3:function(){return m},ZC:function(){return v},R6:function(){return g}});var r=n(9787),o=n.n(r);const i=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},a=e=>e?i(e):i;var l=n(5668);const{useSyncExternalStoreWithSelector:c}=l;const s=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?a(e):e,n=(e,n)=>function(e,t=e.getState,n){const o=c(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return(0,r.useDebugValue)(o),o}(t,e,n);return Object.assign(n,t),n},u=e=>e?s(e):s;var d,f;const p="undefined"!=typeof window&&(null!=(d=window.document)&&d.createElement||"ReactNative"===(null==(f=window.navigator)?void 0:f.product))?o().useLayoutEffect:o().useEffect;function h(){const e=u((e=>({current:new Array,version:0,set:e})));return{In:({children:t})=>{const n=e((e=>e.set)),r=e((e=>e.version));return p((()=>{n((e=>({version:e.version+1})))}),[]),p((()=>(n((({current:e})=>({current:[...e,t]}))),()=>n((({current:e})=>({current:e.filter((e=>e!==t))}))))),[t,r]),null},Out:()=>{const t=e((e=>e.current));return o().createElement(o().Fragment,null,t)}}}var m=o().createContext(null),g=function(){return o().useContext(m)},v=function(){return o().useMemo((function(){return{MainMenuTunnel:h(),WelcomeScreenMenuHintTunnel:h(),WelcomeScreenToolbarHintTunnel:h(),WelcomeScreenHelpHintTunnel:h(),WelcomeScreenCenterTunnel:h(),FooterCenterTunnel:h(),DefaultSidebarTriggerTunnel:h(),DefaultSidebarTabTriggersTunnel:h(),jotaiScope:Symbol()}}),[])}},96:function(e,t,n){"use strict";n.d(t,{I:function(){return a},k:function(){return i}});var r=n(9787),o=n.n(r),i=o().createContext(null),a=function(){return o().useContext(i)}},434:function(e,t,n){"use strict";n.d(t,{DQ:function(){return S},KG:function(){return L},Pn:function(){return z},Qk:function(){return j},Sf:function(){return A},Tu:function(){return Z},Wr:function(){return _},ZY:function(){return C},_c:function(){return M},bv:function(){return R},cT:function(){return I},g8:function(){return O},gY:function(){return W},lV:function(){return P},tW:function(){return D},vZ:function(){return F},wf:function(){return T}});var r=n(1930),o=n(2577),i=n(7169),a=n(8950),l=n(2975),c=n.n(l),s=n(5605),u=n(8897),d=n(2335),f=n(1047),p=n(6797),h=n(8211),m=n(75),g=n(6340),v=n(1393),b=n(5523),y=n(679),x=n(2791);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=function(){var e=(0,a.Z)(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type!==d.LO.png){e.next=18;break}return e.prev=1,e.next=4,Promise.resolve().then(n.bind(n,673));case 4:return e.next=6,e.sent.decodePngMetadata(t);case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(1),"INVALID"!==e.t0.message){e.next=15;break}throw new DOMException((0,h.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 15:throw new DOMException((0,h.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 16:e.next=43;break;case 18:if(!("text"in Blob)){e.next=24;break}return e.next=21,t.text();case 21:r=e.sent,e.next=27;break;case 24:return e.next=26,new Promise((function(e){var n=new FileReader;n.readAsText(t,"utf8"),n.onloadend=function(){n.readyState===FileReader.DONE&&e(n.result)}}));case 26:r=e.sent;case 27:if(t.type!==d.LO.svg){e.next=43;break}return e.prev=28,e.next=31,Promise.resolve().then(n.bind(n,673));case 31:return e.next=33,e.sent.decodeSvgMetadata({svg:r});case 33:return e.abrupt("return",e.sent);case 36:if(e.prev=36,e.t1=e.catch(28),"INVALID"!==e.t1.message){e.next=42;break}throw new DOMException((0,h.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 42:throw new DOMException((0,h.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 43:return e.abrupt("return",r);case 44:case"end":return e.stop()}}),e,null,[[1,9],[28,36]])})));return function(t){return e.apply(this,arguments)}}(),j=function(e){var t;return e&&(null===(t=e.name.match(/\.(json|excalidraw|png|svg)$/))||void 0===t?void 0:t[1])||null},S=function(e){return"png"===e||"svg"===e},O=function(e){var t=j(e);return"png"===t||"svg"===t},_=function(e){var t=(e||{}).type;return!!t&&Object.values(d.KL).includes(t)},C=function(){var e=(0,a.Z)(c().mark((function e(t,n,r,o){var i,a;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E(t);case 2:if(i=e.sent,e.prev=3,a=JSON.parse(i),!(0,b.dS)(a)){e.next=9;break}return e.abrupt("return",{type:d.LO.excalidraw,data:(0,y.nu)({elements:(0,f._M)((0,x.wc)(a.elements||[])),appState:k(k({theme:null==n?void 0:n.theme,fileHandle:o||t.handle||null},(0,u.s)(a.appState||{})),n?(0,m.W)((0,x.wc)(a.elements||[]),n,null):{}),files:a.files},n,r,{repairBindings:!0,refreshDimensions:!1})});case 9:if(!(0,b.HT)(a)){e.next=11;break}return e.abrupt("return",{type:d.LO.excalidrawlib,data:a});case 11:throw new Error((0,h.t)("alerts.couldNotLoadInvalidFile"));case 14:throw e.prev=14,e.t0=e.catch(3),console.error(e.t0.message),new Error((0,h.t)("alerts.couldNotLoadInvalidFile"));case 18:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(t,n,r,o){return e.apply(this,arguments)}}(),I=function(){var e=(0,a.Z)(c().mark((function e(t,n,r,o){var i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C(t,n,r,o);case 2:if((i=e.sent).type===d.LO.excalidraw){e.next=5;break}throw new Error((0,h.t)("alerts.couldNotLoadInvalidFile"));case 5:return e.abrupt("return",i.data);case 6:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unpublished",n=JSON.parse(e);if(!(0,b.HT)(n))throw new Error("Invalid library");var r=n.libraryItems||n.library;return(0,y.wJ)(r,t)},P=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:"unpublished",e.t0=T,e.next=4,E(t);case 4:return e.t1=e.sent,e.t2=n,e.abrupt("return",(0,e.t0)(e.t1,e.t2));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=(0,a.Z)(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){try{t.toBlob((function(t){if(!t)return n(new p.l((0,h.t)("canvasError.canvasTooBig"),"CANVAS_POSSIBLY_TOO_BIG"));e(t)}))}catch(e){n(e)}})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=(0,a.Z)(c().mark((function e(t){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=window.crypto.subtle,e.next=4,F(t);case 4:return e.t1=e.sent,e.next=7,e.t0.digest.call(e.t0,"SHA-1",e.t1);case 7:return n=e.sent,e.abrupt("return",(0,g.G3)(new Uint8Array(n)));case 11:return e.prev=11,e.t2=e.catch(0),console.error(e.t2),e.abrupt("return",(0,s.x0)(40));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=(0,a.Z)(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new FileReader;r.onload=function(){var t=r.result;e(t)},r.onerror=function(e){return n(e)},r.readAsDataURL(t)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),L=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.indexOf(","),r=atob(e.slice(n+1)),o=e.slice(0,n).split(":")[1].split(";")[0],i=new ArrayBuffer(r.length),a=new Uint8Array(i),l=0;l<r.length;l++)a[l]=r.charCodeAt(l);return new File([i],t,{type:o})},Z=function(){var e=(0,a.Z)(c().mark((function e(t,r){var i,a,l,s,u,f;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type!==d.LO.svg){e.next=2;break}return e.abrupt("return",t);case 2:return e.next=4,Promise.all([n.e(4736).then(n.t.bind(n,4881,23)).then((function(e){return e.default})),n.e(4736).then(n.bind(n,100)).then((function(e){return e.default}))]);case 4:if(i=e.sent,a=(0,o.Z)(i,2),l=a[0],s=a[1],u=s({pica:l({features:["js","wasm"]})}),r.outputType&&(f=r.outputType,u._create_blob=function(e){return this.pica.toBlob(e.out_canvas,f,.8).then((function(t){return e.out_blob=t,e}))}),_(t)){e.next=12;break}throw new Error((0,h.t)("errors.unsupportedFileType"));case 12:return e.t0=File,e.next=15,u.toBlob(t,{max:r.maxWidthOrHeight});case 15:return e.t1=e.sent,e.t2=[e.t1],e.t3=t.name,e.t4={type:r.outputType||t.type},e.abrupt("return",new e.t0(e.t2,e.t3,e.t4));case 20:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new File([(new TextEncoder).encode(e)],t,{type:d.LO.svg})},R=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.dataTransfer.files.item(0),e.next=3,N(t);case 3:if(r=e.sent,!n){e.next=10;break}return e.next=7,W(n);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=null;case 11:return e.t1=e.t0,e.t2=r,e.abrupt("return",{file:e.t1,fileHandle:e.t2});case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!v.kr){e.next=16;break}return e.prev=1,n=t.dataTransfer.items[0],e.next=5,n.getAsFileSystemHandle();case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0=null;case 8:return r=e.t0,e.abrupt("return",r);case 12:return e.prev=12,e.t1=e.catch(1),console.warn(e.t1.name,e.t1.message),e.abrupt("return",null);case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(t){return e.apply(this,arguments)}}(),B=function(e){var t=null,n="".concat((0,r.Z)(new Uint8Array(e).slice(0,8)).join(" ")," "),o="255 216 255 ",i="71 73 70 56 57 97 ";return n==="137 80 78 71 13 10 26 10 "?t=d.LO.png:n.startsWith(o)?t=d.LO.jpg:n.startsWith(i)&&(t=d.LO.gif),t},H=function(e,t,n){return new File([e],n||"",{type:t})},W=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r,o,i,a,l,s,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type){e.next=28;break}if(null===(n=t)||void 0===n||null===(r=n.name)||void 0===r||!r.endsWith(".excalidrawlib")){e.next=11;break}return e.t0=H,e.next=5,F(t);case 5:e.t1=e.sent,e.t2=d.LO.excalidrawlib,e.t3=t.name,t=(0,e.t0)(e.t1,e.t2,e.t3),e.next=26;break;case 11:if(null===(o=t)||void 0===o||null===(i=o.name)||void 0===i||!i.endsWith(".excalidraw")){e.next=21;break}return e.t4=H,e.next=15,F(t);case 15:e.t5=e.sent,e.t6=d.LO.excalidraw,e.t7=t.name,t=(0,e.t4)(e.t5,e.t6,e.t7),e.next=26;break;case 21:return e.next=23,F(t);case 23:a=e.sent,(l=B(a))&&(t=H(a,l,t.name));case 26:e.next=34;break;case 28:if(!_(t)){e.next=34;break}return e.next=31,F(t);case 31:s=e.sent,(u=B(s))&&u!==t.type&&(t=H(s,u,t.name));case 34:return e.abrupt("return",t);case 35:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=function(e){return"arrayBuffer"in e?e.arrayBuffer():new Promise((function(t,n){var r=new FileReader;r.onload=function(e){var r;if(null===(r=e.target)||void 0===r||!r.result)return n(new Error("Couldn't convert blob to ArrayBuffer"));t(e.target.result)},r.readAsArrayBuffer(e)}))}},1393:function(e,t,n){"use strict";n.d(t,{I$:function(){return h},NL:function(){return m},kr:function(){return a}});var r=n(1930),o=n(8950),i=n(2975),a=function(){if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top}catch(e){return!1}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1}(),l=a?n.e(4736).then(n.bind(n,2254)):n.e(4736).then(n.bind(n,3499));function c(){return c=(0,o.Z)(i.mark((function e(){var t,n=arguments;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l;case 2:return e.abrupt("return",(t=e.sent).default.apply(t,n));case 3:case"end":return e.stop()}}),e)}))),c.apply(this,arguments)}a?n.e(4736).then(n.bind(n,6474)):n.e(4736).then(n.bind(n,9521));var s=a?n.e(4736).then(n.bind(n,9475)):n.e(4736).then(n.bind(n,6281));function u(){return u=(0,o.Z)(i.mark((function e(){var t,n=arguments;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s;case 2:return e.abrupt("return",(t=e.sent).default.apply(t,n));case 3:case"end":return e.stop()}}),e)}))),u.apply(this,arguments)}var d=n(2335),f=n(6797),p=n(6340),h=function(e){var t,n,o,i=null===(t=e.extensions)||void 0===t?void 0:t.reduce((function(e,t){return e.push(d.LO[t]),e}),[]),a=null===(n=e.extensions)||void 0===n?void 0:n.reduce((function(e,t){return"jpg"===t?e.concat(".jpg",".jpeg"):e.concat(".".concat(t))}),[]);return function(){return c.apply(this,arguments)}({description:e.description,extensions:a,mimeTypes:i,multiple:null!==(o=e.multiple)&&void 0!==o&&o,legacySetup:function(t,n,o){var i=(0,p.Ds)(n,500),a=function(){l(),document.addEventListener(d.Ks.KEYUP,i),document.addEventListener(d.Ks.POINTER_UP,i),i()},l=function(){var n;if(null!==(n=o.files)&&void 0!==n&&n.length){var i=e.multiple?(0,r.Z)(o.files):o.files[0];t(i)}};requestAnimationFrame((function(){window.addEventListener(d.Ks.FOCUS,a)}));var c=window.setInterval((function(){l()}),500);return function(e){clearInterval(c),i.cancel(),window.removeEventListener(d.Ks.FOCUS,a),document.removeEventListener(d.Ks.KEYUP,i),document.removeEventListener(d.Ks.POINTER_UP,i),e&&(console.warn("Opening the file was canceled (legacy-fs)."),e(new f._))}}})},m=function(e,t){return function(){return u.apply(this,arguments)}(e,{fileName:"".concat(t.name,".").concat(t.extension),description:t.description,extensions:[".".concat(t.extension)]},t.fileHandle)}},673:function(e,t,n){"use strict";n.r(t),n.d(t,{decodePngMetadata:function(){return E},decodeSvgMetadata:function(){return S},encodePngMetadata:function(){return k},encodeSvgMetadata:function(){return j},getTEXtChunk:function(){return w}});var r=n(8950),o=n(2975),i=n.n(o),a=n(2983),l=n.n(a),c=n(1194),s=n(3434),u=n.n(s),d=n(2744),f=n(2335),p=n(434),h=function(e){return new Promise((function(t,n){var r="string"==typeof e?new Blob([(new TextEncoder).encode(e)]):new Blob([e instanceof Uint8Array?e:new Uint8Array(e)]),o=new FileReader;o.onload=function(e){if(!e.target||"string"!=typeof e.target.result)return n(new Error("couldn't convert to byte string"));t(e.target.result)},o.readAsBinaryString(r)}))},m=function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0,o=e.length;r<o;r++)n[r]=e.charCodeAt(r);return t},g=function(e){return new TextDecoder("utf-8").decode(m(e))},v=function(){var e=(0,r.Z)(i().mark((function e(t){var n=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.length>1&&void 0!==n[1]&&n[1])){e.next=5;break}e.t0=window.btoa(t),e.next=10;break;case 5:return e.t1=window,e.next=8,h(t);case 8:e.t2=e.sent,e.t0=e.t1.btoa.call(e.t1,e.t2);case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]&&r[1],e.abrupt("return",n?window.atob(t):g(window.atob(t)));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.text,!1===t.compress){e.next=11;break}return e.prev=2,e.next=5,h((0,d.deflate)(n));case 5:r=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error("encode: cannot deflate",e.t0);case 11:if(e.t1=!!r,e.t2=r,e.t2){e.next=17;break}return e.next=16,h(n);case 16:e.t2=e.sent;case 17:return e.t3=e.t2,e.abrupt("return",{version:"1",encoding:"bstring",compressed:e.t1,encoded:e.t3});case 19:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=(0,r.Z)(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.encoding,e.next="bstring"===e.t0?3:12;break;case 3:if(!t.compressed){e.next=7;break}e.t1=t.encoded,e.next=10;break;case 7:return e.next=9,g(t.encoded);case 9:e.t1=e.sent;case 10:return n=e.t1,e.abrupt("break",13);case 12:throw new Error('decode: unknown encoding "'.concat(t.encoding,'"'));case 13:if(!t.compressed){e.next=15;break}return e.abrupt("return",(0,d.inflate)(new Uint8Array(m(n)),{to:"string"}));case 15:return e.abrupt("return",n);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var w=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=l(),e.t1=Uint8Array,e.next=4,(0,p.vZ)(t);case 4:if(e.t2=e.sent,e.t3=new e.t1(e.t2),n=(0,e.t0)(e.t3),!(r=n.find((function(e){return"tEXt"===e.name})))){e.next=10;break}return e.abrupt("return",c.decode(r.data));case 10:return e.abrupt("return",null);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.blob,r=t.metadata,e.t0=l(),e.t1=Uint8Array,e.next=5,(0,p.vZ)(n);case 5:return e.t2=e.sent,e.t3=new e.t1(e.t2),o=(0,e.t0)(e.t3),e.t4=c,e.t5=f.LO.excalidraw,e.t6=JSON,e.next=13,y({text:r,compress:!0});case 13:return e.t7=e.sent,e.t8=e.t6.stringify.call(e.t6,e.t7),a=e.t4.encode.call(e.t4,e.t5,e.t8),o.splice(-1,0,a),e.abrupt("return",new Blob([u()(o)],{type:f.LO.png}));case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w(t);case 2:if((null==(n=e.sent)?void 0:n.keyword)!==f.LO.excalidraw){e.next=19;break}if(e.prev=4,"encoded"in(r=JSON.parse(n.text))){e.next=10;break}if(!("type"in r)||r.type!==f.r8.excalidraw){e.next=9;break}return e.abrupt("return",n.text);case 9:throw new Error("FAILED");case 10:return e.next=12,x(r);case 12:return e.abrupt("return",e.sent);case 15:throw e.prev=15,e.t0=e.catch(4),console.error(e.t0),new Error("FAILED");case 19:throw new Error("INVALID");case 20:case"end":return e.stop()}}),e,null,[[4,15]])})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.text,e.t0=v,e.t1=JSON,e.next=5,y({text:n});case 5:return e.t2=e.sent,e.t3=e.t1.stringify.call(e.t1,e.t2),e.next=9,(0,e.t0)(e.t3,!0);case 9:return r=e.sent,o="",o+="\x3c!-- payload-type:".concat(f.LO.excalidraw," --\x3e"),o+="\x3c!-- payload-version:2 --\x3e",o+="\x3c!-- payload-start --\x3e",o+=r,o+="\x3c!-- payload-end --\x3e",e.abrupt("return",o);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o,a,l,c,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=t.svg).includes("payload-type:".concat(f.LO.excalidraw))){e.next=26;break}if(r=n.match(/<!-- payload-start -->\s*(.+?)\s*<!-- payload-end -->/)){e.next=5;break}throw new Error("INVALID");case 5:return o=n.match(/<!-- payload-version:(\d+) -->/),a=(null==o?void 0:o[1])||"1",l="1"!==a,e.prev=8,e.next=11,b(r[1],l);case 11:if(c=e.sent,"encoded"in(s=JSON.parse(c))){e.next=17;break}if(!("type"in s)||s.type!==f.r8.excalidraw){e.next=16;break}return e.abrupt("return",c);case 16:throw new Error("FAILED");case 17:return e.next=19,x(s);case 19:return e.abrupt("return",e.sent);case 22:throw e.prev=22,e.t0=e.catch(8),console.error(e.t0),new Error("FAILED");case 26:throw new Error("INVALID");case 27:case"end":return e.stop()}}),e,null,[[8,22]])})));return function(t){return e.apply(this,arguments)}}()},9485:function(e,t,n){"use strict";n.d(t,{Um:function(){return f.Um},cT:function(){return u.cT},n8:function(){return f.n8},p1:function(){return p}});var r=n(8950),o=n(2975),i=n.n(o),a=n(6665),l=n(2335),c=n(8211),s=n(4162),u=n(434),d=n(1393),f=n(5523),p=function(){var e=(0,r.Z)(i().mark((function e(t,r,o,p,h){var m,g,v,b,y,x,w,k,E,j,S;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m=h.exportBackground,g=h.exportPadding,v=void 0===g?l.qy:g,b=h.viewBackgroundColor,y=h.name,x=h.fileHandle,w=void 0===x?null:x,0!==r.length){e.next=3;break}throw new Error((0,c.t)("alerts.cannotExportEmptyCanvas"));case 3:if("svg"!==t&&"clipboard-svg"!==t){e.next=17;break}return e.next=6,(0,s.$D)(r,{exportBackground:m,exportWithDarkMode:o.exportWithDarkMode,viewBackgroundColor:b,exportPadding:v,exportScale:o.exportScale,exportEmbedScene:o.exportEmbedScene&&"svg"===t},p);case 6:if(k=e.sent,"svg"!==t){e.next=13;break}return e.next=10,(0,d.NL)(new Blob([k.outerHTML],{type:l.LO.svg}),{description:"Export to SVG",name:y,extension:o.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:w});case 10:return e.abrupt("return",e.sent);case 13:if("clipboard-svg"!==t){e.next=17;break}return e.next=16,(0,a.dd)(k.outerHTML);case 16:return e.abrupt("return");case 17:return e.next=19,(0,s.NL)(r,o,p,{exportBackground:m,viewBackgroundColor:b,exportPadding:v});case 19:if((E=e.sent).style.display="none",document.body.appendChild(E),"png"!==t){e.next=38;break}return e.next=25,(0,u._c)(E);case 25:if(j=e.sent,E.remove(),!o.exportEmbedScene){e.next=33;break}return e.next=30,Promise.resolve().then(n.bind(n,673));case 30:return e.next=32,e.sent.encodePngMetadata({blob:j,metadata:(0,f.I_)(r,o,p,"local")});case 32:j=e.sent;case 33:return e.next=35,(0,d.NL)(j,{description:"Export to PNG",name:y,extension:"png",fileHandle:w});case 35:return e.abrupt("return",e.sent);case 38:if("clipboard"!==t){e.next=60;break}return e.prev=39,S=(0,u._c)(E),e.next=43,(0,a.uR)(S);case 43:e.next=55;break;case 45:if(e.prev=45,e.t0=e.catch(39),console.warn(e.t0),"CANVAS_POSSIBLY_TOO_BIG"!==e.t0.name){e.next=50;break}throw e.t0;case 50:if(!l.vU||"TypeError"!==e.t0.name){e.next=54;break}throw new Error("".concat((0,c.t)("alerts.couldNotCopyToClipboard"),"\n\n").concat((0,c.t)("hints.firefox_clipboard_write")));case 54:throw new Error((0,c.t)("alerts.couldNotCopyToClipboard"));case 55:return e.prev=55,E.remove(),e.finish(55);case 58:e.next=62;break;case 60:throw E.remove(),new Error("Unsupported export type");case 62:case"end":return e.stop()}}),e,null,[[39,45,55,58]])})));return function(t,n,r,o,i){return e.apply(this,arguments)}}()},5523:function(e,t,n){"use strict";n.d(t,{HT:function(){return y},I_:function(){return m},NI:function(){return x},Um:function(){return g},dS:function(){return b},n8:function(){return v},t1:function(){return w}});var r=n(6655),o=n(8950),i=n(2975),a=n.n(i),l=n(1393),c=n(8897),s=n(2335),u=n(1047),d=n(434);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e,t){var n,r={},o=f(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;!i.isDeleted&&"fileId"in i&&i.fileId&&t[i.fileId]&&(r[i.fileId]=t[i.fileId])}}catch(e){o.e(e)}finally{o.f()}return r},m=function(e,t,n,r){var o={type:s.r8.excalidraw,version:s.Kr.excalidraw,source:s.pb,elements:"local"===r?(0,u._M)(e):(0,u.BQ)(e),appState:"local"===r?(0,c.s)(t):(0,c.eS)(t),files:"local"===r?h(e,n):void 0};return JSON.stringify(o,null,2)},g=function(){var e=(0,o.Z)(a().mark((function e(t,n,r){var o,i,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=m(t,n,r,"local"),i=new Blob([o],{type:s.LO.excalidraw}),e.next=4,(0,l.NL)(i,{name:n.name,extension:"excalidraw",description:"Excalidraw file",fileHandle:(0,d.g8)(n.fileHandle)?null:n.fileHandle});case 4:return c=e.sent,e.abrupt("return",{fileHandle:c});case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),v=function(){var e=(0,o.Z)(a().mark((function e(t,n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.I$)({description:"Excalidraw files"});case 2:return r=e.sent,e.t0=d.cT,e.next=6,(0,d.gY)(r);case 6:return e.t1=e.sent,e.t2=t,e.t3=n,e.t4=r.handle,e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t3,e.t4));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),b=function(e){return(null==e?void 0:e.type)===s.r8.excalidraw&&(!e.elements||Array.isArray(e.elements)&&(!e.appState||"object"===(0,r.Z)(e.appState)))},y=function(e){return"object"===(0,r.Z)(e)&&e&&e.type===s.r8.excalidrawLibrary&&(1===e.version||2===e.version)},x=function(e){var t={type:s.r8.excalidrawLibrary,version:s.Kr.excalidrawLibrary,source:s.pb,libraryItems:e};return JSON.stringify(t,null,2)},w=function(){var e=(0,o.Z)(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=x(t),e.next=3,(0,l.NL)(new Blob([n],{type:s.LO.excalidrawlib}),{name:"library",extension:"excalidrawlib",description:"Excalidraw library file"});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},7053:function(e,t,n){"use strict";n.d(t,{Di:function(){return I},WV:function(){return C},rF:function(){return E},xS:function(){return T},zh:function(){return O}});var r=n(7169),o=n(8950),i=n(5169),a=n(8821),l=n(1930),c=n(2975),s=n.n(c),u=n(434),d=n(679),f=n(4739),p=n(9487),h=n(8925),m=n(6797),g=n(8211),v=n(9787),b=n(2335);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E=(0,f.cn)({status:"loaded",isInitialized:!0,libraryItems:[]}),j=function(e){return JSON.parse(JSON.stringify(e))},S=function(e,t){return!e.find((function(e){return e.elements.length===t.elements.length&&e.elements.every((function(e,n){return e.id===t.elements[n].id&&e.versionNonce===t.elements[n].versionNonce}))}))},O=function(e,t){var n,r=[],o=w(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;S(e,i)&&r.push(i)}}catch(e){o.e(e)}finally{o.f()}return[].concat(r,(0,l.Z)(e))},_=(0,i.Z)((function e(t){var n=this;(0,a.Z)(this,e),this.lastLibraryItems=[],this.isInitialized=!1,this.updateQueue=[],this.getLastUpdateTask=function(){return n.updateQueue[n.updateQueue.length-1]},this.notifyListeners=function(){if(n.updateQueue.length>0)p.e_.set(E,{status:"loading",libraryItems:n.lastLibraryItems,isInitialized:n.isInitialized});else{n.isInitialized=!0,p.e_.set(E,{status:"loaded",libraryItems:n.lastLibraryItems,isInitialized:n.isInitialized});try{var e,t;null===(e=(t=n.app.props).onLibraryChange)||void 0===e||e.call(t,j(n.lastLibraryItems))}catch(e){console.error(e)}}},this.resetLibrary=function(){return n.setLibrary([])},this.getLatestLibrary=function(){return new Promise(function(){var e=(0,o.Z)(s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.getLastUpdateTask()||n.lastLibraryItems;case 3:r=e.sent,n.updateQueue.length>0?t(n.getLatestLibrary()):t(j(r)),e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",t(n.lastLibraryItems));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}())},this.updateLibrary=function(){var e=(0,o.Z)(s().mark((function e(t){var r,i,a,l,c,f,p,h,v;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.libraryItems,i=t.prompt,a=void 0!==i&&i,l=t.merge,c=void 0!==l&&l,f=t.openLibraryMenu,p=void 0!==f&&f,h=t.defaultStatus,v=void 0===h?"unpublished":h,p&&n.app.setState({openSidebar:{name:b.Cc.name,tab:b.tf}}),e.abrupt("return",n.setLibrary((function(){return new Promise(function(){var e=(0,o.Z)(s().mark((function e(t,o){var i,l;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,"function"!=typeof r||r instanceof Blob?r:r(n.lastLibraryItems);case 3:if(!((i=e.sent)instanceof Blob)){e.next=10;break}return e.next=7,(0,u.lV)(i,v);case 7:l=e.sent,e.next=11;break;case 10:l=(0,d.wJ)(i,v);case 11:!a||window.confirm((0,g.t)("alerts.confirmAddLibrary",{numShapes:l.length}))?(a&&n.app.focusContainer(),t(c?O(n.lastLibraryItems,l):l)):o(new m._),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),o(e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t,n){return e.apply(this,arguments)}}())})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.setLibrary=function(e){var t=new Promise(function(){var t=(0,o.Z)(s().mark((function t(r,o){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.getLastUpdateTask();case 3:return"function"==typeof e&&(e=e(n.lastLibraryItems)),t.t0=j,t.next=7,e;case 7:t.t1=t.sent,n.lastLibraryItems=(0,t.t0)(t.t1),r(n.lastLibraryItems),t.next=15;break;case 12:t.prev=12,t.t2=t.catch(0),o(t.t2);case 15:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(e,n){return t.apply(this,arguments)}}()).catch((function(e){if("AbortError"===e.name)return console.warn("Library update aborted by user"),n.lastLibraryItems;throw e})).finally((function(){n.updateQueue=n.updateQueue.filter((function(e){return e!==t})),n.notifyListeners()}));return n.updateQueue.push(t),n.notifyListeners(),t},this.app=t}));t.ZP=_;var C=function(e){var t,n=Math.ceil(Math.sqrt(e.length)),r=[],o=0,i=0,a=0,c=0,s=0,u=0,d=0,f=w(e);try{var p=function(){var f=t.value;s&&s%n==0&&(i+=a+50,o=0,u=0,d++),0===u&&(a=function(t){return e.slice(t*n,t*n+n).reduce((function(e,t){var n=(0,h.v2)(t.elements).height;return Math.max(e,n)}),0)}(d)),c=function(t){var r,o=0,i=0,a=0,l=w(e);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(o%n==0&&(i=0),i===t){var s=(0,h.v2)(c.elements).width;a=Math.max(a,s)}o++,i++}}catch(e){l.e(e)}finally{l.f()}return a}(u);var p=(0,h.v2)(f.elements),m=p.minX,g=p.minY,v=p.width,b=p.height,y=(c-v)/2,k=(a-b)/2;r.push.apply(r,(0,l.Z)(f.elements.map((function(e){return x(x({},e),{},{x:e.x+o+y-m,y:e.y+i+k-g})})))),o+=c+50,s++,u++};for(f.s();!(t=f.n()).done;)p()}catch(e){f.e(e)}finally{f.f()}return r},I=function(){var e=new URLSearchParams(window.location.hash.slice(1)).get(b.ah.addLibrary)||new URLSearchParams(window.location.search).get(b.UO.addLibrary),t=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:t}:null},T=function(e){var t=e.excalidrawAPI,n=e.getInitialLibraryItems,r=(0,v.useRef)(n);(0,v.useEffect)((function(){if(t){var e=function(){var e=(0,o.Z)(s().mark((function e(n){var r,i,a,l,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.libraryUrl,i=n.idToken,a=new Promise(function(){var e=(0,o.Z)(s().mark((function e(t,n){var o,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(decodeURIComponent(r));case 3:return o=e.sent,e.next=6,o.blob();case 6:i=e.sent,t(i),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),n(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()),l=i!==t.id,e.next=5,l&&document.hidden?new Promise((function(e){window.addEventListener("focus",(function(){return e()}),{once:!0})})):null;case 5:return e.prev=5,e.next=8,t.updateLibrary({libraryItems:a,prompt:l,merge:!0,defaultStatus:"published",openLibraryMenu:!0});case 8:e.next=13;break;case 10:throw e.prev=10,e.t0=e.catch(5),e.t0;case 13:return e.prev=13,window.location.hash.includes(b.ah.addLibrary)?((c=new URLSearchParams(window.location.hash.slice(1))).delete(b.ah.addLibrary),window.history.replaceState({},b.iC,"#".concat(c.toString()))):window.location.search.includes(b.UO.addLibrary)&&((u=new URLSearchParams(window.location.search)).delete(b.UO.addLibrary),window.history.replaceState({},b.iC,"?".concat(u.toString()))),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(t){return e.apply(this,arguments)}}(),n=function(t){t.preventDefault();var n=I();n&&(t.stopImmediatePropagation(),window.history.replaceState({},"",t.oldURL),e(n))};r.current&&t.updateLibrary({libraryItems:r.current()});var i=I();return i&&e(i),window.addEventListener(b.Ks.HASHCHANGE,n),function(){window.removeEventListener(b.Ks.HASHCHANGE,n)}}}),[t])}},679:function(e,t,n){"use strict";n.d(t,{ET:function(){return S},lY:function(){return C},nu:function(){return I},wJ:function(){return P}});var r=n(2577),o=n(7169),i=n(1047),a=n(1974),l=n(6954),c=n(2335),s=n(8897),u=n(6938),d=n(1935),f=n(6340),p=n(5284),h=n(5710),m=n(2791);function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x={selection:!0,text:!0,rectangle:!0,diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0,hand:!0},w=function(e){return Object.keys(c.ut).includes(e)?c.ut[e]:c.rk},k=function(e,t){var n,r,o,s,u,d,h,m,g,v,b,x,w,k,E={type:t.type||e.type,version:e.version||1,versionNonce:null!==(n=e.versionNonce)&&void 0!==n?n:0,isDeleted:null!==(r=e.isDeleted)&&void 0!==r&&r,id:e.id||(0,l.kb)(),fillStyle:e.fillStyle||"hachure",strokeWidth:e.strokeWidth||1,strokeStyle:null!==(o=e.strokeStyle)&&void 0!==o?o:"solid",roughness:null!==(s=e.roughness)&&void 0!==s?s:1,opacity:null==e.opacity?100:e.opacity,angle:e.angle||0,x:null!==(u=null!==(d=t.x)&&void 0!==d?d:e.x)&&void 0!==u?u:0,y:null!==(h=null!==(m=t.y)&&void 0!==m?m:e.y)&&void 0!==h?h:0,strokeColor:e.strokeColor||p.black,backgroundColor:e.backgroundColor||"transparent",width:e.width,height:e.height,seed:null!==(g=e.seed)&&void 0!==g?g:1,groupIds:null!==(v=e.groupIds)&&void 0!==v?v:[],roundness:e.roundness?e.roundness:"round"===e.strokeSharpness?{type:(0,a.QI)(e.type)?c.a6.LEGACY:c.a6.PROPORTIONAL_RADIUS}:null,boundElements:e.boundElementIds?e.boundElementIds.map((function(e){return{type:"arrow",id:e}})):null!==(b=e.boundElements)&&void 0!==b?b:[],updated:null!==(x=e.updated)&&void 0!==x?x:(0,f.C3)(),link:null!==(w=e.link)&&void 0!==w?w:null,locked:null!==(k=e.locked)&&void 0!==k&&k};return"customData"in e&&(E.customData=e.customData),c.WR in e&&(E[c.WR]=e[c.WR]),y(y(y({},E),(0,i.Qp)(E)),t)},E=function(e,t){if(e.boundElements){var n=e.boundElements.slice(),r=new Set;e.boundElements=n.reduce((function(n,o){var i=t.get(o.id);if(i&&!r.has(o.id)){if(r.add(o.id),i.isDeleted)return n;n.push(o),(0,a.iB)(i)&&!i.containerId&&(i.containerId=e.id)}return n}),[])}},j=function(e,t){var n=e.containerId?t.get(e.containerId):null;if(n){if(!e.isDeleted&&n.boundElements&&!n.boundElements.find((function(t){return t.id===e.id}))){var r=(n.boundElements||(n.boundElements=[])).slice();r.push({type:"text",id:e.id}),n.boundElements=r}}else e.containerId=null},S=function(e,t,n){var o=new Set,s=(0,m.wc)(e),p=t?(0,f.xn)(t):null,v=(s||[]).reduce((function(e,t){if("selection"!==t.type&&!(0,i.QD)(t)){var a=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.type){case"text":var a=e.fontSize,l=e.fontFamily;if("font"in e){var s=e.font.split(" "),d=(0,r.Z)(s,2),p=d[0],m=d[1];a=parseFloat(p),l=w(m)}var g=null!==(t=e.text)&&void 0!==t?t:"",v=e.lineHeight||(e.height?(0,h.$2)(e):(0,h.PT)(e.fontFamily)),b=(0,h.R8)(e.text,(0,f.mO)(e),v);return e=k(e,{type:"text",fontSize:a,fontFamily:l,text:g,textAlign:e.textAlign||c.Hg,verticalAlign:e.verticalAlign||c.hs,containerId:null!==(n=e.containerId)&&void 0!==n?n:null,originalText:e.originalText||g,lineHeight:v,baseline:b}),o&&(e=y(y({},e),(0,i.JZ)(e))),e;case"freedraw":return k(e,{points:e.points,lastCommittedPoint:null,simulatePressure:e.simulatePressure,pressures:e.pressures});case"image":return k(e,{status:e.status||"pending",fileId:e.fileId,scale:e.scale||[1,1]});case"line":case"draw":case"arrow":var x=e,E=x.startArrowhead,j=void 0===E?null:E,S=x.endArrowhead,O=void 0===S?"arrow"===e.type?"arrow":null:S,_=e.x,C=e.y,I=!Array.isArray(e.points)||e.points.length<2?[[0,0],[e.width,e.height]]:e.points;if(0!==I[0][0]||0!==I[0][1]){var T=u._.getNormalizedPoints(e);I=T.points,_=T.x,C=T.y}return k(e,{type:"draw"===e.type?"line":e.type,startBinding:e.startBinding,endBinding:e.endBinding,lastCommittedPoint:null,startArrowhead:j,endArrowhead:O,points:I,x:_,y:C});case"ellipse":case"rectangle":case"diamond":return k(e,{})}}(t,null==n?void 0:n.refreshDimensions);if(a){var s=null==p?void 0:p.get(t.id);s&&s.version>a.version&&(a=(0,d.ZP)(a,s.version)),o.has(a.id)&&(a=y(y({},a),{},{id:(0,l.kb)()})),o.add(a.id),e.push(a)}}return e}),[]);if(null==n||!n.repairBindings)return v;var b,x=(0,f.xn)(v),S=g(v);try{for(S.s();!(b=S.n()).done;){var O=b.value;(0,a.iB)(O)&&O.containerId?j(O,x):O.boundElements&&E(O,x)}}catch(e){S.e(e)}finally{S.f()}return v},O=function(e,t,n){var r=t[e];return void 0!==r?r:n[e]},_={isSidebarDocked:function(e,t){var n;return["defaultSidebarDockedPreference",null!==(n=e.isSidebarDocked)&&void 0!==n?n:O("defaultSidebarDockedPreference",e,t)]}},C=function(e,t){var n,o,i,a;e=e||{};for(var l=(0,s.im)(),u={},d=0,p=Object.keys(_);d<p.length;d++){var h=p[d];if(h in e){var m=_[h](e,l),g=(0,r.Z)(m,2),v=g[0],b=g[1];u[v]=b}}for(var w=0,k=Object.entries(l);w<k.length;w++){var E=(0,r.Z)(k[w],2),j=E[0],S=E[1],O=e[j],C=t?t[j]:void 0;u[j]=void 0!==O?O:void 0!==C?C:S}return y(y({},u),{},{cursorButton:(null==t?void 0:t.cursorButton)||"up",penDetected:null!==(n=null==t?void 0:t.penDetected)&&void 0!==n?n:!!e.penMode&&(null!==(o=e.penDetected)&&void 0!==o&&o),activeTool:y(y({},(0,f.Om)(l,u.activeTool.type&&x[u.activeTool.type]?u.activeTool:{type:"selection"})),{},{lastActiveTool:null,locked:null!==(i=u.activeTool.locked)&&void 0!==i&&i}),zoom:"number"==typeof e.zoom?{value:e.zoom}:null!==(a=e.zoom)&&void 0!==a&&a.value?e.zoom:l.zoom,openSidebar:"string"==typeof e.openSidebar?{name:c.Cc.name}:u.openSidebar})},I=function(e,t,n,r){return{elements:S(null==e?void 0:e.elements,n,r),appState:C(null==e?void 0:e.appState,t||null),files:(null==e?void 0:e.files)||{}}},T=function(e){var t=S((0,i.Lm)(e.elements),null);return t.length?y(y({},e),{},{elements:t}):null},P=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=[],o=g(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;if(Array.isArray(i)){var a=T({status:n,elements:i,id:(0,l.kb)(),created:Date.now()});a&&r.push(a)}else{var c=i,s=T(y(y({},c),{},{id:c.id||(0,l.kb)(),status:c.status||n,created:c.created||Date.now()}));s&&r.push(s)}}}catch(e){o.e(e)}finally{o.f()}return r}},4929:function(e,t,n){"use strict";n.d(t,{rj:function(){return B},nW:function(){return W},nz:function(){return Y},sw:function(){return G},lV:function(){return Q},q$:function(){return K},wq:function(){return X},$u:function(){return U},Pp:function(){return J}});var r=n(7169),o=n(2577),i=n(6340),a=n(1935),l=n(7901),c=n(1319),s=n(3646),u=n(8211),d=n(9787),f=n(45),p=n(6066),h=n(3063),m=n(6552),g=n(2335),v=n(1894),b=n(75),y=n(2325),x=n(1047),w=n(487),k=n.n(w),E=n(631),j=n.n(E),S=n(2052),O=n.n(S),_=n(4010),C=n.n(_),I=n(1469),T=n.n(I),P=n(9329),M=n.n(P),D=n(5260),A={};A.styleTagTransform=M(),A.setAttributes=C(),A.insert=O().bind(null,"head"),A.domAPI=j(),A.insertStyleElement=T();k()(D.Z,A),D.Z&&D.Z.locals&&D.Z.locals;var L=n(7047),Z=n(6936),z=n(4512);function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var B=document.createElement("img");B.src="data:".concat(g.LO.svg,", ").concat(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#1971c2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>'));var H=!1,W=function(e){var t=e.element,n=e.setAppState,r=e.onLinkOpen,l=(0,Z.gF)(),h=t.link||"",m=(0,d.useState)(h),v=(0,o.Z)(m,2),b=v[0],y=v[1],x=(0,d.useRef)(null),w="editor"===l.showHyperlinkPopup||!h,k=(0,d.useCallback)((function(){if(x.current){var e=U(x.current.value);!t.link&&e&&(0,L.L)("hyperlink","create"),(0,a.DR)(t,{link:e}),n({showHyperlinkPopup:"info"})}}),[t,n]);(0,d.useLayoutEffect)((function(){return function(){k()}}),[k]),(0,d.useEffect)((function(){var e=null,r=function(r){w||(e&&clearTimeout(e),ee(t,l,[r.clientX,r.clientY])&&(e=window.setTimeout((function(){n({showHyperlinkPopup:!1})}),500)))};return window.addEventListener(g.Ks.POINTER_MOVE,r,!1),function(){window.removeEventListener(g.Ks.POINTER_MOVE,r,!1),e&&clearTimeout(e)}}),[l,t,w,n]);var E=(0,d.useCallback)((function(){(0,L.L)("hyperlink","delete"),(0,a.DR)(t,{link:null}),w&&(x.current.value=""),n({showHyperlinkPopup:!1})}),[n,t,w]),j=F(t,l),S=j.x,O=j.y;return l.draggingElement||l.resizingElement||l.isRotating||l.openMenu?null:(0,z.jsxs)("div",{className:"excalidraw-hyperlinkContainer",style:{top:"".concat(O,"px"),left:"".concat(S,"px"),width:320,padding:5},children:[w?(0,z.jsx)("input",{className:(0,f.Z)("excalidraw-hyperlinkContainer-input"),placeholder:"Type or paste your link here",ref:x,value:b,onChange:function(e){return y(e.target.value)},autoFocus:!0,onKeyDown:function(e){e.stopPropagation(),e[p.tW.CTRL_OR_CMD]&&e.key===p.tW.K&&e.preventDefault(),e.key!==p.tW.ENTER&&e.key!==p.tW.ESCAPE||k()}}):(0,z.jsx)("a",{href:t.link||"",className:(0,f.Z)("excalidraw-hyperlinkContainer-link",{"d-none":w}),target:K(t.link)?"_self":"_blank",onClick:function(e){if(t.link&&r){var n=(0,i.ag)(g.Ks.EXCALIDRAW_LINK,e.nativeEvent);r(t,n),n.defaultPrevented&&e.preventDefault()}},rel:"noopener noreferrer",children:t.link}),(0,z.jsxs)("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!w&&(0,z.jsx)(c.V,{type:"button",title:(0,u.t)("buttons.edit"),"aria-label":(0,u.t)("buttons.edit"),label:(0,u.t)("buttons.edit"),onClick:function(){(0,L.L)("hyperlink","edit","popup-ui"),n({showHyperlinkPopup:"editor"})},className:"excalidraw-hyperlinkContainer--edit",icon:s.Pm}),h&&(0,z.jsx)(c.V,{type:"button",title:(0,u.t)("buttons.remove"),"aria-label":(0,u.t)("buttons.remove"),label:(0,u.t)("buttons.remove"),onClick:E,className:"excalidraw-hyperlinkContainer--remove",icon:s.XH})]})]})},F=function(e,t){var n=(0,x.qf)(e),r=(0,o.Z)(n,2),a=r[0],l=r[1],c=(0,i._i)({sceneX:a+e.width/2,sceneY:l},t),s=c.x,u=c.y;return{x:s-t.offsetLeft-160,y:u-t.offsetTop-85}},U=function(e){return(e=e.trim())&&(e.includes("://")||/^[[\\/]/.test(e)||(e="https://".concat(e))),e},K=function(e){return!!(null!=e&&e.includes(location.origin)||null!=e&&e.startsWith("/"))},Y=(0,l.z)({name:"hyperlink",perform:function(e,t){return"editor"!==t.showHyperlinkPopup&&{elements:e,appState:N(N({},t),{},{showHyperlinkPopup:"editor",openMenu:null}),commitToHistory:!0}},trackEvent:{category:"hyperlink",action:"click"},keyTest:function(e){return e[p.tW.CTRL_OR_CMD]&&e.key===p.tW.K},contextItemLabel:function(e,t){return V(e,t)},predicate:function(e,t){return 1===(0,b.eD)(e,t).length},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,b.eD)(t,n);return(0,z.jsx)(c.V,{type:"button",icon:s.xP,"aria-label":(0,u.t)(V(t,n)),title:"".concat((0,u.t)("labels.link.label")," - ").concat((0,i.uY)("CtrlOrCmd+K")),onClick:function(){return r(null)},selected:1===o.length&&!!o[0].link})}}),V=function(e,t){return(0,b.eD)(e,t)[0].link?"labels.link.edit":"labels.link.create"},G=function(e,t,n){var r=(0,o.Z)(e,4),i=r[0],a=r[1],l=r[2],c=r[3],s=h.Dn,u=s/n.zoom.value,d=s/n.zoom.value,f=s/n.zoom.value,p=(i+l)/2,g=(a+c)/2,v=(s-8)/(2*n.zoom.value),b=4/n.zoom.value,y=l+b-v,x=a-b-f+v,w=(0,m.U1)(y+u/2,x+d/2,p,g,t),k=(0,o.Z)(w,2);return[k[0]-u/2,k[1]-d/2,u,d]},X=function(e,t,n,r){var i=(0,o.Z)(n,2),a=i[0],l=i[1];if(!e.link||t.selectedElementIds[e.id])return!1;var c=4/t.zoom.value;if(!r&&t.viewModeEnabled&&(0,y.pX)(e,[a,l],c))return!0;var s=(0,x.qf)(e),u=(0,o.Z)(s,4),d=u[0],f=u[1],p=u[2],h=u[3],m=G([d,f,p,h],e.angle,t),g=(0,o.Z)(m,4),v=g[0],b=g[1],w=g[2],k=g[3];return a>v-c&&a<v+c+w&&l>b-c&&l<b+k+c},q=null,J=function(e,t){q&&clearTimeout(q),q=window.setTimeout((function(){return $(e,t)}),g.sA)},$=function(e,t){if(e.link){var n=(0,v.bK)();n.classList.add("excalidraw-tooltip--visible"),n.style.maxWidth="20rem",n.textContent=e.link;var r=(0,x.qf)(e),a=(0,o.Z)(r,4),l=a[0],c=a[1],s=a[2],u=a[3],d=G([l,c,s,u],e.angle,t),f=(0,o.Z)(d,4),p=f[0],h=f[1],m=f[2],g=f[3],b=(0,i._i)({sceneX:p,sceneY:h},t);(0,v.Js)(n,{left:b.x,top:b.y,width:m,height:g},"top"),(0,L.L)("hyperlink","tooltip","link-icon"),H=!0}},Q=function(){q&&clearTimeout(q),H&&(H=!1,(0,v.bK)().classList.remove("excalidraw-tooltip--visible"))},ee=function(e,t,n){var r=(0,o.Z)(n,2),a=r[0],l=r[1],c=(0,i.dE)({clientX:a,clientY:l},t),s=c.x,u=c.y,d=15/t.zoom.value;if((0,y.pX)(e,[s,u],d))return!1;var f=(0,x.qf)(e),p=(0,o.Z)(f,3),h=p[0],m=p[1],g=p[2];if(s>=h&&s<=g&&u>=m-85&&u<=m)return!1;var v=F(e,t),b=v.x,w=v.y;return!(a>=b-d&&a<=b+320+10+d&&l>=w-d&&l<=w+d+10+42)}},8290:function(e,t,n){"use strict";n.d(t,{$q:function(){return F},DK:function(){return S},H:function(){return O},HG:function(){return b},N1:function(){return g},R:function(){return k},Ww:function(){return T},Y9:function(){return C},ZB:function(){return L},cz:function(){return m},ek:function(){return H},el:function(){return x}});var r=n(7169),o=n(2577),i=n(75),a=n(1974),l=n(2325),c=n(1935),s=n(1564),u=n(6938),d=n(6340),f=n(6066),p=n(5710);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var m=function(e){return!e[f.tW.CTRL_OR_CMD]},g=function(e){return e.isBindingEnabled},v=function(e,t){var n=[];return t.forEach((function(t){var r=e.getNonDeletedElement(t);null!=r&&n.push(r)})),n},b=function(e,t,n){var r=new Set,o=new Set;y(e,t,n,"start",r,o),y(e,n,t,"end",r,o);var i=Array.from(o).filter((function(e){return!r.has(e)}));v(s.Z.getScene(e),i).forEach((function(t){var n;(0,c.DR)(t,{boundElements:null===(n=t.boundElements)||void 0===n?void 0:n.filter((function(t){return"arrow"!==t.type||t.id!==e.id}))})}))},y=function(e,t,n,r,o,i){if("keep"!==t)if(null!=t)null!=n&&("keep"===n?j(e,t,r):"start"!==r&&n.id===t.id)||(E(e,t,r),o.add(t.id));else{var a=_(e,r);null!=a&&i.add(a)}},x=function(e){e.forEach((function(e){(0,a.Mn)(e)?b(e,z(e,"start"),z(e,"end")):(0,a.f0)(e)&&w(e)}))},w=function(e){N(e).forEach((function(t){var n=(0,o.Z)(t,2),r=n[0],i=n[1];return b(r,"end"===i?"keep":e,"start"===i?"keep":e)}))},k=function(e,t,n,r){null!=t.startBoundElement&&E(e,t.startBoundElement,"start");var o=C(r,n);null==o||j(e,o,"end")||E(e,o,"end")},E=function(e,t,n){(0,c.DR)(e,(0,r.Z)({},"start"===n?"startBinding":"endBinding",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({elementId:t.id},I(e,t,n)))),(0,d.xn)(t.boundElements||[]).has(e.id)||(0,c.DR)(t,{boundElements:(t.boundElements||[]).concat({id:e.id,type:"arrow"})})},j=function(e,t,n){var r=e["start"===n?"endBinding":"startBinding"];return S(e,null==r?void 0:r.elementId,t)},S=function(e,t,n){return t===n.id&&e.points.length<3},O=function(e){e.forEach((function(e){(0,a.Mn)(e)&&b(e,null,null)}))},_=function(e,t){var n="start"===t?"startBinding":"endBinding",o=e[n];return null==o?null:((0,c.DR)(e,(0,r.Z)({},n,null)),o.elementId)},C=function(e,t){return(0,i.QG)(t.getNonDeletedElements(),(function(t){return(0,a.f0)(t,!1)&&(0,l.uu)(t,e)}))},I=function(e,t,n){var r="start"===n?-1:1,o=-1===r?0:e.points.length-1,i=o-r,a=u._.getPointAtIndexGlobalCoordinates(e,o),c=u._.getPointAtIndexGlobalCoordinates(e,i);return{focus:(0,l.T_)(t,c,a),gap:Math.max(1,(0,l.oT)(t,a))}},T=function(e,t){var n,r=(null!==(n=e.boundElements)&&void 0!==n?n:[]).filter((function(e){return"arrow"===e.type}));if(0!==r.length){var o=null!=t?t:{},i=o.newSize,l=o.simultaneouslyUpdated,u=M(l);v(s.Z.getScene(e),r.map((function(e){return e.id}))).forEach((function(t){if((0,a.bt)(t)){var n=e;if(P(t,n)){var r=A(n,t.startBinding,i),o=A(n,t.endBinding,i);if(u.has(t.id))(0,c.DR)(t,{startBinding:r,endBinding:o});else D(t,"start",r,e),D(t,"end",o,e),(0,p.WJ)(t)&&(0,p.RB)(t,!1)}}}))}},P=function(e,t){var n,r;return(null===(n=e.startBinding)||void 0===n?void 0:n.elementId)===t.id||(null===(r=e.endBinding)||void 0===r?void 0:r.elementId)===t.id},M=function(e){return new Set((e||[]).map((function(e){return e.id})))},D=function(e,t,n,o){if(!(null==n||n.elementId!==o.id&&e.points.length>2)){var i=s.Z.getScene(e).getElement(n.elementId);if(null!=i){var a,c="start"===t?-1:1,d=-1===c?0:e.points.length-1,f=d-c,p=u._.getPointAtIndexGlobalCoordinates(e,f),h=(0,l.j_)(i,n.focus,p);if(0===n.gap)a=h;else{var m=(0,l.MZ)(i,p,h,n.gap);a=0===m.length?h:m[0]}u._.movePoints(e,[{index:d,point:u._.pointFromAbsoluteCoords(e,a)}],(0,r.Z)({},"start"===t?"startBinding":"endBinding",n))}}},A=function(e,t,n){if(null==t||null==n)return t;var r=t.gap,o=t.focus,i=t.elementId,a=n.width,c=n.height,s=e.width,u=e.height;return{elementId:i,gap:Math.max(1,Math.min((0,l.fb)(e,a,c),r*(a<c?a/s:c/u))),focus:o}},L=function(e){var t=new Set(e.map((function(e){return e.id})));return e.flatMap((function(e){return(0,a.Mn)(e,!1)?Z(e).filter((function(e){return!t.has(e.id)})):(0,a.f0)(e,!1)?N(e).filter((function(e){return!t.has(e[0].id)})):[]}))},Z=function(e){return[z(e,"start"),z(e,"end")].filter((function(e){return null!=e}))},z=function(e,t){return C(R(e,t),s.Z.getScene(e))},R=function(e,t){var n="start"===t?0:-1;return(0,d.AK)(u._.getPointAtIndexGlobalCoordinates(e,n))},N=function(e){return s.Z.getScene(e).getNonDeletedElements().map((function(t){if(!(0,a.Mn)(t,!1))return null;var n=B(t,"start",e),r=B(t,"end",e);return n||r?[t,n&&r?"both":n?"start":"end",e]:null})).filter((function(e){return null!=e}))},B=function(e,t,n){return null==e["start"===t?"startBinding":"endBinding"]&&!j(e,n,t)&&(0,l.uu)(n,R(e,t))},H=function(e,t,n,r){var o=new Set,i=new Set,l="duplicatesServeAsOld"===r;t.forEach((function(e){var t=e.boundElements;if(null!=t&&t.length>0&&(t.forEach((function(e){l&&!n.has(e.id)&&o.add(e.id)})),i.add(n.get(e.id))),(0,a.Mn)(e)){if(null!=e.startBinding){var r=e.startBinding.elementId;l&&!n.has(r)&&i.add(r)}if(null!=e.endBinding){var c=e.endBinding.elementId;l&&!n.has(c)&&i.add(c)}null==e.startBinding&&null==e.endBinding||o.add(n.get(e.id))}})),e.filter((function(e){var t=e.id;return o.has(t)})).forEach((function(e){var t=e.startBinding,r=e.endBinding;(0,c.DR)(e,{startBinding:W(t,n),endBinding:W(r,n)})})),e.filter((function(e){var t=e.id;return i.has(t)})).forEach((function(e){var t=e.boundElements;null!=t&&t.length>0&&(0,c.DR)(e,{boundElements:t.map((function(e){return n.has(e.id)?{id:n.get(e.id),type:e.type}:e}))})}))},W=function(e,t){var n;if(null==e)return null;var r=e.elementId;return{focus:e.focus,gap:e.gap,elementId:null!==(n=t.get(r))&&void 0!==n?n:r}},F=function(e,t){var n=new Set(t.map((function(e){return e.id}))),r=new Set;t.forEach((function(e){var t;(0,a.f0)(e)?null===(t=e.boundElements)||void 0===t||t.forEach((function(e){n.has(e.id)||r.add(e.id)})):(0,a.Mn)(e)&&(e.startBinding&&r.add(e.startBinding.elementId),e.endBinding&&r.add(e.endBinding.elementId))})),e.filter((function(e){var t=e.id;return r.has(t)})).forEach((function(e){(0,a.f0)(e)?(0,c.DR)(e,{boundElements:K(e.boundElements,n)}):(0,a.Mn)(e)&&(0,c.DR)(e,{startBinding:U(e.startBinding,n),endBinding:U(e.endBinding,n)})}))},U=function(e,t){return null==e||t.has(e.elementId)?null:e},K=function(e,t){return e?e.filter((function(e){return!t.has(e.id)})):null}},8925:function(e,t,n){"use strict";n.d(t,{CM:function(){return g},IX:function(){return y},KP:function(){return S},Pi:function(){return j},UC:function(){return m},Ut:function(){return _},Y5:function(){return k},os:function(){return C},qf:function(){return h},v2:function(){return I},wC:function(){return O}});var r=n(2577),o=n(1930),i=n(6552),a=n(8234),l=n(3063),c=n(1974),s=n(5001),u=n(5710),d=n(6938);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,c.F9)(e))return w(e);if((0,c.bt)(e))return d._.getElementAbsoluteCoords(e,t);if((0,c.iB)(e)){var n=(0,u.tl)(e);if((0,c.Yv)(n)){var r=d._.getBoundTextElementPosition(n,e);return[r.x,r.y,r.x+e.width,r.y+e.height,r.x+e.width/2,r.y+e.height/2]}}return[e.x,e.y,e.x+e.width,e.y+e.height,e.x+e.width/2,e.y+e.height/2]},m=function(e){var t=Math.floor(e.width/2)+1,n=e.width,r=Math.floor(e.height/2)+1;return[t,0,n,r,t,e.height,0,r]},g=function(e){var t,n=f(e.sets);try{for(n.s();!(t=n.n()).done;){var r=t.value;if("path"===r.type)return r.ops}}catch(e){n.e(e)}finally{n.f()}return e.sets[0].ops},v=function(e,t,n,r,o){var i=1-e;return Math.pow(i,3)*t+3*Math.pow(i,2)*e*n+3*i*Math.pow(e,2)*r+Math.pow(e,3)*o},b=function(e,t,n,r){var o=t-e,i=n-t,a=3*o-6*i+3*(r-n),l=6*i-6*o,c=3*o,s=l*l-4*a*c;if(!(s>=0))return!1;var u=null,d=null,f=1/0,p=1/0;return 0===a?f=p=-c/l:(f=(-l+Math.sqrt(s))/(2*a),p=(-l-Math.sqrt(s))/(2*a)),f>=0&&f<=1&&(u=v(f,e,t,n,r)),p>=0&&p<=1&&(d=v(p,e,t,n,r)),[u,d]},y=function(e,t){var n=[0,0],i=e.reduce((function(e,i){var a=i.op,l=i.data;if("move"===a)n=l;else if("bcurveTo"===a){var c=[l[0],l[1]],s=[l[2],l[3]],u=[l[4],l[5]],d=t?t.apply(void 0,c):c,f=t?t.apply(void 0,s):s,p=t?t.apply(void 0,u):u,h=t?t.apply(void 0,(0,o.Z)(n)):n;n=u;var m=function(e,t,n,r){var i=b(e[0],t[0],n[0],r[0]),a=b(e[1],t[1],n[1],r[1]),l=Math.min(e[0],r[0]),c=Math.max(e[0],r[0]);if(i){var s=i.filter((function(e){return null!==e}));l=Math.min.apply(Math,[l].concat((0,o.Z)(s))),c=Math.max.apply(Math,[c].concat((0,o.Z)(s)))}var u=Math.min(e[1],r[1]),d=Math.max(e[1],r[1]);if(a){var f=a.filter((function(e){return null!==e}));u=Math.min.apply(Math,[u].concat((0,o.Z)(f))),d=Math.max.apply(Math,[d].concat((0,o.Z)(f)))}return[l,u,c,d]}(h,d,f,p),g=(0,r.Z)(m,4),v=g[0],y=g[1],x=g[2],w=g[3];e.minX=Math.min(e.minX,v),e.minY=Math.min(e.minY,y),e.maxX=Math.max(e.maxX,x),e.maxY=Math.max(e.maxY,w)}return e}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[i.minX,i.minY,i.maxX,i.maxY]},x=function(e){var t,n=1/0,o=1/0,i=-1/0,a=-1/0,l=f(e);try{for(l.s();!(t=l.n()).done;){var c=(0,r.Z)(t.value,2),s=c[0],u=c[1];n=Math.min(n,s),o=Math.min(o,u),i=Math.max(i,s),a=Math.max(a,u)}}catch(e){l.e(e)}finally{l.f()}return[n,o,i,a]},w=function(e){var t=x(e.points),n=(0,r.Z)(t,4),o=n[0],i=n[1],a=n[2],l=n[3],c=o+e.x,s=i+e.y,u=a+e.x,d=l+e.y;return[c,s,u,d,(c+u)/2,(s+d)/2]},k=function(e,t,n,o){var a=g(t[0]);if(a.length<1)return null;var l="start"===n?1:a.length-1,c=a[l].data,s=[c[4],c[5]],u=[c[2],c[3]],d=[c[0],c[1]],f=a[l-1],p=[0,0];"move"===f.op?p=f.data:"bcurveTo"===f.op&&(p=[f.data[4],f.data[5]]);var h=function(e,t){return Math.pow(1-e,3)*s[t]+3*e*Math.pow(1-e,2)*u[t]+3*Math.pow(e,2)*(1-e)*d[t]+p[t]*Math.pow(e,3)},m="start"===n?p:s,v=(0,r.Z)(m,2),b=v[0],y=v[1],x=[h(.3,0),h(.3,1)],w=x[0],k=x[1],E=Math.hypot(b-w,y-k),j=(b-w)/E,S=(y-k)/E,O={arrow:30,bar:15,dot:15,triangle:15}[o],_=0;if("arrow"===o){var C=(0,r.Z)(e.points[e.points.length-1],2),I=C[0],T=C[1],P=e.points.length>1?e.points[e.points.length-2]:[0,0],M=(0,r.Z)(P,2),D=M[0],A=M[1];_=Math.hypot(I-D,T-A)}else for(var L=0;L<e.points.length;L++){var Z=e.points[L-1]||[0,0],z=(0,r.Z)(Z,2),R=z[0],N=z[1],B=(0,r.Z)(e.points[L],2),H=B[0],W=B[1];_+=Math.hypot(H-R,W-N)}var F=Math.min(O,_/2),U=b-j*F,K=y-S*F;if("dot"===o)return[b,y,Math.hypot(K-y,U-b)+e.strokeWidth];var Y={arrow:20,bar:90,triangle:25}[o],V=(0,i.U1)(U,K,b,y,-Y*Math.PI/180),G=(0,r.Z)(V,2),X=G[0],q=G[1],J=(0,i.U1)(U,K,b,y,Y*Math.PI/180),$=(0,r.Z)(J,2);return[b,y,X,q,$[0],$[1]]},E=function(e,t,n){var o;if(e.points.length<2){var c=(0,r.Z)(e.points[0],2),s=c[0],f=c[1],p=(0,i.U1)(e.x+s,e.y+f,t,n,e.angle),h=(0,r.Z)(p,2),m=h[0],v=h[1],b=[m,v,m,v],x=(0,u.WJ)(e);if(x){var w=d._.getMinMaxXYWithBoundText(e,[m,v,m,v],x);b=[w[0],w[1],w[2],w[3]]}return b}var k=null===(o=(0,l.R2)(e))||void 0===o?void 0:o[0],E=null!=k?k:function(e){var t=a.Z.generator(),n=(0,l.i)(e);return t[e.roundness?"curve":n.fill?"polygon":"linearPath"](e.points,n)}(e),j=g(E),S=y(j,(function(r,o){return(0,i.U1)(e.x+r,e.y+o,t,n,e.angle)})),O=[S[0],S[1],S[2],S[3]],_=(0,u.WJ)(e);if(_){var C=d._.getMinMaxXYWithBoundText(e,O,_);O=[C[0],C[1],C[2],C[3]]}return O},j=function(e){var t,n=h(e),o=(0,r.Z)(n,6),a=o[0],l=o[1],s=o[2],u=o[3],d=o[4],f=o[5];if((0,c.F9)(e)){var p=x(e.points.map((function(t){var n=(0,r.Z)(t,2),o=n[0],a=n[1];return(0,i.U1)(o,a,d-e.x,f-e.y,e.angle)}))),m=(0,r.Z)(p,4),g=m[0],v=m[1],b=m[2],y=m[3];return[g+e.x,v+e.y,b+e.x,y+e.y]}if((0,c.bt)(e))t=E(e,d,f);else if("diamond"===e.type){var w=(0,i.U1)(d,l,d,f,e.angle),k=(0,r.Z)(w,2),j=k[0],S=k[1],O=(0,i.U1)(d,u,d,f,e.angle),_=(0,r.Z)(O,2),C=_[0],I=_[1],T=(0,i.U1)(a,f,d,f,e.angle),P=(0,r.Z)(T,2),M=P[0],D=P[1],A=(0,i.U1)(s,f,d,f,e.angle),L=(0,r.Z)(A,2),Z=L[0],z=L[1];t=[Math.min(j,C,M,Z),Math.min(S,I,D,z),Math.max(j,C,M,Z),Math.max(S,I,D,z)]}else if("ellipse"===e.type){var R=(s-a)/2,N=(u-l)/2,B=Math.cos(e.angle),H=Math.sin(e.angle),W=Math.hypot(R*B,N*H),F=Math.hypot(N*B,R*H);t=[d-W,f-F,d+W,f+F]}else{var U=(0,i.U1)(a,l,d,f,e.angle),K=(0,r.Z)(U,2),Y=K[0],V=K[1],G=(0,i.U1)(a,u,d,f,e.angle),X=(0,r.Z)(G,2),q=X[0],J=X[1],$=(0,i.U1)(s,u,d,f,e.angle),Q=(0,r.Z)($,2),ee=Q[0],te=Q[1],ne=(0,i.U1)(s,l,d,f,e.angle),re=(0,r.Z)(ne,2),oe=re[0],ie=re[1];t=[Math.min(Y,q,ee,oe),Math.min(V,J,te,ie),Math.max(Y,q,ee,oe),Math.max(V,J,te,ie)]}return t},S=function(e){if(!e.length)return[0,0,0,0];var t=1/0,n=-1/0,o=1/0,i=-1/0;return e.forEach((function(e){var a=j(e),l=(0,r.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3];t=Math.min(t,c),o=Math.min(o,s),n=Math.max(n,u),i=Math.max(i,d)})),[t,o,n,i]},O=function(e,t,n,o){if(!(0,c.bt)(e)&&!(0,c.F9)(e))return[e.x,e.y,e.x+t,e.y+n];var i,u=(0,s.z)(0,t,(0,s.z)(1,n,e.points,o),o);if((0,c.F9)(e))i=x(u);else{var d=a.Z.generator(),f=e.roundness?d.curve(u,(0,l.i)(e)):d.linearPath(u,(0,l.i)(e)),p=g(f);i=y(p)}var h=i,m=(0,r.Z)(h,4),v=m[0],b=m[1],w=m[2],k=m[3];return[v+e.x,b+e.y,w+e.x,k+e.y]},_=function(e,t){var n=a.Z.generator(),o=null==e.roundness?n.linearPath(t,(0,l.i)(e)):n.curve(t,(0,l.i)(e)),i=g(o),c=y(i),s=(0,r.Z)(c,4),u=s[0],d=s[1],f=s[2],p=s[3];return[u+e.x,d+e.y,f+e.x,p+e.y]},C=function(e,t){if(!e.length)return[0,0,0,0];var n=1/0,o=e[0];return e.forEach((function(e){var a=j(e),l=(0,r.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3],f=(0,i.LW)((c+u)/2,(s+d)/2,t.x,t.y);f<n&&(n=f,o=e)})),j(o)},I=function(e){var t=S(e),n=(0,r.Z)(t,4),o=n[0],i=n[1],a=n[2],l=n[3];return{minX:o,minY:i,maxX:a,maxY:l,width:a-o,height:l-i,midX:(o+a)/2,midY:(i+l)/2}}},2325:function(e,t,n){"use strict";n.d(t,{uu:function(){return F},T_:function(){return ae},j_:function(){return le},oT:function(){return Y},wX:function(){return R},MZ:function(){return ce},wB:function(){return N},Qu:function(){return B},pX:function(){return W},fb:function(){return U}});var r=n(2577),o=function(e,t){return[0,0,0,0,t,e,1,0]},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[0,0,0,0,0,0,0,0];if(t<0||t>7)throw new Error("Expected `index` between 0 and 7, got `".concat(t,"`"));return 0!==e&&(n[t]=e),n},a=function(e){return[e[0],e[1],e[2],e[3],-e[4],-e[5],-e[6],-e[7]]},l=function(e,t){return m(t)?[e[0]-t,e[1],e[2],e[3],e[4],e[5],e[6],e[7]]:[e[0]-t[0],e[1]-t[1],e[2]-t[2],e[3]-t[3],e[4]-t[4],e[5]-t[5],e[6]-t[6],e[7]-t[7]]},c=function(e,t){return m(t)?[e[0]*t,e[1]*t,e[2]*t,e[3]*t,e[4]*t,e[5]*t,e[6]*t,e[7]*t]:[s(e,t),t[1]*e[0]+t[0]*e[1]-t[4]*e[2]+t[5]*e[3]+t[2]*e[4]-t[3]*e[5]-t[7]*e[6]-t[6]*e[7],t[2]*e[0]+t[0]*e[2]-t[6]*e[3]+t[3]*e[6],t[3]*e[0]+t[6]*e[2]+t[0]*e[3]-t[2]*e[6],t[4]*e[0]+t[2]*e[1]-t[1]*e[2]+t[7]*e[3]+t[0]*e[4]+t[6]*e[5]-t[5]*e[6]+t[3]*e[7],t[5]*e[0]-t[3]*e[1]+t[7]*e[2]+t[1]*e[3]-t[6]*e[4]+t[0]*e[5]+t[4]*e[6]+t[2]*e[7],t[6]*e[0]+t[3]*e[2]-t[2]*e[3]+t[0]*e[6],t[7]*e[0]+t[6]*e[1]+t[5]*e[2]+t[4]*e[3]+t[3]*e[4]+t[2]*e[5]+t[1]*e[6]+t[0]*e[7]]},s=function(e,t){return t[0]*e[0]+t[2]*e[2]+t[3]*e[3]-t[6]*e[6]},u=function(e,t){return[d(e,t),e[1]*t[7]+e[4]*t[5]-e[5]*t[4]+e[7]*t[1],e[2]*t[7]-e[4]*t[6]+e[6]*t[4]+e[7]*t[2],e[3]*t[7]+e[5]*t[6]-e[6]*t[5]+e[7]*t[3],e[4]*t[7]+e[7]*t[4],e[5]*t[7]+e[7]*t[5],e[6]*t[7]+e[7]*t[6],e[7]*t[7]]},d=function(e,t){return e[0]*t[7]+e[1]*t[6]+e[2]*t[5]+e[3]*t[4]+e[4]*t[3]+e[5]*t[2]+e[6]*t[1]+e[7]*t[0]},f=function(e){return Math.sqrt(Math.abs(e[0]*e[0]-e[2]*e[2]-e[3]*e[3]+e[6]*e[6]))},p=function(e){var t=f(e);if(0===t||1===t)return e;var n=e[6]<0?-1:1;return c(e,n/t)},h=function(e){var t=function(e){return Math.sqrt(Math.abs(e[7]*e[7]-e[5]*e[5]-e[4]*e[4]+e[1]*e[1]))}(e);return 0===t||1===t?e:c(e,1/t)},m=function(e){return"number"==typeof e},g=(i(1,1),i(1,2),i(1,3),i(1,4),i(1,5),i(1,6),i(1,7),function(e,t,n){return p([0,n,e,t,0,0,0,0])}),v=function(e,t){return p(u(t,e))},b=function(e,t){return n=e,[(r=t)[0]*n[0]+r[2]*n[2]+r[3]*n[3]-r[6]*n[6],r[1]*n[0]+r[0]*n[1]-r[4]*n[2]+r[5]*n[3]+r[2]*n[4]-r[3]*n[5]-r[7]*n[6]-r[6]*n[7],r[2]*n[0]+r[0]*n[2]-r[6]*n[3]+r[3]*n[6],r[3]*n[0]+r[6]*n[2]+r[0]*n[3]-r[2]*n[6],r[4]*n[0]+r[7]*n[3]+r[0]*n[4]+r[3]*n[7],r[5]*n[0]+r[7]*n[2]+r[0]*n[5]+r[2]*n[7],r[6]*n[0]+r[0]*n[6],r[7]*n[0]+r[0]*n[7]];var n,r},y=function(e){var t=(0,r.Z)(e,2),n=t[0];return[0,0,0,0,t[1],n,1,0]},x=function(e){return[e[5],e[4]]},w=function(e,t){return p((n=e,[(r=t)[0]*n[0],r[1]*n[0]+r[0]*n[1],r[2]*n[0]+r[0]*n[2],r[3]*n[0]+r[0]*n[3],r[4]*n[0]+r[2]*n[1]-r[1]*n[2]+r[0]*n[4],r[5]*n[0]-r[3]*n[1]+r[1]*n[3]+r[0]*n[5],r[6]*n[0]+r[3]*n[2]-r[2]*n[3]+r[0]*n[6],r[7]*n[0]+r[6]*n[1]+r[5]*n[2]+r[4]*n[3]+r[3]*n[4]+r[2]*n[5]+r[1]*n[6]]));var n,r},k=function(e,t){return f(u(e,t))},E=function(e,t){return d(e,t)},j=function(e){return[0,0,0,0,e[4],e[5],0,0]},S=function(e,t){return n=c(e,Math.sin(t/2)),r=Math.cos(t/2),m(r)?[n[0]+r,n[1],n[2],n[3],n[4],n[5],n[6],n[7]]:[n[0]+r[0],n[1]+r[1],n[2]+r[2],n[3]+r[3],n[4]+r[4],n[5]+r[5],n[6]+r[6],n[7]+r[7]];var n,r},O=function(e,t){return p(c(c(e,t),a(e)))},_=n(6552),C=n(1493),I=n(8925),T=n(3063),P=n(1974),M=n(1047),D=n(6340),A=n(267),L=n(5710);function Z(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var R=function e(t,n,r,o){var i=10/n.zoom.value,a=[r,o];if(H(n,t)&&(0,A.oY)([t],n))return W(t,a,i);var l=(0,L.WJ)(t);if(l&&e(l,n,r,o))return!0;return B(t,n,a)},N=function(e,t,n,r){var o=10/t.zoom.value,i=(0,L.WJ)(e);return(!i||!R(i,t,n,r))&&(!B(e,t,[n,r])&&W(e,[n,r],o))},B=function(e,t,n){var r=10/t.zoom.value,o=(0,M.iB)(e)?V:function(e){if("arrow"===e.type)return!1;if("freedraw"===e.type)return!0;var t=!(0,D.Qm)(e.backgroundColor)||(0,P.Xo)(e);return"line"===e.type?t&&(0,_.g6)(e.points):t||(0,P.pC)(e)}(e)?G:X;return K({element:e,point:n,threshold:r,check:o})},H=function(e,t){return e.selectedElementIds[t.id]},W=function(e,t,n){var o=(0,r.Z)(t,2),i=o[0],a=o[1],l=(0,I.qf)(e),c=(0,r.Z)(l,4),s=c[0],u=c[1],d=c[2],f=c[3],p=(s+d)/2,h=(u+f)/2,m=(0,_.U1)(i,a,p,h,-e.angle),g=(0,r.Z)(m,2),v=g[0],b=g[1];return v>s-n&&v<d+n&&b>u-n&&b<f+n},F=function(e,t){var n=t.x,r=t.y,o=U(e,e.width,e.height);return K({element:e,point:[n,r],threshold:o,check:q})},U=function(e,t,n){var r=("diamond"===e.type?1/Math.sqrt(2):1)*Math.min(t,n);return Math.max(16,Math.min(.25*r,32))},K=function(e){switch(e.element.type){case"rectangle":case"image":case"text":case"diamond":case"ellipse":var t=Y(e.element,e.point);return e.check(t,e.threshold);case"freedraw":return!!e.check(J(e.element,e.point),e.threshold)&&te(e.element,e.point,e.threshold);case"arrow":case"line":return ne(e);case"selection":return console.warn("This should not happen, we need to investigate why it does."),!1}},Y=function(e,t){switch(e.type){case"rectangle":case"image":case"text":return J(e,t);case"diamond":return $(e,t);case"ellipse":return Q(e,t)}},V=function(e,t){return e<0},G=function(e,t){return e<t},X=function(e,t){return Math.abs(e)<t},q=function(e,t){return 0<=e&&e<t},J=function(e,t){var n=re(e,t),o=(0,r.Z)(n,4),i=o[1],a=o[2],l=o[3];return Math.max(E(i,g(0,1,-l)),E(i,g(1,0,-a)))},$=function(e,t){var n=re(e,t),o=(0,r.Z)(n,4),i=o[1],a=o[2],l=o[3],c=g(l,a,-l*a);return E(i,c)},Q=function(e,t){var n,o=ee(e,t),i=(0,r.Z)(o,2),a=i[0],l=i[1];return n=l,-Math.sign(n[1])*E(a,l)},ee=function(e,t){var n=re(e,t),i=(0,r.Z)(n,4),a=i[1],l=i[2],c=i[3],s=x(a),u=(0,r.Z)(s,2),d=u[0],f=u[1],p=.707,h=.707,m=l,g=c;[0,1,2,3].forEach((function(e){var t=m*p,n=g*h,r=(m*m-g*g)*Math.pow(p,3)/m,o=(g*g-m*m)*Math.pow(h,3)/g,i=t-r,a=n-o,l=d-r,c=f-o,s=Math.hypot(a,i),u=Math.hypot(c,l);p=Math.min(1,Math.max(0,(l*s/u+r)/m)),h=Math.min(1,Math.max(0,(c*s/u+o)/g));var v=Math.hypot(h,p);p/=v,h/=v}));var y,w=o(m*p,g*h);return[a,b(v(a,y=w),y)]},te=function(e,t,n){var o,i;if(0===e.angle)o=t[0]-e.x,i=t[1]-e.y;else{var a=(0,I.qf)(e),l=(0,r.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3],f=(0,_.xj)(t,[c+(u-c)/2,s+(d-s)/2],-e.angle);o=f[0]-e.x,i=f[1]-e.y}var p,h=(0,r.Z)(e.points,2),m=h[0],g=h[1];if((0,_.LW)(m[0],m[1],o,i)<n||(0,_.LW)(g[0],g[1],o,i)<n)return!0;for(var v=0;v<e.points.length;v++){var b=[g[0]-m[0],g[1]-m[1]],y=Math.hypot(b[1],b[0]),x=[b[0]/y,b[1]/y],w=[o-m[0],i-m[1]],k=(w[0]*x[0]+w[1]*x[1])/Math.hypot(x[1],x[0]);p=[m[0]+x[0]*k,m[1]+x[1]*k];var E=(0,_.LW)(p[0],p[1],m[0],m[1]),j=(0,_.LW)(p[0],p[1],g[0],g[1]);if(p=j<E&&E>y?g:E<j&&j>y?m:p,Math.hypot(i-p[1],o-p[0])<n)return!0;m=g,g=e.points[v+1]}var S=(0,T.R2)(e);return!(!S||!S.sets.length)&&be(S,o,i,n)},ne=function(e){var t=e.element,n=e.threshold;if(!(0,T.R2)(t))return!1;var o=re(e.element,e.point),i=(0,r.Z)(o,4),a=i[0],l=i[1],c=i[2],s=i[3],u=g(0,1,-s),d=g(1,0,-c);if(!G(E(l,u),n)||!G(E(l,d),n))return!1;var f=x(a),p=(0,r.Z)(f,2),h=p[0],m=p[1],v=(0,T.R2)(t);if(!v)return!1;if(e.check===G&&v.some((function(e){return ve(e,h,m,t.roundness?"round":"sharp")})))return!0;return v.some((function(e){return be(e,h,m,n)}))},re=function(e,t){var n,o=y(t),i=(0,I.qf)(e),a=(0,r.Z)(i,4),c=a[0],s=a[1],u=a[2],d=a[3],f=(0,I.qf)(e),p=ie([c,s,u,d]),h=S(p,e.angle),m=O(h,o),g=function(e){return[0,0,0,0,Math.abs(e[4]),Math.abs(e[5]),1,0]}(l(m,j(p))),v=(n=e.x,[0,0,0,0,e.y,n,0,0]),b=l(m,v),x=(0,r.Z)(f,4),w=x[0],k=x[1];return[b,g,(x[2]-w)/2,(x[3]-k)/2]},oe=function(e){var t=(0,I.qf)(e),n=(0,r.Z)(t,4),o=n[0],i=n[1],l=n[2],s=n[3],u=ie([o,i,l,s]),d=S(u,e.angle),f=a(function(e){return[1,0,0,0,-.5*e[5],.5*e[4],0,0]}(j(u)));return c(f,d)},ie=function(e){var t=(0,r.Z)(e,4),n=t[0],i=t[1],a=t[2],l=t[3];return o((n+a)/2,(i+l)/2)},ae=function(e,t,n){var r=oe(e),o=O(r,y(t)),i=O(r,y(n)),a=v(o,i),l=e.height/e.width,c=e.width/2,s=e.height/2,u=a[2],d=a[3],f=a[1],p=Math.abs(d),h=Math.abs(u);switch(e.type){case"rectangle":case"image":case"text":return f/(c*(h+l*p));case"diamond":return p<h?f/(h*c):f/(p*s);case"ellipse":return f/(c*Math.sqrt(Math.pow(u,2)+Math.pow(l,2)*Math.pow(d,2)))}},le=function(e,t,n){if(0===t){var o=(0,I.qf)(e),i=(0,r.Z)(o,4),l=i[0],c=i[1],s=i[2],u=i[3],d=ie([l,c,s,u]);return x(d)}var f,p=oe(e),h=O(p,y(n)),m=a(p);switch(e.type){case"rectangle":case"image":case"text":case"diamond":f=ge(e,t,h);break;case"ellipse":f=me(e,t,h)}return x(O(m,f))},ce=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=oe(e),i=O(o,y(t)),l=O(o,y(n)),c=v(i,l),s=a(o),u=se(e,c,i,r);return u.map((function(e){return x(O(s,e))}))},se=function(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;switch(e.type){case"rectangle":case"image":case"text":case"diamond":var i=ue(e);r=i.flatMap((function(e,n){var r=[e,i[(n+1)%4]];return de(t,fe(r,o))})).concat(i.flatMap((function(e){return he(e,o,t)})));break;case"ellipse":r=pe(e,o,t)}if(r.length<2)return[];var a=r.sort((function(e,t){return k(e,n)-k(t,n)}));return[a[0],a[a.length-1]]},ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t*e.width/2,r=t*e.height/2;switch(e.type){case"rectangle":case"image":case"text":return[o(n,r),o(n,-r),o(-n,-r),o(-n,r)];case"diamond":return[o(0,r),o(n,0),o(0,-r),o(-n,0)]}},de=function(e,t){var n=(0,r.Z)(t,2),o=n[0],i=n[1];return E(o,e)*E(i,e)>=0?[]:[w(e,v(o,i))]},fe=function(e,t){var n=(0,r.Z)(e,2),o=n[0],i=n[1],a=function(e,t){var n=.5*t;return[1,0,0,0,n*e[4],n*e[5],0,0]}(function(e,t){return h([0,0,0,0,t[4]-e[4],t[5]-e[5],0,0])}(o,i),t);return[O(a,o),O(a,i)]},pe=function(e,t,n){var r=e.width/2+t,i=e.height/2+t,a=n[2],l=n[3],c=n[1],s=r*r*a*a+i*i*l*l,u=s-c*c;if(0===s||u<=0)return[];var d=Math.sqrt(u),f=-r*r*a*c,p=-i*i*l*c;return[o((f+r*i*l*d)/s,(p-r*i*a*d)/s),o((f-r*i*l*d)/s,(p+r*i*a*d)/s)]},he=function(e,t,n){if(0===t)return 0===E(n,e)?[e]:[];var i=n[2],a=n[3],l=n[1],c=x(e),s=(0,r.Z)(c,2),u=s[0],d=s[1],f=i*i+a*a,p=t*t*f-Math.pow(i*u+a*d+l,2);if(0===f||p<=0)return[];var h=Math.sqrt(p),m=u*a*a-d*i*a-i*l,g=d*i*i-u*i*a-a*l;return[o((m+a*h)/f,(g-i*h)/f),o((m-a*h)/f,(g+i*h)/f)]},me=function(e,t,n){var i=Math.abs(t),a=e.width*i/2,l=e.height*i/2,c=Math.sign(t),s=x(n),u=(0,r.Z)(s,2),d=u[0],f=u[1],p=0===f?1e-4:f,h=Math.pow(d,2)*Math.pow(l,2)+Math.pow(p,2)*Math.pow(a,2),m=(-d*Math.pow(l,2)+c*p*Math.sqrt(Math.max(0,h-Math.pow(a,2)*Math.pow(l,2))))/h,g=(-m*d-1)/p;0===g&&(g=.01*(Object.is(g,-0)?-1:1));var v=-Math.pow(a,2)*m/(Math.pow(g,2)*Math.pow(l,2)+Math.pow(m,2)*Math.pow(a,2));return o(v,(-m*v-1)/g)},ge=function(e,t,n){var r=Math.abs(t),o=Math.sign(t),i=ue(e,r),a=0,l=null;return i.forEach((function(e){var t=o*v(n,e)[1];t>a&&(a=t,l=e)})),l},ve=function(e,t,n,r){var o,i=[],a=!1,l=Z((0,I.CM)(e));try{for(l.s();!(o=l.n()).done;){var c=o.value;"move"===c.op?(a=!a)&&i.push([c.data[0],c.data[1]]):"bcurveTo"===c.op?a&&(i.push([c.data[0],c.data[1]]),i.push([c.data[2],c.data[3]]),i.push([c.data[4],c.data[5]])):"lineTo"===c.op&&a&&i.push([c.data[0],c.data[1]])}}catch(e){l.e(e)}finally{l.f()}if(i.length>=4){if("sharp"===r)return(0,_.c9)(i,t,n);var s=(0,C.s)(i,10,5);return(0,_.c9)(s,t,n)}return!1},be=function(e,t,n,o){var i=(0,I.CM)(e),a=[0,0];return i.some((function(i,l){var c=i.op,s=i.data;if("move"===c)a=s;else{if("bcurveTo"===c){var u=[s[0],s[1]],d=[s[2],s[3]],f=[s[4],s[5]],p=a;a=f;var h=function(e,t,n,o,i,a){for(var l=(0,r.Z)(i,2),c=l[0],s=l[1],u=function(r,i){return Math.pow(1-r,3)*o[i]+3*r*Math.pow(1-r,2)*n[i]+3*Math.pow(r,2)*(1-r)*t[i]+e[i]*Math.pow(r,3)},d=0;d<=1;){var f=u(d,0),p=u(d,1);if(Math.sqrt(Math.pow(f-c,2)+Math.pow(p-s,2))<a)return!0;d+=.01}return!1}(p,u,d,f,[t,n],o);return h}if("lineTo"===c)return ve(e,t,n,"sharp");"qcurveTo"===c&&console.warn("qcurveTo is not implemented yet")}return!1}))}},5637:function(e,t,n){"use strict";n.d(t,{PK:function(){return p},Xx:function(){return h},bp:function(){return g},oA:function(){return m}});var r=n(2577),o=n(7169),i=n(8950),a=n(2975),l=n.n(a),c=n(2335),s=n(8211),u=n(1974);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},h=function(){var e=(0,i.Z)(l().mark((function e(t){var n,r,o,a,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileIds,r=t.files,o=t.imageCache,a=new Map,s=new Map,e.next=5,Promise.all(n.reduce((function(e,t){var n=r[t];return n&&!a.has(t)?(a.set(t,!0),e.concat((0,i.Z)(l().mark((function e(){var r,i,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n.mimeType!==c.LO.binary){e.next=3;break}throw new Error("Only images can be added to ImageCache");case 3:return r=p(n.dataURL),i={image:r,mimeType:n.mimeType},o.set(t,i),e.next=8,r;case 8:a=e.sent,o.set(t,f(f({},i),{},{image:a})),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),s.set(t,!0);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})))())):e}),[]));case 5:return e.abrupt("return",{imageCache:o,updatedFiles:a,erroredFiles:s});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(e){return e.filter((function(e){return(0,u.wi)(e)}))},g=function(){var e=(0,i.Z)(l().mark((function e(t){var n,o,i,a,u,d,f;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(new DOMParser).parseFromString(t,c.LO.svg),o=n.querySelector("svg"),!n.querySelector("parsererror")&&"svg"===(null==(l=o)?void 0:l.nodeName.toLowerCase())){e.next=7;break}throw new Error((0,s.t)("errors.invalidSVGString"));case 7:return o.hasAttribute("xmlns")||o.setAttribute("xmlns",c.hR),o.hasAttribute("width")&&o.hasAttribute("height")||(i=o.getAttribute("viewBox"),a=o.getAttribute("width")||"50",u=o.getAttribute("height")||"50",i&&(d=i.match(/\d+ +\d+ +(\d+) +(\d+)/))&&(f=(0,r.Z)(d,3),a=f[1],u=f[2]),o.setAttribute("width",a),o.setAttribute("height",u)),e.abrupt("return",o.outerHTML);case 10:case"end":return e.stop()}var l}),e)})));return function(t){return e.apply(this,arguments)}}()},1047:function(e,t,n){"use strict";n.d(t,{ox:function(){return p.ox},BQ:function(){return H},_M:function(){return W},EJ:function(){return T},o8:function(){return _},Sy:function(){return d.Sy},os:function(){return f.os},KP:function(){return f.KP},Un:function(){return k},$V:function(){return I},qf:function(){return f.qf},Pi:function(){return f.Pi},jt:function(){return y},o4:function(){return s},Lm:function(){return R},Qp:function(){return u},T:function(){return E.T},xx:function(){return E.xx},Uo:function(){return Z},n2:function(){return x},PC:function(){return p.PC},kK:function(){return p.kK},n_:function(){return z},wX:function(){return h.wX},r2:function(){return i.r2},wB:function(){return h.wB},QD:function(){return l},qP:function(){return N},iB:function(){return i.iB},Up:function(){return d.Up},vw:function(){return d.vw},y8:function(){return d.y8},VL:function(){return d.VL},oN:function(){return S.oN},JZ:function(){return d.JZ},RT:function(){return D},b_:function(){return P.b_},vY:function(){return E.vY},N_:function(){return d.N_}});var r=n(7169),o=n(1935),i=n(1974),a=n(2335),l=function(e){return(0,i.bt)(e)||(0,i.F9)(e)?e.points.length<2:0===e.width&&0===e.height},c=function(e,t,n){var r=Math.abs(t),o=Math.abs(n);if("line"===e||"arrow"===e||"freedraw"===e){var i=Math.round(Math.atan(o/r)/a.ay)*a.ay;0===i?n=0:i===Math.PI/2?t=0:n=r*Math.tan(i)*Math.sign(n)||n}else"selection"!==e&&(n=r*Math.sign(n));return{width:t,height:n}},s=function(e,t,n,r){var o=n-e,i=r-t,l=Math.round(Math.atan(i/o)/a.ay)*a.ay;if(0===l)i=0;else if(l===Math.PI/2)o=0;else{var c=Math.tan(l),s=t-c*e,u=-1/c,d=r-u*n;o=(-1*d- -1*s)/(-1*c- -1*u)-e,i=(s*u-d*c)/(-1*c- -1*u)-t}return{width:o,height:i}},u=function(e){var t={width:e.width,height:e.height,x:e.x,y:e.y};if(e.width<0){var n=Math.abs(e.width);t.width=n,t.x=e.x-n}if(e.height<0){var r=Math.abs(e.height);t.height=r,t.y=e.y-r}return t},d=n(2791),f=n(8925),p=n(267),h=n(2325),m=n(2577),g=n(2726),v=["rotation"],b=function(e,t,n){return t>=e[0]&&t<=e[0]+e[2]&&n>=e[1]&&n<=e[1]+e[3]},y=function(e,t,n,r,o,i){return e.reduce((function(e,a){if(e)return e;var l=function(e,t,n,r,o,i){if(!t.selectedElementIds[e.id])return!1;var a=(0,p.PC)(e,o,i),l=a.rotation,c=(0,g.Z)(a,v);if(l&&b(l,n,r))return"rotation";var s=Object.keys(c).filter((function(e){var t=c[e];return!!t&&b(t,n,r)}));return s.length>0&&s[0]}(a,t,n,r,o,i);return l?{element:a,transformHandleType:l}:null}),null)},x=function(e,t,n,r,o){var i=(0,m.Z)(e,4),a=i[0],l=i[1],c=i[2],s=i[3],u=(0,p.kK)([a,l,c,s,(a+c)/2,(l+s)/2],0,r,o,p.ox);return Object.keys(u).find((function(e){var r=u[e];return r&&b(r,t,n)}))||!1},w=["ns","nesw","ew","nwse"],k=function(e){var t=e.element,n=e.transformHandleType,r=t&&Math.sign(t.height)*Math.sign(t.width)==-1,o=null;switch(n){case"n":case"s":o="ns";break;case"w":case"e":o="ew";break;case"nw":case"se":o=r?"nesw":"nwse";break;case"ne":case"sw":o=r?"nwse":"nesw";break;case"rotation":return"grab"}return o&&t&&(o=function(e,t){var n=w.indexOf(e);if(n>=0){var r=Math.round(t/(Math.PI/4));e=w[(n+r)%w.length]}return e}(o,t.angle)),o?"".concat(o,"-resize"):""},E=n(8634),j=n(8290),S=n(5710),O=n(242),_=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,l=arguments.length>7?arguments[7]:void 0,c=(0,f.KP)(t),s=(0,m.Z)(c,2),u=s[0],d=s[1],p={x:n-u,y:r-d};t.forEach((function(n){if(C(o,i,a,e,n,p),!n.groupIds.length||l.editingGroupId&&!(0,O.zq)(l,n)){var r=(0,S.WJ)(n);r&&C(o,i,a,e,r,p)}(0,j.Ww)(n,{simultaneouslyUpdated:t})}))},C=function(e,t,n,r,i,a){var l,c;if(e){var s=e&&t<n,u=e&&t>n,d=r.originalElements.get(i.id);l=s&&d?d.x:i.x+a.x,c=u&&d?d.y:i.y+a.y}else l=i.x+a.x,c=i.y+a.y;(0,o.DR)(i,{x:l,y:c})},I=function(e,t,n){var r=(0,f.KP)(e),o=(0,m.Z)(r,2);return[t-o[0],n-o[1]]},T=function(e,t,n,r,i,a,l,s,u,d,f){if(u&&"selection"!==e.type)if(f)s=l/f;else{if(Math.abs(a-r)>Math.abs(i-n)){var p=c(t,s,i<n?-l:l);l=p.width,s=p.height}else{var h=c(t,l,a<r?-s:s);l=h.width,s=h.height}s<0&&(s=-s)}var m=i<n?n-l:n,g=a<r?r-s:r;d&&(m=n-(l+=l)/2,g=r-(s+=s)/2),0!==l&&0!==s&&(0,o.DR)(e,{x:m,y:g,width:l,height:s})},P=n(6906),M=n(75),D=function(e,t){return Boolean(!e.viewModeEnabled&&"custom"!==e.activeTool.type&&(e.editingElement||"selection"!==e.activeTool.type&&"eraser"!==e.activeTool.type&&"hand"!==e.activeTool.type)||(0,M.eD)(t,e).length)};function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Z=function(e){return e.reduce((function(e,t){return e+t.version}),0)},z=function(e){return e.filter((function(e){return!e.isDeleted&&!l(e)}))},R=function(e){return e.filter((function(e){return!e.isDeleted}))},N=function(e){return!e.isDeleted},B=function(e){return R(e).map((function(e){return(0,i.dt)(e.type)?L(L({},e),{},{lastCommittedPoint:null}):e}))},H=function(e){return B(e)},W=function(e){return B(e)}},6938:function(e,t,n){"use strict";n.d(t,{_:function(){return S}});var r=n(1930),o=n(7169),i=n(2577),a=n(8821),l=n(5169),c=n(6552),s=n(1047),u=n(8925),d=n(1935),f=n(1564),p=n(8290),h=n(6340),m=n(1974),g=n(6066),v=n(5710),b=n(3063),y=n(2335);function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j={version:null,points:[],zoom:null},S=function(){function e(t,n){(0,a.Z)(this,e),this.elementId=t.id,f.Z.mapElementToScene(this.elementId,n),e.normalizePoints(t),this.selectedPointsIndices=null,this.lastUncommittedPoint=null,this.isDragging=!1,this.pointerOffset={x:0,y:0},this.startBindingElement="keep",this.endBindingElement="keep",this.pointerDownState={prevSelectedPointsIndices:null,lastClickedPoint:-1,origin:null,segmentMidpoint:{value:null,index:null,added:!1}},this.hoverPointIndex=-1,this.segmentMidPointHoveredCoords=null}return(0,l.Z)(e,null,[{key:"getElement",value:function(e){var t,n=null===(t=f.Z.getScene(e))||void 0===t?void 0:t.getNonDeletedElement(e);return n||null}},{key:"handleBoxSelection",value:function(t,n,r){var o;if(!n.editingLinearElement||"selection"!==(null===(o=n.draggingElement)||void 0===o?void 0:o.type))return!1;var a=n.editingLinearElement,l=a.selectedPointsIndices,c=a.elementId,u=e.getElement(c);if(!u)return!1;var d=(0,s.qf)(n.draggingElement),f=(0,i.Z)(d,4),p=f[0],h=f[1],m=f[2],g=f[3],v=e.getPointsGlobalCoordinates(u).reduce((function(e,n,r){return(n[0]>=p&&n[0]<=m&&n[1]>=h&&n[1]<=g||t.shiftKey&&null!=l&&l.includes(r))&&e.push(r),e}),[]);r({editingLinearElement:E(E({},a),{},{selectedPointsIndices:v.length?v:null})})}},{key:"handlePointDragging",value:function(t,n,r,o,a,l){if(!l)return!1;var c=l.selectedPointsIndices,s=l.elementId,u=e.getElement(s);if(!u)return!1;var d=u.points[l.pointerDownState.lastClickedPoint];if(c&&d){if((0,g.Ge)(t)&&1===c.length&&u.points.length>1){var f=c[0],p=u.points[0===f?1:f-1],b=e._getShiftLockedDelta(u,p,[r,o],n.gridSize),y=(0,i.Z)(b,2),x=y[0],w=y[1];e.movePoints(u,[{index:f,point:[x+p[0],w+p[1]],isDragging:f===l.pointerDownState.lastClickedPoint}])}else{var k=e.createPointAt(u,r-l.pointerOffset.x,o-l.pointerOffset.y,n.gridSize),E=k[0]-d[0],j=k[1]-d[1];e.movePoints(u,c.map((function(t){return{index:t,point:t===l.pointerDownState.lastClickedPoint?e.createPointAt(u,r-l.pointerOffset.x,o-l.pointerOffset.y,n.gridSize):[u.points[t][0]+E,u.points[t][1]+j],isDragging:t===l.pointerDownState.lastClickedPoint}}))),(0,v.WJ)(u)&&(0,v.RB)(u,!1)}if((0,m.Mn)(u,!1)){var S=[];0===c[0]&&S.push((0,h.AK)(e.getPointGlobalCoordinates(u,u.points[0])));var O=c[c.length-1];O===u.points.length-1&&S.push((0,h.AK)(e.getPointGlobalCoordinates(u,u.points[O]))),S.length&&a(u,S)}return!0}return!1}},{key:"handlePointerUp",value:function(t,n,r){var o,i=n.elementId,a=n.selectedPointsIndices,l=n.isDragging,s=n.pointerDownState,u=e.getElement(i);if(!u)return n;var d={};if(l&&a){var m,g=x(a);try{for(g.s();!(m=g.n()).done;){var v=m.value;if(0===v||v===u.points.length-1){(0,c.g6)(u.points,r.zoom.value)&&e.movePoints(u,[{index:v,point:0===v?u.points[u.points.length-1]:u.points[0]}]);var b=(0,p.N1)(r)?(0,p.Y9)((0,h.AK)(e.getPointAtIndexGlobalCoordinates(u,v)),f.Z.getScene(u)):null;d[0===v?"startBindingElement":"endBindingElement"]=b}}}catch(e){g.e(e)}finally{g.f()}}return E(E(E({},n),d),{},{selectedPointsIndices:l||t.shiftKey?!l&&t.shiftKey&&null!==(o=s.prevSelectedPointsIndices)&&void 0!==o&&o.includes(s.lastClickedPoint)?a&&a.filter((function(e){return e!==s.lastClickedPoint})):a:null!=a&&a.includes(s.lastClickedPoint)?[s.lastClickedPoint]:a,isDragging:!1,pointerOffset:{x:0,y:0}})}},{key:"isSegmentTooShort",value:function(t,n,r,o){var i=(0,c.LW)(n[0],n[1],r[0],r[1]);return t.points.length>2&&t.roundness&&(i=(0,c.eH)(t,r)),i*o.value<4*e.POINT_HANDLE_SIZE}},{key:"getSegmentMidPoint",value:function(t,n,r,o){var a=(0,c.H5)(n,r);if(t.points.length>2&&t.roundness){var l=(0,c.yB)(t,t.points[o]);if(l){var s=(0,c.lk)(t,t.points[o],.5),u=(0,c.N_)(l[0],l[1],l[2],l[3],s),d=(0,i.Z)(u,2),f=d[0],p=d[1];a=e.getPointGlobalCoordinates(t,[f,p])}}return a}},{key:"getSegmentMidPointIndex",value:function(t,n,r){var o=e.getElement(t.elementId);if(!o)return-1;for(var i=e.getEditorMidPoints(o,n),a=0;a<i.length;){if(e.arePointsEqual(r,i[a]))return a+1;a++}return-1}},{key:"handlePointerDown",value:function(t,n,o,a,l){var u,h={didAddPoint:!1,hitElement:null,linearElementEditor:null};if(!l)return h;var g=l.elementId,v=e.getElement(g);if(!v)return h;var b=e.getSegmentMidpointHitCoords(l,a,n),y=null;if(b&&(y=e.getSegmentMidPointIndex(l,n,b)),t.altKey&&n.editingLinearElement)return null==l.lastUncommittedPoint&&((0,d.DR)(v,{points:[].concat((0,r.Z)(v.points),[e.createPointAt(v,a.x,a.y,n.gridSize)])}),h.didAddPoint=!0),o.resumeRecording(),h.linearElementEditor=E(E({},l),{},{pointerDownState:{prevSelectedPointsIndices:l.selectedPointsIndices,lastClickedPoint:-1,origin:{x:a.x,y:a.y},segmentMidpoint:{value:b,index:y,added:!1}},selectedPointsIndices:[v.points.length-1],lastUncommittedPoint:null,endBindingElement:(0,p.Y9)(a,f.Z.getScene(v))}),h.didAddPoint=!0,h;var x=e.getPointIndexUnderCursor(v,n.zoom,a.x,a.y);if(x>=0||b)h.hitElement=v;else{var w=l.startBindingElement,k=l.endBindingElement;(0,p.N1)(n)&&(0,m.Mn)(v)&&(0,p.HG)(v,w,k)}var j=(0,s.qf)(v),S=(0,i.Z)(j,4),_=S[0],C=S[1],I=(_+S[2])/2,T=(C+S[3])/2,P=x>-1&&(0,c.U1)(v.x+v.points[x][0],v.y+v.points[x][1],I,T,v.angle),M=x>-1||t.shiftKey?t.shiftKey||null!==(u=l.selectedPointsIndices)&&void 0!==u&&u.includes(x)?O([].concat((0,r.Z)(l.selectedPointsIndices||[]),[x])):[x]:null;return h.linearElementEditor=E(E({},l),{},{pointerDownState:{prevSelectedPointsIndices:l.selectedPointsIndices,lastClickedPoint:x,origin:{x:a.x,y:a.y},segmentMidpoint:{value:b,index:y,added:!1}},selectedPointsIndices:M,pointerOffset:P?{x:a.x-P[0],y:a.y-P[1]}:{x:0,y:0}}),h}},{key:"arePointsEqual",value:function(e,t){return!e&&!t||!(!e||!t)&&(0,c.Jj)(e,t)}},{key:"handlePointerMove",value:function(t,n,r,o){if(!o.editingLinearElement)return null;var a=o.editingLinearElement,l=a.elementId,c=a.lastUncommittedPoint,s=e.getElement(l);if(!s)return o.editingLinearElement;var u,d=s.points,f=d[d.length-1];if(!t.altKey)return f===c&&e.deletePoints(s,[d.length-1]),E(E({},o.editingLinearElement),{},{lastUncommittedPoint:null});if((0,g.Ge)(t)&&d.length>=2){var p=d[d.length-2],h=e._getShiftLockedDelta(s,p,[n,r],o.gridSize),m=(0,i.Z)(h,2),v=m[0],b=m[1];u=[v+p[0],b+p[1]]}else u=e.createPointAt(s,n-o.editingLinearElement.pointerOffset.x,r-o.editingLinearElement.pointerOffset.y,o.gridSize);return f===c?e.movePoints(s,[{index:s.points.length-1,point:u}]):e.addPoints(s,o,[{point:u}]),E(E({},o.editingLinearElement),{},{lastUncommittedPoint:s.points[s.points.length-1]})}},{key:"getPointGlobalCoordinates",value:function(e,t){var n=(0,s.qf)(e),r=(0,i.Z)(n,4),o=r[0],a=r[1],l=(o+r[2])/2,u=(a+r[3])/2,d=e.x,f=e.y,p=(0,c.U1)(d+t[0],f+t[1],l,u,e.angle),h=(0,i.Z)(p,2);return[d=h[0],f=h[1]]}},{key:"getPointsGlobalCoordinates",value:function(e){var t=(0,s.qf)(e),n=(0,i.Z)(t,4),r=n[0],o=n[1],a=n[2],l=n[3],u=(r+a)/2,d=(o+l)/2;return e.points.map((function(t){var n=e.x,r=e.y,o=(0,c.U1)(n+t[0],r+t[1],u,d,e.angle),a=(0,i.Z)(o,2);return[n=a[0],r=a[1]]}))}},{key:"getPointAtIndexGlobalCoordinates",value:function(e,t){var n=t<0?e.points.length+t:t,r=(0,s.qf)(e),o=(0,i.Z)(r,4),a=o[0],l=o[1],u=(a+o[2])/2,d=(l+o[3])/2,f=e.points[n],p=e.x,h=e.y;return f?(0,c.U1)(p+f[0],h+f[1],u,d,e.angle):(0,c.U1)(p,h,u,d,e.angle)}},{key:"pointFromAbsoluteCoords",value:function(e,t){var n=(0,s.qf)(e),r=(0,i.Z)(n,4),o=r[0],a=r[1],l=(o+r[2])/2,u=(a+r[3])/2,d=(0,c.U1)(t[0],t[1],l,u,-e.angle),f=(0,i.Z)(d,2),p=f[0],h=f[1];return[p-e.x,h-e.y]}},{key:"getPointIndexUnderCursor",value:function(t,n,r,o){for(var i=e.getPointsGlobalCoordinates(t),a=i.length;--a>-1;){var l=i[a];if((0,c.LW)(r,o,l[0],l[1])*n.value<e.POINT_HANDLE_SIZE+1)return a}return-1}},{key:"createPointAt",value:function(e,t,n,r){var o=(0,c.wC)(t,n,r),a=(0,s.qf)(e),l=(0,i.Z)(a,4),u=l[0],d=l[1],f=(u+l[2])/2,p=(d+l[3])/2,h=(0,c.U1)(o[0],o[1],f,p,-e.angle),m=(0,i.Z)(h,2),g=m[0],v=m[1];return[g-e.x,v-e.y]}},{key:"getNormalizedPoints",value:function(e){var t=e.points,n=t[0][0],r=t[0][1];return{points:t.map((function(e,t){return[e[0]-n,e[1]-r]})),x:e.x+n,y:e.y+r}}},{key:"normalizePoints",value:function(t){(0,d.DR)(t,e.getNormalizedPoints(t))}},{key:"duplicateSelectedPoints",value:function(t){if(!t.editingLinearElement)return!1;var n=t.editingLinearElement,r=n.selectedPointsIndices,o=n.elementId,i=e.getElement(o);if(!i||null===r)return!1;var a=i.points,l=[],c=!1,s=-1,u=a.reduce((function(e,t,n){if(++s,e.push(t),r.includes(n)){var o=a[n+1];o||(c=!0),e.push(o?[(t[0]+o[0])/2,(t[1]+o[1])/2]:[t[0],t[1]]),l.push(s+1),++s}return e}),[]);if((0,d.DR)(i,{points:u}),c){var f=i.points[i.points.length-1];e.movePoints(i,[{index:i.points.length-1,point:[f[0]+30,f[1]+30]}])}return{appState:E(E({},t),{},{editingLinearElement:E(E({},t.editingLinearElement),{},{selectedPointsIndices:l})})}}},{key:"deletePoints",value:function(t,n){var r=0,o=0;if(n.includes(0)){var i=t.points.find((function(e,t){return!n.includes(t)}));i&&(r=i[0],o=i[1])}var a=t.points.reduce((function(e,t,i){return n.includes(i)||e.push(e.length?[t[0]-r,t[1]-o]:[0,0]),e}),[]);e._updatePoints(t,a,r,o)}},{key:"addPoints",value:function(t,n,o){var i=[].concat((0,r.Z)(t.points),(0,r.Z)(o.map((function(e){return e.point}))));e._updatePoints(t,i,0,0)}},{key:"movePoints",value:function(t,n,r){var o=t.points,i=0,a=0,l=n.find((function(e){return 0===e.index}));l&&(i=l.point[0]+o[l.index][0],a=l.point[1]+o[l.index][1]);var c=o.map((function(e,t){var r=n.find((function(e){return e.index===t}));if(r){if(l)return e;var c=r.point[0]-o[r.index][0],s=r.point[1]-o[r.index][1];return[e[0]+c,e[1]+s]}return i||a?[e[0]-i,e[1]-a]:e}));e._updatePoints(t,c,i,a,r)}},{key:"shouldAddMidpoint",value:function(t,n,r){if(!e.getElement(t.elementId))return!1;var o=t.pointerDownState.segmentMidpoint;if(o.added||null===o.value||null===o.index||null===t.pointerDownState.origin)return!1;var i=t.pointerDownState.origin,a=(0,c.LW)(i.x,i.y,n.x,n.y);return!(!r.editingLinearElement&&a<y.f/r.zoom.value)}},{key:"addMidpoint",value:function(t,n,o){var i=e.getElement(t.elementId);if(i){var a=t.pointerDownState.segmentMidpoint,l={pointerDownState:t.pointerDownState,selectedPointsIndices:t.selectedPointsIndices},c=e.createPointAt(i,n.x,n.y,o.gridSize),s=[].concat((0,r.Z)(i.points.slice(0,a.index)),[c],(0,r.Z)(i.points.slice(a.index)));return(0,d.DR)(i,{points:s}),l.pointerDownState=E(E({},t.pointerDownState),{},{segmentMidpoint:E(E({},t.pointerDownState.segmentMidpoint),{},{added:!0}),lastClickedPoint:a.index}),l.selectedPointsIndices=[a.index],l}}},{key:"_updatePoints",value:function(e,t,n,r,o){var i=(0,u.Ut)(e,t),a=(0,u.Ut)(e,e.points),l=(i[0]+i[2])/2,s=(i[1]+i[3])/2,f=(a[0]+a[2])/2-l,p=(a[1]+a[3])/2-s,h=(0,c.U1)(n,r,f,p,e.angle);(0,d.DR)(e,E(E({},o),{},{points:t,x:e.x+h[0],y:e.y+h[1]}))}},{key:"_getShiftLockedDelta",value:function(t,n,r,o){var a=e.getPointGlobalCoordinates(t,n),l=(0,c.wC)(r[0],r[1],o),u=(0,i.Z)(l,2),d=u[0],f=u[1],p=(0,s.o4)(a[0],a[1],d,f),h=p.width,m=p.height;return(0,c.xj)([h,m],[0,0],-t.angle)}}]),e}();S.POINT_HANDLE_SIZE=10,S.getEditorMidPoints=function(e,t){var n=(0,v.WJ)(e);return!t.editingLinearElement&&e.points.length>2&&!n?[]:(j.version===e.version&&j.zoom===t.zoom.value||S.updateEditorMidPointsCache(e,t),j.points)},S.updateEditorMidPointsCache=function(e,t){for(var n=S.getPointsGlobalCoordinates(e),r=0,o=[];r<n.length-1;)if(S.isSegmentTooShort(e,e.points[r],e.points[r+1],t.zoom))o.push(null),r++;else{var i=S.getSegmentMidPoint(e,n[r],n[r+1],r+1);o.push(i),r++}j.points=o,j.version=e.version,j.zoom=t.zoom.value},S.getSegmentMidpointHitCoords=function(e,t,n){var r=e.elementId,o=S.getElement(r);if(!o)return null;if(S.getPointIndexUnderCursor(o,n.zoom,t.x,t.y)>=0)return null;if(S.getPointsGlobalCoordinates(o).length>=3&&!n.editingLinearElement)return null;var i=S.POINT_HANDLE_SIZE/n.zoom.value,a=e.segmentMidPointHoveredCoords;if(a&&(0,c.LW)(a[0],a[1],t.x,t.y)<=i)return a;for(var l=0,s=S.getEditorMidPoints(o,n);l<s.length;){if(null!==s[l])if((0,c.LW)(s[l][0],s[l][1],t.x,t.y)<=i)return s[l];l++}return null},S.getBoundTextElementPosition=function(e,t){var n=S.getPointsGlobalCoordinates(e);n.length<2&&(0,d.DR)(t,{isDeleted:!0});var r=0,o=0;if(e.points.length%2==1){var i=Math.floor(e.points.length/2),a=S.getPointGlobalCoordinates(e,e.points[i]);r=a[0]-t.width/2,o=a[1]-t.height/2}else{var l=e.points.length/2-1,s=j.points[l];2===e.points.length&&(s=(0,c.H5)(n[0],n[1])),s&&j.version===e.version||(s=S.getSegmentMidPoint(e,n[l],n[l+1],l+1)),r=s[0]-t.width/2,o=s[1]-t.height/2}return{x:r,y:o}},S.getMinMaxXYWithBoundText=function(e,t,n){var r=(0,i.Z)(t,4),o=r[0],a=r[1],l=r[2],s=r[3],u=(o+l)/2,d=(a+s)/2,f=S.getBoundTextElementPosition(e,n),p=f.x,h=f.y,m=p+n.width,g=h+n.height,v=(0,c.xj)([o,a],[u,d],e.angle),b=(0,c.xj)([l,a],[u,d],e.angle),y=(0,c.xj)([p,h],[u,d],-e.angle),x=(0,c.xj)([m,h],[u,d],-e.angle),w=(0,c.xj)([p,g],[u,d],-e.angle),k=(0,c.xj)([m,g],[u,d],-e.angle);return v[0]<b[0]&&v[1]>=b[1]?(o=Math.min(o,w[0]),l=Math.max(l,Math.max(x[0],k[0])),a=Math.min(a,y[1]),s=Math.max(s,k[1])):v[0]>=b[0]&&v[1]>b[1]?(o=Math.min(o,k[0]),l=Math.max(l,Math.max(y[0],x[0])),a=Math.min(a,w[1]),s=Math.max(s,x[1])):v[0]>=b[0]?(o=Math.min(o,x[0]),l=Math.max(l,w[0]),a=Math.min(a,k[1]),s=Math.max(s,y[1])):v[1]<=b[1]&&(o=Math.min(o,Math.min(x[0],y[0])),l=Math.max(l,k[0]),a=Math.min(a,x[1]),s=Math.max(s,w[1])),[o,a,l,s,u,d]},S.getElementAbsoluteCoords=function(e){var t,n,r,o,a,l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.points.length<2||!(0,b.R2)(e)){var c=e.points.reduce((function(e,t){var n=(0,i.Z)(t,2),r=n[0],o=n[1];return e.minY=Math.min(e.minY,o),e.minX=Math.min(e.minX,r),e.maxX=Math.max(e.maxX,r),e.maxY=Math.max(e.maxY,o),e}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}),s=c.minX,d=c.minY,f=c.maxX,p=c.maxY;n=s+e.x,r=d+e.y,o=f+e.x,a=p+e.y}else{var h=(0,b.R2)(e),m=(0,u.CM)(h[0]),g=(0,u.IX)(m),y=(0,i.Z)(g,4),x=y[0],w=y[1],k=y[2],E=y[3];n=x+e.x,r=w+e.y,o=k+e.x,a=E+e.y}var j=(n+o)/2,O=(r+a)/2;if(t=[n,r,o,a,j,O],!l)return t;var _=(0,v.WJ)(e);return _&&(t=S.getMinMaxXYWithBoundText(e,[n,r,o,a],_)),t};var O=function(e){var t=(0,r.Z)(new Set(e.filter((function(e){return null!==e&&-1!==e}))));return(t=t.sort((function(e,t){return e-t}))).length?t:null}},1935:function(e,t,n){"use strict";n.d(t,{BE:function(){return p},DR:function(){return f},ZP:function(){return h}});var r=n(6655),o=n(7169),i=n(3063),a=n(1564),l=n(5001),c=n(6954),s=n(6340);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e,t){var n,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=!1,f=t,p=f.points,h=f.fileId;for(var m in void 0!==p&&(t=d(d({},(0,l.k)(p)),t)),t){var g=t[m];if(void 0!==g){if(e[m]===g&&("object"!==(0,r.Z)(g)||null===g||"groupIds"===m||"scale"===m))continue;if("scale"===m){var v=e[m],b=g;if(v[0]===b[0]&&v[1]===b[1])continue}else if("points"===m){var y=e[m],x=g;if(y.length===x.length){for(var w=!1,k=y.length;--k;){var E=y[k],j=x[k];if(E[0]!==j[0]||E[1]!==j[1]){w=!0;break}}if(!w)continue}}e[m]=g,u=!0}}if(!u)return e;(void 0===t.height&&void 0===t.width&&void 0===h&&void 0===p||(0,i.bI)(e),e.version++,e.versionNonce=(0,c.LU)(),e.updated=(0,s.C3)(),o)&&(null===(n=a.Z.getScene(e))||void 0===n||n.informMutation());return e},p=function(e,t){var n=!1;for(var o in t){var i=t[o];if(void 0!==i){if(e[o]===i&&("object"!==(0,r.Z)(i)||null===i))continue;n=!0}}return n?d(d(d({},e),t),{},{updated:(0,s.C3)(),version:e.version+1,versionNonce:(0,c.LU)()}):e},h=function(e,t){return e.version=(null!=t?t:e.version)+1,e.versionNonce=(0,c.LU)(),e.updated=(0,s.C3)(),e}},2791:function(e,t,n){"use strict";n.d(t,{JZ:function(){return I},KE:function(){return P},N_:function(){return T},OL:function(){return L},Sy:function(){return z},Up:function(){return S},VL:function(){return _},_N:function(){return R},vw:function(){return D},wc:function(){return N},y8:function(){return M}});var r=n(1930),o=n(6655),i=n(2577),a=n(7169),l=n(2726),c=n(6340),s=n(6954),u=n(1935),d=n(242),f=n(1047),p=n(6552),h=n(8925),m=n(5710),g=n(2335),v=n(1974),b=["x","y","strokeColor","backgroundColor","fillStyle","strokeWidth","strokeStyle","roughness","opacity","width","height","angle","groupIds","roundness","boundElements","link","locked"];function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=["rectangle","ellipse","diamond","text","arrow","line"],j=function(e,t){var n,r,o=t.x,i=t.y,a=t.strokeColor,u=void 0===a?g.HN.strokeColor:a,d=t.backgroundColor,f=void 0===d?g.HN.backgroundColor:d,p=t.fillStyle,h=void 0===p?g.HN.fillStyle:p,m=t.strokeWidth,v=void 0===m?g.HN.strokeWidth:m,y=t.strokeStyle,x=void 0===y?g.HN.strokeStyle:y,w=t.roughness,k=void 0===w?g.HN.roughness:w,E=t.opacity,j=void 0===E?g.HN.opacity:E,S=t.width,O=void 0===S?0:S,_=t.height,C=void 0===_?0:_,I=t.angle,T=void 0===I?0:I,P=t.groupIds,M=void 0===P?[]:P,D=t.roundness,A=void 0===D?null:D,L=t.boundElements,Z=void 0===L?null:L,z=t.link,R=void 0===z?null:z,N=t.locked,B=void 0===N?g.HN.locked:N,H=(0,l.Z)(t,b);return console.log("width",O),{id:H.id||(0,s.kb)(),type:e,x:o,y:i,width:O,height:C,angle:T,strokeColor:u,backgroundColor:f,fillStyle:h,strokeWidth:v,strokeStyle:x,roughness:k,opacity:j,groupIds:M,roundness:A,seed:null!==(n=H.seed)&&void 0!==n?n:(0,s.LU)(),version:H.version||1,versionNonce:null!==(r=H.versionNonce)&&void 0!==r?r:0,isDeleted:!1,boundElements:Z,updated:(0,c.C3)(),link:R,locked:B}},S=function(e){return j(e.type,e)},O=function(e,t){return{x:"center"===e.textAlign?t.width/2:"right"===e.textAlign?t.width:0,y:"middle"===e.verticalAlign?t.height/2:0}},_=function(e){var t=e.fontFamily||g.rk,n=e.fontSize||g.n5,r=e.lineHeight||(0,m.PT)(t),o=(0,m.bG)(e.text),i=(0,m.X1)(o,(0,c.mO)({fontFamily:t,fontSize:n}),r),a=e.textAlign||g.Hg,l=e.verticalAlign||g.hs,s=O({textAlign:a,verticalAlign:l},i);return(0,u.BE)(k(k({},j("text",e)),{},{text:o,fontSize:n,fontFamily:t,textAlign:a,verticalAlign:l,x:e.x-s.x,y:e.y-s.y,width:i.width,height:i.height,baseline:i.baseline,containerId:e.containerId||null,originalText:o,lineHeight:r}),{})},C=function(e,t){var n,r,o=(0,m.tl)(e),a=(0,m.X1)(t,(0,c.mO)(e),e.lineHeight),l=a.width,s=a.height,d=a.baseline,b=e.textAlign,y=e.verticalAlign;if("center"!==b||y!==g.oX.MIDDLE||e.containerId){var x=(0,f.qf)(e),w=(0,i.Z)(x,4),k=w[0],E=w[1],j=w[2],S=w[3],_=(0,h.wC)(e,l,s,!1),C=(0,i.Z)(_,4),I=(k-C[0])/2,T=(E-C[1])/2,P=(j-C[2])/2,M=(S-C[3])/2,D=(0,p.yq)({s:!0,e:"center"===b||"left"===b,w:"center"===b||"right"===b},e.x,e.y,e.angle,I,T,P,M),A=(0,i.Z)(D,2);n=A[0],r=A[1]}else{var L=(0,m.X1)(e.text,(0,c.mO)(e),e.lineHeight),Z=O(e,{width:l-L.width,height:s-L.height});n=e.x-Z.x,r=e.y-Z.y}if(o){var z=(0,m.S)(e),R=(0,m.HE)(o),N=R.height,B=R.width;s>N-2*z&&(N=s+2*z),l>B-2*z&&(B=l+2*z),(0,v.Yv)(o)||N===R.height&&B===R.width||(0,u.DR)(o,{height:N,width:B})}return{width:l,height:s,baseline:d,x:Number.isFinite(n)?n:e.x,y:Number.isFinite(r)?r:e.y}},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.text;if(!e.isDeleted){var n=(0,m.tl)(e);n&&(t=(0,m.lD)(t,(0,c.mO)(e),(0,m.iZ)(n)));var r=C(e,t);return k({text:t},r)}},T=function(e,t){t.text;var n=t.isDeleted,r=t.originalText;return(0,u.BE)(e,k({originalText:r,isDeleted:null!=n?n:e.isDeleted},I(e,r)))},P=function(e){return k(k({},j(e.type,e)),{},{points:e.points||[],pressures:[],simulatePressure:e.simulatePressure,lastCommittedPoint:null})},M=function(e){return k(k({},j(e.type,e)),{},{points:e.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:e.startArrowhead||null,endArrowhead:e.endArrowhead||null})},D=function(e){var t,n,r;return k(k({},j("image",e)),{},{strokeColor:"transparent",status:null!==(t=e.status)&&void 0!==t?t:"pending",fileId:null!==(n=e.fileId)&&void 0!==n?n:null,scale:null!==(r=e.scale)&&void 0!==r?r:[1,1]})},A=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(null==t||"object"!==(0,o.Z)(t))return t;var r=Object.prototype.toString.call(t);if("[object Object]"===r){var i="function"==typeof t.constructor?Object.create(Object.getPrototypeOf(t)):{};for(var a in t)if(t.hasOwnProperty(a)){if(0===n&&("shape"===a||"canvas"===a))continue;i[a]=e(t[a],n+1)}return i}if(Array.isArray(t)){for(var l=t.length,c=new Array(l);l--;)c[l]=e(t[l],n+1);return c}return t},L=function(e){return A(e)},Z=function(e){if((0,c.h2)()&&e){var t,n,r="".concat(e,"_copy");return null!==(t=window.h)&&void 0!==t&&null!==(n=t.app)&&void 0!==n&&n.getSceneElementsIncludingDeleted().find((function(e){return e.id===r}))&&(r+="_copy"),r}return(0,s.kb)()},z=function(e,t,n,r){var o=L(n);return o.id=Z(o.id),o.boundElements=null,o.updated=(0,c.C3)(),o.seed=(0,s.LU)(),o.groupIds=(0,d.Qy)(o.groupIds,e,(function(e){return t.has(e)||t.set(e,Z(e)),t.get(e)})),r&&(o=Object.assign(o,r)),o},R=function(e,t){var n,r=[],o=(0,c.xn)(e),i=new Map,a=function(e){if(i.has(e))return i.get(e);if(o.has(e)){var t=Z(e);return i.set(e,t),t}return null},l=new Map,d=y(e);try{for(d.s();!(n=d.n()).done;){var f=n.value,p=A(f);if(p.id=a(f.id),null!=t&&t.randomizeSeed&&(p.seed=(0,s.LU)(),(0,u.ZP)(p)),p.groupIds&&(p.groupIds=p.groupIds.map((function(e){return l.has(e)||l.set(e,Z(e)),l.get(e)}))),"containerId"in p&&p.containerId){var h=a(p.containerId);p.containerId=h}if("boundElements"in p&&p.boundElements&&(p.boundElements=p.boundElements.reduce((function(e,t){var n=a(t.id);return n&&e.push(k(k({},t),{},{id:n})),e}),[])),"endBinding"in p&&p.endBinding){var m=a(p.endBinding.elementId);p.endBinding=m?k(k({},p.endBinding),{},{elementId:m}):null}if("startBinding"in p&&p.startBinding){var g=a(p.startBinding.elementId);p.startBinding=g?k(k({},p.startBinding),{},{elementId:g}):null}r.push(p)}}catch(e){d.e(e)}finally{d.f()}return r},N=function(e){var t=[];return e?(e.forEach((function(e){var n;if(e)if((0,m.Zr)(e)&&null!=e&&null!==(n=e.label)&&void 0!==n&&n.text){var o=(0,m.Cl)(e,e.label);t.push.apply(t,(0,r.Z)(o))}else{var i;i="text"===e.type?_(k({x:0,y:0},e)):"arrow"===e.type||"line"===e.type?M(k({x:0,y:0,type:e.type,width:200,height:24,endArrowhead:"arrow"===e.type?"arrow":null,points:[[0,0],[200,0]]},e)):S(k(k({x:0,y:0},e),{},{width:(null==e?void 0:e.width)||(E.includes(e.type)?100:0),height:(null==e?void 0:e.height)||(E.includes(e.type)?100:0)})),t.push(i)}})),t):[]}},8634:function(e,t,n){"use strict";n.d(t,{LW:function(){return b},T:function(){return _},l2:function(){return E},vY:function(){return y},xx:function(){return O}});var r=n(1930),o=n(7169),i=n(2577),a=n(2335),l=n(5001),c=n(6552),s=n(8925),u=n(1974),d=n(1935),f=n(6340),p=n(8290),h=n(1564),m=n(5710);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=function(e){return e>=2*Math.PI?e-2*Math.PI:e},y=function(e,t,n,r,o,a,l,c,s,d,f){if(1===n.length){var h=(0,i.Z)(n,1)[0];return"rotation"===t?(x(h,c,s,o,e.originalElements),(0,p.Ww)(h)):!(0,u.iB)(h)||"nw"!==t&&"ne"!==t&&"sw"!==t&&"se"!==t?t&&E(e.originalElements,l,h,t,a,c,s):(k(h,t,a,c,s),(0,p.Ww)(h)),!0}if(n.length>1){if("rotation"===t)return S(e,n,c,s,o,d,f),!0;if("nw"===t||"ne"===t||"sw"===t||"se"===t)return j(e,n,t,a,c,s),!0}return!1},x=function(e,t,n,r,o){var l=(0,s.qf)(e),c=(0,i.Z)(l,4),f=c[0],p=c[1],g=(f+c[2])/2,v=(p+c[3])/2,y=5*Math.PI/2+Math.atan2(n-v,t-g);r&&(y+=a.ay/2,y-=y%a.ay),y=b(y);var x=(0,m.xB)(e);if((0,d.DR)(e,{angle:y}),x){var w,k=null===(w=h.Z.getScene(e))||void 0===w?void 0:w.getElement(x);k&&!(0,u.Yv)(e)&&(0,d.DR)(k,{angle:y})}},w=function(e,t,n){var r=e.width;if((0,u.Xh)(e)){var o=(0,m.tl)(e);o&&(r=(0,m.iZ)(o))}var i=e.fontSize*(t/r);if(i<1)return null;var a=(0,m.X1)(e.text,(0,f.mO)({fontSize:i,fontFamily:e.fontFamily}),e.lineHeight);return{size:i,baseline:a.baseline+(n-a.height)}},k=function(e,t,n,r,o){var a,l=(0,s.qf)(e),u=(0,i.Z)(l,4),f=u[0],p=u[1],h=u[2],m=u[3],g=(f+h)/2,v=(p+m)/2,b=(0,c.U1)(r,o,g,v,-e.angle),y=(0,i.Z)(b,2),x=y[0],k=y[1];switch(t){case"se":a=Math.max((x-f)/(h-f),(k-p)/(m-p));break;case"nw":a=Math.max((h-x)/(h-f),(m-k)/(m-p));break;case"ne":a=Math.max((x-f)/(h-f),(m-k)/(m-p));break;case"sw":a=Math.max((h-x)/(h-f),(k-p)/(m-p))}if(a>0){var E=e.width*a,j=e.height*a,S=w(e,E,j);if(null===S)return;var O=(0,s.wC)(e,E,j,!1),_=(0,i.Z)(O,4),C=(f-_[0])/2,I=(p-_[1])/2,T=(h-_[2])/2,P=(m-_[3])/2,M=(0,c.yq)(function(e,t){return{n:/^(n|ne|nw)$/.test(e)||t&&/^(s|se|sw)$/.test(e),s:/^(s|se|sw)$/.test(e)||t&&/^(n|ne|nw)$/.test(e),w:/^(w|nw|sw)$/.test(e)||t&&/^(e|ne|se)$/.test(e),e:/^(e|ne|se)$/.test(e)||t&&/^(w|nw|sw)$/.test(e)}}(t,n),e.x,e.y,e.angle,C,I,T,P),D=(0,i.Z)(M,2),A=D[0],L=D[1];(0,d.DR)(e,{fontSize:S.size,width:E,height:j,baseline:S.baseline,x:A,y:L})}},E=function(e,t,n,o,a,h,g){var b=e.get(n.id),y=(0,s.wC)(b,b.width,b.height,!0),x=(0,i.Z)(y,4),k=[x[0],x[1]],E=[x[2],x[3]],j=(0,c.H5)(k,E),S=(0,c.xj)([h,g],j,-b.angle),O=(0,s.wC)(n,n.width,n.height,!0),_=(0,i.Z)(O,4),C=_[0],I=_[1],T=_[2]-C,P=_[3]-I,M=(E[0]-k[0])/T,D=(E[1]-k[1])/P,A={},L=(0,m.WJ)(n);o.includes("e")&&(M=(S[0]-k[0])/T),o.includes("s")&&(D=(S[1]-k[1])/P),o.includes("w")&&(M=(E[0]-S[0])/T),o.includes("n")&&(D=(E[1]-S[1])/P);var Z=b.width,z=b.height,R=n.width*M,N=n.height*D;if(a&&(R=2*R-Z,N=2*N-z),t){var B=Math.abs(R)/Z,H=Math.abs(N)/z;if(1===o.length&&(N*=B,R*=H),2===o.length){var W=Math.max(B,H);R=Z*W*Math.sign(R),N=z*W*Math.sign(N)}}if(L){var F=e.get(L.id);if(F&&(A={fontSize:F.fontSize,baseline:F.baseline}),t){var U=v(v({},n),{},{width:R,height:N}),K=w(L,(0,m.iZ)(U),(0,m.D9)(U,L));if(null===K)return;A={fontSize:K.size,baseline:K.baseline}}else{var Y=(0,m.AT)((0,f.mO)(L),L.lineHeight),V=(0,m.w_)(L.fontSize,L.lineHeight);R=Math.ceil(Math.max(R,Y)),N=Math.ceil(Math.max(N,V))}}var G=(0,s.wC)(b,R,N,!0),X=(0,i.Z)(G,4),q=X[0],J=X[1],$=X[2],Q=X[3],ee=$-q,te=Q-J,ne=[].concat(k);if(["n","w","nw"].includes(o)&&(ne=[E[0]-Math.abs(ee),E[1]-Math.abs(te)]),"ne"===o){var re=[k[0],E[1]];ne=[re[0],re[1]-Math.abs(te)]}if("sw"===o){var oe=[E[0],k[1]];ne=[oe[0]-Math.abs(ee),oe[1]]}t&&(["s","n"].includes(o)&&(ne[0]=j[0]-ee/2),["e","w"].includes(o)&&(ne[1]=j[1]-te/2)),R<0&&(o.includes("e")&&(ne[0]-=Math.abs(ee)),o.includes("w")&&(ne[0]+=Math.abs(ee))),N<0&&(o.includes("s")&&(ne[1]-=Math.abs(te)),o.includes("n")&&(ne[1]+=Math.abs(te))),a&&(ne[0]=j[0]-Math.abs(ee)/2,ne[1]=j[1]-Math.abs(te)/2);var ie,ae,le=b.angle,ce=(0,c.xj)(ne,j,le),se=[ne[0]+Math.abs(ee)/2,ne[1]+Math.abs(te)/2],ue=(0,c.xj)(se,j,le);ne=(0,c.xj)(ce,ue,-le),((0,u.bt)(n)||(0,u.F9)(n))&&(ie=(0,l.z)(1,N,b.points,!0),ae=(0,l.z)(0,R,ie,!0));var de=(0,r.Z)(ne);de[0]+=b.x-q,de[1]+=b.y-J;var fe={width:Math.abs(R),height:Math.abs(N),x:de[0],y:de[1],points:ae};"scale"in n&&"scale"in b&&(0,d.DR)(n,{scale:[(Math.sign($-b.x)||b.scale[0])*b.scale[0],(Math.sign(Q-b.y)||b.scale[1])*b.scale[1]]}),0!==fe.width&&0!==fe.height&&Number.isFinite(fe.x)&&Number.isFinite(fe.y)&&((0,p.Ww)(n,{newSize:{width:fe.width,height:fe.height}}),(0,d.DR)(n,fe),L&&null!=A&&(0,d.DR)(L,{fontSize:A.fontSize,baseline:A.baseline}),(0,m.RB)(n,o))},j=function(e,t,n,r,o,a){var c=t.reduce((function(t,n){var r=e.originalElements.get(n.id);return r&&t.push({orig:r,latest:n}),t}),[]),f=(0,s.v2)(c.map((function(e){return e.orig}))),h=f.minX,g=f.minY,b=f.maxX,y=f.maxY,x=f.midX,k=f.midY,E=n,j=r?[x,k]:{ne:[h,y],se:[h,g],sw:[b,g],nw:[b,y]}[E],S=(0,i.Z)(j,2),O=S[0],_=S[1],C={ne:[o>=O,a<=_],se:[o>=O,a>=_],sw:[o<=O,a>=_],nw:[o<=O,a<=_]}[E].map((function(e){return e?1:-1})),I=(0,i.Z)(C,2),T=I[0],P=I[1];if(!(T<0&&P<0)){var M=Math.max(T*Math.abs(o-O)/(b-h),P*Math.abs(a-_)/(y-g))*(r?2:1);0!==M&&c.forEach((function(e){var t=e.orig.width*M,r=e.orig.height*M,o=O+(e.orig.x-O)*M,i=_+(e.orig.y-_)*M,a=function(e,t,n,r){return(0,u.bt)(e)||(0,u.F9)(e)?{points:(0,l.z)(0,t,(0,l.z)(1,n,e.points,r),r)}:{}}(e.orig,t,r,!1),c=v({width:t,height:r,x:o,y:i},a),s=null,f=(0,m.WJ)(e.latest);if(f||(0,u.iB)(e.orig)){var h=v(v({},e.latest),{},{width:t,height:r}),g=w(null!=f?f:e.orig,f?(0,m.iZ)(h):h.width,f?(0,m.D9)(h,f):h.height);if(!g)return;(0,u.iB)(e.orig)&&(c.fontSize=g.size,c.baseline=g.baseline),f&&(s={fontSize:g.size,baseline:g.baseline})}(0,p.Ww)(e.latest,{newSize:{width:t,height:r}}),(0,d.DR)(e.latest,c),f&&s&&((0,d.DR)(f,s),(0,m.RB)(e.latest,n))}))}},S=function(e,t,n,r,o,l,f){var p=5*Math.PI/2+Math.atan2(r-f,n-l);o&&(p+=a.ay/2,p-=p%a.ay),t.forEach((function(t){var n,r,o=(0,s.qf)(t),a=(0,i.Z)(o,4),g=a[0],v=a[1],y=(g+a[2])/2,x=(v+a[3])/2,w=null!==(n=null===(r=e.originalElements.get(t.id))||void 0===r?void 0:r.angle)&&void 0!==n?n:t.angle,k=(0,c.U1)(y,x,l,f,p+w-t.angle),E=(0,i.Z)(k,2),j=E[0],S=E[1];(0,d.DR)(t,{x:t.x+(j-y),y:t.y+(S-x),angle:b(p+w)});var O=(0,m.xB)(t);if(O){var _,C=null===(_=h.Z.getScene(t))||void 0===_?void 0:_.getElement(O);C&&!(0,u.Yv)(t)&&(0,d.DR)(C,{x:C.x+(j-y),y:C.y+(S-x),angle:b(p+w)})}}))},O=function(e,t,n,r){var o=1===t.length?(0,s.qf)(t[0]):(0,s.KP)(t),a=(0,i.Z)(o,4),l=a[0],u=a[1],d=a[2],f=a[3],p=(l+d)/2,h=(u+f)/2,m=1===t.length?t[0].angle:0,g=(0,c.U1)(n,r,p,h,-m),v=(0,i.Z)(g,2);switch(n=v[0],r=v[1],e){case"n":return(0,c.U1)(n-(l+d)/2,r-u,0,0,m);case"s":return(0,c.U1)(n-(l+d)/2,r-f,0,0,m);case"w":return(0,c.U1)(n-l,r-(u+f)/2,0,0,m);case"e":return(0,c.U1)(n-d,r-(u+f)/2,0,0,m);case"nw":return(0,c.U1)(n-l,r-u,0,0,m);case"ne":return(0,c.U1)(n-d,r-u,0,0,m);case"sw":return(0,c.U1)(n-l,r-f,0,0,m);case"se":return(0,c.U1)(n-d,r-f,0,0,m);default:return[0,0]}},_=function(e,t){var n=(0,i.Z)(t.points,2),r=(0,i.Z)(n[1],2),o=r[0],a=r[1];return"nw"===e&&(o<0||a<0)||"ne"===e&&o>=0||"sw"===e&&o<=0||"se"===e&&(o>0||a>0)?"end":"origin"}},5710:function(e,t,n){"use strict";n.d(t,{$2:function(){return T},AT:function(){return N},Cl:function(){return ae},D9:function(){return ne},FE:function(){return _},HE:function(){return U},H_:function(){return V},NS:function(){return ee},OW:function(){return J},P7:function(){return S},PT:function(){return ie},R8:function(){return I},RB:function(){return O},Rg:function(){return P},S:function(){return G},TP:function(){return K},WJ:function(){return W},X1:function(){return C},Zr:function(){return Q},aV:function(){return q},bG:function(){return k},cn:function(){return X},cw:function(){return Y},eB:function(){return re},iZ:function(){return te},lD:function(){return Z},mY:function(){return A},oN:function(){return j},tl:function(){return F},w_:function(){return M},xB:function(){return H}});var r,o=n(2577),i=n(1930),a=n(7169),l=n(6340),c=n(1935),s=n(2335),u=n(1564),d=n(1047),f=n(1974),p=n(6938),h=n(75),m=n(2325),g=n(6906),v=n(2791);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x,w,k=function(e){return e.replace(/\t/g," ").replace(/\r?\n|\r/g,"\n")},E=function(e){return k(e).split("\n")},j=function(e,t){var n=void 0,r={x:e.x,y:e.y,text:e.text,width:e.width,height:e.height,baseline:e.baseline};r.text=e.text,t&&(n=te(t),r.text=Z(e.originalText,(0,l.mO)(e),n));var o=C(r.text,(0,l.mO)(e),e.lineHeight);if(r.width=o.width,r.height=o.height,r.baseline=o.baseline,t){var i=ne(t,e),a=te(t);if(console.log(o,a,t),o.height>i){var s=ee(o.height,t.type);(0,c.DR)(t,{height:s}),(0,g.h_)(t.id,s)}if(o.width>a){var u=ee(o.width,t.type);(0,c.DR)(t,{width:u})}var d=y(y({},e),r),f=_(t,d),p=f.x,h=f.y;r.x=p,r.y=h}(0,c.DR)(e,r)},S=function(e,t,n){var r=(0,l.xn)(e);t.forEach((function(e){var t=n.get(e.id),o=H(e);if(o){var i=n.get(o);if(i){var a=r.get(t);a&&(0,c.DR)(a,{boundElements:(e.boundElements||[]).filter((function(e){return e.id!==i&&e.id!==o})).concat({type:"text",id:i})});var l=r.get(i);l&&(0,d.iB)(l)&&(0,c.DR)(l,{containerId:a?t:null})}}}))},O=function(e,t){var n=H(e);if(n){(0,g.kT)(e.id);var r=u.Z.getScene(e).getElement(n);if(r&&r.text){if(!e)return;var o=(r=u.Z.getScene(e).getElement(n)).text,i=r.height,a=r.width,s=U(e),d=te(e),p=ne(e,r),h=s.height,m=r.baseline;if("n"!==t&&"s"!==t){o&&(o=Z(r.originalText,(0,l.mO)(r),d));var v=C(o,(0,l.mO)(r),r.lineHeight);i=v.height,a=v.width,m=v.baseline}if(i>p){var b=(h=ee(i,e.type))-s.height,y=(0,f.Yv)(e)||"ne"!==t&&"nw"!==t&&"n"!==t?e.y:e.y-b;(0,c.DR)(e,{height:h,y:y})}(0,c.DR)(r,{text:o,width:a,height:i,baseline:m}),(0,f.Yv)(e)||(0,c.DR)(r,_(e,r))}}},_=function(e,t){if((0,f.Yv)(e))return p._.getBoundTextElementPosition(e,t);var n,r=Y(e),o=ne(e,t),i=te(e);return n=t.verticalAlign===s.oX.TOP?r.y:t.verticalAlign===s.oX.BOTTOM?r.y+(o-t.height):r.y+(o/2-t.height/2),{x:t.textAlign===s.I8.LEFT?r.x:t.textAlign===s.I8.RIGHT?r.x+(i-t.width):r.x+(i/2-t.width/2),y:n}},C=function(e,t,n){e=e.split("\n").map((function(e){return e||" "})).join("\n");var r=parseFloat(t),o=L(e,r,n);return{width:A(e,t),height:o,baseline:I(e,t,n)}},I=function(e,t,n,r){var o=document.createElement("div");o.style.position="absolute",o.style.whiteSpace="pre",o.style.font=t,o.style.minHeight="1em",r&&(o.style.overflow="hidden",o.style.wordBreak="break-word",o.style.whiteSpace="pre-wrap"),o.style.lineHeight=String(n),o.innerText=e,document.body.appendChild(o);var i=document.createElement("span");i.style.display="inline-block",i.style.overflow="hidden",i.style.width="1px",i.style.height="1px",o.appendChild(i);var a=i.offsetTop+i.offsetHeight,l=o.offsetHeight;if(s.G6){var c=L(e,parseFloat(t),n),u=parseFloat(t),d=L(e,Math.round(u),n);c>l&&(a+=c-d),l>c&&(a-=d-c)}return document.body.removeChild(o),a},T=function(e){var t=E(e.text).length;return e.height/t/e.fontSize},P=function(e,t){return e*t},M=function(e,t){return P(e,t)+2*s.gK},D=function(e,t){x||(x=document.createElement("canvas"));var n=x.getContext("2d");n.font=t;var r=n.measureText(e).width;return(0,l.h2)()?10*r:r},A=function(e,t){var n=E(e),r=0;return n.forEach((function(e){r=Math.max(r,D(e,t))})),r},L=function(e,t,n){var r=E(e).length;return P(t,n)*r},Z=function(e,t,n){if(!Number.isFinite(n)||n<0)return e;var r=[],o=e.split("\n"),i=D(" ",t),a="",l=0,c=function(e){e.trim()&&r.push(e)},s=function(){a="",l=0};return o.forEach((function(e){if(A(e,t)<=n)r.push(e);else{var o=function(e){var t=e.split("-");return t.length>1&&t.forEach((function(e,n){n!==t.length-1&&(t[n]=e+="-")})),t.join(" ").split(" ")}(e);s();for(var u=0;u<o.length;){var d=D(o[u],t);if(d===n)c(o[u]),u++;else if(d>n){for(c(a),s();o[u].length>0;){var f=String.fromCodePoint(o[u].codePointAt(0)),p=z.calculate(f,t);l+=p,o[u]=o[u].slice(f.length),l>=n?(c(a),a=f,l=p):a+=f}l+i>=n?(c(a),s()):a.endsWith("-")||(a+=" ",l+=i),u++}else for(;l<n&&u<o.length;){var h=o[u];if((l=D(a+h,t))>n){c(a),s();break}u++;var m=!h.endsWith("-");if(a+=h,m&&(a+=" "),l+i>=n){m?r.push(a.slice(0,-1)):r.push(a),s();break}}}" "===a.slice(-1)&&(a=a.slice(0,-1),c(a))}})),r.join("\n")},z=(w={},{calculate:function(e,t){var n=e.charCodeAt(0);if(w[t]||(w[t]=[]),!w[t][n]){var r=D(e,t);w[t][n]=r}return w[t][n]},getCache:function(e){return w[e]}}),R="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(),N=function(e,t){var n=B(e);return 0===n?C(R.split("").join("\n"),e,t).width+2*s.gK:n+2*s.gK},B=function(e){var t=z.getCache(e);if(!t)return 0;var n=t.filter((function(e){return void 0!==e}));return Math.max.apply(Math,(0,i.Z)(n))},H=function(e){var t,n,r;return null!=e&&null!==(t=e.boundElements)&&void 0!==t&&t.length&&(null==e||null===(n=e.boundElements)||void 0===n||null===(r=n.filter((function(e){return"text"===e.type}))[0])||void 0===r?void 0:r.id)||null},W=function(e){if(!e)return null;var t,n=H(e);return n&&(null===(t=u.Z.getScene(e))||void 0===t?void 0:t.getElement(n))||null},F=function(e){return e&&e.containerId&&(null===(t=u.Z.getScene(e))||void 0===t?void 0:t.getElement(e.containerId))||null;var t},U=function(e){return(0,f.Yv)(e)?{width:Math.max(e.width,300),height:e.height}:{width:e.width,height:e.height}},K=function(e,t){if(!(0,f.Yv)(e))return{x:e.x+e.width/2,y:e.y+e.height/2};var n=p._.getPointsGlobalCoordinates(e);if(n.length%2==1){var r=Math.floor(e.points.length/2),o=p._.getPointGlobalCoordinates(e,e.points[r]);return{x:o[0],y:o[1]}}var i=e.points.length/2-1,a=p._.getEditorMidPoints(e,t)[i];return a||(a=p._.getSegmentMidPoint(e,n[i],n[i+1],i+1)),{x:a[0],y:a[1]}},Y=function(e){var t=s.gK,n=s.gK;return"ellipse"===e.type&&(t+=e.width/2*(1-Math.sqrt(2)/2),n+=e.height/2*(1-Math.sqrt(2)/2)),"diamond"===e.type&&(t+=e.width/4,n+=e.height/4),{x:e.x+t,y:e.y+n}},V=function(e){var t=F(e);return!t||(0,f.Yv)(t)?e.angle:t.angle},G=function(e){var t=F(e);return t&&e?(0,f.Yv)(t)?8*s.gK:s.gK:0},X=function(e){return e.some((function(e){if((0,f.Xh)(e)){var t=F(e);return!(0,d.iB)(e)||!(0,f.Yv)(t)}return!1}))},q=function(e){return e.some((function(e){if((0,f.Xh)(e)){var t=F(e);return!(0,d.iB)(e)||!(0,f.Yv)(t)}return(0,d.iB)(e)}))},J=function(e,t,n,r){var i=(0,h.eD)(e,t);if(1===i.length)return(0,f.mG)(i[0],!1)?i[0]:null;for(var a=null,l=e.length-1;l>=0;--l)if(!e[l].isDeleted){var c=(0,d.qf)(e[l]),s=(0,o.Z)(c,4),u=s[0],p=s[1],g=s[2],v=s[3];if((0,f.Yv)(e[l])&&(0,m.Qu)(e[l],t,[n,r])){a=e[l];break}if(u<n&&n<g&&p<r&&r<v){a=e[l];break}}return(0,f.mG)(a,!1)?a:null},$=new Set(["rectangle","ellipse","diamond","image","arrow"]),Q=function(e){return $.has(e.type)},ee=function(e,t){e=Math.ceil(e);var n=2*s.gK;return"ellipse"===t?Math.round((e+n)/Math.sqrt(2)*2):"arrow"===t?e+8*n:"diamond"===t?2*(e+n):e+n},te=function(e){var t=U(e).width;return(0,f.Yv)(e)?t-8*s.gK*2:"ellipse"===e.type?Math.round(t/2*Math.sqrt(2))-2*s.gK:"diamond"===e.type?Math.round(t/2)-2*s.gK:t-2*s.gK},ne=function(e,t){var n=U(e).height;return(0,f.Yv)(e)?n-8*s.gK*2<=0?t.height:n:"ellipse"===e.type?Math.round(n/2*Math.sqrt(2))-2*s.gK:"diamond"===e.type?Math.round(n/2)-2*s.gK:n-2*s.gK},re=function(){return A(R,(0,l.mO)({fontSize:s.n5,fontFamily:s.rk}))>0},oe=(r={},(0,a.Z)(r,s.ut.Virgil,1.25),(0,a.Z)(r,s.ut.Helvetica,1.15),(0,a.Z)(r,s.ut.Cascadia,1.2),r),ie=function(e){return e in oe?oe[e]:oe[s.rk]},ae=function(e,t){var n;n="arrow"===e.type?(0,v.y8)(y({x:0,y:0,type:e.type,endArrowhead:"arrow"===e.type?"arrow":null,points:[[0,0],[300,0]]},e)):(0,d.Up)(y({x:0,y:0},e));var r=(0,d.VL)(y(y({x:0,y:0,textAlign:s.I8.CENTER,verticalAlign:s.oX.MIDDLE},t),{},{containerId:n.id}));return(0,c.DR)(n,{boundElements:(n.boundElements||[]).concat({type:"text",id:r.id})}),j(r,n),[n,r]}},6906:function(e,t,n){"use strict";n.d(t,{b_:function(){return O},eR:function(){return S},h_:function(){return E},kT:function(){return j}});var r=n(8950),o=n(7169),i=n(2577),a=n(2975),l=n.n(a),c=n(6066),s=n(6340),u=n(1564),d=n(1974),f=n(2335),p=n(1935),h=n(5710),m=n(6208),g=n(2416),v=n(6938),b=n(6665);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e,t,n,r,o,i){var a=r.zoom,l=180*n/Math.PI,c=e*(a.value-1)/2,s=t*(a.value-1)/2;return e>o&&1!==a.value&&(c=o*(a.value-1)/2),t>i&&1!==a.value&&(s=i*(a.value-1)/2),"translate(".concat(c,"px, ").concat(s,"px) scale(").concat(a.value,") rotate(").concat(l,"deg)")},k={},E=function(e,t){var n=k[e]||(k[e]={height:t});return n.height=t,n},j=function(e){k[e]&&delete k[e]},S=function(e){var t,n;return null!==(t=null===(n=k[e])||void 0===n?void 0:n.height)&&void 0!==t?t:null},O=function(e){var t=e.id,n=e.onChange,o=e.onSubmit,a=e.getViewportCoords,y=e.element,j=e.canvas,S=e.excalidrawContainer,O=e.app,_=function(){var e,n=O.state,r=null===(e=u.Z.getScene(y))||void 0===e?void 0:e.getElement(t);if(r){var o=r.textAlign,l=r.verticalAlign;if(r&&(0,d.iB)(r)){var c=r.x,m=r.y,g=(0,h.tl)(r),b=r.width,j=r.height,S=r.width,_=r.height;if(g&&r.containerId){if((0,d.Yv)(g)){var I=v._.getBoundTextElementPosition(g,r);c=I.x,m=I.y}var T,P=function(e,t){if(!t.style.fontFamily||!t.style.fontSize)return!1;var n=t.style.fontFamily.replace(/"/g,"");return(0,s.$g)({fontFamily:e.fontFamily})!==n||"".concat(e.fontSize,"px")!==t.style.fontSize}(r,C),M=(0,h.HE)(g),D=Number(C.style.height.slice(0,-2));if(D>0&&(_=D),P&&(_=r.height),P?T=E(g.id,M.height):(T=k[g.id])||(T=E(g.id,M.height)),b=(0,h.iZ)(g),j=(0,h.D9)(g,r),!(0,d.Yv)(g)&&_>j){var A=(0,h.NS)(_,g.type);return void(0,p.DR)(g,{height:A})}if(!(0,d.Yv)(g)&&M.height>T.height&&_<j){var L=(0,h.NS)(_,g.type);(0,p.DR)(g,{height:L})}else{var Z=(0,h.cw)(g);l===f.oX.MIDDLE&&((0,d.Yv)(g)||(m=Z.y+j/2-_/2)),l===f.oX.BOTTOM&&(m=Z.y+(j-_))}}var z=a(c,m),R=(0,i.Z)(z,2),N=R[0],B=R[1],H=C.selectionStart,W=C.selectionEnd,F=C.value.length;if(C.value=r.originalText,H===W&&W!==F){var U=F-W;C.selectionStart=C.value.length-U,C.selectionEnd=C.value.length-U}g?S+=.5:(b=(n.width-8-N)/n.zoom.value,S=Math.min(S,b));var K=r.lineHeight;f.G6&&(K=(0,h.$2)(x(x({},r),{},{fontSize:Math.round(r.fontSize)})));var Y=(n.height-B)/n.zoom.value;Object.assign(C.style,{font:(0,s.mO)(r),lineHeight:K,width:"".concat(S,"px"),height:"".concat(_,"px"),left:"".concat(N,"px"),top:"".concat(B,"px"),transform:w(S,_,(0,h.H_)(r),n,b,Y),textAlign:o,verticalAlign:l,color:r.strokeColor,opacity:r.opacity/100,filter:"var(--theme-filter)",maxHeight:"".concat(Y,"px")}),C.scrollTop=0,(0,s.h2)()&&(C.style.fontFamily=(0,s.$g)(r)),(0,p.DR)(r,{x:c,y:m})}}},C=document.createElement("textarea");C.dir="auto",C.tabIndex=0,C.dataset.type="wysiwyg",C.wrap="off",C.classList.add("excalidraw-wysiwyg");var I="pre",T="normal";(0,d.Xh)(y)&&(I="pre-wrap",T="break-word"),Object.assign(C.style,{position:"absolute",display:"inline-block",minHeight:"1em",backfaceVisibility:"hidden",margin:0,padding:0,border:0,outline:0,resize:"none",background:"transparent",overflow:"hidden",zIndex:"var(--zIndex-wysiwyg)",wordBreak:T,whiteSpace:I,overflowWrap:"break-word",boxSizing:"content-box"}),_(),n&&(C.onpaste=function(){var e=(0,r.Z)(l().mark((function e(t){var n,r,o,i,a,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.mQ)(t,!0);case 2:if((n=e.sent).text){e.next=5;break}return e.abrupt("return");case 5:if(r=(0,h.bG)(n.text)){e.next=8;break}return e.abrupt("return");case 8:o=(0,h.tl)(y),i=(0,s.mO)({fontSize:O.state.currentItemFontSize,fontFamily:O.state.currentItemFontFamily}),o&&(a=(0,h.lD)("".concat(C.value).concat(r),i,(0,h.iZ)(o)),c=(0,h.mY)(a,i),C.style.width="".concat(c,"px"));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C.oninput=function(){var e,r=null===(e=u.Z.getScene(y))||void 0===e?void 0:e.getElement(t),o=(0,s.mO)(r);if((0,d.Xh)(y)){var i=(0,h.tl)(y),a=(0,h.lD)((0,h.bG)(C.value),o,(0,h.iZ)(i)),l=(0,h.X1)(a,o,r.lineHeight),c=l.width,f=l.height;C.style.width="".concat(c,"px"),C.style.height="".concat(f,"px")}n((0,h.bG)(C.value))}),C.onkeydown=function(e){if(!e.shiftKey&&g.Lo.keyTest(e))e.preventDefault(),O.actionManager.executeAction(g.Lo),_();else if(!e.shiftKey&&g.CZ.keyTest(e))e.preventDefault(),O.actionManager.executeAction(g.CZ),_();else if(m.Tu.keyTest(e))O.actionManager.executeAction(m.Tu);else if(m.Zq.keyTest(e))O.actionManager.executeAction(m.Zq);else if(e.key===c.tW.ESCAPE)e.preventDefault(),z=!0,R();else if(e.key===c.tW.ENTER&&e[c.tW.CTRL_OR_CMD]){if(e.preventDefault(),e.isComposing||229===e.keyCode)return;z=!0,R()}else if(e.key===c.tW.TAB||e[c.tW.CTRL_OR_CMD]&&(e.code===c.aU.BRACKET_LEFT||e.code===c.aU.BRACKET_RIGHT)){if(e.preventDefault(),e.isComposing)return;e.shiftKey||e.code===c.aU.BRACKET_LEFT?A():D(),C.dispatchEvent(new Event("input"))}};var P=" ".repeat(4),M=new RegExp("^ {1,".concat(4,"}")),D=function(){var e=C.selectionStart,t=C.selectionEnd,n=L(),r=C.value;n.forEach((function(e){var t=r.slice(0,e),n=r.slice(e);r="".concat(t).concat(P).concat(n)})),C.value=r,C.selectionStart=e+4,C.selectionEnd=t+4*n.length},A=function(){var e=C.selectionStart,t=C.selectionEnd,n=L(),r=[],o=C.value;n.forEach((function(e){var t=o.slice(e,e+4).match(M);if(t){var n=o.slice(0,e),i=o.slice(e+t[0].length);o="".concat(n).concat(i),r.push(e)}})),C.value=o,r.length&&(e>r[r.length-1]?C.selectionStart=Math.max(e-4,r[r.length-1]):C.selectionStart=e,C.selectionEnd=Math.max(C.selectionStart,t-4*r.length))},L=function(){var e=C.selectionStart,t=C.selectionEnd,n=C.value,r=n.slice(0,e).match(/[^\n]*$/)[0].length;return e-=r,n.slice(e,t).split("\n").reduce((function(t,n,r,o){return t.concat(r?t[r-1]+o[r-1].length+1:e)}),[]).reverse()},Z=function(e){e.preventDefault(),e.stopPropagation()},z=!1,R=function(){var e;N();var t=null===(e=u.Z.getScene(y))||void 0===e?void 0:e.getElement(y.id);if(t){var n=C.value,r=(0,h.tl)(t);if(r){if(n=t.text,C.value.trim()){var i=(0,h.xB)(r);i&&i===y.id||(0,p.DR)(r,{boundElements:(r.boundElements||[]).concat({type:"text",id:y.id})})}else{var a;(0,p.DR)(r,{boundElements:null===(a=r.boundElements)||void 0===a?void 0:a.filter((function(e){return!(0,d.iB)(e)}))})}(0,h.oN)(t,r)}o({text:n,viaKeyboard:z,originalText:C.value})}},N=function(){F||(F=!0,C.onblur=null,C.oninput=null,C.onkeydown=null,U&&U.disconnect(),window.removeEventListener("resize",_),window.removeEventListener("wheel",Z,!0),window.removeEventListener("pointerdown",H),window.removeEventListener("pointerup",B),window.removeEventListener("blur",R),W(),C.remove())},B=function e(t){window.removeEventListener("pointerup",e);var n=null==t?void 0:t.target,r=n instanceof HTMLInputElement&&n.closest(".color-picker-input")&&(0,s.s)(n);setTimeout((function(){C.onblur=R,n&&r&&(n.onblur=function(){C.focus()}),r||C.focus()}))},H=function(e){var t=e.target instanceof HTMLInputElement&&e.target.closest(".color-picker-input")&&(0,s.s)(e.target);((e.target instanceof HTMLElement||e.target instanceof SVGElement)&&e.target.closest(".".concat(f.$C.SHAPE_ACTIONS_MENU))&&!(0,s.s)(e.target)||t)&&(C.onblur=null,window.addEventListener("pointerup",B),window.addEventListener("blur",R))},W=u.Z.getScene(y).addCallback((function(){var e;_(),!(null===(e=document.activeElement)||void 0===e||!e.closest(".color-picker-input"))||C.focus()})),F=!1;C.select(),B();var U=null;j&&"ResizeObserver"in window?(U=new window.ResizeObserver((function(){_()}))).observe(j):window.addEventListener("resize",_),window.addEventListener("pointerdown",H),window.addEventListener("wheel",Z,{passive:!1,capture:!0}),null==S||S.querySelector(".excalidraw-textEditorContainer").appendChild(C)}},267:function(e,t,n){"use strict";n.d(t,{PC:function(){return g},kK:function(){return m},oY:function(){return v},ox:function(){return u}});var r=n(2577),o=n(8925),i=n(6552),a=n(1047),l=n(1974),c=n(3547),s={mouse:8,pen:16,touch:28},u={e:!0,s:!0,n:!0,w:!0},d={e:!0,s:!0,n:!0,w:!0},f={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},p={e:!0,s:!0,n:!0,w:!0},h=function(e,t,n,o,a,l,c){var s=(0,i.U1)(e+n/2,t+o/2,a,l,c),u=(0,r.Z)(s,2);return[u[0]-n/2,u[1]-o/2,n,o]},m=function(e,t,n,o){var i=(0,r.Z)(e,6),a=i[0],l=i[1],u=i[2],d=i[3],f=i[4],p=i[5],m=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},g=arguments.length>5&&void 0!==arguments[5]?arguments[5]:4,v=s[o],b=v/n.value,y=v/n.value,x=v/n.value,w=v/n.value,k=u-a,E=d-l,j=g/n.value,S=(v-2*c.Lu)/(2*n.value),O={nw:m.nw?void 0:h(a-j-x+S,l-j-w+S,b,y,f,p,t),ne:m.ne?void 0:h(u+j-S,l-j-w+S,b,y,f,p,t),sw:m.sw?void 0:h(a-j-x+S,d+j-S,b,y,f,p,t),se:m.se?void 0:h(u+j-S,d+j-S,b,y,f,p,t),rotation:m.rotation?void 0:h(a+k/2-b/2,l-j-w+S-16/n.value,b,y,f,p,t)},_=5*s.mouse/n.value;return Math.abs(k)>_&&(m.n||(O.n=h(a+k/2-b/2,l-j-w+S,b,y,f,p,t)),m.s||(O.s=h(a+k/2-b/2,d+j-S,b,y,f,p,t))),Math.abs(E)>_&&(m.w||(O.w=h(a-j-x+S,l+E/2-y/2,b,y,f,p,t)),m.e||(O.e=h(u+j-S,l+E/2-y/2,b,y,f,p,t))),O},g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mouse";if(e.locked)return{};var i={};if("freedraw"===e.type||(0,l.bt)(e)){if(2===e.points.length){var s=(0,r.Z)(e.points,2),u=s[1];0===u[0]||0===u[1]?i=p:u[0]>0&&u[1]<0?i=f:u[0]>0&&u[1]>0?i=p:u[0]<0&&u[1]>0?i=f:u[0]<0&&u[1]<0&&(i=p)}}else(0,a.iB)(e)&&(i=d);var h=(0,l.bt)(e)?c.Lu+8:c.Lu;return m((0,o.qf)(e,!0),e.angle,t,n,i,h)},v=function(e,t){if(t.editingLinearElement)return!1;if(e.length>1)return!0;var n=e[0];return!(0,l.bt)(n)||n.points.length>2}},1974:function(e,t,n){"use strict";n.d(t,{F9:function(){return l},Lx:function(){return p},Mn:function(){return f},QI:function(){return y},UQ:function(){return w},Xh:function(){return b},Xo:function(){return v},Yv:function(){return u},bt:function(){return s},dt:function(){return d},eK:function(){return x},f0:function(){return h},iB:function(){return a},mG:function(){return m},pC:function(){return i},r2:function(){return g},wi:function(){return o}});var r=n(2335),o=function(e){return!!e&&"image"===e.type&&!!e.fileId},i=function(e){return!!e&&"image"===e.type},a=function(e){return null!=e&&"text"===e.type},l=function(e){return null!=e&&c(e.type)},c=function(e){return"freedraw"===e},s=function(e){return null!=e&&d(e.type)},u=function(e){return null!=e&&"arrow"===e.type},d=function(e){return"arrow"===e||"line"===e},f=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null!=e&&(!e.locked||!0===t)&&p(e.type)},p=function(e){return"arrow"===e},h=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(null==e||e.locked&&!0!==t||"rectangle"!==e.type&&"diamond"!==e.type&&"ellipse"!==e.type&&"image"!==e.type&&("text"!==e.type||e.containerId))},m=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null!=e&&(!e.locked||!0===t)&&("rectangle"===e.type||"diamond"===e.type||"ellipse"===e.type||"image"===e.type||u(e))},g=function(e){return"text"===(null==e?void 0:e.type)||"diamond"===(null==e?void 0:e.type)||"rectangle"===(null==e?void 0:e.type)||"ellipse"===(null==e?void 0:e.type)||"arrow"===(null==e?void 0:e.type)||"freedraw"===(null==e?void 0:e.type)||"line"===(null==e?void 0:e.type)},v=function(e){var t;return m(e)&&!(null===(t=e.boundElements)||void 0===t||!t.some((function(e){return"text"===e.type})))},b=function(e){return null!==e&&"containerId"in e&&null!==e.containerId&&a(e)},y=function(e){return"rectangle"===e},x=function(e,t){return!(e!==r.a6.ADAPTIVE_RADIUS&&e!==r.a6.LEGACY||!y(t.type))||e===r.a6.PROPORTIONAL_RADIUS&&("line"===(n=t.type)||"arrow"===n||"diamond"===n);var n},w=function(e){return"arrow"===e.type||"line"===e.type||"diamond"===e.type?{type:r.a6.PROPORTIONAL_RADIUS}:"rectangle"===e.type?{type:r.a6.ADAPTIVE_RADIUS}:null}},6797:function(e,t,n){"use strict";n.d(t,{_:function(){return h},l:function(){return p}});var r=n(5169),o=n(8821),i=n(2248),a=n(7245),l=n(2312),c=n(5901);function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return u=s()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&(0,c.Z)(o,n.prototype),o},u.apply(null,arguments)}function d(e){var t="function"==typeof Map?new Map:void 0;return d=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,(0,l.Z)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,c.Z)(r,e)},d(e)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,l.Z)(e);if(t){var o=(0,l.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,a.Z)(this,n)}}var p=function(e){(0,i.Z)(n,e);var t=f(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Couldn't export canvas.",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CANVAS_ERROR";return(0,o.Z)(this,n),(e=t.call(this)).name=i,e.message=r,e}return(0,r.Z)(n)}(d(Error)),h=function(e){(0,i.Z)(n,e);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Request Aborted";return(0,o.Z)(this,n),t.call(this,e,"AbortError")}return(0,r.Z)(n)}(d(DOMException))},242:function(e,t,n){"use strict";n.d(t,{AI:function(){return j},F$:function(){return f},Fb:function(){return y},Nd:function(){return b},Qy:function(){return w},S_:function(){return k},YS:function(){return x},bO:function(){return g},h6:function(){return E},iE:function(){return v},iJ:function(){return m},yO:function(){return h},zq:function(){return p}});var r=n(1930),o=n(2577),i=n(7169),a=n(75),l=n(5710);function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e,t,n){var r=n.filter((function(t){return t.groupIds.includes(e)}));return r.length<2?t.selectedGroupIds[e]||t.editingGroupId===e?d(d({},t),{},{selectedGroupIds:d(d({},t.selectedGroupIds),{},(0,i.Z)({},e,!1)),editingGroupId:null}):t:d(d({},t),{},{selectedGroupIds:d(d({},t.selectedGroupIds),{},(0,i.Z)({},e,!0)),selectedElementIds:d(d({},t.selectedElementIds),Object.fromEntries(r.map((function(e){return[e.id,!0]}))))})},p=function(e,t){return null!=h(e,t)},h=function(e,t){return t.groupIds.filter((function(t){return t!==e.editingGroupId})).find((function(t){return e.selectedGroupIds[t]}))},m=function(e){return Object.entries(e.selectedGroupIds).filter((function(e){var t=(0,o.Z)(e,2);t[0];return t[1]})).map((function(e){var t=(0,o.Z)(e,2),n=t[0];t[1];return n}))},g=function(e,t){var n=d(d({},e),{},{selectedGroupIds:{}}),r=(0,a.eD)(t,e);if(!r.length)return d(d({},n),{},{editingGroupId:null});var o,i=c(r);try{for(i.s();!(o=i.n()).done;){var l=o.value.groupIds;if(e.editingGroupId){var s=l.indexOf(e.editingGroupId);s>-1&&(l=l.slice(0,s))}if(l.length>0){var u=l[l.length-1];n=f(u,n,t)}}}catch(e){i.e(e)}finally{i.f()}return n},v=function(e,t){return d(d({},e),{},{editingGroupId:t.groupIds.length?t.groupIds[0]:null,selectedGroupIds:{},selectedElementIds:(0,i.Z)({},t.id,!0)})},b=function(e,t){return e.groupIds.includes(t)},y=function(e,t){return e.filter((function(e){return b(e,t)}))},x=function(e,t){return e.groupIds.find((function(e){return t[e]}))},w=function(e,t,n){for(var o=(0,r.Z)(e),i=t?e.indexOf(t):-1,a=i>-1?i:e.length,l=0;l<a;l++)o[l]=n(o[l]);return o},k=function(e,t,n){var o=(0,r.Z)(e),i=n?o.indexOf(n):-1,a=i>-1?i:o.length;return o.splice(a,0,t),o},E=function(e,t){return e.filter((function(e){return!t[e]}))},j=function(e){var t=new Map;return e.forEach((function(e){var n=0===e.groupIds.length?e.id:e.groupIds[e.groupIds.length-1],o=t.get(n)||[],i=(0,l.WJ)(e);i&&o.push(i),t.set(n,[].concat((0,r.Z)(o),[e]))})),Array.from(t.values())}},8211:function(e,t,n){"use strict";n.d(t,{Fp:function(){return d},G3:function(){return v},Mj:function(){return f},QT:function(){return w},m0:function(){return g},t:function(){return y}});var r=n(8950),o=n(2975),i=n.n(o),a=n(1463),l=n(4451),c=n(2335),s=n(9487),u=n(4739),d={code:"en",label:"English"},f=[{code:"ar-SA",label:"العربية",rtl:!0},{code:"bg-BG",label:"Български"},{code:"ca-ES",label:"Català"},{code:"cs-CZ",label:"Česky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"Ελληνικά"},{code:"es-ES",label:"Español"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"فارسی",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Français"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"עברית",rtl:!0},{code:"hi-IN",label:"हिन्दी"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"日本語"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"Қазақ тілі"},{code:"ko-KR",label:"한국어"},{code:"ku-TR",label:"Kurdî"},{code:"lt-LT",label:"Lietuvių"},{code:"lv-LV",label:"Latviešu"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokmål"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"ਪੰਜਾਬੀ"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Português Brasileiro"},{code:"pt-PT",label:"Português"},{code:"ro-RO",label:"Română"},{code:"ru-RU",label:"Русский"},{code:"sk-SK",label:"Slovenčina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Slovenščina"},{code:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"vi-VN",label:"Tiếng Việt"},{code:"mr-IN",label:"मराठी"}].concat([d]).sort((function(e,t){return e.label>t.label?1:-1})).filter((function(e){return l[e.code]>=85})),p="__test__";"production"===c.Vi.DEVELOPMENT&&f.unshift({code:p,label:"test language"},{code:"".concat(p,".rtl"),label:"‪test language (rtl)‬",rtl:!0});var h=d,m={},g=function(){var e=(0,r.Z)(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h=t,document.documentElement.dir=h.rtl?"rtl":"ltr",document.documentElement.lang=h.code,!t.code.startsWith(p)){e.next=7;break}m={},e.next=17;break;case 7:return e.prev=7,e.next=10,n(940)("./".concat(h.code,".json"));case 10:m=e.sent,e.next=17;break;case 13:e.prev=13,e.t0=e.catch(7),console.error("Failed to load language ".concat(t.code,":"),e.t0.message),m=a;case 17:s.e_.set(x,t.code);case 18:case"end":return e.stop()}}),e,null,[[7,13]])})));return function(t){return e.apply(this,arguments)}}(),v=function(){return h},b=function(e,t){for(var n=0;n<t.length;++n){var r=t[n];if(void 0===e[r])return;e=e[r]}if("string"==typeof e)return e},y=function(e,t){if(h.code.startsWith(p)){var n=t?"".concat(e,"(").concat(JSON.stringify(t).slice(1,-1),")"):e;return"‪[[".concat(n,"]]‬")}var r=e.split("."),o=b(m,r)||b(a,r);if(void 0===o)throw new Error("Can't find translation for ".concat(e));if(t)for(var i in t)o=o.replace("{{".concat(i,"}}"),String(t[i]));return o},x=(0,u.cn)(d.code),w=function(){var e=(0,u.Dv)(x,s.yE);return{t:y,langCode:e}}},9487:function(e,t,n){"use strict";n.d(t,{e_:function(){return i},yE:function(){return o}});var r=n(4739),o=(n(9787),Symbol()),i=(0,r.Vv)()},6066:function(e,t,n){"use strict";n.d(t,{E0:function(){return c},Ge:function(){return s},OA:function(){return l},Wl:function(){return a},aU:function(){return o},tW:function(){return i}});var r=n(2335),o={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",R:"KeyR"},i={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:r.Um?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",A:"a",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},a=function(e){return e===i.ARROW_LEFT||e===i.ARROW_RIGHT||e===i.ARROW_DOWN||e===i.ARROW_UP},l=function(e){return e.altKey},c=function(e){return e.shiftKey},s=function(e){return e.shiftKey}},6552:function(e,t,n){"use strict";n.d(t,{EK:function(){return j},H5:function(){return u},Jj:function(){return E},LW:function(){return s},N_:function(){return y},U1:function(){return a},c9:function(){return f},eH:function(){return w},g6:function(){return d},lk:function(){return k},wC:function(){return g},xj:function(){return l},yB:function(){return b},yW:function(){return v},yq:function(){return c}});var r=n(2335),o=n(3063),i=n(8925),a=function(e,t,n,r,o){return[(e-n)*Math.cos(o)-(t-r)*Math.sin(o)+n,(e-n)*Math.sin(o)+(t-r)*Math.cos(o)+r]},l=function(e,t,n){return a(e[0],e[1],t[0],t[1],n)},c=function(e,t,n,r,o,i,a,l){var c=Math.cos(r),s=Math.sin(r);return e.e&&e.w?t+=o+a:e.e?(t+=o*(1+c),n+=o*s,t+=a*(1-c),n+=a*-s):e.w&&(t+=o*(1-c),n+=o*-s,t+=a*(1+c),n+=a*s),e.n&&e.s?n+=i+l:e.n?(t+=i*s,n+=i*(1-c),t+=l*-s,n+=l*(1+c)):e.s&&(t+=i*-s,n+=i*(1+c),t+=l*s,n+=l*(1-c)),[t,n]},s=function(e,t,n,r){var o=n-e,i=r-t;return Math.hypot(o,i)},u=function(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e.length>=3){var n=[e[0],e[e.length-1]],o=n[0],i=n[1],a=s(o[0],o[1],i[0],i[1]);return a<=r.qx/t}return!1},f=function(e,t,n){var r=e.length;if(r<3)return!1;for(var o=[Number.MAX_SAFE_INTEGER,n],i=[t,n],a=0,l=0;l<r;l++){var c=e[l],s=e[(l+1)%r];if(m(c,s,i,o)){if(0===h(c,i,s))return p(c,i,s);a++}}return a%2==1},p=function(e,t,n){return t[0]<=Math.max(e[0],n[0])&&t[0]>=Math.min(e[0],n[0])&&t[1]<=Math.max(e[1],n[1])&&t[1]>=Math.min(e[1],n[1])},h=function(e,t,n){var r=(t[1]-e[1])*(n[0]-t[0])-(t[0]-e[0])*(n[1]-t[1]);return 0===r?0:r>0?1:2},m=function(e,t,n,r){var o=h(e,t,n),i=h(e,t,r),a=h(n,r,e),l=h(n,r,t);return o!==i&&a!==l||(!(0!==o||!p(e,n,t))||(!(0!==i||!p(e,r,t))||(!(0!==a||!p(n,e,r))||!(0!==l||!p(n,t,r)))))},g=function(e,t,n){return n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t]},v=function(e,t){var n,o,i;if((null===(n=t.roundness)||void 0===n?void 0:n.type)===r.a6.PROPORTIONAL_RADIUS||(null===(o=t.roundness)||void 0===o?void 0:o.type)===r.a6.LEGACY)return e*r.Rx;if((null===(i=t.roundness)||void 0===i?void 0:i.type)===r.a6.ADAPTIVE_RADIUS){var a,l,c=null!==(a=null===(l=t.roundness)||void 0===l?void 0:l.value)&&void 0!==a?a:r._9;return e<=c/r.Rx?e*r.Rx:c}return 0},b=function(e,t){var n=(0,o.R2)(e);if(!n)return null;for(var r=(0,i.CM)(n[0]),a=[0,0],l=0,c=1/0,u=null;l<r.length;){var d=r[l],f=d.op,p=d.data;if("move"===f&&(a=p),"bcurveTo"===f){var h=a,m=[p[0],p[1]],g=[p[2],p[3]],v=[p[4],p[5]],b=s(v[0],v[1],t[0],t[1]);b<c&&(c=b,u=[h,m,g,v]),a=v}l++}return u},y=function(e,t,n,r,o){var i=function(o,i){return Math.pow(1-o,3)*r[i]+3*o*Math.pow(1-o,2)*n[i]+3*Math.pow(o,2)*(1-o)*t[i]+e[i]*Math.pow(o,3)};return[i(o,0),i(o,1)]},x=function(e,t){var n=[];n[0]=0;for(var r=function(e,t){var n=b(e,t);if(!n)return[];for(var r=[],o=1;o>0;){var i=y(n[0],n[1],n[2],n[3],o);r.push([i[0],i[1]]),o-=.05}return r.length&&E(r.at(-1),t)&&r.push([t[0],t[1]]),r}(e,t),o=0,i=0;o<r.length-1;){i+=s(r[o][0],r[o][1],r[o+1][0],r[o+1][1]),n.push(i),o++}return n},w=function(e,t){return x(e,t).at(-1)},k=function(e,t,n){for(var r=x(e,t),o=r.length-1,i=n*r.at(-1),a=0,l=o,c=0;a<l;)r[c=Math.floor(a+(l-a)/2)]<i?a=c+1:l=c;return r[c]>i&&c--,r[c]===i?c/o:1-(c+(i-r[c])/(r[c+1]-r[c]))/o},E=function(e,t){return e[0]===t[0]&&e[1]===t[1]},j=function(e){return Math.round(e/Math.PI*1e4)%5e3==0}},3024:function(e,t,n){"use strict";n.d(t,{$D:function(){return j},Fl:function(){return E},I_:function(){return f.I_},N7:function(){return v.N7},NI:function(){return f.NI},NL:function(){return k},ZY:function(){return g.ZY},cT:function(){return g.cT},i1:function(){return S},lV:function(){return g.lV},zh:function(){return b.zh}});var r=n(8950),o=n(7169),i=n(2975),a=n.n(i),l=n(4162),c=n(8897),s=n(679),u=n(2335),d=n(673),f=n(5523),p=n(6665),h=n(1564),m=n(2791),g=n(434),v=n(3063),b=n(7053);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e){var t=new h.Z;return t.replaceAllElements((0,m._N)(e)),t.getNonDeletedElements()},k=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.maxWidthOrHeight,i=e.getDimensions,a=e.exportPadding,c=(0,s.nu)({elements:t,appState:n},null,null),u=c.elements,d=c.appState,f=d.exportBackground,p=d.viewBackgroundColor;return(0,l.NL)(w(u),x(x({},d),{},{offsetTop:0,offsetLeft:0,width:0,height:0}),r||{},{exportBackground:f,exportPadding:a,viewBackgroundColor:p},(function(e,t){var r,a=document.createElement("canvas");if(o){var l;"function"==typeof i&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");var c=Math.max(e,t),s=o<c?o/c:null!==(l=null==n?void 0:n.exportScale)&&void 0!==l?l:1;return a.width=e*s,a.height=t*s,{canvas:a,scale:s}}var u=(null==i?void 0:i(e,t))||{width:e,height:t};return a.width=u.width,a.height=u.height,{canvas:a,scale:null!==(r=u.scale)&&void 0!==r?r:1}}))},E=function(){var e=(0,r.Z)(a().mark((function e(t){var n,o,i,l,c,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(o=t).mimeType,l=void 0===i?u.LO.png:i,c=o.quality,l===u.LO.png&&"number"==typeof c&&console.warn('"quality" will be ignored for "'.concat(u.LO.png,'" mimeType')),"image/jpg"===l&&(l=u.LO.jpg),l!==u.LO.jpg||null!==(n=t.appState)&&void 0!==n&&n.exportBackground||(console.warn('Defaulting "exportBackground" to "true" for "'.concat(u.LO.jpg,'" mimeType')),t=x(x({},t),{},{appState:x(x({},t.appState),{},{exportBackground:!0})})),e.next=6,k(x(x({},t),{},{elements:w(t.elements)}));case 6:return s=e.sent,c=c||(/image\/jpe?g/.test(l)?.92:.8),e.abrupt("return",new Promise((function(e,n){s.toBlob(function(){var o=(0,r.Z)(a().mark((function r(o){var i;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o){r.next=2;break}return r.abrupt("return",n(new Error("couldn't export to blob")));case 2:if(!o||l!==u.LO.png||null===(i=t.appState)||void 0===i||!i.exportEmbedScene){r.next=6;break}return r.next=5,(0,d.encodePngMetadata)({blob:o,metadata:(0,f.I_)(t.elements,t.appState,t.files||{},"local")});case 5:o=r.sent;case 6:e(o);case 7:case"end":return r.stop()}}),r)})));return function(e){return o.apply(this,arguments)}}(),l,c)})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=(0,r.Z)(a().mark((function e(t){var n,r,o,i,u,d,p,h,m,g;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.elements,r=t.appState,o=void 0===r?(0,c.im)():r,i=t.files,u=void 0===i?{}:i,d=t.exportPadding,p=(0,s.nu)({elements:n,appState:o},null,null),h=p.elements,m=p.appState,g=x(x({},m),{},{exportPadding:d}),e.abrupt("return",(0,l.$D)(w(h),g,u,{serializeAsJSON:function(){return(0,f.I_)(h,g,u||{},"local")}}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=(0,r.Z)(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("svg"!==t.type){e.next=8;break}return e.next=3,j(t);case 3:return n=e.sent,e.next=6,(0,p.dd)(n.outerHTML);case 6:case 11:case 16:e.next=19;break;case 8:if("png"!==t.type){e.next=13;break}return e.next=11,(0,p.uR)(E(t));case 13:if("json"!==t.type){e.next=18;break}return e.next=16,(0,p.vQ)(t.elements,t.files);case 18:throw new Error("Invalid export type");case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},5001:function(e,t,n){"use strict";n.d(t,{k:function(){return o},z:function(){return i}});var r=n(1930),o=function(e){var t=e.map((function(e){return e[0]})),n=e.map((function(e){return e[1]}));return{width:Math.max.apply(Math,(0,r.Z)(t))-Math.min.apply(Math,(0,r.Z)(t)),height:Math.max.apply(Math,(0,r.Z)(n))-Math.min.apply(Math,(0,r.Z)(n))}},i=function(e,t,n,o){var i=n.map((function(t){return t[e]})),a=Math.max.apply(Math,(0,r.Z)(i)),l=Math.min.apply(Math,(0,r.Z)(i)),c=a-l,s=0===c?1:t/c,u=1/0,d=n.map((function(t){var n=t[e]*s,o=(0,r.Z)(t);return o[e]=n,n<u&&(u=n),o}));if(!o)return d;if(2===d.length)return d;var f=l-u;return d.map((function(t){return t.map((function(t,n){return n===e?t+f:t}))}))}},6954:function(e,t,n){"use strict";n.d(t,{LU:function(){return c},kb:function(){return s}});var r=n(8152),o=n(5605),i=n(6340),a=new r.k(Date.now()),l=0,c=function(){return Math.floor(a.next()*Math.pow(2,31))},s=function(){return(0,i.h2)()?"id".concat(l++):(0,o.x0)()}},3063:function(e,t,n){"use strict";n.d(t,{Dn:function(){return W},i:function(){return J},N7:function(){return ae},R2:function(){return G},bI:function(){return q},lw:function(){return te},Rg:function(){return re}});var r=n(1930),o=n(7169),i=n(2577),a=n(1974),l=n(8925),c=n(6340),s=n(6552),u=n(8234),d=n(8897),f=n(2335);function p(e,t,n,r=(e=>e)){return e*r(.5-t*(.5-n))}function h(e,t){return[e[0]+t[0],e[1]+t[1]]}function m(e,t){return[e[0]-t[0],e[1]-t[1]]}function g(e,t){return[e[0]*t,e[1]*t]}function v(e){return[e[1],-e[0]]}function b(e,t){return e[0]*t[0]+e[1]*t[1]}function y(e,t){return e[0]===t[0]&&e[1]===t[1]}function x(e,t){return function(e){return e[0]*e[0]+e[1]*e[1]}(m(e,t))}function w(e){return function(e,t){return[e[0]/t,e[1]/t]}(e,function(e){return Math.hypot(e[0],e[1])}(e))}function k(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function E(e,t,n){let r=Math.sin(n),o=Math.cos(n),i=e[0]-t[0],a=e[1]-t[1],l=i*r+a*o;return[i*o-a*r+t[0],l+t[1]]}function j(e,t,n){return h(e,g(m(t,e),n))}function S(e,t,n){return h(e,g(t,n))}var{min:O,PI:_}=Math,C=_+1e-4;function I(e,t={}){return function(e,t={}){let{size:n=16,smoothing:r=.5,thinning:o=.5,simulatePressure:i=!0,easing:a=(e=>e),start:l={},end:c={},last:s=!1}=t,{cap:u=!0,easing:d=(e=>e*(2-e))}=l,{cap:f=!0,easing:y=(e=>--e*e*e+1)}=c;if(0===e.length||n<=0)return[];let k,_=e[e.length-1].runningLength,I=!1===l.taper?0:!0===l.taper?Math.max(n,_):l.taper,T=!1===c.taper?0:!0===c.taper?Math.max(n,_):c.taper,P=Math.pow(n*r,2),M=[],D=[],A=e.slice(0,10).reduce(((e,t)=>{let r=t.pressure;if(i){let o=O(1,t.distance/n),i=O(1,1-o);r=O(1,e+.275*o*(i-e))}return(e+r)/2}),e[0].pressure),L=p(n,o,e[e.length-1].pressure,a),Z=e[0].vector,z=e[0].point,R=z,N=z,B=R,H=!1;for(let t=0;t<e.length;t++){let{pressure:r}=e[t],{point:l,vector:c,distance:s,runningLength:u}=e[t];if(t<e.length-1&&_-u<3)continue;if(o){if(i){let e=O(1,s/n),t=O(1,1-e);r=O(1,A+.275*e*(t-A))}L=p(n,o,r,a)}else L=n/2;void 0===k&&(k=L);let f=u<I?d(u/I):1,w=_-u<T?y((_-u)/T):1;L=Math.max(.01,L*Math.min(f,w));let S=(t<e.length-1?e[t+1]:e[t]).vector,W=t<e.length-1?b(c,S):1,F=null!==W&&W<0;if(b(c,Z)<0&&!H||F){let e=g(v(Z),L);for(let t=1/13,n=0;n<=1;n+=t)N=E(m(l,e),l,C*n),M.push(N),B=E(h(l,e),l,C*-n),D.push(B);z=N,R=B,F&&(H=!0);continue}if(H=!1,t===e.length-1){let e=g(v(c),L);M.push(m(l,e)),D.push(h(l,e));continue}let U=g(v(j(S,c,W)),L);N=m(l,U),(t<=1||x(z,N)>P)&&(M.push(N),z=N),B=h(l,U),(t<=1||x(R,B)>P)&&(D.push(B),R=B),A=r,Z=c}let W=e[0].point.slice(0,2),F=e.length>1?e[e.length-1].point.slice(0,2):h(e[0].point,[1,1]),U=[],K=[];if(1===e.length){if(!I&&!T||s){let e=S(W,w(v(m(W,F))),-(k||L)),t=[];for(let n=1/13,r=n;r<=1;r+=n)t.push(E(e,W,2*C*r));return t}}else{if(!(I||T&&1===e.length))if(u)for(let e=1/13,t=e;t<=1;t+=e){let e=E(D[0],W,C*t);U.push(e)}else{let e=m(M[0],D[0]),t=g(e,.5),n=g(e,.51);U.push(m(W,t),m(W,n),h(W,n),h(W,t))}let t=v(function(e){return[-e[0],-e[1]]}(e[e.length-1].vector));if(T||I&&1===e.length)K.push(F);else if(f){let e=S(F,t,L);for(let t=1/29,n=t;n<1;n+=t)K.push(E(e,F,3*C*n))}else K.push(h(F,g(t,L)),h(F,g(t,.99*L)),m(F,g(t,.99*L)),m(F,g(t,L)))}return M.concat(K,D.reverse(),U)}(function(e,t={}){var n;let{streamline:r=.5,size:o=16,last:i=!1}=t;if(0===e.length)return[];let a=.15+.85*(1-r),l=Array.isArray(e[0])?e:e.map((({x:e,y:t,pressure:n=.5})=>[e,t,n]));if(2===l.length){let e=l[1];l=l.slice(0,-1);for(let t=1;t<5;t++)l.push(j(l[0],e,t/4))}1===l.length&&(l=[...l,[...h(l[0],[1,1]),...l[0].slice(2)]]);let c=[{point:[l[0][0],l[0][1]],pressure:l[0][2]>=0?l[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],s=!1,u=0,d=c[0],f=l.length-1;for(let e=1;e<l.length;e++){let t=i&&e===f?l[e].slice(0,2):j(d.point,l[e],a);if(y(d.point,t))continue;let n=k(t,d.point);if(u+=n,e<f&&!s){if(u<o)continue;s=!0}d={point:t,pressure:l[e][2]>=0?l[e][2]:.5,vector:w(m(d.point,t)),distance:n,runningLength:u},c.push(d)}return c[0].vector=(null==(n=c[1])?void 0:n.vector)||[0,0],c}(e,t),t)}var T=n(5710),P=n(6938);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A="invert(100%) hue-rotate(180deg) saturate(1.25)",L=(0,d.im)(),Z=function(e,t){return(0,a.wi)(e)&&!t.imageCache.has(e.fileId)},z=function(e,t){var n;return"dark"===t.theme&&(0,a.wi)(e)&&!Z(e,t)&&(null===(n=t.imageCache.get(e.fileId))||void 0===n?void 0:n.mimeType)!==f.LO.svg},R=function(e){return[8,8+e]},N=function(e){return[1.5,6+e]},B=function(e){return"freedraw"===e.type?12*e.strokeWidth:20},H=function(e,t,n){var r,o=document.createElement("canvas"),s=o.getContext("2d"),d=B(e),f=function(e,t){var n=16777216,r=32767,o=B(e),s=(0,l.qf)(e),u=(0,i.Z)(s,4),d=u[0],f=u[1],p=u[2],h=u[3],m=(0,a.bt)(e)||(0,a.F9)(e)?(0,c.TE)(d,p):e.width,g=(0,a.bt)(e)||(0,a.F9)(e)?(0,c.TE)(f,h):e.height,v=m*window.devicePixelRatio+2*o,b=g*window.devicePixelRatio+2*o,y=t.value;return(v*y>r||b*y>r)&&(y=Math.min(r/v,r/b)),v*b*y*y>n&&(y=Math.sqrt(n/(v*b))),{width:v=Math.floor(v*y),height:b=Math.floor(b*y),scale:y}}(e,t),p=f.width,h=f.height,m=f.scale;o.width=p,o.height=h;var g=0,v=0;if((0,a.bt)(e)||(0,a.F9)(e)){var b=(0,l.qf)(e),y=(0,i.Z)(b,2),x=y[0],w=y[1];g=e.x>x?(0,c.TE)(e.x,x)*window.devicePixelRatio*m:0,v=e.y>w?(0,c.TE)(e.y,w)*window.devicePixelRatio*m:0,s.translate(g,v)}s.save(),s.translate(d*m,d*m),s.scale(window.devicePixelRatio*m,window.devicePixelRatio*m);var k=u.Z.canvas(o);return z(e,n)&&(s.filter=A),K(e,k,s,n),s.restore(),{element:e,canvas:o,theme:n.theme,scale:m,zoomValue:t.value,canvasOffsetX:g,canvasOffsetY:v,boundTextElementVersion:(null===(r=(0,T.WJ)(e))||void 0===r?void 0:r.version)||null}},W=14,F=document.createElement("img");F.src="data:".concat(f.LO.svg,",").concat(encodeURIComponent('<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="image" class="svg-inline--fa fa-image fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#888" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>'));var U=document.createElement("img");U.src="data:".concat(f.LO.svg,",").concat(encodeURIComponent('<svg viewBox="0 0 668 668" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.81709 0 0 .81709 124.825 145.825)"/><path d="M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.30366 0 0 .30366 506.822 60.065)"/></svg>'));var K=function(e,t,n,r){switch(n.globalAlpha=e.opacity/100,e.type){case"rectangle":case"diamond":case"ellipse":n.lineJoin="round",n.lineCap="round",t.draw(G(e));break;case"arrow":case"line":n.lineJoin="round",n.lineCap="round",G(e).forEach((function(e){t.draw(e)}));break;case"freedraw":n.save(),n.fillStyle=e.strokeColor;var o=function(e){return oe.get(e)}(e),i=G(e);i&&t.draw(i),n.fillStyle=e.strokeColor,n.fill(o),n.restore();break;case"image":var l,s=(0,a.wi)(e)?null===(l=r.imageCache.get(e.fileId))||void 0===l?void 0:l.image:void 0;null==s||s instanceof Promise?function(e,t,n){t.fillStyle="#E7E7E7",t.fillRect(0,0,e.width,e.height);var r=Math.min(e.width,e.height),o=Math.min(r,Math.min(.4*r,100));t.drawImage("error"===e.status?U:F,e.width/2-o/2,e.height/2-o/2,o,o)}(e,n,r.zoom.value):n.drawImage(s,0,0,e.width,e.height);break;default:if(!(0,a.iB)(e))throw new Error("Unimplemented type ".concat(e.type));var u=(0,c.dZ)(e.text),d=u&&!n.canvas.isConnected;d&&document.body.appendChild(n.canvas),n.canvas.setAttribute("dir",u?"rtl":"ltr"),n.save(),n.font=(0,c.mO)(e),n.fillStyle=e.strokeColor,n.textAlign=e.textAlign;for(var f=e.text.replace(/\r\n?/g,"\n").split("\n"),p="center"===e.textAlign?e.width/2:"right"===e.textAlign?e.width:0,h=(0,T.Rg)(e.fontSize,e.lineHeight),m=e.height-e.baseline,g=0;g<f.length;g++)n.fillText(f[g],p,(g+1)*h-m);n.restore(),d&&n.canvas.remove()}n.globalAlpha=1},Y=new WeakMap,V=new WeakMap,G=function(e){return V.get(e)},X=function(e,t){return V.set(e,t)},q=function(e){return V.delete(e)},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={seed:e.seed,strokeLineDash:"dashed"===e.strokeStyle?R(e.strokeWidth):"dotted"===e.strokeStyle?N(e.strokeWidth):void 0,disableMultiStroke:"solid"!==e.strokeStyle,strokeWidth:"solid"!==e.strokeStyle?e.strokeWidth+.5:e.strokeWidth,fillWeight:e.strokeWidth/2,hachureGap:4*e.strokeWidth,roughness:e.roughness,stroke:e.strokeColor,preserveVertices:t};switch(e.type){case"rectangle":case"diamond":case"ellipse":return n.fillStyle=e.fillStyle,n.fill="transparent"===e.backgroundColor?void 0:e.backgroundColor,"ellipse"===e.type&&(n.curveFitting=1),n;case"line":case"freedraw":return(0,s.g6)(e.points)&&(n.fillStyle=e.fillStyle,n.fill="transparent"===e.backgroundColor?void 0:e.backgroundColor),n;case"arrow":return n;default:throw new Error("Unimplemented type ".concat(e.type))}},$=function(e,t){var n=V.get(e);if(void 0===n)switch(Y.delete(e),e.type){case"rectangle":if(e.roundness){var o=e.width,a=e.height,c=(0,s.yW)(Math.min(o,a),e);n=t.path("M ".concat(c," 0 L ").concat(o-c," 0 Q ").concat(o," 0, ").concat(o," ").concat(c," L ").concat(o," ").concat(a-c," Q ").concat(o," ").concat(a,", ").concat(o-c," ").concat(a," L ").concat(c," ").concat(a," Q 0 ").concat(a,", 0 ").concat(a-c," L 0 ").concat(c," Q 0 0, ").concat(c," 0"),J(e,!0))}else n=t.rectangle(0,0,e.width,e.height,J(e));X(e,n);break;case"diamond":var u=(0,l.UC)(e),d=(0,i.Z)(u,8),f=d[0],p=d[1],h=d[2],m=d[3],g=d[4],v=d[5],b=d[6],y=d[7];if(e.roundness){var x=(0,s.yW)(Math.abs(f-b),e),w=(0,s.yW)(Math.abs(m-p),e);n=t.path("M ".concat(f+x," ").concat(p+w," L ").concat(h-x," ").concat(m-w,"\n C ").concat(h," ").concat(m,", ").concat(h," ").concat(m,", ").concat(h-x," ").concat(m+w,"\n L ").concat(g+x," ").concat(v-w,"\n C ").concat(g," ").concat(v,", ").concat(g," ").concat(v,", ").concat(g-x," ").concat(v-w,"\n L ").concat(b+x," ").concat(y+w,"\n C ").concat(b," ").concat(y,", ").concat(b," ").concat(y,", ").concat(b+x," ").concat(y-w,"\n L ").concat(f-x," ").concat(p+w,"\n C ").concat(f," ").concat(p,", ").concat(f," ").concat(p,", ").concat(f+x," ").concat(p+w),J(e,!0))}else n=t.polygon([[f,p],[h,m],[g,v],[b,y]],J(e));X(e,n);break;case"ellipse":n=t.ellipse(e.width/2,e.height/2,e.width,e.height,J(e)),X(e,n);break;case"line":case"arrow":var k=J(e),E=e.points.length?e.points:[[0,0]];if(n=e.roundness?[t.curve(E,k)]:k.fill?[t.polygon(E,k)]:[t.linearPath(E,k)],"arrow"===e.type){var j=e.startArrowhead,S=void 0===j?null:j,O=e.endArrowhead,_=void 0===O?"arrow":O,C=function(e,n,r,o){var a=(0,l.Y5)(e,n,r,o);if(null===a)return[];if("dot"===o){var c=(0,i.Z)(a,3),s=c[0],u=c[1],d=c[2];return[t.circle(s,u,d,D(D({},k),{},{fill:e.strokeColor,fillStyle:"solid",stroke:"none"}))]}if("triangle"===o){var f=(0,i.Z)(a,6),p=f[0],h=f[1],m=f[2],g=f[3],v=f[4],b=f[5];return delete k.strokeLineDash,[t.polygon([[p,h],[m,g],[v,b],[p,h]],D(D({},k),{},{fill:e.strokeColor,fillStyle:"solid"}))]}var y=(0,i.Z)(a,6),x=y[0],w=y[1],E=y[2],j=y[3],S=y[4],O=y[5];if("dotted"===e.strokeStyle){var _=N(e.strokeWidth-1);k.strokeLineDash=[_[0],_[1]-1]}else delete k.strokeLineDash;return[t.line(E,j,x,w,k),t.line(S,O,x,w,k)]};if(null!==S){var I,T=C(e,n,"start",S);(I=n).push.apply(I,(0,r.Z)(T))}if(null!==_){var P,M=C(e,n,"end",_);(P=n).push.apply(P,(0,r.Z)(M))}}X(e,n);break;case"freedraw":ie(e),n=(0,s.g6)(e.points)?t.polygon(e.points,D(D({},J(e)),{},{stroke:"none"})):null,X(e,n);break;case"text":case"image":X(e,null)}},Q=function(e,t){var n,r=t?t.zoom:L.zoom,o=Y.get(e),i=o&&o.zoomValue!==r.value&&!(null!=t&&t.shouldCacheIgnoreZoom),a=(null===(n=(0,T.WJ)(e))||void 0===n?void 0:n.version)||null;if(!o||i||o.theme!==t.theme||o.boundTextElementVersion!==a){var l=H(e,r,t);return Y.set(e,l),l}return o},ee=function(e,t,n,r){var o=e.element,s=B(o),u=e.scale,d=(0,l.qf)(o),p=(0,i.Z)(d,4),h=p[0],m=p[1],g=p[2],v=p[3];(0,a.F9)(o)&&(h=Math.floor(h),g=Math.ceil(g),m=Math.floor(m),v=Math.ceil(v));var b=((h+g)/2+r.scrollX)*window.devicePixelRatio,y=((m+v)/2+r.scrollY)*window.devicePixelRatio;n.save(),n.scale(1/window.devicePixelRatio,1/window.devicePixelRatio);var x=(0,T.WJ)(o);if((0,a.Yv)(o)&&x){var w=document.createElement("canvas"),k=w.getContext("2d"),E=Math.max((0,c.TE)(h,g),(0,c.TE)(m,v));w.width=E*window.devicePixelRatio*u+s*e.scale*10,w.height=E*window.devicePixelRatio*u+s*e.scale*10;var j=(w.width-e.canvas.width)/2,S=(w.height-e.canvas.height)/2;k.translate(w.width/2,w.height/2),k.rotate(o.angle),k.drawImage(e.canvas,-e.canvas.width/2,-e.canvas.height/2,e.canvas.width,e.canvas.height);var O=(0,l.qf)(x),_=(0,i.Z)(O,6),C=_[4],I=_[5];k.rotate(-o.angle);var P=w.width/2-(C-h)*window.devicePixelRatio*u-j-s*u,M=w.height/2-(I-m)*window.devicePixelRatio*u-S-s*u;k.translate(-P,-M),k.clearRect(-(x.width/2+f.gK)*window.devicePixelRatio*u,-(x.height/2+f.gK)*window.devicePixelRatio*u,(x.width+2*f.gK)*window.devicePixelRatio*u,(x.height+2*f.gK)*window.devicePixelRatio*u),n.translate(b,y),n.drawImage(w,-(g-h)/2*window.devicePixelRatio-j/u-s,-(v-m)/2*window.devicePixelRatio-S/u-s,w.width/u,w.height/u)}else if(n.translate(b,y),n.rotate(o.angle),"scale"in e.element&&!Z(o,r)&&n.scale(e.element.scale[0],e.element.scale[1]),n.translate(-b,-y),n.drawImage(e.canvas,(h+r.scrollX)*window.devicePixelRatio-s*e.scale/e.scale,(m+r.scrollY)*window.devicePixelRatio-s*e.scale/e.scale,e.canvas.width/e.scale,e.canvas.height/e.scale),"true"==={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_MATOMO_URL:"https://excalidraw.matomo.cloud/",REACT_APP_CDN_MATOMO_TRACKER_URL:"//cdn.matomo.cloud/excalidraw.matomo.cloud/matomo.js",REACT_APP_MATOMO_SITE_ID:"1",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",PKG_VERSION:"0.15.2-6546-81bee8a",IS_EXCALIDRAW_NPM_PACKAGE:!0}.REACT_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX&&(0,a.Xo)(o)){var D=(0,T.WJ)(o),A=(0,T.cw)(o);n.strokeStyle="#c92a2a",n.lineWidth=3,n.strokeRect((A.x+r.scrollX)*window.devicePixelRatio,(A.y+r.scrollY)*window.devicePixelRatio,(0,T.iZ)(o)*window.devicePixelRatio,(0,T.D9)(o,D)*window.devicePixelRatio)}n.restore()},te=function(e,t,n,r,o){var d=t.generator;switch(e.type){case"selection":n.save(),n.translate(e.x+r.scrollX,e.y+r.scrollY),n.fillStyle="rgba(0, 0, 200, 0.04)";var f=.5/r.zoom.value;n.fillRect(f,f,e.width,e.height),n.lineWidth=1/r.zoom.value,n.strokeStyle="rgb(105, 101, 219)",n.strokeRect(f,f,e.width,e.height),n.restore();break;case"freedraw":if($(e,d),r.isExporting){var p=(0,l.qf)(e),h=(0,i.Z)(p,4),m=h[0],g=h[1],v=h[2],b=h[3],y=(m+v)/2+r.scrollX,x=(g+b)/2+r.scrollY,w=(v-m)/2-(e.x-m),k=(b-g)/2-(e.y-g);n.save(),n.translate(y,x),n.rotate(e.angle),n.translate(-w,-k),K(e,t,n,r),n.restore()}else{var E=Q(e,r);ee(E,0,n,r)}break;case"rectangle":case"diamond":case"ellipse":case"line":case"arrow":case"image":case"text":if($(e,d),r.isExporting){var j=(0,l.qf)(e),S=(0,i.Z)(j,4),O=S[0],_=S[1],C=S[2],I=S[3],M=(O+C)/2+r.scrollX,D=(_+I)/2+r.scrollY,A=(C-O)/2-(e.x-O),L=(I-_)/2-(e.y-_);if((0,a.iB)(e)){var Z=(0,T.tl)(e);if((0,a.Yv)(Z)){var R=P._.getBoundTextElementPosition(Z,e);A=(C-O)/2-(R.x-O),L=(I-_)/2-(R.y-_)}}n.save(),n.translate(M,D),z(e,r)&&(n.filter="none");var N=(0,T.WJ)(e);if((0,a.Yv)(e)&&N){var H=document.createElement("canvas"),W=H.getContext("2d"),F=Math.max((0,c.TE)(O,C),(0,c.TE)(_,I)),U=B(e);H.width=F*o.exportScale+10*U*o.exportScale,H.height=F*o.exportScale+10*U*o.exportScale,W.translate(H.width/2,H.height/2),W.scale(o.exportScale,o.exportScale),A=e.width/2-(e.x-O),L=e.height/2-(e.y-_),W.rotate(e.angle);var Y=u.Z.canvas(H);W.translate(-A,-L),K(e,Y,W,r),W.translate(A,L),W.rotate(-e.angle);var V=(0,l.qf)(N),G=(0,i.Z)(V,6),X=(O+C)/2-G[4],q=(_+I)/2-G[5];W.translate(-X,-q),W.clearRect(-N.width/2,-N.height/2,N.width,N.height),n.scale(1/o.exportScale,1/o.exportScale),n.drawImage(H,-H.width/2,-H.height/2,H.width,H.height)}else n.rotate(e.angle),"image"===e.type&&n.scale(e.scale[0],e.scale[1]),n.translate(-A,-L),K(e,t,n,r);n.restore()}else{var J=Q(e,r),te=n.imageSmoothingEnabled;null!=r&&r.shouldCacheIgnoreZoom||e.angle&&!(0,s.EK)(e.angle)||(n.imageSmoothingEnabled=!1),ee(J,0,n,r),n.imageSmoothingEnabled=te}break;default:throw new Error("Unimplemented type ".concat(e.type))}},ne=function(e,t,n){if(void 0===n)return e.draw(t);var r={sets:t.sets,shape:t.shape,options:D(D({},t.options),{},{fixedDecimalPlaceDigits:n})};return e.draw(r)},re=function(e,t,n,r,o,u,d){var p=(0,l.qf)(e),h=(0,i.Z)(p,4),m=h[0],g=h[1],v=h[2],b=h[3],y=(v-m)/2-(e.x-m),x=(b-g)/2-(e.y-g);if((0,a.iB)(e)){var w=(0,T.tl)(e);if((0,a.Yv)(w)){var k=(0,l.qf)(w),E=(0,i.Z)(k,4),j=E[0],S=E[1],O=E[2],_=E[3],C=P._.getBoundTextElementPosition(w,e);y=(O-j)/2-(C.x-j),x=(_-S)/2-(C.y-S),o=o+C.x-e.x,u=u+C.y-e.y}}var I=180*e.angle/Math.PI,M=t.generator,D=n;if(e.link){var L=n.ownerDocument.createElementNS(f.hR,"a");L.setAttribute("href",e.link),D.appendChild(L),D=L}switch(e.type){case"selection":throw new Error("Selection rendering is not supported for SVG");case"rectangle":case"diamond":case"ellipse":$(e,M);var Z=ne(t,G(e),f.zK),z=e.opacity/100;1!==z&&(Z.setAttribute("stroke-opacity","".concat(z)),Z.setAttribute("fill-opacity","".concat(z))),Z.setAttribute("stroke-linecap","round"),Z.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(I," ").concat(y," ").concat(x,")")),D.appendChild(Z);break;case"line":case"arrow":var R=(0,T.WJ)(e),N=n.ownerDocument.createElementNS(f.hR,"mask");if(R){N.setAttribute("id","mask-".concat(e.id));var B=n.ownerDocument.createElementNS(f.hR,"rect");o=o||0,u=u||0,B.setAttribute("x","0"),B.setAttribute("y","0"),B.setAttribute("fill","#fff"),B.setAttribute("width","".concat(e.width+100+o)),B.setAttribute("height","".concat(e.height+100+u)),N.appendChild(B);var H=n.ownerDocument.createElementNS(f.hR,"rect"),W=P._.getBoundTextElementPosition(e,R),F=o+W.x-e.x,U=u+W.y-e.y;H.setAttribute("x",F.toString()),H.setAttribute("y",U.toString()),H.setAttribute("fill","#000"),H.setAttribute("width","".concat(R.width)),H.setAttribute("height","".concat(R.height)),H.setAttribute("opacity","1"),N.appendChild(H)}$(e,M);var K=n.ownerDocument.createElementNS(f.hR,"g");R&&K.setAttribute("mask","url(#mask-".concat(e.id,")"));var Y=e.opacity/100;K.setAttribute("stroke-linecap","round"),G(e).forEach((function(n){var r=ne(t,n,f.zK);1!==Y&&(r.setAttribute("stroke-opacity","".concat(Y)),r.setAttribute("fill-opacity","".concat(Y))),r.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(I," ").concat(y," ").concat(x,")")),"line"===e.type&&(0,s.g6)(e.points)&&"transparent"!==e.backgroundColor&&r.setAttribute("fill-rule","evenodd"),K.appendChild(r)})),D.appendChild(K),D.append(N);break;case"freedraw":$(e,M),ie(e);var V=e.opacity/100,X=G(e),q=X?ne(t,X,f.zK):n.ownerDocument.createElementNS(f.hR,"g");1!==V&&(q.setAttribute("stroke-opacity","".concat(V)),q.setAttribute("fill-opacity","".concat(V))),q.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(I," ").concat(y," ").concat(x,")")),q.setAttribute("stroke","none");var J=n.ownerDocument.createElementNS(f.hR,"path");J.setAttribute("fill",e.strokeColor),J.setAttribute("d",ae(e)),q.appendChild(J),D.appendChild(q);break;case"image":var Q=Math.round(e.width),ee=Math.round(e.height),te=(0,a.wi)(e)&&r[e.fileId];if(te){var re="image-".concat(te.id),oe=n.querySelector("#".concat(re));if(!oe){(oe=n.ownerDocument.createElementNS(f.hR,"symbol")).id=re;var le=n.ownerDocument.createElementNS(f.hR,"image");le.setAttribute("width","100%"),le.setAttribute("height","100%"),le.setAttribute("href",te.dataURL),oe.appendChild(le),D.prepend(oe)}var ce=n.ownerDocument.createElementNS(f.hR,"use");if(ce.setAttribute("href","#".concat(re)),d&&te.mimeType!==f.LO.svg&&ce.setAttribute("filter",A),ce.setAttribute("width","".concat(Q)),ce.setAttribute("height","".concat(ee)),1!==e.scale[0]||1!==e.scale[1]){var se=1!==e.scale[0]?-Q:0,ue=1!==e.scale[1]?-ee:0;ce.setAttribute("transform","scale(".concat(e.scale[0],", ").concat(e.scale[1],") translate(").concat(se," ").concat(ue,")"))}var de=n.ownerDocument.createElementNS(f.hR,"g");de.appendChild(ce),de.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(I," ").concat(y," ").concat(x,")")),D.appendChild(de)}break;default:if(!(0,a.iB)(e))throw new Error("Unimplemented type ".concat(e.type));var fe=e.opacity/100,pe=n.ownerDocument.createElementNS(f.hR,"g");1!==fe&&(pe.setAttribute("stroke-opacity","".concat(fe)),pe.setAttribute("fill-opacity","".concat(fe))),pe.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(I," ").concat(y," ").concat(x,")"));for(var he=e.text.replace(/\r\n?/g,"\n").split("\n"),me=(0,T.Rg)(e.fontSize,e.lineHeight),ge="center"===e.textAlign?e.width/2:"right"===e.textAlign?e.width:0,ve=(0,c.dZ)(e.text)?"rtl":"ltr",be="center"===e.textAlign?"middle":"right"===e.textAlign||"rtl"===ve?"end":"start",ye=0;ye<he.length;ye++){var xe=n.ownerDocument.createElementNS(f.hR,"text");xe.textContent=he[ye],xe.setAttribute("x","".concat(ge)),xe.setAttribute("y","".concat(ye*me)),xe.setAttribute("font-family",(0,c.$g)(e)),xe.setAttribute("font-size","".concat(e.fontSize,"px")),xe.setAttribute("fill",e.strokeColor),xe.setAttribute("text-anchor",be),xe.setAttribute("style","white-space: pre;"),xe.setAttribute("direction",ve),xe.setAttribute("dominant-baseline","text-before-edge"),pe.appendChild(xe)}D.appendChild(pe)}},oe=new WeakMap([]);function ie(e){var t=ae(e),n=new Path2D(t);return oe.set(e,n),n}function ae(e){return function(e){if(!e.length)return"";var t=e.length-1;return e.reduce((function(e,n,r,o){return r===t?e.push(n,le(n,o[0]),"L",o[0],"Z"):e.push(n,le(n,o[r+1])),e}),["M",e[0],"Q"]).join(" ").replace(ce,"$1")}(I(e.simulatePressure?e.points:e.points.length?e.points.map((function(t,n){var r=(0,i.Z)(t,2);return[r[0],r[1],e.pressures[n]]})):[[0,0,.5]],{simulatePressure:e.simulatePressure,size:4.25*e.strokeWidth,thinning:.6,smoothing:.5,streamline:.5,easing:function(e){return Math.sin(e*Math.PI/2)},last:!!e.lastCommittedPoint}))}function le(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}var ce=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g},3547:function(e,t,n){"use strict";n.d(t,{Lu:function(){return S},Eu:function(){return D},M_:function(){return H}});var r,o=n(2577),i=n(1930),a=n(5284),l=n(1047),c=n(756),s=n(1868),u=n(3063),d=n(8982),f=n(6938),p=n(242),h=n(2325),m=n(8290),g=n(267),v=n(6340);!function(e){e.ACTIVE="active",e.AWAY="away",e.IDLE="idle"}(r||(r={}));var b=n(2335),y=n(4929),x=n(1974);function w(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E,j=(0,v.Q5)(),S=2,O=function(e,t,n,r,o,i,a,l){var c=arguments.length>8&&void 0!==arguments[8]&&arguments[8];e.save(),e.translate(i,a),e.rotate(l),c&&e.fillRect(t-i,n-a,r,o),e.strokeRect(t-i,n-a,r,o),e.restore()},_=function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];e.beginPath(),e.arc(t,n,r,0,2*Math.PI),e.fill(),o&&e.stroke()},C=function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6];e.strokeStyle="#5e5ad8",e.setLineDash([]),e.fillStyle="rgba(255, 255, 255, 0.9)",i?e.fillStyle="rgba(134, 131, 226, 0.9)":a&&(e.fillStyle="rgba(177, 151, 252, 0.7)"),_(e,r[0],r[1],o/n.zoom.value,!a)},I=function(e,t,n,r){if(t.selectedLinearElement){e.save(),e.translate(n.scrollX,n.scrollY),e.lineWidth=1/n.zoom.value;var o=f._.getPointsGlobalCoordinates(r),i=f._.POINT_HANDLE_SIZE,a=t.editingLinearElement?i:i/2;o.forEach((function(r,o){var i,l,c=!(null===(i=t.editingLinearElement)||void 0===i||null===(l=i.selectedPointsIndices)||void 0===l||!l.includes(o));C(e,t,n,r,a,c)})),f._.getEditorMidPoints(r,t).filter((function(e){return null!==e})).forEach((function(r){var l;null!=t&&null!==(l=t.selectedLinearElement)&&void 0!==l&&l.segmentMidPointHoveredCoords&&f._.arePointsEqual(r,t.selectedLinearElement.segmentMidPointHoveredCoords)?t.editingLinearElement?(C(e,t,n,r,a,!1),T(r,e,n)):(T(r,e,n),C(e,t,n,r,a,!1)):(t.editingLinearElement||2===o.length)&&C(e,t,n,r,i/2,!1,!0)})),e.restore()}},T=function(e,t,n){t.fillStyle="rgba(105, 101, 219, 0.4)",_(t,e[0],e[1],f._.POINT_HANDLE_SIZE/n.zoom.value,!1)},P=function(e){var t,n=e.elements,h=e.appState,v=e.scale,y=e.rc,k=e.canvas,E=e.renderConfig;if(null===k)return{atLeastOneVisibleElement:!1};var _=E.renderScrollbars,C=void 0===_||_,P=E.renderSelection,M=void 0===P||P,D=E.renderGrid,z=void 0===D||D,R=E.isExporting,H=E.selectionColor||a.black,W=k.getContext("2d");W.setTransform(1,0,0,1,0,0),W.save(),W.scale(v,v);var F=k.width/v,U=k.height/v;(R&&"dark"===E.theme&&(W.filter=b.ZF),"string"==typeof E.viewBackgroundColor)?(("transparent"===E.viewBackgroundColor||5===E.viewBackgroundColor.length||9===E.viewBackgroundColor.length||/(hsla|rgba)\(/.test(E.viewBackgroundColor))&&W.clearRect(0,0,F,U),W.save(),W.fillStyle=E.viewBackgroundColor,W.fillRect(0,0,F,U),W.restore()):W.clearRect(0,0,F,U);W.save(),W.scale(E.zoom.value,E.zoom.value),z&&h.gridSize&&function(e,t,n,r,o,i){e.save(),e.strokeStyle="rgba(0,0,0,0.1)",e.beginPath();for(var a=n;a<n+o+2*t;a+=t)e.moveTo(a,r-t),e.lineTo(a,r+i+2*t);for(var l=r;l<r+i+2*t;l+=t)e.moveTo(n-t,l),e.lineTo(n+o+2*t,l);e.stroke(),e.restore()}(W,h.gridSize,-Math.ceil(E.zoom.value/h.gridSize)*h.gridSize+E.scrollX%h.gridSize,-Math.ceil(E.zoom.value/h.gridSize)*h.gridSize+E.scrollY%h.gridSize,F/E.zoom.value,U/E.zoom.value);var K=n.filter((function(e){return B(e,F,U,{zoom:E.zoom,offsetLeft:h.offsetLeft,offsetTop:h.offsetTop,scrollX:E.scrollX,scrollY:E.scrollY})})),Y=void 0;if(K.forEach((function(e){try{var t;(0,u.lw)(e,y,W,E,h),(null===(t=h.editingLinearElement)||void 0===t?void 0:t.elementId)===e.id&&e&&(Y=e),R||N(e,W,h)}catch(e){console.error(e)}})),Y&&I(W,h,E,Y),h.selectionElement)try{(0,u.lw)(h.selectionElement,y,W,E,h)}catch(e){console.error(e)}(0,m.N1)(h)&&h.suggestedBindings.filter((function(e){return null!=e})).forEach((function(e){Z(W,E,e)}));var V,G=(0,s.eD)(n,h);if(1===G.length&&(null===(t=h.editingLinearElement)||void 0===t?void 0:t.elementId)===G[0].id&&I(W,h,E,G[0]),h.selectedLinearElement&&h.selectedLinearElement.hoverPointIndex>=0&&function(e,t,n){var r,o,i=t.selectedLinearElement,a=i.elementId,l=i.hoverPointIndex;if(null===(r=t.editingLinearElement)||void 0===r||null===(o=r.selectedPointsIndices)||void 0===o||!o.includes(l)){var c=f._.getElement(a);if(c){var s=f._.getPointAtIndexGlobalCoordinates(c,l);e.save(),e.translate(n.scrollX,n.scrollY),T(s,e,n),e.restore()}}}(W,h,E),M&&!h.multiElement&&!h.editingLinearElement){var X,q=(0,g.oY)(G,h),J=G.map((function(e){return e.id}));if(1===G.length&&(0,x.bt)(G[0])&&(null===(X=h.selectedLinearElement)||void 0===X?void 0:X.elementId)===G[0].id&&!G[0].locked&&I(W,h,E,G[0]),q){var $,Q=n.reduce((function(e,t){var n=[];if(J.includes(t.id)&&!(0,p.zq)(h,t)&&n.push(H),E.remoteSelectedElementIds[t.id]&&n.push.apply(n,(0,i.Z)(E.remoteSelectedElementIds[t.id].map((function(e){return(0,d.X)(e,h).background})))),n.length){var r=(0,l.qf)(t,!0),a=(0,o.Z)(r,6),c=a[0],s=a[1],u=a[2],f=a[3],m=a[4],g=a[5];e.push({angle:t.angle,elementX1:c,elementY1:s,elementX2:u,elementY2:f,selectionColors:n,dashed:!!E.remoteSelectedElementIds[t.id],cx:m,cy:g})}return e}),[]),ee=function(e){var t=(0,p.Fb)(n,e),r=(0,l.KP)(t),i=(0,o.Z)(r,4),c=i[0],s=i[1],u=i[2],d=i[3];Q.push({angle:0,elementX1:c,elementX2:u,elementY1:s,elementY2:d,selectionColors:[a.black],dashed:!0,cx:c+(u-c)/2,cy:s+(d-s)/2})},te=w((0,p.iJ)(h));try{for(te.s();!($=te.n()).done;){ee($.value)}}catch(e){te.e(e)}finally{te.f()}h.editingGroupId&&ee(h.editingGroupId),Q.forEach((function(e){return L(W,E,e)}))}if(W.save(),W.translate(E.scrollX,E.scrollY),1===G.length){W.fillStyle=a.white;var ne=(0,l.PC)(G[0],E.zoom,"mouse");!h.viewModeEnabled&&q&&A(W,E,ne,G[0].angle)}else if(G.length>1&&!h.isRotating){var re=2*S/E.zoom.value;W.fillStyle=a.white;var oe=(0,l.KP)(G),ie=(0,o.Z)(oe,4),ae=ie[0],le=ie[1],ce=ie[2],se=ie[3],ue=W.getLineDash();W.setLineDash([2/E.zoom.value]);var de=W.lineWidth;W.lineWidth=1/E.zoom.value,W.strokeStyle=H,O(W,ae-re,le-re,ce-ae+2*re,se-le+2*re,(ae+ce)/2,(le+se)/2,0),W.lineWidth=de,W.setLineDash(ue);var fe=(0,l.kK)([ae,le,ce,se,(ae+ce)/2,(le+se)/2],0,E.zoom,"mouse",l.ox);G.some((function(e){return!e.locked}))&&A(W,E,fe,0)}W.restore()}for(var pe in W.restore(),E.remotePointerViewportCoords){var he=E.remotePointerViewportCoords[pe],me=he.x,ge=he.y;me-=h.offsetLeft,ge-=h.offsetTop;var ve=me<0||me>F-9||ge<0||ge>U-14;me=Math.max(me,0),me=Math.min(me,F-9),ge=Math.max(ge,0),ge=Math.min(ge,U-14);var be=(0,d.X)(pe,h),ye=be.background,xe=be.stroke;W.save(),W.strokeStyle=xe,W.fillStyle=ye;var we=E.remotePointerUserStates[pe];(ve||we===r.AWAY)&&(W.globalAlpha=.48),E.remotePointerButton&&"down"===E.remotePointerButton[pe]&&(W.beginPath(),W.arc(me,ge,15,0,2*Math.PI,!1),W.lineWidth=3,W.strokeStyle="#ffffff88",W.stroke(),W.closePath(),W.beginPath(),W.arc(me,ge,15,0,2*Math.PI,!1),W.lineWidth=1,W.strokeStyle=xe,W.stroke(),W.closePath()),W.beginPath(),W.moveTo(me,ge),W.lineTo(me+1,ge+14),W.lineTo(me+4,ge+9),W.lineTo(me+9,ge+10),W.lineTo(me,ge),W.fill(),W.stroke();var ke=E.remotePointerUsernames[pe],Ee="";we===r.AWAY?Ee=j?"⚫️":" (".concat(r.AWAY,")"):we===r.IDLE&&(Ee=j?"💤":" (".concat(r.IDLE,")"));var je="".concat(ke||"").concat(Ee?" ".concat(Ee):"");if(!ve&&je){var Se=me+9,Oe=ge+14,_e=W.measureText(je),Ce=_e.actualBoundingBoxDescent+_e.actualBoundingBoxAscent,Ie=Se-1,Te=Oe-1,Pe=_e.width+8+2,Me=Ce+8+2;W.roundRect?(W.beginPath(),W.roundRect(Ie,Te,Pe,Me,4/E.zoom.value),W.fillStyle=ye,W.fill(),W.fillStyle=xe,W.stroke()):(W.fillStyle=xe,W.fillRect(Ie,Te,Pe,Me),W.fillStyle=ye,W.fillRect(Se,Oe,Pe-2,Me-2)),W.fillStyle=a.white,W.fillText(je,Se+4,Oe+4+_e.actualBoundingBoxAscent)}W.restore(),W.closePath()}return C&&(V=(0,c.tJ)(n,F,U,E),W.save(),W.fillStyle=c.w1,W.strokeStyle="rgba(255,255,255,0.8)",[V.horizontal,V.vertical].forEach((function(e){e&&function(e,t,n,r,o,i){e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+r-i,n),e.quadraticCurveTo(t+r,n,t+r,n+i),e.lineTo(t+r,n+o-i),e.quadraticCurveTo(t+r,n+o,t+r-i,n+o),e.lineTo(t+i,n+o),e.quadraticCurveTo(t,n+o,t,n+o-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath(),e.fill(),e.stroke()}(W,e.x,e.y,e.width,e.height,c.nn/2)})),W.restore()),W.restore(),{atLeastOneVisibleElement:K.length>0,scrollBars:V}},M=(0,v.hR)((function(e){var t,n=P(e);null===(t=e.callback)||void 0===t||t.call(e,n)}),{trailing:!0}),D=function(e,t){var n;if(!t){var r=P(e);return null===(n=e.callback)||void 0===n||n.call(e,r),r}M(e)},A=function(e,t,n,r){Object.keys(n).forEach((function(i){var a=n[i];if(void 0!==a){var l=(0,o.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3];e.save(),e.lineWidth=1/t.zoom.value,t.selectionColor&&(e.strokeStyle=t.selectionColor),"rotation"===i?_(e,c+u/2,s+d/2,u/2):e.roundRect?(e.beginPath(),e.roundRect(c,s,u,d,2/t.zoom.value),e.fill(),e.stroke()):O(e,c,s,u,d,c+u/2,s+d/2,r,!0),e.restore()}}))},L=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2*S,o=n.angle,i=n.elementX1,a=n.elementY1,l=n.elementX2,c=n.elementY2,s=n.selectionColors,u=n.cx,d=n.cy,f=n.dashed,p=l-i,h=c-a,m=r/t.zoom.value,g=8/t.zoom.value,v=4/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=1/t.zoom.value;for(var b=s.length,y=0;y<b;++y)e.strokeStyle=s[y],f&&e.setLineDash([g,v+(g+v)*(b-1)]),e.lineDashOffset=(g+v)*y,O(e,i-m,a-m,p+2*m,h+2*m,u,d,o);e.restore()},Z=function(e,t,n){var r=Array.isArray(n)?R:z;e.save(),e.translate(t.scrollX,t.scrollY),r(e,n),e.restore()},z=function(e,t){var n=(0,l.qf)(t),r=(0,o.Z)(n,4),i=r[0],a=r[1],c=r[2]-i,s=r[3]-a,u=(0,h.fb)(t,c,s);e.strokeStyle="rgba(0,0,0,.05)",e.lineWidth=u-4;var d=2+u/2;switch(t.type){case"rectangle":case"text":case"image":O(e,i-d,a-d,c+2*d,s+2*d,i+c/2,a+s/2,t.angle);break;case"diamond":var f=Math.hypot(c,s);!function(e,t,n,r,o,i){e.save(),e.translate(r,o),e.rotate(i),e.beginPath(),e.moveTo(0,n/2),e.lineTo(t/2,0),e.lineTo(0,-n/2),e.lineTo(-t/2,0),e.closePath(),e.stroke(),e.restore()}(e,c+2*(d*f/s),s+2*(d*f/c),i+c/2,a+s/2,t.angle);break;case"ellipse":!function(e,t,n,r,o,i){e.beginPath(),e.ellipse(r,o,t/2,n/2,i,0,2*Math.PI),e.stroke()}(e,c+2*d,s+2*d,i+c/2,a+s/2,t.angle)}},R=function(e,t){var n=(0,o.Z)(t,3),r=n[0],i=n[1],a=n[2],l=(0,h.fb)(a,a.width,a.height);e.strokeStyle="rgba(0,0,0,0)",e.fillStyle="rgba(0,0,0,.05)",("both"===i?[0,-1]:"start"===i?[0]:[-1]).forEach((function(t){var n=f._.getPointAtIndexGlobalCoordinates(r,t),i=(0,o.Z)(n,2),a=i[0],c=i[1];_(e,a,c,l)}))},N=function(e,t,n){if(e.link&&!n.selectedElementIds[e.id]){var r=(0,l.qf)(e),i=(0,o.Z)(r,4),a=i[0],c=i[1],s=i[2],u=i[3],d=(0,y.sw)([a,c,s,u],e.angle,n),f=(0,o.Z)(d,4),p=f[0],h=f[1],m=f[2],g=f[3],v=p+m/2,b=h+g/2;if(t.save(),t.translate(n.scrollX+v,n.scrollY+b),t.rotate(e.angle),E&&E.zoom===n.zoom.value)t.drawImage(E,p-v,h-b,m,g);else{(E=document.createElement("canvas")).zoom=n.zoom.value,E.width=m*window.devicePixelRatio*n.zoom.value,E.height=g*window.devicePixelRatio*n.zoom.value;var x=E.getContext("2d");x.scale(window.devicePixelRatio*n.zoom.value,window.devicePixelRatio*n.zoom.value),x.fillStyle="#fff",x.fillRect(0,0,m,g),x.drawImage(y.rj,0,0,m,g),x.restore(),t.drawImage(E,p-v,h-b,m,g)}t.restore()}},B=function(e,t,n,r){var i=(0,l.Pi)(e),a=(0,o.Z)(i,4),c=a[0],s=a[1],u=a[2],d=a[3],f=(0,v.dE)({clientX:r.offsetLeft,clientY:r.offsetTop},r),p=(0,v.dE)({clientX:r.offsetLeft+t,clientY:r.offsetTop+n},r);return f.x<=u&&f.y<=d&&p.x>=c&&p.y>=s},H=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=o.offsetX,a=void 0===i?0:i,l=o.offsetY,c=void 0===l?0:l,s=o.exportWithDarkMode,d=void 0!==s&&s;n&&e.forEach((function(e,o){if(!e.isDeleted)try{(0,u.Rg)(e,t,n,r,e.x+a,e.y+c,d)}catch(e){console.error(e)}}))}},1564:function(e,t,n){"use strict";var r=n(1930),o=n(8821),i=n(5169),a=n(1047),l=function(e){return"string"==typeof e},c=function(){function e(){(0,o.Z)(this,e),this.callbacks=new Set,this.nonDeletedElements=[],this.elements=[],this.elementsMap=new Map}return(0,i.Z)(e,[{key:"getElementsIncludingDeleted",value:function(){return this.elements}},{key:"getNonDeletedElements",value:function(){return this.nonDeletedElements}},{key:"getElement",value:function(e){return this.elementsMap.get(e)||null}},{key:"getNonDeletedElement",value:function(e){var t=this.getElement(e);return t&&(0,a.qP)(t)?t:null}},{key:"mapElements",value:function(e){var t=!1,n=this.elements.map((function(n){var r=e(n);return r!==n&&(t=!0),r}));return t&&this.replaceAllElements(n),t}},{key:"replaceAllElements",value:function(t){var n=this;this.elements=t,this.elementsMap.clear(),t.forEach((function(t){n.elementsMap.set(t.id,t),e.mapElementToScene(t,n)})),this.nonDeletedElements=(0,a.Lm)(this.elements),this.informMutation()}},{key:"informMutation",value:function(){for(var e=0,t=Array.from(this.callbacks);e<t.length;e++){(0,t[e])()}}},{key:"addCallback",value:function(e){var t=this;if(this.callbacks.has(e))throw new Error;return this.callbacks.add(e),function(){if(!t.callbacks.has(e))throw new Error;t.callbacks.delete(e)}}},{key:"destroy",value:function(){var t=this;e.sceneMapById.forEach((function(n,r){n===t&&e.sceneMapById.delete(r)})),this.callbacks.clear()}},{key:"insertElementAtIndex",value:function(e,t){if(!Number.isFinite(t)||t<0)throw new Error("insertElementAtIndex can only be called with index >= 0");var n=[].concat((0,r.Z)(this.elements.slice(0,t)),[e],(0,r.Z)(this.elements.slice(t)));this.replaceAllElements(n)}},{key:"getElementIndex",value:function(e){return this.elements.findIndex((function(t){return t.id===e}))}}],[{key:"mapElementToScene",value:function(e,t){l(e)?this.sceneMapById.set(e,t):(this.sceneMapByElement.set(e,t),this.sceneMapById.set(e.id,t))}},{key:"getScene",value:function(e){return l(e)?this.sceneMapById.get(e)||null:this.sceneMapByElement.get(e)||null}}]),e}();c.sceneMapByElement=new WeakMap,c.sceneMapById=new Map,t.Z=c},8120:function(e,t,n){"use strict";n.d(t,{$b:function(){return r},CJ:function(){return d},M9:function(){return a},PD:function(){return o},QG:function(){return u},Un:function(){return s},Zd:function(){return i},bZ:function(){return c},sh:function(){return l}});var r=function(e){return"rectangle"===e||"ellipse"===e||"diamond"===e||"line"===e||"freedraw"===e},o=function(e){return"image"!==e},i=function(e){return"rectangle"===e||"ellipse"===e||"diamond"===e||"freedraw"===e||"arrow"===e||"line"===e},a=function(e){return"rectangle"===e||"ellipse"===e||"diamond"===e||"arrow"===e||"line"===e},l=function(e){return"rectangle"===e||"arrow"===e||"line"===e||"diamond"===e},c=function(e){return"text"===e},s=function(e){return"arrow"===e},u=function(e,t){for(var n=null,r=e.length-1;r>=0;--r){var o=e[r];if(!o.isDeleted&&t(o)){n=o;break}}return n},d=function(e,t){return e.filter((function(e){return!e.isDeleted&&t(e)}))}},4162:function(e,t,n){"use strict";n.d(t,{$D:function(){return v},Cg:function(){return y},NL:function(){return g},oj:function(){return m}});var r=n(2577),o=n(8950),i=n(2975),a=n.n(i),l=n(8234),c=n(8925),s=n(3547),u=n(6340),d=n(2335),f=n(8897),p=n(5523),h=n(5637),m="\x3c!-- svg-source:excalidraw --\x3e",g=function(){var e=(0,o.Z)(a().mark((function e(t,n,o,i){var c,u,p,m,g,v,y,x,w,k,E,j,S,O,_,C,I,T,P=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=i.exportBackground,u=i.exportPadding,p=void 0===u?d.qy:u,m=i.viewBackgroundColor,g=P.length>4&&void 0!==P[4]?P[4]:function(e,t){var r=document.createElement("canvas");return r.width=e*n.exportScale,r.height=t*n.exportScale,{canvas:r,scale:n.exportScale}},v=b(t,p),y=(0,r.Z)(v,4),x=y[0],w=y[1],k=y[2],E=y[3],j=g(k,E),S=j.canvas,O=j.scale,_=void 0===O?1:O,C=(0,f.im)(),e.next=7,(0,h.Xx)({imageCache:new Map,fileIds:(0,h.oA)(t).map((function(e){return e.fileId})),files:o});case 7:return I=e.sent,T=I.imageCache,(0,s.Eu)({elements:t,appState:n,scale:_,rc:l.Z.canvas(S),canvas:S,renderConfig:{viewBackgroundColor:c?m:null,scrollX:-x+p,scrollY:-w+p,zoom:C.zoom,remotePointerViewportCoords:{},remoteSelectedElementIds:{},shouldCacheIgnoreZoom:!1,remotePointerUsernames:{},remotePointerUserStates:{},theme:n.exportWithDarkMode?"dark":"light",imageCache:T,renderScrollbars:!1,renderSelection:!1,renderGrid:!1,isExporting:!0}}),e.abrupt("return",S);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),v=function(){var e=(0,o.Z)(a().mark((function e(t,o,i,c){var u,f,h,g,v,y,x,w,k,E,j,S,O,_,C,I,T,P,M;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=o.exportPadding,f=void 0===u?d.qy:u,h=o.viewBackgroundColor,g=o.exportScale,v=void 0===g?1:g,y=o.exportEmbedScene,x="",!y){e.next=14;break}return e.prev=3,e.next=6,Promise.resolve().then(n.bind(n,673));case 6:return e.next=8,e.sent.encodeSvgMetadata({text:null!=c&&c.serializeAsJSON?null==c||null===(w=c.serializeAsJSON)||void 0===w?void 0:w.call(c):(0,p.I_)(t,o,i||{},"local")});case 8:x=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),console.error(e.t0);case 14:return k=b(t,f),E=(0,r.Z)(k,4),j=E[0],S=E[1],O=E[2],_=E[3],(C=document.createElementNS(d.hR,"svg")).setAttribute("version","1.1"),C.setAttribute("xmlns",d.hR),C.setAttribute("viewBox","0 0 ".concat(O," ").concat(_)),C.setAttribute("width","".concat(O*v)),C.setAttribute("height","".concat(_*v)),o.exportWithDarkMode&&C.setAttribute("filter",d.ZF),I="https://excalidraw.com/",I=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.15.2-6546-81bee8a"),null!==(T=I)&&void 0!==T&&T.startsWith("/")&&(I=I.replace("/","".concat(window.location.origin,"/"))),I="".concat(I,"/dist/excalidraw-assets/"),C.innerHTML="\n ".concat(m,"\n ").concat(x,'\n <defs>\n <style class="style-fonts">\n @font-face {\n font-family: "Virgil";\n src: url("').concat(I,'Virgil.woff2");\n }\n @font-face {\n font-family: "Cascadia";\n src: url("').concat(I,'Cascadia.woff2");\n }\n </style>\n </defs>\n '),o.exportBackground&&h&&((P=C.ownerDocument.createElementNS(d.hR,"rect")).setAttribute("x","0"),P.setAttribute("y","0"),P.setAttribute("width","".concat(O)),P.setAttribute("height","".concat(_)),P.setAttribute("fill",h),C.appendChild(P)),M=l.Z.svg(C),(0,s.M_)(t,M,C,i||{},{offsetX:-j+f,offsetY:-S+f,exportWithDarkMode:o.exportWithDarkMode}),e.abrupt("return",C);case 29:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,n,r,o){return e.apply(this,arguments)}}(),b=function(e,t){var n=(0,c.KP)(e),o=(0,r.Z)(n,4),i=o[0],a=o[1],l=o[2],s=o[3];return[i,a,(0,u.TE)(i,l)+2*t,(0,u.TE)(a,s)+t+t]},y=function(e,t,n){var o=b(e,t).map((function(e){return Math.trunc(e*n)})),i=(0,r.Z)(o,4);return[i[2],i[3]]}},75:function(e,t,n){"use strict";n.d(t,{$b:function(){return a.$b},CJ:function(){return a.CJ},M9:function(){return a.M9},N:function(){return o.N},PR:function(){return o.PR},QG:function(){return a.QG},Un:function(){return a.Un},W:function(){return i.W},Yp:function(){return o.Yp},Zd:function(){return a.Zd},Zs:function(){return o.Zs},_4:function(){return r._4},bZ:function(){return a.bZ},eD:function(){return o.eD},j:function(){return l.j},sh:function(){return a.sh}});var r=n(756),o=n(1868),i=n(2264),a=n(8120),l=n(746)},2264:function(e,t,n){"use strict";n.d(t,{W:function(){return l},s:function(){return a}});var r=n(2577),o=n(1047),i=n(6340),a=function(e){var t=e.scenePoint,n=e.viewportDimensions,r=e.zoom;return{scrollX:n.width/2/r.value-t.x,scrollY:n.height/2/r.value-t.y}},l=function(e,t,n){if(!(e=(0,o.n_)(e)).length)return{scrollX:0,scrollY:0};var l=(0,o.KP)(e),c=(0,r.Z)(l,4),s=c[0],u=c[1],d=c[2],f=c[3];if(function(e,t,n){var o=(0,r.Z)(n,4),a=o[0],l=o[1],c=o[2],s=o[3],u=(0,i._i)({sceneX:a,sceneY:l},e),d=u.x,f=u.y,p=(0,i._i)({sceneX:c,sceneY:s},e),h=p.x,m=p.y;return h-d>e.width||m-f>e.height}(t,0,[s,u,d,f])){var p=(0,o.os)(e,(0,i.dE)({clientX:t.scrollX,clientY:t.scrollY},t)),h=(0,r.Z)(p,4);s=h[0],u=h[1],d=h[2],f=h[3]}return a({scenePoint:{x:(s+d)/2,y:(u+f)/2},viewportDimensions:{width:t.width,height:t.height},zoom:t.zoom})}},756:function(e,t,n){"use strict";n.d(t,{WM:function(){return l},_4:function(){return d},nn:function(){return c},tJ:function(){return u},w1:function(){return s}});var r=n(2577),o=n(1047),i=n(6340),a=n(8211),l=4,c=6,s="rgba(0,0,0,0.3)",u=function(e,t,n,s){var u=s.scrollX,d=s.scrollY,f=s.zoom;if(0===e.length)return{horizontal:null,vertical:null};var p=(0,o.KP)(e),h=(0,r.Z)(p,4),m=h[0],g=h[1],v=h[2],b=h[3],y=t/f.value,x=n/f.value,w=t-y,k=n-x,E={top:parseInt((0,i.IH)("sat")),bottom:parseInt((0,i.IH)("sab")),left:parseInt((0,i.IH)("sal")),right:parseInt((0,i.IH)("sar"))},j=(0,a.G3)().rtl,S=w/2-u+E.left,O=k/2-d+E.top,_=S+y-E.right,C=O+x-E.bottom,I=Math.min(m,S),T=Math.min(g,O),P=Math.max(v,_),M=Math.max(b,C);return{horizontal:S===I&&_===P?null:{x:Math.max(E.left,l)+(S-I)/(P-I)*t,y:n-c-Math.max(l,E.bottom),width:(_-S)/(P-I)*t-Math.max(2*l,E.left+E.right),height:c},vertical:O===T&&C===M?null:{x:j?Math.max(E.left,l):t-c-Math.max(E.right,l),y:(O-T)/(M-T)*n+Math.max(E.top,l),width:c,height:(C-O)/(M-T)*n-Math.max(2*l,E.top+E.bottom)}}},d=function(e,t,n){var o=[e.horizontal,e.vertical].map((function(e){return null!=e&&e.x<=t&&t<=e.x+e.width&&e.y<=n&&n<=e.y+e.height})),i=(0,r.Z)(o,2),a=i[0],l=i[1];return{isOverEither:a||l,isOverHorizontal:a,isOverVertical:l}}},1868:function(e,t,n){"use strict";n.d(t,{N:function(){return l},PR:function(){return c},Yp:function(){return a},Zs:function(){return u},eD:function(){return s}});var r=n(2577),o=n(1047),i=n(1974),a=function(e,t){var n=(0,o.qf)(t),a=(0,r.Z)(n,4),l=a[0],c=a[1],s=a[2],u=a[3];return e.filter((function(e){var t=(0,o.Pi)(e),n=(0,r.Z)(t,4),a=n[0],d=n[1],f=n[2],p=n[3];return!1===e.locked&&"selection"!==e.type&&!(0,i.Xh)(e)&&l<=a&&c<=d&&s>=f&&u>=p}))},l=function(e,t){return e.some((function(e){return t.selectedElementIds[e.id]}))},c=function(e,t,n){var r=Array.from(new Set(s(e,t).map((function(e){return n(e)}))));return 1===r.length?r[0]:null},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.filter((function(e){return t.selectedElementIds[e.id]||n&&(0,i.Xh)(e)&&t.selectedElementIds[null==e?void 0:e.containerId]?e:null}))},u=function(e,t){return t.editingElement?[t.editingElement]:s(e,t,!0)}},746:function(e,t,n){"use strict";n.d(t,{E:function(){return i},j:function(){return o}});var r=n(2335),o=function(e){return Math.max(r.Zj,Math.min(e,30))},i=function(e,t){var n=e.viewportX,r=e.viewportY,o=e.nextZoom,i=n-t.offsetLeft,a=r-t.offsetTop,l=t.zoom.value;return{scrollX:t.scrollX+(i-i/l)+-(i-i/o),scrollY:t.scrollY+(a-a/l)+-(a-a/o),zoom:{value:o}}}},6340:function(e,t,n){"use strict";n.d(t,{$9:function(){return J},$g:function(){return x},$h:function(){return ce},AK:function(){return U},B4:function(){return _},C3:function(){return ne},Ds:function(){return k},FG:function(){return K},Fc:function(){return m},G3:function(){return te},I4:function(){return oe},IH:function(){return H},Ip:function(){return Q},KJ:function(){return M},Mj:function(){return fe},OF:function(){return D},Om:function(){return T},Oo:function(){return g},PI:function(){return X},Pr:function(){return z},Q5:function(){return $},Qm:function(){return G},TE:function(){return I},Uk:function(){return A},_Z:function(){return b},_i:function(){return B},ag:function(){return ae},cx:function(){return Y},dE:function(){return N},dZ:function(){return F},h2:function(){return ie},hR:function(){return E},mO:function(){return w},qr:function(){return V},qz:function(){return ee},rB:function(){return L},s:function(){return y},tH:function(){return q},uY:function(){return R},v4:function(){return le},w8:function(){return de},wO:function(){return v},wo:function(){return Z},xn:function(){return re},xp:function(){return ue},y8:function(){return se},yo:function(){return C},z8:function(){return P}});var r=n(6655),o=n(7169),i=n(1930),a=n(2577),l=n(5284),c=n(56),s=n(2335),u=n(5156),d=n(8897);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=null,m=function(){if(h)return h;var e=new Date,t=e.getFullYear(),n="".concat(e.getMonth()+1).padStart(2,"0"),r="".concat(e.getDate()).padStart(2,"0"),o="".concat(e.getHours()).padStart(2,"0"),i="".concat(e.getMinutes()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(r,"-").concat(o).concat(i)},g=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},v=function(e){return e instanceof HTMLElement&&e.className.includes("ToolIcon")},b=function(e){return e instanceof HTMLElement&&"wysiwyg"===e.dataset.type||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement},y=function(e){return e instanceof HTMLElement&&"wysiwyg"===e.dataset.type||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&("text"===e.type||"number"===e.type)},x=function(e){for(var t=e.fontFamily,n=0,r=Object.entries(s.ut);n<r.length;n++){var o=(0,a.Z)(r[n],2),i=o[0];if(o[1]===t)return"".concat(i,", ").concat(s._D)}return s._D},w=function(e){var t=e.fontSize,n=e.fontFamily;return"".concat(t,"px ").concat(x({fontFamily:n}))},k=function(e,t){var n=0,r=null,o=function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r=i,clearTimeout(n),n=window.setTimeout((function(){r=null,e.apply(void 0,i)}),t)};return o.flush=function(){if(clearTimeout(n),r){var t=r;r=null,e.apply(void 0,(0,i.Z)(t))}},o.cancel=function(){r=null,clearTimeout(n)},o},E=function(e,t){var n=null,r=null,o=null,a=function t(a){n=window.requestAnimationFrame((function(){n=null,e.apply(void 0,(0,i.Z)(a)),r=null,o&&(r=o,o=null,t(r))}))},l=function(){for(var e=arguments.length,i=new Array(e),l=0;l<e;l++)i[l]=arguments[l];r=i,null===n?a(r):null!=t&&t.trailing&&(o=i)};return l.flush=function(){null!==n&&(cancelAnimationFrame(n),n=null),r&&(e.apply(void 0,(0,i.Z)(o||r)),r=o=null)},l.cancel=function(){r=o=null,null!==n&&(cancelAnimationFrame(n),n=null)},l};function j(e){return 1-Math.pow(1-e,4)}var S,O,_=function(e,t,n,r){var o,a=!1,l=0,c=(null==r?void 0:r.duration)||250,s=(null==r?void 0:r.easeFn)||j;return l=window.requestAnimationFrame((function r(u){if(!a){void 0===o&&(o=u);var d=u-o;if(d<c){var f=s(d/c),p=e.map((function(e,n){return(t[n]-e)*f+e}));n.apply(void 0,(0,i.Z)(p)),l=window.requestAnimationFrame(r)}else n.apply(void 0,(0,i.Z)(t))}})),function(){a=!0,window.cancelAnimationFrame(l)}},C=function(e,t){if(!e.length||t<1)return[];for(var n=0,r=0,o=Array(Math.ceil(e.length/t));n<e.length;)o[r++]=e.slice(n,n+=t);return o},I=function(e,t){return Math.abs(e-t)},T=function(e,t){return"custom"===t.type?p(p({},e.activeTool),{},{type:"custom",customType:t.customType}):p(p({},e.activeTool),{},{lastActiveTool:void 0===t.lastActiveToolBeforeEraser?e.activeTool.lastActiveTool:t.lastActiveToolBeforeEraser,type:t.type,customType:null})},P=function(e){e&&(e.style.cursor="")},M=function(e,t){e&&(e.style.cursor=t)},D=function(e,t){S&&S.theme===t||function(){var e=t===s.C6.DARK;(S=document.createElement("canvas")).theme=t,S.height=20,S.width=20;var n=S.getContext("2d");n.lineWidth=1,n.beginPath(),n.arc(S.width/2,S.height/2,5,0,2*Math.PI),n.fillStyle=e?l.black:l.white,n.fill(),n.strokeStyle=e?l.white:l.black,n.stroke(),O=S.toDataURL(s.LO.svg)}(),M(e,"url(".concat(O,") ").concat(10," ").concat(10,", auto"))},A=function(e,t){e&&("selection"===t.activeTool.type?P(e):(0,d.l$)(t)?e.style.cursor=s.oc.GRAB:(0,d.EN)(t)?D(e,t.theme):["image","custom"].includes(t.activeTool.type)||(e.style.cursor=s.oc.CROSSHAIR))},L=function(){var e;return"HTML"===(null===(e=document.fullscreenElement)||void 0===e?void 0:e.nodeName)},Z=function(){return document.documentElement.requestFullscreen()},z=function(){return document.exitFullscreen()},R=function(e){return e=e.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter"),s.Um?e.replace(/\bCtrlOrCmd\b/gi,"Cmd").replace(/\bAlt\b/i,"Option"):e.replace(/\bCtrlOrCmd\b/gi,"Ctrl")},N=function(e,t){var n=e.clientX,r=e.clientY,o=t.zoom,i=t.offsetLeft,a=t.offsetTop,l=t.scrollX,c=t.scrollY;return{x:(n-i)/o.value-l,y:(r-a)/o.value-c}},B=function(e,t){var n=e.sceneX,r=e.sceneY,o=t.zoom,i=t.offsetLeft,a=t.offsetTop,l=t.scrollX,c=t.scrollY;return{x:(n+l)*o.value+i,y:(r+c)*o.value+a}},H=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},W=new RegExp("^[^".concat("A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿Ⰰ-﬜﷾-﹯﻽-￿","]*[").concat("֑-߿יִ-﷽ﹰ-ﻼ","]")),F=function(e){return W.test(e)},U=function(e){var t=(0,a.Z)(e,2);return{x:t[0],y:t[1]}},K=function(e){if("AbortError"!==(null==e?void 0:e.name))throw e;console.warn(e)},Y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n<0&&(n=e.length+n);for(var r=(n=Math.min(e.length,Math.max(n,0)))-1;++r<e.length;)if(t(e[r],r,e))return r;return-1},V=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-1;n<0&&(n=e.length+n);for(var r=(n=Math.min(e.length-1,Math.max(n,0)))+1;--r>-1;)if(t(e[r],r,e))return r;return-1},G=function(e){var t=5===e.length&&"0"===e.substr(4,1),n=9===e.length&&"00"===e.substr(7,2);return t||n||e===c.Z.elementBackground[0]},X=function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n},q=function(e){return function(t){(0,u.unstable_batchedUpdates)(e,t)}},J=function(e){return E((function(t){(0,u.unstable_batchedUpdates)(e,t)}))},$=function(){var e=document.createElement("canvas").getContext("2d");if(!e)return!1;return e.fillStyle="#f00",e.textBaseline="top",e.font="32px Arial",e.fillText("😀",0,0),0!==e.getImageData(12,12,1,1).data[0]},Q=function(e){for(var t=e.parentElement;t;){if(t===document.body)return document;var n=window.getComputedStyle(t).overflowY;if(t.scrollHeight>t.clientHeight&&("auto"===n||"scroll"===n||"overlay"===n))return t;t=t.parentElement}return document},ee=function(e){for(var t=e.parentElement;t;){if(t.tabIndex>-1)return void t.focus();t=t.parentElement}},te=function(e){return Array.from(e).map((function(e){return"0".concat(e.toString(16)).slice(-2)})).join("")},ne=function(){return ie()?1:Date.now()},re=function(e){return e.reduce((function(e,t){return e.set("string"==typeof t?t:t.id,t),e}),new Map)},oe=function(e){return e.reduce((function(e,t,n){return e.set(t.id,[t,n]),e}),new Map)},ie=function(){return!1},ae=function(e,t){return new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0})},le=function(e,t){var n=!1;for(var o in t){var i=t[o];if(void 0!==i){if(e[o]===i&&("object"!==(0,r.Z)(i)||null===i))continue;n=!0}}return n?p(p({},e),t):e},ce=function(){try{return window.self===window.top?"top":"iframe"}catch(e){return"iframe"}},se=function(e){return!!e&&"object"===(0,r.Z)(e)&&"then"in e&&"catch"in e&&"finally"in e},ue=function(e){var t=null==e?void 0:e.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter((function(e){return e.tabIndex>-1&&!e.disabled})):[]},de=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Object.keys(e),i=Object.keys(t);return o.length===i.length&&o.every((function(o){var i=null==n?void 0:n[o],a=i?i(e[o],t[o]):e[o]===t[o];return!a&&r&&console.info("%cisShallowEqual: ".concat(o," not equal ->"),"color: #8B4000",e[o],t[o]),a}))},fe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.checkForDefaultPrevented,o=void 0===r||r;return function(n){if(null==e||e(n),!o||!n.defaultPrevented)return null==t?void 0:t(n)}}},9669:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg=="},7984:function(e){"use strict";e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},1639:function(e){"use strict";e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path fill="%23ced4da" d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},9729:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-Bold.woff2"},1273:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-Medium.woff2"},8303:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-Regular.woff2"},9577:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-SemiBold.woff2"},3147:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Cascadia.woff2"},3940:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Virgil.woff2"},9787:function(t){"use strict";t.exports=e},5156:function(e){"use strict";e.exports=t},9649:function(e,t,n){var r=n(8114).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",s=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),l=new C(r||[]);return a(i,"_invoke",{value:j(e,n,l)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h={};function m(){}function g(){}function v(){}var b={};d(b,c,(function(){return this}));var y=Object.getPrototypeOf,x=y&&y(y(I([])));x&&x!==n&&i.call(x,c)&&(b=x);var w=v.prototype=m.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,a,l,c){var s=p(e[o],e,a);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==r(d)&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,l,c)}),(function(e){n("throw",e,l,c)})):t.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return n("throw",e,l,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function j(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return T()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=S(a,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=p(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function S(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=p(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function I(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return g.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:g,configurable:!0}),g.displayName=d(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,d(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},k(E.prototype),d(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(f(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(w),d(w,u,"Generator"),d(w,c,(function(){return this})),d(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:I(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},8114:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2975:function(e,t,n){var r=n(9649)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},7017:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},3173:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},8950:function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function l(e){r(a,o,i,l,c,"next",e)}function c(e){r(a,o,i,l,c,"throw",e)}l(void 0)}))}}n.d(t,{Z:function(){return o}})},8821:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},5169:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(3525);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,r.Z)(o.key),o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},7169:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(3525);function o(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},2312:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},2248:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(5901);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},2726:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{Z:function(){return r}})},7245:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(6655),o=n(3173);function i(e,t){if(t&&("object"===(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}},5901:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},2577:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9139);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},1930:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7017);var o=n(9139);function i(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},3525:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(6655);function o(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==(0,r.Z)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},6655:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},9139:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7017);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},5605:function(e,t,n){"use strict";n.d(t,{x0:function(){return r}});let r=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")},5284:function(e){"use strict";e.exports=JSON.parse('{"white":"#ffffff","black":"#000000","gray":["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],"red":["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],"pink":["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],"grape":["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],"violet":["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],"indigo":["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],"blue":["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],"cyan":["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],"teal":["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],"green":["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],"lime":["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],"yellow":["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],"orange":["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]}')},1463:function(e){"use strict";e.exports=JSON.parse('{"labels":{"paste":"Paste","pasteAsPlaintext":"Paste as plaintext","pasteCharts":"Paste charts","selectAll":"Select all","multiSelect":"Add element to selection","moveCanvas":"Move canvas","cut":"Cut","copy":"Copy","copyAsPng":"Copy to clipboard as PNG","copyAsSvg":"Copy to clipboard as SVG","copyText":"Copy to clipboard as text","bringForward":"Bring forward","sendToBack":"Send to back","bringToFront":"Bring to front","sendBackward":"Send backward","delete":"Delete","copyStyles":"Copy styles","pasteStyles":"Paste styles","stroke":"Stroke","background":"Background","fill":"Fill","strokeWidth":"Stroke width","strokeStyle":"Stroke style","strokeStyle_solid":"Solid","strokeStyle_dashed":"Dashed","strokeStyle_dotted":"Dotted","sloppiness":"Sloppiness","opacity":"Opacity","textAlign":"Text align","edges":"Edges","sharp":"Sharp","round":"Round","arrowheads":"Arrowheads","arrowhead_none":"None","arrowhead_arrow":"Arrow","arrowhead_bar":"Bar","arrowhead_dot":"Dot","arrowhead_triangle":"Triangle","fontSize":"Font size","fontFamily":"Font family","onlySelected":"Only selected","withBackground":"Background","exportEmbedScene":"Embed scene","exportEmbedScene_details":"Scene data will be saved into the exported PNG/SVG file so that the scene can be restored from it.\\nWill increase exported file size.","addWatermark":"Add \\"Made with Excalidraw\\"","handDrawn":"Hand-drawn","normal":"Normal","code":"Code","small":"Small","medium":"Medium","large":"Large","veryLarge":"Very large","solid":"Solid","hachure":"Hachure","zigzag":"Zigzag","crossHatch":"Cross-hatch","thin":"Thin","bold":"Bold","left":"Left","center":"Center","right":"Right","extraBold":"Extra bold","architect":"Architect","artist":"Artist","cartoonist":"Cartoonist","fileTitle":"File name","colorPicker":"Color picker","canvasColors":"Used on canvas","canvasBackground":"Canvas background","drawingCanvas":"Drawing canvas","layers":"Layers","actions":"Actions","language":"Language","liveCollaboration":"Live collaboration...","duplicateSelection":"Duplicate","untitled":"Untitled","name":"Name","yourName":"Your name","madeWithExcalidraw":"Made with Excalidraw","group":"Group selection","ungroup":"Ungroup selection","collaborators":"Collaborators","showGrid":"Show grid","addToLibrary":"Add to library","removeFromLibrary":"Remove from library","libraryLoadingMessage":"Loading library…","libraries":"Browse libraries","loadingScene":"Loading scene…","align":"Align","alignTop":"Align top","alignBottom":"Align bottom","alignLeft":"Align left","alignRight":"Align right","centerVertically":"Center vertically","centerHorizontally":"Center horizontally","distributeHorizontally":"Distribute horizontally","distributeVertically":"Distribute vertically","flipHorizontal":"Flip horizontal","flipVertical":"Flip vertical","viewMode":"View mode","toggleExportColorScheme":"Toggle export color scheme","share":"Share","showStroke":"Show stroke color picker","showBackground":"Show background color picker","toggleTheme":"Toggle theme","personalLib":"Personal Library","excalidrawLib":"Excalidraw Library","decreaseFontSize":"Decrease font size","increaseFontSize":"Increase font size","unbindText":"Unbind text","bindText":"Bind text to the container","createContainerFromText":"Wrap text in a container","link":{"edit":"Edit link","create":"Create link","label":"Link"},"lineEditor":{"edit":"Edit line","exit":"Exit line editor"},"elementLock":{"lock":"Lock","unlock":"Unlock","lockAll":"Lock all","unlockAll":"Unlock all"},"statusPublished":"Published","sidebarLock":"Keep sidebar open"},"library":{"noItems":"No items added yet...","hint_emptyLibrary":"Select an item on canvas to add it here, or install a library from the public repository, below.","hint_emptyPrivateLibrary":"Select an item on canvas to add it here."},"buttons":{"clearReset":"Reset the canvas","exportJSON":"Export to file","exportImage":"Export image...","export":"Save to...","exportToPng":"Export to PNG","exportToSvg":"Export to SVG","copyToClipboard":"Copy to clipboard","copyPngToClipboard":"Copy PNG to clipboard","scale":"Scale","save":"Save to current file","saveAs":"Save as","load":"Open","getShareableLink":"Get shareable link","close":"Close","selectLanguage":"Select language","scrollBackToContent":"Scroll back to content","zoomIn":"Zoom in","zoomOut":"Zoom out","resetZoom":"Reset zoom","menu":"Menu","done":"Done","edit":"Edit","undo":"Undo","redo":"Redo","resetLibrary":"Reset library","createNewRoom":"Create new room","fullScreen":"Full screen","darkMode":"Dark mode","lightMode":"Light mode","zenMode":"Zen mode","exitZenMode":"Exit zen mode","cancel":"Cancel","clear":"Clear","remove":"Remove","publishLibrary":"Publish","submit":"Submit","confirm":"Confirm"},"alerts":{"clearReset":"This will clear the whole canvas. Are you sure?","couldNotCreateShareableLink":"Couldn\'t create shareable link.","couldNotCreateShareableLinkTooBig":"Couldn\'t create shareable link: the scene is too big","couldNotLoadInvalidFile":"Couldn\'t load invalid file","importBackendFailed":"Importing from backend failed.","cannotExportEmptyCanvas":"Cannot export empty canvas.","couldNotCopyToClipboard":"Couldn\'t copy to clipboard.","decryptFailed":"Couldn\'t decrypt data.","uploadedSecurly":"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can\'t read the content.","loadSceneOverridePrompt":"Loading external drawing will replace your existing content. Do you wish to continue?","collabStopOverridePrompt":"Stopping the session will overwrite your previous, locally stored drawing. Are you sure?\\n\\n(If you want to keep your local drawing, simply close the browser tab instead.)","errorAddingToLibrary":"Couldn\'t add item to the library","errorRemovingFromLibrary":"Couldn\'t remove item from the library","confirmAddLibrary":"This will add {{numShapes}} shape(s) to your library. Are you sure?","imageDoesNotContainScene":"This image does not seem to contain any scene data. Have you enabled scene embedding during export?","cannotRestoreFromImage":"Scene couldn\'t be restored from this image file","invalidSceneUrl":"Couldn\'t import scene from the supplied URL. It\'s either malformed, or doesn\'t contain valid Excalidraw JSON data.","resetLibrary":"This will clear your library. Are you sure?","removeItemsFromsLibrary":"Delete {{count}} item(s) from library?","invalidEncryptionKey":"Encryption key must be of 22 characters. Live collaboration is disabled.","collabOfflineWarning":"No internet connection available.\\nYour changes will not be saved!"},"errors":{"unsupportedFileType":"Unsupported file type.","imageInsertError":"Couldn\'t insert image. Try again later...","fileTooBig":"File is too big. Maximum allowed size is {{maxSize}}.","svgImageInsertError":"Couldn\'t insert SVG image. The SVG markup looks invalid.","invalidSVGString":"Invalid SVG.","cannotResolveCollabServer":"Couldn\'t connect to the collab server. Please reload the page and try again.","importLibraryError":"Couldn\'t load library","collabSaveFailed":"Couldn\'t save to the backend database. If problems persist, you should save your file locally to ensure you don\'t lose your work.","collabSaveFailed_sizeExceeded":"Couldn\'t save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don\'t lose your work.","brave_measure_text_error":{"line1":"Looks like you are using Brave browser with the <bold>Aggressively Block Fingerprinting</bold> setting enabled.","line2":"This could result in breaking the <bold>Text Elements</bold> in your drawings.","line3":"We strongly recommend disabling this setting. You can follow <link>these steps</link> on how to do so.","line4":"If disabling this setting doesn\'t fix the display of text elements, please open an <issueLink>issue</issueLink> on our GitHub, or write us on <discordLink>Discord</discordLink>"}},"toolBar":{"selection":"Selection","image":"Insert image","rectangle":"Rectangle","diamond":"Diamond","ellipse":"Ellipse","arrow":"Arrow","line":"Line","freedraw":"Draw","text":"Text","library":"Library","lock":"Keep selected tool active after drawing","penMode":"Pen mode - prevent touch","link":"Add/ Update link for a selected shape","eraser":"Eraser","hand":"Hand (panning tool)"},"headings":{"canvasActions":"Canvas actions","selectedShapeActions":"Selected shape actions","shapes":"Shapes"},"hints":{"canvasPanning":"To move canvas, hold mouse wheel or spacebar while dragging, or use the hand tool","linearElement":"Click to start multiple points, drag for single line","freeDraw":"Click and drag, release when you\'re finished","text":"Tip: you can also add text by double-clicking anywhere with the selection tool","text_selected":"Double-click or press ENTER to edit text","text_editing":"Press Escape or CtrlOrCmd+ENTER to finish editing","linearElementMulti":"Click on last point or press Escape or Enter to finish","lockAngle":"You can constrain angle by holding SHIFT","resize":"You can constrain proportions by holding SHIFT while resizing,\\nhold ALT to resize from the center","resizeImage":"You can resize freely by holding SHIFT,\\nhold ALT to resize from the center","rotate":"You can constrain angles by holding SHIFT while rotating","lineEditor_info":"Hold CtrlOrCmd and Double-click or press CtrlOrCmd + Enter to edit points","lineEditor_pointSelected":"Press Delete to remove point(s),\\nCtrlOrCmd+D to duplicate, or drag to move","lineEditor_nothingSelected":"Select a point to edit (hold SHIFT to select multiple),\\nor hold Alt and click to add new points","placeImage":"Click to place the image, or click and drag to set its size manually","publishLibrary":"Publish your own library","bindTextToElement":"Press enter to add text","deepBoxSelect":"Hold CtrlOrCmd to deep select, and to prevent dragging","eraserRevert":"Hold Alt to revert the elements marked for deletion","firefox_clipboard_write":"This feature can likely be enabled by setting the \\"dom.events.asyncClipboard.clipboardItem\\" flag to \\"true\\". To change the browser flags in Firefox, visit the \\"about:config\\" page."},"canvasError":{"cannotShowPreview":"Cannot show preview","canvasTooBig":"The canvas may be too big.","canvasTooBigTip":"Tip: try moving the farthest elements a bit closer together."},"errorSplash":{"headingMain":"Encountered an error. Try <button>reloading the page</button>.","clearCanvasMessage":"If reloading doesn\'t work, try <button>clearing the canvas</button>.","clearCanvasCaveat":" This will result in loss of work ","trackedToSentry":"The error with identifier {{eventId}} was tracked on our system.","openIssueMessage":"We were very cautious not to include your scene information on the error. If your scene is not private, please consider following up on our <button>bug tracker</button>. Please include information below by copying and pasting into the GitHub issue.","sceneContent":"Scene content:"},"roomDialog":{"desc_intro":"You can invite people to your current scene to collaborate with you.","desc_privacy":"Don\'t worry, the session uses end-to-end encryption, so whatever you draw will stay private. Not even our server will be able to see what you come up with.","button_startSession":"Start session","button_stopSession":"Stop session","desc_inProgressIntro":"Live-collaboration session is now in progress.","desc_shareLink":"Share this link with anyone you want to collaborate with:","desc_exitSession":"Stopping the session will disconnect you from the room, but you\'ll be able to continue working with the scene, locally. Note that this won\'t affect other people, and they\'ll still be able to collaborate on their version.","shareTitle":"Join a live collaboration session on Excalidraw"},"errorDialog":{"title":"Error"},"exportDialog":{"disk_title":"Save to disk","disk_details":"Export the scene data to a file from which you can import later.","disk_button":"Save to file","link_title":"Shareable link","link_details":"Export as a read-only link.","link_button":"Export to Link","excalidrawplus_description":"Save the scene to your Excalidraw+ workspace.","excalidrawplus_button":"Export","excalidrawplus_exportError":"Couldn\'t export to Excalidraw+ at this moment..."},"helpDialog":{"blog":"Read our blog","click":"click","deepSelect":"Deep select","deepBoxSelect":"Deep select within box, and prevent dragging","curvedArrow":"Curved arrow","curvedLine":"Curved line","documentation":"Documentation","doubleClick":"double-click","drag":"drag","editor":"Editor","editLineArrowPoints":"Edit line/arrow points","editText":"Edit text / add label","github":"Found an issue? Submit","howto":"Follow our guides","or":"or","preventBinding":"Prevent arrow binding","tools":"Tools","shortcuts":"Keyboard shortcuts","textFinish":"Finish editing (text editor)","textNewLine":"Add new line (text editor)","title":"Help","view":"View","zoomToFit":"Zoom to fit all elements","zoomToSelection":"Zoom to selection","toggleElementLock":"Lock/unlock selection","movePageUpDown":"Move page up/down","movePageLeftRight":"Move page left/right"},"clearCanvasDialog":{"title":"Clear canvas"},"publishDialog":{"title":"Publish library","itemName":"Item name","authorName":"Author name","githubUsername":"GitHub username","twitterUsername":"Twitter username","libraryName":"Library name","libraryDesc":"Library description","website":"Website","placeholder":{"authorName":"Your name or username","libraryName":"Name of your library","libraryDesc":"Description of your library to help people understand its usage","githubHandle":"GitHub handle (optional), so you can edit the library once submitted for review","twitterHandle":"Twitter username (optional), so we know who to credit when promoting over Twitter","website":"Link to your personal website or elsewhere (optional)"},"errors":{"required":"Required","website":"Enter a valid URL"},"noteDescription":"Submit your library to be included in the <link>public library repository</link> for other people to use in their drawings.","noteGuidelines":"The library needs to be manually approved first. Please read the <link>guidelines</link> before submitting. You will need a GitHub account to communicate and make changes if requested, but it is not strictly required.","noteLicense":"By submitting, you agree the library will be published under the <link>MIT License</link>, which in short means anyone can use them without restrictions.","noteItems":"Each library item must have its own name so it\'s filterable. The following library items will be included:","atleastOneLibItem":"Please select at least one library item to get started","republishWarning":"Note: some of the selected items are marked as already published/submitted. You should only resubmit items when updating an existing library or submission."},"publishSuccessDialog":{"title":"Library submitted","content":"Thank you {{authorName}}. Your library has been submitted for review. You can track the status <link>here</link>"},"confirmDialog":{"resetLibrary":"Reset library","removeItemsFromLib":"Remove selected items from library"},"encrypted":{"tooltip":"Your drawings are end-to-end encrypted so Excalidraw\'s servers will never see them.","link":"Blog post on end-to-end encryption in Excalidraw"},"stats":{"angle":"Angle","element":"Element","elements":"Elements","height":"Height","scene":"Scene","selected":"Selected","storage":"Storage","title":"Stats for nerds","total":"Total","version":"Version","versionCopy":"Click to copy","versionNotAvailable":"Version not available","width":"Width"},"toast":{"addedToLibrary":"Added to library","copyStyles":"Copied styles.","copyToClipboard":"Copied to clipboard.","copyToClipboardAsPng":"Copied {{exportSelection}} to clipboard as PNG\\n({{exportColorScheme}})","fileSaved":"File saved.","fileSavedToFilename":"Saved to {filename}","canvas":"canvas","selection":"selection","pasteAsSingleElement":"Use {{shortcut}} to paste as a single element,\\nor paste into an existing text editor"},"colors":{"495057":"Gray 7","ffffff":"White","f8f9fa":"Gray 0","f1f3f5":"Gray 1","fff5f5":"Red 0","fff0f6":"Pink 0","f8f0fc":"Grape 0","f3f0ff":"Violet 0","edf2ff":"Indigo 0","e7f5ff":"Blue 0","e3fafc":"Cyan 0","e6fcf5":"Teal 0","ebfbee":"Green 0","f4fce3":"Lime 0","fff9db":"Yellow 0","fff4e6":"Orange 0","transparent":"Transparent","ced4da":"Gray 4","868e96":"Gray 6","fa5252":"Red 6","e64980":"Pink 6","be4bdb":"Grape 6","7950f2":"Violet 6","4c6ef5":"Indigo 6","228be6":"Blue 6","15aabf":"Cyan 6","12b886":"Teal 6","40c057":"Green 6","82c91e":"Lime 6","fab005":"Yellow 6","fd7e14":"Orange 6","000000":"Black","343a40":"Gray 8","c92a2a":"Red 9","a61e4d":"Pink 9","862e9c":"Grape 9","5f3dc4":"Violet 9","364fc7":"Indigo 9","1864ab":"Blue 9","0b7285":"Cyan 9","087f5b":"Teal 9","2b8a3e":"Green 9","5c940d":"Lime 9","e67700":"Yellow 9","d9480f":"Orange 9"},"welcomeScreen":{"app":{"center_heading":"All your data is saved locally in your browser.","center_heading_plus":"Did you want to go to the Excalidraw+ instead?","menuHint":"Export, preferences, languages, ..."},"defaults":{"menuHint":"Export, preferences, and more...","center_heading":"Diagrams. Made. Simple.","toolbarHint":"Pick a tool & Start drawing!","helpHint":"Shortcuts & help"}}}')},4451:function(e){"use strict";e.exports=JSON.parse('{"ar-SA":90,"bg-BG":53,"bn-BD":59,"ca-ES":98,"cs-CZ":73,"da-DK":32,"de-DE":100,"el-GR":97,"en":100,"es-ES":99,"eu-ES":98,"fa-IR":100,"fi-FI":98,"fr-FR":98,"gl-ES":98,"he-IL":98,"hi-IN":71,"hu-HU":87,"id-ID":97,"it-IT":98,"ja-JP":98,"kaa":20,"kab-KAB":93,"kk-KZ":20,"km-KH":0,"ko-KR":100,"ku-TR":100,"lt-LT":62,"lv-LV":99,"mr-IN":99,"my-MM":40,"nb-NO":100,"nl-NL":91,"nn-NO":87,"oc-FR":96,"pa-IN":81,"pl-PL":88,"pt-BR":98,"pt-PT":99,"ro-RO":100,"ru-RU":100,"si-LK":8,"sk-SK":100,"sl-SI":100,"sv-SE":100,"ta-IN":92,"th-TH":40,"tr-TR":96,"uk-UA":95,"vi-VN":56,"zh-CN":100,"zh-HK":25,"zh-TW":100}')}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={id:e,exports:{}};return a[e](n,n.exports,c),n.exports}c.m=a,c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},r=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},c.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var i={};n=n||[null,r({}),r([]),r(r)];for(var a=2&t&&e;"object"==typeof a&&!~n.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((function(t){i[t]=function(){return e[t]}}));return i.default=function(){return e},c.d(o,i),o},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=function(e){return Promise.all(Object.keys(c.f).reduce((function(t,n){return c.f[n](e,t),t}),[]))},c.u=function(e){return"excalidraw-assets/"+{22:"locales/kk-KZ-json",537:"locales/th-TH-json",663:"locales/kaa-json",1204:"locales/ja-JP-json",1302:"locales/si-LK-json",1477:"locales/my-MM-json",1513:"locales/el-GR-json",1628:"locales/bg-BG-json",1690:"locales/oc-FR-json",1790:"locales/da-DK-json",2091:"locales/ar-SA-json",2312:"locales/he-IL-json",2359:"locales/nb-NO-json",2404:"locales/ta-IN-json",2943:"locales/gl-ES-json",3024:"locales/nl-NL-json",3031:"locales/ku-TR-json",3082:"locales/de-DE-json",3162:"locales/pa-IN-json",3397:"locales/mr-IN-json",3421:"locales/zh-TW-json",3512:"locales/fi-FI-json",3674:"locales/pl-PL-json",3682:"locales/fr-FR-json",3721:"locales/pt-BR-json",3808:"locales/id-ID-json",3885:"locales/nn-NO-json",4e3:"locales/vi-VN-json",4680:"locales/zh-CN-json",4736:"vendor",4977:"locales/tr-TR-json",5089:"locales/ro-RO-json",5130:"locales/ca-ES-json",5330:"locales/fa-IR-json",5395:"locales/pt-PT-json",6071:"locales/sl-SI-json",6239:"locales/it-IT-json",6265:"locales/cs-CZ-json",6566:"locales/km-KH-json",6768:"locales/lv-LV-json",6844:"locales/ko-KR-json",7368:"locales/hu-HU-json",7429:"locales/bn-BD-json",7759:"locales/uk-UA-json",7920:"locales/zh-HK-json",8081:"locales/eu-ES-json",8124:"locales/ru-RU-json",8340:"locales/lt-LT-json",8534:"locales/sv-SE-json",8750:"locales/sk-SK-json",8759:"locales/es-ES-json",9551:"locales/kab-KAB-json",9828:"locales/hi-IN-json"}[e]+"-"+{22:"a8e8bbe5119dd3a53af4",537:"35e29f56952088017288",663:"b8a1931a54affae6ce6f",1204:"00427e1b4759220948e1",1302:"69b88abfac862b65241d",1477:"ae47996f76e07c62f2e2",1513:"b1a0f73643adea39ed31",1628:"a3f29bd627c85a3b0c09",1690:"2a7b244777a29ac4540d",1790:"274791ee26d07767950e",2091:"af9f33573806a2b17db5",2312:"df9689750e6a9e3fc2b9",2359:"ce4166112fa056369a3d",2404:"3ffe4cded65c2f0ae4b6",2943:"2576befc81eaed5aa65e",3024:"8001e673fb3f434f00ba",3031:"24ea9bad0f5c166fcdfa",3082:"725680257d7a1d7db20e",3162:"7a43cceaf71ab41aa772",3397:"c7e95d47af75ea8f507b",3421:"f4a4d2bf76e17e58994d",3512:"7dcc36b84a5d99012192",3674:"093569bfd3a5afeda0a3",3682:"9d97947d53501a0a341e",3721:"b2e52cb153719f9fcc21",3808:"2a2270978704bae8b567",3885:"4fe3b63e7c0949e035a1",4e3:"d4b137a881014828d846",4680:"006110a878ce56805814",4736:"53d1c69ef585b6dd219b",4977:"18de81acaa52d2e0f6c6",5089:"1cd4bc568653407afe44",5130:"7ba6318a6ce18b150755",5330:"e00ed81abe02d242bdb3",5395:"37f6807c2e30c2c04e0a",6071:"571553f7ef1f32c44b9e",6239:"45824e053eb867323aaa",6265:"5d11ff0ce2122c3bbf9d",6566:"51759d5379a45b355944",6768:"4aa8653ffc57472135d1",6844:"81f8d97ebb8f67b66cbb",7368:"484077f149c645102803",7429:"3f24d6535bb251542bb5",7759:"ddb1a218e27b6516f707",7920:"1fb52905cf97d0b1c945",8081:"7d9398c86be603c5b8bd",8124:"6f16105f9e3a666bcca9",8340:"c97807dbd05b378d19a8",8534:"29f8fd0f6fe182274d55",8750:"c53b73a632863f5f447f",8759:"3ca4ab2ad942b5cf8d9a",9551:"d3b57bc235e6986200cb",9828:"15b2d720e1b2b20158cb"}[e]+".js"},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o={},i="ExcalidrawLib:",c.l=function(e,t,n,r){if(o[e])o[e].push(t);else{var a,l;if(void 0!==n)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var d=s[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==i+n){a=d;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",i+n),a.src=e),o[e]=[t];var f=function(t,n){a.onerror=a.onload=null,clearTimeout(p);var r=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((function(e){return e(n)})),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),l&&document.head.appendChild(a)}},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="",function(){c.b=document.baseURI||self.location.href;var e={1388:0};c.f.j=function(t,n){var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var i=c.p+c.u(t),a=new Error;c.l(i,(function(n){if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=function(t,n){var r,o,i=n[0],a=n[1],l=n[2],s=0;if(i.some((function(t){return 0!==e[t]}))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(l)l(c)}for(t&&t(n);s<i.length;s++)o=i[s],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),c.nc=void 0;var s={};return function(){"use strict";c.r(s),c.d(s,{Button:function(){return xe.z},DefaultSidebar:function(){return Le.O},Excalidraw:function(){return Fe},FONT_FAMILY:function(){return e.ut},Footer:function(){return Y},LiveCollaborationTrigger:function(){return _e},MIME_TYPES:function(){return e.LO},MainMenu:function(){return V.Z},Sidebar:function(){return Ae.YE},THEME:function(){return e.C6},WelcomeScreen:function(){return ye},bumpVersion:function(){return Me.ZP},defaultLang:function(){return I.Fp},exportToBlob:function(){return Te.Fl},exportToCanvas:function(){return Te.NL},exportToClipboard:function(){return Te.i1},exportToSvg:function(){return Te.$D},getFreeDrawSvgPath:function(){return Te.N7},getNonDeletedElements:function(){return Ce.Lm},getSceneVersion:function(){return Ce.Uo},isInvisiblySmallElement:function(){return Ce.QD},isLinearElement:function(){return Pe.bt},languages:function(){return I.Mj},loadFromBlob:function(){return Te.cT},loadLibraryFromBlob:function(){return Te.lV},loadSceneOrLibraryFromBlob:function(){return Te.ZY},mergeLibraryItems:function(){return Te.zh},mutateElement:function(){return Me.DR},newElementWith:function(){return Me.BE},parseLibraryTokensFromUrl:function(){return De.Di},restore:function(){return Ie.nu},restoreAppState:function(){return Ie.lY},restoreElements:function(){return Ie.ET},restoreLibraryItems:function(){return Ie.wJ},sceneCoordsToViewportCoords:function(){return D._i},serializeAsJSON:function(){return Te.I_},serializeLibraryAsJSON:function(){return Te.NI},useDevice:function(){return M.Fy},useHandleLibrary:function(){return De.xS},useI18n:function(){return I.QT},viewportCoordsToSceneCoords:function(){return D.dE}});var e=c(2335);"production"!==e.Vi.TEST&&(c.p=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.15.2-6546-81bee8a","/dist/"));var t=function(){Array.prototype.at||Object.defineProperty(Array.prototype,"at",{value:function(e){if((e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this[e]},writable:!0,enumerable:!1,configurable:!0})},n=c(487),r=c.n(n),o=c(631),i=c.n(o),a=c(2052),l=c.n(a),u=c(4010),d=c.n(u),f=c(1469),p=c.n(f),h=c(9329),m=c.n(h),g=c(4295),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=l().bind(null,"head"),v.domAPI=i(),v.insertStyleElement=p();r()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=c(6479),y=c.n(b),x=c(9713),w=c.n(x),k=c(9787),E=c.n(k),j=c(8950),S=c(2577),O=c(2975),_=c.n(O),C=c(5440),I=c(8211),T=c(4512),P=function(e){var t=(0,k.useState)(!0),n=(0,S.Z)(t,2),r=n[0],o=n[1];return(0,k.useEffect)((function(){var t=function(){var e=(0,j.Z)(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.m0)(n);case 2:o(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n=I.Mj.find((function(t){return t.code===e.langCode}))||I.Fp;t()}),[e.langCode]),r?(0,T.jsx)(C.z,{theme:e.theme}):e.children},M=c(6936),D=c(6340),A=c(9915),L={};L.styleTagTransform=m(),L.setAttributes=d(),L.insert=l().bind(null,"head"),L.domAPI=i(),L.insertStyleElement=p();r()(A.Z,L),A.Z&&A.Z.locals&&A.Z.locals;var Z=c(9310),z={};z.styleTagTransform=m(),z.setAttributes=d(),z.insert=l().bind(null,"head"),z.domAPI=i(),z.insertStyleElement=p();r()(Z.Z,z),Z.Z&&Z.Z.locals&&Z.Z.locals;var R=c(4739),N=c(9487),B=c(45),H=c(7681),W=c(8793),F={};F.styleTagTransform=m(),F.setAttributes=d(),F.insert=l().bind(null,"head"),F.domAPI=i(),F.insertStyleElement=p();r()(W.Z,F),W.Z&&W.Z.locals&&W.Z.locals;var U=c(96),K=function(e){var t=e.children,n=(0,H.R6)().FooterCenterTunnel,r=(0,U.I)();return(0,T.jsx)(n.In,{children:(0,T.jsx)("div",{className:(0,B.Z)("footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":r.zenModeEnabled}),children:t})})},Y=K;K.displayName="FooterCenter";var V=c(6756),G=c(7169),X=c(2726),q=c(6710),J=c(785),$=c(3646),Q=["onSelect","children","icon","shortcut","className"],ee=["children","href","icon","shortcut","className"];function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){(0,G.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=function(e){var t=e.icon,n=e.shortcut,r=e.children,o=(0,M.Fy)();return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{className:"welcome-screen-menu-item__icon",children:t}),(0,T.jsx)("div",{className:"welcome-screen-menu-item__text",children:r}),n&&!o.isMobile&&(0,T.jsx)("div",{className:"welcome-screen-menu-item__shortcut",children:n})]})};re.displayName="WelcomeScreenMenuItemContent";var oe=function(e){var t=e.onSelect,n=e.children,r=e.icon,o=e.shortcut,i=e.className,a=void 0===i?"":i,l=(0,X.Z)(e,Q);return(0,T.jsx)("button",ne(ne({},l),{},{type:"button",className:"welcome-screen-menu-item ".concat(a),onClick:t,children:(0,T.jsx)(re,{icon:r,shortcut:o,children:n})}))};oe.displayName="WelcomeScreenMenuItem";var ie=function(e){var t=e.children,n=e.href,r=e.icon,o=e.shortcut,i=e.className,a=void 0===i?"":i,l=(0,X.Z)(e,ee);return(0,T.jsx)("a",ne(ne({},l),{},{className:"welcome-screen-menu-item ".concat(a),href:n,target:"_blank",rel:"noreferrer",children:(0,T.jsx)(re,{icon:r,shortcut:o,children:t})}))};ie.displayName="WelcomeScreenMenuItemLink";var ae=function(e){var t=e.children,n=(0,H.R6)().WelcomeScreenCenterTunnel;return(0,T.jsx)(n.In,{children:(0,T.jsx)("div",{className:"welcome-screen-center",children:t||(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(le,{}),(0,T.jsx)(ce,{children:(0,I.t)("welcomeScreen.defaults.center_heading")}),(0,T.jsxs)(se,{children:[(0,T.jsx)(de,{}),(0,T.jsx)(ue,{})]})]})})})};ae.displayName="Center";var le=function(e){var t=e.children;return(0,T.jsx)("div",{className:"welcome-screen-center__logo virgil welcome-screen-decor",children:t||(0,T.jsxs)(T.Fragment,{children:[$.Mw," Excalidraw"]})})};le.displayName="Logo";var ce=function(e){var t=e.children;return(0,T.jsx)("div",{className:"welcome-screen-center__heading welcome-screen-decor virgil",children:t})};ce.displayName="Heading";var se=function(e){var t=e.children;return(0,T.jsx)("div",{className:"welcome-screen-menu",children:t})};se.displayName="Menu";var ue=function(){var e=(0,M.eh)();return(0,T.jsx)(oe,{onSelect:function(){return e.executeAction(q.jY)},shortcut:"?",icon:$.by,children:(0,I.t)("helpDialog.title")})};ue.displayName="MenuItemHelp";var de=function(){var e=(0,U.I)(),t=(0,M.eh)();return e.viewModeEnabled?null:(0,T.jsx)(oe,{onSelect:function(){return t.executeAction(q._d)},shortcut:(0,J.C)("loadScene"),icon:$.Tl,children:(0,I.t)("buttons.load")})};de.displayName="MenuItemLoadScene";var fe=function(e){var t=e.onSelect,n=(0,I.QT)().t;return(0,T.jsx)(oe,{shortcut:null,onSelect:t,icon:$.jn,children:n("labels.liveCollaboration")})};fe.displayName="MenuItemLiveCollaborationTrigger",ae.Logo=le,ae.Heading=ce,ae.Menu=se,ae.MenuItem=oe,ae.MenuItemLink=ie,ae.MenuItemHelp=ue,ae.MenuItemLoadScene=de,ae.MenuItemLiveCollaborationTrigger=fe;var pe=function(e){var t=e.children,n=(0,H.R6)().WelcomeScreenMenuHintTunnel;return(0,T.jsx)(n.In,{children:(0,T.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu",children:[$.oQ,(0,T.jsx)("div",{className:"welcome-screen-decor-hint__label",children:t||(0,I.t)("welcomeScreen.defaults.menuHint")})]})})};pe.displayName="MenuHint";var he=function(e){var t=e.children,n=(0,H.R6)().WelcomeScreenToolbarHintTunnel;return(0,T.jsx)(n.In,{children:(0,T.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar",children:[(0,T.jsx)("div",{className:"welcome-screen-decor-hint__label",children:t||(0,I.t)("welcomeScreen.defaults.toolbarHint")}),$.DJ]})})};he.displayName="ToolbarHint";var me=function(e){var t=e.children,n=(0,H.R6)().WelcomeScreenHelpHintTunnel;return(0,T.jsx)(n.In,{children:(0,T.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help",children:[(0,T.jsx)("div",{children:t||(0,I.t)("welcomeScreen.defaults.helpHint")}),$._U]})})};me.displayName="HelpHint";var ge=c(1569),ve={};ve.styleTagTransform=m(),ve.setAttributes=d(),ve.insert=l().bind(null,"head"),ve.domAPI=i(),ve.insertStyleElement=p();r()(ge.Z,ve),ge.Z&&ge.Z.locals&&ge.Z.locals;var be=function(e){return(0,T.jsx)(T.Fragment,{children:e.children||(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(ae,{}),(0,T.jsx)(pe,{}),(0,T.jsx)(he,{}),(0,T.jsx)(me,{})]})})};be.displayName="WelcomeScreen",be.Center=ae,be.Hints={MenuHint:pe,ToolbarHint:he,HelpHint:me};var ye=be,xe=c(7172),we=c(3397),ke={};ke.styleTagTransform=m(),ke.setAttributes=d(),ke.insert=l().bind(null,"head"),ke.domAPI=i(),ke.insertStyleElement=p();r()(we.Z,ke),we.Z&&we.Z.locals&&we.Z.locals;var Ee=["isCollaborating","onSelect"];function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){(0,G.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oe=function(e){var t=e.isCollaborating,n=e.onSelect,r=(0,X.Z)(e,Ee),o=(0,U.I)();return(0,T.jsxs)(xe.z,Se(Se({},r),{},{className:(0,B.Z)("collab-button",{active:t}),type:"button",onSelect:n,style:{position:"relative"},title:(0,I.t)("labels.liveCollaboration"),children:[$.jn,o.collaborators.size>0&&(0,T.jsx)("div",{className:"CollabButton-collaborators",children:o.collaborators.size})]}))},_e=Oe;Oe.displayName="LiveCollaborationTrigger";var Ce=c(1047),Ie=c(679),Te=c(3024),Pe=c(1974),Me=c(1935),De=c(7053),Ae=c(8519),Le=c(704),Ze=["initialData","UIOptions"],ze=["initialData","UIOptions"];function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){w()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Be=function(t){var n,r,o,i=t.onChange,a=t.initialData,l=t.excalidrawRef,c=t.isCollaborating,s=void 0!==c&&c,u=t.onPointerUpdate,d=t.renderTopRightUI,f=t.langCode,p=void 0===f?I.Fp.code:f,h=t.viewModeEnabled,m=t.zenModeEnabled,g=t.gridModeEnabled,v=t.libraryReturnUrl,b=t.theme,y=t.name,x=t.renderCustomStats,w=t.onPaste,E=t.detectScroll,j=void 0===E||E,S=t.handleKeyboardGlobally,O=void 0!==S&&S,_=t.onLibraryChange,C=t.autoFocus,D=void 0!==C&&C,A=t.generateIdForFile,L=t.onLinkOpen,Z=t.onPointerDown,z=t.onScrollChange,B=t.children,H=null===(n=t.UIOptions)||void 0===n?void 0:n.canvasActions,W=Ne(Ne({},t.UIOptions),{},{canvasActions:Ne(Ne({},e.cW.canvasActions),H)});null!=H&&H.export&&(W.canvasActions.export.saveFileToDisk=null!==(r=null===(o=H.export)||void 0===o?void 0:o.saveFileToDisk)&&void 0!==r?r:e.cW.canvasActions.export.saveFileToDisk);return null===W.canvasActions.toggleTheme&&void 0===b&&(W.canvasActions.toggleTheme=!0),(0,k.useEffect)((function(){var e=function(e){"number"==typeof e.scale&&1!==e.scale&&e.preventDefault()};return document.addEventListener("touchmove",e,{passive:!1}),function(){document.removeEventListener("touchmove",e)}}),[]),(0,T.jsx)(R.zt,{unstable_createStore:function(){return N.e_},scope:N.yE,children:(0,T.jsx)(P,{langCode:p,theme:b,children:(0,T.jsx)(M.ZP,{onChange:i,initialData:a,excalidrawRef:l,isCollaborating:s,onPointerUpdate:u,renderTopRightUI:d,langCode:p,viewModeEnabled:h,zenModeEnabled:m,gridModeEnabled:g,libraryReturnUrl:v,theme:b,name:y,renderCustomStats:x,UIOptions:W,onPaste:w,detectScroll:j,handleKeyboardGlobally:O,onLibraryChange:_,autoFocus:D,generateIdForFile:A,onLinkOpen:L,onPointerDown:Z,onScrollChange:z,children:B})})})},He=function(e,t){if(e.children!==t.children)return!1;e.initialData;var n=e.UIOptions,r=void 0===n?{}:n,o=y()(e,Ze),i=(t.initialData,t.UIOptions),a=void 0===i?{}:i,l=y()(t,ze),c=Object.keys(r),s=Object.keys(a);return c.length===s.length&&(c.every((function(e){return"canvasActions"===e?Object.keys(r.canvasActions).every((function(e){var t,n,o,i;return"export"===e&&null!=r&&null!==(t=r.canvasActions)&&void 0!==t&&t.export&&null!=a&&null!==(n=a.canvasActions)&&void 0!==n&&n.export?r.canvasActions.export.saveFileToDisk===a.canvasActions.export.saveFileToDisk:(null==r||null===(o=r.canvasActions)||void 0===o?void 0:o[e])===(null==a||null===(i=a.canvasActions)||void 0===i?void 0:i[e])})):r[e]===a[e]}))&&(0,D.w8)(o,l))},We=(0,k.forwardRef)((function(e,t){return(0,T.jsx)(Be,Ne(Ne({},e),{},{excalidrawRef:t}))})),Fe=E().memo(We,He);Fe.displayName="Excalidraw",t()}(),s}()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ExcalidrawLib=t(require("react"),require("react-dom")):e.ExcalidrawLib=t(e.React,e.ReactDOM)}(self,(function(e,t){return function(){var n,r,o,i,a={7217:function(e,t,n){"use strict";function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}n.d(t,{M:function(){return r}})},9335:function(e,t,n){"use strict";n.d(t,{F:function(){return o},e:function(){return i}});var r=n(9787);function o(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function i(...e){return(0,r.useCallback)(o(...e),e)}},1267:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});var r=n(9787);function o(e,t=[]){let n=[];const o=()=>{const t=n.map((e=>(0,r.createContext)(e)));return function(n){const o=(null==n?void 0:n[e])||t;return(0,r.useMemo)((()=>({[`__scope${e}`]:{...n,[e]:o}})),[n,o])}};return o.scopeName=e,[function(t,o){const i=(0,r.createContext)(o),a=n.length;function l(t){const{scope:n,children:o,...l}=t,c=(null==n?void 0:n[e][a])||i,s=(0,r.useMemo)((()=>l),Object.values(l));return(0,r.createElement)(c.Provider,{value:s},o)}return n=[...n,o],l.displayName=t+"Provider",[l,function(n,l){const c=(null==l?void 0:l[e][a])||i,s=(0,r.useContext)(c);if(s)return s;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},i(o,...t)]}function i(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return(0,r.useMemo)((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return n.scopeName=t.scopeName,n}},5622:function(e,t,n){"use strict";n.d(t,{M:function(){return l}});var r=n(9787),o=n(3348);const i=r["useId".toString()]||(()=>{});let a=0;function l(e){const[t,n]=r.useState(i());return(0,o.b)((()=>{e||n((e=>null!=e?e:String(a++)))}),[e]),e||(t?`radix-${t}`:"")}},1483:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var r=n(9787),o=n(5156),i=n(9335),a=n(3348);const l=e=>{const{present:t,children:n}=e,l=function(e){const[t,n]=(0,r.useState)(),i=(0,r.useRef)({}),l=(0,r.useRef)(e),s=(0,r.useRef)("none"),u=e?"mounted":"unmounted",[d,f]=function(e,t){return(0,r.useReducer)(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,r.useEffect)((()=>{const e=c(i.current);s.current="mounted"===d?e:"none"}),[d]),(0,a.b)((()=>{const t=i.current,n=l.current;if(n!==e){const r=s.current,o=c(t);if(e)f("MOUNT");else if("none"===o||"none"===(null==t?void 0:t.display))f("UNMOUNT");else{const e=r!==o;f(n&&e?"ANIMATION_OUT":"UNMOUNT")}l.current=e}}),[e,f]),(0,a.b)((()=>{if(t){const e=e=>{const n=c(i.current).includes(e.animationName);e.target===t&&n&&(0,o.flushSync)((()=>f("ANIMATION_END")))},n=e=>{e.target===t&&(s.current=c(i.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}f("ANIMATION_END")}),[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:(0,r.useCallback)((e=>{e&&(i.current=getComputedStyle(e)),n(e)}),[])}}(t),s="function"==typeof n?n({present:l.isPresent}):r.Children.only(n),u=(0,i.e)(l.ref,s.ref);return"function"==typeof n||l.isPresent?(0,r.cloneElement)(s,{ref:u}):null};function c(e){return(null==e?void 0:e.animationName)||"none"}l.displayName="Presence"},3119:function(e,t,n){"use strict";n.d(t,{WV:function(){return l},jH:function(){return c}});var r=n(11),o=n(9787),i=n(5156),a=n(4801);const l=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=(0,o.forwardRef)(((e,n)=>{const{asChild:i,...l}=e,c=i?a.g7:t;return(0,o.useEffect)((()=>{window[Symbol.for("radix-ui")]=!0}),[]),(0,o.createElement)(c,(0,r.Z)({},l,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function c(e,t){e&&(0,i.flushSync)((()=>e.dispatchEvent(t)))}},4801:function(e,t,n){"use strict";n.d(t,{g7:function(){return a}});var r=n(11),o=n(9787),i=n(9335);const a=(0,o.forwardRef)(((e,t)=>{const{children:n,...i}=e,a=o.Children.toArray(n),c=a.find(s);if(c){const e=c.props.children,n=a.map((t=>t===c?o.Children.count(e)>1?o.Children.only(null):(0,o.isValidElement)(e)?e.props.children:null:t));return(0,o.createElement)(l,(0,r.Z)({},i,{ref:t}),(0,o.isValidElement)(e)?(0,o.cloneElement)(e,void 0,n):null)}return(0,o.createElement)(l,(0,r.Z)({},i,{ref:t}),n)}));a.displayName="Slot";const l=(0,o.forwardRef)(((e,t)=>{const{children:n,...r}=e;return(0,o.isValidElement)(n)?(0,o.cloneElement)(n,{...u(r,n.props),ref:(0,i.F)(t,n.ref)}):o.Children.count(n)>1?o.Children.only(null):null}));l.displayName="SlotClone";const c=({children:e})=>(0,o.createElement)(o.Fragment,null,e);function s(e){return(0,o.isValidElement)(e)&&e.type===c}function u(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}},3060:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});var r=n(9787);function o(e){const t=(0,r.useRef)(e);return(0,r.useEffect)((()=>{t.current=e})),(0,r.useMemo)((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}},2673:function(e,t,n){"use strict";n.d(t,{T:function(){return i}});var r=n(9787),o=n(3060);function i({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[i,a]=function({defaultProp:e,onChange:t}){const n=(0,r.useState)(e),[i]=n,a=(0,r.useRef)(i),l=(0,o.W)(t);return(0,r.useEffect)((()=>{a.current!==i&&(l(i),a.current=i)}),[i,a,l]),n}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:i,s=(0,o.W)(n);return[c,(0,r.useCallback)((t=>{if(l){const n=t,r="function"==typeof t?n(e):t;r!==e&&s(r)}else a(t)}),[l,e,a,s])]}},3348:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});var r=n(9787);const o=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?r.useLayoutEffect:()=>{}},45:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function o(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}n.d(t,{Z:function(){return o}})},6233:function(e,t){var n;n=function(e){e.version="0.3.0";var t=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),n="undefined"!=typeof Buffer;function r(e){for(var n=-1,r=0,o=e.length-7;r<o;)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])])>>>8^t[255&(n^e[r++])];for(;r<o+7;)n=n>>>8^t[255&(n^e[r++])];return-1^n}e.table=t,e.bstr=function(e){if(e.length>32768&&n)return r(new Buffer(e));for(var o=-1,i=e.length-1,a=0;a<i;)o=t[255&(o^e.charCodeAt(a++))]^o>>>8,o=t[255&(o^e.charCodeAt(a++))]^o>>>8;return a===i&&(o=o>>>8^t[255&(o^e.charCodeAt(a))]),-1^o},e.buf=function(e){if(e.length>1e4)return r(e);for(var n=-1,o=0,i=e.length-3;o<i;)n=(n=(n=(n=n>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])];for(;o<i+3;)n=n>>>8^t[255&(n^e[o++])];return-1^n},e.str=function(e){for(var n,r,o=-1,i=0,a=e.length;i<a;)(n=e.charCodeAt(i++))<128?o=o>>>8^t[255&(o^n)]:n<2048?o=(o=o>>>8^t[255&(o^(192|n>>6&31))])>>>8^t[255&(o^(128|63&n))]:n>=55296&&n<57344?(n=64+(1023&n),r=1023&e.charCodeAt(i++),o=(o=(o=(o=o>>>8^t[255&(o^(240|n>>8&7))])>>>8^t[255&(o^(128|n>>2&63))])>>>8^t[255&(o^(128|r>>6&15|3&n))])>>>8^t[255&(o^(128|63&r))]):o=(o=(o=o>>>8^t[255&(o^(224|n>>12&15))])>>>8^t[255&(o^(128|n>>6&63))])>>>8^t[255&(o^(128|63&n))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?n(t):n({})},4739:function(e,t,n){"use strict";n.d(t,{Dv:function(){return N},KO:function(){return H},Vv:function(){return k},b9:function(){return B},cn:function(){return z},zt:function(){return Z}});var r=n(9787);const o=Symbol(),i=e=>!!e[o],a=e=>{var t,n;null==(n=(t=e[o]).c)||n.call(t)},l=(e,t)=>{const n=e[o].o,r=t[o].o;return n===r||e===r||i(n)&&l(n,t)},c=e=>{const t={o:e,c:null},n=new Promise((n=>{t.c=()=>{t.c=null,n()},e.then(t.c,t.c)}));return n[o]=t,n};var s=Object.defineProperty,u=Object.defineProperties,d=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,m=(e,t,n)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const g=e=>"init"in e,v="r",b="w",y="c",x="s",w=e=>{const t=new WeakMap,n=new WeakMap,r=new Map;let s,w;if(s=new Set,w=new Set,e)for(const[n,r]of e){const e={v:r,r:0,d:new Map};Object.freeze(e),g(n)||console.warn("Found initial value for derived atom which can cause unexpected behavior",n),t.set(n,e)}const k=new WeakMap,E=new WeakMap,j=e=>{let t=E.get(e);return t||(t=new Map,E.set(e,t)),t},S=(e,n)=>{if(e){const t=j(e);let r=t.get(n);return r||(r=S(e.p,n),r&&("p"in r&&r.p.then((()=>t.delete(n))),t.set(n,r))),r}return t.get(n)},O=(e,n,o)=>{if(Object.freeze(o),e){j(e).set(n,o)}else{const e=t.get(n);t.set(n,o),r.has(n)||r.set(n,e)}},_=(e,t=new Map,n)=>{if(!n)return t;const r=new Map;let o=!1;return n.forEach((n=>{var i;const a=(null==(i=S(e,n))?void 0:i.r)||0;r.set(n,a),t.get(n)!==a&&(o=!0)})),t.size!==r.size||o?r:t},C=(e,t,n,r,o)=>{const i=S(e,t);if(i){if(o&&(!("p"in i)||!l(i.p,o)))return i;"p"in i&&a(i.p)}const c={v:n,r:(null==i?void 0:i.r)||0,d:_(e,null==i?void 0:i.d,r)};return i&&"v"in i&&Object.is(i.v,n)?c.d===i.d||c.d.size===i.d.size&&Array.from(c.d.keys()).every((e=>i.d.has(e)))||Promise.resolve().then((()=>{W(e)})):(++c.r,c.d.has(t)&&(c.d=new Map(c.d).set(t,c.r))),O(e,t,c),c},P=(e,t,n,r,o)=>{const i=S(e,t);if(i){if(o&&(!("p"in i)||!l(i.p,o)))return i;"p"in i&&a(i.p)}const c={e:n,r:(null==i?void 0:i.r)||0,d:_(e,null==i?void 0:i.d,r)};return O(e,t,c),c},T=(e,t,n,r)=>{const o=S(e,t);if(o&&"p"in o){if(l(o.p,n))return o;a(o.p)}((e,t,n)=>{let r=k.get(t);r||(r=new Map,k.set(t,r)),n.then((()=>{r.get(e)===n&&(r.delete(e),r.size||k.delete(t))})),r.set(e,n)})(e,t,n);const i={p:n,r:(null==o?void 0:o.r)||0,d:_(e,null==o?void 0:o.d,r)};return O(e,t,i),i},I=(e,t,n,r)=>{if(n instanceof Promise){const o=c(n.then((n=>{C(e,t,n,r,o),W(e)})).catch((n=>{if(n instanceof Promise)return i(n)?n.then((()=>{D(e,t,!0)})):n;P(e,t,n,r,o),W(e)})));return T(e,t,o,r)}return C(e,t,n,r)},M=(e,t)=>{const n=S(e,t);if(n){"p"in n&&a(n.p);const i=(r=((e,t)=>{for(var n in t||(t={}))p.call(t,n)&&m(e,n,t[n]);if(f)for(var n of f(t))h.call(t,n)&&m(e,n,t[n]);return e})({},n),o={i:n.r},u(r,d(o)));O(e,t,i)}else console.warn("[Bug] could not invalidate non existing atom",t);var r,o},D=(e,t,r)=>{if(!r){const r=S(e,t);if(r){if(r.r!==r.i&&"p"in r&&r.p[o].c)return r;if(r.d.forEach(((r,o)=>{if(o!==t)if(n.has(o)){const t=S(e,o);t&&t.r===t.i&&D(e,o)}else D(e,o)})),Array.from(r.d).every((([t,n])=>{const r=S(e,t);return r&&"v"in r&&r.r===n})))return r}}const i=new Set;try{const n=t.read((n=>{i.add(n);const r=n===t?S(e,n):D(e,n);if(r){if("e"in r)throw r.e;if("p"in r)throw r.p;return r.v}if(g(n))return n.init;throw new Error("no atom init")}));return I(e,t,n,i)}catch(n){if(n instanceof Promise){const r=c(n);return T(e,t,r,i)}return P(e,t,n,i)}},A=(e,t)=>D(t,e),L=(e,t)=>!t.l.size&&(!t.t.size||1===t.t.size&&t.t.has(e)),Z=(e,t)=>{const r=n.get(t);null==r||r.t.forEach((n=>{n!==t&&(M(e,n),Z(e,n))}))},R=(e,t,n)=>{let r=!0;const o=(t,n)=>{const r=D(e,t);if("e"in r)throw r.e;if("p"in r){if(null==n?void 0:n.unstable_promise)return r.p.then((()=>o(t,n)));throw console.info("Reading pending atom state in write operation. We throw a promise for now.",t),r.p}if("v"in r)return r.v;throw console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",t),new Error("no value found")},i=t.write(o,((n,o)=>{let i;if(n===t){if(!g(n))throw new Error("atom not writable");const t=(e=>{const t=new Set,n=k.get(e);return n&&(k.delete(e),n.forEach(((e,n)=>{a(e),t.add(n)}))),t})(n);t.forEach((t=>{t!==e&&I(t,n,o)})),I(e,n,o),Z(e,n)}else i=R(e,n,o);return r||W(e),i}),n);return r=!1,e=void 0,i},z=(e,t,n)=>{const r=R(n,e,t);return W(n),r},N=(e,t)=>{const r={t:new Set(t&&[t]),l:new Set};n.set(e,r),w.add(e);if(D(void 0,e).d.forEach(((t,r)=>{const o=n.get(r);o?o.t.add(e):r!==e&&N(r,e)})),(e=>!!e.write)(e)&&e.onMount){const t=t=>z(e,t),n=e.onMount(t);n&&(r.u=n)}return r},B=e=>{var t;const r=null==(t=n.get(e))?void 0:t.u;r&&r(),n.delete(e),w.delete(e);const o=S(void 0,e);o?o.d.forEach(((t,r)=>{if(r!==e){const t=n.get(r);t&&(t.t.delete(e),L(r,t)&&B(r))}})):console.warn("[Bug] could not find atom state to unmount",e)},H=(e,t,r)=>{const o=new Set(t.d.keys());null==r||r.forEach(((t,r)=>{if(o.has(r))return void o.delete(r);const i=n.get(r);i&&(i.t.delete(e),L(r,i)&&B(r))})),o.forEach((t=>{const r=n.get(t);r?r.t.add(e):n.has(e)&&N(t,e)}))},W=e=>{if(e){j(e).forEach(((r,o)=>{if(r!==t.get(o)){const t=n.get(o);null==t||t.l.forEach((t=>t(e)))}}))}else{for(;r.size;){const e=Array.from(r);r.clear(),e.forEach((([e,t])=>{const r=S(void 0,e);r&&r.d!==(null==t?void 0:t.d)&&H(e,r,null==t?void 0:t.d);const o=n.get(e);null==o||o.l.forEach((e=>e()))}))}s.forEach((e=>e()))}},F=(e,n)=>{n&&(e=>{j(e).forEach(((e,n)=>{const r=t.get(n);(e.r>((null==r?void 0:r.r)||0)||"v"in e&&e.r===(null==r?void 0:r.r)&&e.d!==(null==r?void 0:r.d))&&(t.set(n,e),e.d!==(null==r?void 0:r.d)&&H(n,e,null==r?void 0:r.d))}))})(n),W(void 0)},U=(e,t)=>{const r=(e=>{let t=n.get(e);return t||(t=N(e)),t})(e).l;return r.add(t),()=>{r.delete(t),(e=>{const t=n.get(e);t&&L(e,t)&&B(e)})(e)}},K=(e,t)=>{for(const[n,r]of e)g(n)&&(I(t,n,r),Z(t,n));W(t)};return{[v]:A,[b]:z,[y]:F,[x]:U,h:K,n:e=>(s.add(e),()=>{s.delete(e)}),l:()=>w.values(),a:e=>t.get(e),m:e=>n.get(e)}},k=e=>{const t=w(e),n=e=>new Promise(((r,o)=>{const i=t.r(e);"e"in i?o(i.e):r("p"in i?i.p.then((()=>n(e))):i.v)}));return{get:e=>{const n=t.r(e);if("e"in n)throw n.e;if(!("p"in n))return n.v},asyncGet:n,set:(e,n)=>t.w(e,n),sub:(e,n)=>t.s(e,n),SECRET_INTERNAL_store:t}},E=(e,t)=>({s:t?t(e).SECRET_INTERNAL_store:w(e)}),j=new Map,S=e=>(j.has(e)||j.set(e,(0,r.createContext)(E())),j.get(e));var O=Object.defineProperty,_=Object.defineProperties,C=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,M=(e,t,n)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,D=(e,t)=>{for(var n in t||(t={}))T.call(t,n)&&M(e,n,t[n]);if(P)for(var n of P(t))I.call(t,n)&&M(e,n,t[n]);return e};const A=e=>e.debugLabel||e.toString(),L=([e,t])=>Object.fromEntries(t.flatMap((t=>{var n,r;const o=null==(n=e.m)?void 0:n.call(e,t);if(!o)return[];const i=o.t,a=(null==(r=e.a)?void 0:r.call(e,t))||{};return[[A(t),(l=D(D(D({},"e"in a&&{error:a.e}),"p"in a&&{promise:a.p}),"v"in a&&{value:a.v}),c={dependents:Array.from(i).map(A)},_(l,C(c)))]];var l,c}))),Z=({children:e,initialValues:t,scope:n,unstable_createStore:o,unstable_enableVersionedWrite:i})=>{const[a,l]=(0,r.useState)();(0,r.useEffect)((()=>{a&&(c.current.s.c(null,a),delete a.p)}),[a]);const c=(0,r.useRef)();c.current||(c.current=E(t,o),i&&(c.current.w=e=>{l((t=>{const n=t?{p:t}:{};return e(n),n}))})),i||(e=>{const{s:t}=e,[n,o]=(0,r.useState)([]);(0,r.useEffect)((()=>{var e;const n=()=>{var e;o(Array.from((null==(e=t.l)?void 0:e.call(t))||[]))},r=null==(e=t.n)?void 0:e.call(t,n);return n(),r}),[t]),(0,r.useDebugValue)([t,n],L)})(c.current);const s=S(n);return(0,r.createElement)(s.Provider,{value:c.current},e)};let R=0;function z(e,t){const n="atom"+ ++R,r={toString:()=>n};return"function"==typeof e?r.read=e:(r.init=e,r.read=e=>e(r),r.write=(e,t,n)=>t(r,"function"==typeof n?n(e(r)):n)),t&&(r.write=t),r}function N(e,t){const n=S(t),{s:o}=(0,r.useContext)(n),i=(0,r.useCallback)((t=>{const n=o.r(e,t);if("e"in n)throw n.e;if("p"in n)throw n.p;if("v"in n)return n.v;throw new Error("no atom value")}),[o,e]),[[a,l,c],s]=(0,r.useReducer)((0,r.useCallback)(((t,n)=>{const r=i(n);return Object.is(t[1],r)&&t[2]===e?t:[n,r,e]}),[i,e]),void 0,(()=>{const t=void 0;return[t,i(t),e]}));return c!==e&&s(void 0),(0,r.useEffect)((()=>{const t=o.s(e,s);return s(void 0),t}),[o,e]),(0,r.useEffect)((()=>{o.c(e,a)})),(0,r.useDebugValue)(l),l}function B(e,t){const n=S(t),{s:o,w:i}=(0,r.useContext)(n);return(0,r.useCallback)((t=>{if(!("write"in e))throw new Error("not writable atom");const n=n=>o.w(e,t,n);return i?i(n):n()}),[o,i,e])}function H(e,t){return"scope"in e&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),t=e.scope),[N(e,t),B(e,t)]}},200:function(e,t,n){var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=s||u||Function("return this")(),f=Object.prototype.toString,p=Math.max,h=Math.min,m=function(){return d.Date.now()};function g(e,t,n){var o,i,a,l,c,s,u=0,d=!1,f=!1,g=!0;if("function"!=typeof e)throw new TypeError(r);function y(t){var n=o,r=i;return o=i=void 0,u=t,l=e.apply(r,n)}function x(e){return u=e,c=setTimeout(k,t),d?y(e):l}function w(e){var n=e-s;return void 0===s||n>=t||n<0||f&&e-u>=a}function k(){var e=m();if(w(e))return E(e);c=setTimeout(k,function(e){var n=t-(e-s);return f?h(n,a-(e-u)):n}(e))}function E(e){return c=void 0,g&&o?y(e):(o=i=void 0,l)}function j(){var e=m(),n=w(e);if(o=arguments,i=this,s=e,n){if(void 0===c)return x(s);if(f)return c=setTimeout(k,t),y(s)}return void 0===c&&(c=setTimeout(k,t)),l}return t=b(t)||0,v(n)&&(d=!!n.leading,a=(f="maxWait"in n)?p(b(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g),j.cancel=function(){void 0!==c&&clearTimeout(c),u=0,o=s=i=c=void 0},j.flush=function(){return void 0===c?l:E(m())},j}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return v(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),g(e,t,{leading:o,maxWait:t,trailing:i})}},2744:function(e,t,n){"use strict";var r={};(0,n(9187).assign)(r,n(4395),n(578),n(2684)),e.exports=r},4395:function(e,t,n){"use strict";var r=n(7651),o=n(9187),i=n(8592),a=n(5604),l=n(249),c=Object.prototype.toString;function s(e){if(!(this instanceof s))return new s(e);this.options=o.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var u;if(u="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,u)))throw new Error(a[n]);this._dict_set=!0}}function u(e,t){var n=new s(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}s.prototype.push=function(e,t){var n,a,l=this.strm,s=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?l.input=i.string2buf(e):"[object ArrayBuffer]"===c.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new o.Buf8(s),l.next_out=0,l.avail_out=s),1!==(n=r.deflate(l,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==l.avail_out&&(0!==l.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(i.buf2binstring(o.shrinkBuf(l.output,l.next_out))):this.onData(o.shrinkBuf(l.output,l.next_out)))}while((l.avail_in>0||0===l.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),l.avail_out=0,!0)},s.prototype.onData=function(e){this.chunks.push(e)},s.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=s,t.deflate=u,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,u(e,t)}},578:function(e,t,n){"use strict";var r=n(7823),o=n(9187),i=n(8592),a=n(2684),l=n(5604),c=n(249),s=n(9968),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(l[n]);if(this.header=new s,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=i.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(l[n])}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||l[n.err];return n.result}d.prototype.push=function(e,t){var n,l,c,s,d,f=this.strm,p=this.options.chunkSize,h=this.options.dictionary,m=!1;if(this.ended)return!1;l=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=i.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new o.Buf8(p),f.next_out=0,f.avail_out=p),(n=r.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&h&&(n=r.inflateSetDictionary(this.strm,h)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==a.Z_STREAM_END&&(0!==f.avail_in||l!==a.Z_FINISH&&l!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(c=i.utf8border(f.output,f.next_out),s=f.next_out-c,d=i.buf2string(f.output,c),f.next_out=s,f.avail_out=p-s,s&&o.arraySet(f.output,f.output,c,s,0),this.onData(d)):this.onData(o.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(l=a.Z_FINISH),l===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):l!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},9187:function(e,t){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var o in n)r(n,o)&&(e[o]=n[o])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,r,o){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),o);else for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){var t,n,r,o,i,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),o=0,t=0,n=e.length;t<n;t++)i=e[t],a.set(i,o),o+=i.length;return a}},i={arraySet:function(e,t,n,r,o){for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,i))},t.setTyped(n)},8592:function(e,t,n){"use strict";var r=n(9187),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(e){o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){i=!1}for(var a=new r.Buf8(256),l=0;l<256;l++)a[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;function c(e,t){if(t<65534&&(e.subarray&&i||!e.subarray&&o))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,t.string2buf=function(e){var t,n,o,i,a,l=e.length,c=0;for(i=0;i<l;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<l&&56320==(64512&(o=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(o-56320),i++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(c),a=0,i=0;a<c;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<l&&56320==(64512&(o=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(o-56320),i++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return c(e,e.length)},t.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,o=t.length;n<o;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,r,o,i,l=t||e.length,s=new Array(2*l);for(r=0,n=0;n<l;)if((o=e[n++])<128)s[r++]=o;else if((i=a[o])>4)s[r++]=65533,n+=i-1;else{for(o&=2===i?31:3===i?15:7;i>1&&n<l;)o=o<<6|63&e[n++],i--;i>1?s[r++]=65533:o<65536?s[r++]=o:(o-=65536,s[r++]=55296|o>>10&1023,s[r++]=56320|1023&o)}return c(s,r)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},3693:function(e){"use strict";e.exports=function(e,t,n,r){for(var o=65535&e|0,i=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{i=i+(o=o+t[r++]|0)|0}while(--a);o%=65521,i%=65521}return o|i<<16|0}},2684:function(e){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},8464:function(e){"use strict";var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,n,r,o){var i=t,a=o+r;e^=-1;for(var l=o;l<a;l++)e=e>>>8^i[255&(e^n[l])];return-1^e}},7651:function(e,t,n){"use strict";var r,o=n(9187),i=n(8676),a=n(3693),l=n(8464),c=n(5604),s=-2,u=258,d=262,f=103,p=113,h=666;function m(e,t){return e.msg=c[t],t}function g(e){return(e<<1)-(e>4?9:0)}function v(e){for(var t=e.length;--t>=0;)e[t]=0}function b(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(o.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function y(e,t){i._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,b(e.strm)}function x(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function k(e,t){var n,r,o=e.max_chain_length,i=e.strstart,a=e.prev_length,l=e.nice_match,c=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,s=e.window,f=e.w_mask,p=e.prev,h=e.strstart+u,m=s[i+a-1],g=s[i+a];e.prev_length>=e.good_match&&(o>>=2),l>e.lookahead&&(l=e.lookahead);do{if(s[(n=t)+a]===g&&s[n+a-1]===m&&s[n]===s[i]&&s[++n]===s[i+1]){i+=2,n++;do{}while(s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&i<h);if(r=u-(h-i),i=h-u,r>a){if(e.match_start=t,a=r,r>=l)break;m=s[i+a-1],g=s[i+a]}}}while((t=p[t&f])>c&&0!=--o);return a<=e.lookahead?a:e.lookahead}function E(e){var t,n,r,i,c,s,u,f,p,h,m=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-d)){o.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=m?r-m:0}while(--n);t=n=m;do{r=e.prev[--t],e.prev[t]=r>=m?r-m:0}while(--n);i+=m}if(0===e.strm.avail_in)break;if(s=e.strm,u=e.window,f=e.strstart+e.lookahead,p=i,h=void 0,(h=s.avail_in)>p&&(h=p),n=0===h?0:(s.avail_in-=h,o.arraySet(u,s.input,s.next_in,h,f),1===s.state.wrap?s.adler=a(s.adler,u,h,f):2===s.state.wrap&&(s.adler=l(s.adler,u,h,f)),s.next_in+=h,s.total_in+=h,h),e.lookahead+=n,e.lookahead+e.insert>=3)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+3-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<d&&0!==e.strm.avail_in)}function j(e,t){for(var n,r;;){if(e.lookahead<d){if(E(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-d&&(e.match_length=k(e,n)),e.match_length>=3)if(r=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function S(e,t){for(var n,r,o;;){if(e.lookahead<d){if(E(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-d&&(e.match_length=k(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,r=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(y(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=i._tr_tally(e,0,e.window[e.strstart-1]))&&y(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}function O(e,t,n,r,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=o}function _(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),v(this.dyn_ltree),v(this.dyn_dtree),v(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),v(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),v(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function C(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:p,e.adler=2===t.wrap?0:1,t.last_flush=0,i._tr_init(t),0):m(e,s)}function P(e){var t,n=C(e);return 0===n&&((t=e.state).window_size=2*t.w_size,v(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function T(e,t,n,r,i,a){if(!e)return s;var l=1;if(-1===t&&(t=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return m(e,s);8===r&&(r=9);var c=new _;return e.state=c,c.strm=e,c.wrap=l,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=i+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+3-1)/3),c.window=new o.Buf8(2*c.w_size),c.head=new o.Buf16(c.hash_size),c.prev=new o.Buf16(c.w_size),c.lit_bufsize=1<<i+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new o.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=a,c.method=n,P(e)}r=[new O(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(E(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)})),new O(4,4,8,4,j),new O(4,5,16,8,j),new O(4,6,32,32,j),new O(4,4,16,16,S),new O(8,16,32,32,S),new O(8,16,128,128,S),new O(8,32,128,256,S),new O(32,128,258,1024,S),new O(32,258,258,4096,S)],t.deflateInit=function(e,t){return T(e,t,8,15,8,0)},t.deflateInit2=T,t.deflateReset=P,t.deflateResetKeep=C,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?s:(e.state.gzhead=t,0):s},t.deflate=function(e,t){var n,o,a,c;if(!e||!e.state||t>5||t<0)return e?m(e,s):s;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||o.status===h&&4!==t)return m(e,0===e.avail_out?-5:s);if(o.strm=e,n=o.last_flush,o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,x(o,31),x(o,139),x(o,8),o.gzhead?(x(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),x(o,255&o.gzhead.time),x(o,o.gzhead.time>>8&255),x(o,o.gzhead.time>>16&255),x(o,o.gzhead.time>>24&255),x(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),x(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(x(o,255&o.gzhead.extra.length),x(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=l(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(x(o,0),x(o,0),x(o,0),x(o,0),x(o,0),x(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),x(o,3),o.status=p);else{var d=8+(o.w_bits-8<<4)<<8;d|=(o.strategy>=2||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(d|=32),d+=31-d%31,o.status=p,w(o,d),0!==o.strstart&&(w(o,e.adler>>>16),w(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending!==o.pending_buf_size));)x(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending===o.pending_buf_size)){c=1;break}c=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,x(o,c)}while(0!==c);o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),0===c&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),b(e),a=o.pending,o.pending===o.pending_buf_size)){c=1;break}c=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,x(o,c)}while(0!==c);o.gzhead.hcrc&&o.pending>a&&(e.adler=l(e.adler,o.pending_buf,o.pending-a,a)),0===c&&(o.status=f)}else o.status=f;if(o.status===f&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&b(e),o.pending+2<=o.pending_buf_size&&(x(o,255&e.adler),x(o,e.adler>>8&255),e.adler=0,o.status=p)):o.status=p),0!==o.pending){if(b(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(n)&&4!==t)return m(e,-5);if(o.status===h&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&o.status!==h){var k=2===o.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(E(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var n,r,o,a,l=e.window;;){if(e.lookahead<=u){if(E(e),e.lookahead<=u&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=l[o=e.strstart-1])===l[++o]&&r===l[++o]&&r===l[++o]){a=e.strstart+u;do{}while(r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&r===l[++o]&&o<a);e.match_length=u-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):r[o.level].func(o,t);if(3!==k&&4!==k||(o.status=h),1===k||3===k)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===k&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(v(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),b(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(x(o,255&e.adler),x(o,e.adler>>8&255),x(o,e.adler>>16&255),x(o,e.adler>>24&255),x(o,255&e.total_in),x(o,e.total_in>>8&255),x(o,e.total_in>>16&255),x(o,e.total_in>>24&255)):(w(o,e.adler>>>16),w(o,65535&e.adler)),b(e),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==f&&t!==p&&t!==h?m(e,s):(e.state=null,t===p?m(e,-3):0):s},t.deflateSetDictionary=function(e,t){var n,r,i,l,c,u,d,f,p=t.length;if(!e||!e.state)return s;if(2===(l=(n=e.state).wrap)||1===l&&42!==n.status||n.lookahead)return s;for(1===l&&(e.adler=a(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===l&&(v(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new o.Buf8(n.w_size),o.arraySet(f,t,p-n.w_size,n.w_size,0),t=f,p=n.w_size),c=e.avail_in,u=e.next_in,d=e.input,e.avail_in=p,e.next_in=0,e.input=t,E(n);n.lookahead>=3;){r=n.strstart,i=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--i);n.strstart=r,n.lookahead=2,E(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=u,e.input=d,e.avail_in=c,n.wrap=l,0},t.deflateInfo="pako deflate (from Nodeca project)"},9968:function(e){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},9365:function(e){"use strict";e.exports=function(e,t){var n,r,o,i,a,l,c,s,u,d,f,p,h,m,g,v,b,y,x,w,k,E,j,S,O;n=e.state,r=e.next_in,S=e.input,o=r+(e.avail_in-5),i=e.next_out,O=e.output,a=i-(t-e.avail_out),l=i+(e.avail_out-257),c=n.dmax,s=n.wsize,u=n.whave,d=n.wnext,f=n.window,p=n.hold,h=n.bits,m=n.lencode,g=n.distcode,v=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),y=m[p&v];t:for(;;){if(p>>>=x=y>>>24,h-=x,0===(x=y>>>16&255))O[i++]=65535&y;else{if(!(16&x)){if(0==(64&x)){y=m[(65535&y)+(p&(1<<x)-1)];continue t}if(32&x){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}w=65535&y,(x&=15)&&(h<x&&(p+=S[r++]<<h,h+=8),w+=p&(1<<x)-1,p>>>=x,h-=x),h<15&&(p+=S[r++]<<h,h+=8,p+=S[r++]<<h,h+=8),y=g[p&b];n:for(;;){if(p>>>=x=y>>>24,h-=x,!(16&(x=y>>>16&255))){if(0==(64&x)){y=g[(65535&y)+(p&(1<<x)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&y,h<(x&=15)&&(p+=S[r++]<<h,(h+=8)<x&&(p+=S[r++]<<h,h+=8)),(k+=p&(1<<x)-1)>c){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=x,h-=x,k>(x=i-a)){if((x=k-x)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=0,j=f,0===d){if(E+=s-x,x<w){w-=x;do{O[i++]=f[E++]}while(--x);E=i-k,j=O}}else if(d<x){if(E+=s+d-x,(x-=d)<w){w-=x;do{O[i++]=f[E++]}while(--x);if(E=0,d<w){w-=x=d;do{O[i++]=f[E++]}while(--x);E=i-k,j=O}}}else if(E+=d-x,x<w){w-=x;do{O[i++]=f[E++]}while(--x);E=i-k,j=O}for(;w>2;)O[i++]=j[E++],O[i++]=j[E++],O[i++]=j[E++],w-=3;w&&(O[i++]=j[E++],w>1&&(O[i++]=j[E++]))}else{E=i-k;do{O[i++]=O[E++],O[i++]=O[E++],O[i++]=O[E++],w-=3}while(w>2);w&&(O[i++]=O[E++],w>1&&(O[i++]=O[E++]))}break}}break}}while(r<o&&i<l);r-=w=h>>3,p&=(1<<(h-=w<<3))-1,e.next_in=r,e.next_out=i,e.avail_in=r<o?o-r+5:5-(r-o),e.avail_out=i<l?l-i+257:257-(i-l),n.hold=p,n.bits=h}},7823:function(e,t,n){"use strict";var r=n(9187),o=n(3693),i=n(8464),a=n(9365),l=n(6446),c=-2,s=12,u=30;function d(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):c}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):c}function m(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?c:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,h(e))):c}function g(e,t){var n,r;return e?(r=new f,e.state=r,r.window=null,0!==(n=m(e,t))&&(e.state=null),n):c}var v,b,y=!0;function x(e){if(y){var t;for(v=new r.Buf32(512),b=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(l(1,e.lens,0,288,v,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;l(2,e.lens,0,32,b,0,e.work,{bits:5}),y=!1}e.lencode=v,e.lenbits=9,e.distcode=b,e.distbits=5}function w(e,t,n,o){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),o>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>o&&(i=o),r.arraySet(a.window,t,n-o,i,a.wnext),(o-=i)?(r.arraySet(a.window,t,n-o,o,0),a.wnext=o,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}t.inflateReset=h,t.inflateReset2=m,t.inflateResetKeep=p,t.inflateInit=function(e){return g(e,15)},t.inflateInit2=g,t.inflate=function(e,t){var n,f,p,h,m,g,v,b,y,k,E,j,S,O,_,C,P,T,I,M,D,A,L,Z,R=0,z=new r.Buf8(4),N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return c;(n=e.state).mode===s&&(n.mode=13),m=e.next_out,p=e.output,v=e.avail_out,h=e.next_in,f=e.input,g=e.avail_in,b=n.hold,y=n.bits,k=g,E=v,A=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;y<16;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(2&n.wrap&&35615===b){n.check=0,z[0]=255&b,z[1]=b>>>8&255,n.check=i(n.check,z,2,0),b=0,y=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg="incorrect header check",n.mode=u;break}if(8!=(15&b)){e.msg="unknown compression method",n.mode=u;break}if(y-=4,D=8+(15&(b>>>=4)),0===n.wbits)n.wbits=D;else if(D>n.wbits){e.msg="invalid window size",n.mode=u;break}n.dmax=1<<D,e.adler=n.check=1,n.mode=512&b?10:s,b=0,y=0;break;case 2:for(;y<16;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(n.flags=b,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=u;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=u;break}n.head&&(n.head.text=b>>8&1),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,n.check=i(n.check,z,2,0)),b=0,y=0,n.mode=3;case 3:for(;y<32;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.head&&(n.head.time=b),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,z[2]=b>>>16&255,z[3]=b>>>24&255,n.check=i(n.check,z,4,0)),b=0,y=0,n.mode=4;case 4:for(;y<16;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.head&&(n.head.xflags=255&b,n.head.os=b>>8),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,n.check=i(n.check,z,2,0)),b=0,y=0,n.mode=5;case 5:if(1024&n.flags){for(;y<16;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.length=b,n.head&&(n.head.extra_len=b),512&n.flags&&(z[0]=255&b,z[1]=b>>>8&255,n.check=i(n.check,z,2,0)),b=0,y=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((j=n.length)>g&&(j=g),j&&(n.head&&(D=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,f,h,j,D)),512&n.flags&&(n.check=i(n.check,f,j,h)),g-=j,h+=j,n.length-=j),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===g)break e;j=0;do{D=f[h+j++],n.head&&D&&n.length<65536&&(n.head.name+=String.fromCharCode(D))}while(D&&j<g);if(512&n.flags&&(n.check=i(n.check,f,j,h)),g-=j,h+=j,D)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===g)break e;j=0;do{D=f[h+j++],n.head&&D&&n.length<65536&&(n.head.comment+=String.fromCharCode(D))}while(D&&j<g);if(512&n.flags&&(n.check=i(n.check,f,j,h)),g-=j,h+=j,D)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;y<16;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(b!==(65535&n.check)){e.msg="header crc mismatch",n.mode=u;break}b=0,y=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=s;break;case 10:for(;y<32;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}e.adler=n.check=d(b),b=0,y=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=b,n.bits=y,2;e.adler=n.check=1,n.mode=s;case s:if(5===t||6===t)break e;case 13:if(n.last){b>>>=7&y,y-=7&y,n.mode=27;break}for(;y<3;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}switch(n.last=1&b,y-=1,3&(b>>>=1)){case 0:n.mode=14;break;case 1:if(x(n),n.mode=20,6===t){b>>>=2,y-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=u}b>>>=2,y-=2;break;case 14:for(b>>>=7&y,y-=7&y;y<32;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if((65535&b)!=(b>>>16^65535)){e.msg="invalid stored block lengths",n.mode=u;break}if(n.length=65535&b,b=0,y=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(j=n.length){if(j>g&&(j=g),j>v&&(j=v),0===j)break e;r.arraySet(p,f,h,j,m),g-=j,h+=j,v-=j,m+=j,n.length-=j;break}n.mode=s;break;case 17:for(;y<14;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(n.nlen=257+(31&b),b>>>=5,y-=5,n.ndist=1+(31&b),b>>>=5,y-=5,n.ncode=4+(15&b),b>>>=4,y-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=u;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;y<3;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.lens[N[n.have++]]=7&b,b>>>=3,y-=3}for(;n.have<19;)n.lens[N[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},A=l(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,A){e.msg="invalid code lengths set",n.mode=u;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;C=(R=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,P=65535&R,!((_=R>>>24)<=y);){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(P<16)b>>>=_,y-=_,n.lens[n.have++]=P;else{if(16===P){for(Z=_+2;y<Z;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(b>>>=_,y-=_,0===n.have){e.msg="invalid bit length repeat",n.mode=u;break}D=n.lens[n.have-1],j=3+(3&b),b>>>=2,y-=2}else if(17===P){for(Z=_+3;y<Z;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}y-=_,D=0,j=3+(7&(b>>>=_)),b>>>=3,y-=3}else{for(Z=_+7;y<Z;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}y-=_,D=0,j=11+(127&(b>>>=_)),b>>>=7,y-=7}if(n.have+j>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=u;break}for(;j--;)n.lens[n.have++]=D}}if(n.mode===u)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=u;break}if(n.lenbits=9,L={bits:n.lenbits},A=l(1,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,A){e.msg="invalid literal/lengths set",n.mode=u;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},A=l(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,A){e.msg="invalid distances set",n.mode=u;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(g>=6&&v>=258){e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=b,n.bits=y,a(e,E),m=e.next_out,p=e.output,v=e.avail_out,h=e.next_in,f=e.input,g=e.avail_in,b=n.hold,y=n.bits,n.mode===s&&(n.back=-1);break}for(n.back=0;C=(R=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,P=65535&R,!((_=R>>>24)<=y);){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(C&&0==(240&C)){for(T=_,I=C,M=P;C=(R=n.lencode[M+((b&(1<<T+I)-1)>>T)])>>>16&255,P=65535&R,!(T+(_=R>>>24)<=y);){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}b>>>=T,y-=T,n.back+=T}if(b>>>=_,y-=_,n.back+=_,n.length=P,0===C){n.mode=26;break}if(32&C){n.back=-1,n.mode=s;break}if(64&C){e.msg="invalid literal/length code",n.mode=u;break}n.extra=15&C,n.mode=22;case 22:if(n.extra){for(Z=n.extra;y<Z;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.length+=b&(1<<n.extra)-1,b>>>=n.extra,y-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;C=(R=n.distcode[b&(1<<n.distbits)-1])>>>16&255,P=65535&R,!((_=R>>>24)<=y);){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(0==(240&C)){for(T=_,I=C,M=P;C=(R=n.distcode[M+((b&(1<<T+I)-1)>>T)])>>>16&255,P=65535&R,!(T+(_=R>>>24)<=y);){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}b>>>=T,y-=T,n.back+=T}if(b>>>=_,y-=_,n.back+=_,64&C){e.msg="invalid distance code",n.mode=u;break}n.offset=P,n.extra=15&C,n.mode=24;case 24:if(n.extra){for(Z=n.extra;y<Z;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}n.offset+=b&(1<<n.extra)-1,b>>>=n.extra,y-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=u;break}n.mode=25;case 25:if(0===v)break e;if(j=E-v,n.offset>j){if((j=n.offset-j)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=u;break}j>n.wnext?(j-=n.wnext,S=n.wsize-j):S=n.wnext-j,j>n.length&&(j=n.length),O=n.window}else O=p,S=m-n.offset,j=n.length;j>v&&(j=v),v-=j,n.length-=j;do{p[m++]=O[S++]}while(--j);0===n.length&&(n.mode=21);break;case 26:if(0===v)break e;p[m++]=n.length,v--,n.mode=21;break;case 27:if(n.wrap){for(;y<32;){if(0===g)break e;g--,b|=f[h++]<<y,y+=8}if(E-=v,e.total_out+=E,n.total+=E,E&&(e.adler=n.check=n.flags?i(n.check,p,E,m-E):o(n.check,p,E,m-E)),E=v,(n.flags?b:d(b))!==n.check){e.msg="incorrect data check",n.mode=u;break}b=0,y=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;y<32;){if(0===g)break e;g--,b+=f[h++]<<y,y+=8}if(b!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=u;break}b=0,y=0}n.mode=29;case 29:A=1;break e;case u:A=-3;break e;case 31:return-4;default:return c}return e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=b,n.bits=y,(n.wsize||E!==e.avail_out&&n.mode<u&&(n.mode<27||4!==t))&&w(e,e.output,e.next_out,E-e.avail_out)?(n.mode=31,-4):(k-=e.avail_in,E-=e.avail_out,e.total_in+=k,e.total_out+=E,n.total+=E,n.wrap&&E&&(e.adler=n.check=n.flags?i(n.check,p,E,e.next_out-E):o(n.check,p,E,e.next_out-E)),e.data_type=n.bits+(n.last?64:0)+(n.mode===s?128:0)+(20===n.mode||15===n.mode?256:0),(0===k&&0===E||4===t)&&0===A&&(A=-5),A)},t.inflateEnd=function(e){if(!e||!e.state)return c;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?c:(n.head=t,t.done=!1,0):c},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?c:11===n.mode&&o(1,t,r,0)!==n.check?-3:w(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):c},t.inflateInfo="pako inflate (from Nodeca project)"},6446:function(e,t,n){"use strict";var r=n(9187),o=15,i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,s,u,d,f,p){var h,m,g,v,b,y,x,w,k,E=p.bits,j=0,S=0,O=0,_=0,C=0,P=0,T=0,I=0,M=0,D=0,A=null,L=0,Z=new r.Buf16(16),R=new r.Buf16(16),z=null,N=0;for(j=0;j<=o;j++)Z[j]=0;for(S=0;S<s;S++)Z[t[n+S]]++;for(C=E,_=o;_>=1&&0===Z[_];_--);if(C>_&&(C=_),0===_)return u[d++]=20971520,u[d++]=20971520,p.bits=1,0;for(O=1;O<_&&0===Z[O];O++);for(C<O&&(C=O),I=1,j=1;j<=o;j++)if(I<<=1,(I-=Z[j])<0)return-1;if(I>0&&(0===e||1!==_))return-1;for(R[1]=0,j=1;j<o;j++)R[j+1]=R[j]+Z[j];for(S=0;S<s;S++)0!==t[n+S]&&(f[R[t[n+S]]++]=S);if(0===e?(A=z=f,y=19):1===e?(A=i,L-=257,z=a,N-=257,y=256):(A=l,z=c,y=-1),D=0,S=0,j=O,b=d,P=C,T=0,g=-1,v=(M=1<<C)-1,1===e&&M>852||2===e&&M>592)return 1;for(;;){x=j-T,f[S]<y?(w=0,k=f[S]):f[S]>y?(w=z[N+f[S]],k=A[L+f[S]]):(w=96,k=0),h=1<<j-T,O=m=1<<P;do{u[b+(D>>T)+(m-=h)]=x<<24|w<<16|k|0}while(0!==m);for(h=1<<j-1;D&h;)h>>=1;if(0!==h?(D&=h-1,D+=h):D=0,S++,0==--Z[j]){if(j===_)break;j=t[n+f[S]]}if(j>C&&(D&v)!==g){for(0===T&&(T=C),b+=O,I=1<<(P=j-T);P+T<_&&!((I-=Z[P+T])<=0);)P++,I<<=1;if(M+=1<<P,1===e&&M>852||2===e&&M>592)return 1;u[g=D&v]=C<<24|P<<16|b-d|0}}return 0!==D&&(u[b+D]=j-T<<24|64<<16|0),p.bits=C,0}},5604:function(e){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},8676:function(e,t,n){"use strict";var r=n(9187);function o(e){for(var t=e.length;--t>=0;)e[t]=0}var i=256,a=286,l=30,c=15,s=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);o(p);var h=new Array(60);o(h);var m=new Array(512);o(m);var g=new Array(256);o(g);var v=new Array(29);o(v);var b,y,x,w=new Array(l);function k(e,t,n,r,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function j(e){return e<256?m[e]:m[256+(e>>>7)]}function S(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function O(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,S(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function _(e,t,n){O(e,n[2*t],n[2*t+1])}function C(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function P(e,t,n){var r,o,i=new Array(16),a=0;for(r=1;r<=c;r++)i[r]=a=a+n[r-1]<<1;for(o=0;o<=t;o++){var l=e[2*o+1];0!==l&&(e[2*o]=C(i[l]++,l))}}function T(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<l;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function I(e){e.bi_valid>8?S(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function M(e,t,n,r){var o=2*t,i=2*n;return e[o]<e[i]||e[o]===e[i]&&r[t]<=r[n]}function D(e,t,n){for(var r=e.heap[n],o=n<<1;o<=e.heap_len&&(o<e.heap_len&&M(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!M(t,r,e.heap[o],e.depth));)e.heap[n]=e.heap[o],n=o,o<<=1;e.heap[n]=r}function A(e,t,n){var r,o,a,l,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],o=e.pending_buf[e.l_buf+c],c++,0===r?_(e,o,t):(_(e,(a=g[o])+i+1,t),0!==(l=s[a])&&O(e,o-=v[a],l),_(e,a=j(--r),n),0!==(l=u[a])&&O(e,r-=w[a],l))}while(c<e.last_lit);_(e,256,t)}function L(e,t){var n,r,o,i=t.dyn_tree,a=t.stat_desc.static_tree,l=t.stat_desc.has_stree,s=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<s;n++)0!==i[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):i[2*n+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[o]=0,e.opt_len--,l&&(e.static_len-=a[2*o+1]);for(t.max_code=u,n=e.heap_len>>1;n>=1;n--)D(e,i,n);o=s;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D(e,i,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,i[2*o]=i[2*n]+i[2*r],e.depth[o]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,i[2*n+1]=i[2*r+1]=o,e.heap[1]=o++,D(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,o,i,a,l,s=t.dyn_tree,u=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,m=t.stat_desc.max_length,g=0;for(i=0;i<=c;i++)e.bl_count[i]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(i=s[2*s[2*(r=e.heap[n])+1]+1]+1)>m&&(i=m,g++),s[2*r+1]=i,r>u||(e.bl_count[i]++,a=0,r>=h&&(a=p[r-h]),l=s[2*r],e.opt_len+=l*(i+a),f&&(e.static_len+=l*(d[2*r+1]+a)));if(0!==g){do{for(i=m-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[m]--,g-=2}while(g>0);for(i=m;0!==i;i--)for(r=e.bl_count[i];0!==r;)(o=e.heap[--n])>u||(s[2*o+1]!==i&&(e.opt_len+=(i-s[2*o+1])*s[2*o],s[2*o+1]=i),r--)}}(e,t),P(i,u,e.bl_count)}function Z(e,t,n){var r,o,i=-1,a=t[1],l=0,c=7,s=4;for(0===a&&(c=138,s=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)o=a,a=t[2*(r+1)+1],++l<c&&o===a||(l<s?e.bl_tree[2*o]+=l:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):l<=10?e.bl_tree[34]++:e.bl_tree[36]++,l=0,i=o,0===a?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4))}function R(e,t,n){var r,o,i=-1,a=t[1],l=0,c=7,s=4;for(0===a&&(c=138,s=3),r=0;r<=n;r++)if(o=a,a=t[2*(r+1)+1],!(++l<c&&o===a)){if(l<s)do{_(e,o,e.bl_tree)}while(0!=--l);else 0!==o?(o!==i&&(_(e,o,e.bl_tree),l--),_(e,16,e.bl_tree),O(e,l-3,2)):l<=10?(_(e,17,e.bl_tree),O(e,l-3,3)):(_(e,18,e.bl_tree),O(e,l-11,7));l=0,i=o,0===a?(c=138,s=3):o===a?(c=6,s=3):(c=7,s=4)}}o(w);var z=!1;function N(e,t,n,o){O(e,0+(o?1:0),3),function(e,t,n,o){I(e),o&&(S(e,n),S(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}t._tr_init=function(e){z||(!function(){var e,t,n,r,o,i=new Array(16);for(n=0,r=0;r<28;r++)for(v[r]=n,e=0;e<1<<s[r];e++)g[n++]=r;for(g[n-1]=r,o=0,r=0;r<16;r++)for(w[r]=o,e=0;e<1<<u[r];e++)m[o++]=r;for(o>>=7;r<l;r++)for(w[r]=o<<7,e=0;e<1<<u[r]-7;e++)m[256+o++]=r;for(t=0;t<=c;t++)i[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,i[8]++;for(;e<=255;)p[2*e+1]=9,e++,i[9]++;for(;e<=279;)p[2*e+1]=7,e++,i[7]++;for(;e<=287;)p[2*e+1]=8,e++,i[8]++;for(P(p,287,i),e=0;e<l;e++)h[2*e+1]=5,h[2*e]=C(e,5);b=new k(p,s,257,a,c),y=new k(h,u,0,l,c),x=new k(new Array(0),d,0,19,7)}(),z=!0),e.l_desc=new E(e.dyn_ltree,b),e.d_desc=new E(e.dyn_dtree,y),e.bl_desc=new E(e.bl_tree,x),e.bi_buf=0,e.bi_valid=0,T(e)},t._tr_stored_block=N,t._tr_flush_block=function(e,t,n,r){var o,a,l=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<i;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),L(e,e.l_desc),L(e,e.d_desc),l=function(e){var t;for(Z(e,e.dyn_ltree,e.l_desc.max_code),Z(e,e.dyn_dtree,e.d_desc.max_code),L(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*f[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=n+5,n+4<=o&&-1!==t?N(e,t,n,r):4===e.strategy||a===o?(O(e,2+(r?1:0),3),A(e,p,h)):(O(e,4+(r?1:0),3),function(e,t,n,r){var o;for(O(e,t-257,5),O(e,n-1,5),O(e,r-4,4),o=0;o<r;o++)O(e,e.bl_tree[2*f[o]+1],3);R(e,e.dyn_ltree,t-1),R(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),A(e,e.dyn_ltree,e.dyn_dtree)),T(e),r&&I(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(g[n]+i+1)]++,e.dyn_dtree[2*j(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){O(e,2,3),_(e,256,p),function(e){16===e.bi_valid?(S(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},249:function(e){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},9066:function(e){e.exports=function(e){e.data&&e.name&&(e=e.data);for(var t=!0,n="",r="",o=0;o<e.length;o++){var i=e[o];if(t)i?r+=String.fromCharCode(i):t=!1;else{if(!i)throw new Error("Invalid NULL character found. 0x00 character is not permitted in tEXt content");n+=String.fromCharCode(i)}}return{keyword:r,text:n}}},9686:function(e){e.exports=function(e,t){if(e=String(e),t=String(t),!/^[\x00-\xFF]+$/.test(e)||!/^[\x00-\xFF]+$/.test(t))throw new Error("Only Latin-1 characters are permitted in PNG tEXt chunks. You might want to consider base64 encoding and/or zEXt compression");if(e.length>=80)throw new Error('Keyword "'+e+'" is longer than the 79-character limit imposed by the PNG specification');for(var n,r=e.length+t.length+1,o=new Uint8Array(r),i=0,a=0;a<e.length;a++){if(!(n=e.charCodeAt(a)))throw new Error("0x00 character is not permitted in tEXt keywords");o[i++]=n}o[i++]=0;for(var l=0;l<t.length;l++){if(!(n=t.charCodeAt(l)))throw new Error("0x00 character is not permitted in tEXt content");o[i++]=n}return{name:"tEXt",data:o}}},1194:function(e,t,n){t.encode=n(9686),t.decode=n(9066)},3434:function(e,t,n){var r=n(5714),o=n(6233);e.exports=function(e){var t,n=8,c=n;for(t=0;t<e.length;t++)n+=e[t].data.length,n+=12;var s=new Uint8Array(n);for(s[0]=137,s[1]=80,s[2]=78,s[3]=71,s[4]=13,s[5]=10,s[6]=26,s[7]=10,t=0;t<e.length;t++){var u=e[t],d=u.name,f=u.data,p=f.length,h=[d.charCodeAt(0),d.charCodeAt(1),d.charCodeAt(2),d.charCodeAt(3)];l[0]=p,s[c++]=i[3],s[c++]=i[2],s[c++]=i[1],s[c++]=i[0],s[c++]=h[0],s[c++]=h[1],s[c++]=h[2],s[c++]=h[3];for(var m=0;m<p;)s[c++]=f[m++];var g=h.concat(r(f)),v=o.buf(g);a[0]=v,s[c++]=i[3],s[c++]=i[2],s[c++]=i[1],s[c++]=i[0]}return s};var i=new Uint8Array(4),a=new Int32Array(i.buffer),l=new Uint32Array(i.buffer)},2983:function(e,t,n){var r=n(6233);e.exports=function(e){if(137!==e[0])throw new Error("Invalid .png file header");if(80!==e[1])throw new Error("Invalid .png file header");if(78!==e[2])throw new Error("Invalid .png file header");if(71!==e[3])throw new Error("Invalid .png file header");if(13!==e[4])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(10!==e[5])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(26!==e[6])throw new Error("Invalid .png file header");if(10!==e[7])throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");var t=!1,n=[],l=8;for(;l<e.length;){o[3]=e[l++],o[2]=e[l++],o[1]=e[l++],o[0]=e[l++];var c=a[0]+4,s=new Uint8Array(c);s[0]=e[l++],s[1]=e[l++],s[2]=e[l++],s[3]=e[l++];var u=String.fromCharCode(s[0])+String.fromCharCode(s[1])+String.fromCharCode(s[2])+String.fromCharCode(s[3]);if(!n.length&&"IHDR"!==u)throw new Error("IHDR header missing");if("IEND"===u){t=!0,n.push({name:u,data:new Uint8Array(0)});break}for(var d=4;d<c;d++)s[d]=e[l++];o[3]=e[l++],o[2]=e[l++],o[1]=e[l++],o[0]=e[l++];var f=i[0];if(r.buf(s)!==f)throw new Error("CRC values for "+u+" header do not match, PNG file is likely corrupted");var p=new Uint8Array(s.buffer.slice(4));n.push({name:u,data:p})}if(!t)throw new Error(".png file ended prematurely: no IEND header was found");return n};var o=new Uint8Array(4),i=new Int32Array(o.buffer),a=new Uint32Array(o.buffer)},1493:function(e,t,n){"use strict";function r(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function o(e,t,n){const o=r(t,n);if(0===o)return r(e,t);let a=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/o;return a=Math.max(0,Math.min(1,a)),r(e,i(t,n,a))}function i(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function a(e,t,n,o){const l=o||[];if(function(e,t){const n=e[t+0],r=e[t+1],o=e[t+2],i=e[t+3];let a=3*r[0]-2*n[0]-i[0];a*=a;let l=3*r[1]-2*n[1]-i[1];l*=l;let c=3*o[0]-2*i[0]-n[0];c*=c;let s=3*o[1]-2*i[1]-n[1];return s*=s,a<c&&(a=c),l<s&&(l=s),a+l}(e,t)<n){const n=e[t+0];if(l.length){(c=l[l.length-1],s=n,Math.sqrt(r(c,s)))>1&&l.push(n)}else l.push(n);l.push(e[t+3])}else{const r=.5,o=e[t+0],c=e[t+1],s=e[t+2],u=e[t+3],d=i(o,c,r),f=i(c,s,r),p=i(s,u,r),h=i(d,f,r),m=i(f,p,r),g=i(h,m,r);a([o,d,h,g],0,n,l),a([g,m,p,u],0,n,l)}var c,s;return l}function l(e,t){return c(e,0,e.length,t)}function c(e,t,n,r,i){const a=i||[],l=e[t],s=e[n-1];let u=0,d=1;for(let r=t+1;r<n-1;++r){const t=o(e[r],l,s);t>u&&(u=t,d=r)}return Math.sqrt(u)>r?(c(e,t,d+1,r,a),c(e,d,n,r,a)):(a.length||a.push(l),a.push(s)),a}function s(e,t=.15,n){const r=[],o=(e.length-1)/3;for(let n=0;n<o;n++){a(e,3*n,t,r)}return n&&n>0?c(r,0,r.length,n):r}n.d(t,{o:function(){return l},s:function(){return s}})},6094:function(e,t,n){"use strict";var r=n(9787),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,i={},s=null,u=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:u,props:i,_owner:l.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},4512:function(e,t,n){"use strict";e.exports=n(6094)},8152:function(e,t,n){"use strict";function r(){return Math.floor(Math.random()*2**31)}n.d(t,{W:function(){return r},k:function(){return o}});class o{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}},8234:function(e,t,n){"use strict";function r(e,t,n){if(e&&e.length){const[r,o]=t,i=Math.PI/180*n,a=Math.cos(i),l=Math.sin(i);e.forEach((e=>{const[t,n]=e;e[0]=(t-r)*a-(n-o)*l+r,e[1]=(t-r)*l+(n-o)*a+o}))}}function o(e){const t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}function i(e,t){const n=t.hachureAngle+90;let o=t.hachureGap;o<0&&(o=4*t.strokeWidth),o=Math.max(o,.1);const i=[0,0];if(n)for(const t of e)r(t,i,n);const a=function(e,t){const n=[];for(const t of e){const e=[...t];e[0].join(",")!==e[e.length-1].join(",")&&e.push([e[0][0],e[0][1]]),e.length>2&&n.push(e)}const r=[];t=Math.max(t,.1);const o=[];for(const e of n)for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];if(n[1]!==r[1]){const e=Math.min(n[1],r[1]);o.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(o.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!o.length)return r;let i=[],a=o[0].ymin;for(;i.length||o.length;){if(o.length){let e=-1;for(let t=0;t<o.length&&!(o[t].ymin>a);t++)e=t;o.splice(0,e+1).forEach((e=>{i.push({s:a,edge:e})}))}if(i=i.filter((e=>!(e.edge.ymax<=a))),i.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),i.length>1)for(let e=0;e<i.length;e+=2){const t=e+1;if(t>=i.length)break;const n=i[e].edge,o=i[t].edge;r.push([[Math.round(n.x),a],[Math.round(o.x),a]])}a+=t,i.forEach((e=>{e.edge.x=e.edge.x+t*e.edge.islope}))}return r}(e,o);if(n){for(const t of e)r(t,i,-n);!function(e,t,n){const o=[];e.forEach((e=>o.push(...e))),r(o,t,n)}(a,i,-n)}return a}n.d(t,{Z:function(){return G}});class a{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){const n=i(e,t);return{type:"fillSketch",ops:this.renderLines(n,t)}}renderLines(e,t){const n=[];for(const r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}}class l extends a{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);const r=i(e,Object.assign({},t,{hachureGap:n})),a=Math.PI/180*t.hachureAngle,l=[],c=.5*n*Math.cos(a),s=.5*n*Math.sin(a);for(const[e,t]of r)o([e,t])&&l.push([[e[0]-c,e[1]+s],[...t]],[[e[0]+c,e[1]-s],[...t]]);return{type:"fillSketch",ops:this.renderLines(l,t)}}}class c extends a{fillPolygons(e,t){const n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),o=this._fillPolygons(e,r);return n.ops=n.ops.concat(o.ops),n}}class s{constructor(e){this.helper=e}fillPolygons(e,t){const n=i(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){const n=[];let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);const a=r/4;for(const l of e){const e=o(l),c=e/r,s=Math.ceil(c)-1,u=e-s*r,d=(l[0][0]+l[1][0])/2-r/4,f=Math.min(l[0][1],l[1][1]);for(let e=0;e<s;e++){const o=f+u+e*r,l=d-a+2*Math.random()*a,c=o-a+2*Math.random()*a,s=this.helper.ellipse(l,c,i,i,t);n.push(...s.ops)}}return{type:"fillSketch",ops:n}}}class u{constructor(e){this.helper=e}fillPolygons(e,t){const n=i(e,t);return{type:"fillSketch",ops:this.dashedLine(n,t)}}dashedLine(e,t){const n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((e=>{const a=o(e),l=Math.floor(a/(n+r)),c=(a+r-l*(n+r))/2;let s=e[0],u=e[1];s[0]>u[0]&&(s=e[1],u=e[0]);const d=Math.atan((u[1]-s[1])/(u[0]-s[0]));for(let e=0;e<l;e++){const o=e*(n+r),a=o+n,l=[s[0]+o*Math.cos(d)+c*Math.cos(d),s[1]+o*Math.sin(d)+c*Math.sin(d)],u=[s[0]+a*Math.cos(d)+c*Math.cos(d),s[1]+a*Math.sin(d)+c*Math.sin(d)];i.push(...this.helper.doubleLineOps(l[0],l[1],u[0],u[1],t))}})),i}}class d{constructor(e){this.helper=e}fillPolygons(e,t){const n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,o=i(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:"fillSketch",ops:this.zigzagLines(o,r,t)}}zigzagLines(e,t,n){const r=[];return e.forEach((e=>{const i=o(e),a=Math.round(i/(2*t));let l=e[0],c=e[1];l[0]>c[0]&&(l=e[1],c=e[0]);const s=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let e=0;e<a;e++){const o=2*e*t,i=2*(e+1)*t,a=Math.sqrt(2*Math.pow(t,2)),c=[l[0]+o*Math.cos(s),l[1]+o*Math.sin(s)],u=[l[0]+i*Math.cos(s),l[1]+i*Math.sin(s)],d=[c[0]+a*Math.cos(s+Math.PI/4),c[1]+a*Math.sin(s+Math.PI/4)];r.push(...this.helper.doubleLineOps(c[0],c[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}})),r}}const f={};var p=n(8152);const h={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function m(e,t){return e.type===t}function g(e){const t=[],n=function(e){const t=new Array;for(;""!==e;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:0,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:1,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:2,text:""},t}(e);let r="BOD",o=0,i=n[o];for(;!m(i,2);){let a=0;const l=[];if("BOD"===r){if("M"!==i.text&&"m"!==i.text)return g("M0,0"+e);o++,a=h[i.text],r=i.text}else m(i,1)?a=h[r]:(o++,a=h[i.text],r=i.text);if(!(o+a<n.length))throw new Error("Path data ended short");for(let e=o;e<o+a;e++){const t=n[e];if(!m(t,1))throw new Error("Param not a number: "+r+","+t.text);l[l.length]=+t.text}if("number"!=typeof h[r])throw new Error("Bad segment: "+r);{const e={key:r,data:l};t.push(e),o+=a,i=n[o],"M"===r&&(r="L"),"m"===r&&(r="l")}}return t}function v(e){let t=0,n=0,r=0,o=0;const i=[];for(const{key:a,data:l}of e)switch(a){case"M":i.push({key:"M",data:[...l]}),[t,n]=l,[r,o]=l;break;case"m":t+=l[0],n+=l[1],i.push({key:"M",data:[t,n]}),r=t,o=n;break;case"L":i.push({key:"L",data:[...l]}),[t,n]=l;break;case"l":t+=l[0],n+=l[1],i.push({key:"L",data:[t,n]});break;case"C":i.push({key:"C",data:[...l]}),t=l[4],n=l[5];break;case"c":{const e=l.map(((e,r)=>r%2?e+n:e+t));i.push({key:"C",data:e}),t=e[4],n=e[5];break}case"Q":i.push({key:"Q",data:[...l]}),t=l[2],n=l[3];break;case"q":{const e=l.map(((e,r)=>r%2?e+n:e+t));i.push({key:"Q",data:e}),t=e[2],n=e[3];break}case"A":i.push({key:"A",data:[...l]}),t=l[5],n=l[6];break;case"a":t+=l[5],n+=l[6],i.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],t,n]});break;case"H":i.push({key:"H",data:[...l]}),t=l[0];break;case"h":t+=l[0],i.push({key:"H",data:[t]});break;case"V":i.push({key:"V",data:[...l]}),n=l[0];break;case"v":n+=l[0],i.push({key:"V",data:[n]});break;case"S":i.push({key:"S",data:[...l]}),t=l[2],n=l[3];break;case"s":{const e=l.map(((e,r)=>r%2?e+n:e+t));i.push({key:"S",data:e}),t=e[2],n=e[3];break}case"T":i.push({key:"T",data:[...l]}),t=l[0],n=l[1];break;case"t":t+=l[0],n+=l[1],i.push({key:"T",data:[t,n]});break;case"Z":case"z":i.push({key:"Z",data:[]}),t=r,n=o}return i}function b(e){const t=[];let n="",r=0,o=0,i=0,a=0,l=0,c=0;for(const{key:s,data:u}of e){switch(s){case"M":t.push({key:"M",data:[...u]}),[r,o]=u,[i,a]=u;break;case"C":t.push({key:"C",data:[...u]}),r=u[4],o=u[5],l=u[2],c=u[3];break;case"L":t.push({key:"L",data:[...u]}),[r,o]=u;break;case"H":r=u[0],t.push({key:"L",data:[r,o]});break;case"V":o=u[0],t.push({key:"L",data:[r,o]});break;case"S":{let e=0,i=0;"C"===n||"S"===n?(e=r+(r-l),i=o+(o-c)):(e=r,i=o),t.push({key:"C",data:[e,i,...u]}),l=u[0],c=u[1],r=u[2],o=u[3];break}case"T":{const[e,i]=u;let a=0,s=0;"Q"===n||"T"===n?(a=r+(r-l),s=o+(o-c)):(a=r,s=o);const d=r+2*(a-r)/3,f=o+2*(s-o)/3,p=e+2*(a-e)/3,h=i+2*(s-i)/3;t.push({key:"C",data:[d,f,p,h,e,i]}),l=a,c=s,r=e,o=i;break}case"Q":{const[e,n,i,a]=u,s=r+2*(e-r)/3,d=o+2*(n-o)/3,f=i+2*(e-i)/3,p=a+2*(n-a)/3;t.push({key:"C",data:[s,d,f,p,i,a]}),l=e,c=n,r=i,o=a;break}case"A":{const e=Math.abs(u[0]),n=Math.abs(u[1]),i=u[2],a=u[3],l=u[4],c=u[5],s=u[6];if(0===e||0===n)t.push({key:"C",data:[r,o,c,s,c,s]}),r=c,o=s;else if(r!==c||o!==s){x(r,o,c,s,e,n,i,a,l).forEach((function(e){t.push({key:"C",data:e})})),r=c,o=s}break}case"Z":t.push({key:"Z",data:[]}),r=i,o=a}n=s}return t}function y(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function x(e,t,n,r,o,i,a,l,c,s){const u=(d=a,Math.PI*d/180);var d;let f=[],p=0,h=0,m=0,g=0;if(s)[p,h,m,g]=s;else{[e,t]=y(e,t,-u),[n,r]=y(n,r,-u);const a=(e-n)/2,s=(t-r)/2;let d=a*a/(o*o)+s*s/(i*i);d>1&&(d=Math.sqrt(d),o*=d,i*=d);const f=o*o,v=i*i,b=f*v-f*s*s-v*a*a,x=f*s*s+v*a*a,w=(l===c?-1:1)*Math.sqrt(Math.abs(b/x));m=w*o*s/i+(e+n)/2,g=w*-i*a/o+(t+r)/2,p=Math.asin(parseFloat(((t-g)/i).toFixed(9))),h=Math.asin(parseFloat(((r-g)/i).toFixed(9))),e<m&&(p=Math.PI-p),n<m&&(h=Math.PI-h),p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),c&&p>h&&(p-=2*Math.PI),!c&&h>p&&(h-=2*Math.PI)}let v=h-p;if(Math.abs(v)>120*Math.PI/180){const e=h,t=n,l=r;h=c&&h>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=x(n=m+o*Math.cos(h),r=g+i*Math.sin(h),t,l,o,i,a,0,c,[h,e,m,g])}v=h-p;const b=Math.cos(p),w=Math.sin(p),k=Math.cos(h),E=Math.sin(h),j=Math.tan(v/4),S=4/3*o*j,O=4/3*i*j,_=[e,t],C=[e+S*w,t-O*b],P=[n+S*E,r-O*k],T=[n,r];if(C[0]=2*_[0]-C[0],C[1]=2*_[1]-C[1],s)return[C,P,T].concat(f);{f=[C,P,T].concat(f);const e=[];for(let t=0;t<f.length;t+=3){const n=y(f[t][0],f[t][1],u),r=y(f[t+1][0],f[t+1][1],u),o=y(f[t+2][0],f[t+2][1],u);e.push([n[0],n[1],r[0],r[1],o[0],o[1]])}return e}}const w={randOffset:function(e,t){return D(e,t)},randOffsetWithRange:function(e,t,n){return M(e,t,n)},ellipse:function(e,t,n,r,o){const i=O(n,r,o);return _(e,t,o,i).opset},doubleLineOps:function(e,t,n,r,o){return A(e,t,n,r,o,!0)}};function k(e,t,n,r,o){return{type:"path",ops:A(e,t,n,r,o)}}function E(e,t,n){const r=(e||[]).length;if(r>2){const o=[];for(let t=0;t<r-1;t++)o.push(...A(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&o.push(...A(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:o}}return 2===r?k(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function j(e,t,n,r,o){return function(e,t){return E(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],o)}function S(e,t){let n=Z(e,1*(1+.2*t.roughness),t);if(!t.disableMultiStroke){const r=Z(e,1.5*(1+.22*t.roughness),function(e){const t=Object.assign({},e);t.randomizer=void 0,e.seed&&(t.seed=e.seed+1);return t}(t));n=n.concat(r)}return{type:"path",ops:n}}function O(e,t,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),i=2*Math.PI/o;let a=Math.abs(e/2),l=Math.abs(t/2);const c=1-n.curveFitting;return a+=D(a*c,n),l+=D(l*c,n),{increment:i,rx:a,ry:l}}function _(e,t,n,r){const[o,i]=z(r.increment,e,t,r.rx,r.ry,1,r.increment*M(.1,M(.4,1,n),n),n);let a=R(o,null,n);if(!n.disableMultiStroke&&0!==n.roughness){const[o]=z(r.increment,e,t,r.rx,r.ry,1.5,0,n),i=R(o,null,n);a=a.concat(i)}return{estimatedPoints:i,opset:{type:"path",ops:a}}}function C(e,t,n,r,o,i,a,l,c){const s=e,u=t;let d=Math.abs(n/2),f=Math.abs(r/2);d+=D(.01*d,c),f+=D(.01*f,c);let p=o,h=i;for(;p<0;)p+=2*Math.PI,h+=2*Math.PI;h-p>2*Math.PI&&(p=0,h=2*Math.PI);const m=2*Math.PI/c.curveStepCount,g=Math.min(m/2,(h-p)/2),v=N(g,s,u,d,f,p,h,1,c);if(!c.disableMultiStroke){const e=N(g,s,u,d,f,p,h,1.5,c);v.push(...e)}return a&&(l?v.push(...A(s,u,s+d*Math.cos(p),u+f*Math.sin(p),c),...A(s,u,s+d*Math.cos(h),u+f*Math.sin(h),c)):v.push({op:"lineTo",data:[s,u]},{op:"lineTo",data:[s+d*Math.cos(p),u+f*Math.sin(p)]})),{type:"path",ops:v}}function P(e,t){const n=[];for(const r of e)if(r.length){const e=t.maxRandomnessOffset||0,o=r.length;if(o>2){n.push({op:"move",data:[r[0][0]+D(e,t),r[0][1]+D(e,t)]});for(let i=1;i<o;i++)n.push({op:"lineTo",data:[r[i][0]+D(e,t),r[i][1]+D(e,t)]})}}return{type:"fillPath",ops:n}}function T(e,t){return function(e,t){let n=e.fillStyle||"hachure";if(!f[n])switch(n){case"zigzag":f[n]||(f[n]=new l(t));break;case"cross-hatch":f[n]||(f[n]=new c(t));break;case"dots":f[n]||(f[n]=new s(t));break;case"dashed":f[n]||(f[n]=new u(t));break;case"zigzag-line":f[n]||(f[n]=new d(t));break;default:n="hachure",f[n]||(f[n]=new a(t))}return f[n]}(t,w).fillPolygons(e,t)}function I(e){return e.randomizer||(e.randomizer=new p.k(e.seed||0)),e.randomizer.next()}function M(e,t,n,r=1){return n.roughness*r*(I(n)*(t-e)+e)}function D(e,t,n=1){return M(-e,e,t,n)}function A(e,t,n,r,o,i=!1){const a=i?o.disableMultiStrokeFill:o.disableMultiStroke,l=L(e,t,n,r,o,!0,!1);if(a)return l;const c=L(e,t,n,r,o,!0,!0);return l.concat(c)}function L(e,t,n,r,o,i,a){const l=Math.pow(e-n,2)+Math.pow(t-r,2),c=Math.sqrt(l);let s=1;s=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=o.maxRandomnessOffset||0;u*u*100>l&&(u=c/10);const d=u/2,f=.2+.2*I(o);let p=o.bowing*o.maxRandomnessOffset*(r-t)/200,h=o.bowing*o.maxRandomnessOffset*(e-n)/200;p=D(p,o,s),h=D(h,o,s);const m=[],g=()=>D(d,o,s),v=()=>D(u,o,s),b=o.preserveVertices;return i&&(a?m.push({op:"move",data:[e+(b?0:g()),t+(b?0:g())]}):m.push({op:"move",data:[e+(b?0:D(u,o,s)),t+(b?0:D(u,o,s))]})),a?m.push({op:"bcurveTo",data:[p+e+(n-e)*f+g(),h+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),h+t+2*(r-t)*f+g(),n+(b?0:g()),r+(b?0:g())]}):m.push({op:"bcurveTo",data:[p+e+(n-e)*f+v(),h+t+(r-t)*f+v(),p+e+2*(n-e)*f+v(),h+t+2*(r-t)*f+v(),n+(b?0:v()),r+(b?0:v())]}),m}function Z(e,t,n){const r=[];r.push([e[0][0]+D(t,n),e[0][1]+D(t,n)]),r.push([e[0][0]+D(t,n),e[0][1]+D(t,n)]);for(let o=1;o<e.length;o++)r.push([e[o][0]+D(t,n),e[o][1]+D(t,n)]),o===e.length-1&&r.push([e[o][0]+D(t,n),e[o][1]+D(t,n)]);return R(r,null,n)}function R(e,t,n){const r=e.length,o=[];if(r>3){const i=[],a=1-n.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){const n=e[t];i[0]=[n[0],n[1]],i[1]=[n[0]+(a*e[t+1][0]-a*e[t-1][0])/6,n[1]+(a*e[t+1][1]-a*e[t-1][1])/6],i[2]=[e[t+1][0]+(a*e[t][0]-a*e[t+2][0])/6,e[t+1][1]+(a*e[t][1]-a*e[t+2][1])/6],i[3]=[e[t+1][0],e[t+1][1]],o.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[3][0],i[3][1]]})}if(t&&2===t.length){const e=n.maxRandomnessOffset;o.push({op:"lineTo",data:[t[0]+D(e,n),t[1]+D(e,n)]})}}else 3===r?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):2===r&&o.push(...A(e[0][0],e[0][1],e[1][0],e[1][1],n));return o}function z(e,t,n,r,o,i,a,l){const c=[],s=[];if(0===l.roughness){e/=4,s.push([t+r*Math.cos(-e),n+o*Math.sin(-e)]);for(let i=0;i<=2*Math.PI;i+=e){const e=[t+r*Math.cos(i),n+o*Math.sin(i)];c.push(e),s.push(e)}s.push([t+r*Math.cos(0),n+o*Math.sin(0)]),s.push([t+r*Math.cos(e),n+o*Math.sin(e)])}else{const u=D(.5,l)-Math.PI/2;s.push([D(i,l)+t+.9*r*Math.cos(u-e),D(i,l)+n+.9*o*Math.sin(u-e)]);const d=2*Math.PI+u-.01;for(let a=u;a<d;a+=e){const e=[D(i,l)+t+r*Math.cos(a),D(i,l)+n+o*Math.sin(a)];c.push(e),s.push(e)}s.push([D(i,l)+t+r*Math.cos(u+2*Math.PI+.5*a),D(i,l)+n+o*Math.sin(u+2*Math.PI+.5*a)]),s.push([D(i,l)+t+.98*r*Math.cos(u+a),D(i,l)+n+.98*o*Math.sin(u+a)]),s.push([D(i,l)+t+.9*r*Math.cos(u+.5*a),D(i,l)+n+.9*o*Math.sin(u+.5*a)])}return[s,c]}function N(e,t,n,r,o,i,a,l,c){const s=i+D(.1,c),u=[];u.push([D(l,c)+t+.9*r*Math.cos(s-e),D(l,c)+n+.9*o*Math.sin(s-e)]);for(let i=s;i<=a;i+=e)u.push([D(l,c)+t+r*Math.cos(i),D(l,c)+n+o*Math.sin(i)]);return u.push([t+r*Math.cos(a),n+o*Math.sin(a)]),u.push([t+r*Math.cos(a),n+o*Math.sin(a)]),R(u,null,c)}function B(e,t,n,r,o,i,a,l){const c=[],s=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3];let u=[0,0];const d=l.disableMultiStroke?1:2,f=l.preserveVertices;for(let p=0;p<d;p++)0===p?c.push({op:"move",data:[a[0],a[1]]}):c.push({op:"move",data:[a[0]+(f?0:D(s[0],l)),a[1]+(f?0:D(s[0],l))]}),u=f?[o,i]:[o+D(s[p],l),i+D(s[p],l)],c.push({op:"bcurveTo",data:[e+D(s[p],l),t+D(s[p],l),n+D(s[p],l),r+D(s[p],l),u[0],u[1]]});return c}function H(e){return[...e]}var W=n(1493);const F="none";class U{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return(0,p.W)()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,o){const i=this._o(o);return this._d("line",[k(e,t,n,r,i)],i)}rectangle(e,t,n,r,o){const i=this._o(o),a=[],l=j(e,t,n,r,i);if(i.fill){const o=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];"solid"===i.fillStyle?a.push(P([o],i)):a.push(T([o],i))}return i.stroke!==F&&a.push(l),this._d("rectangle",a,i)}ellipse(e,t,n,r,o){const i=this._o(o),a=[],l=O(n,r,i),c=_(e,t,i,l);if(i.fill)if("solid"===i.fillStyle){const n=_(e,t,i,l).opset;n.type="fillPath",a.push(n)}else a.push(T([c.estimatedPoints],i));return i.stroke!==F&&a.push(c.opset),this._d("ellipse",a,i)}circle(e,t,n,r){const o=this.ellipse(e,t,n,n,r);return o.shape="circle",o}linearPath(e,t){const n=this._o(t);return this._d("linearPath",[E(e,!1,n)],n)}arc(e,t,n,r,o,i,a=!1,l){const c=this._o(l),s=[],u=C(e,t,n,r,o,i,a,!0,c);if(a&&c.fill)if("solid"===c.fillStyle){const a=Object.assign({},c);a.disableMultiStroke=!0;const l=C(e,t,n,r,o,i,!0,!1,a);l.type="fillPath",s.push(l)}else s.push(function(e,t,n,r,o,i,a){const l=e,c=t;let s=Math.abs(n/2),u=Math.abs(r/2);s+=D(.01*s,a),u+=D(.01*u,a);let d=o,f=i;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);const p=(f-d)/a.curveStepCount,h=[];for(let e=d;e<=f;e+=p)h.push([l+s*Math.cos(e),c+u*Math.sin(e)]);return h.push([l+s*Math.cos(f),c+u*Math.sin(f)]),h.push([l,c]),T([h],a)}(e,t,n,r,o,i,c));return c.stroke!==F&&s.push(u),this._d("arc",s,c)}curve(e,t){const n=this._o(t),r=[],o=S(e,n);if(n.fill&&n.fill!==F&&e.length>=3){const t=function(e,t=0){const n=e.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(3===n)r.push(H(e[0]),H(e[1]),H(e[2]),H(e[2]));else{const n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);const o=[],i=1-t;r.push(H(n[0]));for(let e=1;e+2<n.length;e++){const t=n[e];o[0]=[t[0],t[1]],o[1]=[t[0]+(i*n[e+1][0]-i*n[e-1][0])/6,t[1]+(i*n[e+1][1]-i*n[e-1][1])/6],o[2]=[n[e+1][0]+(i*n[e][0]-i*n[e+2][0])/6,n[e+1][1]+(i*n[e][1]-i*n[e+2][1])/6],o[3]=[n[e+1][0],n[e+1][1]],r.push(o[1],o[2],o[3])}}return r}(e),o=(0,W.s)(t,10,(1+n.roughness)/2);"solid"===n.fillStyle?r.push(P([o],n)):r.push(T([o],n))}return n.stroke!==F&&r.push(o),this._d("curve",r,n)}polygon(e,t){const n=this._o(t),r=[],o=E(e,!0,n);return n.fill&&("solid"===n.fillStyle?r.push(P([e],n)):r.push(T([e],n))),n.stroke!==F&&r.push(o),this._d("polygon",r,n)}path(e,t){const n=this._o(t),r=[];if(!e)return this._d("path",r,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=n.fill&&"transparent"!==n.fill&&n.fill!==F,i=n.stroke!==F,a=!!(n.simplification&&n.simplification<1),l=function(e,t,n){const r=b(v(g(e))),o=[];let i=[],a=[0,0],l=[];const c=()=>{l.length>=4&&i.push(...(0,W.s)(l,t)),l=[]},s=()=>{c(),i.length&&(o.push(i),i=[])};for(const{key:e,data:t}of r)switch(e){case"M":s(),a=[t[0],t[1]],i.push(a);break;case"L":c(),i.push([t[0],t[1]]);break;case"C":if(!l.length){const e=i.length?i[i.length-1]:a;l.push([e[0],e[1]])}l.push([t[0],t[1]]),l.push([t[2],t[3]]),l.push([t[4],t[5]]);break;case"Z":c(),i.push([a[0],a[1]])}if(s(),!n)return o;const u=[];for(const e of o){const t=(0,W.o)(e,n);t.length&&u.push(t)}return u}(e,1,a?4-4*n.simplification:(1+n.roughness)/2);return o&&("solid"===n.fillStyle?r.push(P(l,n)):r.push(T(l,n))),i&&(a?l.forEach((e=>{r.push(E(e,!1,n))})):r.push(function(e,t){const n=b(v(g(e))),r=[];let o=[0,0],i=[0,0];for(const{key:e,data:a}of n)switch(e){case"M":{const e=1*(t.maxRandomnessOffset||0),n=t.preserveVertices;r.push({op:"move",data:a.map((r=>r+(n?0:D(e,t))))}),i=[a[0],a[1]],o=[a[0],a[1]];break}case"L":r.push(...A(i[0],i[1],a[0],a[1],t)),i=[a[0],a[1]];break;case"C":{const[e,n,o,l,c,s]=a;r.push(...B(e,n,o,l,c,s,i,t)),i=[c,s];break}case"Z":r.push(...A(i[0],i[1],o[0],o[1],t)),i=[o[0],o[1]]}return{type:"path",ops:r}}(e,n))),this._d("path",r,n)}opsToPath(e,t){let n="";for(const r of e.ops){const e="number"==typeof t&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case"move":n+=`M${e[0]} ${e[1]} `;break;case"bcurveTo":n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case"lineTo":n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){const t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(const e of t){let t=null;switch(e.type){case"path":t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:F};break;case"fillPath":t={d:this.opsToPath(e),stroke:F,strokeWidth:0,fill:n.fill||F};break;case"fillSketch":t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||F,strokeWidth:n,fill:F}}}class K{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new U(t)}draw(e){const t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const i of t)switch(i.type){case"path":r.save(),r.strokeStyle="none"===n.stroke?"transparent":n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,i,o),r.restore();break;case"fillPath":{r.save(),r.fillStyle=n.fill||"";const t="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(r,i,o,t),r.restore();break}case"fillSketch":this.fillSketch(r,i,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r="nonzero"){e.beginPath();for(const r of t.ops){const t="number"==typeof n&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case"move":e.moveTo(t[0],t[1]);break;case"bcurveTo":e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case"lineTo":e.lineTo(t[0],t[1])}}"fillPath"===t.type?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,o){const i=this.gen.line(e,t,n,r,o);return this.draw(i),i}rectangle(e,t,n,r,o){const i=this.gen.rectangle(e,t,n,r,o);return this.draw(i),i}ellipse(e,t,n,r,o){const i=this.gen.ellipse(e,t,n,r,o);return this.draw(i),i}circle(e,t,n,r){const o=this.gen.circle(e,t,n,r);return this.draw(o),o}linearPath(e,t){const n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){const n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,o,i,a=!1,l){const c=this.gen.arc(e,t,n,r,o,i,a,l);return this.draw(c),c}curve(e,t){const n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){const n=this.gen.path(e,t);return this.draw(n),n}}const Y="http://www.w3.org/2000/svg";class V{constructor(e,t){this.svg=e,this.gen=new U(t)}draw(e){const t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,o=r.createElementNS(Y,"g"),i=e.options.fixedDecimalPlaceDigits;for(const a of t){let t=null;switch(a.type){case"path":t=r.createElementNS(Y,"path"),t.setAttribute("d",this.opsToPath(a,i)),t.setAttribute("stroke",n.stroke),t.setAttribute("stroke-width",n.strokeWidth+""),t.setAttribute("fill","none"),n.strokeLineDash&&t.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":t=r.createElementNS(Y,"path"),t.setAttribute("d",this.opsToPath(a,i)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",n.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(r,a,n)}t&&o.appendChild(t)}return o}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);const o=e.createElementNS(Y,"path");return o.setAttribute("d",this.opsToPath(t,n.fixedDecimalPlaceDigits)),o.setAttribute("stroke",n.fill||""),o.setAttribute("stroke-width",r+""),o.setAttribute("fill","none"),n.fillLineDash&&o.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,o){const i=this.gen.line(e,t,n,r,o);return this.draw(i)}rectangle(e,t,n,r,o){const i=this.gen.rectangle(e,t,n,r,o);return this.draw(i)}ellipse(e,t,n,r,o){const i=this.gen.ellipse(e,t,n,r,o);return this.draw(i)}circle(e,t,n,r){const o=this.gen.circle(e,t,n,r);return this.draw(o)}linearPath(e,t){const n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){const n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,o,i,a=!1,l){const c=this.gen.arc(e,t,n,r,o,i,a,l);return this.draw(c)}curve(e,t){const n=this.gen.curve(e,t);return this.draw(n)}path(e,t){const n=this.gen.path(e,t);return this.draw(n)}}var G={canvas:(e,t)=>new K(e,t),svg:(e,t)=>new V(e,t),generator:e=>new U(e),newSeed:()=>U.newSeed()}},5714:function(e){e.exports=function(e,t,n){var r=[],o=e.length;if(0===o)return r;var i=t<0?Math.max(0,t+o):t||0;for(void 0!==n&&(o=n<0?n+o:n);o-- >i;)r[o-i]=e[o];return r}},5422:function(e,t,n){"use strict";var r=n(487),o=n.n(r),i=n(631),a=n.n(i),l=n(2052),c=n.n(l),s=n(4010),u=n.n(s),d=n(1469),f=n.n(d),p=n(9329),h=n.n(p),m=n(2044),g={};g.styleTagTransform=h(),g.setAttributes=u(),g.insert=c().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=f();o()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals},487:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],l=0;l<e.length;l++){var c=e[l],s=r.base?c[0]+r.base:c[0],u=i[s]||0,d="".concat(s," ").concat(u);i[s]=u+1;var f=n(d),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==f)t[f].references++,t[f].updater(p);else{var h=o(p,r);r.byIndex=l,t.splice(l,0,{identifier:d,updater:h,references:1})}a.push(d)}return a}function o(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var l=n(i[a]);t[l].references--}for(var c=r(e,o),s=0;s<i.length;s++){var u=n(i[s]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=c}}},2052:function(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},1469:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},4010:function(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},631:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9329:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},2173:function(e,t,n){"use strict";var r=n(9787);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,l=r.useLayoutEffect,c=r.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return l((function(){o.value=n,o.getSnapshot=t,s(o)&&u({inst:o})}),[e,n,t]),a((function(){return s(o)&&u({inst:o}),e((function(){s(o)&&u({inst:o})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},5917:function(e,t,n){"use strict";var r=n(9787),o=n(1374);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,l=r.useRef,c=r.useEffect,s=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=l(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s((function(){function e(e){if(!c){if(c=!0,a=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return l=t}return l=e}if(t=l,i(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(a=e,l=n)}var a,l,c=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,n,r,o]);var p=a(e,d[0],d[1]);return c((function(){f.hasValue=!0,f.value=p}),[p]),u(p),p}},1374:function(e,t,n){"use strict";e.exports=n(2173)},5668:function(e,t,n){"use strict";e.exports=n(5917)},940:function(e,t,n){var r={"./ar-SA.json":[7822,2091],"./bg-BG.json":[1203,1628],"./bn-BD.json":[8525,7429],"./ca-ES.json":[510,5130],"./cs-CZ.json":[7605,6265],"./da-DK.json":[2392,1790],"./de-DE.json":[2853,3082],"./el-GR.json":[9876,1513],"./en.json":[1463],"./es-ES.json":[9952,8759],"./eu-ES.json":[5658,8081],"./fa-IR.json":[3747,5330],"./fi-FI.json":[9490,3512],"./fr-FR.json":[7830,3682],"./gl-ES.json":[5199,2943],"./he-IL.json":[1994,2312],"./hi-IN.json":[4646,9828],"./hu-HU.json":[6373,7368],"./id-ID.json":[3247,3808],"./it-IT.json":[3257,6239],"./ja-JP.json":[198,1204],"./kaa.json":[7941,663],"./kab-KAB.json":[228,9551],"./kk-KZ.json":[8972,22],"./km-KH.json":[5845,6566],"./ko-KR.json":[7596,6844],"./ku-TR.json":[2508,3031],"./lt-LT.json":[3755,8340],"./lv-LV.json":[2327,6768],"./mr-IN.json":[5297,3397],"./my-MM.json":[7704,1477],"./nb-NO.json":[1167,2359],"./nl-NL.json":[290,3024],"./nn-NO.json":[4481,3885],"./oc-FR.json":[2284,1690],"./pa-IN.json":[5383,3162],"./percentages.json":[4451],"./pl-PL.json":[3661,3674],"./pt-BR.json":[8881,3721],"./pt-PT.json":[125,5395],"./ro-RO.json":[2013,5089],"./ru-RU.json":[2253,8124],"./si-LK.json":[5497,1302],"./sk-SK.json":[4570,8750],"./sl-SI.json":[1984,6071],"./sv-SE.json":[6006,8534],"./ta-IN.json":[3952,2404],"./th-TH.json":[2596,537],"./tr-TR.json":[7315,4977],"./uk-UA.json":[334,7759],"./vi-VN.json":[456,4e3],"./zh-CN.json":[1037,4680],"./zh-HK.json":[5334,7920],"./zh-TW.json":[931,3421]};function o(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],o=t[0];return Promise.all(t.slice(1).map(n.e)).then((function(){return n.t(o,19)}))}o.keys=function(){return Object.keys(r)},o.id=940,e.exports=o},9713:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},6479:function(e,t,n){var r=n(7316);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},7316:function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},4295:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(3940),n.b),u=new URL(n(3147),n.b),d=new URL(n(8303),n.b),f=new URL(n(1273),n.b),p=new URL(n(9577),n.b),h=new URL(n(9729),n.b),m=a()(o()),g=c()(s),v=c()(u),b=c()(d),y=c()(f),x=c()(p),w=c()(h);m.push([e.id,'@font-face{font-family:"Virgil";src:url('+g+');font-display:swap}@font-face{font-family:"Cascadia";src:url('+v+');font-display:swap}@font-face{font-family:"Assistant";src:url('+b+');font-display:swap;font-weight:400}@font-face{font-family:"Assistant";src:url('+y+');font-display:swap;font-weight:500}@font-face{font-family:"Assistant";src:url('+x+');font-display:swap;font-weight:600}@font-face{font-family:"Assistant";src:url('+w+");font-display:swap;font-weight:700}",""]),t.Z=m},6086:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".zoom-actions,.undo-redo-buttons{background-color:var(--island-bg-color);border-radius:var(--border-radius-lg)}.zoom-button,.undo-redo-buttons button{border:1px solid var(--default-border-color) !important;border-radius:0 !important;background-color:rgba(0,0,0,0) !important;font-size:.875rem !important;width:var(--lg-button-size);height:var(--lg-button-size)}.zoom-button svg,.undo-redo-buttons button svg{width:var(--lg-icon-size) !important;height:var(--lg-icon-size) !important}.zoom-button .ToolIcon__icon,.undo-redo-buttons button .ToolIcon__icon{width:100%;height:100%}.reset-zoom-button{border-left:0 !important;border-right:0 !important;padding:0 .625rem !important;width:3.75rem !important;justify-content:center;color:var(--text-primary-color)}.zoom-out-button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important}:root[dir=rtl] .zoom-out-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-out-button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.zoom-in-button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir=rtl] .zoom-in-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-in-button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.undo-redo-buttons .undo-button-container button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important;border-right:0 !important}:root[dir=rtl] .undo-redo-buttons .undo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .undo-button-container button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.undo-redo-buttons .redo-button-container button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir=rtl] .undo-redo-buttons .redo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .redo-button-container button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}",""]),t.Z=a},3729:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Avatar{width:1.25rem;height:1.25rem;position:relative;border-radius:100%;outline-offset:2px;display:flex;justify-content:center;align-items:center;color:#fff;cursor:pointer;font-size:.625rem;font-weight:500;line-height:1}.excalidraw .Avatar-img{width:100%;height:100%;border-radius:100%}.excalidraw .Avatar::before{content:"";position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border:1px solid var(--avatar-border-color);border-radius:100%}',""]),t.Z=a},3137:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(7984),n.b),u=new URL(n(1639),n.b),d=a()(o()),f=c()(s),p=c()(u);d.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+f+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-gray-80);--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: rgba(255, 255, 255, 0.96);--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: #ffffff;--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top);--select-highlight-color: #339af0;--shadow-island: 0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702);--button-hover-bg: var(--color-gray-10);--default-border-color: var(--color-gray-30);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-gray-20);--sidebar-bg-color: #fff;--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-gray-80);--color-selection: #6965db;--color-icon-white: #ffffff;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-primary-light-darker: #d7d5ff;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-promo: #e70078;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+p+");--focus-highlight-color: #228be6;--icon-fill-color: var(--color-gray-40);--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: #262627;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-bg-color: #2c2c2c;--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--text-primary-color: var(--color-gray-40);--button-hover-bg: var(--color-gray-80);--default-border-color: var(--color-gray-80);--shadow-island: 0px 13px 33px rgba(0, 0, 0, 0.07), 0px 4.13px 9.94853px rgba(0, 0, 0, 0.0456112), 0px 1.13px 4.13211px rgba(0, 0, 0, 0.035), 0px 0.769896px 1.4945px rgba(0, 0, 0, 0.0243888);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--sidebar-border-color: var(--color-gray-85);--sidebar-bg-color: #191919;--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-icon-white: var(--color-gray-90);--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-primary-light-darker: #43415e;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-promo: #d297ff}.excalidraw .excalidraw-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color))}.excalidraw .excalidraw-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .excalidraw-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .excalidraw-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .excalidraw-button.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .excalidraw-button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .excalidraw-button.active svg{color:var(--button-color, var(--color-primary-darker))}",""]),t.Z=d},4241:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Card{display:flex;flex-direction:column;align-items:center;max-width:290px;margin:1em;text-align:center}.excalidraw .Card .Card-icon{font-size:2.6em;display:flex;flex:0 0 auto;padding:1.4rem;border-radius:50%;background:var(--card-color);color:#fff}.excalidraw .Card .Card-icon svg{width:2.8rem;height:2.8rem}.excalidraw .Card .Card-details{font-size:.96em;min-height:90px;padding:0 1em;margin-bottom:auto}.excalidraw .Card .Card-button.ToolIcon_type_button{height:2.5rem;margin-top:1em;margin-bottom:.3em;background-color:var(--card-color)}.excalidraw .Card .Card-button.ToolIcon_type_button:hover{background-color:var(--card-color-darker)}.excalidraw .Card .Card-button.ToolIcon_type_button:active{background-color:var(--card-color-darkest)}.excalidraw .Card .Card-button.ToolIcon_type_button .ToolIcon__label{color:#fff}.excalidraw .Card .Card-button.ToolIcon_type_button .Spinner{--spinner-color: #fff}",""]),t.Z=a},6029:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Checkbox{margin:4px .3em;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus){box-shadow:0 0 0 2px #4dabf7}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus) svg{display:block;opacity:.3}.excalidraw .Checkbox:active .Checkbox-box{box-shadow:0 0 2px 1px inset #1c7ed6 !important}.excalidraw .Checkbox:hover .Checkbox-box{background-color:rgba(208,235,255,.2)}.excalidraw .Checkbox.is-checked .Checkbox-box{background-color:#d0ebff}.excalidraw .Checkbox.is-checked .Checkbox-box svg{display:block}.excalidraw .Checkbox.is-checked:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .Checkbox .Checkbox-box{width:22px;height:22px;padding:0;flex:0 0 auto;margin:0 1em;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #1c7ed6;background-color:rgba(0,0,0,0);border-radius:4px;color:#1c7ed6;border:0}.excalidraw .Checkbox .Checkbox-box:focus{box-shadow:0 0 0 3px #1c7ed6}.excalidraw .Checkbox .Checkbox-box svg{display:none;width:16px;height:16px;stroke-width:3px}.excalidraw .Checkbox .Checkbox-label{display:flex;align-items:center}.excalidraw .Checkbox .excalidraw-tooltip-icon{width:1em;height:1em}",""]),t.Z=a},4269:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(9669),n.b),u=a()(o()),d=c()(s);u.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .focus-visible-none:focus-visible{outline:none !important}.excalidraw .color-picker__heading{padding:0 .5rem;font-size:.75rem;text-align:left}.excalidraw .color-picker-container{display:grid;grid-template-columns:1fr 20px 1.625rem;padding:.25rem 0px;align-items:center}.excalidraw--mobile.excalidraw .color-picker-container{max-width:175px}.excalidraw .color-picker__top-picks{display:flex;justify-content:space-between}.excalidraw .color-picker__button{--radius: 0.25rem;padding:0;margin:0;width:1.35rem;height:1.35rem;border:1px solid var(--color-gray-30);border-radius:var(--radius);-webkit-filter:var(--theme-filter);filter:var(--theme-filter);background-color:var(--swatch-color);background-position:left center;position:relative;font-family:inherit;box-sizing:border-box}.excalidraw .color-picker__button:hover::after{content:"";position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;box-shadow:0 0 0 1px var(--color-gray-30);border-radius:calc(var(--radius) + 1px);-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker__button.active .color-picker__button-outline{position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;box-shadow:0 0 0 1px var(--color-primary-darkest);z-index:1;border-radius:calc(var(--radius) + 1px);-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker__button:focus-visible{outline:none}.excalidraw .color-picker__button:focus-visible::after{content:"";position:absolute;top:-4px;right:-4px;bottom:-4px;left:-4px;border:3px solid var(--focus-highlight-color);border-radius:calc(var(--radius) + 1px)}.excalidraw .color-picker__button:focus-visible.active .color-picker__button-outline{display:none}.excalidraw .color-picker__button--large{--radius: 0.5rem;width:1.875rem;height:1.875rem}.excalidraw .color-picker__button.is-transparent{background-image:url('+d+")}.excalidraw .color-picker__button--no-focus-visible{border:0}.excalidraw .color-picker__button--no-focus-visible::after{display:none}.excalidraw .color-picker__button--no-focus-visible:focus-visible{outline:none !important}.excalidraw .color-picker__button.active-color{border-radius:calc(var(--radius) + 1px);width:1.625rem;height:1.625rem}.excalidraw .color-picker__button__hotkey-label{position:absolute;right:4px;bottom:4px;-webkit-filter:none;filter:none;font-size:11px}.excalidraw .color-picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 0 1px 4px;border-radius:4px;position:absolute}:root[dir=ltr] .excalidraw .color-picker{left:-5.5px}:root[dir=rtl] .excalidraw .color-picker{right:-5.5px}.excalidraw .color-picker-control-container{display:grid;grid-template-columns:auto 1fr;align-items:center;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .color-picker-control-container+.popover{position:static}.excalidraw .color-picker-popover-container{margin-top:-0.25rem}:root[dir=ltr] .excalidraw .color-picker-popover-container{margin-left:.5rem}:root[dir=rtl] .excalidraw .color-picker-popover-container{margin-left:-3rem}.excalidraw .color-picker-triangle{width:0;height:0;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color);position:absolute;top:10px}:root[dir=ltr] .excalidraw .color-picker-triangle{-webkit-transform:rotate(270deg);transform:rotate(270deg);left:-14px}:root[dir=rtl] .excalidraw .color-picker-triangle{-webkit-transform:rotate(90deg);transform:rotate(90deg);right:-14px}.excalidraw .color-picker-triangle-shadow{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1)}:root[dir=ltr] .excalidraw .color-picker-triangle-shadow{left:-14px}:root[dir=rtl] .excalidraw .color-picker-triangle-shadow{right:-16px}.excalidraw .color-picker-content{display:flex;flex-direction:column;gap:.75rem}.excalidraw .color-picker-content--default{padding:.5rem;display:grid;grid-template-columns:repeat(5, 1.875rem);grid-gap:.25rem;border-radius:4px}.excalidraw .color-picker-content--default:focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-picker-content--canvas{display:flex;flex-direction:column;padding:.25rem}.excalidraw .color-picker-content--canvas-title{color:#868e96;font-size:12px;padding:0 .25rem}.excalidraw .color-picker-content--canvas-colors{padding:.5rem 0}.excalidraw .color-picker-content--canvas-colors .color-picker-swatch{margin:0 .25rem}.excalidraw .color-picker-content .color-input-container{grid-column:1/span 5}.excalidraw .color-picker-swatch{position:relative;height:1.875rem;width:1.875rem;cursor:pointer;border-radius:4px;margin:0;box-sizing:border-box;border:1px solid #ddd;background-color:currentColor !important;-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker-swatch:focus{box-shadow:0 0 4px 1px currentColor;border-color:var(--select-highlight-color)}.excalidraw .color-picker-transparent{border-radius:4px;box-shadow:rgba(0,0,0,.1) 0 0 0 1px inset;position:absolute;top:0;right:0;bottom:0;left:0}.excalidraw .color-picker-transparent,.excalidraw .color-picker-label-swatch{background:url("+d+') left center}.excalidraw .color-picker-hash{height:var(--default-button-size);flex-shrink:0;padding:.5rem .5rem .5rem .75rem;border:1px solid var(--default-border-color);border-right:0;box-sizing:border-box;color:var(--input-label-color);display:flex;align-items:center;justify-content:center;position:relative}:root[dir=ltr] .excalidraw .color-picker-hash{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg)}:root[dir=rtl] .excalidraw .color-picker-hash{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0;border-right:1px solid var(--default-border-color);border-left:0}.excalidraw .color-input-container{display:flex}.excalidraw .color-input-container:focus-within{box-shadow:0 0 0 1px var(--color-primary-darkest);border-radius:var(--border-radius-lg)}.excalidraw .color-picker__input-label{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;align-items:center;border:1px solid var(--default-border-color);border-radius:8px;padding:0 12px;margin:8px;box-sizing:border-box}.excalidraw .color-picker__input-label:focus-within{box-shadow:0 0 0 1px var(--color-primary-darkest);border-radius:var(--border-radius-lg)}.excalidraw .color-picker__input-hash{padding:0 .25rem}.excalidraw .color-picker-input{box-sizing:border-box;width:100%;margin:0;font-size:.875rem;font-family:inherit;background-color:rgba(0,0,0,0);color:var(--text-primary-color);border:0;outline:none;height:var(--default-button-size);border:1px solid var(--default-border-color);border-left:0;letter-spacing:.4px;padding:.5rem;padding-left:.25rem;-webkit-appearance:none;appearance:none}:root[dir=ltr] .excalidraw .color-picker-input{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0}:root[dir=rtl] .excalidraw .color-picker-input{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg);border-left:1px solid var(--default-border-color);border-right:0}.excalidraw .color-picker-input:focus-visible{box-shadow:none}.excalidraw .color-picker-label-swatch-container{border:1px solid var(--default-border-color);border-radius:var(--border-radius-lg);width:var(--default-button-size);height:var(--default-button-size);box-sizing:border-box;overflow:hidden}.excalidraw .color-picker-label-swatch{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--swatch-color) !important;overflow:hidden;position:relative;-webkit-filter:var(--theme-filter);filter:var(--theme-filter);border:0 !important}.excalidraw .color-picker-label-swatch svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .color-picker-label-swatch:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .color-picker-label-swatch:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .color-picker-label-swatch.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .color-picker-label-swatch.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .color-picker-label-swatch.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .color-picker-label-swatch:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--swatch-color)}.excalidraw .color-picker-keybinding{position:absolute;bottom:2px;font-size:.7em}:root[dir=ltr] .excalidraw .color-picker-keybinding{right:2px}:root[dir=rtl] .excalidraw .color-picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .color-picker-keybinding{display:none}.excalidraw .color-picker-type-canvasBackground .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementBackground .color-picker-keybinding{color:#fff}.excalidraw .color-picker-swatch[aria-label=transparent] .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementStroke .color-picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .color-picker-type-elementBackground .color-picker-keybinding{color:#000}.excalidraw.theme--dark .color-picker-swatch[aria-label=transparent] .color-picker-keybinding{color:#000}',""]),t.Z=u},9393:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .confirm-dialog-buttons{display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;justify-content:flex-end}",""]),t.Z=a},6578:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .context-menu{position:relative;border-radius:4px;box-shadow:0 3px 10px rgba(0,0,0,.2);padding:0;list-style:none;-webkit-user-select:none;user-select:none;margin:-0.25rem 0 0 .125rem;padding:.5rem 0;background-color:var(--popup-secondary-bg-color);border:1px solid var(--button-gray-3);cursor:default}.excalidraw .context-menu button{color:var(--popup-text-color)}.excalidraw .context-menu-item{position:relative;width:100%;min-width:9.5rem;margin:0;padding:.25rem 1rem .25rem 1.25rem;text-align:start;border-radius:0;background-color:rgba(0,0,0,0);border:none;white-space:nowrap;font-family:inherit;display:grid;grid-template-columns:1fr .2fr;align-items:center}.excalidraw .context-menu-item.checkmark::before{position:absolute;left:6px;margin-bottom:1px;content:"✓"}.excalidraw .context-menu-item.dangerous .context-menu-item__label{color:#f03e3e}.excalidraw .context-menu-item .context-menu-item__label{justify-self:start;-webkit-margin-end:20px;margin-inline-end:20px}.excalidraw .context-menu-item .context-menu-item__shortcut{justify-self:end;opacity:.6;font-family:inherit;font-size:.7rem}.excalidraw .context-menu-item:hover{color:var(--popup-bg-color);background-color:var(--select-highlight-color)}.excalidraw .context-menu-item:hover.dangerous{background-color:#fa5252}.excalidraw .context-menu-item:hover.dangerous .context-menu-item__label{color:var(--popup-bg-color)}.excalidraw .context-menu-item:focus{z-index:1}.excalidraw--mobile.excalidraw .context-menu-item{display:block}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__label{-webkit-margin-end:0;margin-inline-end:0}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__shortcut{display:none}.excalidraw .context-menu-item-separator{border:none;border-top:1px solid #adb5bd}',""]),t.Z=a},9482:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Dialog{-webkit-user-select:text;user-select:text;cursor:auto}.excalidraw .Dialog__title{margin:0;text-align:left;font-size:1.25rem;border-bottom:1px solid var(--dialog-border-color);padding:0 0 .75rem;margin-bottom:1.5rem}",""]),t.Z=a},6148:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .Dialog__action-button{position:relative;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;padding:.5rem 1.5rem;border:1px solid var(--default-border-color);background-color:rgba(0,0,0,0);height:3rem;border-radius:var(--border-radius-lg);letter-spacing:.4px;color:inherit;font-family:inherit;font-size:.875rem;font-weight:600;-webkit-user-select:none;user-select:none}.excalidraw .Dialog__action-button svg{display:block;width:1rem;height:1rem}.excalidraw .Dialog__action-button--danger{background-color:var(--color-danger);border-color:var(--color-danger);color:#fff}.excalidraw .Dialog__action-button--primary{background-color:var(--color-primary);border-color:var(--color-primary);color:#fff}.excalidraw.theme--dark .Dialog__action-button--danger{color:var(--color-gray-100)}.excalidraw.theme--dark .Dialog__action-button--primary{color:var(--color-gray-100)}",""]),t.Z=a},7955:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(9669),n.b),u=a()(o()),d=c()(s);u.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExportDialog__preview{--preview-padding: calc(var(--space-factor) * 4);background:url("+d+") left center;text-align:center;padding:var(--preview-padding);margin-bottom:calc(var(--space-factor)*3);display:flex;justify-content:center;align-items:center}.excalidraw .ExportDialog__preview canvas{max-width:calc(100% - var(--preview-padding)*2);max-height:25rem}.excalidraw.theme--dark .ExportDialog__preview canvas{-webkit-filter:none;filter:none}.excalidraw .ExportDialog__actions{width:100%;display:flex;grid-gap:calc(var(--space-factor)*2);align-items:top;justify-content:space-between}.excalidraw--mobile.excalidraw .ExportDialog{display:flex;flex-direction:column}.excalidraw--mobile.excalidraw .ExportDialog__actions{flex-direction:column;align-items:center}.excalidraw--mobile.excalidraw .ExportDialog__actions>*{margin-bottom:calc(var(--space-factor)*3)}.excalidraw--mobile.excalidraw .ExportDialog__preview canvas{max-height:30vh}.excalidraw--mobile.excalidraw .ExportDialog__dialog,.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{height:100%;box-sizing:border-box}.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{overflow-y:auto}.excalidraw .ExportDialog--json .ExportDialog-cards{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));justify-items:center;row-gap:2em}@media(max-width: 460px){.excalidraw .ExportDialog--json .ExportDialog-cards{grid-template-columns:repeat(auto-fit, minmax(240px, 1fr))}.excalidraw .ExportDialog--json .ExportDialog-cards .Card-details{min-height:40px}}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:1em auto;align-items:flex-start;flex-direction:column}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName .TextInput{width:auto}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName-label{margin:.625em 0;font-weight:bold}.excalidraw button.ExportDialog-imageExportButton{border:0;width:5rem;height:5rem;margin:0 .2em;padding:0;display:flex;align-items:center;justify-content:center;border-radius:1rem;background-color:var(--button-color);box-shadow:0 3px 5px -1px rgba(0,0,0,.28),0 6px 10px 0 rgba(0,0,0,.14);font-family:Cascadia;font-size:1.8em;color:#fff}.excalidraw button.ExportDialog-imageExportButton:hover{background-color:var(--button-color-darker)}.excalidraw button.ExportDialog-imageExportButton:active{background-color:var(--button-color-darkest);box-shadow:none}.excalidraw button.ExportDialog-imageExportButton svg{width:.9em}",""]),t.Z=u},3195:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .FixedSideContainer{position:absolute;pointer-events:none}.excalidraw .FixedSideContainer>*{pointer-events:all}.excalidraw .FixedSideContainer_side_top{left:var(--editor-container-padding);top:var(--editor-container-padding);right:var(--editor-container-padding);bottom:var(--editor-container-padding);z-index:2}.excalidraw .FixedSideContainer_side_top.zen-mode{right:42px}",""]),t.Z=a},2978:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HelpDialog .Modal__content{max-width:960px}.excalidraw .HelpDialog h3{margin:1.5rem 0;font-weight:bold;font-size:1.125rem}.excalidraw .HelpDialog__header{display:flex;flex-wrap:wrap;gap:.75rem}.excalidraw .HelpDialog__btn{display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;border:1px solid var(--default-border-color);padding:.625rem 1rem;border-radius:var(--border-radius-lg);color:var(--text-primary-color);font-weight:600;font-size:.75rem;letter-spacing:.4px}.excalidraw .HelpDialog__btn:hover{text-decoration:none}.excalidraw .HelpDialog__link-icon{line-height:0}.excalidraw .HelpDialog__link-icon svg{width:1rem;height:1rem}.excalidraw .HelpDialog__islands-container{display:grid;grid-column-gap:1.5rem;grid-row-gap:2rem}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__islands-container{grid-template-columns:1fr 1fr}}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__island--tools{grid-area:1/1/2/2}.excalidraw .HelpDialog__island--view{grid-area:2/1/3/2}.excalidraw .HelpDialog__island--editor{grid-area:1/2/3/3}}.excalidraw .HelpDialog__island h4{font-size:1rem;font-weight:bold;margin:0;margin-bottom:.625rem}.excalidraw .HelpDialog__island-content{border:1px solid var(--dialog-border-color);border-radius:var(--border-radius-lg)}.excalidraw .HelpDialog__shortcut{border-bottom:1px solid var(--dialog-border-color);padding:.375rem .75rem;display:flex;justify-content:space-between;align-items:center;font-size:.875rem;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .HelpDialog__shortcut:last-child{border-bottom:none}.excalidraw .HelpDialog__key-container{display:flex;align-items:center;-webkit-column-gap:.25rem;column-gap:.25rem;flex-shrink:0}.excalidraw .HelpDialog__key{display:flex;box-sizing:border-box;font-size:.625rem;background-color:var(--color-primary-light);border-radius:var(--border-radius-md);padding:.5rem;word-break:keep-all;align-items:center;font-family:inherit;line-height:1}",""]),t.Z=a},1587:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HintViewer{pointer-events:none;box-sizing:border-box;position:absolute;display:flex;justify-content:center;left:0;top:100%;max-width:100%;width:100%;margin-top:.5rem;text-align:center;color:var(--color-gray-40);font-size:.75rem}.excalidraw--mobile.excalidraw .HintViewer{position:static;padding-right:2rem}.excalidraw .HintViewer>span{padding:.25rem}.excalidraw.theme--dark .HintViewer{color:var(--color-gray-60)}",""]),t.Z=a},9478:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .picker-container{display:inline-block;box-sizing:border-box;margin-right:.25rem}.excalidraw .picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 2px 2px 4px 2px;border-radius:4px;position:absolute}.excalidraw .picker-container button,.excalidraw .picker button{position:relative;display:flex;align-items:center;justify-content:center}.excalidraw .picker-container button:focus-visible,.excalidraw .picker button:focus-visible{outline:rgba(0,0,0,0);background-color:var(--button-gray-2)}.excalidraw .picker-container button:focus-visible svg,.excalidraw .picker button:focus-visible svg{opacity:1}.excalidraw .picker-container button:hover,.excalidraw .picker button:hover{background-color:var(--button-gray-2)}.excalidraw .picker-container button:active,.excalidraw .picker button:active{background-color:var(--button-gray-3)}.excalidraw .picker-container button:disabled,.excalidraw .picker button:disabled{cursor:not-allowed}.excalidraw .picker-container button svg,.excalidraw .picker button svg{margin:0;width:36px;height:18px;pointer-events:none}.excalidraw .picker button{padding:.25rem .28rem .35rem .25rem}.excalidraw .picker-triangle{width:0;height:0;position:relative;top:-10px;z-index:10}:root[dir=ltr] .excalidraw .picker-triangle{left:12px}:root[dir=rtl] .excalidraw .picker-triangle{right:12px}.excalidraw .picker-triangle:before{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-1px}.excalidraw .picker-triangle:after{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color)}.excalidraw .picker-content{padding:.5rem;display:grid;grid-template-columns:repeat(3, auto);grid-gap:.5rem;border-radius:4px}:root[dir=rtl] .excalidraw .picker-content{padding:.4rem}.excalidraw .picker-keybinding{position:absolute;bottom:2px;font-size:.7em;color:var(--keybinding-color)}:root[dir=ltr] .excalidraw .picker-keybinding{right:2px}:root[dir=rtl] .excalidraw .picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .picker-keybinding{display:none}.excalidraw .picker-type-canvasBackground .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementBackground .picker-keybinding{color:#fff}.excalidraw .picker-swatch[aria-label=transparent] .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementStroke .picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .picker-type-elementBackground .picker-keybinding{color:#000}.excalidraw.theme--dark .picker-swatch[aria-label=transparent] .picker-keybinding{color:#000}',""]),t.Z=a},7369:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .Island{--padding: 0;box-sizing:border-box;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .Island.zen-mode{box-shadow:none}",""]),t.Z=a},1434:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .layer-ui__wrapper.animate{transition:width .1s ease-in-out}.excalidraw .layer-ui__wrapper{position:absolute;width:100%;height:100%;pointer-events:none;z-index:var(--zIndex-layerUI)}.excalidraw .layer-ui__wrapper__top-right{display:flex;gap:.75rem}.excalidraw .layer-ui__wrapper__footer{width:100%}.excalidraw .layer-ui__wrapper__footer-right{z-index:100;display:flex}.excalidraw .layer-ui__wrapper .zen-mode-transition{transition:-webkit-transform .5s ease-in-out;transition:transform .5s ease-in-out;transition:transform .5s ease-in-out, -webkit-transform .5s ease-in-out}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}.excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-bottom{-webkit-transform:translate(0, 92px);transform:translate(0, 92px)}.excalidraw .layer-ui__wrapper .disable-zen-mode{height:30px;position:absolute;bottom:10px;font-size:10px;padding:10px;font-weight:500;opacity:0;visibility:hidden;transition:visibility 0s linear 0s,opacity .5s}[dir=ltr] .excalidraw .layer-ui__wrapper .disable-zen-mode{right:15px}[dir=rtl] .excalidraw .layer-ui__wrapper .disable-zen-mode{left:15px}.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{opacity:1;visibility:visible;transition:visibility 0s linear 300ms,opacity .5s;transition-delay:.8s}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left,.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right,.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{pointer-events:all}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right{margin-top:auto;margin-bottom:auto}",""]),t.Z=a},8923:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,'.excalidraw .layer-ui__library{display:flex;flex-direction:column;flex:1 1 auto}.excalidraw .library-actions-counter{background-color:var(--color-primary);color:var(--color-primary-light);font-weight:bold;display:flex;align-items:center;justify-content:center;border-radius:50%;width:1rem;height:1rem;position:absolute;bottom:-0.25rem;right:-0.25rem;font-size:.625rem;pointer-events:none}.excalidraw .layer-ui__library-message{padding:2rem;min-width:200px;display:flex;flex-direction:column;align-items:center;flex-grow:1;justify-content:center}.excalidraw .layer-ui__library-message span{font-size:.8em}.excalidraw .publish-library-success .Dialog__content{display:flex;flex-direction:column}.excalidraw .publish-library-success-close.ToolIcon_type_button{background-color:#228be6;align-self:flex-end}.excalidraw .publish-library-success-close.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library-success-close.ToolIcon_type_button .ToolIcon__icon{width:auto;font-size:1rem;color:#fff;padding:0 .5rem}.excalidraw .library-menu-control-buttons{display:flex;align-items:center;justify-content:center;gap:.625rem;position:relative}.excalidraw .library-menu-control-buttons--at-bottom::before{content:"";width:calc(100% - 1.5rem);height:1px;position:absolute;top:-1px;background:var(--sidebar-border-color)}.excalidraw .library-menu-browse-button{flex:1;height:var(--lg-button-size);display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;border-radius:var(--border-radius-lg);background-color:var(--color-primary);color:#fff;text-align:center;white-space:nowrap;text-decoration:none !important;font-weight:600;font-size:.75rem}.excalidraw .library-menu-browse-button:hover{background-color:var(--color-primary-darker)}.excalidraw .library-menu-browse-button:active{background-color:var(--color-primary-darkest)}.excalidraw.theme--dark .library-menu-browse-button{color:var(--color-gray-100)}.excalidraw.excalidraw--mobile .library-menu-browse-button{height:var(--default-button-size)}.excalidraw .layer-ui__library .dropdown-menu{width:auto;top:initial;right:0;left:initial;bottom:100%;margin-bottom:.625rem}.excalidraw .layer-ui__library .dropdown-menu .dropdown-menu-container{width:196px;box-shadow:var(--library-dropdown-shadow);border-radius:var(--border-radius-lg);padding:.25rem .5rem}.excalidraw .layer-ui__library .library-menu-dropdown-container{position:relative}.excalidraw .layer-ui__library .library-menu-dropdown-container--in-heading{padding:0;position:absolute;top:1rem;right:.75rem;z-index:1}.excalidraw .layer-ui__library .library-menu-dropdown-container--in-heading .dropdown-menu{top:100%}',""]),t.Z=a},6440:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw{--container-padding-y: 1.5rem;--container-padding-x: 0.75rem}.excalidraw .library-menu-items__no-items{text-align:center;color:var(--color-gray-70);line-height:1.5;font-size:.875rem;width:100%}.excalidraw .library-menu-items__no-items__label{color:var(--color-primary);font-weight:bold;font-size:1.125rem;margin-bottom:.75rem}.excalidraw.theme--dark .library-menu-items__no-items{color:var(--color-gray-40)}.excalidraw .library-menu-items-container{width:100%;display:flex;flex-grow:1;flex-shrink:1;flex-basis:0;overflow-y:auto;flex-direction:column;height:100%;justify-content:center;margin:0;position:relative}.excalidraw .library-menu-items-container>div{padding-left:.75rem;padding-right:.75rem}.excalidraw .library-menu-items-container__row{display:grid;grid-template-columns:repeat(4, 1fr);gap:1rem}.excalidraw .library-menu-items-container__items{row-gap:.5rem;padding:var(--container-padding-y) 0;flex:1;overflow-y:auto;overflow-x:hidden;margin-bottom:1rem}.excalidraw .library-menu-items-container__header{color:var(--color-primary);font-size:1.125rem;font-weight:bold;margin-bottom:.75rem;width:100%;padding-right:4rem;box-sizing:border-box}.excalidraw .library-menu-items-container__header--excal{margin-top:2rem}.excalidraw .library-menu-items-container .separator{width:100%;display:flex;align-items:center;font-weight:500;font-size:.9rem;margin:.6em .2em;color:var(--text-primary-color)}.excalidraw .library-menu-items-private-library-container{min-height:3.75rem;width:100%}",""]),t.Z=a},2701:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .library-unit{align-items:center;border:1px solid rgba(0,0,0,0);display:flex;justify-content:center;position:relative;width:55px;height:55px;box-sizing:border-box;border-radius:var(--border-radius-lg)}.excalidraw .library-unit--hover{border-color:var(--color-primary)}.excalidraw .library-unit--selected{border-color:var(--color-primary);border-width:1px}.excalidraw .library-unit__dragger{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.excalidraw .library-unit__dragger>svg{-webkit-filter:var(--theme-filter);filter:var(--theme-filter);flex-grow:1;max-height:100%;max-width:100%}.excalidraw .library-unit__checkbox-container,.excalidraw .library-unit__checkbox-container:hover,.excalidraw .library-unit__checkbox-container:active{align-items:center;background:none;border:none;color:var(--icon-fill-color);display:flex;justify-content:center;margin:0;padding:.5rem;position:absolute;left:2rem;bottom:2rem;cursor:pointer}.excalidraw .library-unit__checkbox-container input,.excalidraw .library-unit__checkbox-container:hover input,.excalidraw .library-unit__checkbox-container:active input{cursor:pointer}.excalidraw .library-unit__checkbox{position:absolute;top:.125rem;right:.125rem;margin:0}.excalidraw .library-unit__checkbox .Checkbox-box{margin:0;width:1rem;height:1rem;border-radius:4px;background-color:var(--color-primary-light);border:1px solid var(--color-primary);box-shadow:none !important;padding:2px}.excalidraw .library-unit__checkbox.Checkbox:hover .Checkbox-box{background-color:var(--color-primary-light)}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box{background-color:var(--color-primary) !important}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box svg{color:var(--color-primary-light)}.excalidraw .library-unit__removeFromLibrary>svg{height:16px;width:16px}.excalidraw .library-unit__adder{-webkit-transform:scale(1);transform:scale(1);-webkit-animation:library-unit__adder-animation 1s ease-in infinite;animation:library-unit__adder-animation 1s ease-in infinite;position:absolute;width:1.5rem;height:1.5rem;background-color:var(--color-primary);border-radius:var(--border-radius-md);display:flex;justify-content:center;align-items:center;pointer-events:none}.excalidraw .library-unit__adder svg{color:var(--color-primary-light);width:1rem;height:1rem}.excalidraw .library-unit:active .library-unit__adder{-webkit-animation:none;animation:none;-webkit-transform:scale(0.8);transform:scale(0.8)}.excalidraw .library-unit__active{cursor:pointer}@-webkit-keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}@keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}",""]),t.Z=a},6843:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw.excalidraw-modal-container{position:absolute;z-index:10}.excalidraw .Modal{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:calc(var(--space-factor)*10)}.excalidraw .Modal .Island{padding:2.5rem !important}.excalidraw .Modal__background{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(18,18,18,.2)}.excalidraw .Modal__content{position:relative;z-index:2;width:100%;max-width:var(--max-width);max-height:100%;opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-animation:Modal__content_fade-in .1s ease-out .05s forwards;animation:Modal__content_fade-in .1s ease-out .05s forwards;position:relative;overflow-y:auto;background:var(--island-bg-color);border:1px solid var(--dialog-border-color);box-shadow:var(--modal-shadow);border-radius:6px;box-sizing:border-box}.excalidraw .Modal__content:focus{outline:none}.excalidraw--mobile.excalidraw .Modal__content{max-width:100%;border:0;border-radius:0}@-webkit-keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.excalidraw .Modal__close{color:var(--icon-fill-color);margin:0;padding:.375rem;position:absolute;top:1rem;right:1rem;border:0;background-color:rgba(0,0,0,0);line-height:0;cursor:pointer}.excalidraw .Modal__close svg{width:1.5rem;height:1.5rem}.excalidraw--mobile.excalidraw .Modal{padding:0}.excalidraw--mobile.excalidraw .Modal__content{position:absolute;top:0;left:0;right:0;bottom:0}",""]),t.Z=a},8461:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw--mobile.excalidraw .PasteChartDialog .Island{display:flex;flex-direction:column}.excalidraw .PasteChartDialog .container{display:flex;align-items:center;justify-content:space-around;flex-wrap:wrap}.excalidraw--mobile.excalidraw .PasteChartDialog .container{flex-direction:column;justify-content:center}.excalidraw .PasteChartDialog .ChartPreview{margin:8px;text-align:center;width:192px;height:128px;border-radius:2px;padding:1px;border:1px solid #ced4da;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0)}.excalidraw .PasteChartDialog .ChartPreview div{display:inline-block}.excalidraw .PasteChartDialog .ChartPreview svg{max-height:120px;max-width:186px}.excalidraw .PasteChartDialog .ChartPreview:hover{padding:0;border:2px solid #339af0}",""]),t.Z=a},9935:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .popover{position:absolute;z-index:10;padding:5px 0 5px;outline:none}",""]),t.Z=a},532:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".ProjectName{margin:auto;display:flex;align-items:center}.ProjectName .TextInput{height:calc(1rem - 3px);width:200px;overflow:hidden;text-align:center;margin-left:8px;text-overflow:ellipsis}.ProjectName .TextInput--readonly{background:none;border:none;width:auto;max-width:200px;padding-left:2px}.ProjectName .TextInput--readonly:hover{background:none}",""]),t.Z=a},7589:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .publish-library__fields{display:flex;flex-direction:column}.excalidraw .publish-library__fields label{padding:1em 0;display:flex;justify-content:space-between;align-items:center}.excalidraw .publish-library__fields label span{font-weight:500;font-size:1rem;color:#868e96}.excalidraw .publish-library__fields label input,.excalidraw .publish-library__fields label textarea{width:70%;padding:.6em;font-family:var(--ui-font)}.excalidraw .publish-library__fields label .required{color:#e03131;margin:.2rem}.excalidraw .publish-library__buttons{display:flex;padding:.2rem 0;justify-content:flex-end;gap:.5rem}.excalidraw .publish-library__buttons .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .publish-library__buttons .ToolIcon_type_button{margin-left:1rem;padding:0 .5rem}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button{background-color:#228be6}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button{background-color:#adb5bd}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button:hover{background-color:#868e96}.excalidraw .publish-library__buttons .ToolIcon__icon{color:#fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner{--spinner-color: #fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner svg{padding:.5rem}.excalidraw .publish-library .selected-library-items{display:flex;flex-wrap:wrap}.excalidraw .publish-library .selected-library-items .single-library-item-wrapper{width:9rem}.excalidraw .publish-library-warning{color:#fa5252}.excalidraw .publish-library-note{padding:1em 0;font-style:italic;font-size:14px;display:block}.excalidraw .single-library-item{position:relative}.excalidraw .single-library-item-status{position:absolute;top:.3rem;left:.3rem;font-size:.7rem;color:#f03e3e;background:rgba(255,255,255,.9);padding:.1rem .2rem;border-radius:.2rem}.excalidraw .single-library-item__svg{background-color:#fff;padding:.3rem;width:7.5rem;height:7.5rem;border:1px solid var(--button-gray-2)}.excalidraw .single-library-item__svg svg{width:100%;height:100%}.excalidraw .single-library-item .ToolIcon__icon{background-color:#fff;width:auto;height:auto;margin:0 .5rem}.excalidraw .single-library-item .ToolIcon,.excalidraw .single-library-item .ToolIcon_type_button:hover{background-color:#fff}.excalidraw .single-library-item .required,.excalidraw .single-library-item .error{color:#e03131;font-weight:bold;font-size:1rem;margin:.2rem}.excalidraw .single-library-item .error{font-weight:500;margin:0;padding:.3em 0}.excalidraw .single-library-item--remove{position:absolute;top:.2rem;right:1rem}.excalidraw .single-library-item--remove .ToolIcon__icon{margin:0}.excalidraw .single-library-item--remove .ToolIcon__icon{background-color:#fa5252}.excalidraw .single-library-item--remove .ToolIcon__icon:hover{background-color:#f03e3e}.excalidraw .single-library-item--remove .ToolIcon__icon:active{background-color:#e03131}.excalidraw .single-library-item--remove svg{color:#fff;padding:.26rem;border-radius:.3em;width:1rem;height:1rem}",""]),t.Z=a},8208:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .sidebar{display:flex;flex-direction:column;position:absolute;top:0;bottom:0;right:0;z-index:5;margin:0;padding:0;box-sizing:border-box;background-color:var(--sidebar-bg-color);box-shadow:var(--sidebar-shadow);overflow:hidden;border-radius:0;width:calc(302px - var(--space-factor) * 2);border-left:1px solid var(--sidebar-border-color)}:root[dir=rtl] .excalidraw .sidebar{left:0;right:auto}.excalidraw .sidebar--docked{box-shadow:none}:root[dir=rtl] .excalidraw .sidebar{border-right:1px solid var(--sidebar-border-color);border-left:0}.excalidraw .sidebar__header{box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;width:100%;padding:1rem .75rem;position:relative}.excalidraw .sidebar__header::after{content:"";width:calc(100% - 1.5rem);height:1px;background:var(--sidebar-border-color);position:absolute;bottom:-1px}.excalidraw .sidebar__header__buttons{gap:0;display:flex;align-items:center;margin-left:auto}.excalidraw .sidebar__header__buttons button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));--button-bg: transparent;border:0 !important;width:var(--lg-button-size);height:var(--lg-button-size);padding:0}.excalidraw .sidebar__header__buttons button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .sidebar__header__buttons button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .sidebar__header__buttons button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .sidebar__header__buttons button.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .sidebar__header__buttons button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .sidebar__header__buttons button.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .sidebar__header__buttons button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .sidebar__header__buttons button:hover{background:var(--button-hover-bg, var(--island-bg-color))}.excalidraw .sidebar__header__buttons .sidebar__dock.selected svg{stroke:var(--color-primary);fill:var(--color-primary)}.excalidraw .sidebar-tabs-root{display:flex;flex-direction:column;flex:1 1 auto;padding:1rem 0}.excalidraw .sidebar-tabs-root [role=tabpanel]{flex:1;outline:none;flex:1 1 auto;display:flex;flex-direction:column;outline:none}.excalidraw .sidebar-tabs-root [role=tabpanel][data-state=inactive]{display:none !important}.excalidraw .sidebar-tabs-root [role=tablist]{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit, minmax(0, 1fr))}.excalidraw .sidebar-tabs-root>.sidebar__header{padding-top:0;padding-bottom:1rem}.excalidraw .sidebar-tab-trigger{--button-width: auto;--button-bg: transparent;--button-hover-bg: transparent;--button-active-bg: var(--color-primary);--button-hover-color: var(--color-primary);--button-hover-border: var(--color-primary)}.excalidraw .sidebar-tab-trigger[data-state=active]{--button-bg: var(--color-primary);--button-hover-bg: var(--color-primary-darker);--button-hover-color: var(--color-icon-white);--button-border: var(--color-primary);color:var(--color-icon-white)}.excalidraw .default-sidebar{display:flex;flex-direction:column}.excalidraw .default-sidebar .sidebar-triggers{display:flex;gap:0;padding:2px;margin-top:-3px;margin-bottom:-3px;border:1px solid var(--sidebar-border-color);background:var(--default-bg-color);border-radius:.625rem}.excalidraw .default-sidebar .sidebar-triggers .sidebar-tab-trigger{height:var(--lg-button-size);width:var(--lg-button-size);border:none}',""]),t.Z=a},7051:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .sidebar-trigger{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:auto;height:var(--lg-button-size);display:flex;align-items:center;gap:.5rem;line-height:0;font-size:.75rem;letter-spacing:.4px}.excalidraw .sidebar-trigger svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .sidebar-trigger:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .sidebar-trigger:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .sidebar-trigger.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .sidebar-trigger.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .sidebar-trigger.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .sidebar-trigger svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .default-sidebar-trigger .sidebar-trigger__label{display:none}@media screen and (min-width: 1024px){.excalidraw .default-sidebar-trigger .sidebar-trigger__label{display:block}}",""]),t.Z=a},5892:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .Spinner{display:flex;align-items:center;justify-content:center;height:100%;margin-left:auto;margin-right:auto;--spinner-color: var(--icon-fill-color)}.excalidraw .Spinner svg{-webkit-animation:rotate 1.6s linear infinite;animation:rotate 1.6s linear infinite;-webkit-transform-origin:center center;transform-origin:center center}.excalidraw .Spinner circle{stroke:var(--spinner-color);-webkit-animation:dash 1.6s linear 0s infinite;animation:dash 1.6s linear 0s infinite;stroke-linecap:round}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}@keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}",""]),t.Z=a},3874:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .Stack{--gap: 0;display:grid;gap:calc(var(--space-factor)*var(--gap))}.excalidraw .Stack_vertical{grid-template-columns:auto;grid-auto-flow:row;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content}.excalidraw .Stack_horizontal{grid-template-rows:auto;grid-auto-flow:column;grid-auto-columns:-webkit-min-content;grid-auto-columns:min-content}",""]),t.Z=a},2681:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Stats{position:absolute;top:64px;right:12px;font-size:12px;z-index:10;pointer-events:all}.excalidraw .Stats h3{margin:0 24px 8px 0;white-space:nowrap}.excalidraw .Stats .close{float:right;height:16px;width:16px;cursor:pointer}.excalidraw .Stats .close svg{width:100%;height:100%}.excalidraw .Stats table{width:100%}.excalidraw .Stats table th{border-bottom:1px solid var(--input-border-color);padding:4px}.excalidraw .Stats table tr td:nth-child(2){min-width:24px;text-align:right}:root[dir=rtl] .excalidraw .Stats{left:12px;right:initial}:root[dir=rtl] .excalidraw .Stats h3{margin:0 0 8px 24px}:root[dir=rtl] .excalidraw .Stats .close{float:left}",""]),t.Z=a},6759:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .TextInput{display:inline-block}",""]),t.Z=a},9650:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Toast{-webkit-animation:fade-in .5s;animation:fade-in .5s;background-color:var(--button-gray-1);border-radius:4px;bottom:10px;box-sizing:border-box;cursor:default;left:50%;margin-left:-150px;padding:4px 0;position:absolute;text-align:center;width:300px;z-index:999999}.excalidraw .Toast .Toast__message{padding:0 1.6rem;color:var(--popup-text-color);white-space:pre-wrap}.excalidraw .Toast .close{position:absolute;top:0;right:0;padding:.4rem}.excalidraw .Toast .close .ToolIcon__icon{width:1.2rem;height:1.2rem}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}",""]),t.Z=a},2044:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ToolIcon{border-radius:var(--border-radius-lg);display:inline-flex;align-items:center;position:relative;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;user-select:none}.excalidraw .ToolIcon__hidden{display:none !important}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon{--icon-fill-color: var(--color-primary-darker)}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{fill:var(--icon-fill-color)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary-light);--keybinding-color: var(--color-gray-60)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{color:var(--color-primary-darker)}.excalidraw .ToolIcon .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .ToolIcon .ToolIcon__icon:hover{background:var(--button-hover-bg)}.excalidraw .ToolIcon .ToolIcon__icon:active{background:var(--button-hover-bg);border:1px solid var(--color-primary-darkest)}.excalidraw .ToolIcon--plain{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon--plain .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .ToolIcon_type_radio,.excalidraw .ToolIcon_type_checkbox{position:absolute;opacity:0;pointer-events:none}.excalidraw .ToolIcon__icon{box-sizing:border-box;width:var(--default-button-size);height:var(--default-button-size);color:var(--icon-fill-color);display:flex;justify-content:center;align-items:center;border-radius:var(--border-radius-lg)}.excalidraw .ToolIcon__icon+.ToolIcon__label{-webkit-margin-start:0;margin-inline-start:0}.excalidraw .ToolIcon__icon svg{position:relative;width:var(--default-icon-size);height:var(--default-icon-size);color:var(--icon-fill-color)}.excalidraw .ToolIcon__label{display:flex;align-items:center;color:var(--icon-fill-color);font-family:var(--ui-font);margin:0 .8em;text-overflow:ellipsis}.excalidraw .ToolIcon__label .Spinner{margin-left:.6em}.excalidraw .ToolIcon_size_small .ToolIcon__icon{width:2rem;height:2rem;font-size:.8em}.excalidraw .ToolIcon_type_button,.excalidraw .Modal .ToolIcon_type_button,.excalidraw .ToolIcon_type_button{padding:0;border:none;margin:0;font-size:inherit;background-color:initial}.excalidraw .ToolIcon_type_button:focus-visible,.excalidraw .Modal .ToolIcon_type_button:focus-visible,.excalidraw .ToolIcon_type_button:focus-visible{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .ToolIcon_type_button.ToolIcon--selected,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,.excalidraw .ToolIcon_type_button.ToolIcon--selected{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .ToolIcon_type_button.ToolIcon--selected:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button:active,.excalidraw .Modal .ToolIcon_type_button:active,.excalidraw .ToolIcon_type_button:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button--show,.excalidraw .Modal .ToolIcon_type_button--show,.excalidraw .ToolIcon_type_button--show{visibility:visible}.excalidraw .ToolIcon_type_button--hide,.excalidraw .Modal .ToolIcon_type_button--hide,.excalidraw .ToolIcon_type_button--hide{display:none !important}.excalidraw .ToolIcon_type_floating{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:hover{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:active{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon{background-color:var(--button-gray-1);width:2rem;height:2rem}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__keybinding{position:absolute;bottom:2px;right:3px;font-size:.625rem;color:var(--keybinding-color);font-family:var(--ui-font);-webkit-user-select:none;user-select:none}:root[dir=ltr] .excalidraw .unlocked-icon{left:2px}:root[dir=rtl] .excalidraw .unlocked-icon{right:2px}.excalidraw .App-toolbar-container .ToolIcon__icon{width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .App-toolbar-container .ToolIcon__icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}",""]),t.Z=a},9144:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,.excalidraw .App-toolbar.zen-mode .HintViewer{display:none}.excalidraw .App-toolbar__divider{width:1px;height:1.5rem;align-self:center;background-color:var(--default-border-color);margin:0 .5rem}",""]),t.Z=a},6626:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-tooltip{--ui-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-family:var(--ui-font);position:fixed;z-index:1000;padding:8px;border-radius:6px;box-sizing:border-box;pointer-events:none;word-wrap:break-word;background:#000;line-height:1.5;text-align:center;font-size:13px;font-weight:500;color:#fff;display:none}.excalidraw-tooltip.excalidraw-tooltip--visible{display:block}.excalidraw-tooltip-wrapper{display:flex}.excalidraw-tooltip-icon{width:.9em;height:.9em;margin-left:5px;margin-top:1px;display:flex}.excalidraw--mobile.excalidraw-tooltip-icon{display:none}",""]),t.Z=a},6359:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .UserList{pointer-events:none;padding:var(--space-factor) var(--space-factor) var(--space-factor) var(--space-factor);display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.625rem;max-height:140px;max-width:290px;overflow:hidden}.excalidraw .UserList:empty{display:none}.excalidraw .UserList>*{pointer-events:all}.excalidraw .UserList_mobile{padding:0;justify-content:normal;margin:.5rem 0}",""]),t.Z=a},7399:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .dropdown-menu{position:absolute;top:100%;margin-top:.25rem}.excalidraw .dropdown-menu--mobile{bottom:55px;top:auto;left:0;width:100%;display:flex;flex-direction:column;row-gap:.75rem}.excalidraw .dropdown-menu--mobile .dropdown-menu-container{padding:8px 8px;box-sizing:border-box;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .dropdown-menu--mobile .dropdown-menu-container.zen-mode{box-shadow:none}.excalidraw .dropdown-menu .dropdown-menu-container{background-color:#fff !important;max-height:calc(100vh - 150px);overflow-y:auto;--gap: 2}.excalidraw .dropdown-menu .dropdown-menu-item-base{display:flex;padding:0 .625rem;-webkit-column-gap:.625rem;column-gap:.625rem;font-size:.875rem;color:var(--color-gray-100);width:100%;box-sizing:border-box;font-weight:normal;font-family:inherit}.excalidraw .dropdown-menu .dropdown-menu-item{background-color:rgba(0,0,0,0);border:0;align-items:center;height:2rem;cursor:pointer;border-radius:var(--border-radius-md)}@media screen and (min-width: 1921px){.excalidraw .dropdown-menu .dropdown-menu-item{height:2.25rem}}.excalidraw .dropdown-menu .dropdown-menu-item__text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.excalidraw .dropdown-menu .dropdown-menu-item__shortcut{-webkit-margin-start:auto;margin-inline-start:auto;opacity:.5}.excalidraw .dropdown-menu .dropdown-menu-item:hover{background-color:var(--button-hover-bg);text-decoration:none}.excalidraw .dropdown-menu .dropdown-menu-item svg{width:1rem;height:1rem;display:block}.excalidraw .dropdown-menu .dropdown-menu-item-custom{margin-top:.5rem}.excalidraw .dropdown-menu .dropdown-menu-group-title{font-size:14px;text-align:left;margin:10px 0;font-weight:500}.excalidraw.theme--dark .dropdown-menu-item{color:var(--color-gray-40)}.excalidraw.theme--dark .dropdown-menu-container{background-color:var(--color-gray-90) !important}.excalidraw .dropdown-menu-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .dropdown-menu-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .dropdown-menu-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .dropdown-menu-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .dropdown-menu-button.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .dropdown-menu-button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .dropdown-menu-button.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .dropdown-menu-button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .dropdown-menu-button--mobile{border:none;margin:0;padding:0;width:var(--default-button-size);height:var(--default-button-size)}",""]),t.Z=a},8793:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".footer-center{pointer-events:none;display:flex;width:100%;justify-content:flex-start}.footer-center>*{pointer-events:all}",""]),t.Z=a},3397:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .collab-button{--button-bg: var(--color-primary);--button-color: white;--button-border: var(--color-primary);--button-width: var(--lg-button-size);--button-height: var(--lg-button-size);--button-hover-bg: var(--color-primary-darker);--button-hover-border: var(--color-primary-darker);--button-active-bg: var(--color-primary-darker);flex-shrink:0}.excalidraw .collab-button.active.active{background-color:#0fb884;border-color:#0fb884}.excalidraw .collab-button.active.active svg{color:#fff}.excalidraw .collab-button.active.active:hover,.excalidraw .collab-button.active.active:active{background-color:#0fb884;border-color:#0fb884}.excalidraw.theme--dark .collab-button{color:var(--color-gray-90)}.excalidraw .CollabButton.is-collaborating{background-color:var(--button-special-active-bg-color)}.excalidraw .CollabButton.is-collaborating .ToolIcon__icon svg,.excalidraw .CollabButton.is-collaborating .ToolIcon__label{color:var(--icon-green-fill-color)}.excalidraw .CollabButton-collaborators{min-width:1em;min-height:1em;line-height:1;position:absolute;bottom:-5px;padding:3px;border-radius:50%;background-color:#b2f2bb;color:#2b8a3e;font-size:.6rem;font-family:"Cascadia"}:root[dir=ltr] .excalidraw .CollabButton-collaborators{right:-5px}:root[dir=rtl] .excalidraw .CollabButton-collaborators{left:-5px}',""]),t.Z=a},4343:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".excalidraw .ActiveFile .ActiveFile__fileName{display:flex;align-items:center}.excalidraw .ActiveFile .ActiveFile__fileName span{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:9.3em}.excalidraw .ActiveFile .ActiveFile__fileName svg{width:1.15em;-webkit-margin-end:.3em;margin-inline-end:.3em;-webkit-transform:scaleY(0.9);transform:scaleY(0.9)}",""]),t.Z=a},1569:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,'.excalidraw .virgil{font-family:"Virgil"}.excalidraw .welcome-screen-decor{pointer-events:none;color:var(--color-gray-40)}.excalidraw.theme--dark .welcome-screen-decor{color:var(--color-gray-60)}@media(max-height: 599px){.excalidraw .welcome-screen-decor-hint{display:none !important}}@media(max-width: 1024px),(max-width: 800px){.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--help,.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--menu{display:none}}.excalidraw .welcome-screen-decor-hint--help{display:flex;position:absolute;right:0;bottom:100%}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--help{left:0;right:auto}.excalidraw .welcome-screen-decor-hint--help svg{margin-top:.5rem;width:85px;height:71px;-webkit-transform:scaleX(-1) rotate(80deg);transform:scaleX(-1) rotate(80deg)}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--help svg{-webkit-transform:rotate(80deg);transform:rotate(80deg)}.excalidraw .welcome-screen-decor-hint--toolbar{position:absolute;top:100%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-top:2.5rem;display:flex;align-items:baseline}.excalidraw .welcome-screen-decor-hint--toolbar .welcome-screen-decor-hint__label{width:120px;position:relative;top:-0.5rem}.excalidraw .welcome-screen-decor-hint--toolbar svg{width:38px;height:78px}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--toolbar svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .welcome-screen-decor-hint--menu{position:absolute;width:320px;font-size:1rem;top:100%;margin-top:.25rem;-webkit-margin-start:.6rem;margin-inline-start:.6rem;display:flex;align-items:flex-end;gap:.5rem}.excalidraw .welcome-screen-decor-hint--menu svg{width:41px;height:94px}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--menu svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@media(max-width: 860px){.excalidraw .welcome-screen-decor-hint--menu .welcome-screen-decor-hint__label{max-width:160px}}.excalidraw .welcome-screen-center{display:flex;flex-direction:column;gap:2rem;justify-content:center;align-items:center;position:absolute;pointer-events:none;left:1rem;top:1rem;right:1rem;bottom:1rem}.excalidraw .welcome-screen-center__logo{display:flex;align-items:center;-webkit-column-gap:.75rem;column-gap:.75rem;font-size:2.25rem}.excalidraw .welcome-screen-center__logo svg{width:1.625rem;height:auto}.excalidraw .welcome-screen-center__heading{font-size:1.125rem;text-align:center}.excalidraw .welcome-screen-menu{display:flex;flex-direction:column;gap:2px;justify-content:center;align-items:center}.excalidraw .welcome-screen-menu-item{box-sizing:border-box;pointer-events:all;color:var(--color-gray-50);font-size:.875rem;width:100%;min-width:300px;max-width:400px;display:grid;align-items:center;justify-content:space-between;background:none;border:none;padding:.75rem;border-radius:var(--border-radius-md);grid-template-columns:calc(var(--default-icon-size) + .5rem) 1fr 3rem}.excalidraw .welcome-screen-menu-item__text{display:flex;align-items:center;margin-right:auto;text-align:left;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .welcome-screen-menu-item__icon{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .welcome-screen-menu-item__shortcut{margin-left:auto;color:var(--color-gray-40);font-size:.75rem}.excalidraw:not(:active) .welcome-screen-menu-item:hover{text-decoration:none;background:var(--color-gray-10)}.excalidraw:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active{background:var(--color-gray-20)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active--promo{color:var(--color-promo) !important}.excalidraw .welcome-screen-menu-item:active--promo:hover .welcome-screen-menu-item__text{color:var(--color-promo) !important}.excalidraw.theme--dark .welcome-screen-menu-item{color:var(--color-gray-60)}.excalidraw.theme--dark .welcome-screen-menu-item__shortcut{color:var(--color-gray-60)}.excalidraw.theme--dark:not(:active) .welcome-screen-menu-item:hover{background:var(--color-gray-85)}.excalidraw.theme--dark:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw.theme--dark:not(:active) .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-10)}.excalidraw.theme--dark .welcome-screen-menu-item:active{background-color:var(--color-gray-90)}.excalidraw.theme--dark .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-10)}@media(max-height: 599px){.excalidraw .welcome-screen-center{margin-top:4rem}}@media(min-height: 600px)and (max-height: 900px){.excalidraw .welcome-screen-center{margin-top:8rem}}@media(max-height: 500px),(max-width: 320px){.excalidraw .welcome-screen-center{display:none}}',""]),t.Z=a},9915:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".visually-hidden{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);white-space:nowrap;-webkit-user-select:none;user-select:none}.LoadingMessage{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.LoadingMessage .Spinner{font-size:2.8em}.LoadingMessage .LoadingMessage-text{margin-top:1em;font-size:.8em}.LoadingMessage--dark{background-color:#121212;color:#ced4da}",""]),t.Z=a},9310:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i),l=n(1667),c=n.n(l),s=new URL(n(7984),n.b),u=new URL(n(1639),n.b),d=a()(o()),f=c()(s),p=c()(u);d.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}:export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+f+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-gray-80);--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: rgba(255, 255, 255, 0.96);--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: #ffffff;--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top);--select-highlight-color: #339af0;--shadow-island: 0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702);--button-hover-bg: var(--color-gray-10);--default-border-color: var(--color-gray-30);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-gray-20);--sidebar-bg-color: #fff;--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-gray-80);--color-selection: #6965db;--color-icon-white: #ffffff;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-primary-light-darker: #d7d5ff;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-promo: #e70078;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+p+');--focus-highlight-color: #228be6;--icon-fill-color: var(--color-gray-40);--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: #262627;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-bg-color: #2c2c2c;--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--text-primary-color: var(--color-gray-40);--button-hover-bg: var(--color-gray-80);--default-border-color: var(--color-gray-80);--shadow-island: 0px 13px 33px rgba(0, 0, 0, 0.07), 0px 4.13px 9.94853px rgba(0, 0, 0, 0.0456112), 0px 1.13px 4.13211px rgba(0, 0, 0, 0.035), 0px 0.769896px 1.4945px rgba(0, 0, 0, 0.0243888);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--sidebar-border-color: var(--color-gray-85);--sidebar-bg-color: #191919;--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-icon-white: var(--color-gray-90);--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-primary-light-darker: #43415e;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-promo: #d297ff}:root{--zIndex-canvas: 1;--zIndex-wysiwyg: 2;--zIndex-layerUI: 3}.excalidraw{--ui-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-family:var(--ui-font);position:relative;overflow:hidden;color:var(--text-primary-color);display:flex;top:0;bottom:0;left:0;right:0;height:100%;width:100%;-webkit-user-select:none;user-select:none}.excalidraw button{cursor:pointer}.excalidraw:focus{outline:none}.excalidraw a{font-weight:500;text-decoration:none;color:var(--link-color)}.excalidraw a:hover{text-decoration:underline}.excalidraw canvas{touch-action:none;image-rendering:pixelated;image-rendering:-moz-crisp-edges;z-index:var(--zIndex-canvas)}.excalidraw__canvas{position:absolute}.excalidraw.theme--dark canvas{-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .FixedSideContainer{padding-top:var(--sat, 0);padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0)}.excalidraw .panelRow{display:flex;justify-content:space-between}.excalidraw .panelColumn{display:flex;flex-direction:column;row-gap:.75rem}.excalidraw .panelColumn h3,.excalidraw .panelColumn legend,.excalidraw .panelColumn .control-label{margin:0;margin-bottom:.25rem;font-size:.75rem;color:var(--text-primary-color);font-weight:normal;display:block}.excalidraw .panelColumn .control-label input{display:block;width:100%}.excalidraw .panelColumn legend{padding:0}.excalidraw .panelColumn .iconSelectList{flex-wrap:wrap;position:relative}.excalidraw .panelColumn .buttonList{flex-wrap:wrap;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem}.excalidraw .panelColumn .buttonList label{font-size:.75rem}.excalidraw .panelColumn .buttonList input[type=radio],.excalidraw .panelColumn .buttonList input[type=button]{opacity:0;position:absolute;pointer-events:none}.excalidraw .panelColumn .buttonList .iconRow{margin-top:8px}.excalidraw .panelColumn fieldset{margin:0;padding:0;border:none}.excalidraw .divider{width:1px;background-color:#e9ecef;margin:1px}.excalidraw .welcome-screen-menu-item:focus-visible,.excalidraw .dropdown-menu-item:focus-visible,.excalidraw button:focus-visible,.excalidraw .buttonList label:focus-within,.excalidraw input:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .buttonList .ToolIcon__icon{all:unset !important;display:flex !important}.excalidraw .buttonList button{background-color:rgba(0,0,0,0)}.excalidraw .buttonList label,.excalidraw .buttonList button,.excalidraw .buttonList .zIndexButton{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));padding:0}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .buttonList label:hover,.excalidraw .buttonList button:hover,.excalidraw .buttonList .zIndexButton:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .buttonList label:active,.excalidraw .buttonList button:active,.excalidraw .buttonList .zIndexButton:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .buttonList label.active,.excalidraw .buttonList button.active,.excalidraw .buttonList .zIndexButton.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .buttonList label.active:hover,.excalidraw .buttonList button.active:hover,.excalidraw .buttonList .zIndexButton.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .buttonList label.active svg,.excalidraw .buttonList button.active svg,.excalidraw .buttonList .zIndexButton.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .App-top-bar{z-index:var(--zIndex-layerUI);display:flex;flex-direction:column;align-items:center}.excalidraw .App-bottom-bar{position:absolute;top:0;bottom:0;left:0;right:0;--bar-padding: calc(4 * var(--space-factor));padding-top:max(var(--bar-padding), var(--sat,0));padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0);z-index:4;display:flex;align-items:flex-end;pointer-events:none}.excalidraw .App-bottom-bar>.Island{width:100%;max-width:100%;min-width:100%;box-sizing:border-box;max-height:100%;display:flex;flex-direction:column;pointer-events:initial}.excalidraw .App-bottom-bar>.Island .panelColumn{padding:8px 8px 0 8px}.excalidraw .App-toolbar{width:100%}.excalidraw .App-toolbar .eraser.ToolIcon:hover{--icon-fill-color: #fff;--keybinding-color: #fff}.excalidraw .App-toolbar .eraser.active{background-color:var(--color-primary)}.excalidraw .App-toolbar-content{display:flex;align-items:center;justify-content:space-between;padding:8px}.excalidraw .App-mobile-menu{width:100%;overflow-x:visible;overflow-y:auto;box-sizing:border-box;margin-bottom:var(--bar-padding)}.excalidraw .App-menu{display:grid;color:var(--icon-fill-color)}.excalidraw .shapes-section{display:flex;justify-content:center;pointer-events:none !important}.excalidraw .shapes-section>*{pointer-events:all}.excalidraw .App-menu_top{grid-template-columns:1fr 2fr 1fr;grid-gap:2rem;align-items:flex-start;cursor:default;pointer-events:none !important}@media(min-width: 1536px){.excalidraw .App-menu_top{grid-template-columns:1fr 1fr 1fr;grid-gap:3rem}}.excalidraw .layer-ui__wrapper:not(.disable-pointerEvents) .App-menu_top>*{pointer-events:all}.excalidraw .App-menu_top>*:first-child{justify-self:flex-start}.excalidraw .App-menu_top>*:last-child{justify-self:flex-end}.excalidraw .App-menu_bottom{position:absolute;bottom:1rem;display:flex;justify-content:space-between;align-items:flex-start;cursor:default;pointer-events:none !important;box-sizing:border-box;padding:0 1rem}.excalidraw .App-menu_bottom--transition-left section{width:185px}.excalidraw .App-menu_bottom section{display:flex}.excalidraw .App-menu_bottom>*:first-child{justify-self:flex-start}.excalidraw .App-menu_bottom>*:last-child{justify-self:flex-end}.excalidraw .App-menu_left{grid-template-rows:1fr auto 1fr;height:100%}.excalidraw .App-menu_right{grid-template-rows:1fr;height:100%}.excalidraw .App-menu__left{overflow-y:auto;padding:.75rem;width:202px;box-sizing:border-box;position:absolute}.excalidraw .dropdown-select{height:1.5rem;padding:0;-webkit-padding-start:.5rem;padding-inline-start:.5rem;-webkit-padding-end:1.5rem;padding-inline-end:1.5rem;color:var(--icon-fill-color);background-color:var(--button-gray-1);border-radius:var(--space-factor);border:1px solid var(--button-gray-2);font-size:.8rem;font-family:inherit;outline:none;-webkit-appearance:none;appearance:none;background-image:var(--dropdown-icon);background-repeat:no-repeat;background-position:right .7rem top 50%,0 0;background-size:.65em auto,100%}:root[dir=rtl] .excalidraw .dropdown-select{background-position:left .7rem top 50%,0 0}.excalidraw .dropdown-select:focus{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .dropdown-select:hover{background-color:var(--button-gray-2)}.excalidraw .dropdown-select:active{background-color:var(--button-gray-2)}.excalidraw .dropdown-select__language{height:2rem;background-color:var(--island-bg-color);border-color:var(--default-border-color) !important;cursor:pointer}.excalidraw .dropdown-select__language:hover{background-color:var(--island-bg-color)}.excalidraw .disable-zen-mode{border-radius:var(--border-radius-lg);background-color:var(--color-gray-20);border:1px solid var(--color-gray-30);padding:10px 20px}.excalidraw .disable-zen-mode:hover{background-color:var(--color-gray-30)}.excalidraw .scroll-back-to-content{border-radius:var(--border-radius-lg);background-color:var(--island-bg-color);color:var(--icon-fill-color);border:1px solid var(--default-border-color);padding:10px 20px;position:absolute;left:50%;bottom:30px;-webkit-transform:translateX(-50%);transform:translateX(-50%);pointer-events:all;font-family:inherit}.excalidraw .scroll-back-to-content:hover{background-color:var(--button-hover-bg)}.excalidraw .scroll-back-to-content:active{border:1px solid var(--color-primary-darkest)}.excalidraw .help-icon{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .help-icon svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .help-icon:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .help-icon:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .help-icon.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .help-icon.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .help-icon.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .help-icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .reset-zoom-button{font-family:var(--ui-font)}.excalidraw .finalize-button{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw .undo-redo-buttons,.excalidraw .eraser-buttons{display:grid;grid-auto-flow:column;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw--mobile.excalidraw aside{display:none}.excalidraw--mobile.excalidraw .scroll-back-to-content{bottom:calc(80px + var(--sab, 0));z-index:-1}:root[dir=rtl] .excalidraw .rtl-mirror{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .zen-mode-visibility{visibility:visible;opacity:1;height:auto;width:auto;transition:opacity .5s}.excalidraw .zen-mode-visibility.zen-mode-visibility--hidden{visibility:hidden;opacity:0;height:0;width:0;transition:opacity .5s}.excalidraw .disable-pointerEvents{pointer-events:none !important}.excalidraw.excalidraw--view-mode .App-menu{display:flex;justify-content:space-between}.excalidraw input[type=text],.excalidraw textarea:not(.excalidraw-wysiwyg){color:var(--text-primary-color);border:1.5px solid var(--input-border-color);padding:.75rem;white-space:nowrap;border-radius:var(--space-factor);background-color:var(--input-bg-color)}.excalidraw input[type=text]:not(:focus):hover,.excalidraw textarea:not(.excalidraw-wysiwyg):not(:focus):hover{background-color:var(--input-hover-bg-color)}.excalidraw input[type=text]:focus,.excalidraw textarea:not(.excalidraw-wysiwyg):focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}@media print{.excalidraw .App-bottom-bar,.excalidraw .FixedSideContainer,.excalidraw .layer-ui__wrapper{display:none}}.excalidraw ::-webkit-scrollbar{width:3px;height:3px}.excalidraw select::-webkit-scrollbar{width:10px}.excalidraw ::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:10px}.excalidraw ::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}.excalidraw ::-webkit-scrollbar-thumb:active{background:var(--scrollbar-thumb)}.excalidraw .mobile-misc-tools-container{position:absolute;top:calc(5rem - var(--editor-container-padding));right:calc(var(--editor-container-padding)*-1);display:flex;flex-direction:column;border:1px solid var(--sidebar-border-color);border-top-left-radius:var(--border-radius-lg);border-bottom-left-radius:var(--border-radius-lg);border-right:0;overflow:hidden;background-color:var(--island-bg-color)}.excalidraw .mobile-misc-tools-container .ToolIcon__icon{border-radius:0}.excalidraw .mobile-misc-tools-container .default-sidebar-trigger{border:0}.excalidraw .App-toolbar--mobile{overflow-x:auto;max-width:90vw}.excalidraw .App-toolbar--mobile .ToolIcon__keybinding{display:none}.excalidraw .UserList-Wrapper{margin:0;padding:0;border:none;text-align:left}.excalidraw .UserList-Wrapper legend{display:block;font-size:.75rem;font-weight:400;margin:0 0 .25rem;padding:0}.ErrorSplash.excalidraw{min-height:100vh;padding:20px 0;overflow:auto;display:flex;align-items:center;justify-content:center;-webkit-user-select:text;user-select:text}.ErrorSplash.excalidraw .ErrorSplash-messageContainer{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;background-color:#ffe3e3;border:3px solid #c92a2a}.ErrorSplash.excalidraw .ErrorSplash-paragraph{margin:15px 0;max-width:600px}.ErrorSplash.excalidraw .ErrorSplash-paragraph.align-center{text-align:center}.ErrorSplash.excalidraw .bigger,.ErrorSplash.excalidraw .bigger button{font-size:1.1em}.ErrorSplash.excalidraw .smaller,.ErrorSplash.excalidraw .smaller button{font-size:.9em}.ErrorSplash.excalidraw .ErrorSplash-details{display:flex;flex-direction:column;align-items:flex-start}.ErrorSplash.excalidraw .ErrorSplash-details textarea{width:100%;margin:10px 0;font-family:"Cascadia";font-size:.8em}',""]),t.Z=d},6464:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,"",""]),a.locals={themeFilter:"invert(93%) hue-rotate(180deg)",rightSidebarWidth:"302px"},t.Z=a},5260:function(e,t,n){"use strict";var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-hyperlinkContainer{display:flex;align-items:center;justify-content:space-between;position:absolute;box-shadow:0px 2px 4px 0 rgba(0,0,0,.3);z-index:100;background:var(--island-bg-color);border-radius:var(--border-radius-md);box-sizing:border-box;min-height:42px}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer button{z-index:100}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer-link{height:24px;padding:0 8px;line-height:24px;font-size:.9rem;font-weight:500;font-family:var(--ui-font)}.excalidraw-hyperlinkContainer-input{width:18rem;border:none;background-color:rgba(0,0,0,0);color:var(--text-primary-color);outline:none;border:none;box-shadow:none !important}.excalidraw-hyperlinkContainer-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:15rem}.excalidraw-hyperlinkContainer button{color:#228be6;background-color:rgba(0,0,0,0) !important;font-weight:500}.excalidraw-hyperlinkContainer button.excalidraw-hyperlinkContainer--remove{color:#c92a2a}.excalidraw-hyperlinkContainer .d-none{display:none}.excalidraw-hyperlinkContainer--remove .ToolIcon__icon svg{color:#fa5252}.excalidraw-hyperlinkContainer .ToolIcon__icon{width:2rem;height:2rem}.excalidraw-hyperlinkContainer__buttons{flex:0 0 auto}",""]),t.Z=a},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var l=0;l<this.length;l++){var c=this[l][0];null!=c&&(a[c]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);r&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},1667:function(e){"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},8081:function(e){"use strict";e.exports=function(e){return e[1]}},202:function(e,t,n){"use strict";n.d(t,{JQ:function(){return w},vD:function(){return y},y7:function(){return b}});var r=n(1930),o=n(7169),i=n(2335),a=n(1047),l=n(1935),c=n(5710),s=n(6906),u=n(1974),d=n(75),f=n(6340),p=n(7901);function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=(0,p.z)({name:"unbindText",contextItemLabel:"labels.unbindText",trackEvent:{category:"element"},predicate:function(e,t){return(0,d.eD)(e,t).some((function(e){return(0,u.Xo)(e)}))},perform:function(e,t){return(0,d.eD)((0,a.Lm)(e),t).forEach((function(e){var t=(0,c.WJ)(e);if(t){var n,r=(0,c.X1)(t.originalText,(0,f.mO)(t),t.lineHeight),o=r.width,i=r.height,a=r.baseline,u=(0,s.eR)(e.id);(0,s.kT)(e.id);var d=(0,c.FE)(e,t),p=d.x,h=d.y;(0,l.DR)(t,{containerId:null,width:o,height:i,baseline:a,text:t.originalText,x:p,y:h}),(0,l.DR)(e,{boundElements:null===(n=e.boundElements)||void 0===n?void 0:n.filter((function(e){return e.id!==t.id})),height:u||e.height})}})),{elements:e,appState:t,commitToHistory:!0}}}),y=(0,p.z)({name:"bindText",contextItemLabel:"labels.bindText",trackEvent:{category:"element"},predicate:function(e,t){var n=(0,d.eD)(e,t);if(2===n.length){var r,o=(0,a.iB)(n[0])||(0,a.iB)(n[1]);if((0,u.mG)(n[0])?r=n[0]:(0,u.mG)(n[1])&&(r=n[1]),o&&r&&null===(0,c.WJ)(r))return!0}return!1},perform:function(e,t){var n,r,f=(0,d.eD)((0,a.Lm)(e),t);(0,a.iB)(f[0])&&(0,u.mG)(f[1])?(n=f[0],r=f[1]):(n=f[1],r=f[0]),(0,l.DR)(n,{containerId:r.id,verticalAlign:i.oX.MIDDLE,textAlign:i.I8.CENTER}),(0,l.DR)(r,{boundElements:(r.boundElements||[]).concat({type:"text",id:n.id})});var p=r.height;return(0,c.oN)(n,r),(0,s.h_)(r.id,p),{elements:x(e,r,n),appState:v(v({},t),{},{selectedElementIds:(0,o.Z)({},r.id,!0)}),commitToHistory:!0}}}),x=function(e,t,n){var r=e.slice(),o=r.findIndex((function(e){return e.id===n.id}));r.splice(o,1);var i=r.findIndex((function(e){return e.id===t.id}));return r.splice(i+1,0,n),r},w=(0,p.z)({name:"wrapTextInContainer",contextItemLabel:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:function(e,t){var n=(0,d.eD)(e,t),r=n.every((function(e){return(0,a.iB)(e)}));return n.length>0&&r},perform:function(e,t){var n,o=(0,d.eD)((0,a.Lm)(e),t),s=e.slice(),f={},p=h(o);try{var m=function(){var e=n.value;if((0,a.iB)(e)){var o,d=(0,a.Up)({type:"rectangle",backgroundColor:t.currentItemBackgroundColor,boundElements:[].concat((0,r.Z)(e.boundElements||[]),[{id:e.id,type:"text"}]),angle:e.angle,fillStyle:t.currentItemFillStyle,strokeColor:t.currentItemStrokeColor,roughness:t.currentItemRoughness,strokeWidth:t.currentItemStrokeWidth,strokeStyle:t.currentItemStrokeStyle,roundness:"round"===t.currentItemRoundness?{type:(0,u.QI)("rectangle")?i.a6.ADAPTIVE_RADIUS:i.a6.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:e.x-i.gK,y:e.y-i.gK,width:(0,c.NS)(e.width,"rectangle"),height:(0,c.NS)(e.height,"rectangle"),groupIds:e.groupIds});if(null!==(o=e.boundElements)&&void 0!==o&&o.length){var p=e.boundElements.filter((function(e){return"arrow"===e.type})).map((function(e){return e.id}));s.filter((function(e){return p.includes(e.id)})).forEach((function(t){var n,r,o=t.startBinding,i=t.endBinding;(null===(n=o)||void 0===n?void 0:n.elementId)===e.id&&(o=v(v({},o),{},{elementId:d.id})),(null===(r=i)||void 0===r?void 0:r.elementId)===e.id&&(i=v(v({},i),{},{elementId:d.id})),(o||i)&&(0,l.DR)(t,{startBinding:o,endBinding:i},!1)}))}(0,l.DR)(e,{containerId:d.id,verticalAlign:i.oX.MIDDLE,boundElements:null,textAlign:i.I8.CENTER},!1),(0,c.oN)(e,d),s=function(e,t,n){var r=e.slice(),o=r.findIndex((function(e){return e.id===t.id}));r.splice(o,1);var i=r.findIndex((function(e){return e.id===n.id}));return r.splice(i,0,t),r}([].concat((0,r.Z)(s),[d]),d,e),f[d.id]=!0}};for(p.s();!(n=p.n()).done;)m()}catch(e){p.e(e)}finally{p.f()}return{elements:s,appState:v(v({},t),{},{selectedElementIds:f}),commitToHistory:!0}}})},2416:function(e,t,n){"use strict";n.d(t,{CZ:function(){return O},Lo:function(){return S},Zp:function(){return P},eF:function(){return T},md:function(){return C},mo:function(){return j}});var r=n(2577),o=n(7169),i=n(8206),a=n(3646),l=n(1319),c=n(2335),s=n(1047),u=n(8211),d=n(6066),f=n(75),p=n(2264),h=n(746),m=n(6340),g=n(7901),v=n(1894),b=n(1935),y=n(8897),x=n(56),w=n(4512);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,g.z)({name:"changeViewBackgroundColor",trackEvent:!1,predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.changeViewBackgroundColor&&!t.viewModeEnabled},perform:function(e,t,n){return{appState:E(E({},t),n),commitToHistory:!!n.viewBackgroundColor}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;e.appProps;return(0,w.jsx)(i.z,{palette:null,topPicks:x.ay,label:(0,u.t)("labels.canvasBackground"),type:"canvasBackground",color:n.viewBackgroundColor,onChange:function(e){return r({viewBackgroundColor:e})},"data-testid":"canvas-background-picker",elements:t,appState:n,updateData:r})}});var j=(0,g.z)({name:"clearCanvas",trackEvent:{category:"canvas"},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.clearCanvas&&!t.viewModeEnabled},perform:function(e,t,n,r){return r.imageCache.clear(),{elements:e.map((function(e){return(0,b.BE)(e,{isDeleted:!0})})),appState:E(E({},(0,y.im)()),{},{files:{},theme:t.theme,penMode:t.penMode,penDetected:t.penDetected,exportBackground:t.exportBackground,exportEmbedScene:t.exportEmbedScene,gridSize:t.gridSize,showStats:t.showStats,pasteDialog:t.pasteDialog,activeTool:"image"===t.activeTool.type?E(E({},t.activeTool),{},{type:"selection"}):t.activeTool}),commitToHistory:!0}}}),S=(0,g.z)({name:"zoomIn",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:E(E({},t),(0,h.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,f.j)(t.zoom.value+c.V4)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData;return(0,w.jsx)(l.V,{type:"button",className:"zoom-in-button zoom-button",icon:a.Sd,title:"".concat((0,u.t)("buttons.zoomIn")," — ").concat((0,m.uY)("CtrlOrCmd++")),"aria-label":(0,u.t)("buttons.zoomIn"),onClick:function(){t(null)}})},keyTest:function(e){return(e.code===d.aU.EQUAL||e.code===d.aU.NUM_ADD)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}}),O=(0,g.z)({name:"zoomOut",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:E(E({},t),(0,h.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,f.j)(t.zoom.value-c.V4)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData;return(0,w.jsx)(l.V,{type:"button",className:"zoom-out-button zoom-button",icon:a.xL,title:"".concat((0,u.t)("buttons.zoomOut")," — ").concat((0,m.uY)("CtrlOrCmd+-")),"aria-label":(0,u.t)("buttons.zoomOut"),onClick:function(){t(null)}})},keyTest:function(e){return(e.code===d.aU.MINUS||e.code===d.aU.NUM_SUBTRACT)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}}),_=((0,g.z)({name:"resetZoom",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n,r){return{appState:E(E({},t),(0,h.E)({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:(0,f.j)(1)},t)),commitToHistory:!1}},PanelComponent:function(e){var t=e.updateData,n=e.appState;return(0,w.jsx)(v.u,{label:(0,u.t)("buttons.resetZoom"),style:{height:"100%"},children:(0,w.jsxs)(l.V,{type:"button",className:"reset-zoom-button zoom-button",title:(0,u.t)("buttons.resetZoom"),"aria-label":(0,u.t)("buttons.resetZoom"),onClick:function(){t(null)},children:[(100*n.zoom.value).toFixed(0),"%"]})})},keyTest:function(e){return(e.code===d.aU.ZERO||e.code===d.aU.NUM_ZERO)&&(e[d.tW.CTRL_OR_CMD]||e.shiftKey)}}),function(e,t){var n=(0,r.Z)(e,4),o=n[0],i=n[1],a=n[2],l=n[3],s=a-o,u=t.width/s,d=l-i,f=t.height/d,p=Math.min(u,f),h=Math.floor(p/c.V4)*c.V4;return Math.min(Math.max(h,c.Zj),1)}),C=function(e,t,n){var o=(0,s.Lm)(e),i=(0,f.eD)(o,t),a=n&&i.length>0?(0,s.KP)(i):(0,s.KP)(o),l={value:_(a,{width:t.width,height:t.height})},c=(0,r.Z)(a,4),u=c[0],d=c[1],h=(u+c[2])/2,m=(d+c[3])/2;return{appState:E(E(E({},t),(0,p.s)({scenePoint:{x:h,y:m},viewportDimensions:{width:t.width,height:t.height},zoom:l})),{},{zoom:l}),commitToHistory:!1}},P=((0,g.z)({name:"zoomToSelection",trackEvent:{category:"canvas"},perform:function(e,t){return C(e,t,!0)},keyTest:function(e){return e.code===d.aU.TWO&&e.shiftKey&&!e.altKey&&!e[d.tW.CTRL_OR_CMD]}}),(0,g.z)({name:"zoomToFit",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t){return C(e,t,!1)},keyTest:function(e){return e.code===d.aU.ONE&&e.shiftKey&&!e.altKey&&!e[d.tW.CTRL_OR_CMD]}}),(0,g.z)({name:"toggleTheme",viewMode:!0,trackEvent:{category:"canvas"},perform:function(e,t,n){return{appState:E(E({},t),{},{theme:n||(t.theme===c.C6.LIGHT?c.C6.DARK:c.C6.LIGHT)}),commitToHistory:!1}},keyTest:function(e){return e.altKey&&e.shiftKey&&e.code===d.aU.D},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.toggleTheme}})),T=((0,g.z)({name:"toggleEraserTool",trackEvent:{category:"toolbar"},perform:function(e,t){var n;return n=(0,y.EN)(t)?(0,m.Om)(t,E(E({},t.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,m.Om)(t,{type:"eraser",lastActiveToolBeforeEraser:t.activeTool}),{appState:E(E({},t),{},{selectedElementIds:{},selectedGroupIds:{},activeTool:n}),commitToHistory:!0}},keyTest:function(e){return e.key===d.tW.E}}),(0,g.z)({name:"toggleHandTool",trackEvent:{category:"toolbar"},perform:function(e,t,n,r){var o;return(0,y.l$)(t)?o=(0,m.Om)(t,E(E({},t.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(o=(0,m.Om)(t,{type:"hand",lastActiveToolBeforeEraser:t.activeTool}),(0,m.KJ)(r.canvas,c.oc.GRAB)),{appState:E(E({},t),{},{selectedElementIds:{},selectedGroupIds:{},activeTool:o}),commitToHistory:!0}},keyTest:function(e){return e.key===d.tW.H}}))},4688:function(e,t,n){"use strict";n.d(t,{FA:function(){return k},ZM:function(){return w},jK:function(){return E},uN:function(){return y},yQ:function(){return x},zp:function(){return j}});var r=n(7169),o=n(8950),i=n(2975),a=n.n(i),l=n(6066),c=n(7901),s=n(6665),u=n(533),d=n(1868),f=n(9485),p=n(1047),h=n(8211);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v,b,y=(0,c.z)({name:"copy",trackEvent:{category:"element"},perform:function(e,t,n,r){var o=(0,d.eD)(e,t,!0);return(0,s.vQ)(o,r.files),{commitToHistory:!1}},predicate:function(e,t,n,r){return r.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.copy",keyTest:void 0}),x=(0,c.z)({name:"paste",trackEvent:{category:"element"},perform:function(e,t,n,r){return r.pasteFromClipboard(null),{commitToHistory:!1}},predicate:function(e,t,n,r){return r.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.paste",keyTest:void 0}),w=(0,c.z)({name:"cut",trackEvent:{category:"element"},perform:function(e,t,n,r){return y.perform(e,t,n,r),u.X.perform(e,t)},predicate:function(e,t,n,r){return r.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.cut",keyTest:function(e){return e[l.tW.CTRL_OR_CMD]&&e.key===l.tW.X}}),k=(0,c.z)({name:"copyAsSvg",trackEvent:{category:"element"},perform:(v=(0,o.Z)(a().mark((function e(t,n,r,o){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.canvas){e.next=2;break}return e.abrupt("return",{commitToHistory:!1});case 2:return i=(0,d.eD)((0,p.Lm)(t),n,!0),e.prev=3,e.next=6,(0,f.p1)("clipboard-svg",i.length?i:(0,p.Lm)(t),n,o.files,n);case 6:return e.abrupt("return",{commitToHistory:!1});case 9:return e.prev=9,e.t0=e.catch(3),console.error(e.t0),e.abrupt("return",{appState:g(g({},n),{},{errorMessage:e.t0.message}),commitToHistory:!1});case 13:case"end":return e.stop()}}),e,null,[[3,9]])}))),function(e,t,n,r){return v.apply(this,arguments)}),predicate:function(e){return s.wx&&e.length>0},contextItemLabel:"labels.copyAsSvg"}),E=(0,c.z)({name:"copyAsPng",trackEvent:{category:"element"},perform:(b=(0,o.Z)(a().mark((function e(t,n,r,o){var i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.canvas){e.next=2;break}return e.abrupt("return",{commitToHistory:!1});case 2:return i=(0,d.eD)((0,p.Lm)(t),n,!0),e.prev=3,e.next=6,(0,f.p1)("clipboard",i.length?i:(0,p.Lm)(t),n,o.files,n);case 6:return e.abrupt("return",{appState:g(g({},n),{},{toast:{message:(0,h.t)("toast.copyToClipboardAsPng",{exportSelection:i.length?(0,h.t)("toast.selection"):(0,h.t)("toast.canvas"),exportColorScheme:n.exportWithDarkMode?(0,h.t)("buttons.darkMode"):(0,h.t)("buttons.lightMode")})}}),commitToHistory:!1});case 9:return e.prev=9,e.t0=e.catch(3),console.error(e.t0),e.abrupt("return",{appState:g(g({},n),{},{errorMessage:e.t0.message}),commitToHistory:!1});case 13:case"end":return e.stop()}}),e,null,[[3,9]])}))),function(e,t,n,r){return b.apply(this,arguments)}),predicate:function(e){return s.vt&&e.length>0},contextItemLabel:"labels.copyAsPng",keyTest:function(e){return e.code===l.aU.C&&e.altKey&&e.shiftKey}}),j=(0,c.z)({name:"copyText",trackEvent:{category:"element"},perform:function(e,t){var n=(0,d.eD)((0,p.Lm)(e),t,!0).reduce((function(e,t){return(0,p.iB)(t)&&e.push(t.text),e}),[]).join("\n\n");return(0,s.dd)(n),{commitToHistory:!1}},predicate:function(e,t){return s.wx&&(0,d.eD)(e,t,!0).some(p.iB)},contextItemLabel:"labels.copyText"})},533:function(e,t,n){"use strict";n.d(t,{X:function(){return w}});var r=n(7169),o=n(75),i=n(6066),a=n(1319),l=n(8211),c=n(7901),s=n(1047),u=n(1935),d=n(242),f=n(6938),p=n(8290),h=n(1974),m=n(6340),g=n(3646),v=n(4512);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=function(e,t){if(e.editingGroupId){var n=(0,d.Fb)((0,s.Lm)(t),e.editingGroupId);if(n.length)return y(y({},e),{},{selectedElementIds:(0,r.Z)({},n[0].id,!0)})}return e},w=(0,c.z)({name:"deleteSelectedElements",trackEvent:{category:"element",action:"delete"},perform:function(e,t){if(t.editingLinearElement){var n=t.editingLinearElement,r=n.elementId,i=n.selectedPointsIndices,a=n.startBindingElement,l=n.endBindingElement,c=f._.getElement(r);if(!c)return!1;if(null==i)return!1;if(c.points.length<2){var d=e.map((function(e){return e.id===c.id?(0,u.BE)(e,{isDeleted:!0}):e}));return{elements:d,appState:y(y({},x(t,d)),{},{editingLinearElement:null}),commitToHistory:!1}}var g={startBindingElement:null!=i&&i.includes(0)?null:a,endBindingElement:null!=i&&i.includes(c.points.length-1)?null:l};return f._.deletePoints(c,i),{elements:e,appState:y(y({},t),{},{editingLinearElement:y(y(y({},t.editingLinearElement),g),{},{selectedPointsIndices:(null==i?void 0:i[0])>0?[i[0]-1]:[0]})}),commitToHistory:!0}}var v=function(e,t){return{elements:e.map((function(e){return t.selectedElementIds[e.id]||(0,h.Xh)(e)&&t.selectedElementIds[e.containerId]?(0,u.BE)(e,{isDeleted:!0}):e})),appState:y(y({},t),{},{selectedElementIds:{}})}}(e,t),b=v.elements,w=v.appState;return(0,p.$q)(b,e.filter((function(e){var n=e.id;return t.selectedElementIds[n]}))),{elements:b,appState:y(y({},w=x(w,b)),{},{activeTool:(0,m.Om)(t,{type:"selection"}),multiElement:null}),commitToHistory:(0,o.N)((0,s.Lm)(e),t)}},contextItemLabel:"labels.delete",keyTest:function(e,t,n){return(e.key===i.tW.BACKSPACE||e.key===i.tW.DELETE)&&!e[i.tW.CTRL_OR_CMD]},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,v.jsx)(a.V,{type:"button",icon:g.XH,title:(0,l.t)("labels.delete"),"aria-label":(0,l.t)("labels.delete"),onClick:function(){return r(null)},visible:(0,o.N)((0,s.Lm)(t),n)})}})},3248:function(e,t,n){"use strict";n.d(t,{$:function(){return f},U:function(){return p}});var r=n(7169),o=n(1935),i=n(6066),a=n(75),l=n(6340),c=n(7901);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){return e.every((function(e){return!e.locked}))},f=(0,c.z)({name:"toggleElementLock",trackEvent:{category:"element"},perform:function(e,t){var n=(0,a.eD)(e,t,!0);if(!n.length)return!1;var r=d(n),i=(0,l.xn)(n);return{elements:e.map((function(e){return i.has(e.id)?(0,o.BE)(e,{locked:r}):e})),appState:u(u({},t),{},{selectedLinearElement:r?null:t.selectedLinearElement}),commitToHistory:!0}},contextItemLabel:function(e,t){var n=(0,a.eD)(e,t,!1);return 1===n.length?n[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock":d(n)?"labels.elementLock.lockAll":"labels.elementLock.unlockAll"},keyTest:function(e,t,n){return e.key.toLocaleLowerCase()===i.tW.L&&e[i.tW.CTRL_OR_CMD]&&e.shiftKey&&(0,a.eD)(n,t,!1).length>0}}),p=(0,c.z)({name:"unlockAllElements",trackEvent:{category:"canvas"},viewMode:!1,predicate:function(e){return e.some((function(e){return e.locked}))},perform:function(e,t){var n=e.filter((function(e){return e.locked}));return{elements:e.map((function(e){return e.locked?(0,o.BE)(e,{locked:!1}):e})),appState:u(u({},t),{},{selectedElementIds:Object.fromEntries(n.map((function(e){return[e.id,!0]})))}),commitToHistory:!0}},contextItemLabel:"labels.elementLock.unlockAll"})},8671:function(e,t,n){"use strict";n.d(t,{_d:function(){return te},mM:function(){return ee},ns:function(){return Q}});var r=n(8950),o=n(2577),i=n(7169),a=n(2975),l=n.n(a),c=n(3646),s=n(487),u=n.n(s),d=n(631),f=n.n(d),p=n(2052),h=n.n(p),m=n(4010),g=n.n(m),v=n(1469),b=n.n(v),y=n(9329),x=n.n(y),w=n(6759),k={};k.styleTagTransform=x(),k.setAttributes=g(),k.insert=h().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=b();u()(w.Z,k),w.Z&&w.Z.locals&&w.Z.locals;var E=n(9787),j=n(6340),S=n(532),O={};O.styleTagTransform=x(),O.setAttributes=g(),O.insert=h().bind(null,"head"),O.domAPI=f(),O.insertStyleElement=b();u()(S.Z,O),S.Z&&S.Z.locals&&S.Z.locals;var _=n(6936),C=n(6066),P=n(4512),T=function(e){var t=(0,_.J0)().id,n=(0,E.useState)(e.value),r=(0,o.Z)(n,2),i=r[0],a=r[1];return(0,P.jsxs)("div",{className:"ProjectName",children:[(0,P.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:"".concat(e.label).concat(e.isNameEditable?"":":")}),e.isNameEditable?(0,P.jsx)("input",{type:"text",className:"TextInput",onBlur:function(t){(0,j.qz)(t.target);var n=t.target.value;n!==e.value&&e.onChange(n)},onKeyDown:function(e){if(e.key===C.tW.ENTER){if(e.preventDefault(),e.nativeEvent.isComposing||229===e.keyCode)return;e.currentTarget.blur()}},id:"".concat(t,"-filename"),value:i,onChange:function(e){return a(e.target.value)}}):(0,P.jsx)("span",{className:"TextInput TextInput--readonly",id:"".concat(t,"-filename"),children:e.value})]})},I=n(1319),M=n(1894),D=(n(5422),n(8211)),A=n(2335),L=function(e){var t=e.title||("dark"===e.value?(0,D.t)("buttons.lightMode"):(0,D.t)("buttons.darkMode"));return(0,P.jsx)(I.V,{type:"icon",icon:e.value===A.C6.LIGHT?Z.MOON:Z.SUN,title:t,"aria-label":t,onClick:function(){return e.onChange(e.value===A.C6.DARK?A.C6.LIGHT:A.C6.DARK)},"data-testid":"toggle-dark-mode"})},Z={SUN:(0,P.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,P.jsx)("path",{fill:"currentColor",d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"})}),MOON:(0,P.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,P.jsx)("path",{fill:"currentColor",d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"})})},R=n(9485),z=n(1047),N=n(434);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var W=function(){var e=(0,r.Z)(l().mark((function e(t,n,r){var o,i,a,c,s,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(o=n).exportBackground,a=o.viewBackgroundColor,c=o.name,s=o.fileHandle,u=(0,N.Qk)(s),s&&(0,N.DQ)(u)){e.next=4;break}throw new Error("fileHandle should exist and should be of type svg or png when resaving");case 4:return n=H(H({},n),{},{exportEmbedScene:!0}),e.next=7,(0,R.p1)(u,(0,z.Lm)(t),n,r,{exportBackground:i,viewBackgroundColor:a,name:c,fileHandle:s});case 7:return e.abrupt("return",{fileHandle:s});case 8:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),F=n(7901),U=n(3807),K=n(4162),Y=n(75),V=n(1393);function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,F.z)({name:"changeProjectName",trackEvent:!1,perform:function(e,t,n){return{appState:X(X({},t),{},{name:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData,r=e.appProps;return(0,P.jsx)(T,{label:(0,D.t)("labels.fileTitle"),value:t.name||"Unnamed",onChange:function(e){return n(e)},isNameEditable:void 0===r.name&&!t.viewModeEnabled})}}),(0,F.z)({name:"changeExportScale",trackEvent:{category:"export",action:"scale"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportScale:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,i=(0,z.Lm)(t),a=(0,Y.N)(i,n)?(0,Y.eD)(i,n):i;return(0,P.jsx)(P.Fragment,{children:A.ZB.map((function(e){var t=(0,K.Cg)(a,A.qy,e),i=(0,o.Z)(t,2),l=i[0],c=i[1],s="".concat((0,D.t)("buttons.scale")," ").concat(e,"x (").concat(l,"x").concat(c,")");return(0,P.jsx)(I.V,{size:"small",type:"radio",icon:"".concat(e,"x"),name:"export-canvas-scale",title:s,"aria-label":s,id:"export-canvas-scale",checked:e===n.exportScale,onChange:function(){return r(e)}},e)}))})}}),(0,F.z)({name:"changeExportBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportBackground:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,P.jsx)(U.o,{checked:t.exportBackground,onChange:function(e){return n(e)},children:(0,D.t)("labels.withBackground")})}}),(0,F.z)({name:"changeExportEmbedScene",trackEvent:{category:"export",action:"embedScene"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportEmbedScene:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,P.jsxs)(U.o,{checked:t.exportEmbedScene,onChange:function(e){return n(e)},children:[(0,D.t)("labels.exportEmbedScene"),(0,P.jsx)(M.u,{label:(0,D.t)("labels.exportEmbedScene_details"),long:!0,children:(0,P.jsx)("div",{className:"excalidraw-tooltip-icon",children:c.Vl})})]})}});var q,$,J,Q=(0,F.z)({name:"saveToActiveFile",trackEvent:{category:"export"},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.saveToActiveFile&&!!t.fileHandle&&!t.viewModeEnabled},perform:(q=(0,r.Z)(l().mark((function e(t,n,r,o){var i,a,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!!n.fileHandle,e.prev=1,!(0,N.g8)(n.fileHandle)){e.next=8;break}return e.next=5,W(t,n,o.files);case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,(0,R.Um)(t,n,o.files);case 10:e.t0=e.sent;case 11:return a=e.t0,c=a.fileHandle,e.abrupt("return",{commitToHistory:!1,appState:X(X({},n),{},{fileHandle:c,toast:i?{message:null!=c&&c.name?(0,D.t)("toast.fileSavedToFilename").replace("{filename}",'"'.concat(c.name,'"')):(0,D.t)("toast.fileSaved")}:null})});case 16:return e.prev=16,e.t1=e.catch(1),"AbortError"!==(null===e.t1||void 0===e.t1?void 0:e.t1.name)?console.error(e.t1):console.warn(e.t1),e.abrupt("return",{commitToHistory:!1});case 20:case"end":return e.stop()}}),e,null,[[1,16]])}))),function(e,t,n,r){return q.apply(this,arguments)}),keyTest:function(e){return e.key===C.tW.S&&e[C.tW.CTRL_OR_CMD]&&!e.shiftKey}}),ee=(0,F.z)({name:"saveFileToDisk",viewMode:!0,trackEvent:{category:"export"},perform:($=(0,r.Z)(l().mark((function e(t,n,r,o){var i,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,R.Um)(t,X(X({},n),{},{fileHandle:null}),o.files);case 3:return i=e.sent,a=i.fileHandle,e.abrupt("return",{commitToHistory:!1,appState:X(X({},n),{},{fileHandle:a})});case 8:return e.prev=8,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)?console.error(e.t0):console.warn(e.t0),e.abrupt("return",{commitToHistory:!1});case 12:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,t,n,r){return $.apply(this,arguments)}),keyTest:function(e){return e.key===C.tW.S&&e.shiftKey&&e[C.tW.CTRL_OR_CMD]},PanelComponent:function(e){var t=e.updateData;return(0,P.jsx)(I.V,{type:"button",icon:c.po,title:(0,D.t)("buttons.saveAs"),"aria-label":(0,D.t)("buttons.saveAs"),showAriaLabel:(0,_.Fy)().isMobile,hidden:!V.kr,onClick:function(){return t(null)},"data-testid":"save-as-button"})}}),te=(0,F.z)({name:"loadScene",trackEvent:{category:"export"},predicate:function(e,t,n,r){return!!r.props.UIOptions.canvasActions.loadScene&&!t.viewModeEnabled},perform:(J=(0,r.Z)(l().mark((function e(t,n,r,o){var i,a,c,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,R.n8)(n,t);case 3:return i=e.sent,a=i.elements,c=i.appState,s=i.files,e.abrupt("return",{elements:a,appState:c,files:s,commitToHistory:!0});case 10:if(e.prev=10,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=15;break}return console.warn(e.t0),e.abrupt("return",!1);case 15:return e.abrupt("return",{elements:t,appState:X(X({},n),{},{errorMessage:e.t0.message}),files:o.files,commitToHistory:!1});case 16:case"end":return e.stop()}}),e,null,[[0,10]])}))),function(e,t,n,r){return J.apply(this,arguments)}),keyTest:function(e){return e[C.tW.CTRL_OR_CMD]&&e.key===C.tW.O}});(0,F.z)({name:"exportWithDarkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:function(e,t,n){return{appState:X(X({},t),{},{exportWithDarkMode:n}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,P.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:(0,P.jsx)(L,{value:t.exportWithDarkMode?A.C6.DARK:A.C6.LIGHT,onChange:function(e){n(e===A.C6.DARK)},title:(0,D.t)("labels.toggleExportColorScheme")})})}})},6208:function(e,t,n){"use strict";n.d(t,{Tu:function(){return $},Zq:function(){return J}});var r=n(1930),o=n(7169),i=n(56),a=n(7047),l=n(45),c=n(4512),s=function(e){return(0,c.jsx)("div",{className:"buttonList buttonListIcon",children:e.options.map((function(t){var n;return"button"===e.type?(0,c.jsx)("button",{onClick:function(n){return e.onClick(t.value,n)},className:(0,l.Z)({active:null!==(n=t.active)&&void 0!==n?n:e.value===t.value}),"data-testid":t.testId,title:t.text,children:t.icon},t.text):(0,c.jsxs)("label",{className:(0,l.Z)({active:e.value===t.value}),title:t.text,children:[(0,c.jsx)("input",{type:"radio",name:e.group,onChange:function(){return e.onChange(t.value)},checked:e.value===t.value,"data-testid":t.testId}),t.icon]},t.text)}))})},u=n(8206),d=n(2577),f=n(9787),p=n.n(f),h=n(2891),m=n(487),g=n.n(m),v=n(631),b=n.n(v),y=n(2052),x=n.n(y),w=n(4010),k=n.n(w),E=n(1469),j=n.n(E),S=n(9329),O=n.n(S),_=n(9478),C={};C.styleTagTransform=O(),C.setAttributes=k(),C.insert=x().bind(null,"head"),C.domAPI=b(),C.insertStyleElement=j();g()(_.Z,C),_.Z&&_.Z.locals&&_.Z.locals;var P=n(6066),T=n(8211);function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){var t=e.options,n=e.value,r=e.label,o=e.onChange,i=e.onClose,a=p().useRef(),s=p().useRef(),u=p().useRef(null);p().useEffect((function(){s.current?s.current.focus():u.current&&u.current.focus()}),[]);return(0,c.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":r,onKeyDown:function(e){var n=t.find((function(t){return t.keyBinding===e.key.toLowerCase()}));if(e.metaKey||e.altKey||e.ctrlKey||!n)if(e.key===P.tW.TAB)setTimeout((function(){s.current!==document.activeElement&&i()}),0);else if((0,P.Wl)(e.key)){var r=document.activeElement,o=(0,T.G3)().rtl,a=Array.prototype.indexOf.call(u.current.children,r);if(-1!==a){var l=t.length,c=a;switch(e.key){case o?P.tW.ARROW_LEFT:P.tW.ARROW_RIGHT:case P.tW.ARROW_DOWN:c=(a+1)%l;break;case o?P.tW.ARROW_RIGHT:P.tW.ARROW_LEFT:case P.tW.ARROW_UP:c=(l+a-1)%l}u.current.children[c].focus()}e.preventDefault()}else e.key!==P.tW.ESCAPE&&e.key!==P.tW.ENTER||(e.preventDefault(),i());else{var d=t.indexOf(n);u.current.children[d].focus(),e.preventDefault()}e.nativeEvent.stopImmediatePropagation(),e.stopPropagation()},children:(0,c.jsx)("div",{className:"picker-content",ref:u,children:t.map((function(e,t){return(0,c.jsxs)("button",{className:(0,l.Z)("picker-option",{active:n===e.value}),onClick:function(t){t.currentTarget.focus(),o(e.value)},title:"".concat(e.text," — ").concat(e.keyBinding.toUpperCase()),"aria-label":e.text||"none","aria-keyshortcuts":e.keyBinding,ref:function(r){r&&0===t&&(a.current=r),r&&e.value===n&&(s.current=r)},onFocus:function(){o(e.value)},children:[e.icon,(0,c.jsx)("span",{className:"picker-keybinding",children:e.keyBinding})]},e.text)}))})})}function A(e){var t,n=e.value,r=e.label,o=e.options,i=e.onChange,a=e.group,l=void 0===a?"":a,s=p().useState(!1),u=(0,d.Z)(s,2),f=u[0],m=u[1],g=p().useRef(null),v=(0,T.G3)().rtl;return(0,c.jsxs)("div",{children:[(0,c.jsx)("button",{name:l,className:f?"active":"","aria-label":r,onClick:function(){return m(!f)},ref:g,children:null===(t=o.find((function(e){return e.value===n})))||void 0===t?void 0:t.icon}),(0,c.jsx)(p().Suspense,{fallback:"",children:f?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(h.J,M(M({onCloseRequest:function(e){return e.target!==g.current&&m(!1)}},v?{right:5.5}:{left:-5.5}),{},{children:(0,c.jsx)(D,{options:o,value:n,label:r,onChange:i,onClose:function(){var e;m(!1),null===(e=g.current)||void 0===e||e.focus()}})})),(0,c.jsx)("div",{className:"picker-triangle"})]}):null})]})}var L=n(3646),Z=n(2335),R=n(1047),z=n(1935),N=n(5710),B=n(1974),H=n(6954),W=n(75),F=n(8120),U=n(6340),K=n(7901);function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=(0,U.xn)((0,W.eD)(e,t,r));return e.map((function(e){var r;return o.get(e.id)||e.id===(null===(r=t.editingElement)||void 0===r?void 0:r.id)?n(e):e}))},X=function(e,t,n,r){var o,i,a=t.editingElement,l=(0,R.Lm)(e);return null!==(o=null!==(i=a&&n(a))&&void 0!==i?i:(0,W.N)(l,t)?(0,W.PR)(l,t,n):r)&&void 0!==o?o:null},q=function(e,t,n,o){var i=new Set;return{elements:G(e,t,(function(e){if((0,R.iB)(e)){var t=n(e);i.add(t);var r=(0,z.BE)(e,{fontSize:t});return(0,R.oN)(r,(0,N.tl)(e)),o=e,a=r,r=(0,B.Xh)(a)?a:(0,z.DR)(a,{x:"left"===o.textAlign?o.x:o.x+(o.width-a.width)/("center"===o.textAlign?2:1),y:o.y+(o.height-a.height)/2},!1)}var o,a;return e}),!0),appState:V(V({},t),{},{currentItemFontSize:1===i.size?(0,r.Z)(i)[0]:null!=o?o:t.currentItemFontSize}),commitToHistory:!0}},$=((0,K.z)({name:"changeStrokeColor",trackEvent:!1,perform:function(e,t,n){return V(V({},n.currentItemStrokeColor&&{elements:G(e,t,(function(e){return(0,F.PD)(e.type)?(0,z.BE)(e,{strokeColor:n.currentItemStrokeColor}):e}),!0)}),{},{appState:V(V({},t),n),commitToHistory:!!n.currentItemStrokeColor})},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;e.appProps;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{"aria-hidden":"true",children:(0,T.t)("labels.stroke")}),(0,c.jsx)(u.z,{topPicks:i.fY,palette:i.Wk,type:"elementStroke",label:(0,T.t)("labels.stroke"),color:X(t,n,(function(e){return e.strokeColor}),n.currentItemStrokeColor),onChange:function(e){return r({currentItemStrokeColor:e})},elements:t,appState:n,updateData:r})]})}}),(0,K.z)({name:"changeBackgroundColor",trackEvent:!1,perform:function(e,t,n){return V(V({},n.currentItemBackgroundColor&&{elements:G(e,t,(function(e){return(0,z.BE)(e,{backgroundColor:n.currentItemBackgroundColor})}))}),{},{appState:V(V({},t),n),commitToHistory:!!n.currentItemBackgroundColor})},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;e.appProps;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h3",{"aria-hidden":"true",children:(0,T.t)("labels.background")}),(0,c.jsx)(u.z,{topPicks:i.eq,palette:i.SF,type:"elementBackground",label:(0,T.t)("labels.background"),color:X(t,n,(function(e){return e.backgroundColor}),n.currentItemBackgroundColor),onChange:function(e){return r({currentItemBackgroundColor:e})},elements:t,appState:n,updateData:r})]})}}),(0,K.z)({name:"changeFillStyle",trackEvent:!1,perform:function(e,t,n,r){return(0,a.L)("element","changeFillStyle","".concat(n," (").concat(r.device.isMobile?"mobile":"desktop",")")),{elements:G(e,t,(function(e){return(0,z.BE)(e,{fillStyle:n})})),appState:V(V({},t),{},{currentItemFillStyle:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,W.eD)(t,n),i=o.length>0&&o.every((function(e){return"zigzag"===e.fillStyle}));return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,T.t)("labels.fill")}),(0,c.jsx)(s,{type:"button",options:[{value:"hachure",text:"".concat(i?(0,T.t)("labels.zigzag"):(0,T.t)("labels.hachure")," (").concat((0,U.uY)("Alt-Click"),")"),icon:i?L.lF:L.a0,active:!!i||void 0},{value:"cross-hatch",text:(0,T.t)("labels.crossHatch"),icon:L.np},{value:"solid",text:(0,T.t)("labels.solid"),icon:L.X7}],value:X(t,n,(function(e){return e.fillStyle}),n.currentItemFillStyle),onClick:function(e,t){var n=t.altKey&&"hachure"===e&&o.every((function(e){return"hachure"===e.fillStyle}))?"zigzag":e;r(n)}})]})}}),(0,K.z)({name:"changeStrokeWidth",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){return(0,z.BE)(e,{strokeWidth:n})})),appState:V(V({},t),{},{currentItemStrokeWidth:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,T.t)("labels.strokeWidth")}),(0,c.jsx)(s,{group:"stroke-width",options:[{value:1,text:(0,T.t)("labels.thin"),icon:L.ZA},{value:2,text:(0,T.t)("labels.bold"),icon:L.Wl},{value:4,text:(0,T.t)("labels.extraBold"),icon:L.m9}],value:X(t,n,(function(e){return e.strokeWidth}),n.currentItemStrokeWidth),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeSloppiness",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){return(0,z.BE)(e,{seed:(0,H.LU)(),roughness:n})})),appState:V(V({},t),{},{currentItemRoughness:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,T.t)("labels.sloppiness")}),(0,c.jsx)(s,{group:"sloppiness",options:[{value:0,text:(0,T.t)("labels.architect"),icon:L.bf},{value:1,text:(0,T.t)("labels.artist"),icon:L.kM},{value:2,text:(0,T.t)("labels.cartoonist"),icon:L.W2}],value:X(t,n,(function(e){return e.roughness}),n.currentItemRoughness),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeStrokeStyle",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){return(0,z.BE)(e,{strokeStyle:n})})),appState:V(V({},t),{},{currentItemStrokeStyle:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,T.t)("labels.strokeStyle")}),(0,c.jsx)(s,{group:"strokeStyle",options:[{value:"solid",text:(0,T.t)("labels.strokeStyle_solid"),icon:L.ZA},{value:"dashed",text:(0,T.t)("labels.strokeStyle_dashed"),icon:L.a5},{value:"dotted",text:(0,T.t)("labels.strokeStyle_dotted"),icon:L.aT}],value:X(t,n,(function(e){return e.strokeStyle}),n.currentItemStrokeStyle),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeOpacity",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){return(0,z.BE)(e,{opacity:n})}),!0),appState:V(V({},t),{},{currentItemOpacity:n}),commitToHistory:!0}},PanelComponent:function(e){var t,n=e.elements,r=e.appState,o=e.updateData;return(0,c.jsxs)("label",{className:"control-label",children:[(0,T.t)("labels.opacity"),(0,c.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:function(e){return o(+e.target.value)},value:null!==(t=X(n,r,(function(e){return e.opacity}),r.currentItemOpacity))&&void 0!==t?t:void 0})]})}}),(0,K.z)({name:"changeFontSize",trackEvent:!1,perform:function(e,t,n){return q(e,t,(function(){return n}),n)},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,T.t)("labels.fontSize")}),(0,c.jsx)(s,{group:"font-size",options:[{value:16,text:(0,T.t)("labels.small"),icon:L.q0,testId:"fontSize-small"},{value:20,text:(0,T.t)("labels.medium"),icon:L.nq,testId:"fontSize-medium"},{value:28,text:(0,T.t)("labels.large"),icon:L.tW,testId:"fontSize-large"},{value:36,text:(0,T.t)("labels.veryLarge"),icon:L.OA,testId:"fontSize-veryLarge"}],value:X(t,n,(function(e){if((0,R.iB)(e))return e.fontSize;var t=(0,N.WJ)(e);return t?t.fontSize:null}),n.currentItemFontSize||Z.n5),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"decreaseFontSize",trackEvent:!1,perform:function(e,t,n){return q(e,t,(function(e){return Math.round(1/1.1*e.fontSize)}))},keyTest:function(e){return e[P.tW.CTRL_OR_CMD]&&e.shiftKey&&(e.key===P.tW.CHEVRON_LEFT||e.key===P.tW.COMMA)}})),J=(0,K.z)({name:"increaseFontSize",trackEvent:!1,perform:function(e,t,n){return q(e,t,(function(e){return Math.round(1.1*e.fontSize)}))},keyTest:function(e){return e[P.tW.CTRL_OR_CMD]&&e.shiftKey&&(e.key===P.tW.CHEVRON_RIGHT||e.key===P.tW.PERIOD)}});(0,K.z)({name:"changeFontFamily",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){if((0,R.iB)(e)){var t=(0,z.BE)(e,{fontFamily:n,lineHeight:(0,N.PT)(n)});return(0,R.oN)(t,(0,N.tl)(e)),t}return e}),!0),appState:V(V({},t),{},{currentItemFontFamily:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=[{value:Z.ut.Virgil,text:(0,T.t)("labels.handDrawn"),icon:L.Pm},{value:Z.ut.Helvetica,text:(0,T.t)("labels.normal"),icon:L.vo},{value:Z.ut.Cascadia,text:(0,T.t)("labels.code"),icon:L.z6}];return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,T.t)("labels.fontFamily")}),(0,c.jsx)(s,{group:"font-family",options:o,value:X(t,n,(function(e){if((0,R.iB)(e))return e.fontFamily;var t=(0,N.WJ)(e);return t?t.fontFamily:null}),n.currentItemFontFamily||Z.rk),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeTextAlign",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){if((0,R.iB)(e)){var t=(0,z.BE)(e,{textAlign:n});return(0,R.oN)(t,(0,N.tl)(e)),t}return e}),!0),appState:V(V({},t),{},{currentItemTextAlign:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,T.t)("labels.textAlign")}),(0,c.jsx)(s,{group:"text-align",options:[{value:"left",text:(0,T.t)("labels.left"),icon:L.rr,testId:"align-left"},{value:"center",text:(0,T.t)("labels.center"),icon:L.o3,testId:"align-horizontal-center"},{value:"right",text:(0,T.t)("labels.right"),icon:L.oT,testId:"align-right"}],value:X(t,n,(function(e){if((0,R.iB)(e))return e.textAlign;var t=(0,N.WJ)(e);return t?t.textAlign:null}),n.currentItemTextAlign),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeVerticalAlign",trackEvent:{category:"element"},perform:function(e,t,n){return{elements:G(e,t,(function(e){if((0,R.iB)(e)){var t=(0,z.BE)(e,{verticalAlign:n});return(0,R.oN)(t,(0,N.tl)(e)),t}return e}),!0),appState:V({},t),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,c.jsx)("fieldset",{children:(0,c.jsx)(s,{group:"text-align",options:[{value:Z.oX.TOP,text:(0,T.t)("labels.alignTop"),icon:(0,c.jsx)(L.EO,{theme:n.theme}),testId:"align-top"},{value:Z.oX.MIDDLE,text:(0,T.t)("labels.centerVertically"),icon:(0,c.jsx)(L.P7,{theme:n.theme}),testId:"align-middle"},{value:Z.oX.BOTTOM,text:(0,T.t)("labels.alignBottom"),icon:(0,c.jsx)(L.aA,{theme:n.theme}),testId:"align-bottom"}],value:X(t,n,(function(e){if((0,R.iB)(e)&&e.containerId)return e.verticalAlign;var t=(0,N.WJ)(e);return t?t.verticalAlign:null})),onChange:function(e){return r(e)}})})}}),(0,K.z)({name:"changeRoundness",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){return(0,z.BE)(e,{roundness:"round"===n?{type:(0,B.QI)(e.type)?Z.a6.ADAPTIVE_RADIUS:Z.a6.PROPORTIONAL_RADIUS}:null})})),appState:V(V({},t),{},{currentItemRoundness:n}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,W.Zs)((0,R.Lm)(t),n).some((function(e){var t;return(null===(t=e.roundness)||void 0===t?void 0:t.type)===Z.a6.LEGACY}));return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,T.t)("labels.edges")}),(0,c.jsx)(s,{group:"edges",options:[{value:"sharp",text:(0,T.t)("labels.sharp"),icon:L.wr},{value:"round",text:(0,T.t)("labels.round"),icon:L.DS}],value:X(t,n,(function(e){return o?null:e.roundness?"round":"sharp"}),(0,W.sh)(n.activeTool.type)&&n.currentItemRoundness||null),onChange:function(e){return r(e)}})]})}}),(0,K.z)({name:"changeArrowhead",trackEvent:!1,perform:function(e,t,n){return{elements:G(e,t,(function(e){if((0,B.bt)(e)){var t=n.position,r=n.type;if("start"===t)return(0,z.BE)(e,{startArrowhead:r});if("end"===t)return(0,z.BE)(e,{endArrowhead:r})}return e})),appState:V(V({},t),{},(0,o.Z)({},"start"===n.position?"currentItemStartArrowhead":"currentItemEndArrowhead",n.type)),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,T.G3)().rtl;return(0,c.jsxs)("fieldset",{children:[(0,c.jsx)("legend",{children:(0,T.t)("labels.arrowheads")}),(0,c.jsxs)("div",{className:"iconSelectList buttonList",children:[(0,c.jsx)(A,{label:"arrowhead_start",options:[{value:null,text:(0,T.t)("labels.arrowhead_none"),icon:L.fr,keyBinding:"q"},{value:"arrow",text:(0,T.t)("labels.arrowhead_arrow"),icon:(0,c.jsx)(L.il,{flip:!o}),keyBinding:"w"},{value:"bar",text:(0,T.t)("labels.arrowhead_bar"),icon:(0,c.jsx)(L.m,{flip:!o}),keyBinding:"e"},{value:"dot",text:(0,T.t)("labels.arrowhead_dot"),icon:(0,c.jsx)(L.tn,{flip:!o}),keyBinding:"r"},{value:"triangle",text:(0,T.t)("labels.arrowhead_triangle"),icon:(0,c.jsx)(L.j8,{flip:!o}),keyBinding:"t"}],value:X(t,n,(function(e){return(0,B.bt)(e)&&(0,W.Un)(e.type)?e.startArrowhead:n.currentItemStartArrowhead}),n.currentItemStartArrowhead),onChange:function(e){return r({position:"start",type:e})}}),(0,c.jsx)(A,{label:"arrowhead_end",group:"arrowheads",options:[{value:null,text:(0,T.t)("labels.arrowhead_none"),keyBinding:"q",icon:L.fr},{value:"arrow",text:(0,T.t)("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,c.jsx)(L.il,{flip:o})},{value:"bar",text:(0,T.t)("labels.arrowhead_bar"),keyBinding:"e",icon:(0,c.jsx)(L.m,{flip:o})},{value:"dot",text:(0,T.t)("labels.arrowhead_dot"),keyBinding:"r",icon:(0,c.jsx)(L.tn,{flip:o})},{value:"triangle",text:(0,T.t)("labels.arrowhead_triangle"),icon:(0,c.jsx)(L.j8,{flip:o}),keyBinding:"t"}],value:X(t,n,(function(e){return(0,B.bt)(e)&&(0,W.Un)(e.type)?e.endArrowhead:n.currentItemEndArrowhead}),n.currentItemEndArrowhead),onChange:function(e){return r({position:"end",type:e})}})]})]})}})},4958:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r=n(7169),o=n(7901),i=n(6066);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=(0,o.z)({name:"stats",viewMode:!0,trackEvent:{category:"menu"},perform:function(e,t){return{appState:l(l({},t),{},{showStats:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.showStats},contextItemLabel:"stats.title",keyTest:function(e){return!e[i.tW.CTRL_OR_CMD]&&e.altKey&&e.code===i.aU.SLASH}})},1e3:function(e,t,n){"use strict";n.d(t,{FL:function(){return We},vD:function(){return mt.vD},yA:function(){return O},BZ:function(){return C},mo:function(){return X.mo},uN:function(){return lt.uN},jK:function(){return lt.jK},FA:function(){return lt.FA},pw:function(){return ie},ZM:function(){return lt.ZM},X9:function(){return r.X},xF:function(){return V},pL:function(){return ee},jl:function(){return tt},kt:function(){return nt},EQ:function(){return ve},nz:function(){return gt.nz},_d:function(){return te._d},W3:function(){return ae},ns:function(){return te.ns},Yy:function(){return L},V:function(){return S},zi:function(){return _},jY:function(){return se},$h:function(){return vt.$},Pb:function(){return ut},Qs:function(){return xt},u0:function(){return ht.u},Zp:function(){return X.Zp},JN:function(){return pt},y7:function(){return mt.y7},s:function(){return be},zp:function(){return lt.zp}});var r=n(533),o=n(1930),i=n(1935),a=n(242),l=n(75),c=n(1564),s=n(6340),u=function(e,t){for(var n=[],r=[],o=null,i=-1,a=(0,s.xn)((0,l.eD)(e,t,!0));++i<e.length;)a.get(e[i].id)?(r.length&&(n=n.concat(r),r=[]),n.push(i),o=i+1):e[i].isDeleted&&o===i?(o=i+1,r.push(i)):r=[];return n},d=function(e,t,n){if("containerId"in e&&e.containerId){if("left"!==n)return t.indexOf(e);var r=c.Z.getScene(e).getElement(e.containerId);if(r)return t.indexOf(r)}else{var o,i,a=null===(o=e.boundElements)||void 0===o||null===(i=o.find((function(e){return"arrow"!==e.type})))||void 0===i?void 0:i.id;if(a){if("left"===n)return t.indexOf(e);var l=c.Z.getScene(e).getElement(a);if(l)return t.indexOf(l)}}},f=function(e,t){return t.reduce((function(t,n){var r=e[n];return t[r.id]=r,t}),{})},p=function(e,t,n){var r,l,c=u(t,e),p=f(t,c),h=(l=0,(r=c).reduce((function(e,t,n){return n>0&&r[n-1]!==t-1&&(l=++l),(e[l]||(e[l]=[])).push(t),e}),[]));return"right"===n&&(h=h.reverse()),h.forEach((function(r,i){var l=r[0],c=r[r.length-1],u="left"===n?l:c,f=function(e,t,n,r){var o,i=t[n],l=function(t){return!t.isDeleted&&(!e.editingGroupId||t.groupIds.includes(e.editingGroupId))},c="left"===r?(0,s.qr)(t,l,Math.max(0,n-1)):(0,s.cx)(t,l,n+1),u=t[c];if(!u)return-1;if(e.editingGroupId){var f;if((null==i?void 0:i.groupIds.join(""))===(null==u?void 0:u.groupIds.join("")))return null!==(f=d(u,t,r))&&void 0!==f?f:c;if(null==u||!u.groupIds.includes(e.editingGroupId))return-1}if(!u.groupIds.length)return null!==(o=d(u,t,r))&&void 0!==o?o:c;var p=e.editingGroupId?u.groupIds[u.groupIds.indexOf(e.editingGroupId)-1]:u.groupIds[u.groupIds.length-1],h=(0,a.Fb)(t,p);return h.length?"left"===r?t.indexOf(h[0]):t.indexOf(h[h.length-1]):c}(e,t,u,n);if(-1!==f&&u!==f){var p="left"===n?t.slice(0,f):t.slice(0,l),h=t.slice(l,c+1),m="left"===n?t.slice(f,l):t.slice(c+1,f+1),g="left"===n?t.slice(c+1):t.slice(f+1);t="left"===n?[].concat((0,o.Z)(p),(0,o.Z)(h),(0,o.Z)(m),(0,o.Z)(g)):[].concat((0,o.Z)(p),(0,o.Z)(m),(0,o.Z)(h),(0,o.Z)(g))}})),t.map((function(e){return p[e.id]?(0,i.ZP)(e):e}))},h=function(e,t,n){var r,l,c=u(e,t),s=f(e,c),d=[];if("left"===n){if(t.editingGroupId){var p=(0,a.Fb)(e,t.editingGroupId);if(!p.length)return e;r=e.indexOf(p[0])}else r=0;l=c[c.length-1]}else{if(t.editingGroupId){var h=(0,a.Fb)(e,t.editingGroupId);if(!h.length)return e;l=e.indexOf(h[h.length-1])}else l=e.length-1;r=c[0]}for(var m=r;m<l+1;m++)c.includes(m)||d.push(e[m]);var g=Object.values(s).map((function(e){return(0,i.ZP)(e)})),v=e.slice(0,r),b=e.slice(l+1);return"left"===n?[].concat((0,o.Z)(v),(0,o.Z)(g),d,(0,o.Z)(b)):[].concat((0,o.Z)(v),d,(0,o.Z)(g),(0,o.Z)(b))},m=function(e,t){return p(t,e,"left")},g=function(e,t){return p(t,e,"right")},v=function(e,t){return h(e,t,"left")},b=function(e,t){return h(e,t,"right")},y=n(6066),x=n(8211),w=n(7901),k=n(3646),E=n(2335),j=n(4512),S=(0,w.z)({name:"sendBackward",trackEvent:{category:"element"},perform:function(e,t){return{elements:m(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.sendBackward",keyPriority:40,keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&!e.shiftKey&&e.code===y.aU.BRACKET_LEFT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,j.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,x.t)("labels.sendBackward")," — ").concat((0,s.uY)("CtrlOrCmd+[")),children:k.Gc})}}),O=(0,w.z)({name:"bringForward",trackEvent:{category:"element"},perform:function(e,t){return{elements:g(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.bringForward",keyPriority:40,keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&!e.shiftKey&&e.code===y.aU.BRACKET_RIGHT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,j.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,x.t)("labels.bringForward")," — ").concat((0,s.uY)("CtrlOrCmd+]")),children:k.t5})}}),_=(0,w.z)({name:"sendToBack",trackEvent:{category:"element"},perform:function(e,t){return{elements:v(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.sendToBack",keyTest:function(e){return E.Um?e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.BRACKET_LEFT:e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.code===y.aU.BRACKET_LEFT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,j.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return t(null)},title:"".concat((0,x.t)("labels.sendToBack")," — ").concat(E.Um?(0,s.uY)("CtrlOrCmd+Alt+["):(0,s.uY)("CtrlOrCmd+Shift+[")),children:k.pw})}}),C=(0,w.z)({name:"bringToFront",trackEvent:{category:"element"},perform:function(e,t){return{elements:b(e,t),appState:t,commitToHistory:!0}},contextItemLabel:"labels.bringToFront",keyTest:function(e){return E.Um?e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.BRACKET_RIGHT:e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.code===y.aU.BRACKET_RIGHT},PanelComponent:function(e){var t=e.updateData;e.appState;return(0,j.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(e){return t(null)},title:"".concat((0,x.t)("labels.bringToFront")," — ").concat(E.Um?(0,s.uY)("CtrlOrCmd+Alt+]"):(0,s.uY)("CtrlOrCmd+Shift+]")),children:k.IN})}}),P=n(7169),T=n(1047),I=n(1974),M=n(6938);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L=(0,w.z)({name:"selectAll",trackEvent:{category:"canvas"},perform:function(e,t,n,r){if(t.editingLinearElement)return!1;var o=e.reduce((function(e,t){return t.isDeleted||(0,T.iB)(t)&&t.containerId||t.locked||(e[t.id]=!0),e}),{});return{appState:(0,a.bO)(A(A({},t),{},{selectedLinearElement:1===Object.keys(o).length&&(0,I.bt)(e[0])?new M._(e[0],r.scene):null,editingGroupId:null,selectedElementIds:o}),(0,T.Lm)(e)),commitToHistory:!0}},contextItemLabel:"labels.selectAll",keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.key===y.tW.A}}),Z=n(1319),R=n(8290),z=n(5710);function N(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var H=function(e){var t=e.slice(),n=new Set,r=function e(t){var n,r,i,a=null===(n=t[0])||void 0===n||null===(r=n.groupIds)||void 0===r?void 0:r.join(""),l=[t[0]],c=[],s=N(t.slice(1));try{for(s.s();!(i=s.n()).done;){var u,d=i.value;(null===(u=d.groupIds)||void 0===u?void 0:u.join(""))===a?l.push(d):c.push(d)}}catch(e){s.e(e)}finally{s.f()}return c.length?[].concat(l,(0,o.Z)(e(c))):l},i=new Map;return t.forEach((function(e,o){var a;if(!i.has(e.id))if(null!==(a=e.groupIds)&&void 0!==a&&a.length){var l,c=e.groupIds[e.groupIds.length-1],s=t.slice(o).filter((function(e){var t,n=null==e||null===(t=e.groupIds)||void 0===t?void 0:t.some((function(e){return e===c}));return n&&i.set(e.id,!0),n})),u=N(r(s));try{for(u.s();!(l=u.n()).done;){var d=l.value;n.add(d)}}catch(e){u.e(e)}finally{u.f()}}else n.add(e)})),n.size!==e.length?(console.error("normalizeGroupElementOrder: lost some elements... bailing!"),e):(0,o.Z)(n)},W=function(e){var t=function(e){var t=(0,s.I4)(e),n=e.slice(),r=new Set;return n.forEach((function(e,o){var i;if(e)if(null!==(i=e.boundElements)&&void 0!==i&&i.length)r.add(e),n[o]=null,e.boundElements.forEach((function(e){var o=t.get(e.id);o&&"text"===e.type&&(r.add(o[0]),n[o[1]]=null)}));else if("text"===e.type&&e.containerId){var a,l=t.get(e.containerId);null!=l&&null!==(a=l[0].boundElements)&&void 0!==a&&a.find((function(t){return t.id===e.id}))||(r.add(e),n[o]=null)}else r.add(e),n[o]=null})),r.size!==e.length?(console.error("normalizeBoundElementsOrder: lost some elements... bailing!"),e):(0,o.Z)(r)}(H(e));return t};function F(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return U(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V=(0,w.z)({name:"duplicateSelection",trackEvent:{category:"element"},perform:function(e,t){if(t.editingLinearElement){var n=M._.duplicateSelectedPoints(t);return!!n&&{elements:e,appState:n.appState,commitToHistory:!0}}return Y(Y({},G(e,t)),{},{commitToHistory:!0})},contextItemLabel:"labels.duplicateSelection",keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.key===y.tW.D},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{type:"button",icon:k.NA,title:"".concat((0,x.t)("labels.duplicateSelection")," — ").concat((0,s.uY)("CtrlOrCmd+D")),"aria-label":(0,x.t)("labels.duplicateSelection"),onClick:function(){return r(null)},visible:(0,l.N)((0,T.Lm)(t),n)})}}),G=function(e,t){for(var n=W(e),r=new Map,i=[],c=[],u=new Map,d=function(e){var n=(0,T.Sy)(t.editingGroupId,r,e,{x:e.x+E.k/2,y:e.y+E.k/2});return u.set(e.id,n.id),c.push(e),i.push(n),n},f=(0,s.xn)((0,l.eD)(n,t,!0)),p=new Map,h=function(e){var t,n=F(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;p.set(r.id,!0)}}catch(e){n.e(e)}finally{n.f()}return e},m=[],g=-1;++g<n.length;){var v=n[g];if(!p.get(v.id)){var b=(0,z.WJ)(v);if(f.get(v.id)){if(v.groupIds.length||b){var y=(0,a.yO)(t,v);if(y){var x=(0,a.Fb)(n,y);m.push.apply(m,(0,o.Z)(h([].concat((0,o.Z)(x),(0,o.Z)(x.map((function(e){return d(e)})))))));continue}if(b){m.push.apply(m,(0,o.Z)(h([v,b,d(v),d(b)])));continue}}m.push.apply(m,(0,o.Z)(h([v,d(v)])))}else m.push.apply(m,(0,o.Z)(h([v])))}}var w=[],k=new Map;for(g=m.length;--g>=0;){var j=m[g];k.get(j.id)||(k.set(j.id,!0),w.push(j))}var S=w.reverse();return(0,z.P7)(m,c,u),(0,R.ek)(m,c,u),{elements:S,appState:(0,a.bO)(Y(Y({},t),{},{selectedGroupIds:{},selectedElementIds:i.reduce((function(e,t){return(0,I.Xh)(t)||(e[t.id]=!0),e}),{})}),(0,T.Lm)(S))}},X=(n(6208),n(2416)),q=n(2577),$=n(6552);function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ee=(0,w.z)({name:"finalize",trackEvent:!1,perform:function(e,t,n,r){var o,a=r.canvas,l=r.focusContainer,u=r.scene;if(t.editingLinearElement){var d=t.editingLinearElement,f=d.elementId,p=d.startBindingElement,h=d.endBindingElement,m=M._.getElement(f);if(m)return(0,I.Mn)(m)&&(0,R.HG)(m,p,h),{elements:m.points.length<2||(0,T.QD)(m)?e.filter((function(e){return e.id!==m.id})):void 0,appState:Q(Q({},t),{},{cursorButton:"up",editingLinearElement:null}),commitToHistory:!0}}var g=e,v=t.pendingImageElementId&&u.getElement(t.pendingImageElementId);v&&(0,i.DR)(v,{isDeleted:!0},!1),window.document.activeElement instanceof HTMLElement&&l();var b,y=t.multiElement?t.multiElement:"freedraw"===(null===(o=t.editingElement)||void 0===o?void 0:o.type)?t.editingElement:null;if(y){if("freedraw"!==y.type&&"touch"!==t.lastPointerDownWith){var x=y.points,w=y.lastCommittedPoint;w&&x[x.length-1]===w||(0,i.DR)(y,{points:y.points.slice(0,-1)})}(0,T.QD)(y)&&(g=g.slice(0,-1));var k=(0,$.g6)(y.points,t.zoom.value);if(("line"===y.type||"freedraw"===y.type)&&k){var E=y.points,j=E[0];(0,i.DR)(y,{points:E.map((function(e,t){return t===E.length-1?[j[0],j[1]]:e}))})}if((0,I.Mn)(y)&&!k&&y.points.length>1){var S=M._.getPointAtIndexGlobalCoordinates(y,-1),O=(0,q.Z)(S,2),_=O[0],C=O[1];(0,R.R)(y,t,c.Z.getScene(y),{x:_,y:C})}t.activeTool.locked||"freedraw"===t.activeTool.type||(t.selectedElementIds[y.id]=!0)}return(t.activeTool.locked||"freedraw"===t.activeTool.type)&&y||(0,s.z8)(a),b="eraser"===t.activeTool.type?(0,s.Om)(t,Q(Q({},t.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,s.Om)(t,{type:"selection"}),{elements:g,appState:Q(Q({},t),{},{cursorButton:"up",activeTool:(t.activeTool.locked||"freedraw"===t.activeTool.type)&&y?t.activeTool:b,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:y&&!t.activeTool.locked&&"freedraw"!==t.activeTool.type?Q(Q({},t.selectedElementIds),{},(0,P.Z)({},y.id,!0)):t.selectedElementIds,selectedLinearElement:y&&(0,I.bt)(y)?new M._(y,u):t.selectedLinearElement,pendingImageElementId:null}),commitToHistory:"freedraw"===t.activeTool.type}},keyTest:function(e,t){return e.key===y.tW.ESCAPE&&(null!==t.editingLinearElement||!t.draggingElement&&null===t.multiElement)||(e.key===y.tW.ESCAPE||e.key===y.tW.ENTER)&&null!==t.multiElement},PanelComponent:function(e){var t=e.appState,n=e.updateData,r=e.data;return(0,j.jsx)(Z.V,{type:"button",icon:k.$c,title:(0,x.t)("buttons.done"),"aria-label":(0,x.t)("buttons.done"),onClick:n,visible:null!=t.multiElement,size:(null==r?void 0:r.size)||"medium"})}}),te=n(8671);function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe="{}",ie=(0,w.z)({name:"copyStyles",trackEvent:{category:"element"},perform:function(e,t){var n=[],r=e.find((function(e){return t.selectedElementIds[e.id]}));if(n.push(r),r&&(0,I.Xo)(r)){var o=(0,z.WJ)(r);n.push(o)}return r&&(oe=JSON.stringify(n)),{appState:re(re({},t),{},{toast:{message:(0,x.t)("toast.copyStyles")}}),commitToHistory:!1}},contextItemLabel:"labels.copyStyles",keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.C}}),ae=(0,w.z)({name:"pasteStyles",trackEvent:{category:"element"},perform:function(e,t){var n=JSON.parse(oe),r=n[0],o=n[1];if(!(0,T.r2)(r))return{elements:e,commitToHistory:!1};var a=(0,l.eD)(e,t,!0),c=a.map((function(e){return e.id}));return{elements:e.map((function(e){if(c.includes(e.id)){var t,n,l,s,u,d,f,p=r;if((0,T.iB)(e)&&e.containerId&&(p=o),!p)return e;var h=(0,i.BE)(e,{backgroundColor:null===(t=p)||void 0===t?void 0:t.backgroundColor,strokeWidth:null===(n=p)||void 0===n?void 0:n.strokeWidth,strokeColor:null===(l=p)||void 0===l?void 0:l.strokeColor,strokeStyle:null===(s=p)||void 0===s?void 0:s.strokeStyle,fillStyle:null===(u=p)||void 0===u?void 0:u.fillStyle,opacity:null===(d=p)||void 0===d?void 0:d.opacity,roughness:null===(f=p)||void 0===f?void 0:f.roughness,roundness:p.roundness?(0,I.eK)(p.roundness.type,e)?p.roundness:(0,I.UQ)(e):null});if((0,T.iB)(h)){var m,g,v,b=(null===(m=p)||void 0===m?void 0:m.fontSize)||E.n5,y=(null===(g=p)||void 0===g?void 0:g.fontFamily)||E.rk,x=null;(h=(0,i.BE)(h,{fontSize:b,fontFamily:y,textAlign:(null===(v=p)||void 0===v?void 0:v.textAlign)||E.Hg,lineHeight:p.lineHeight||(0,z.PT)(y)})).containerId&&(x=a.find((function(e){return(0,T.iB)(h)&&e.id===h.containerId}))||null),(0,T.oN)(h,x)}return"arrow"===h.type&&(h=(0,i.BE)(h,{startArrowhead:p.startArrowhead,endArrowhead:p.endArrowhead})),h}return e})),commitToHistory:!0}},contextItemLabel:"labels.pasteStyles",keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.V}});function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,w.z)({name:"toggleCanvasMenu",trackEvent:{category:"menu"},perform:function(e,t){return{appState:ce(ce({},t),{},{openMenu:"canvas"===t.openMenu?null:"canvas"}),commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData;return(0,j.jsx)(Z.V,{type:"button",icon:k.RY,"aria-label":(0,x.t)("buttons.menu"),onClick:n,selected:"canvas"===t.openMenu})}}),(0,w.z)({name:"toggleEditMenu",trackEvent:{category:"menu"},perform:function(e,t){return{appState:ce(ce({},t),{},{openMenu:"shape"===t.openMenu?null:"shape"}),commitToHistory:!1}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{visible:(0,T.RT)(n,(0,T.Lm)(t)),type:"button",icon:k.DG,"aria-label":(0,x.t)("buttons.edit"),onClick:r,selected:"shape"===n.openMenu})}}),(0,w.z)({name:"toggleFullScreen",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!(0,s.rB)()}},perform:function(){return(0,s.rB)()||(0,s.wo)(),(0,s.rB)()&&(0,s.Pr)(),{commitToHistory:!1}},keyTest:function(e){return e.key===y.tW.F&&!e[y.tW.CTRL_OR_CMD]}});var se=(0,w.z)({name:"toggleShortcuts",viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:function(e,t,n,r){var o=r.focusContainer;return"help"===t.openDialog&&o(),{appState:ce(ce({},t),{},{openDialog:"help"===t.openDialog?null:"help"}),commitToHistory:!1}},keyTest:function(e){return e.key===y.tW.QUESTION_MARK}}),ue=n(6655),de=n(6954);function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function he(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return me(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ge=function(e,t){var n=(0,l.eD)((0,T.Lm)(e),t,!0);return n.length>=2&&!function(e){if(e.length>=2){var t,n=he(e[0].groupIds);try{var r=function(){var n=t.value;if(e.reduce((function(e,t){return e&&(0,a.Nd)(t,n)}),!0))return{v:!0}};for(n.s();!(t=n.n()).done;){var o=r();if("object"===(0,ue.Z)(o))return o.v}}catch(e){n.e(e)}finally{n.f()}}return!1}(n)},ve=(0,w.z)({name:"group",trackEvent:{category:"element"},perform:function(e,t){var n=(0,l.eD)((0,T.Lm)(e),t,!0);if(n.length<2)return{appState:t,elements:e,commitToHistory:!1};var r=(0,a.iJ)(t);if(1===r.length){var c=r[0],u=new Set((0,a.Fb)(e,c).map((function(e){return e.id}))),d=new Set(n.map((function(e){return e.id})));if(new Set([].concat((0,o.Z)(Array.from(u)),(0,o.Z)(Array.from(d)))).size===u.size)return{appState:t,elements:e,commitToHistory:!1}}var f=(0,de.kb)(),p=(0,s.xn)(n),h=e.map((function(e){return p.get(e.id)?(0,i.BE)(e,{groupIds:(0,a.S_)(e.groupIds,f,t.editingGroupId)}):e})),m=(0,a.Fb)(h,f),g=m[m.length-1],v=h.lastIndexOf(g),b=h.slice(v+1),y=h.slice(0,v).filter((function(e){return!(0,a.Nd)(e,f)})),x=[].concat((0,o.Z)(y),(0,o.Z)(m),(0,o.Z)(b));return{appState:(0,a.F$)(f,pe(pe({},t),{},{selectedGroupIds:{}}),(0,T.Lm)(x)),elements:x,commitToHistory:!0}},contextItemLabel:"labels.group",predicate:function(e,t){return ge(e,t)},keyTest:function(e){return!e.shiftKey&&e[y.tW.CTRL_OR_CMD]&&e.key===y.tW.G},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!ge(t,n),type:"button",icon:(0,j.jsx)(k.BF,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.group")," — ").concat((0,s.uY)("CtrlOrCmd+G")),"aria-label":(0,x.t)("labels.group"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),be=(0,w.z)({name:"ungroup",trackEvent:{category:"element"},perform:function(e,t){if(0===(0,a.iJ)(t).length)return{appState:t,elements:e,commitToHistory:!1};var n=[],r=e.map((function(e){(0,I.Xh)(e)&&n.push(e.id);var r=(0,a.h6)(e.groupIds,t.selectedGroupIds);return r.length===e.groupIds.length?e:(0,i.BE)(e,{groupIds:r})})),o=(0,a.bO)(pe(pe({},t),{},{selectedGroupIds:{}}),(0,T.Lm)(r));return n.forEach((function(e){return o.selectedElementIds[e]=!1})),{appState:o,elements:r,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&e[y.tW.CTRL_OR_CMD]&&e.key===y.tW.G.toUpperCase()},contextItemLabel:"labels.ungroup",predicate:function(e,t){return(0,a.iJ)(t).length>0},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{type:"button",hidden:0===(0,a.iJ)(n).length,icon:(0,j.jsx)(k.RJ,{theme:n.theme}),onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.ungroup")," — ").concat((0,s.uY)("CtrlOrCmd+Shift+G")),"aria-label":(0,x.t)("labels.ungroup"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),ye=n(8982),xe=n(487),we=n.n(xe),ke=n(631),Ee=n.n(ke),je=n(2052),Se=n.n(je),Oe=n(4010),_e=n.n(Oe),Ce=n(1469),Pe=n.n(Ce),Te=n(9329),Ie=n.n(Te),Me=n(3729),De={};De.styleTagTransform=Ie(),De.setAttributes=_e(),De.insert=Se().bind(null,"head"),De.domAPI=Ee(),De.insertStyleElement=Pe();we()(Me.Z,De),Me.Z&&Me.Z.locals&&Me.Z.locals;var Ae=n(9787),Le=function(e){var t=e.color,n=e.onClick,r=e.name,o=e.src,i=(0,ye.l)(r),a=(0,Ae.useState)(!1),l=(0,q.Z)(a,2),c=l[0],s=l[1],u=!c&&o,d=u?void 0:{background:t};return(0,j.jsx)("div",{className:"Avatar",style:d,onClick:n,children:u?(0,j.jsx)("img",{className:"Avatar-img",src:o,alt:i,referrerPolicy:"no-referrer",onError:function(){return s(!0)}}):i})},Ze=n(2264);function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,w.z)({name:"goToCollaborator",viewMode:!0,trackEvent:{category:"collab"},perform:function(e,t,n){var r=n;return r?{appState:ze(ze(ze({},t),(0,Ze.s)({scenePoint:r,viewportDimensions:{width:t.width,height:t.height},zoom:t.zoom})),{},{openMenu:"canvas"===t.openMenu?null:t.openMenu}),commitToHistory:!1}:{appState:t,commitToHistory:!1}},PanelComponent:function(e){var t=e.appState,n=e.updateData,r=e.data,o=(0,q.Z)(r,2),i=o[0],a=o[1],l=(0,ye.X)(i,t),c=l.background,s=l.stroke;return(0,j.jsx)(Le,{color:c,border:s,onClick:function(){return n(a.pointer)},name:a.username||"",src:a.avatarUrl})}});var Ne=n(2791);function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var We=(0,w.z)({name:"addToLibrary",trackEvent:{category:"element"},perform:function(e,t,n,r){var i=(0,l.eD)((0,T.Lm)(e),t,!0);return i.some((function(e){return"image"===e.type}))?{commitToHistory:!1,appState:He(He({},t),{},{errorMessage:"Support for adding images to the library coming soon!"})}:r.library.getLatestLibrary().then((function(e){return r.library.setLibrary([{id:(0,de.kb)(),status:"unpublished",elements:i.map(Ne.OL),created:Date.now()}].concat((0,o.Z)(e)))})).then((function(){return{commitToHistory:!1,appState:He(He({},t),{},{toast:{message:(0,x.t)("toast.addedToLibrary")}})}})).catch((function(e){return{commitToHistory:!1,appState:He(He({},t),{},{errorMessage:e.message})}}))},contextItemLabel:"labels.addToLibrary"}),Fe=n(8925);function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ye=function(e,t,n){var r=n.axis,o=n.position,i=(0,Fe.v2)(e),a="x"===r?["minX","maxX"]:["minY","maxY"],l=(0,q.Z)(a,2),c=l[0],s=l[1],u={x:0,y:0};return Ke(Ke({},u),{},"start"===o?(0,P.Z)({},r,t[c]-i[c]):"end"===o?(0,P.Z)({},r,t[s]-i[s]):(0,P.Z)({},r,(t[c]+t[s])/2-(i[c]+i[s])/2))},Ve=function(e,t){return(0,l.eD)((0,T.Lm)(e),t).length>1},Ge=function(e,t,n){var r=function(e,t){var n=(0,a.AI)(e),r=(0,Fe.v2)(e);return n.flatMap((function(e){var n=Ye(e,r,t);return e.map((function(e){return(0,i.BE)(e,{x:e.x+n.x,y:e.y+n.y})}))}))}((0,l.eD)((0,T.Lm)(e),t),n),o=(0,s.xn)(r);return e.map((function(e){return o.get(e.id)||e}))};(0,w.z)({name:"alignTop",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"start",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===y.tW.ARROW_UP},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.Ct,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.alignTop")," — ").concat((0,s.uY)("CtrlOrCmd+Shift+Up")),"aria-label":(0,x.t)("labels.alignTop"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"alignBottom",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"end",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===y.tW.ARROW_DOWN},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.HL,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.alignBottom")," — ").concat((0,s.uY)("CtrlOrCmd+Shift+Down")),"aria-label":(0,x.t)("labels.alignBottom"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"alignLeft",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"start",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===y.tW.ARROW_LEFT},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.xs,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.alignLeft")," — ").concat((0,s.uY)("CtrlOrCmd+Shift+Left")),"aria-label":(0,x.t)("labels.alignLeft"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"alignRight",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"end",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key===y.tW.ARROW_RIGHT},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.mh,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.alignRight")," — ").concat((0,s.uY)("CtrlOrCmd+Shift+Right")),"aria-label":(0,x.t)("labels.alignRight"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"alignVerticallyCentered",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"center",axis:"y"}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.ST,onClick:function(){return r(null)},title:(0,x.t)("labels.centerVertically"),"aria-label":(0,x.t)("labels.centerVertically"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"alignHorizontallyCentered",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Ge(e,t,{position:"center",axis:"x"}),commitToHistory:!0}},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!Ve(t,n),type:"button",icon:k.gK,onClick:function(){return r(null)},title:(0,x.t)("labels.centerHorizontally"),"aria-label":(0,x.t)("labels.centerHorizontally"),visible:(0,l.N)((0,T.Lm)(t),n)})}});function Xe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $e=function(e,t){return(0,l.eD)((0,T.Lm)(e),t).length>1},Je=function(e,t,n){var r=function(e,t){var n,r="x"===t.axis?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],o=(0,q.Z)(r,4),l=o[0],c=o[1],s=o[2],u=o[3],d=(0,Fe.v2)(e),f=(0,a.AI)(e).map((function(e){return[e,(0,Fe.v2)(e)]})).sort((function(e,t){return e[1][c]-t[1][c]})),p=0,h=Xe(f);try{for(h.s();!(n=h.n()).done;)p+=n.value[1][u]}catch(e){h.e(e)}finally{h.f()}var m=(d[u]-p)/(f.length-1);if(m<0){var g=f.findIndex((function(e){return e[1][l]===d[l]})),v=f.findIndex((function(e){return e[1][s]===d[s]})),b=(f[v][1][c]-f[g][1][c])/(f.length-1),y=f[g][1][c];return f.flatMap((function(e,n){var r=(0,q.Z)(e,2),o=r[0],a=r[1],l={x:0,y:0};return n!==g&&n!==v&&(y+=b,l[t.axis]=y-a[c]),o.map((function(e){return(0,i.BE)(e,{x:e.x+l.x,y:e.y+l.y})}))}))}var x=d[l];return f.flatMap((function(e){var n=(0,q.Z)(e,2),r=n[0],o=n[1],a={x:0,y:0};return a[t.axis]=x-o[l],x+=m,x+=o[u],r.map((function(e){return(0,i.BE)(e,{x:e.x+a.x,y:e.y+a.y})}))}))}((0,l.eD)((0,T.Lm)(e),t),n),o=(0,s.xn)(r);return e.map((function(e){return o.get(e.id)||e}))},Qe=((0,w.z)({name:"distributeHorizontally",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Je(e,t,{space:"between",axis:"x"}),commitToHistory:!0}},keyTest:function(e){return!e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.H},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!$e(t,n),type:"button",icon:k.uD,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.distributeHorizontally")," — ").concat((0,s.uY)("Alt+H")),"aria-label":(0,x.t)("labels.distributeHorizontally"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),(0,w.z)({name:"distributeVertically",trackEvent:{category:"element"},perform:function(e,t){return{appState:t,elements:Je(e,t,{space:"between",axis:"y"}),commitToHistory:!0}},keyTest:function(e){return!e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.V},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData;return(0,j.jsx)(Z.V,{hidden:!$e(t,n),type:"button",icon:k.W5,onClick:function(){return r(null)},title:"".concat((0,x.t)("labels.distributeVertically")," — ").concat((0,s.uY)("Alt+V")),"aria-label":(0,x.t)("labels.distributeVertically"),visible:(0,l.N)((0,T.Lm)(t),n)})}}),n(8634)),et=n(267),tt=(0,w.z)({name:"flipHorizontal",trackEvent:{category:"element"},perform:function(e,t){return{elements:rt(e,t,"horizontal"),appState:t,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&e.code===y.aU.H},contextItemLabel:"labels.flipHorizontal",predicate:function(e,t){return function(e,t){var n=(0,l.eD)((0,T.Lm)(e),t);return 1===n.length&&"text"!==n[0].type}(e,t)}}),nt=(0,w.z)({name:"flipVertical",trackEvent:{category:"element"},perform:function(e,t){return{elements:rt(e,t,"vertical"),appState:t,commitToHistory:!0}},keyTest:function(e){return e.shiftKey&&e.code===y.aU.V&&!e[y.tW.CTRL_OR_CMD]},contextItemLabel:"labels.flipVertical",predicate:function(e,t){return function(e,t){return 1===(0,l.eD)((0,T.Lm)(e),t).length}(e,t)}}),rt=function(e,t,n){var r=(0,l.eD)((0,T.Lm)(e),t);if(r.length>1)return e;var o=ot(r,t,n),i=(0,s.xn)(o);return e.map((function(e){return i.get(e.id)||e}))},ot=function(e,t,n){return e.forEach((function(e){it(e,t),"vertical"===n&&at(e,Math.PI)})),e},it=function(e,t){var n=e.x,r=e.y,o=e.width,a=e.height,l=(0,Qe.LW)(e.angle);(0,i.DR)(e,{angle:(0,Qe.LW)(0)});var c=(0,et.PC)(e,t.zoom),s=!0,u=c.nw;if(u||(s=!1,u=c.ne)){var d,f=0;(0,I.bt)(e)&&e.points.length<3&&(f=2*e.points.reduce((function(e,t){return Math.max(e,t[0])}),0)-e.width),(0,I.bt)(e)&&(d=(0,Fe.Ut)(e,e.points));var p=(0,Fe.qf)(e);if((0,I.bt)(e)&&e.points.length<3){for(var h=1;h<e.points.length;h++)M._.movePoints(e,[{index:h,point:[-e.points[h][0],e.points[h][1]]}]);M._.normalizePoints(e)}else{var m=d?d[2]-d[0]:p[2]-p[0],g=d?[d[0],d[1]]:[p[0],p[1]];(0,Qe.l2)((new Map).set(e.id,e),!1,e,s?"nw":"ne",!0,s?g[0]+m:g[0]-m,g[1])}var v=(0,Qe.LW)(2*Math.PI-l);if(v<0&&(v=(0,Qe.LW)(v+2*Math.PI)),(0,i.DR)(e,{angle:v}),(0,i.DR)(e,{x:n+f,y:r,width:o,height:a}),(0,R.Ww)(e),d&&(0,I.bt)(e)){var b=(0,Fe.Ut)(e,e.points),y=d[0]-b[0]+(d[2]-b[2]);(0,i.DR)(e,{x:e.x+.5*y,y:e.y,width:o,height:a})}}else(0,i.DR)(e,{angle:l})},at=function(e,t){var n=e.x,r=e.y,o=(0,Qe.LW)(e.angle+t);o<0&&(o=(0,Qe.LW)(2*Math.PI+o)),(0,i.DR)(e,{angle:o}),(0,i.DR)(e,{x:n,y:r})},lt=n(4688);function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function st(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ut=(0,w.z)({name:"gridMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!e.gridSize}},perform:function(e,t){return{appState:st(st({},t),{},{gridSize:this.checked(t)?null:E.k}),commitToHistory:!1}},checked:function(e){return null!==e.gridSize},predicate:function(e,t,n){return void 0===n.gridModeEnabled},contextItemLabel:"labels.showGrid",keyTest:function(e){return e[y.tW.CTRL_OR_CMD]&&e.code===y.aU.QUOTE}});function dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pt=(0,w.z)({name:"zenMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!e.zenModeEnabled}},perform:function(e,t){return{appState:ft(ft({},t),{},{zenModeEnabled:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.zenModeEnabled},predicate:function(e,t,n){return void 0===n.zenModeEnabled},contextItemLabel:"buttons.zenMode",keyTest:function(e){return!e[y.tW.CTRL_OR_CMD]&&e.altKey&&e.code===y.aU.Z}}),ht=n(4958),mt=n(202),gt=n(4929),vt=n(3248);function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){(0,P.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xt=(0,w.z)({name:"toggleLinearEditor",trackEvent:{category:"element"},predicate:function(e,t){var n=(0,l.eD)(e,t);return!(1!==n.length||!(0,I.bt)(n[0]))},perform:function(e,t,n,r){var o,i=(0,l.eD)((0,T.Lm)(e),t,!0)[0],a=(null===(o=t.editingLinearElement)||void 0===o?void 0:o.elementId)===i.id?null:new M._(i,r.scene);return{appState:yt(yt({},t),{},{editingLinearElement:a}),commitToHistory:!1}},contextItemLabel:function(e,t){var n,r=(0,l.eD)((0,T.Lm)(e),t,!0)[0];return(null===(n=t.editingLinearElement)||void 0===n?void 0:n.elementId)===r.id?"labels.lineEditor.exit":"labels.lineEditor.edit"}})},7901:function(e,t,n){"use strict";n.d(t,{N:function(){return r},z:function(){return o}});var r=[],o=function(e){return r=r.concat(e),e}},785:function(e,t,n){"use strict";n.d(t,{C:function(){return l}});var r=n(2335),o=n(8211),i=n(6340),a={toggleTheme:[(0,i.uY)("Shift+Alt+D")],saveScene:[(0,i.uY)("CtrlOrCmd+S")],loadScene:[(0,i.uY)("CtrlOrCmd+O")],clearCanvas:[(0,i.uY)("CtrlOrCmd+Delete")],imageExport:[(0,i.uY)("CtrlOrCmd+Shift+E")],cut:[(0,i.uY)("CtrlOrCmd+X")],copy:[(0,i.uY)("CtrlOrCmd+C")],paste:[(0,i.uY)("CtrlOrCmd+V")],copyStyles:[(0,i.uY)("CtrlOrCmd+Alt+C")],pasteStyles:[(0,i.uY)("CtrlOrCmd+Alt+V")],selectAll:[(0,i.uY)("CtrlOrCmd+A")],deleteSelectedElements:[(0,i.uY)("Delete")],duplicateSelection:[(0,i.uY)("CtrlOrCmd+D"),(0,i.uY)("Alt+".concat((0,o.t)("helpDialog.drag")))],sendBackward:[(0,i.uY)("CtrlOrCmd+[")],bringForward:[(0,i.uY)("CtrlOrCmd+]")],sendToBack:[r.Um?(0,i.uY)("CtrlOrCmd+Alt+["):(0,i.uY)("CtrlOrCmd+Shift+[")],bringToFront:[r.Um?(0,i.uY)("CtrlOrCmd+Alt+]"):(0,i.uY)("CtrlOrCmd+Shift+]")],copyAsPng:[(0,i.uY)("Shift+Alt+C")],copyAsSvg:[],group:[(0,i.uY)("CtrlOrCmd+G")],ungroup:[(0,i.uY)("CtrlOrCmd+Shift+G")],gridMode:[(0,i.uY)("CtrlOrCmd+'")],zenMode:[(0,i.uY)("Alt+Z")],stats:[(0,i.uY)("Alt+/")],addToLibrary:[],flipHorizontal:[(0,i.uY)("Shift+H")],flipVertical:[(0,i.uY)("Shift+V")],viewMode:[(0,i.uY)("Alt+R")],hyperlink:[(0,i.uY)("CtrlOrCmd+K")],toggleElementLock:[(0,i.uY)("CtrlOrCmd+Shift+L")]},l=function(e){var t=a[e];return t&&t.length>0?t[0]:""}},7047:function(e,t,n){"use strict";n.d(t,{L:function(){return r}});var r=function(e,t,n,r){try{if("undefined"==typeof window||{REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_MATOMO_URL:"https://excalidraw.matomo.cloud/",REACT_APP_CDN_MATOMO_TRACKER_URL:"//cdn.matomo.cloud/excalidraw.matomo.cloud/matomo.js",REACT_APP_MATOMO_SITE_ID:"1",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",PKG_VERSION:"0.15.2-a89952e",IS_EXCALIDRAW_NPM_PACKAGE:!0}.JEST_WORKER_ID)return;window.gtag&&window.gtag("event",t,{event_category:e,event_label:n,value:r}),window.sa_event&&window.sa_event(t,{category:e,label:n,value:r}),window.fathom&&window.fathom.trackEvent(t,{category:e,label:n,value:r})}catch(e){console.error("error during analytics",e)}}},8897:function(e,t,n){"use strict";n.d(t,{EN:function(){return p},eS:function(){return f},im:function(){return c},l$:function(){return h},s:function(){return d}});var r=n(56),o=n(2335),i=n(8211),a=n(6340),l=o.ZB.includes(devicePixelRatio)?devicePixelRatio:1,c=function(){return{showWelcomeScreen:!1,theme:o.C6.LIGHT,collaborators:new Map,currentChartType:"bar",currentItemBackgroundColor:o.HN.backgroundColor,currentItemEndArrowhead:"arrow",currentItemFillStyle:o.HN.fillStyle,currentItemFontFamily:o.rk,currentItemFontSize:o.n5,currentItemOpacity:o.HN.opacity,currentItemRoughness:o.HN.roughness,currentItemStartArrowhead:null,currentItemStrokeColor:o.HN.strokeColor,currentItemRoundness:"round",currentItemStrokeStyle:o.HN.strokeStyle,currentItemStrokeWidth:o.HN.strokeWidth,currentItemTextAlign:o.Hg,cursorButton:"up",draggingElement:null,editingElement:null,editingGroupId:null,editingLinearElement:null,activeTool:{type:"selection",customType:null,locked:o.HN.locked,lastActiveTool:null},penMode:!1,penDetected:!1,errorMessage:null,exportBackground:!0,exportScale:l,exportEmbedScene:!1,exportWithDarkMode:!1,fileHandle:null,gridSize:null,isBindingEnabled:!0,defaultSidebarDockedPreference:!1,isLoading:!1,isResizing:!1,isRotating:!1,lastPointerDownWith:"mouse",multiElement:null,name:"".concat((0,i.t)("labels.untitled"),"-").concat((0,a.Fc)()),contextMenu:null,openMenu:null,openPopup:null,openSidebar:null,openDialog:null,pasteDialog:{shown:!1,data:null},previousSelectedElementIds:{},resizingElement:null,scrolledOutside:!1,scrollX:0,scrollY:0,selectedElementIds:{},selectedGroupIds:{},selectionElement:null,shouldCacheIgnoreZoom:!1,showStats:!1,startBoundElement:null,suggestedBindings:[],toast:null,viewBackgroundColor:r.HO.white,zenModeEnabled:!1,zoom:{value:1},viewModeEnabled:!1,pendingImageElementId:null,showHyperlinkPopup:!1,selectedLinearElement:null}},s={showWelcomeScreen:{browser:!0,export:!1,server:!1},theme:{browser:!0,export:!1,server:!1},collaborators:{browser:!1,export:!1,server:!1},currentChartType:{browser:!0,export:!1,server:!1},currentItemBackgroundColor:{browser:!0,export:!1,server:!1},currentItemEndArrowhead:{browser:!0,export:!1,server:!1},currentItemFillStyle:{browser:!0,export:!1,server:!1},currentItemFontFamily:{browser:!0,export:!1,server:!1},currentItemFontSize:{browser:!0,export:!1,server:!1},currentItemRoundness:{browser:!0,export:!1,server:!1},currentItemOpacity:{browser:!0,export:!1,server:!1},currentItemRoughness:{browser:!0,export:!1,server:!1},currentItemStartArrowhead:{browser:!0,export:!1,server:!1},currentItemStrokeColor:{browser:!0,export:!1,server:!1},currentItemStrokeStyle:{browser:!0,export:!1,server:!1},currentItemStrokeWidth:{browser:!0,export:!1,server:!1},currentItemTextAlign:{browser:!0,export:!1,server:!1},cursorButton:{browser:!0,export:!1,server:!1},draggingElement:{browser:!1,export:!1,server:!1},editingElement:{browser:!1,export:!1,server:!1},editingGroupId:{browser:!0,export:!1,server:!1},editingLinearElement:{browser:!1,export:!1,server:!1},activeTool:{browser:!0,export:!1,server:!1},penMode:{browser:!0,export:!1,server:!1},penDetected:{browser:!0,export:!1,server:!1},errorMessage:{browser:!1,export:!1,server:!1},exportBackground:{browser:!0,export:!1,server:!1},exportEmbedScene:{browser:!0,export:!1,server:!1},exportScale:{browser:!0,export:!1,server:!1},exportWithDarkMode:{browser:!0,export:!1,server:!1},fileHandle:{browser:!1,export:!1,server:!1},gridSize:{browser:!0,export:!0,server:!0},height:{browser:!1,export:!1,server:!1},isBindingEnabled:{browser:!1,export:!1,server:!1},defaultSidebarDockedPreference:{browser:!0,export:!1,server:!1},isLoading:{browser:!1,export:!1,server:!1},isResizing:{browser:!1,export:!1,server:!1},isRotating:{browser:!1,export:!1,server:!1},lastPointerDownWith:{browser:!0,export:!1,server:!1},multiElement:{browser:!1,export:!1,server:!1},name:{browser:!0,export:!1,server:!1},offsetLeft:{browser:!1,export:!1,server:!1},offsetTop:{browser:!1,export:!1,server:!1},contextMenu:{browser:!1,export:!1,server:!1},openMenu:{browser:!0,export:!1,server:!1},openPopup:{browser:!1,export:!1,server:!1},openSidebar:{browser:!0,export:!1,server:!1},openDialog:{browser:!1,export:!1,server:!1},pasteDialog:{browser:!1,export:!1,server:!1},previousSelectedElementIds:{browser:!0,export:!1,server:!1},resizingElement:{browser:!1,export:!1,server:!1},scrolledOutside:{browser:!0,export:!1,server:!1},scrollX:{browser:!0,export:!1,server:!1},scrollY:{browser:!0,export:!1,server:!1},selectedElementIds:{browser:!0,export:!1,server:!1},selectedGroupIds:{browser:!0,export:!1,server:!1},selectionElement:{browser:!1,export:!1,server:!1},shouldCacheIgnoreZoom:{browser:!0,export:!1,server:!1},showStats:{browser:!0,export:!1,server:!1},startBoundElement:{browser:!1,export:!1,server:!1},suggestedBindings:{browser:!1,export:!1,server:!1},toast:{browser:!1,export:!1,server:!1},viewBackgroundColor:{browser:!0,export:!0,server:!0},width:{browser:!1,export:!1,server:!1},zenModeEnabled:{browser:!0,export:!1,server:!1},zoom:{browser:!0,export:!1,server:!1},viewModeEnabled:{browser:!1,export:!1,server:!1},pendingImageElementId:{browser:!1,export:!1,server:!1},showHyperlinkPopup:{browser:!1,export:!1,server:!1},selectedLinearElement:{browser:!0,export:!1,server:!1}},u=function(e,t){for(var n={},r=0,o=Object.keys(e);r<o.length;r++){var i=o[r],a=s[i];if(null!=a&&a[t]){var l=e[i];n[i]=l}}return n},d=function(e){return u(e,"export")},f=function(e){return u(e,"server")},p=function(e){return"eraser"===e.activeTool.type},h=function(e){return"hand"===e.activeTool.type}},5674:function(e,t,n){"use strict";n.d(t,{dz:function(){return k},i$:function(){return b},ps:function(){return _}});var r=n(1930),o=n(7169),i=n(2577),a=n(56),l=n(2335),c=n(1047),s=n(6954);function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=32,m=12,g=256,v="NOT_SPREADSHEET",b="VALID_SPREADSHEET",y=function(e){var t=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return t?parseFloat("".concat((t[1]||t[2])+t[3]).replace(/,/g,"")):null},x=function(e,t){return e.slice(1).every((function(e){return null!==y(e[t])}))},w=function(e){var t=e[0].length;if(t>2)return{type:v,reason:"More than 2 columns"};if(1===t){if(!x(e,0))return{type:v,reason:"Value is not numeric"};var n=null===y(e[0][0]),r=(n?e.slice(1):e).map((function(e){return y(e[0])}));return r.length<2?{type:v,reason:"Less than two rows"}:{type:b,spreadsheet:{title:n?e[0][0]:null,labels:null,values:r}}}var o=x(e,0),a=x(e,1);if(!o&&!a)return{type:v,reason:"Value is not numeric"};var l=a?[0,1]:[1,0],c=(0,i.Z)(l,2),s=c[0],u=c[1],d=null===y(e[0][u]),f=d?e.slice(1):e;return f.length<2?{type:v,reason:"Less than 2 rows"}:{type:b,spreadsheet:{title:d?e[0][u]:null,labels:f.map((function(e){return e[s]})),values:f.map((function(e){return y(e[u])}))}}},k=function(e){var t=e.trim().split("\n").map((function(e){return e.trim().split("\t")}));if(t.length&&2!==t[0].length&&(t=e.trim().split("\n").map((function(e){return e.trim().split(",")}))),0===t.length)return{type:v,reason:"No values"};var n=t[0].length;if(!t.every((function(e){return e.length===n})))return{type:v,reason:"All rows don't have same number of columns"};var r=w(t);if(r.type!==b){var o=w(function(e){for(var t=[],n=0;n<e[0].length;n++){for(var r=[],o=0;o<e.length;o++)r.push(e[o][n]);t.push(r)}return t}(t));if(o.type===b)return o}return r},E=(0,a.sF)(a.C2),j={fillStyle:"hachure",fontFamily:l.rk,fontSize:l.n5,opacity:100,roughness:1,strokeColor:a.HO.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:l.oX.MIDDLE,locked:!1},S=function(e){return{chartWidth:44*e.values.length+m,chartHeight:280}},O=function(e,t,n,o,i,s){var u=S(e),d=u.chartWidth,f=u.chartHeight,v=e.title?(0,c.VL)(p(p({backgroundColor:i,groupIds:[o]},j),{},{text:e.title,x:t+d/2,y:n-g-24-l.n5,roundness:null,textAlign:"center"})):null,b=s?(0,c.Up)(p(p({backgroundColor:i,groupIds:[o]},j),{},{type:"rectangle",x:t,y:n-f,width:d,height:f,strokeColor:a.HO.black,fillStyle:"solid",opacity:6})):null;return[].concat((0,r.Z)(b?[b]:[]),(0,r.Z)(v?[v]:[]),(0,r.Z)(function(e,t,n,r,o){var i;return(null===(i=e.labels)||void 0===i?void 0:i.map((function(e,i){return(0,c.VL)(p(p({groupIds:[r],backgroundColor:o},j),{},{text:e.length>8?"".concat(e.slice(0,5),"..."):e,x:t+44*i+24,y:n+6,width:h,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))})))||[]}(e,t,n,o,i)),(0,r.Z)(function(e,t,n,o,i){var a=(0,c.VL)(p(p({groupIds:[o],backgroundColor:i},j),{},{x:t-m,y:n-m,text:"0",textAlign:"right"}));return[a,(0,c.VL)(p(p({groupIds:[o],backgroundColor:i},j),{},{x:t-m,y:n-g-a.height/2,text:Math.max.apply(Math,(0,r.Z)(e.values)).toLocaleString(),textAlign:"right"}))]}(e,t,n,o,i)),(0,r.Z)(function(e,t,n,r,o){var i=S(e),a=i.chartWidth,l=i.chartHeight;return[(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},j),{},{type:"line",x:t,y:n,startArrowhead:null,endArrowhead:null,width:a,points:[[0,0],[a,0]]})),(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},j),{},{type:"line",x:t,y:n,startArrowhead:null,endArrowhead:null,height:l,points:[[0,0],[0,-l]]})),(0,c.y8)(p(p({backgroundColor:o,groupIds:[r]},j),{},{type:"line",x:t,y:n-g-m,startArrowhead:null,endArrowhead:null,strokeStyle:"dotted",width:a,opacity:50,points:[[0,0],[a,0]]}))]}(e,t,n,o,i)))},_=function(e,t,n,o){return"line"===e?function(e,t,n){var o,i=Math.max.apply(Math,(0,r.Z)(e.values)),a=(0,s.kb)(),d=E[Math.floor(Math.random()*E.length)],f=0,h=[],v=u(e.values);try{for(v.s();!(o=v.n()).done;){var b=o.value,y=44*f,x=-b/i*g;h.push([y,x]),f++}}catch(e){v.e(e)}finally{v.f()}var w=Math.max.apply(Math,(0,r.Z)(h.map((function(e){return e[0]})))),k=Math.max.apply(Math,(0,r.Z)(h.map((function(e){return e[1]})))),S=Math.min.apply(Math,(0,r.Z)(h.map((function(e){return e[0]})))),_=Math.min.apply(Math,(0,r.Z)(h.map((function(e){return e[1]})))),C=(0,c.y8)(p(p({backgroundColor:d,groupIds:[a]},j),{},{type:"line",x:t+m+16,y:n-m,startArrowhead:null,endArrowhead:null,height:k-_,width:w-S,strokeWidth:2,points:h})),P=e.values.map((function(e,r){var o=44*r+6,l=-e/i*g+6;return(0,c.Up)(p(p({backgroundColor:d,groupIds:[a]},j),{},{fillStyle:"solid",strokeWidth:2,type:"ellipse",x:t+o+16,y:n+l-24,width:m,height:m}))})),T=e.values.map((function(e,r){var o=44*r+6,l=e/i*g+6+m;return(0,c.y8)(p(p({backgroundColor:d,groupIds:[a]},j),{},{type:"line",x:t+o+16+6,y:n-l,startArrowhead:null,endArrowhead:null,height:l,strokeStyle:"dotted",opacity:50,points:[[0,0],[0,l]]}))}));return[].concat((0,r.Z)(O(e,t,n,a,d,"production"===l.Vi.DEVELOPMENT)),[C],(0,r.Z)(T),(0,r.Z)(P))}(t,n,o):function(e,t,n){var o=Math.max.apply(Math,(0,r.Z)(e.values)),i=(0,s.kb)(),a=E[Math.floor(Math.random()*E.length)],u=e.values.map((function(e,r){var l=e/o*g;return(0,c.Up)(p(p({backgroundColor:a,groupIds:[i]},j),{},{type:"rectangle",x:t+44*r+m,y:n-l-m,width:h,height:l}))}));return[].concat((0,r.Z)(u),(0,r.Z)(O(e,t,n,i,a,"production"===l.Vi.DEVELOPMENT)))}(t,n,o)}},8982:function(e,t,n){"use strict";n.d(t,{X:function(){return a},l:function(){return l}});var r=n(56),o=(0,r.sF)(r._T),i=(0,r.sF)(r.z8),a=function(e,t){if(null!=t&&t.collaborators){var n=t.collaborators.get(e);if(null!=n&&n.color)return n.color}var r=e.split("").reduce((function(e,t){return e+t.charCodeAt(0)}),0);return{background:o[r%o.length],stroke:i[r%i.length]}},l=function(e){var t,n=null==e||null===(t=e.trim())||void 0===t?void 0:t.codePointAt(0);return(n?String.fromCodePoint(n):"?").toUpperCase()}},6665:function(e,t,n){"use strict";n.d(t,{dd:function(){return O},mQ:function(){return j},uR:function(){return S},vQ:function(){return x},vt:function(){return b},wx:function(){return v}});var r=n(7169),o=n(8950),i=n(2975),a=n.n(i),l=n(4162),c=n(5674),s=n(2335),u=n(1974),d=n(6340);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h="",m=!1,g="clipboard"in navigator&&"readText"in navigator.clipboard,v="clipboard"in navigator&&"writeText"in navigator.clipboard,b="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,y=function(e){return!(![s.r8.excalidraw,s.r8.excalidrawClipboard].includes(null==e?void 0:e.type)||!Array.isArray(e.elements))},x=function(){var e=(0,o.Z)(a().mark((function e(t,n){var r,o,i,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!1,o=t.reduce((function(e,t){return(0,u.wi)(t)&&(r=!0,n&&n[t.fileId]&&(e[t.fileId]=n[t.fileId])),e}),{}),r&&!n&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object."),i={type:s.r8.excalidrawClipboard,elements:t,files:n?o:void 0},l=JSON.stringify(i),!(0,d.h2)()){e.next=7;break}return e.abrupt("return",l);case 7:return h=l,e.prev=8,m=!1,e.next=12,O(l);case 12:e.next=18;break;case 14:e.prev=14,e.t0=e.catch(8),m=!0,console.error(e.t0);case 18:case"end":return e.stop()}}),e,null,[[8,14]])})));return function(t,n){return e.apply(this,arguments)}}(),w=function(){if(!h)return{};try{return JSON.parse(h)}catch(e){return console.error(e),{}}},k=function(e){var t=(0,c.dz)(e);return t.type===c.i$?{spreadsheet:t.spreadsheet}:null},E=function(){var e=(0,o.Z)(a().mark((function e(t){var n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t){e.next=5;break}e.t0=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/plain"),e.next=11;break;case 5:if(e.t1=g,!e.t1){e.next=10;break}return e.next=9,navigator.clipboard.readText();case 9:e.t1=e.sent;case 10:e.t0=e.t1;case 11:return r=e.t0,e.abrupt("return",(r||"").trim());case 15:return e.prev=15,e.t2=e.catch(0),e.abrupt("return","");case 18:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=(0,o.Z)(a().mark((function e(t){var n,r,o,i,c,s=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]&&s[1],e.next=3,E(t);case 3:if((r=e.sent)&&(n||!r.includes(l.oj))){e.next=6;break}return e.abrupt("return",w());case 6:if(!(o=!n&&k(r))){e.next=9;break}return e.abrupt("return",o);case 9:if(i=w(),e.prev=10,c=JSON.parse(r),!y(c)){e.next=14;break}return e.abrupt("return",{elements:c.elements,files:c.files,text:n?JSON.stringify(c.elements,null,2):void 0});case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(10);case 18:return e.abrupt("return",m&&i.elements?p(p({},i),{},{text:n?JSON.stringify(i.elements,null,2):void 0}):{text:r});case 19:case"end":return e.stop()}}),e,null,[[10,16]])})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=(0,o.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.clipboard.write([new window.ClipboardItem((0,r.Z)({},s.LO.png,t))]);case 3:case 21:e.next=24;break;case 5:if(e.prev=5,e.t0=e.catch(0),!(0,d.y8)(t)){e.next=23;break}return e.t1=navigator.clipboard,e.t2=window.ClipboardItem,e.t3=r.Z,e.t4={},e.t5=s.LO.png,e.next=15,t;case 15:return e.t6=e.sent,e.t7=(0,e.t3)(e.t4,e.t5,e.t6),e.t8=new e.t2(e.t7),e.t9=[e.t8],e.next=21,e.t1.write.call(e.t1,e.t9);case 23:throw e.t0;case 24:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=(0,o.Z)(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!1,!v){e.next=11;break}return e.prev=2,e.next=5,navigator.clipboard.writeText(t||"");case 5:n=!0,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0);case 11:if(n||_(t||" ")){e.next=13;break}throw new Error("couldn't copy");case 13:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}(),_=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;n.style.top="".concat(r,"px"),n.style.fontSize="12pt",n.setAttribute("readonly",""),n.value=e,document.body.appendChild(n);var o=!1;try{n.select(),n.setSelectionRange(0,n.value.length),o=document.execCommand("copy")}catch(e){console.error(e)}return n.remove(),o}},56:function(e,t,n){"use strict";n.d(t,{C2:function(){return u},HO:function(){return m},Lx:function(){return c},SF:function(){return w},Wk:function(){return x},_T:function(){return f},ay:function(){return y},dC:function(){return s},eq:function(){return b},fY:function(){return v},sF:function(){return k},z8:function(){return d}});var r=n(7169),o=n(5284);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l,c=5,s=5,u=4,d=4,f=1,p=[0,2,4,6,8],h=function(e,t){return t.map((function(t){return o[e][t]}))},m={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:h("gray",p),red:h("red",p),pink:h("pink",p),grape:h("grape",p),violet:h("violet",p),blue:h("blue",p),cyan:h("cyan",p),teal:h("teal",p),green:h("green",p),yellow:h("yellow",p),orange:h("orange",p),bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},g=(l=m,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"].reduce((function(e,t){return t in l&&(e[t]=l[t]),e}),{})),v=[m.black,m.red[d],m.green[d],m.blue[d],m.yellow[d]],b=[m.transparent,m.red[f],m.green[f],m.blue[f],m.yellow[f]],y=[m.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],x=a({transparent:m.transparent,white:m.white,gray:m.gray,black:m.black,bronze:m.bronze},g),w=a({transparent:m.transparent,white:m.white,gray:m.gray,black:m.black,bronze:m.bronze},g),k=function(e){return[m.cyan[e],m.blue[e],m.violet[e],m.grape[e],m.pink[e],m.green[e],m.teal[e],m.yellow[e],m.orange[e],m.red[e]]}},6798:function(e,t,n){"use strict";n.d(t,{o:function(){return f},w:function(){return d}});var r=n(2577),o=n(4739),i=n(1e3),a=n(8211),l=n(9487),c=n(6936),s=n(7046),u=n(4512),d=(0,o.cn)(null),f=function(){var e=(0,o.KO)(d,l.yE),t=(0,r.Z)(e,2),n=t[0],f=t[1],p=(0,c.eh)();return n&&"clearCanvas"===n?(0,u.jsx)(s.Z,{onConfirm:function(){p.executeAction(i.mo),f(null)},onCancel:function(){return f(null)},title:(0,a.t)("clearCanvasDialog.title"),children:(0,u.jsxs)("p",{className:"clear-canvas__content",children:[" ",(0,a.t)("alerts.clearReset")]})}):null}},6936:function(e,t,n){"use strict";n.d(t,{ZP:function(){return Ir},qD:function(){return ir},hY:function(){return ar},Fy:function(){return lr},eh:function(){return fr},gF:function(){return ur},J0:function(){return cr},bd:function(){return sr},n9:function(){return dr}});var r=n(6655),o=n(2577),i=n(1930),a=n(8950),l=n(8821),c=n(5169),s=n(3173),u=n(2248),d=n(7245),f=n(2312),p=n(7169),h=n(2975),m=n.n(h),g=n(9787),v=n.n(g),b=n(5156),y=n(8234),x=n(45),w=n(5605),k=n(1e3),E=n(3646),j=n(1319),S=n(8211),O=n(6066),_=n(1935),C=n(8290),P=n(6340),T=n(2335),I=n(4512);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=function(e,t,n){var r=!1;if(!(t.multiElement||t.resizingElement||t.editingElement||t.draggingElement)){var o=n();if(null===o)return{commitToHistory:r};var i=(0,P.xn)(e),a=o.elements,l=(0,P.xn)(a),c=e.filter((function(e){return!l.has(e.id)})),s=a.map((function(e){return(0,_.BE)(i.get(e.id)||e,e)})).concat(c.map((function(e){return(0,_.BE)(e,{isDeleted:!0})})));return(0,C.$q)(s,c),{elements:s,appState:D(D({},t),o.appState),commitToHistory:r,syncHistory:!0}}return{commitToHistory:r}},L=n(7047),Z=function(e,t,n,o,i,a){if(e.trackEvent)try{if("object"===(0,r.Z)(e.trackEvent))(!e.trackEvent.predicate||e.trackEvent.predicate(n,o,a))&&(0,L.L)(e.trackEvent.category,e.trackEvent.action||e.name,"".concat(t," (").concat(i.device.isMobile?"mobile":"desktop",")"))}catch(e){console.error("error while logging action:",e)}},R=function(){function e(t,n,r,o){var i=this;(0,l.Z)(this,e),this.actions={},this.renderAction=function(e,t){var n=i.app.props.UIOptions.canvasActions;if(i.actions[e]&&"PanelComponent"in i.actions[e]&&(!(e in n)||n[e])){var r=i.actions[e],o=r.PanelComponent;o.displayName="PanelComponent";var a=i.getElementsIncludingDeleted(),l=i.getAppState();return(0,I.jsx)(o,{elements:i.getElementsIncludingDeleted(),appState:i.getAppState(),updateData:function(e){Z(r,"ui",l,a,i.app,e),i.updater(r.perform(i.getElementsIncludingDeleted(),i.getAppState(),e,i.app))},appProps:i.app.props,data:t})}return null},this.isActionEnabled=function(e){var t=i.getElementsIncludingDeleted(),n=i.getAppState();return!e.predicate||e.predicate(t,n,i.app.props,i.app)},this.updater=function(e){if(!e||!("then"in e))return t(e);e.then((function(e){return t(e)}))},this.getAppState=n,this.getElementsIncludingDeleted=r,this.app=o}return(0,c.Z)(e,[{key:"registerAction",value:function(e){this.actions[e.name]=e}},{key:"registerAll",value:function(e){var t=this;e.forEach((function(e){return t.registerAction(e)}))}},{key:"handleKeyDown",value:function(e){var t=this,n=this.app.props.UIOptions.canvasActions,r=Object.values(this.actions).sort((function(e,t){return(t.keyPriority||0)-(e.keyPriority||0)})).filter((function(r){return(!(r.name in n)||n[r.name])&&r.keyTest&&r.keyTest(e,t.getAppState(),t.getElementsIncludingDeleted())}));if(1!==r.length)return r.length>1&&console.warn("Canceling as multiple actions match this shortcut",r),!1;var o=r[0];if(this.getAppState().viewModeEnabled&&!0!==o.viewMode)return!1;var i=this.getElementsIncludingDeleted(),a=this.getAppState();return Z(o,"keyboard",a,i,this.app,null),e.preventDefault(),e.stopPropagation(),this.updater(r[0].perform(i,a,null,this.app)),!0}},{key:"executeAction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api",n=this.getElementsIncludingDeleted(),r=this.getAppState(),o=null;Z(e,t,r,n,this.app,o),this.updater(e.perform(n,r,o,this.app))}}]),e}(),z=n(7901),N=n(8897),B=n(6665),H=n(9485),W=n(7053),F=n(679),U=n(1047),K=n(6938),Y=n(2791),V=n(1974),G=function(e){var t=Array.from(e.values());return{x:q(t,(function(e){return e.x}))/t.length,y:q(t,(function(e){return e.y}))/t.length}},X=function(e){var t=(0,o.Z)(e,2),n=t[0],r=t[1];return Math.hypot(n.x-r.x,n.y-r.y)},q=function(e,t){return e.reduce((function(e,n){return e+t(n)}),0)},$=n(242);function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ee=function(e){return{selectedElementIds:e.selectedElementIds,selectedGroupIds:e.selectedGroupIds,viewBackgroundColor:e.viewBackgroundColor,editingLinearElement:e.editingLinearElement,editingGroupId:e.editingGroupId,name:e.name}},te=function(){function e(){var t=this;(0,l.Z)(this,e),this.elementCache=new Map,this.recording=!0,this.stateHistory=[],this.redoStack=[],this.lastEntry=null,this.generateEntry=function(e,n){return t.dehydrateHistoryEntry({appState:ee(e),elements:n.reduce((function(t,n){if((0,V.bt)(n)&&e.multiElement&&e.multiElement.id===n.id){if(e.multiElement&&e.multiElement.id===n.id&&n.points.length<2)return t;t.push(Q(Q({},n),{},{points:n.lastCommittedPoint!==n.points[n.points.length-1]?n.points.slice(0,-1):n.points}))}else t.push(n);return t}),[])})}}return(0,c.Z)(e,[{key:"hydrateHistoryEntry",value:function(e){var t=this,n=e.appState,r=e.elements;return{appState:JSON.parse(n),elements:r.map((function(e){var n,r=null===(n=t.elementCache.get(e.id))||void 0===n?void 0:n.get(e.versionNonce);if(!r)throw new Error("Element not found: ".concat(e.id,":").concat(e.versionNonce));return r}))}}},{key:"dehydrateHistoryEntry",value:function(e){var t=this,n=e.appState,r=e.elements;return{appState:JSON.stringify(n),elements:r.map((function(e){t.elementCache.has(e.id)||t.elementCache.set(e.id,new Map);var n=t.elementCache.get(e.id);return n.has(e.versionNonce)||n.set(e.versionNonce,(0,Y.OL)(e)),{id:e.id,versionNonce:e.versionNonce}}))}}},{key:"getSnapshotForTest",value:function(){var e=this;return{recording:this.recording,stateHistory:this.stateHistory.map((function(t){return e.hydrateHistoryEntry(t)})),redoStack:this.redoStack.map((function(t){return e.hydrateHistoryEntry(t)}))}}},{key:"clear",value:function(){this.stateHistory.length=0,this.redoStack.length=0,this.lastEntry=null,this.elementCache.clear()}},{key:"shouldCreateEntry",value:function(e){var t,n=this.lastEntry;if(!n)return!0;if(e.elements.length!==n.elements.length)return!0;for(var r=e.elements.length-1;r>-1;r--){var o=e.elements[r],i=n.elements[r];if(!o||!i||o.id!==i.id||o.versionNonce!==i.versionNonce)return!0}for(t in e.appState){var a,l;if("editingLinearElement"===t)if((null===(a=e.appState[t])||void 0===a?void 0:a.elementId)===(null===(l=n.appState[t])||void 0===l?void 0:l.elementId))continue;if("selectedElementIds"!==t&&"selectedGroupIds"!==t&&e.appState[t]!==n.appState[t])return!0}return!1}},{key:"pushEntry",value:function(e,t){var n=this.generateEntry(e,t),r=this.hydrateHistoryEntry(n);if(r){if(!this.shouldCreateEntry(r))return;this.stateHistory.push(n),this.lastEntry=r,this.clearRedoStack()}}},{key:"clearRedoStack",value:function(){this.redoStack.splice(0,this.redoStack.length)}},{key:"redoOnce",value:function(){if(0===this.redoStack.length)return null;var e=this.redoStack.pop();return void 0!==e?(this.stateHistory.push(e),this.hydrateHistoryEntry(e)):null}},{key:"undoOnce",value:function(){if(1===this.stateHistory.length)return null;var e=this.stateHistory.pop(),t=this.stateHistory[this.stateHistory.length-1];return void 0!==e?(this.redoStack.push(e),this.hydrateHistoryEntry(t)):null}},{key:"setCurrentState",value:function(e,t){this.lastEntry=this.hydrateHistoryEntry(this.generateEntry(e,t))}},{key:"resumeRecording",value:function(){this.recording=!0}},{key:"record",value:function(e,t){this.recording&&(this.pushEntry(e,t),this.recording=!1)}}]),e}(),ne=n(6552),re=n(3547),oe=n(3063),ie=n(75),ae=n(1564),le=n(746),ce=[{icon:E.zu,value:"selection",key:O.tW.V,numericKey:O.tW[1],fillable:!0},{icon:E.OW,value:"rectangle",key:O.tW.R,numericKey:O.tW[2],fillable:!0},{icon:E.nb,value:"diamond",key:O.tW.D,numericKey:O.tW[3],fillable:!0},{icon:E.Re,value:"ellipse",key:O.tW.O,numericKey:O.tW[4],fillable:!0},{icon:E.e0,value:"arrow",key:O.tW.A,numericKey:O.tW[5],fillable:!0},{icon:E.zb,value:"line",key:O.tW.L,numericKey:O.tW[6],fillable:!0},{icon:E.Pm,value:"freedraw",key:[O.tW.P,O.tW.X],numericKey:O.tW[7],fillable:!1},{icon:E.VL,value:"text",key:O.tW.T,numericKey:O.tW[8],fillable:!1},{icon:E.XB,value:"image",key:null,numericKey:O.tW[9],fillable:!1},{icon:E.$q,value:"eraser",key:O.tW.E,numericKey:O.tW[0],fillable:!1}],se=n(2891),ue=n(487),de=n.n(ue),fe=n(631),pe=n.n(fe),he=n(2052),me=n.n(he),ge=n(4010),ve=n.n(ge),be=n(1469),ye=n.n(be),xe=n(9329),we=n.n(xe),ke=n(6578),Ee={};Ee.styleTagTransform=we(),Ee.setAttributes=ve(),Ee.insert=me().bind(null,"head"),Ee.domAPI=pe(),Ee.insertStyleElement=ye();de()(ke.Z,Ee),ke.Z&&ke.Z.locals&&ke.Z.locals;var je=n(785),Se="separator",Oe=v().memo((function(e){var t=e.actionManager,n=e.items,r=e.top,o=e.left,i=ur(),a=dr(),l=sr(),c=n.reduce((function(e,n){return!n||n!==Se&&n.predicate&&!n.predicate(l,i,t.app.props,t.app)||e.push(n),e}),[]);return(0,I.jsx)(se.J,{onCloseRequest:function(){return a({contextMenu:null})},top:r,left:o,fitInViewport:!0,offsetLeft:i.offsetLeft,offsetTop:i.offsetTop,viewportWidth:i.width,viewportHeight:i.height,children:(0,I.jsx)("ul",{className:"context-menu",onContextMenu:function(e){return e.preventDefault()},children:c.map((function(e,n){var r;if(e===Se)return c[n-1]&&c[n-1]!==Se?(0,I.jsx)("hr",{className:"context-menu-item-separator"},n):null;var o=e.name,s="";return e.contextItemLabel&&(s="function"==typeof e.contextItemLabel?(0,S.t)(e.contextItemLabel(l,i)):(0,S.t)(e.contextItemLabel)),(0,I.jsx)("li",{"data-testid":o,onClick:function(){a({contextMenu:null},(function(){t.executeAction(e,"contextMenu")}))},children:(0,I.jsxs)("button",{className:(0,x.Z)("context-menu-item",{dangerous:"deleteSelectedElements"===o,checkmark:null===(r=e.checked)||void 0===r?void 0:r.call(e,i)}),children:[(0,I.jsx)("div",{className:"context-menu-item__label",children:s}),(0,I.jsx)("kbd",{className:"context-menu-item__shortcut",children:o?(0,je.C)(o):""})]})},n)}))})})})),_e=n(2726),Ce=n(7239),Pe=n(8120),Te=n(1894),Ie=n(5710),Me=n(6086),De={};De.styleTagTransform=we(),De.setAttributes=ve(),De.insert=me().bind(null,"head"),De.domAPI=pe(),De.insertStyleElement=ye();de()(Me.Z,De),Me.Z&&Me.Z.locals&&Me.Z.locals;function Ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ze(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Re(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Re(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ze=function(e){var t,n=e.appState,r=e.elements,o=e.renderAction,i=(0,ie.Zs)((0,U.Lm)(r),n),a=!1;2===i.length&&((0,V.Xo)(i[0])||(0,V.Xo)(i[1]))&&(a=!0);var l,c=Boolean(n.editingElement),s=lr(),u="rtl"===document.documentElement.getAttribute("dir"),d=(0,ie.$b)(n.activeTool.type)||i.some((function(e){return(0,ie.$b)(e.type)&&!(0,P.Qm)(e.backgroundColor)})),f=(0,ie.$b)(n.activeTool.type)||i.some((function(e){return(0,ie.$b)(e.type)})),p=1===i.length||a,h=(null===(t=i[0])||void 0===t?void 0:t.type)||null,m=Ze(i);try{for(m.s();!(l=m.n()).done;){if(l.value.type!==h){h=null;break}}}catch(e){m.e(e)}finally{m.f()}return(0,I.jsxs)("div",{className:"panelColumn",children:[(0,I.jsx)("div",{children:((0,Pe.PD)(n.activeTool.type)&&"image"!==n.activeTool.type&&"image"!==h||i.some((function(e){return(0,Pe.PD)(e.type)})))&&o("changeStrokeColor")}),f&&(0,I.jsx)("div",{children:o("changeBackgroundColor")}),d&&o("changeFillStyle"),((0,ie.Zd)(n.activeTool.type)||i.some((function(e){return(0,ie.Zd)(e.type)})))&&o("changeStrokeWidth"),("freedraw"===n.activeTool.type||i.some((function(e){return"freedraw"===e.type})))&&o("changeStrokeShape"),((0,ie.M9)(n.activeTool.type)||i.some((function(e){return(0,ie.M9)(e.type)})))&&(0,I.jsxs)(I.Fragment,{children:[o("changeStrokeStyle"),o("changeSloppiness")]}),((0,ie.sh)(n.activeTool.type)||i.some((function(e){return(0,ie.sh)(e.type)})))&&(0,I.jsx)(I.Fragment,{children:o("changeRoundness")}),((0,ie.bZ)(n.activeTool.type)||i.some((function(e){return(0,ie.bZ)(e.type)})))&&(0,I.jsxs)(I.Fragment,{children:[o("changeFontSize"),o("changeFontFamily"),(0,Ie.aV)(i)&&o("changeTextAlign")]}),(0,Ie.cn)(i)&&o("changeVerticalAlign"),((0,ie.Un)(n.activeTool.type)||i.some((function(e){return(0,ie.Un)(e.type)})))&&(0,I.jsx)(I.Fragment,{children:o("changeArrowhead")}),o("changeOpacity"),(0,I.jsxs)("fieldset",{children:[(0,I.jsx)("legend",{children:(0,S.t)("labels.layers")}),(0,I.jsxs)("div",{className:"buttonList",children:[o("sendToBack"),o("sendBackward"),o("bringToFront"),o("bringForward")]})]}),i.length>1&&!a&&(0,I.jsxs)("fieldset",{children:[(0,I.jsx)("legend",{children:(0,S.t)("labels.align")}),(0,I.jsxs)("div",{className:"buttonList",children:[u?(0,I.jsxs)(I.Fragment,{children:[o("alignRight"),o("alignHorizontallyCentered"),o("alignLeft")]}):(0,I.jsxs)(I.Fragment,{children:[o("alignLeft"),o("alignHorizontallyCentered"),o("alignRight")]}),i.length>2&&o("distributeHorizontally"),(0,I.jsx)("div",{style:{flexBasis:"100%",height:0}}),(0,I.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[o("alignTop"),o("alignVerticallyCentered"),o("alignBottom"),i.length>2&&o("distributeVertically")]})]})]}),!c&&i.length>0&&(0,I.jsxs)("fieldset",{children:[(0,I.jsx)("legend",{children:(0,S.t)("labels.actions")}),(0,I.jsxs)("div",{className:"buttonList",children:[!s.isMobile&&o("duplicateSelection"),!s.isMobile&&o("deleteSelectedElements"),o("group"),o("ungroup"),p&&o("hyperlink")]})]})]})},Ne=function(e){var t=e.canvas,n=e.activeTool,r=e.setAppState,o=e.onImageAction,i=e.appState;return(0,I.jsx)(I.Fragment,{children:ce.map((function(e,a){var l=e.value,c=e.icon,s=e.key,u=e.numericKey,d=e.fillable,f=(0,S.t)("toolBar.".concat(l)),p=s&&(0,P.Oo)("string"==typeof s?s:s[0]),h=p?"".concat(p," ").concat((0,S.t)("helpDialog.or")," ").concat(u):"".concat(u);return(0,I.jsx)(j.V,{className:(0,x.Z)("Shape",{fillable:d}),type:"radio",icon:c,checked:n.type===l,name:"editor-current-shape",title:"".concat((0,P.Oo)(f)," — ").concat(h),keyBindingLabel:u||p,"aria-label":(0,P.Oo)(f),"aria-keyshortcuts":h,"data-testid":"toolbar-".concat(l),onPointerDown:function(e){var t=e.pointerType;i.penDetected||"pen"!==t||r({penDetected:!0,penMode:!0})},onChange:function(e){var n=e.pointerType;i.activeTool.type!==l&&(0,L.L)("toolbar",l,"ui");var a=(0,P.Om)(i,{type:l});r({activeTool:a,multiElement:null,selectedElementIds:{}}),(0,P.Uk)(t,Le(Le({},i),{},{activeTool:a})),"image"===l&&o({pointerType:n})}},l)}))})},Be=function(e){var t=e.renderAction;e.zoom;return(0,I.jsx)(Ce.Z.Col,{gap:1,className:"zoom-actions",children:(0,I.jsxs)(Ce.Z.Row,{align:"center",children:[t("zoomOut"),t("resetZoom"),t("zoomIn")]})})},He=function(e){var t=e.renderAction,n=e.className;return(0,I.jsxs)("div",{className:"undo-redo-buttons ".concat(n),children:[(0,I.jsx)("div",{className:"undo-button-container",children:(0,I.jsx)(Te.u,{label:(0,S.t)("buttons.undo"),children:t("undo")})}),(0,I.jsx)("div",{className:"redo-button-container",children:(0,I.jsxs)(Te.u,{label:(0,S.t)("buttons.redo"),children:[" ",t("redo")]})})]})},We=function(e){var t=e.actionManager,n=e.showExitZenModeBtn;return(0,I.jsx)("button",{className:(0,x.Z)("disable-zen-mode",{"disable-zen-mode--visible":n}),onClick:function(){return t.executeAction(k.JN)},children:(0,S.t)("buttons.exitZenMode")})},Fe=function(e){var t=e.renderAction,n=e.className;return(0,I.jsx)("div",{className:"finalize-button ".concat(n),children:t("finalize",{size:"small"})})},Ue=n(8396),Ke=function(e){var t=e.children,n=e.onClose,r=(0,g.useState)(!!t),i=(0,o.Z)(r,2),a=i[0],l=i[1],c=cr().container,s=v().useCallback((function(){l(!1),n&&n(),null==c||c.focus()}),[n,c]);return(0,I.jsx)(I.Fragment,{children:a&&(0,I.jsx)(Ue.V,{small:!0,onCloseRequest:s,title:(0,S.t)("errorDialog.title"),children:(0,I.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:t})})})},Ye=n(434),Ve=n(5284),Ge=n(3807),Xe=n(1393),qe=n(3024),$e=n(7955),Je={};Je.styleTagTransform=we(),Je.setAttributes=ve(),Je.insert=me().bind(null,"head"),Je.domAPI=pe(),Je.insertStyleElement=ye();de()($e.Z,Je),$e.Z&&$e.Z.locals&&$e.Z.locals;var Qe="filter"in document.createElement("canvas").getContext("2d"),et=function(){return(0,I.jsxs)("div",{children:[(0,I.jsx)("h3",{children:(0,S.t)("canvasError.cannotShowPreview")}),(0,I.jsx)("p",{children:(0,I.jsx)("span",{children:(0,S.t)("canvasError.canvasTooBig")})}),(0,I.jsxs)("em",{children:["(",(0,S.t)("canvasError.canvasTooBigTip"),")"]})]})},tt=function(e){var t,n=e.children,r=e.title,o=e.onClick,i=e.color,a=e.shade,l=void 0===a?6:a;return(0,I.jsx)("button",{className:"ExportDialog-imageExportButton",style:(t={},(0,p.Z)(t,"--button-color",Ve[i][l]),(0,p.Z)(t,"--button-color-darker",Ve[i][l+1]),(0,p.Z)(t,"--button-color-darkest",Ve[i][l+2]),t),title:r,"aria-label":r,onClick:o,children:n})},nt=function(e){var t=e.elements,n=e.appState,r=e.files,i=e.actionManager,a=e.onExportImage,l=(0,ie.N)(t,n),c=(0,g.useState)(l),s=(0,o.Z)(c,2),u=s[0],d=s[1],f=(0,g.useRef)(null),p=(0,g.useState)(null),h=(0,o.Z)(p,2),m=h[0],v=h[1],b=u?(0,ie.eD)(t,n,!0):t;return(0,g.useEffect)((function(){var e=f.current;if(e){var t=e.offsetWidth;t&&(0,qe.NL)({elements:b,appState:n,files:r,exportPadding:T.qy,maxWidthOrHeight:t}).then((function(t){return v(null),(0,Ye._c)(t).then((function(){e.replaceChildren(t)}))})).catch((function(e){console.error(e),v(e)}))}}),[n,r,b]),(0,I.jsxs)("div",{className:"ExportDialog",children:[(0,I.jsx)("div",{className:"ExportDialog__preview",ref:f,children:m&&(0,I.jsx)(et,{})}),Qe&&i.renderAction("exportWithDarkMode"),(0,I.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr"},children:(0,I.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(190px, 1fr))",overflow:"hidden"},children:[i.renderAction("changeExportBackground"),l&&(0,I.jsx)(Ge.o,{checked:u,onChange:function(e){return d(e)},children:(0,S.t)("labels.onlySelected")}),i.renderAction("changeExportEmbedScene")]})}),(0,I.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:".6em"},children:[(0,I.jsx)(Ce.Z.Row,{gap:2,children:i.renderAction("changeExportScale")}),(0,I.jsx)("p",{style:{marginLeft:"1em",userSelect:"none"},children:(0,S.t)("buttons.scale")})]}),(0,I.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",margin:".6em 0"},children:!Xe.kr&&i.renderAction("changeProjectName")}),(0,I.jsxs)(Ce.Z.Row,{gap:2,justifyContent:"center",style:{margin:"2em 0"},children:[(0,I.jsx)(tt,{color:"indigo",title:(0,S.t)("buttons.exportToPng"),"aria-label":(0,S.t)("buttons.exportToPng"),onClick:function(){return a(T.I_.png,b)},children:"PNG"}),(0,I.jsx)(tt,{color:"red",title:(0,S.t)("buttons.exportToSvg"),"aria-label":(0,S.t)("buttons.exportToSvg"),onClick:function(){return a(T.I_.svg,b)},children:"SVG"}),(B.vt||T.vU)&&(0,I.jsx)(tt,{title:(0,S.t)("buttons.copyPngToClipboard"),onClick:function(){return a(T.I_.clipboard,b)},color:"gray",shade:7,children:E.BR})]})]})},rt=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.actionManager,i=e.onExportImage,a=e.onCloseRequest;return"imageExport"!==n.openDialog?null:(0,I.jsx)(Ue.V,{onCloseRequest:a,title:(0,S.t)("buttons.exportImage"),children:(0,I.jsx)(nt,{elements:t,appState:n,files:r,actionManager:o,onExportImage:i})})},ot=n(3195),it={};it.styleTagTransform=we(),it.setAttributes=ve(),it.insert=me().bind(null,"head"),it.domAPI=pe(),it.insertStyleElement=ye();de()(ot.Z,it),ot.Z&&ot.Z.locals&&ot.Z.locals;var at=function(e){var t=e.children,n=e.side,r=e.className;return(0,I.jsx)("div",{className:(0,x.Z)("FixedSideContainer","FixedSideContainer_side_".concat(n),r),children:t})},lt=n(1587),ct={};ct.styleTagTransform=we(),ct.setAttributes=ve(),ct.insert=me().bind(null,"head"),ct.domAPI=pe(),ct.insertStyleElement=ye();de()(lt.Z,ct),lt.Z&&lt.Z.locals&&lt.Z.locals;var st=function(e){var t=function(e){var t=e.appState,n=e.elements,r=e.isMobile,o=e.device,i=t.activeTool,a=t.isResizing,l=t.isRotating,c=t.lastPointerDownWith,s=null!==t.multiElement;if(t.openSidebar&&!o.canDeviceFitSidebar)return null;if((0,N.EN)(t))return(0,S.t)("hints.eraserRevert");if("arrow"===i.type||"line"===i.type)return s?(0,S.t)("hints.linearElementMulti"):(0,S.t)("hints.linearElement");if("freedraw"===i.type)return(0,S.t)("hints.freeDraw");if("text"===i.type)return(0,S.t)("hints.text");if("image"===t.activeTool.type&&t.pendingImageElementId)return(0,S.t)("hints.placeImage");var u=(0,ie.eD)(n,t);if(a&&"mouse"===c&&1===u.length){var d=u[0];return(0,V.bt)(d)&&2===d.points.length?(0,S.t)("hints.lockAngle"):(0,V.pC)(d)?(0,S.t)("hints.resizeImage"):(0,S.t)("hints.resize")}if(l&&"mouse"===c)return(0,S.t)("hints.rotate");if(1===u.length&&(0,V.iB)(u[0]))return(0,S.t)("hints.text_selected");if(t.editingElement&&(0,V.iB)(t.editingElement))return(0,S.t)("hints.text_editing");if("selection"===i.type){var f;if("selection"===(null===(f=t.draggingElement)||void 0===f?void 0:f.type)&&!t.editingElement&&!t.editingLinearElement)return(0,S.t)("hints.deepBoxSelect");if(!u.length&&!r)return(0,S.t)("hints.canvasPanning")}if(1===u.length){if((0,V.bt)(u[0]))return t.editingLinearElement?t.editingLinearElement.selectedPointsIndices?(0,S.t)("hints.lineEditor_pointSelected"):(0,S.t)("hints.lineEditor_nothingSelected"):(0,S.t)("hints.lineEditor_info");if((0,V.mG)(u[0]))return(0,S.t)("hints.bindTextToElement")}return null}({appState:e.appState,elements:e.elements,isMobile:e.isMobile,device:e.device});return t?(t=(0,P.uY)(t),(0,I.jsx)("div",{className:"HintViewer",children:(0,I.jsx)("span",{children:t})})):null},ut=n(1881),dt=n(5440),ft=(n(5422),{CHECKED:E.FC,UNCHECKED:E._C}),pt=function(e){return(0,I.jsxs)("label",{className:(0,x.Z)("ToolIcon ToolIcon__lock","ToolIcon_size_".concat("medium"),{"is-mobile":e.isMobile}),title:"".concat(e.title," — Q"),children:[(0,I.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title,"data-testid":"toolbar-lock"}),(0,I.jsx)("div",{className:"ToolIcon__icon",children:e.checked?ft.CHECKED:ft.UNCHECKED})]})},ht=["heading","children"];function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vt=function(e){var t=e.heading,n=e.children,r=(0,_e.Z)(e,ht),o=cr().id,i=(0,I.jsx)("h2",{className:"visually-hidden",id:"".concat(o,"-").concat(t,"-title"),children:(0,S.t)("headings.".concat(t))});return(0,I.jsx)("section",gt(gt({},r),{},{"aria-labelledby":"".concat(o,"-").concat(t,"-title"),children:"function"==typeof n?n(i):(0,I.jsxs)(I.Fragment,{children:[i,n]})}))},bt=n(756),yt=function(e){return e.penDetected?(0,I.jsxs)("label",{className:(0,x.Z)("ToolIcon ToolIcon__penMode","ToolIcon_size_".concat("medium"),{"is-mobile":e.isMobile}),title:"".concat(e.title),children:[(0,I.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),(0,I.jsx)("div",{className:"ToolIcon__icon",children:E.tb})]}):null},xt=n(8925),wt=n(2681),kt={};kt.styleTagTransform=we(),kt.setAttributes=ve(),kt.insert=me().bind(null,"head"),kt.domAPI=pe(),kt.insertStyleElement=ye();de()(wt.Z,kt),wt.Z&&wt.Z.locals&&wt.Z.locals;var Et=function(e){var t,n=(0,xt.KP)(e.elements),r=(0,ie.Zs)(e.elements,e.appState),o=(0,xt.KP)(r);return(0,I.jsx)("div",{className:"Stats",children:(0,I.jsxs)(ut.W,{padding:2,children:[(0,I.jsx)("div",{className:"close",onClick:e.onClose,children:E.Tw}),(0,I.jsx)("h3",{children:(0,S.t)("stats.title")}),(0,I.jsx)("table",{children:(0,I.jsxs)("tbody",{children:[(0,I.jsx)("tr",{children:(0,I.jsx)("th",{colSpan:2,children:(0,S.t)("stats.scene")})}),(0,I.jsxs)("tr",{children:[(0,I.jsx)("td",{children:(0,S.t)("stats.elements")}),(0,I.jsx)("td",{children:e.elements.length})]}),(0,I.jsxs)("tr",{children:[(0,I.jsx)("td",{children:(0,S.t)("stats.width")}),(0,I.jsx)("td",{children:Math.round(n[2])-Math.round(n[0])})]}),(0,I.jsxs)("tr",{children:[(0,I.jsx)("td",{children:(0,S.t)("stats.height")}),(0,I.jsx)("td",{children:Math.round(n[3])-Math.round(n[1])})]}),1===r.length&&(0,I.jsx)("tr",{children:(0,I.jsx)("th",{colSpan:2,children:(0,S.t)("stats.element")})}),r.length>1&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("tr",{children:(0,I.jsx)("th",{colSpan:2,children:(0,S.t)("stats.selected")})}),(0,I.jsxs)("tr",{children:[(0,I.jsx)("td",{children:(0,S.t)("stats.elements")}),(0,I.jsx)("td",{children:r.length})]})]}),r.length>0&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)("tr",{children:[(0,I.jsx)("td",{children:"x"}),(0,I.jsx)("td",{children:Math.round(o[0])})]}),(0,I.jsxs)("tr",{children:[(0,I.jsx)("td",{children:"y"}),(0,I.jsx)("td",{children:Math.round(o[1])})]}),(0,I.jsxs)("tr",{children:[(0,I.jsx)("td",{children:(0,S.t)("stats.width")}),(0,I.jsx)("td",{children:Math.round(o[2]-o[0])})]}),(0,I.jsxs)("tr",{children:[(0,I.jsx)("td",{children:(0,S.t)("stats.height")}),(0,I.jsx)("td",{children:Math.round(o[3]-o[1])})]})]}),1===r.length&&(0,I.jsxs)("tr",{children:[(0,I.jsx)("td",{children:(0,S.t)("stats.angle")}),(0,I.jsx)("td",{children:"".concat(Math.round(180*r[0].angle/Math.PI),"°")})]}),null===(t=e.renderCustomStats)||void 0===t?void 0:t.call(e,e.elements,e.appState)]})})]})})},jt=function(e){return(0,I.jsx)(j.V,{className:(0,x.Z)("Shape",{fillable:!1}),type:"radio",icon:E.Hk,name:"editor-current-shape",checked:e.checked,title:"".concat(e.title," — H"),keyBindingLabel:e.isMobile?void 0:O.tW.H.toLocaleUpperCase(),"aria-label":"".concat(e.title," — H"),"aria-keyshortcuts":O.tW.H,"data-testid":"toolbar-hand",onChange:function(){var t;return null===(t=e.onChange)||void 0===t?void 0:t.call(e)}})},St=n(7681);function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var _t=function(e){var t=e.appState,n=e.elements,r=e.actionManager,o=e.setAppState,i=e.onLockToggle,a=e.onHandToolToggle,l=e.onPenModeToggle,c=e.canvas,s=e.onImageAction,u=e.renderTopRightUI,d=e.renderCustomStats,f=e.renderSidebars,h=e.device,m=e.renderWelcomeScreen,g=(0,St.R6)(),v=g.WelcomeScreenCenterTunnel,b=g.MainMenuTunnel,y=g.DefaultSidebarTriggerTunnel;return(0,I.jsxs)(I.Fragment,{children:[f(),!t.viewModeEnabled&&(0,I.jsxs)(at,{side:"top",className:"App-top-bar",children:[m&&(0,I.jsx)(v.Out,{}),(0,I.jsx)(vt,{heading:"shapes",children:function(e){return(0,I.jsx)(Ce.Z.Col,{gap:4,align:"center",children:(0,I.jsxs)(Ce.Z.Row,{gap:1,className:"App-toolbar-container",children:[(0,I.jsxs)(ut.W,{padding:1,className:"App-toolbar App-toolbar--mobile",children:[e,(0,I.jsx)(Ce.Z.Row,{gap:1,children:(0,I.jsx)(Ne,{appState:t,canvas:c,activeTool:t.activeTool,setAppState:o,onImageAction:function(e){var t=e.pointerType;s({insertOnCanvasDirectly:"mouse"!==t})}})})]}),u&&u(!0,t),(0,I.jsxs)("div",{className:"mobile-misc-tools-container",children:[!t.viewModeEnabled&&(0,I.jsx)(y.Out,{}),(0,I.jsx)(yt,{checked:t.penMode,onChange:l,title:(0,S.t)("toolBar.penMode"),isMobile:!0,penDetected:t.penDetected}),(0,I.jsx)(pt,{checked:t.activeTool.locked,onChange:i,title:(0,S.t)("toolBar.lock"),isMobile:!0}),(0,I.jsx)(jt,{checked:(0,N.l$)(t),onChange:function(){return a()},title:(0,S.t)("toolBar.hand"),isMobile:!0})]})]})})}}),(0,I.jsx)(st,{appState:t,elements:n,isMobile:!0,device:h})]}),!t.openMenu&&t.showStats&&(0,I.jsx)(Et,{appState:t,setAppState:o,elements:n,onClose:function(){r.executeAction(k.u0)},renderCustomStats:d}),(0,I.jsx)("div",{className:"App-bottom-bar",style:{marginBottom:bt.nn+2*bt.WM,marginLeft:bt.nn+2*bt.WM,marginRight:bt.nn+2*bt.WM},children:(0,I.jsxs)(ut.W,{padding:0,children:["shape"===t.openMenu&&!t.viewModeEnabled&&(0,U.RT)(t,n)?(0,I.jsx)(vt,{className:"App-mobile-menu",heading:"selectedShapeActions",children:(0,I.jsx)(ze,{appState:t,elements:n,renderAction:r.renderAction})}):null,(0,I.jsxs)("footer",{className:"App-toolbar",children:[t.viewModeEnabled?(0,I.jsx)("div",{className:"App-toolbar-content",children:(0,I.jsx)(b.Out,{})}):(0,I.jsxs)("div",{className:"App-toolbar-content",children:[(0,I.jsx)(b.Out,{}),r.renderAction("toggleEditMenu"),r.renderAction("undo"),r.renderAction("redo"),r.renderAction(t.multiElement?"finalize":"duplicateSelection"),r.renderAction("deleteSelectedElements")]}),t.scrolledOutside&&!t.openMenu&&!t.openSidebar&&(0,I.jsx)("button",{className:"scroll-back-to-content",onClick:function(){o((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,ie.W)(n,e,c))}))},children:(0,S.t)("buttons.scrollBackToContent")})]})]})})]})},Ct=n(5674),Pt=n(4162),Tt=n(8461),It={};It.styleTagTransform=we(),It.setAttributes=ve(),It.insert=me().bind(null,"head"),It.domAPI=pe(),It.insertStyleElement=ye();de()(Tt.Z,It),Tt.Z&&Tt.Z.locals&&Tt.Z.locals;var Mt=function(e){var t=(0,g.useRef)(null),n=(0,g.useState)(null),r=(0,o.Z)(n,2),i=r[0],l=r[1];return(0,g.useLayoutEffect)((function(){if(e.spreadsheet){var n,r=(0,Ct.ps)(e.chartType,e.spreadsheet,0,0);l(r);var o=t.current;return(0,a.Z)(m().mark((function t(){var i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Pt.$D)(r,{exportBackground:!1,viewBackgroundColor:Ve.white},null);case 2:n=t.sent,null===(i=n.querySelector(".style-fonts"))||void 0===i||i.remove(),o.replaceChildren(),o.appendChild(n),e.selected&&o.parentNode.focus();case 7:case"end":return t.stop()}}),t)})))(),function(){o.replaceChildren()}}}),[e.spreadsheet,e.chartType,e.selected]),(0,I.jsx)("button",{className:"ChartPreview",onClick:function(){i&&e.onClick(e.chartType,i)},children:(0,I.jsx)("div",{ref:t})})},Dt=function(e){var t=e.setAppState,n=e.appState,r=e.onClose,o=ir().onInsertElements,i=v().useCallback((function(){r&&r()}),[r]),a=function(e,n){o(n),(0,L.L)("magic","chart",e),t({currentChartType:e,pasteDialog:{shown:!1,data:null}})};return(0,I.jsx)(Ue.V,{small:!0,onCloseRequest:i,title:(0,S.t)("labels.pasteCharts"),className:"PasteChartDialog",autofocus:!1,children:(0,I.jsxs)("div",{className:"container",children:[(0,I.jsx)(Mt,{chartType:"bar",spreadsheet:n.pasteDialog.data,selected:"bar"===n.currentChartType,onClick:a}),(0,I.jsx)(Mt,{chartType:"line",spreadsheet:n.pasteDialog.data,selected:"line"===n.currentChartType,onClick:a})]})})},At=n(2978),Lt={};Lt.styleTagTransform=we(),Lt.setAttributes=ve(),Lt.insert=me().bind(null,"head"),Lt.domAPI=pe(),Lt.insertStyleElement=ye();de()(At.Z,Lt),At.Z&&At.Z.locals&&At.Z.locals;function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Rt=m().mark(Ft);function zt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nt(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Bt=function(){return(0,I.jsxs)("div",{className:"HelpDialog__header",children:[(0,I.jsxs)("a",{className:"HelpDialog__btn",href:"https://github.com/excalidraw/excalidraw#documentation",target:"_blank",rel:"noopener noreferrer",children:[(0,S.t)("helpDialog.documentation"),(0,I.jsx)("div",{className:"HelpDialog__link-icon",children:E.h0})]}),(0,I.jsxs)("a",{className:"HelpDialog__btn",href:"https://blog.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:[(0,S.t)("helpDialog.blog"),(0,I.jsx)("div",{className:"HelpDialog__link-icon",children:E.h0})]}),(0,I.jsxs)("a",{className:"HelpDialog__btn",href:"https://github.com/excalidraw/excalidraw/issues",target:"_blank",rel:"noopener noreferrer",children:[(0,S.t)("helpDialog.github"),(0,I.jsx)("div",{className:"HelpDialog__link-icon",children:E.h0})]})]})},Ht=function(e){return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("h3",{children:e.title}),(0,I.jsx)("div",{className:"HelpDialog__islands-container",children:e.children})]})},Wt=function(e){return(0,I.jsxs)("div",{className:"HelpDialog__island ".concat(e.className),children:[(0,I.jsx)("h4",{className:"HelpDialog__island-title",children:e.caption}),(0,I.jsx)("div",{className:"HelpDialog__island-content",children:e.children})]})};function Ft(e,t){var n,r,o,i;return m().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:n=!0,r=zt(e),a.prev=2,r.s();case 4:if((o=r.n()).done){a.next=14;break}if(i=o.value,n){a.next=9;break}return a.next=9,t;case 9:return n=!1,a.next=12,i;case 12:a.next=4;break;case 14:a.next=19;break;case 16:a.prev=16,a.t0=a.catch(2),r.e(a.t0);case 19:return a.prev=19,r.f(),a.finish(19);case 22:case"end":return a.stop()}}),Rt,null,[[2,16,19,22]])}var Ut=function(e){var t=e.label,n=e.shortcuts,r=e.isOr,o=void 0===r||r,a=n.map((function(e){return(e.endsWith("++")?[].concat((0,i.Z)(e.slice(0,-2).split("+")),["+"]):e.split("+")).map((function(e){return(0,I.jsx)(Kt,{children:(t=e,t.replace(/\b[a-z]\b/,(function(e){return e.toUpperCase()})))},e);var t}))}));return(0,I.jsxs)("div",{className:"HelpDialog__shortcut",children:[(0,I.jsx)("div",{children:t}),(0,I.jsx)("div",{className:"HelpDialog__key-container",children:(0,i.Z)(Ft(a,o?(0,S.t)("helpDialog.or"):null))})]})},Kt=function(e){return(0,I.jsx)("kbd",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:"HelpDialog__key"},e))},Yt=function(e){var t=e.onClose,n=v().useCallback((function(){t&&t()}),[t]);return(0,I.jsx)(I.Fragment,{children:(0,I.jsxs)(Ue.V,{onCloseRequest:n,title:(0,S.t)("helpDialog.title"),className:"HelpDialog",children:[(0,I.jsx)(Bt,{}),(0,I.jsxs)(Ht,{title:(0,S.t)("helpDialog.shortcuts"),children:[(0,I.jsxs)(Wt,{className:"HelpDialog__island--tools",caption:(0,S.t)("helpDialog.tools"),children:[(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.hand"),shortcuts:[O.tW.H]}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.selection"),shortcuts:[O.tW.V,O.tW[1]]}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.rectangle"),shortcuts:[O.tW.R,O.tW[2]]}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.diamond"),shortcuts:[O.tW.D,O.tW[3]]}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.ellipse"),shortcuts:[O.tW.O,O.tW[4]]}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.arrow"),shortcuts:[O.tW.A,O.tW[5]]}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.line"),shortcuts:[O.tW.L,O.tW[6]]}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.freedraw"),shortcuts:[O.tW.P,O.tW[7]]}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.text"),shortcuts:[O.tW.T,O.tW[8]]}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.image"),shortcuts:[O.tW[9]]}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.eraser"),shortcuts:[O.tW.E,O.tW[0]]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.editLineArrowPoints"),shortcuts:[(0,P.uY)("CtrlOrCmd+Enter")]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.editText"),shortcuts:[(0,P.uY)("Enter")]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.textNewLine"),shortcuts:[(0,P.uY)("Enter"),(0,P.uY)("Shift+Enter")]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.textFinish"),shortcuts:[(0,P.uY)("Esc"),(0,P.uY)("CtrlOrCmd+Enter")]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.curvedArrow"),shortcuts:["A",(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click")],isOr:!1}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.curvedLine"),shortcuts:["L",(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click"),(0,S.t)("helpDialog.click")],isOr:!1}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.lock"),shortcuts:[O.tW.Q]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.preventBinding"),shortcuts:[(0,P.uY)("CtrlOrCmd")]}),(0,I.jsx)(Ut,{label:(0,S.t)("toolBar.link"),shortcuts:[(0,P.uY)("CtrlOrCmd+K")]})]}),(0,I.jsxs)(Wt,{className:"HelpDialog__island--view",caption:(0,S.t)("helpDialog.view"),children:[(0,I.jsx)(Ut,{label:(0,S.t)("buttons.zoomIn"),shortcuts:[(0,P.uY)("CtrlOrCmd++")]}),(0,I.jsx)(Ut,{label:(0,S.t)("buttons.zoomOut"),shortcuts:[(0,P.uY)("CtrlOrCmd+-")]}),(0,I.jsx)(Ut,{label:(0,S.t)("buttons.resetZoom"),shortcuts:[(0,P.uY)("CtrlOrCmd+0")]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.zoomToFit"),shortcuts:["Shift+1"]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.zoomToSelection"),shortcuts:["Shift+2"]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.movePageUpDown"),shortcuts:["PgUp/PgDn"]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.movePageLeftRight"),shortcuts:["Shift+PgUp/PgDn"]}),(0,I.jsx)(Ut,{label:(0,S.t)("buttons.fullScreen"),shortcuts:["F"]}),(0,I.jsx)(Ut,{label:(0,S.t)("buttons.zenMode"),shortcuts:[(0,P.uY)("Alt+Z")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.showGrid"),shortcuts:[(0,P.uY)("CtrlOrCmd+'")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.viewMode"),shortcuts:[(0,P.uY)("Alt+R")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.toggleTheme"),shortcuts:[(0,P.uY)("Alt+Shift+D")]}),(0,I.jsx)(Ut,{label:(0,S.t)("stats.title"),shortcuts:[(0,P.uY)("Alt+/")]})]}),(0,I.jsxs)(Wt,{className:"HelpDialog__island--editor",caption:(0,S.t)("helpDialog.editor"),children:[(0,I.jsx)(Ut,{label:(0,S.t)("labels.moveCanvas"),shortcuts:[(0,P.uY)("Space+".concat((0,S.t)("helpDialog.drag"))),(0,P.uY)("Wheel+".concat((0,S.t)("helpDialog.drag")))],isOr:!0}),(0,I.jsx)(Ut,{label:(0,S.t)("buttons.clearReset"),shortcuts:[(0,P.uY)("CtrlOrCmd+Delete")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.delete"),shortcuts:[(0,P.uY)("Delete")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.cut"),shortcuts:[(0,P.uY)("CtrlOrCmd+X")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.copy"),shortcuts:[(0,P.uY)("CtrlOrCmd+C")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.paste"),shortcuts:[(0,P.uY)("CtrlOrCmd+V")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.pasteAsPlaintext"),shortcuts:[(0,P.uY)("CtrlOrCmd+Shift+V")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.selectAll"),shortcuts:[(0,P.uY)("CtrlOrCmd+A")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.multiSelect"),shortcuts:[(0,P.uY)("Shift+".concat((0,S.t)("helpDialog.click")))]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.deepSelect"),shortcuts:[(0,P.uY)("CtrlOrCmd+".concat((0,S.t)("helpDialog.click")))]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.deepBoxSelect"),shortcuts:[(0,P.uY)("CtrlOrCmd+".concat((0,S.t)("helpDialog.drag")))]}),(B.vt||T.vU)&&(0,I.jsx)(Ut,{label:(0,S.t)("labels.copyAsPng"),shortcuts:[(0,P.uY)("Shift+Alt+C")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.copyStyles"),shortcuts:[(0,P.uY)("CtrlOrCmd+Alt+C")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.pasteStyles"),shortcuts:[(0,P.uY)("CtrlOrCmd+Alt+V")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.sendToBack"),shortcuts:[T.Um?(0,P.uY)("CtrlOrCmd+Alt+["):(0,P.uY)("CtrlOrCmd+Shift+[")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.bringToFront"),shortcuts:[T.Um?(0,P.uY)("CtrlOrCmd+Alt+]"):(0,P.uY)("CtrlOrCmd+Shift+]")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.sendBackward"),shortcuts:[(0,P.uY)("CtrlOrCmd+[")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.bringForward"),shortcuts:[(0,P.uY)("CtrlOrCmd+]")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.alignTop"),shortcuts:[(0,P.uY)("CtrlOrCmd+Shift+Up")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.alignBottom"),shortcuts:[(0,P.uY)("CtrlOrCmd+Shift+Down")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.alignLeft"),shortcuts:[(0,P.uY)("CtrlOrCmd+Shift+Left")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.alignRight"),shortcuts:[(0,P.uY)("CtrlOrCmd+Shift+Right")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.duplicateSelection"),shortcuts:[(0,P.uY)("CtrlOrCmd+D"),(0,P.uY)("Alt+".concat((0,S.t)("helpDialog.drag")))]}),(0,I.jsx)(Ut,{label:(0,S.t)("helpDialog.toggleElementLock"),shortcuts:[(0,P.uY)("CtrlOrCmd+Shift+L")]}),(0,I.jsx)(Ut,{label:(0,S.t)("buttons.undo"),shortcuts:[(0,P.uY)("CtrlOrCmd+Z")]}),(0,I.jsx)(Ut,{label:(0,S.t)("buttons.redo"),shortcuts:T.ED?[(0,P.uY)("CtrlOrCmd+Y"),(0,P.uY)("CtrlOrCmd+Shift+Z")]:[(0,P.uY)("CtrlOrCmd+Shift+Z")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.group"),shortcuts:[(0,P.uY)("CtrlOrCmd+G")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.ungroup"),shortcuts:[(0,P.uY)("CtrlOrCmd+Shift+G")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.flipHorizontal"),shortcuts:[(0,P.uY)("Shift+H")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.flipVertical"),shortcuts:[(0,P.uY)("Shift+V")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.showStroke"),shortcuts:[(0,P.uY)("S")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.showBackground"),shortcuts:[(0,P.uY)("G")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.decreaseFontSize"),shortcuts:[(0,P.uY)("CtrlOrCmd+Shift+<")]}),(0,I.jsx)(Ut,{label:(0,S.t)("labels.increaseFontSize"),shortcuts:[(0,P.uY)("CtrlOrCmd+Shift+>")]})]})]})]})})},Vt=n(6773),Gt=n(8671),Xt=n(4241),qt={};qt.styleTagTransform=we(),qt.setAttributes=ve(),qt.insert=me().bind(null,"head"),qt.domAPI=pe(),qt.insertStyleElement=ye();de()(Xt.Z,qt),Xt.Z&&Xt.Z.locals&&Xt.Z.locals;var $t=function(e){var t,n=e.children,r=e.color;return(0,I.jsx)("div",{className:"Card",style:(t={},(0,p.Z)(t,"--card-color","primary"===r?"var(--color-primary)":Ve[r][7]),(0,p.Z)(t,"--card-color-darker","primary"===r?"var(--color-primary-darker)":Ve[r][8]),(0,p.Z)(t,"--card-color-darkest","primary"===r?"var(--color-primary-darkest)":Ve[r][9]),t),children:n})},Jt=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.actionManager,i=e.exportOpts,a=e.canvas,l=i.onExportToBackend;return(0,I.jsx)("div",{className:"ExportDialog ExportDialog--json",children:(0,I.jsxs)("div",{className:"ExportDialog-cards",children:[i.saveFileToDisk&&(0,I.jsxs)($t,{color:"lime",children:[(0,I.jsx)("div",{className:"Card-icon",children:E.TP}),(0,I.jsx)("h2",{children:(0,S.t)("exportDialog.disk_title")}),(0,I.jsxs)("div",{className:"Card-details",children:[(0,S.t)("exportDialog.disk_details"),!Xe.kr&&o.renderAction("changeProjectName")]}),(0,I.jsx)(j.V,{className:"Card-button",type:"button",title:(0,S.t)("exportDialog.disk_button"),"aria-label":(0,S.t)("exportDialog.disk_button"),showAriaLabel:!0,onClick:function(){o.executeAction(Gt.mM,"ui")}})]}),l&&(0,I.jsxs)($t,{color:"pink",children:[(0,I.jsx)("div",{className:"Card-icon",children:E.xP}),(0,I.jsx)("h2",{children:(0,S.t)("exportDialog.link_title")}),(0,I.jsx)("div",{className:"Card-details",children:(0,S.t)("exportDialog.link_details")}),(0,I.jsx)(j.V,{className:"Card-button",type:"button",title:(0,S.t)("exportDialog.link_button"),"aria-label":(0,S.t)("exportDialog.link_button"),showAriaLabel:!0,onClick:function(){l(t,n,r,a),(0,L.L)("export","link","ui (".concat((0,P.$h)(),")"))}})]}),i.renderCustomUI&&i.renderCustomUI(t,n,r,a)]})})},Qt=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.actionManager,i=e.exportOpts,a=e.canvas,l=e.setAppState,c=v().useCallback((function(){l({openDialog:null})}),[l]);return(0,I.jsx)(I.Fragment,{children:"jsonExport"===n.openDialog&&(0,I.jsx)(Ue.V,{onCloseRequest:c,title:(0,S.t)("buttons.export"),children:(0,I.jsx)(Jt,{elements:t,appState:n,files:r,actionManager:o,onCloseRequest:c,exportOpts:i,canvas:a})})})},en=n(4958),tn=function(e){return(0,I.jsx)("button",{className:"help-icon",onClick:e.onClick,type:"button",title:"".concat((0,S.t)("helpDialog.title")," — ?"),"aria-label":(0,S.t)("helpDialog.title"),children:E.by})},nn=function(e){var t=e.appState,n=e.actionManager,r=e.showExitZenModeBtn,o=e.renderWelcomeScreen,i=(0,St.R6)(),a=i.FooterCenterTunnel,l=i.WelcomeScreenHelpHintTunnel,c=lr(),s=!t.viewModeEnabled&&t.multiElement&&c.isTouchScreen;return(0,I.jsxs)("footer",{role:"contentinfo",className:"layer-ui__wrapper__footer App-menu App-menu_bottom",children:[(0,I.jsx)("div",{className:(0,x.Z)("layer-ui__wrapper__footer-left zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":t.zenModeEnabled}),children:(0,I.jsx)(Ce.Z.Col,{gap:2,children:(0,I.jsxs)(vt,{heading:"canvasActions",children:[(0,I.jsx)(Be,{renderAction:n.renderAction,zoom:t.zoom}),!t.viewModeEnabled&&(0,I.jsx)(He,{renderAction:n.renderAction,className:(0,x.Z)("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":t.zenModeEnabled})}),s&&(0,I.jsx)(Fe,{renderAction:n.renderAction,className:(0,x.Z)("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":t.zenModeEnabled})})]})})}),(0,I.jsx)(a.Out,{}),(0,I.jsx)("div",{className:(0,x.Z)("layer-ui__wrapper__footer-right zen-mode-transition",{"transition-right disable-pointerEvents":t.zenModeEnabled}),children:(0,I.jsxs)("div",{style:{position:"relative"},children:[o&&(0,I.jsx)(l.Out,{}),(0,I.jsx)(tn,{onClick:function(){return n.executeAction(k.jY)}})]})}),(0,I.jsx)(We,{actionManager:n,showExitZenModeBtn:r})]})},rn=nn;nn.displayName="Footer";var on=n(1034),an=n(9487),ln=n(4739),cn=n(6756),sn=n(6798),un=n(96),dn=n(704),fn=n(1434),pn={};pn.styleTagTransform=we(),pn.setAttributes=ve(),pn.insert=me().bind(null,"head"),pn.domAPI=pe(),pn.insertStyleElement=ye();de()(fn.Z,pn),fn.Z&&fn.Z.locals&&fn.Z.locals;var hn=n(9144),mn={};mn.styleTagTransform=we(),mn.setAttributes=ve(),mn.insert=me().bind(null,"head"),mn.domAPI=pe(),mn.insertStyleElement=ye();de()(hn.Z,mn),hn.Z&&hn.Z.locals&&hn.Z.locals;var gn=["suggestedBindings","startBoundElement","cursorButton","scrollX","scrollY"],vn=["canvas","appState"],bn=["canvas","appState"];function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var xn=function(e){var t=e.UIOptions;return(0,I.jsxs)(cn.Z,{__fallback:!0,children:[(0,I.jsx)(cn.Z.DefaultItems.LoadScene,{}),(0,I.jsx)(cn.Z.DefaultItems.SaveToActiveFile,{}),t.canvasActions.export&&(0,I.jsx)(cn.Z.DefaultItems.Export,{}),t.canvasActions.saveAsImage&&(0,I.jsx)(cn.Z.DefaultItems.SaveAsImage,{}),(0,I.jsx)(cn.Z.DefaultItems.Help,{}),(0,I.jsx)(cn.Z.DefaultItems.ClearCanvas,{}),(0,I.jsx)(cn.Z.Separator,{}),(0,I.jsx)(cn.Z.Group,{title:"Excalidraw links",children:(0,I.jsx)(cn.Z.DefaultItems.Socials,{})}),(0,I.jsx)(cn.Z.Separator,{}),(0,I.jsx)(cn.Z.DefaultItems.ToggleTheme,{}),(0,I.jsx)(cn.Z.DefaultItems.ChangeCanvasBackground,{})]})},wn=function(e){var t,n,r=e.actionManager,o=e.appState,i=e.files,a=e.setAppState,l=e.elements,c=e.canvas,s=e.onLockToggle,u=e.onHandToolToggle,d=e.onPenModeToggle,f=e.showExitZenModeBtn,h=e.renderTopRightUI,m=e.renderCustomStats,g=e.UIOptions,v=e.onImageAction,b=e.onExportImage,y=e.renderWelcomeScreen,w=e.children,k=lr(),j=(0,St.ZC)(),O=function(){return g.canvasActions.export?(0,I.jsx)(Qt,{elements:l,appState:o,files:i,actionManager:r,exportOpts:g.canvasActions.export,canvas:c,setAppState:a}):null},_=function(){return g.canvasActions.saveAsImage?(0,I.jsx)(rt,{elements:l,appState:o,files:i,actionManager:r,onExportImage:b,onCloseRequest:function(){return a({openDialog:null})}}):null},C=function(){return(0,I.jsx)(dn.O,{__fallback:!0,onDock:function(e){(0,L.L)("sidebar","toggleDock (".concat(e?"dock":"undock",")"),"(".concat(k.isMobile?"mobile":"desktop",")"))}})},M=(0,ln.Dv)(on.t6,an.yE),D=(0,I.jsxs)(I.Fragment,{children:[w,(0,I.jsx)(xn,{UIOptions:g}),(0,I.jsx)(dn.O.Trigger,{__fallback:!0,icon:E.Vq,title:(0,P.Oo)((0,S.t)("toolBar.library")),onToggle:function(e){e&&(0,L.L)("sidebar","".concat(T.Cc.name," (open)"),"button (".concat(k.isMobile?"mobile":"desktop",")"))},tab:T.Cc.defaultTab,children:(0,S.t)("toolBar.library")}),o.isLoading&&(0,I.jsx)(dt.z,{delay:250}),o.errorMessage&&(0,I.jsx)(Ke,{onClose:function(){return a({errorMessage:null})},children:o.errorMessage}),"help"===o.openDialog&&(0,I.jsx)(Yt,{onClose:function(){a({openDialog:null})}}),(0,I.jsx)(sn.o,{}),_(),O(),o.pasteDialog.shown&&(0,I.jsx)(Dt,{setAppState:a,appState:o,onClose:function(){return a({pasteDialog:{shown:!1,data:null}})}}),k.isMobile&&(0,I.jsx)(_t,{appState:o,elements:l,actionManager:r,renderJSONExportDialog:O,renderImageExportDialog:_,setAppState:a,onLockToggle:s,onHandToolToggle:u,onPenModeToggle:d,canvas:c,onImageAction:v,renderTopRightUI:h,renderCustomStats:m,renderSidebars:C,device:k,renderWelcomeScreen:y}),!k.isMobile&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)("div",{className:(0,x.Z)("layer-ui__wrapper",{"disable-pointerEvents":o.draggingElement||o.resizingElement||o.editingElement&&!(0,U.iB)(o.editingElement)}),style:o.openSidebar&&M&&k.canDeviceFitSidebar?{width:"calc(100% - ".concat(T.EE,"px)")}:{},children:[y&&(0,I.jsx)(j.WelcomeScreenCenterTunnel.Out,{}),(n=(0,U.RT)(o,l),(0,I.jsx)(at,{side:"top",children:(0,I.jsxs)("div",{className:"App-menu App-menu_top",children:[(0,I.jsxs)(Ce.Z.Col,{gap:6,className:(0,x.Z)("App-menu_top__left",{"disable-pointerEvents":o.zenModeEnabled}),children:[(0,I.jsxs)("div",{style:{position:"relative"},children:[(0,I.jsx)(j.MainMenuTunnel.Out,{}),y&&(0,I.jsx)(j.WelcomeScreenMenuHintTunnel.Out,{})]}),n&&(0,I.jsx)(vt,{heading:"selectedShapeActions",className:(0,x.Z)("selected-shape-actions zen-mode-transition",{"transition-left":o.zenModeEnabled}),children:(0,I.jsx)(ut.W,{className:T.$C.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:"".concat(o.height-166,"px")},children:(0,I.jsx)(ze,{appState:o,elements:l,renderAction:r.renderAction})})})]}),!o.viewModeEnabled&&(0,I.jsx)(vt,{heading:"shapes",className:"shapes-section",children:function(e){return(0,I.jsxs)("div",{style:{position:"relative"},children:[y&&(0,I.jsx)(j.WelcomeScreenToolbarHintTunnel.Out,{}),(0,I.jsx)(Ce.Z.Col,{gap:4,align:"start",children:(0,I.jsx)(Ce.Z.Row,{gap:1,className:(0,x.Z)("App-toolbar-container",{"zen-mode":o.zenModeEnabled}),children:(0,I.jsxs)(ut.W,{padding:1,className:(0,x.Z)("App-toolbar",{"zen-mode":o.zenModeEnabled}),children:[(0,I.jsx)(st,{appState:o,elements:l,isMobile:k.isMobile,device:k}),e,(0,I.jsxs)(Ce.Z.Row,{gap:1,children:[(0,I.jsx)(yt,{zenModeEnabled:o.zenModeEnabled,checked:o.penMode,onChange:d,title:(0,S.t)("toolBar.penMode"),penDetected:o.penDetected}),(0,I.jsx)(pt,{checked:o.activeTool.locked,onChange:s,title:(0,S.t)("toolBar.lock")}),(0,I.jsx)("div",{className:"App-toolbar__divider"}),(0,I.jsx)(jt,{checked:(0,N.l$)(o),onChange:function(){return u()},title:(0,S.t)("toolBar.hand"),isMobile:!0}),(0,I.jsx)(Ne,{appState:o,canvas:c,activeTool:o.activeTool,setAppState:a,onImageAction:function(e){var t=e.pointerType;v({insertOnCanvasDirectly:"mouse"!==t})}})]})]})})})]})}}),(0,I.jsxs)("div",{className:(0,x.Z)("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":o.zenModeEnabled}),children:[(0,I.jsx)(Vt.Z,{collaborators:o.collaborators}),null==h?void 0:h(k.isMobile,o),!o.viewModeEnabled&&(!M||(null===(t=o.openSidebar)||void 0===t?void 0:t.name)!==T.Cc.name)&&(0,I.jsx)(j.DefaultSidebarTriggerTunnel.Out,{})]})]})})),(0,I.jsx)(rn,{appState:o,actionManager:r,showExitZenModeBtn:f,renderWelcomeScreen:y}),o.showStats&&(0,I.jsx)(Et,{appState:o,setAppState:a,elements:l,onClose:function(){r.executeAction(en.u)},renderCustomStats:m}),o.scrolledOutside&&(0,I.jsx)("button",{className:"scroll-back-to-content",onClick:function(){a((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,ie.W)(l,e,c))}))},children:(0,S.t)("buttons.scrollBackToContent")})]}),C()]})]});return(0,I.jsx)(un.k.Provider,{value:o,children:(0,I.jsx)(ln.zt,{scope:j.jotaiScope,children:(0,I.jsx)(St.A3.Provider,{value:j,children:D})})})},kn=function(e){e.suggestedBindings,e.startBoundElement,e.cursorButton,e.scrollX,e.scrollY;return(0,_e.Z)(e,gn)},En=function(e,t){if(e.children!==t.children)return!1;e.canvas;var n=e.appState,r=(0,_e.Z)(e,vn),o=(t.canvas,t.appState),i=(0,_e.Z)(t,bn);return(0,P.w8)(kn(n),kn(o),{selectedElementIds:P.w8,selectedGroupIds:P.w8})&&(0,P.w8)(r,i)},jn=v().memo(wn,En),Sn=n(9650),On={};On.styleTagTransform=we(),On.setAttributes=ve(),On.insert=me().bind(null,"head"),On.domAPI=pe(),On.insertStyleElement=ye();de()(Sn.Z,On),Sn.Z&&Sn.Z.locals&&Sn.Z.locals;var _n=function(e){var t=e.message,n=e.onClose,r=e.closable,o=void 0!==r&&r,i=e.duration,a=void 0===i?5e3:i,l=(0,g.useRef)(0),c=a!==1/0,s=(0,g.useCallback)((function(){c&&(l.current=window.setTimeout((function(){return n()}),a))}),[n,a,c]);(0,g.useEffect)((function(){if(c)return s(),function(){return clearTimeout(l.current)}}),[s,t,a,c]);var u=c?function(){return clearTimeout(null==l?void 0:l.current)}:void 0,d=c?s:void 0;return(0,I.jsxs)("div",{className:"Toast",onMouseEnter:u,onMouseLeave:d,children:[(0,I.jsx)("p",{className:"Toast__message",children:t}),o&&(0,I.jsx)(j.V,{icon:E.Tw,"aria-label":"close",type:"icon",onClick:n,className:"close"})]})};function Cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tn=(0,z.z)({name:"viewMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(e){return!e.viewModeEnabled}},perform:function(e,t){return{appState:Pn(Pn({},t),{},{viewModeEnabled:!this.checked(t)}),commitToHistory:!1}},checked:function(e){return e.viewModeEnabled},predicate:function(e,t,n){return void 0===n.viewModeEnabled},contextItemLabel:"labels.viewMode",keyTest:function(e){return!e[O.tW.CTRL_OR_CMD]&&e.altKey&&e.code===O.aU.R}}),In=n(5637),Mn=n(200),Dn=n.n(Mn),An=n(2325),Ln=n(4929),Zn=n(267),Rn=n(3248);function zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Nn=(0,c.Z)((function e(t){var n=this,r=t.scene,o=t.onSceneUpdated;(0,l.Z)(this,e),this.onFontsLoaded=function(t){if(t.every((function(t){var n="".concat(t.family,"-").concat(t.style,"-").concat(t.weight);return!!e.loadedFontFaces.has(n)||(e.loadedFontFaces.add(n),!1)})))return!1;var r=!1;n.scene.mapElements((function(e){return(0,U.iB)(e)&&!(0,V.Xh)(e)?((0,oe.bI)(e),r=!0,(0,_.BE)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,U.JZ)(e)))):e})),r&&n.onSceneUpdated()},this.loadFontsForElements=function(){var e=(0,a.Z)(m().mark((function e(t){var r;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all((0,i.Z)(new Set(t.filter((function(e){return(0,U.iB)(e)})).map((function(e){return e.fontFamily})))).map((function(e){var t,n,r,o,i=(0,P.mO)({fontFamily:e,fontSize:16});if(null===(t=document.fonts)||void 0===t||null===(n=t.check)||void 0===n||!n.call(t,i))return null===(r=document.fonts)||void 0===r||null===(o=r.load)||void 0===o?void 0:o.call(r,i)})));case 2:r=e.sent,n.onFontsLoaded(r.flat().filter(Boolean));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.scene=r,this.onSceneUpdated=o}));Nn.loadedFontFaces=new Set;var Bn=n(4688),Hn=n(2416),Wn=n(202),Fn=n(2242),Un=function(){return(0,I.jsxs)("div",{"data-testid":"brave-measure-text-error",children:[(0,I.jsx)("p",{children:(0,I.jsx)(Fn.Z,{i18nKey:"errors.brave_measure_text_error.line1",bold:function(e){return(0,I.jsx)("span",{style:{fontWeight:600},children:e})}})}),(0,I.jsx)("p",{children:(0,I.jsx)(Fn.Z,{i18nKey:"errors.brave_measure_text_error.line2",bold:function(e){return(0,I.jsx)("span",{style:{fontWeight:600},children:e})}})}),(0,I.jsx)("p",{children:(0,I.jsx)(Fn.Z,{i18nKey:"errors.brave_measure_text_error.line3",link:function(e){return(0,I.jsx)("a",{href:"http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser",children:e})}})}),(0,I.jsx)("p",{children:(0,I.jsx)(Fn.Z,{i18nKey:"errors.brave_measure_text_error.line4",issueLink:function(e){return(0,I.jsx)("a",{href:"https://github.com/excalidraw/excalidraw/issues/new",children:e})},discordLink:function(e){return(0,I.jsxs)("a",{href:"https://discord.gg/UexuTaE",children:[e,"."]})}})})]})};function Kn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Yn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.Z)(e);if(t){var o=(0,f.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,d.Z)(this,n)}}function Gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qn=v().createContext(null),$n=v().createContext(null),Jn={isSmScreen:!1,isMobile:!1,isTouchScreen:!1,canDeviceFitSidebar:!1,isLandscape:!1},Qn=v().createContext(Jn);Qn.displayName="DeviceContext";var er=v().createContext({container:null,id:null});er.displayName="ExcalidrawContainerContext";var tr=v().createContext([]);tr.displayName="ExcalidrawElementsContext";var nr=v().createContext(Xn(Xn({},(0,N.im)()),{},{width:0,height:0,offsetLeft:0,offsetTop:0}));nr.displayName="ExcalidrawAppStateContext";var rr=v().createContext((function(){console.warn("unitialized ExcalidrawSetAppStateContext context!")}));rr.displayName="ExcalidrawSetAppStateContext";var or=v().createContext(null);or.displayName="ExcalidrawActionManagerContext";var ir=function(){return(0,g.useContext)(qn)},ar=function(){return(0,g.useContext)($n)},lr=function(){return(0,g.useContext)(Qn)},cr=function(){return(0,g.useContext)(er)},sr=function(){return(0,g.useContext)(tr)},ur=function(){return(0,g.useContext)(nr)},dr=function(){return(0,g.useContext)(rr)},fr=function(){return(0,g.useContext)(or)},pr=!1,hr=0,mr=0,gr=0,vr=!1,br=!1,yr=!1,xr={horizontal:null,vertical:null},wr=0,kr=!1,Er=!0,jr=!1,Sr=0,Or=!1,_r=null,Cr={pointers:new Map,lastCenter:null,initialDistance:null,initialScale:null},Pr=function(e){(0,u.Z)(d,e);var t,n,r=Vn(d);function d(e){var t;(0,l.Z)(this,d),t=r.call(this,e),Tr.call((0,s.Z)(t));var n,o=(0,N.im)(),i=e.excalidrawRef,a=e.viewModeEnabled,c=void 0!==a&&a,u=e.zenModeEnabled,f=void 0!==u&&u,p=e.gridModeEnabled,h=void 0!==p&&p,m=e.theme,g=void 0===m?o.theme:m,v=e.name,b=void 0===v?o.name:v;if(t.state=Xn(Xn(Xn({},o),{},{theme:g,isLoading:!0},t.getCanvasOffsets()),{},{viewModeEnabled:c,zenModeEnabled:f,gridSize:h?T.k:null,name:b,width:window.innerWidth,height:window.innerHeight,showHyperlinkPopup:!1,defaultSidebarDockedPreference:!1}),t.id=(0,w.x0)(),t.library=new W.ZP((0,s.Z)(t)),i){var y,x="current"in i&&(null===(y=i.current)||void 0===y?void 0:y.readyPromise)||(0,P.PI)(),k={ready:!0,readyPromise:x,updateScene:t.updateScene,updateLibrary:t.library.updateLibrary,addFiles:t.addFiles,resetScene:t.resetScene,getSceneElementsIncludingDeleted:t.getSceneElementsIncludingDeleted,history:{clear:t.resetHistory},scrollToContent:t.scrollToContent,getSceneElements:t.getSceneElements,getAppState:function(){return t.state},getFiles:function(){return t.files},refresh:t.refresh,setToast:t.setToast,id:t.id,setActiveTool:t.setActiveTool,setCursor:t.setCursor,resetCursor:t.resetCursor,toggleSidebar:t.toggleSidebar};"function"==typeof i?i(k):i.current=k,x.resolve(k)}return t.excalidrawContainerValue={container:t.excalidrawContainerRef.current,id:t.id},t.scene=new ae.Z,t.fonts=new Nn({scene:t.scene,onSceneUpdated:t.onSceneUpdated}),t.history=new te,t.actionManager=new R(t.syncActionResult,(function(){return t.state}),(function(){return t.scene.getElementsIncludingDeleted()}),(0,s.Z)(t)),t.actionManager.registerAll(z.N),t.actionManager.registerAction((n=t.history,{name:"undo",trackEvent:{category:"history"},perform:function(e,t){return A(e,t,(function(){return n.undoOnce()}))},keyTest:function(e){return e[O.tW.CTRL_OR_CMD]&&e.key.toLowerCase()===O.tW.Z&&!e.shiftKey},PanelComponent:function(e){var t=e.updateData,n=e.data;return(0,I.jsx)(j.V,{type:"button",icon:E.UE,"aria-label":(0,S.t)("buttons.undo"),onClick:t,size:(null==n?void 0:n.size)||"medium"})},commitToHistory:function(){return!1}})),t.actionManager.registerAction(function(e){return{name:"redo",trackEvent:{category:"history"},perform:function(t,n){return A(t,n,(function(){return e.redoOnce()}))},keyTest:function(e){return e[O.tW.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===O.tW.Z||T.ED&&e.ctrlKey&&!e.shiftKey&&e.key===O.tW.Y},PanelComponent:function(e){var t=e.updateData,n=e.data;return(0,I.jsx)(j.V,{type:"button",icon:E.zG,"aria-label":(0,S.t)("buttons.redo"),onClick:t,size:(null==n?void 0:n.size)||"medium"})},commitToHistory:function(){return!1}}}(t.history)),t}return(0,c.Z)(d,[{key:"renderCanvas",value:function(){var e=window.devicePixelRatio,t=this.state,n=t.width,r=t.height,o=n*e,i=r*e;return t.viewModeEnabled?(0,I.jsx)("canvas",{className:"excalidraw__canvas",style:{width:n,height:r,cursor:T.oc.GRAB},width:o,height:i,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,children:(0,S.t)("labels.drawingCanvas")}):(0,I.jsx)("canvas",{className:"excalidraw__canvas",style:{width:n,height:r},width:o,height:i,ref:this.handleCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerDown:this.handleCanvasPointerDown,onDoubleClick:this.handleCanvasDoubleClick,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,children:(0,S.t)("labels.drawingCanvas")})}},{key:"render",value:function(){var e,t=this,n=(0,ie.eD)(this.scene.getNonDeletedElements(),this.state),r=this.props,o=r.renderTopRightUI,i=r.renderCustomStats;return(0,I.jsx)("div",{className:(0,x.Z)("excalidraw excalidraw-container",{"excalidraw--view-mode":this.state.viewModeEnabled,"excalidraw--mobile":this.device.isMobile}),ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,children:(0,I.jsx)(qn.Provider,{value:this,children:(0,I.jsx)($n.Provider,{value:this.props,children:(0,I.jsx)(er.Provider,{value:this.excalidrawContainerValue,children:(0,I.jsx)(Qn.Provider,{value:this.device,children:(0,I.jsx)(rr.Provider,{value:this.setAppState,children:(0,I.jsx)(nr.Provider,{value:this.state,children:(0,I.jsx)(tr.Provider,{value:this.scene.getNonDeletedElements(),children:(0,I.jsxs)(or.Provider,{value:this.actionManager,children:[(0,I.jsx)(jn,{canvas:this.canvas,appState:this.state,files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onHandToolToggle:this.onHandToolToggle,langCode:(0,S.G3)().code,renderTopRightUI:o,renderCustomStats:i,showExitZenModeBtn:void 0===(null===(e=this.props)||void 0===e?void 0:e.zenModeEnabled)&&this.state.zenModeEnabled,UIOptions:this.props.UIOptions,onImageAction:this.onImageAction,onExportImage:this.onExportImage,renderWelcomeScreen:!this.state.isLoading&&this.state.showWelcomeScreen&&"selection"===this.state.activeTool.type&&!this.scene.getElementsIncludingDeleted().length,children:this.props.children}),(0,I.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,I.jsx)("div",{className:"excalidraw-contextMenuContainer"}),1===n.length&&!this.state.contextMenu&&this.state.showHyperlinkPopup&&(0,I.jsx)(Ln.nW,{element:n[0],setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen},n[0].id),null!==this.state.toast&&(0,I.jsx)(_n,{message:this.state.toast.message,onClose:function(){return t.setToast(null)},duration:this.state.toast.duration,closable:this.state.toast.closable}),this.state.contextMenu&&(0,I.jsx)(Oe,{items:this.state.contextMenu.items,top:this.state.contextMenu.top,left:this.state.contextMenu.left,actionManager:this.actionManager}),(0,I.jsx)("main",{children:this.renderCanvas()})]})})})})})})})})})}},{key:"componentDidMount",value:(n=(0,a.Z)(m().mark((function e(){var t,n,r,o,i,a,l=this;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.unmounted=!1,this.excalidrawContainerValue.container=this.excalidrawContainerRef.current,"production"!==T.Vi.TEST&&"production"!==T.Vi.DEVELOPMENT||(this.setState.bind(this),Object.defineProperties(window.h,{state:{configurable:!0,get:function(){return l.state}},setState:{configurable:!0,value:function(){return l.setState.apply(l,arguments)}},app:{configurable:!0,value:this},history:{configurable:!0,value:this.history}})),this.scene.addCallback(this.onSceneUpdated),this.addEventListeners(),this.props.autoFocus&&this.excalidrawContainerRef.current&&this.focusContainer(),this.excalidrawContainerRef.current&&this.refreshDeviceState(this.excalidrawContainerRef.current),"ResizeObserver"in window&&null!==(t=this.excalidrawContainerRef)&&void 0!==t&&t.current?(this.resizeObserver=new ResizeObserver((function(){Er=!1,l.refreshDeviceState(l.excalidrawContainerRef.current),l.updateDOMRect()})),null===(n=this.resizeObserver)||void 0===n||n.observe(this.excalidrawContainerRef.current)):window.matchMedia&&(r=window.matchMedia("(max-width: ".concat(T.kV,"px), (max-height: ").concat(T.Yx,"px) and (max-width: ").concat(T.sS,"px)")),o=window.matchMedia("(max-width: ".concat(T.eF,"px)")),i=window.matchMedia("(min-width: ".concat(null!=this.props.UIOptions.dockedSidebarBreakpoint?this.props.UIOptions.dockedSidebarBreakpoint:T.sk,"px)")),a=function(){l.excalidrawContainerRef.current.getBoundingClientRect(),l.device=(0,P.v4)(l.device,{isSmScreen:o.matches,isMobile:r.matches,canDeviceFitSidebar:i.matches})},r.addListener(a),this.detachIsMobileMqHandler=function(){return r.removeListener(a)}),new URLSearchParams(window.location.search.slice(1)).has("web-share-target")?this.restoreFileFromShare():this.updateDOMRect(this.initializeScene),(0,T.jP)()&&!(0,Ie.eB)()&&this.setState({errorMessage:(0,I.jsx)(Un,{})});case 11:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){var e;this.files={},this.imageCache.clear(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.unmounted=!0,this.removeEventListeners(),this.scene.destroy(),clearTimeout(wr),wr=0}},{key:"removeEventListeners",value:function(){var e,t,n,r,o;document.removeEventListener(T.Ks.POINTER_UP,this.removePointer),document.removeEventListener(T.Ks.COPY,this.onCopy),document.removeEventListener(T.Ks.PASTE,this.pasteFromClipboard),document.removeEventListener(T.Ks.CUT,this.onCut),null===(e=this.excalidrawContainerRef.current)||void 0===e||e.removeEventListener(T.Ks.WHEEL,this.onWheel),null===(t=this.nearestScrollableContainer)||void 0===t||t.removeEventListener(T.Ks.SCROLL,this.onScroll),document.removeEventListener(T.Ks.KEYDOWN,this.onKeyDown,!1),document.removeEventListener(T.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition,!1),document.removeEventListener(T.Ks.KEYUP,this.onKeyUp),window.removeEventListener(T.Ks.RESIZE,this.onResize,!1),window.removeEventListener(T.Ks.UNLOAD,this.onUnload,!1),window.removeEventListener(T.Ks.BLUR,this.onBlur,!1),null===(n=this.excalidrawContainerRef.current)||void 0===n||n.removeEventListener(T.Ks.DRAG_OVER,this.disableEvent,!1),null===(r=this.excalidrawContainerRef.current)||void 0===r||r.removeEventListener(T.Ks.DROP,this.disableEvent,!1),document.removeEventListener(T.Ks.GESTURE_START,this.onGestureStart,!1),document.removeEventListener(T.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.removeEventListener(T.Ks.GESTURE_END,this.onGestureEnd,!1),null===(o=this.detachIsMobileMqHandler)||void 0===o||o.call(this)}},{key:"addEventListeners",value:function(){var e,t,n,r,o,i=this;this.removeEventListeners(),document.addEventListener(T.Ks.POINTER_UP,this.removePointer),document.addEventListener(T.Ks.COPY,this.onCopy),null===(e=this.excalidrawContainerRef.current)||void 0===e||e.addEventListener(T.Ks.WHEEL,this.onWheel,{passive:!1}),this.props.handleKeyboardGlobally&&document.addEventListener(T.Ks.KEYDOWN,this.onKeyDown,!1),document.addEventListener(T.Ks.KEYUP,this.onKeyUp,{passive:!0}),document.addEventListener(T.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition),null===(t=document.fonts)||void 0===t||null===(n=t.addEventListener)||void 0===n||n.call(t,"loadingdone",(function(e){var t=e.fontfaces;i.fonts.onFontsLoaded(t)})),document.addEventListener(T.Ks.GESTURE_START,this.onGestureStart,!1),document.addEventListener(T.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.addEventListener(T.Ks.GESTURE_END,this.onGestureEnd,!1),this.state.viewModeEnabled||(document.addEventListener(T.Ks.PASTE,this.pasteFromClipboard),document.addEventListener(T.Ks.CUT,this.onCut),this.props.detectScroll&&(this.nearestScrollableContainer=(0,P.Ip)(this.excalidrawContainerRef.current),this.nearestScrollableContainer.addEventListener(T.Ks.SCROLL,this.onScroll)),window.addEventListener(T.Ks.RESIZE,this.onResize,!1),window.addEventListener(T.Ks.UNLOAD,this.onUnload,!1),window.addEventListener(T.Ks.BLUR,this.onBlur,!1),null===(r=this.excalidrawContainerRef.current)||void 0===r||r.addEventListener(T.Ks.DRAG_OVER,this.disableEvent,!1),null===(o=this.excalidrawContainerRef.current)||void 0===o||o.addEventListener(T.Ks.DROP,this.disableEvent,!1))}},{key:"componentDidUpdate",value:function(e,t){var n,r,o,i=this;(this.state.showWelcomeScreen||this.scene.getElementsIncludingDeleted().length||this.setState({showWelcomeScreen:!0}),this.excalidrawContainerRef.current&&e.UIOptions.dockedSidebarBreakpoint!==this.props.UIOptions.dockedSidebarBreakpoint&&this.refreshDeviceState(this.excalidrawContainerRef.current),t.scrollX!==this.state.scrollX||t.scrollY!==this.state.scrollY)&&(null===(r=this.props)||void 0===r||null===(o=r.onScrollChange)||void 0===o||o.call(r,this.state.scrollX,this.state.scrollY));Object.keys(this.state.selectedElementIds).length&&(0,N.EN)(this.state)&&this.setState({activeTool:(0,P.Om)(this.state,{type:"selection"})}),"eraser"===this.state.activeTool.type&&t.theme!==this.state.theme&&(0,P.OF)(this.canvas,this.state.theme),"selection"===t.activeTool.type&&"selection"!==this.state.activeTool.type&&this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1}),e.langCode!==this.props.langCode&&this.updateLanguage(),e.viewModeEnabled!==this.props.viewModeEnabled&&this.setState({viewModeEnabled:!!this.props.viewModeEnabled}),t.viewModeEnabled!==this.state.viewModeEnabled&&(this.addEventListeners(),this.deselectElements()),e.zenModeEnabled!==this.props.zenModeEnabled&&this.setState({zenModeEnabled:!!this.props.zenModeEnabled}),e.theme!==this.props.theme&&this.props.theme&&this.setState({theme:this.props.theme}),e.gridModeEnabled!==this.props.gridModeEnabled&&this.setState({gridSize:this.props.gridModeEnabled?T.k:null}),this.props.name&&e.name!==this.props.name&&this.setState({name:this.props.name}),null===(n=this.excalidrawContainerRef.current)||void 0===n||n.classList.toggle("theme--dark","dark"===this.state.theme),this.state.editingLinearElement&&!this.state.selectedElementIds[this.state.editingLinearElement.elementId]&&setTimeout((function(){i.state.editingLinearElement&&i.actionManager.executeAction(k.pL)})),this.state.selectedLinearElement&&!this.state.selectedElementIds[this.state.selectedLinearElement.elementId]&&this.setState({selectedLinearElement:null});var a,l,c=t.multiElement;(t.activeTool!==this.state.activeTool&&null!=c&&(0,C.N1)(this.state)&&(0,V.Mn)(c,!1)&&(0,C.R)(c,this.state,this.scene,(0,P.AK)(K._.getPointAtIndexGlobalCoordinates(c,-1))),this.renderScene(),this.history.record(this.state,this.scene.getElementsIncludingDeleted()),this.state.isLoading)||(null===(a=(l=this.props).onChange)||void 0===a||a.call(l,this.scene.getElementsIncludingDeleted(),this.state,this.files))}},{key:"addTextFromPaste",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,P.dE)({clientX:mr,clientY:gr},this.state),r=n.x,o=n.y,a={x:r,y:o,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roundness:null,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,text:e,fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily,textAlign:this.state.currentItemTextAlign,verticalAlign:T.hs,locked:!1},l=10,c=o,s=t?[e]:e.split("\n"),u=s.reduce((function(e,t,n){var o=t.trim(),i=(0,Ie.PT)(a.fontFamily);if(o.length){var u=(0,U.VL)(Xn(Xn({},a),{},{x:r,y:c,text:o,lineHeight:i}));e.push(u),c+=u.height+l}else{var d;(null===(d=s[n-1])||void 0===d?void 0:d.trim())&&(c+=(0,Ie.Rg)(a.fontSize,i)+l)}return e}),[]);0!==u.length&&(this.scene.replaceAllElements([].concat((0,i.Z)(this.scene.getElementsIncludingDeleted()),(0,i.Z)(u))),this.setState({selectedElementIds:Object.fromEntries(u.map((function(e){return[e.id,!0]})))}),!t&&u.length>1&&!1===Or&&!this.device.isMobile&&(this.setToast({message:(0,S.t)("toast.pasteAsSingleElement",{shortcut:(0,P.uY)("CtrlOrCmd+Shift+V")}),duration:5e3}),Or=!0),this.history.resumeRecording())}},{key:"handleTextWysiwyg",value:function(e,t){var n=this,r=t.isExistingElement,o=void 0!==r&&r,a=function(t,r,o){n.scene.replaceAllElements((0,i.Z)(n.scene.getElementsIncludingDeleted().map((function(n){return n.id===e.id&&(0,U.iB)(n)?(0,U.N_)(n,{text:t,isDeleted:o,originalText:r}):n}))))};(0,U.b_)({id:e.id,canvas:this.canvas,getViewportCoords:function(e,t){var r=(0,P._i)({sceneX:e,sceneY:t},n.state),o=r.x,i=r.y;return[o-n.state.offsetLeft,i-n.state.offsetTop]},onChange:(0,P.tH)((function(t){a(t,t,!1),(0,U.qP)(e)&&(0,C.Ww)(e)})),onSubmit:(0,P.tH)((function(t){var r=t.text,i=t.viaKeyboard,l=t.originalText,c=!r.trim();if(a(r,l,c),!c&&i){var s=e.containerId?e.containerId:e.id;n.setState((function(e){return{selectedElementIds:Xn(Xn({},e.selectedElementIds),{},(0,p.Z)({},s,!0))}}))}c&&(0,C.$q)(n.scene.getNonDeletedElements(),[e]),c&&!o||n.history.resumeRecording(),n.setState({draggingElement:null,editingElement:null}),n.state.activeTool.locked&&(0,P.Uk)(n.canvas,n.state),n.focusContainer()})),element:e,excalidrawContainer:this.excalidrawContainerRef.current,app:this}),this.deselectElements(),a(e.text,e.originalText,!1)}},{key:"deselectElements",value:function(){this.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}},{key:"getTextElementAtPosition",value:function(e,t){var n=this.getElementAtPosition(e,t,{includeBoundTextElement:!0});return n&&(0,U.iB)(n)&&!n.isDeleted?n:null}},{key:"getElementAtPosition",value:function(e,t,n){var r=this.getElementsAtPosition(e,t,null==n?void 0:n.includeBoundTextElement,null==n?void 0:n.includeLockedElements);if(r.length>1){if(null!=n&&n.preferSelected)for(var o=r.length-1;o>-1;o--)if(this.state.selectedElementIds[r[o].id])return r[o];var i=r[r.length-1];return(0,U.wB)(i,this.state,e,t)?r[r.length-2]:i}return 1===r.length?r[0]:null}},{key:"getElementsAtPosition",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=r&&o?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter((function(e){return(o||!e.locked)&&(r||!((0,U.iB)(e)&&e.containerId))}));return(0,ie.CJ)(i,(function(r){return(0,U.wX)(r,n.state,e,t)}))}},{key:"handleHoverSelectedLinearElement",value:function(e,t,n){var r=K._.getElement(e.elementId),o=(0,Ie.WJ)(r);if(r)if(this.state.selectedLinearElement){var i=-1,a=null;(0,An.Qu)(r,this.state,[t,n])?(i=K._.getPointIndexUnderCursor(r,this.state.zoom,t,n),a=K._.getSegmentMidpointHitCoords(e,{x:t,y:n},this.state),i>=0||a?(0,P.KJ)(this.canvas,T.oc.POINTER):(0,P.KJ)(this.canvas,T.oc.MOVE)):((0,Zn.oY)([r],this.state)&&(0,U.wB)(r,this.state,t,n)||o&&(0,U.wX)(o,this.state,t,n))&&(0,P.KJ)(this.canvas,T.oc.MOVE),this.state.selectedLinearElement.hoverPointIndex!==i&&this.setState({selectedLinearElement:Xn(Xn({},this.state.selectedLinearElement),{},{hoverPointIndex:i})}),K._.arePointsEqual(this.state.selectedLinearElement.segmentMidPointHoveredCoords,a)||this.setState({selectedLinearElement:Xn(Xn({},this.state.selectedLinearElement),{},{segmentMidPointHoveredCoords:a})})}else(0,P.KJ)(this.canvas,T.oc.AUTO)}},{key:"maybeCleanupAfterMissingPointerUp",value:function(e){null!==_r&&_r(e)}},{key:"updateGestureOnPointerDown",value:function(e){Cr.pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),2===Cr.pointers.size&&(Cr.lastCenter=G(Cr.pointers),Cr.initialScale=this.state.zoom.value,Cr.initialDistance=X(Array.from(Cr.pointers.values())))}},{key:"initialPointerDownState",value:function(e){var t=(0,P.dE)(e,this.state),n=(0,ie.eD)(this.scene.getNonDeletedElements(),this.state),r=(0,U.KP)(n),i=(0,o.Z)(r,4),a=i[0],l=i[1],c=i[2],s=i[3];return{origin:t,withCmdOrCtrl:e[O.tW.CTRL_OR_CMD],originInGrid:(0,P.AK)((0,ne.wC)(t.x,t.y,this.state.gridSize)),scrollbars:(0,ie._4)(xr,e.clientX-this.state.offsetLeft,e.clientY-this.state.offsetTop),lastCoords:Xn({},t),originalElements:this.scene.getNonDeletedElements().reduce((function(e,t){return e.set(t.id,(0,Y.OL)(t)),e}),new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(c+a)/2,y:(s+l)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(t,n)},drag:{hasOccurred:!1,offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1},elementIdsToErase:{}}}},{key:"handleDraggingScrollBar",value:function(e,t){var n=this;if(!t.scrollbars.isOverEither||this.state.multiElement)return!1;yr=!0,t.lastCoords.x=e.clientX,t.lastCoords.y=e.clientY;var r=(0,P.$9)((function(e){e.target instanceof HTMLElement&&n.handlePointerMoveOverScrollbars(e,t)})),o=(0,P.tH)((function(){yr=!1,(0,P.Uk)(n.canvas,n.state),_r=null,n.setState({cursorButton:"up"}),n.savePointer(e.clientX,e.clientY,"up"),window.removeEventListener(T.Ks.POINTER_MOVE,r),window.removeEventListener(T.Ks.POINTER_UP,o),r.flush()}));return _r=o,window.addEventListener(T.Ks.POINTER_MOVE,r),window.addEventListener(T.Ks.POINTER_UP,o),!0}},{key:"isASelectedElement",value:function(e){return null!=e&&this.state.selectedElementIds[e.id]}},{key:"isHittingCommonBoundingBoxOfSelectedElements",value:function(e,t){if(t.length<2)return!1;var n=10/this.state.zoom.value,r=(0,U.KP)(t),i=(0,o.Z)(r,4),a=i[0],l=i[1],c=i[2],s=i[3];return e.x>a-n&&e.x<c+n&&e.y>l-n&&e.y<s+n}},{key:"onKeyDownFromPointerDownHandler",value:function(e){var t=this;return(0,P.tH)((function(n){t.maybeHandleResize(e,n)||t.maybeDragNewGenericElement(e,n)}))}},{key:"onKeyUpFromPointerDownHandler",value:function(e){var t=this;return(0,P.tH)((function(n){n.key===O.tW.ALT&&n.preventDefault(),t.maybeHandleResize(e,n)||t.maybeDragNewGenericElement(e,n)}))}},{key:"onPointerMoveFromPointerDownHandler",value:function(e){var t=this;return(0,P.$9)((function(n){var r;if(null===e.drag.offset&&(e.drag.offset=(0,P.AK)((0,U.$V)((0,ie.eD)(t.scene.getNonDeletedElements(),t.state),e.origin.x,e.origin.y))),n.target instanceof HTMLElement&&!t.handlePointerMoveOverScrollbars(n,e)){var a=(0,P.dE)(n,t.state);if((0,N.EN)(t.state))t.handleEraser(n,e,a);else{var l=(0,ne.wC)(a.x,a.y,t.state.gridSize),c=(0,o.Z)(l,2),s=c[0],u=c[1];if(e.drag.hasOccurred||"arrow"!==t.state.activeTool.type&&"line"!==t.state.activeTool.type||!((0,ne.LW)(a.x,a.y,e.origin.x,e.origin.y)<T.f)){if(e.resize.isResizing&&(e.lastCoords.x=a.x,e.lastCoords.y=a.y,t.maybeHandleResize(e,n)))return!0;if(t.state.selectedLinearElement){var d=t.state.editingLinearElement||t.state.selectedLinearElement;if(K._.shouldAddMidpoint(t.state.selectedLinearElement,a,t.state)){var f=K._.addMidpoint(t.state.selectedLinearElement,a,t.state);if(!f)return;return void(0,b.flushSync)((function(){t.state.selectedLinearElement&&t.setState({selectedLinearElement:Xn(Xn({},t.state.selectedLinearElement),{},{pointerDownState:f.pointerDownState,selectedPointsIndices:f.selectedPointsIndices})}),t.state.editingLinearElement&&t.setState({editingLinearElement:Xn(Xn({},t.state.editingLinearElement),{},{pointerDownState:f.pointerDownState,selectedPointsIndices:f.selectedPointsIndices})})}))}if(null!==d.pointerDownState.segmentMidpoint.value&&!d.pointerDownState.segmentMidpoint.added)return;var h=K._.handlePointDragging(n,t.state,a.x,a.y,(function(e,n){t.maybeSuggestBindingsForLinearElementAtCoords(e,n)}),d);if(h)return e.lastCoords.x=a.x,e.lastCoords.y=a.y,e.drag.hasOccurred=!0,t.state.editingLinearElement&&!t.state.editingLinearElement.isDragging&&t.setState({editingLinearElement:Xn(Xn({},t.state.editingLinearElement),{},{isDragging:!0})}),void(t.state.selectedLinearElement.isDragging||t.setState({selectedLinearElement:Xn(Xn({},t.state.selectedLinearElement),{},{isDragging:!0})}))}var m=e.hit.allHitElements.some((function(e){return t.isASelectedElement(e)})),g=t.state.editingLinearElement&&n.shiftKey&&t.state.editingLinearElement.elementId===(null===(r=e.hit.element)||void 0===r?void 0:r.id);if((m||e.hit.hasHitCommonBoundingBoxOfSelectedElements)&&!g){var v=(0,ie.eD)(t.scene.getNonDeletedElements(),t.state);if(v.every((function(e){return e.locked})))return;if(e.drag.hasOccurred=!0,v.length>0&&!e.withCmdOrCtrl&&!t.state.editingElement){var y=(0,ne.wC)(a.x-e.drag.offset.x,a.y-e.drag.offset.y,t.state.gridSize),x=(0,o.Z)(y,2),w=x[0],k=x[1],E=[Math.abs(a.x-e.origin.x),Math.abs(a.y-e.origin.y)],j=E[0],S=E[1],I=n.shiftKey;if((0,U.o8)(e,v,w,k,I,j,S,t.state),t.maybeSuggestBindingForAll(v),n.altKey&&!e.hit.hasBeenDuplicated){e.hit.hasBeenDuplicated=!0;var M,D=[],A=[],L=new Map,Z=new Map,R=e.hit.element,z=t.scene.getElementsIncludingDeleted(),B=(0,ie.eD)(z,t.state,!0).map((function(e){return e.id})),H=Kn(z);try{for(H.s();!(M=H.n()).done;){var W=M.value;if(B.includes(W.id)||W.id===(null==R?void 0:R.id)&&e.hit.wasAddedToSelection){var F=(0,U.Sy)(t.state.editingGroupId,L,W),Y=(0,ne.wC)(e.origin.x-e.drag.offset.x,e.origin.y-e.drag.offset.y,t.state.gridSize),G=(0,o.Z)(Y,2),X=G[0],q=G[1];(0,_.DR)(F,{x:F.x+(X-w),y:F.y+(q-k)}),D.push(F),A.push(W),Z.set(W.id,F.id)}else D.push(W)}}catch(e){H.e(e)}finally{H.f()}var J=[].concat(D,A);(0,Ie.P7)(D,A,Z),(0,C.ek)(J,A,Z,"duplicatesServeAsOld"),t.scene.replaceAllElements(J)}return}}var Q=t.state.draggingElement;if(Q){if("freedraw"===Q.type){var ee=Q.points,te=a.x-Q.x,re=a.y-Q.y,oe=ee.length>0&&ee[ee.length-1];if(!(oe&&oe[0]===te&&oe[1]===re)){var ae=Q.simulatePressure?Q.pressures:[].concat((0,i.Z)(Q.pressures),[n.pressure]);(0,_.DR)(Q,{points:[].concat((0,i.Z)(ee),[[te,re]]),pressures:ae})}}else if((0,V.bt)(Q)){e.drag.hasOccurred=!0;var le=Q.points,ce=s-Q.x,se=u-Q.y;if((0,O.Ge)(n)&&2===le.length){var ue=(0,U.o4)(Q.x,Q.y,a.x,a.y);ce=ue.width,se=ue.height}1===le.length?(0,_.DR)(Q,{points:[].concat((0,i.Z)(le),[[ce,se]])}):2===le.length&&(0,_.DR)(Q,{points:[].concat((0,i.Z)(le.slice(0,-1)),[[ce,se]])}),(0,V.Mn)(Q,!1)&&t.maybeSuggestBindingsForLinearElementAtCoords(Q,[a],t.state.startBoundElement)}else e.lastCoords.x=a.x,e.lastCoords.y=a.y,t.maybeDragNewGenericElement(e,n);if("selection"===t.state.activeTool.type){e.boxSelection.hasOccurred=!0;var de=t.scene.getNonDeletedElements();if(n.shiftKey||t.state.editingLinearElement||!(0,ie.N)(de,t.state)||(e.withCmdOrCtrl&&e.hit.element?t.setState((function(n){return(0,$.bO)(Xn(Xn({},n),{},{selectedElementIds:(0,p.Z)({},e.hit.element.id,!0)}),t.scene.getNonDeletedElements())})):t.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),t.state.editingLinearElement)K._.handleBoxSelection(n,t.state,t.setState.bind(t));else{var fe=(0,ie.Yp)(de,Q);t.setState((function(n){return(0,$.bO)(Xn(Xn({},n),{},{selectedElementIds:Xn(Xn(Xn({},n.selectedElementIds),fe.reduce((function(e,t){return e[t.id]=!0,e}),{})),e.hit.element?(0,p.Z)({},e.hit.element.id,!fe.length):null),showHyperlinkPopup:!(1!==fe.length||!fe[0].link)&&"info",selectedLinearElement:1===fe.length&&(0,V.bt)(fe[0])?new K._(fe[0],t.scene):null}),t.scene.getNonDeletedElements())}))}}}}}}}))}},{key:"handlePointerMoveOverScrollbars",value:function(e,t){if(t.scrollbars.isOverHorizontal){var n=e.clientX,r=n-t.lastCoords.x;return this.translateCanvas({scrollX:this.state.scrollX-r/this.state.zoom.value}),t.lastCoords.x=n,!0}if(t.scrollbars.isOverVertical){var o=e.clientY,i=o-t.lastCoords.y;return this.translateCanvas({scrollY:this.state.scrollY-i/this.state.zoom.value}),t.lastCoords.y=o,!0}return!1}},{key:"onPointerUpFromPointerDownHandler",value:function(e){var t=this;return(0,P.tH)((function(n){var r,o,a,l=t.state,c=l.draggingElement,s=l.resizingElement,u=l.multiElement,d=l.activeTool,f=l.isResizing,h=l.isRotating;if(t.setState({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,cursorButton:"up",editingElement:u||(0,U.iB)(t.state.editingElement)?t.state.editingElement:null}),t.savePointer(n.clientX,n.clientY,"up"),t.state.editingLinearElement)if(e.boxSelection.hasOccurred||(null===(o=e.hit)||void 0===o||null===(a=o.element)||void 0===a?void 0:a.id)===t.state.editingLinearElement.elementId){var m=K._.handlePointerUp(n,t.state.editingLinearElement,t.state);m!==t.state.editingLinearElement&&t.setState({editingLinearElement:m,suggestedBindings:[]})}else t.actionManager.executeAction(k.pL);else if(t.state.selectedLinearElement){var g,v;if((null===(g=e.hit)||void 0===g||null===(v=g.element)||void 0===v?void 0:v.id)!==t.state.selectedLinearElement.elementId){(0,ie.eD)(t.scene.getNonDeletedElements(),t.state).length>1&&t.setState({selectedLinearElement:null})}else{var b=K._.handlePointerUp(n,t.state.selectedLinearElement,t.state),y=b.startBindingElement,x=b.endBindingElement,w=t.scene.getElement(b.elementId);(0,V.Mn)(w)&&(0,C.HG)(w,y,x),b!==t.state.selectedLinearElement&&t.setState({selectedLinearElement:Xn(Xn({},b),{},{selectedPointsIndices:null}),suggestedBindings:[]})}}if(_r=null,e.eventListeners.onMove&&e.eventListeners.onMove.flush(),window.removeEventListener(T.Ks.POINTER_MOVE,e.eventListeners.onMove),window.removeEventListener(T.Ks.POINTER_UP,e.eventListeners.onUp),window.removeEventListener(T.Ks.KEYDOWN,e.eventListeners.onKeyDown),window.removeEventListener(T.Ks.KEYUP,e.eventListeners.onKeyUp),t.state.pendingImageElementId&&t.setState({pendingImageElementId:null}),"freedraw"===(null==c?void 0:c.type)){var E=(0,P.dE)(n,t.state),j=c.points,S=E.x-c.x,O=E.y-c.y;S===j[0][0]&&O===j[0][1]&&(O+=1e-4,S+=1e-4);var I=c.simulatePressure?[]:[].concat((0,i.Z)(c.pressures),[n.pressure]);return(0,_.DR)(c,{points:[].concat((0,i.Z)(j),[[S,O]]),pressures:I,lastCommittedPoint:[S,O]}),void t.actionManager.executeAction(k.pL)}if((0,V.pC)(c)){var M=c;try{t.initializeImageDimensions(M),t.setState({selectedElementIds:(0,p.Z)({},M.id,!0)},(function(){t.actionManager.executeAction(k.pL)}))}catch(e){console.error(e),t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==M.id}))),t.actionManager.executeAction(k.pL)}}else if((0,V.bt)(c)){c.points.length>1&&t.history.resumeRecording();var D=(0,P.dE)(n,t.state);e.drag.hasOccurred||!c||u?e.drag.hasOccurred&&!u&&((0,C.N1)(t.state)&&(0,V.Mn)(c,!1)&&(0,C.R)(c,t.state,t.scene,D),t.setState({suggestedBindings:[],startBoundElement:null}),d.locked?t.setState((function(e){return{draggingElement:null}})):((0,P.z8)(t.canvas),t.setState((function(e){return{draggingElement:null,activeTool:(0,P.Om)(t.state,{type:"selection"}),selectedElementIds:Xn(Xn({},e.selectedElementIds),{},(0,p.Z)({},c.id,!0)),selectedLinearElement:new K._(c,t.scene)}})))):((0,_.DR)(c,{points:[].concat((0,i.Z)(c.points),[[D.x-c.x,D.y-c.y]])}),t.setState({multiElement:c,editingElement:t.state.draggingElement}))}else{if("selection"!==d.type&&c&&(0,U.QD)(c))return t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().slice(0,-1)),void t.setState({draggingElement:null});c&&(0,_.DR)(c,(0,U.Qp)(c)),s&&t.history.resumeRecording(),s&&(0,U.QD)(s)&&t.scene.replaceAllElements(t.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==s.id})));var A=e.hit.element;if((null===(r=t.state.selectedLinearElement)||void 0===r?void 0:r.elementId)!==(null==A?void 0:A.id)&&(0,V.bt)(A))1===(0,ie.eD)(t.scene.getNonDeletedElements(),t.state).length&&t.setState({selectedLinearElement:new K._(A,t.scene)});if((0,N.EN)(t.state)){if(0===(0,ne.LW)(t.lastPointerDown.clientX,t.lastPointerDown.clientY,t.lastPointerUp.clientX,t.lastPointerUp.clientY)){var L=(0,P.dE)({clientX:t.lastPointerUp.clientX,clientY:t.lastPointerUp.clientY},t.state);t.getElementsAtPosition(L.x,L.y).forEach((function(t){return e.elementIdsToErase[t.id]={erase:!0,opacity:t.opacity}}))}t.eraseElements(e)}else{var Z;if(Object.keys(e.elementIdsToErase).length&&t.restoreReadyToEraseElements(e),A&&!e.drag.hasOccurred&&!e.hit.wasAddedToSelection&&(!t.state.editingLinearElement||!e.boxSelection.hasOccurred))if(n.shiftKey&&!t.state.editingLinearElement)if(t.state.selectedElementIds[A.id])if((0,$.zq)(t.state,A)){var R=A.groupIds.flatMap((function(e){return(0,$.Fb)(t.scene.getNonDeletedElements(),e)})).map((function(e){return(0,p.Z)({},e.id,!1)})).reduce((function(e,t){return Xn(Xn({},e),t)}),{});t.setState((function(e){return{selectedGroupIds:Xn(Xn({},e.selectedElementIds),A.groupIds.map((function(e){return(0,p.Z)({},e,!1)})).reduce((function(e,t){return Xn(Xn({},e),t)}),{})),selectedElementIds:Xn(Xn({},e.selectedElementIds),R)}}))}else null!==(Z=t.state.selectedLinearElement)&&void 0!==Z&&Z.isDragging||t.setState((function(e){var n=Xn(Xn({},e.selectedElementIds),{},(0,p.Z)({},A.id,!1)),r=(0,ie.eD)(t.scene.getNonDeletedElements(),Xn(Xn({},e),{},{selectedElementIds:n}));return(0,$.bO)(Xn(Xn({},e),{},{selectedElementIds:n,selectedLinearElement:1===r.length&&(0,V.bt)(r[0])?new K._(r[0],t.scene):e.selectedLinearElement}),t.scene.getNonDeletedElements())}));else t.setState((function(e){return{selectedElementIds:Xn(Xn({},e.selectedElementIds),{},(0,p.Z)({},A.id,!0))}}));else t.setState((function(e){var n;return Xn({},(0,$.bO)(Xn(Xn({},e),{},{selectedElementIds:(0,p.Z)({},A.id,!0),selectedLinearElement:(0,V.bt)(A)&&(null===(n=e.selectedLinearElement)||void 0===n?void 0:n.elementId)!==A.id?new K._(A,t.scene):e.selectedLinearElement}),t.scene.getNonDeletedElements()))}));e.drag.hasOccurred||t.state.isResizing||!(A&&(0,U.wB)(A,t.state,e.origin.x,e.origin.y)||!A&&e.hit.hasHitCommonBoundingBoxOfSelectedElements)?(!d.locked&&"freedraw"!==d.type&&c&&t.setState((function(e){return{selectedElementIds:Xn(Xn({},e.selectedElementIds),{},(0,p.Z)({},c.id,!0))}})),("selection"!==d.type||(0,ie.N)(t.scene.getNonDeletedElements(),t.state))&&t.history.resumeRecording(),(e.drag.hasOccurred||f||h)&&((0,C.N1)(t.state)?C.el:C.H)((0,ie.eD)(t.scene.getNonDeletedElements(),t.state)),d.locked||"freedraw"===d.type?t.setState({draggingElement:null,suggestedBindings:[]}):((0,P.z8)(t.canvas),t.setState({draggingElement:null,suggestedBindings:[],activeTool:(0,P.Om)(t.state,{type:"selection"})}))):t.state.editingLinearElement?t.setState({editingLinearElement:null}):t.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})}}}))}},{key:"maybeSuggestBindingForAll",value:function(e){var t=(0,C.ZB)(e);this.setState({suggestedBindings:t})}},{key:"clearSelection",value:function(e){this.setState((function(t){return{selectedElementIds:{},selectedGroupIds:{},editingGroupId:t.editingGroupId&&null!=e&&(0,$.Nd)(e,t.editingGroupId)?t.editingGroupId:null}})),this.setState({selectedElementIds:{},previousSelectedElementIds:this.state.selectedElementIds})}},{key:"getTextWysiwygSnappedToCenterPosition",value:function(e,t,n,r){if(r){var o=r.x+r.width/2,i=r.y+r.height/2,a=(0,Ie.TP)(r,n);if(a&&(o=a.x,i=a.y),Math.hypot(e-o,t-i)<T.wZ){var l=(0,P._i)({sceneX:o,sceneY:i},n);return{viewportX:l.x,viewportY:l.y,elementCenterX:o,elementCenterY:i}}}}},{key:"getCanvasOffsets",value:function(){var e;if(null!==(e=this.excalidrawContainerRef)&&void 0!==e&&e.current){var t=this.excalidrawContainerRef.current.getBoundingClientRect();return{offsetLeft:t.left,offsetTop:t.top}}return{offsetLeft:0,offsetTop:0}}},{key:"updateLanguage",value:(t=(0,a.Z)(m().mark((function e(){var t,n=this;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=S.Mj.find((function(e){return e.code===n.props.langCode}))||S.Fp,e.next=3,(0,S.m0)(t);case 3:this.setAppState({});case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"resetTapTwice",value:function(){pr=!1}}]),d}(v().Component);Pr.defaultProps={UIOptions:T.cW};var Tr=function(){var e=this;this.canvas=null,this.rc=null,this.unmounted=!1,this.device=Jn,this.excalidrawContainerRef=v().createRef(),this.files={},this.imageCache=new Map,this.lastPointerDown=null,this.lastPointerUp=null,this.lastScenePointer=null,this.focusContainer=function(){var t;null===(t=e.excalidrawContainerRef.current)||void 0===t||t.focus()},this.getSceneElementsIncludingDeleted=function(){return e.scene.getElementsIncludingDeleted()},this.getSceneElements=function(){return e.scene.getNonDeletedElements()},this.onInsertElements=function(t){e.addElementsFromPasteOrLibrary({elements:t,position:"center",files:null})},this.onExportImage=function(){var t=(0,a.Z)(m().mark((function t(n,r){var o;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,L.L)("export",n,"ui"),t.next=3,(0,H.p1)(n,r,e.state,e.files,{exportBackground:e.state.exportBackground,name:e.state.name,viewBackgroundColor:e.state.viewBackgroundColor}).catch(P.FG).catch((function(t){console.error(t),e.setState({errorMessage:t.message})}));case 3:o=t.sent,e.state.exportEmbedScene&&o&&(0,Ye.g8)(o)&&e.setState({fileHandle:o});case 5:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),this.syncActionResult=(0,P.tH)((function(t){if(!e.unmounted&&!1!==t){var n=null;if(t.elements&&(t.elements.forEach((function(t){var r;(null===(r=e.state.editingElement)||void 0===r?void 0:r.id)===t.id&&e.state.editingElement!==t&&(0,U.qP)(t)&&(n=t)})),e.scene.replaceAllElements(t.elements),t.commitToHistory&&e.history.resumeRecording()),t.files&&(e.files=t.replaceFiles?t.files:Xn(Xn({},e.files),t.files),e.addNewImagesToImageCache()),t.appState||n||e.state.contextMenu){var r,o,i,a,l,c,s,u;t.commitToHistory&&e.history.resumeRecording();var d=(null==t||null===(r=t.appState)||void 0===r?void 0:r.viewModeEnabled)||!1,f=(null==t||null===(o=t.appState)||void 0===o?void 0:o.zenModeEnabled)||!1,p=(null==t||null===(i=t.appState)||void 0===i?void 0:i.gridSize)||null,h=(null==t||null===(a=t.appState)||void 0===a?void 0:a.theme)||e.props.theme||T.C6.LIGHT,m=null!==(l=null==t||null===(c=t.appState)||void 0===c?void 0:c.name)&&void 0!==l?l:e.state.name,g=null!==(s=null==t||null===(u=t.appState)||void 0===u?void 0:u.errorMessage)&&void 0!==s?s:e.state.errorMessage;void 0!==e.props.viewModeEnabled&&(d=e.props.viewModeEnabled),void 0!==e.props.zenModeEnabled&&(f=e.props.zenModeEnabled),void 0!==e.props.gridModeEnabled&&(p=e.props.gridModeEnabled?T.k:null),void 0!==e.props.name&&(m=e.props.name),e.setState((function(e){var r;return Object.assign(t.appState||{},{contextMenu:null,editingElement:n||(null===(r=t.appState)||void 0===r?void 0:r.editingElement)||null,viewModeEnabled:d,zenModeEnabled:f,gridSize:p,theme:h,name:m,errorMessage:g})}),(function(){t.syncHistory&&e.history.setCurrentState(e.state,e.scene.getElementsIncludingDeleted())}))}}})),this.onBlur=(0,P.tH)((function(){vr=!1,e.setState({isBindingEnabled:!0})})),this.onUnload=function(){e.onBlur()},this.disableEvent=function(e){e.preventDefault()},this.resetHistory=function(){e.history.clear()},this.resetScene=(0,P.tH)((function(t){e.scene.replaceAllElements([]),e.setState((function(n){return Xn(Xn({},(0,N.im)()),{},{isLoading:(null==t||!t.resetLoadingState)&&n.isLoading,theme:e.state.theme})})),e.resetHistory()})),this.initializeScene=(0,a.Z)(m().mark((function t(){var n,r,o,i,l;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer(function(){var t=(0,a.Z)(m().mark((function t(n){var r,o;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.files.length){t.next=2;break}return t.abrupt("return");case 2:return r=n.files[0],t.next=5,r.getFile();case 5:o=t.sent,e.loadFileToCanvas(new File([o],o.name||"",{type:o.type}),r);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e.props.theme&&e.setState({theme:e.props.theme}),e.state.isLoading||e.setState({isLoading:!0}),o=null,t.prev=4,t.next=7,e.props.initialData;case 7:if(t.t0=t.sent,t.t0){t.next=10;break}t.t0=null;case 10:o=t.t0,null!==(i=o)&&void 0!==i&&i.libraryItems&&e.library.updateLibrary({libraryItems:o.libraryItems,merge:!0}).catch((function(e){console.error(e)})),t.next=18;break;case 14:t.prev=14,t.t1=t.catch(4),console.error(t.t1),o={appState:{errorMessage:t.t1.message||"Encountered an error during importing or restoring scene data"}};case 18:(l=(0,F.nu)(o,null,null,{repairBindings:!0})).appState=Xn(Xn({},l.appState),{},{theme:e.props.theme||l.appState.theme,openSidebar:(null===(n=l.appState)||void 0===n?void 0:n.openSidebar)||e.state.openSidebar,activeTool:"image"===l.appState.activeTool.type?Xn(Xn({},l.appState.activeTool),{},{type:"selection"}):l.appState.activeTool,isLoading:!1,toast:e.state.toast}),null!==(r=o)&&void 0!==r&&r.scrollToContent&&(l.appState=Xn(Xn({},l.appState),(0,ie.W)(l.elements,Xn(Xn({},l.appState),{},{width:e.state.width,height:e.state.height,offsetTop:e.state.offsetTop,offsetLeft:e.state.offsetLeft}),null))),e.fonts.loadFontsForElements(l.elements),e.resetHistory(),e.syncActionResult(Xn(Xn({},l),{},{commitToHistory:!0}));case 24:case"end":return t.stop()}}),t,null,[[4,14]])}))),this.refreshDeviceState=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height,i=null!=e.props.UIOptions.dockedSidebarBreakpoint?e.props.UIOptions.dockedSidebarBreakpoint:T.sk;e.device=(0,P.v4)(e.device,{isLandscape:r>o,isSmScreen:r<T.eF,isMobile:r<T.kV||o<T.Yx&&r<T.sS,canDeviceFitSidebar:r>i})},this.onResize=(0,P.tH)((function(){e.scene.getElementsIncludingDeleted().forEach((function(e){return(0,oe.bI)(e)})),e.setState({})})),this.renderScene=function(){var t={},n={},r={},o={},i={};e.state.collaborators.forEach((function(a,l){if(a.selectedElementIds)for(var c=0,s=Object.keys(a.selectedElementIds);c<s.length;c++){var u=s[c];u in r||(r[u]=[]),r[u].push(l)}a.pointer&&(a.username&&(o[l]=a.username),a.userState&&(i[l]=a.userState),n[l]=(0,P._i)({sceneX:a.pointer.x,sceneY:a.pointer.y},e.state),t[l]=a.button)}));var a=e.scene.getNonDeletedElements().filter((function(t){return(!(0,V.pC)(t)||e.state.pendingImageElementId!==t.id)&&(!e.state.editingElement||"text"!==e.state.editingElement.type||t.id!==e.state.editingElement.id)})),l=getComputedStyle(document.querySelector(".excalidraw")).getPropertyValue("--color-selection");(0,re.Eu)({elements:a,appState:e.state,scale:window.devicePixelRatio,rc:e.rc,canvas:e.canvas,renderConfig:{selectionColor:l,scrollX:e.state.scrollX,scrollY:e.state.scrollY,viewBackgroundColor:e.state.viewBackgroundColor,zoom:e.state.zoom,remotePointerViewportCoords:n,remotePointerButton:t,remoteSelectedElementIds:r,remotePointerUsernames:o,remotePointerUserStates:i,shouldCacheIgnoreZoom:e.state.shouldCacheIgnoreZoom,theme:e.state.theme,imageCache:e.imageCache,isExporting:!1,renderScrollbars:!e.device.isMobile},callback:function(t){var n=t.atLeastOneVisibleElement,r=t.scrollBars;r&&(xr=r);var o=!(0,U.iB)(e.state.editingElement)&&(!n&&a.length>0);e.state.scrolledOutside!==o&&e.setState({scrolledOutside:o}),e.scheduleImageRefresh()}},Er&&!0===window.EXCALIDRAW_THROTTLE_RENDER),Er||(Er=!0)},this.onScroll=(0,P.Ds)((function(){var t=e.getCanvasOffsets(),n=t.offsetTop,r=t.offsetLeft;e.setState((function(e){return e.offsetLeft===r&&e.offsetTop===n?null:{offsetTop:n,offsetLeft:r}}))}),T.HM),this.onCut=(0,P.tH)((function(t){var n;(null===(n=e.excalidrawContainerRef.current)||void 0===n?void 0:n.contains(document.activeElement))&&!(0,P.s)(t.target)&&(e.cutAll(),t.preventDefault(),t.stopPropagation())})),this.onCopy=(0,P.tH)((function(t){var n;(null===(n=e.excalidrawContainerRef.current)||void 0===n?void 0:n.contains(document.activeElement))&&!(0,P.s)(t.target)&&(e.copyAll(),t.preventDefault(),t.stopPropagation())})),this.cutAll=function(){e.actionManager.executeAction(k.ZM,"keyboard")},this.copyAll=function(){e.actionManager.executeAction(k.uN,"keyboard")},this.onTapStart=function(t){if(T.Dt||t.preventDefault(),!pr)return pr=!0,clearTimeout(hr),void(hr=window.setTimeout(Pr.resetTapTwice,T.Gj));if(pr&&1===t.touches.length){var n=(0,o.Z)(t.touches,1)[0];e.handleCanvasDoubleClick({clientX:n.clientX,clientY:n.clientY}),pr=!1,clearTimeout(hr)}T.Dt&&t.preventDefault(),2===t.touches.length&&e.setState({selectedElementIds:{}})},this.onTapEnd=function(t){e.resetContextMenuTimer(),t.touches.length>0?e.setState({previousSelectedElementIds:{},selectedElementIds:e.state.previousSelectedElementIds}):Cr.pointers.clear()},this.pasteFromClipboard=(0,P.tH)(function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s,u,d,f,h,g,v;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=!(!jr||!n),a=document.activeElement,l=null===(r=e.excalidrawContainerRef.current)||void 0===r?void 0:r.contains(a),!n||l){t.next=5;break}return t.abrupt("return");case 5:if(c=document.elementFromPoint(mr,gr),!n||c instanceof HTMLCanvasElement&&!(0,P.s)(a)){t.next=8;break}return t.abrupt("return");case 8:return s=null==n||null===(o=n.clipboardData)||void 0===o?void 0:o.files[0],t.next=11,(0,B.mQ)(n,i);case 11:if(u=t.sent,s||!u.text||i||(d=u.text.trim()).startsWith("<svg")&&d.endsWith("</svg>")&&(s=(0,Ye.Pn)(d)),!(0,Ye.Wr)(s)||u.spreadsheet){t.next=20;break}return f=(0,P.dE)({clientX:mr,clientY:gr},e.state),h=f.x,g=f.y,v=e.createImageElement({sceneX:h,sceneY:g}),e.insertImageElement(v,s),e.initializeImageDimensions(v),e.setState({selectedElementIds:(0,p.Z)({},v.id,!0)}),t.abrupt("return");case 20:if(!e.props.onPaste){t.next=32;break}return t.prev=21,t.next=24,e.props.onPaste(u,n);case 24:if(t.t0=t.sent,!1!==t.t0){t.next=27;break}return t.abrupt("return");case 27:t.next=32;break;case 29:t.prev=29,t.t1=t.catch(21),console.error(t.t1);case 32:u.errorMessage?e.setState({errorMessage:u.errorMessage}):u.spreadsheet&&!i?e.setState({pasteDialog:{data:u.spreadsheet,shown:!0}}):u.elements?e.addElementsFromPasteOrLibrary({elements:u.elements,files:u.files||null,position:"cursor",retainSeed:i}):u.text&&e.addTextFromPaste(u.text,i),e.setActiveTool({type:"selection"}),null==n||n.preventDefault();case 35:case"end":return t.stop()}}),t,null,[[21,29]])})));return function(e){return t.apply(this,arguments)}}()),this.addElementsFromPasteOrLibrary=function(t){var n=(0,F.ET)(t.elements,null),a=(0,U.KP)(n),l=(0,o.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3],f=(0,P.TE)(c,u)/2,p=(0,P.TE)(s,d)/2,h="object"===(0,r.Z)(t.position)?t.position.clientX:"cursor"===t.position?mr:e.state.width/2+e.state.offsetLeft,m="object"===(0,r.Z)(t.position)?t.position.clientY:"cursor"===t.position?gr:e.state.height/2+e.state.offsetTop,g=(0,P.dE)({clientX:h,clientY:m},e.state),v=g.x-f,b=g.y-p,y=(0,ne.wC)(v,b,e.state.gridSize),x=(0,o.Z)(y,2),w=x[0],k=x[1],E=(0,Y._N)(n.map((function(e){return(0,_.BE)(e,{x:e.x+w-c,y:e.y+k-s})})),{randomizeSeed:!t.retainSeed}),j=[].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),(0,i.Z)(E));e.scene.replaceAllElements(j),E.forEach((function(e){if((0,U.iB)(e)&&(0,V.Xh)(e)){var t=(0,Ie.tl)(e);(0,U.oN)(e,t)}})),t.files&&(e.files=Xn(Xn({},e.files),t.files)),e.history.resumeRecording(),e.setState((0,$.bO)(Xn(Xn({},e.state),{},{openSidebar:e.state.openSidebar&&e.device.canDeviceFitSidebar&&e.state.defaultSidebarDockedPreference?e.state.openSidebar:null,selectedElementIds:E.reduce((function(e,t){return(0,V.Xh)(t)||(e[t.id]=!0),e}),{}),selectedGroupIds:{}}),e.scene.getNonDeletedElements()),(function(){t.files&&e.addNewImagesToImageCache()})),e.setActiveTool({type:"selection"})},this.setAppState=function(t,n){e.setState(t,n)},this.removePointer=function(t){wr&&e.resetContextMenuTimer(),Cr.pointers.delete(t.pointerId)},this.toggleLock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ui";e.state.activeTool.locked||(0,L.L)("toolbar","toggleLock","".concat(t," (").concat(e.device.isMobile?"mobile":"desktop",")")),e.setState((function(t){return{activeTool:Xn(Xn(Xn({},t.activeTool),(0,P.Om)(e.state,t.activeTool.locked?{type:"selection"}:t.activeTool)),{},{locked:!t.activeTool.locked})}}))},this.togglePenMode=function(){e.setState((function(e){return{penMode:!e.penMode}}))},this.onHandToolToggle=function(){e.actionManager.executeAction(Hn.eF)},this.zoomCanvas=function(t){e.setState(Xn({},(0,le.E)({viewportX:e.state.width/2+e.state.offsetLeft,viewportY:e.state.height/2+e.state.offsetTop,nextZoom:(0,ie.j)(t)},e.state)))},this.cancelInProgresAnimation=null,this.scrollToContent=function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.scene.getNonDeletedElements(),r=arguments.length>1?arguments[1]:void 0;null===(t=e.cancelInProgresAnimation)||void 0===t||t.call(e);var o=Array.isArray(n)?n:[n],i=e.state.zoom,a=e.state.scrollX,l=e.state.scrollY;if(null!=r&&r.fitToContent){var c=(0,Hn.md)(o,e.state,!1),s=c.appState;i=s.zoom,a=s.scrollX,l=s.scrollY}else{var u=(0,ie.W)(o,e.state,e.canvas);a=u.scrollX,l=u.scrollY}if(null!=r&&r.animate){var d,f=e.state.scrollX,p=e.state.scrollY;e.zoomCanvas(i.value);var h=(0,P.B4)([f,p],[a,l],(function(t,n){return e.setState({scrollX:t,scrollY:n})}),{duration:null!==(d=null==r?void 0:r.duration)&&void 0!==d?d:500});e.cancelInProgresAnimation=function(){h(),e.cancelInProgresAnimation=null}}else e.setState({scrollX:a,scrollY:l,zoom:i})},this.translateCanvas=function(t){var n;null===(n=e.cancelInProgresAnimation)||void 0===n||n.call(e),e.setState(t)},this.setToast=function(t){e.setState({toast:t})},this.restoreFileFromShare=(0,a.Z)(m().mark((function t(){var n,r,o,i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,caches.open("web-share-target");case 3:return n=t.sent,t.next=6,n.match("shared-file");case 6:if(!(r=t.sent)){t.next=16;break}return t.next=10,r.blob();case 10:return o=t.sent,i=new File([o],o.name||"",{type:o.type}),e.loadFileToCanvas(i,null),t.next=15,n.delete("shared-file");case 15:window.history.replaceState(null,T.iC,window.location.pathname);case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),e.setState({errorMessage:t.t0.message});case 21:case"end":return t.stop()}}),t,null,[[0,18]])}))),this.addFiles=(0,P.tH)((function(t){var n=t.reduce((function(e,t){return e.set(t.id,t),e}),new Map);e.files=Xn(Xn({},e.files),Object.fromEntries(n)),e.scene.getNonDeletedElements().forEach((function(t){(0,V.wi)(t)&&n.has(t.fileId)&&(e.imageCache.delete(t.fileId),(0,oe.bI)(t))})),e.scene.informMutation(),e.addNewImagesToImageCache()})),this.updateScene=(0,P.tH)((function(t){t.commitToHistory&&e.history.resumeRecording(),t.appState&&e.setState(t.appState),t.elements&&e.scene.replaceAllElements(t.elements),t.collaborators&&e.setState({collaborators:t.collaborators})})),this.onSceneUpdated=function(){e.setState({})},this.toggleSidebar=function(t){var n,r,o=t.name,i=t.tab,a=t.force;void 0===a?n=(null===(r=e.state.openSidebar)||void 0===r?void 0:r.name)===o?null:o:n=a?o:null;return e.setState({openSidebar:n?{name:n,tab:i}:null}),!!n},this.updateCurrentCursorPosition=(0,P.tH)((function(e){mr=e.clientX,gr=e.clientY})),this.onKeyDown=(0,P.tH)((function(t){if("Proxy"in window&&(!t.shiftKey&&/^[A-Z]$/.test(t.key)||t.shiftKey&&/^[a-z]$/.test(t.key))&&(t=new Proxy(t,{get:function(e,n){var r=e[n];return"function"==typeof r?r.bind(e):"key"===n?t.shiftKey?e.key.toUpperCase():e.key.toLowerCase():r}})),t[O.tW.CTRL_OR_CMD]&&t.key.toLowerCase()===O.tW.V&&(jr=t.shiftKey,clearTimeout(Sr),Sr=window.setTimeout((function(){jr=!1}),100)),!t[O.tW.CTRL_OR_CMD]||!(0,P.s)(t.target)||t.code!==O.aU.MINUS&&t.code!==O.aU.EQUAL){if(!((0,P.s)(t.target)&&t.key!==O.tW.ESCAPE||(0,O.Wl)(t.key)&&(0,P._Z)(t.target)))if(t.key!==O.tW.QUESTION_MARK)if(t.key.toLowerCase()===O.tW.E&&t.shiftKey&&t[O.tW.CTRL_OR_CMD])e.setState({openDialog:"imageExport"});else{if(t.key===O.tW.PAGE_UP||t.key===O.tW.PAGE_DOWN){var n=(t.shiftKey?e.state.width:e.state.height)/e.state.zoom.value;t.key===O.tW.PAGE_DOWN&&(n=-n),t.shiftKey?e.translateCanvas((function(e){return{scrollX:e.scrollX+n}})):e.translateCanvas((function(e){return{scrollY:e.scrollY+n}}))}if(!e.actionManager.handleKeyDown(t)&&!e.state.viewModeEnabled){if(t[O.tW.CTRL_OR_CMD]&&e.state.isBindingEnabled&&e.setState({isBindingEnabled:!1}),(0,O.Wl)(t.key)){var r=e.state.gridSize&&(t.shiftKey?T.$e:e.state.gridSize)||(t.shiftKey?T.Iw:T.$e),o=0,i=0;t.key===O.tW.ARROW_LEFT?o=-r:t.key===O.tW.ARROW_RIGHT?o=r:t.key===O.tW.ARROW_UP?i=-r:t.key===O.tW.ARROW_DOWN&&(i=r);var a=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state,!0);a.forEach((function(e){(0,_.DR)(e,{x:e.x+o,y:e.y+i}),(0,C.Ww)(e,{simultaneouslyUpdated:a})})),e.maybeSuggestBindingForAll(a),t.preventDefault()}else if(t.key===O.tW.ENTER){var l=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state);if(1===l.length){var c=l[0];if(t[O.tW.CTRL_OR_CMD])(0,V.bt)(c)&&(e.state.editingLinearElement&&e.state.editingLinearElement.elementId===l[0].id||(e.history.resumeRecording(),e.setState({editingLinearElement:new K._(c,e.scene)})));else if((0,U.iB)(c)||(0,Ie.Zr)(c)){var s;(0,U.iB)(c)||(s=c);var u=(0,Ie.TP)(c,e.state),d=u.x,f=u.y;return e.startTextEditing({sceneX:d,sceneY:f,container:s}),void t.preventDefault()}}}else if(!t.ctrlKey&&!t.altKey&&!t.metaKey&&null===e.state.draggingElement){var p=function(e){var t=ce.find((function(t,n){return null!=t.numericKey&&e===t.numericKey.toString()||t.key&&("string"==typeof t.key?t.key===e:t.key.includes(e))}));return(null==t?void 0:t.value)||null}(t.key);p?(e.state.activeTool.type!==p&&(0,L.L)("toolbar",p,"keyboard (".concat(e.device.isMobile?"mobile":"desktop",")")),e.setActiveTool({type:p}),t.stopPropagation()):t.key===O.tW.Q&&(e.toggleLock("keyboard"),t.stopPropagation())}if(t.key===O.tW.SPACE&&0===Cr.pointers.size&&(vr=!0,(0,P.KJ)(e.canvas,T.oc.GRAB),t.preventDefault()),!(t.key!==O.tW.G&&t.key!==O.tW.S||t.altKey||t[O.tW.CTRL_OR_CMD])){var h=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state);if("selection"===e.state.activeTool.type&&!h.length)return;t.key===O.tW.G&&((0,ie.$b)(e.state.activeTool.type)||h.some((function(e){return(0,ie.$b)(e.type)})))&&(e.setState({openPopup:"elementBackground"}),t.stopPropagation()),t.key===O.tW.S&&(e.setState({openPopup:"elementStroke"}),t.stopPropagation())}!t[O.tW.CTRL_OR_CMD]||t.key!==O.tW.BACKSPACE&&t.key!==O.tW.DELETE||an.e_.set(sn.w,"clearCanvas")}}else e.setState({openDialog:"help"})}else t.preventDefault()})),this.onWheel=(0,P.tH)((function(e){e.target instanceof HTMLCanvasElement||!e.ctrlKey||e.preventDefault()})),this.onKeyUp=(0,P.tH)((function(t){if(t.key===O.tW.SPACE&&(e.state.viewModeEnabled?(0,P.KJ)(e.canvas,T.oc.GRAB):"selection"===e.state.activeTool.type?(0,P.z8)(e.canvas):((0,P.Uk)(e.canvas,e.state),e.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})),vr=!1),t[O.tW.CTRL_OR_CMD]||e.state.isBindingEnabled||e.setState({isBindingEnabled:!0}),(0,O.Wl)(t.key)){var n=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state);(0,C.N1)(e.state)?(0,C.el)(n):(0,C.H)(n),e.setState({suggestedBindings:[]})}})),this.setActiveTool=function(t){var n=(0,P.Om)(e.state,t);"hand"===n.type?(0,P.KJ)(e.canvas,T.oc.GRAB):vr||(0,P.Uk)(e.canvas,e.state),(0,P.wO)(document.activeElement)&&e.focusContainer(),(0,V.dt)(n.type)||e.setState({suggestedBindings:[]}),"image"===n.type&&e.onImageAction(),"selection"!==n.type?e.setState({activeTool:n,selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}):e.setState({activeTool:n})},this.setCursor=function(t){(0,P.KJ)(e.canvas,t)},this.resetCursor=function(){(0,P.z8)(e.canvas)},this.isTouchScreenMultiTouchGesture=function(){return Cr.pointers.size>=2},this.onGestureStart=(0,P.tH)((function(t){t.preventDefault(),e.isTouchScreenMultiTouchGesture()&&e.setState({selectedElementIds:{}}),Cr.initialScale=e.state.zoom.value})),this.onGestureChange=(0,P.tH)((function(t){if(t.preventDefault(),!e.isTouchScreenMultiTouchGesture()){var n=Cr.initialScale;n&&e.setState((function(e){return Xn({},(0,le.E)({viewportX:mr,viewportY:gr,nextZoom:(0,ie.j)(n*t.scale)},e))}))}})),this.onGestureEnd=(0,P.tH)((function(t){t.preventDefault(),e.isTouchScreenMultiTouchGesture()&&e.setState({previousSelectedElementIds:{},selectedElementIds:e.state.previousSelectedElementIds}),Cr.initialScale=null})),this.startTextEditing=function(t){var n,r,o,a,l=t.sceneX,c=t.sceneY,s=t.insertAtParentCenter,u=void 0===s||s,d=t.container,f=!1,p=u&&e.getTextWysiwygSnappedToCenterPosition(l,c,e.state,d);d&&p&&(f=!0);var h=null,m=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state),g=(null===(n=h=1===m.length?(0,U.iB)(m[0])?m[0]:d?(0,Ie.WJ)(m[0]):e.getTextElementAtPosition(l,c):e.getTextElementAtPosition(l,c))||void 0===n?void 0:n.fontFamily)||e.state.currentItemFontFamily,v=(null===(r=h)||void 0===r?void 0:r.lineHeight)||(0,Ie.PT)(g),b=e.state.currentItemFontSize;if(!h&&f&&d&&!(0,V.Yv)(d)){var y={fontSize:b,fontFamily:g},x=(0,Ie.AT)((0,P.mO)(y),v),w=(0,Ie.w_)(b,v),k=(0,Ie.HE)(d),E=Math.max(k.height,w),j=Math.max(k.width,x);(0,_.DR)(d,{height:E,width:j}),l=d.x+j/2,c=d.y+E/2,p&&(p=e.getTextWysiwygSnappedToCenterPosition(l,c,e.state,d))}var S=h||(0,U.VL)({x:p?p.elementCenterX:l,y:p?p.elementCenterY:c,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,text:"",fontSize:b,fontFamily:g,textAlign:p?"center":e.state.currentItemTextAlign,verticalAlign:p?T.oX.MIDDLE:T.hs,containerId:f?null==d?void 0:d.id:void 0,groupIds:null!==(o=null==d?void 0:d.groupIds)&&void 0!==o?o:[],lineHeight:v,angle:null!==(a=null==d?void 0:d.angle)&&void 0!==a?a:0});if(!h&&f&&d&&(0,_.DR)(d,{boundElements:(d.boundElements||[]).concat({type:"text",id:S.id})}),e.setState({editingElement:S}),!h)if(d&&f){var O=e.scene.getElementIndex(d.id);e.scene.insertElementAtIndex(S,O+1)}else e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[S]));e.setState({editingElement:S}),e.handleTextWysiwyg(S,{isExistingElement:!!h})},this.handleCanvasDoubleClick=function(t){if(!e.state.multiElement&&"selection"===e.state.activeTool.type){var n=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state);if(1===n.length&&(0,V.bt)(n[0])){if(t[O.tW.CTRL_OR_CMD]&&(!e.state.editingLinearElement||e.state.editingLinearElement.elementId!==n[0].id))return e.history.resumeRecording(),void e.setState({editingLinearElement:new K._(n[0],e.scene)});if(e.state.editingLinearElement&&e.state.editingLinearElement.elementId===n[0].id)return}(0,P.z8)(e.canvas);var r=(0,P.dE)(t,e.state),o=r.x,i=r.y;if((0,$.iJ)(e.state).length>0){var a=e.getElementAtPosition(o,i),l=a&&(0,$.YS)(a,e.state.selectedGroupIds);if(l)return void e.setState((function(t){return(0,$.bO)(Xn(Xn({},t),{},{editingGroupId:l,selectedElementIds:(0,p.Z)({},a.id,!0),selectedGroupIds:{}}),e.scene.getNonDeletedElements())}))}if((0,P.z8)(e.canvas),!t[O.tW.CTRL_OR_CMD]&&!e.state.viewModeEnabled){var c=(0,Ie.OW)(e.scene.getNonDeletedElements(),e.state,o,i);if(c&&((0,V.Xo)(c)||!(0,P.Qm)(c.backgroundColor)||(0,An.Qu)(c,e.state,[o,i]))){var s=(0,Ie.TP)(c,e.state);o=s.x,i=s.y}e.startTextEditing({sceneX:o,sceneY:i,insertAtParentCenter:!t.altKey,container:c})}}},this.getElementLinkAtPosition=function(t,n){var r=e.scene.getNonDeletedElements().slice().reverse(),o=1/0;return r.find((function(r,i){return n&&r.id===n.id&&(o=i),r.link&&i<=o&&(0,Ln.wq)(r,e.state,[t.x,t.y],e.device.isMobile)}))},this.redirectToLink=function(t,n){var r=(0,ne.LW)(e.lastPointerDown.clientX,e.lastPointerDown.clientY,e.lastPointerUp.clientX,e.lastPointerUp.clientY);if(!(!e.hitLinkElement||n&&r>T.f||!n&&0!==r)){var o=(0,P.dE)(e.lastPointerDown,e.state),i=(0,Ln.wq)(e.hitLinkElement,e.state,[o.x,o.y],e.device.isMobile),a=(0,P.dE)(e.lastPointerUp,e.state),l=(0,Ln.wq)(e.hitLinkElement,e.state,[a.x,a.y],e.device.isMobile);if(i&&l){var c,s,u=e.hitLinkElement.link;if(u)if(e.props.onLinkOpen&&(s=(0,P.ag)(T.Ks.EXCALIDRAW_LINK,t.nativeEvent),e.props.onLinkOpen(e.hitLinkElement,s)),null===(c=s)||void 0===c||!c.defaultPrevented){var d=(0,Ln.q$)(u)?"_self":"_blank",f=window.open(void 0,d);f&&(f.opener=null,f.location=(0,Ln.$u)(u))}}}},this.handleCanvasPointerMove=function(t){e.savePointer(t.clientX,t.clientY,e.state.cursorButton),Cr.pointers.has(t.pointerId)&&Cr.pointers.set(t.pointerId,{x:t.clientX,y:t.clientY});var n=Cr.initialScale;if(2===Cr.pointers.size&&Cr.lastCenter&&n&&Cr.initialDistance){var r=G(Cr.pointers),a=r.x-Cr.lastCenter.x,l=r.y-Cr.lastCenter.y;Cr.lastCenter=r;var c=X(Array.from(Cr.pointers.values())),s="freedraw"===e.state.activeTool.type&&e.state.penMode?1:c/Cr.initialDistance,u=s?(0,ie.j)(n*s):e.state.zoom.value;e.setState((function(t){var n=(0,le.E)({viewportX:r.x,viewportY:r.y,nextZoom:u},t);e.translateCanvas({zoom:n.zoom,scrollX:n.scrollX+a/u,scrollY:n.scrollY+l/u,shouldCacheIgnoreZoom:!0})})),e.resetShouldCacheIgnoreZoomDebounced()}else Cr.lastCenter=Cr.initialDistance=Cr.initialScale=null;if(!(vr||br||yr||(0,N.l$)(e.state))){var d=(0,ie._4)(xr,t.clientX-e.state.offsetLeft,t.clientY-e.state.offsetTop).isOverEither;e.state.draggingElement||e.state.multiElement||(d?(0,P.z8)(e.canvas):(0,P.Uk)(e.canvas,e.state));var f=(0,P.dE)(t,e.state),p=f.x,h=f.y;if(e.state.editingLinearElement&&!e.state.editingLinearElement.isDragging){var m=K._.handlePointerMove(t,p,h,e.state);m&&m!==e.state.editingLinearElement&&(0,b.flushSync)((function(){e.setState({editingLinearElement:m})})),null!=(null==m?void 0:m.lastUncommittedPoint)?e.maybeSuggestBindingAtCursor(f):(0,b.flushSync)((function(){e.setState({suggestedBindings:[]})}))}if((0,V.Lx)(e.state.activeTool.type)){var g=e.state.draggingElement;(0,V.Mn)(g,!1)?e.maybeSuggestBindingsForLinearElementAtCoords(g,[f],e.state.startBoundElement):e.maybeSuggestBindingAtCursor(f)}if(e.state.multiElement){var v=e.state.multiElement,y=v.x,x=v.y,w=v.points,k=v.lastCommittedPoint,E=w[w.length-1];if((0,P.Uk)(e.canvas,e.state),E===k)(0,ne.LW)(p-y,h-x,E[0],E[1])>=T.qx?(0,_.DR)(v,{points:[].concat((0,i.Z)(w),[[p-y,h-x]])}):(0,P.KJ)(e.canvas,T.oc.POINTER);else if(w.length>2&&k&&(0,ne.LW)(p-y,h-x,k[0],k[1])<T.qx)(0,P.KJ)(e.canvas,T.oc.POINTER),(0,_.DR)(v,{points:w.slice(0,-1)});else{var j,S=(0,ne.wC)(p,h,e.state.gridSize),C=(0,o.Z)(S,2),I=C[0],M=C[1],D=null!==(j=null==v?void 0:v.lastCommittedPoint)&&void 0!==j?j:[0,0],A=(0,o.Z)(D,2),L=A[0],Z=A[1],R=I-y-L,z=M-x-Z;if((0,O.Ge)(t)){var B=(0,U.o4)(L+y,Z+x,I,M);R=B.width,z=B.height}(0,ne.g6)(w,e.state.zoom.value)&&(0,P.KJ)(e.canvas,T.oc.POINTER),(0,_.DR)(v,{points:[].concat((0,i.Z)(w.slice(0,-1)),[[L+R,Z+z]])})}}else{if(!(Boolean(t.buttons)||"selection"!==e.state.activeTool.type&&"text"!==e.state.activeTool.type&&"eraser"!==e.state.activeTool.type)){var H=e.scene.getNonDeletedElements(),W=(0,ie.eD)(H,e.state);if(1!==W.length||d||e.state.editingLinearElement){if(W.length>1&&!d){var F=(0,U.n2)((0,U.KP)(W),p,h,e.state.zoom,t.pointerType);if(F)return void(0,P.KJ)(e.canvas,(0,U.Un)({transformHandleType:F}))}}else{var Y=(0,U.jt)(H,e.state,p,h,e.state.zoom,t.pointerType);if(Y&&Y.transformHandleType)return void(0,P.KJ)(e.canvas,(0,U.Un)(Y))}var q=e.getElementAtPosition(f.x,f.y);e.hitLinkElement=e.getElementLinkAtPosition(f,q),(0,N.EN)(e.state)||(e.hitLinkElement&&!e.state.selectedElementIds[e.hitLinkElement.id]?((0,P.KJ)(e.canvas,T.oc.POINTER),(0,Ln.Pp)(e.hitLinkElement,e.state)):((0,Ln.lV)(),q&&q.link&&e.state.selectedElementIds[q.id]&&!e.state.contextMenu&&!e.state.showHyperlinkPopup?e.setState({showHyperlinkPopup:"info"}):"text"===e.state.activeTool.type?(0,P.KJ)(e.canvas,(0,U.iB)(q)?T.oc.TEXT:T.oc.CROSSHAIR):e.state.viewModeEnabled?(0,P.KJ)(e.canvas,T.oc.GRAB):d?(0,P.KJ)(e.canvas,T.oc.AUTO):e.state.selectedLinearElement?e.handleHoverSelectedLinearElement(e.state.selectedLinearElement,p,h):t[O.tW.CTRL_OR_CMD]?(0,P.KJ)(e.canvas,T.oc.AUTO):!q&&!e.isHittingCommonBoundingBoxOfSelectedElements(f,W)||null!=q&&q.locked||(0,P.KJ)(e.canvas,T.oc.MOVE)))}}}},this.handleEraser=function(t,n,r){for(var o=function(e){e.forEach((function(e){e.locked||(i.push(e.id),t.altKey?n.elementIdsToErase[e.id]&&n.elementIdsToErase[e.id].erase&&(n.elementIdsToErase[e.id].erase=!1):n.elementIdsToErase[e.id]||(n.elementIdsToErase[e.id]={erase:!0,opacity:e.opacity}))}))},i=[],a=(0,ne.LW)(n.lastCoords.x,n.lastCoords.y,r.x,r.y),l=10/e.state.zoom.value,c=Xn({},n.lastCoords),s=0;s<=a;){if(o(e.getElementsAtPosition(c.x,c.y)),s===a)break;var u=(s=Math.min(s+l,a))/a,d=(1-u)*c.x+u*r.x,f=(1-u)*c.y+u*r.y;c.x=d,c.y=f}var p=e.scene.getElementsIncludingDeleted().map((function(e){var r=(0,V.Xh)(e)&&i.includes(e.containerId)?e.containerId:e.id;if(i.includes(r)){if(!t.altKey)return(0,_.BE)(e,{opacity:T.xY});if(n.elementIdsToErase[r]&&!1===n.elementIdsToErase[r].erase)return(0,_.BE)(e,{opacity:n.elementIdsToErase[r].opacity})}return e}));e.scene.replaceAllElements(p),n.lastCoords.x=r.x,n.lastCoords.y=r.y},this.handleTouchMove=function(e){kr=!0},this.handleCanvasPointerDown=function(t){var n,r;if(e.state.contextMenu&&e.setState({contextMenu:null}),e.updateGestureOnPointerDown(t),"touch"===t.pointerType&&e.state.draggingElement&&"freedraw"===e.state.draggingElement.type){var o=e.state.draggingElement;e.updateScene(Xn(Xn({},o.points.length<10?{elements:e.scene.getElementsIncludingDeleted().filter((function(e){return e.id!==o.id}))}:{}),{},{appState:{draggingElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:Object.keys(e.state.selectedElementIds).filter((function(e){return e!==o.id})).reduce((function(t,n){return t[n]=e.state.selectedElementIds[n],t}),{})}}))}else{var i=document.getSelection();if(null!=i&&i.anchorNode&&i.removeAllRanges(),e.maybeOpenContextMenuAfterPointerDownOnTouchDevices(t),e.maybeCleanupAfterMissingPointerUp(t),e.state.penDetected||"pen"!==t.pointerType||e.setState((function(e){return{penMode:!0,penDetected:!0}})),!e.device.isTouchScreen&&["pen","touch"].includes(t.pointerType)&&(e.device=(0,P.v4)(e.device,{isTouchScreen:!0})),!br&&(e.lastPointerDown=t,e.setState({lastPointerDownWith:t.pointerType,cursorButton:"down"}),e.savePointer(t.clientX,t.clientY,"down"),!e.handleCanvasPanUsingWheelOrSpaceDrag(t)&&!(t.button!==T.Oh.MAIN&&t.button!==T.Oh.TOUCH||Cr.pointers.size>1))){var a=e.initialPointerDownState(t);if(!e.handleDraggingScrollBar(t,a))if(e.clearSelectionIfNotUsingSelection(),e.updateBindingEnabledOnPointerMove(t),!e.handleSelectionOnPointerDown(t,a))if(!e.state.penMode||"touch"!==t.pointerType||"selection"===e.state.activeTool.type||"text"===e.state.activeTool.type||"image"===e.state.activeTool.type)if("text"!==e.state.activeTool.type){if("arrow"===e.state.activeTool.type||"line"===e.state.activeTool.type)e.handleLinearElementOnPointerDown(t,e.state.activeTool.type,a);else if("image"===e.state.activeTool.type){(0,P.KJ)(e.canvas,T.oc.CROSSHAIR);var l=e.state.pendingImageElementId&&e.scene.getElement(e.state.pendingImageElementId);if(!l)return;e.setState({draggingElement:l,editingElement:l,pendingImageElementId:null,multiElement:null});var c=(0,P.dE)(t,e.state),s=c.x,u=c.y;(0,_.DR)(l,{x:s,y:u})}else"freedraw"===e.state.activeTool.type?e.handleFreeDrawElementOnPointerDown(t,e.state.activeTool.type,a):"custom"===e.state.activeTool.type?(0,P.KJ)(e.canvas,T.oc.AUTO):"eraser"!==e.state.activeTool.type&&"hand"!==e.state.activeTool.type&&e.createGenericElementOnPointerDown(e.state.activeTool.type,a);null===(n=e.props)||void 0===n||null===(r=n.onPointerDown)||void 0===r||r.call(n,e.state.activeTool,a);var d=e.onPointerMoveFromPointerDownHandler(a),f=e.onPointerUpFromPointerDownHandler(a),p=e.onKeyDownFromPointerDownHandler(a),h=e.onKeyUpFromPointerDownHandler(a);_r=f,e.state.viewModeEnabled||(window.addEventListener(T.Ks.POINTER_MOVE,d),window.addEventListener(T.Ks.POINTER_UP,f),window.addEventListener(T.Ks.KEYDOWN,p),window.addEventListener(T.Ks.KEYUP,h),a.eventListeners.onMove=d,a.eventListeners.onUp=f,a.eventListeners.onKeyUp=h,a.eventListeners.onKeyDown=p)}else e.handleTextOnPointerDown(t,a)}}},this.handleCanvasPointerUp=function(t){if(e.lastPointerUp=t,e.device.isTouchScreen){var n=(0,P.dE)({clientX:t.clientX,clientY:t.clientY},e.state),r=e.getElementAtPosition(n.x,n.y);e.hitLinkElement=e.getElementLinkAtPosition(n,r)}e.hitLinkElement&&!e.state.selectedElementIds[e.hitLinkElement.id]&&e.redirectToLink(t,e.device.isTouchScreen),e.removePointer(t)},this.maybeOpenContextMenuAfterPointerDownOnTouchDevices=function(t){"touch"===t.pointerType&&(kr=!1,wr?kr=!0:wr=window.setTimeout((function(){wr=0,kr||e.handleCanvasContextMenu(t)}),T.nM))},this.resetContextMenuTimer=function(){clearTimeout(wr),wr=0,kr=!1},this.handleCanvasPanUsingWheelOrSpaceDrag=function(t){if(!(Cr.pointers.size<=1&&(t.button===T.Oh.WHEEL||t.button===T.Oh.MAIN&&vr||(0,N.l$)(e.state)||e.state.viewModeEnabled))||(0,U.iB)(e.state.editingElement))return!1;br=!0,t.preventDefault();var n=!1,r=/Linux/.test(window.navigator.platform);(0,P.KJ)(e.canvas,T.oc.GRABBING);var o=t.clientX,i=t.clientY,a=(0,P.$9)((function(t){var a=o-t.clientX,l=i-t.clientY;if(o=t.clientX,i=t.clientY,r&&!n&&(Math.abs(a)>1||Math.abs(l)>1)){n=!0;var c=function e(t){document.body.removeEventListener(T.Ks.PASTE,e),t.stopPropagation()};document.body.addEventListener(T.Ks.PASTE,c),window.addEventListener(T.Ks.POINTER_UP,(function e(){setTimeout((function(){document.body.removeEventListener(T.Ks.PASTE,c),window.removeEventListener(T.Ks.POINTER_UP,e)}),100)}))}e.translateCanvas({scrollX:e.state.scrollX-a/e.state.zoom.value,scrollY:e.state.scrollY-l/e.state.zoom.value})})),l=(0,P.tH)(_r=function(){_r=null,br=!1,vr||(e.state.viewModeEnabled?(0,P.KJ)(e.canvas,T.oc.GRAB):(0,P.Uk)(e.canvas,e.state)),e.setState({cursorButton:"up"}),e.savePointer(t.clientX,t.clientY,"up"),window.removeEventListener(T.Ks.POINTER_MOVE,a),window.removeEventListener(T.Ks.POINTER_UP,l),window.removeEventListener(T.Ks.BLUR,l),a.flush()});return window.addEventListener(T.Ks.BLUR,l),window.addEventListener(T.Ks.POINTER_MOVE,a,{passive:!0}),window.addEventListener(T.Ks.POINTER_UP,l),!0},this.clearSelectionIfNotUsingSelection=function(){"selection"!==e.state.activeTool.type&&e.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null})},this.handleSelectionOnPointerDown=function(t,n){if("selection"===e.state.activeTool.type){var r=e.scene.getNonDeletedElements(),o=(0,ie.eD)(r,e.state);if(1!==o.length||e.state.editingLinearElement)o.length>1&&(n.resize.handleType=(0,U.n2)((0,U.KP)(o),n.origin.x,n.origin.y,e.state.zoom,t.pointerType));else{var i=(0,U.jt)(r,e.state,n.origin.x,n.origin.y,e.state.zoom,t.pointerType);null!=i&&(e.setState({resizingElement:i.element}),n.resize.handleType=i.transformHandleType)}if(n.resize.handleType)(0,P.KJ)(e.canvas,(0,U.Un)({transformHandleType:n.resize.handleType})),n.resize.isResizing=!0,n.resize.offset=(0,P.AK)((0,U.xx)(n.resize.handleType,o,n.origin.x,n.origin.y)),1===o.length&&(0,V.bt)(o[0])&&2===o[0].points.length&&(n.resize.arrowDirection=(0,U.T)(n.resize.handleType,o[0]));else{var a;if(e.state.selectedLinearElement){var l=e.state.editingLinearElement||e.state.selectedLinearElement,c=K._.handlePointerDown(t,e.state,e.history,n.origin,l);if(c.hitElement&&(n.hit.element=c.hitElement),c.linearElementEditor&&(e.setState({selectedLinearElement:c.linearElementEditor}),e.state.editingLinearElement&&e.setState({editingLinearElement:c.linearElementEditor})),c.didAddPoint)return!0}if(n.hit.element=null!==(a=n.hit.element)&&void 0!==a?a:e.getElementAtPosition(n.origin.x,n.origin.y),n.hit.element)if(e.getElementLinkAtPosition({x:n.origin.x,y:n.origin.y},n.hit.element))return!1;n.hit.allHitElements=e.getElementsAtPosition(n.origin.x,n.origin.y);var s=n.hit.element,u=n.hit.allHitElements.some((function(t){return e.isASelectedElement(t)}));if(null!==s&&u||t.shiftKey||n.hit.hasHitCommonBoundingBoxOfSelectedElements||e.clearSelection(s),e.state.editingLinearElement)e.setState({selectedElementIds:(0,p.Z)({},e.state.editingLinearElement.elementId,!0)});else if(null!=s){if(t[O.tW.CTRL_OR_CMD])return e.state.selectedElementIds[s.id]||(n.hit.wasAddedToSelection=!0),e.setState((function(t){return Xn(Xn({},(0,$.iE)(t,s)),{},{previousSelectedElementIds:e.state.selectedElementIds})})),!1;e.state.selectedElementIds[s.id]||(e.state.editingGroupId&&!(0,$.Nd)(s,e.state.editingGroupId)&&e.setState({selectedElementIds:{},selectedGroupIds:{},editingGroupId:null}),u||n.hit.hasHitCommonBoundingBoxOfSelectedElements||(e.setState((function(t){return(0,$.bO)(Xn(Xn({},t),{},{selectedElementIds:Xn(Xn({},t.selectedElementIds),{},(0,p.Z)({},s.id,!0)),showHyperlinkPopup:!!s.link&&"info"}),e.scene.getNonDeletedElements())})),n.hit.wasAddedToSelection=!0))}e.setState({previousSelectedElementIds:e.state.selectedElementIds})}}return!1},this.handleTextOnPointerDown=function(t,n){if(!(0,U.iB)(e.state.editingElement)){var r=n.origin.x,o=n.origin.y,i=e.getElementAtPosition(r,o,{includeBoundTextElement:!0}),a=(0,Ie.OW)(e.scene.getNonDeletedElements(),e.state,r,o);(0,V.Xo)(i)&&(a=i,r=i.x+i.width/2,o=i.y+i.height/2),e.startTextEditing({sceneX:r,sceneY:o,insertAtParentCenter:!t.altKey,container:a}),(0,P.z8)(e.canvas),e.state.activeTool.locked||e.setState({activeTool:(0,P.Om)(e.state,{type:"selection"})})}},this.handleFreeDrawElementOnPointerDown=function(t,n,r){var a=(0,ne.wC)(r.origin.x,r.origin.y,null),l=(0,o.Z)(a,2),c=l[0],s=l[1],u=(0,Y.KE)({type:n,x:c,y:s,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,roundness:null,simulatePressure:.5===t.pressure,locked:!1});e.setState((function(e){return{selectedElementIds:Xn(Xn({},e.selectedElementIds),{},(0,p.Z)({},u.id,!1))}}));var d=u.simulatePressure?u.pressures:[].concat((0,i.Z)(u.pressures),[t.pressure]);(0,_.DR)(u,{points:[[0,0]],pressures:d});var f=(0,C.Y9)(r.origin,e.scene);e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[u])),e.setState({draggingElement:u,editingElement:u,startBoundElement:f,suggestedBindings:[]})},this.createImageElement=function(t){var n=t.sceneX,r=t.sceneY,i=(0,ne.wC)(n,r,e.state.gridSize),a=(0,o.Z)(i,2),l=a[0],c=a[1];return(0,U.vw)({type:"image",x:l,y:c,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,roundness:null,opacity:e.state.currentItemOpacity,locked:!1})},this.handleLinearElementOnPointerDown=function(t,n,r){if(e.state.multiElement){var a=e.state.multiElement;if("line"===a.type&&(0,ne.g6)(a.points,e.state.zoom.value))return(0,_.DR)(a,{lastCommittedPoint:a.points[a.points.length-1]}),void e.actionManager.executeAction(k.pL);var l=a.x,c=a.y,s=a.lastCommittedPoint;if(a.points.length>1&&s&&(0,ne.LW)(r.origin.x-l,r.origin.y-c,s[0],s[1])<T.qx)return void e.actionManager.executeAction(k.pL);e.setState((function(e){return{selectedElementIds:Xn(Xn({},e.selectedElementIds),{},(0,p.Z)({},a.id,!0))}})),(0,_.DR)(a,{lastCommittedPoint:a.points[a.points.length-1]}),(0,P.KJ)(e.canvas,T.oc.POINTER)}else{var u=(0,ne.wC)(r.origin.x,r.origin.y,e.state.gridSize),d=(0,o.Z)(u,2),f=d[0],h=d[1],m=e.state,g=m.currentItemStartArrowhead,v=m.currentItemEndArrowhead,b="arrow"===n?[g,v]:[null,null],y=(0,o.Z)(b,2),x=y[0],w=y[1],E=(0,U.y8)({type:n,x:f,y:h,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,roundness:"round"===e.state.currentItemRoundness?{type:T.a6.PROPORTIONAL_RADIUS}:null,startArrowhead:x,endArrowhead:w,locked:!1});e.setState((function(e){return{selectedElementIds:Xn(Xn({},e.selectedElementIds),{},(0,p.Z)({},E.id,!1))}})),(0,_.DR)(E,{points:[].concat((0,i.Z)(E.points),[[0,0]])});var j=(0,C.Y9)(r.origin,e.scene);e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[E])),e.setState({draggingElement:E,editingElement:E,startBoundElement:j,suggestedBindings:[]})}},this.createGenericElementOnPointerDown=function(t,n){var r=(0,ne.wC)(n.origin.x,n.origin.y,e.state.gridSize),a=(0,o.Z)(r,2),l=a[0],c=a[1],s=(0,U.Up)({type:t,x:l,y:c,strokeColor:e.state.currentItemStrokeColor,backgroundColor:e.state.currentItemBackgroundColor,fillStyle:e.state.currentItemFillStyle,strokeWidth:e.state.currentItemStrokeWidth,strokeStyle:e.state.currentItemStrokeStyle,roughness:e.state.currentItemRoughness,opacity:e.state.currentItemOpacity,roundness:"round"===e.state.currentItemRoundness?{type:(0,V.QI)(t)?T.a6.ADAPTIVE_RADIUS:T.a6.PROPORTIONAL_RADIUS}:null,locked:!1});"selection"===s.type?e.setState({selectionElement:s,draggingElement:s}):(e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[s])),e.setState({multiElement:null,draggingElement:s,editingElement:s}))},this.restoreReadyToEraseElements=function(t){var n=e.scene.getElementsIncludingDeleted().map((function(e){return t.elementIdsToErase[e.id]&&t.elementIdsToErase[e.id].erase?(0,_.BE)(e,{opacity:t.elementIdsToErase[e.id].opacity}):(0,V.Xh)(e)&&t.elementIdsToErase[e.containerId]&&t.elementIdsToErase[e.containerId].erase?(0,_.BE)(e,{opacity:t.elementIdsToErase[e.containerId].opacity}):e}));e.scene.replaceAllElements(n)},this.eraseElements=function(t){var n=e.scene.getElementsIncludingDeleted().map((function(e){return t.elementIdsToErase[e.id]&&t.elementIdsToErase[e.id].erase||(0,V.Xh)(e)&&t.elementIdsToErase[e.containerId]&&t.elementIdsToErase[e.containerId].erase?(0,_.BE)(e,{isDeleted:!0}):e}));e.history.resumeRecording(),e.scene.replaceAllElements(n)},this.initializeImage=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,l,c,s,u,d,f,h,g,v,b,y,x;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=n.imageFile,c=n.imageElement,s=n.showCursorImagePreview,u=void 0!==s&&s,(0,Ye.Wr)(l)){t.next=3;break}throw new Error((0,S.t)("errors.unsupportedFileType"));case 3:if(d=l.type,(0,P.KJ)(e.canvas,"wait"),d!==T.LO.svg){t.next=23;break}return t.prev=6,t.t0=Ye.Pn,t.t1=In.bp,t.next=11,l.text();case 11:return t.t2=t.sent,t.next=14,(0,t.t1)(t.t2);case 14:t.t3=t.sent,t.t4=l.name,l=(0,t.t0)(t.t3,t.t4),t.next=23;break;case 19:throw t.prev=19,t.t5=t.catch(6),console.warn(t.t5),new Error((0,S.t)("errors.svgImageInsertError"));case 23:return t.next=25,(null===(r=(o=e.props).generateIdForFile)||void 0===r?void 0:r.call(o,l))||(0,Ye.tW)(l);case 25:if(f=t.sent){t.next=29;break}throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),new Error((0,S.t)("errors.imageInsertError"));case 29:if(null!=(h=e.files[f])&&h.dataURL){t.next=42;break}return t.prev=31,t.next=34,(0,Ye.Tu)(l,{maxWidthOrHeight:T.h6});case 34:l=t.sent,t.next=40;break;case 37:t.prev=37,t.t6=t.catch(31),console.error("error trying to resing image file on insertion",t.t6);case 40:if(!(l.size>T.$n)){t.next=42;break}throw new Error((0,S.t)("errors.fileTooBig",{maxSize:"".concat(Math.trunc(T.$n/1024/1024),"MB")}));case 42:if(u&&(v=null===(g=e.files[f])||void 0===g?void 0:g.dataURL,b=v&&(0,Ye.KG)(v),e.setImagePreviewCursor(b||l)),t.t7=null===(i=e.files[f])||void 0===i?void 0:i.dataURL,t.t7){t.next=48;break}return t.next=47,(0,Ye.Sf)(l);case 47:t.t7=t.sent;case 48:return y=t.t7,x=(0,_.DR)(c,{fileId:f},!1),t.abrupt("return",new Promise(function(){var t=(0,a.Z)(m().mark((function t(n,r){var o,i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e.files=Xn(Xn({},e.files),{},(0,p.Z)({},f,{mimeType:d,id:f,dataURL:y,created:Date.now(),lastRetrieved:Date.now()})),i=e.imageCache.get(f)){t.next=7;break}return e.addNewImagesToImageCache(),t.next=7,e.updateImageCache([x]);case 7:if(!((null==i?void 0:i.image)instanceof Promise)){t.next=10;break}return t.next=10,i.image;case 10:e.state.pendingImageElementId!==x.id&&(null===(o=e.state.draggingElement)||void 0===o?void 0:o.id)!==x.id&&e.initializeImageDimensions(x,!0),n(x),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(0),console.error(t.t0),r(new Error((0,S.t)("errors.imageInsertError")));case 18:return t.prev=18,u||(0,P.z8)(e.canvas),t.finish(18);case 21:case"end":return t.stop()}}),t,null,[[0,14,18,21]])})));return function(e,n){return t.apply(this,arguments)}}()));case 51:case"end":return t.stop()}}),t,null,[[6,19],[31,37]])})));return function(e){return t.apply(this,arguments)}}(),this.insertImageElement=function(){var t=(0,a.Z)(m().mark((function t(n,r,o){return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.scene.replaceAllElements([].concat((0,i.Z)(e.scene.getElementsIncludingDeleted()),[n])),t.prev=1,t.next=4,e.initializeImage({imageFile:r,imageElement:n,showCursorImagePreview:o});case 4:t.next=11;break;case 6:t.prev=6,t.t0=t.catch(1),(0,_.DR)(n,{isDeleted:!0}),e.actionManager.executeAction(k.pL),e.setState({errorMessage:t.t0.message||(0,S.t)("errors.imageInsertError")});case 11:case"end":return t.stop()}}),t,null,[[1,6]])})));return function(e,n,r){return t.apply(this,arguments)}}(),this.setImagePreviewCursor=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=96,t.next=3,(0,Ye.Tu)(n,{maxWidthOrHeight:r});case 3:return o=t.sent,t.next=6,(0,Ye.Sf)(o);case 6:if(i=t.sent,n.type!==T.LO.svg){t.next=20;break}return t.next=10,(0,In.PK)(i);case 10:a=t.sent,l=Math.min(a.height,r),(c=l*(a.width/a.height))>r&&(l=(c=r)*(a.height/a.width)),(s=document.createElement("canvas")).height=l,s.width=c,s.getContext("2d").drawImage(a,0,0,c,l),i=s.toDataURL(T.LO.svg);case 20:e.state.pendingImageElementId&&(0,P.KJ)(e.canvas,"url(".concat(i,") 4 4, auto"));case 21:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.onImageAction=(0,a.Z)(m().mark((function t(){var n,r,o,i,a,l,c,s,u,d=arguments;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=d.length>0&&void 0!==d[0]?d[0]:{insertOnCanvasDirectly:!1},r=n.insertOnCanvasDirectly,t.prev=1,o=e.state.width/2+e.state.offsetLeft,i=e.state.height/2+e.state.offsetTop,a=(0,P.dE)({clientX:o,clientY:i},e.state),l=a.x,c=a.y,t.next=7,(0,Xe.I$)({description:"Image",extensions:Object.keys(T.KL)});case 7:s=t.sent,u=e.createImageElement({sceneX:l,sceneY:c}),r?(e.insertImageElement(u,s),e.initializeImageDimensions(u),e.setState({selectedElementIds:(0,p.Z)({},u.id,!0)},(function(){e.actionManager.executeAction(k.pL)}))):e.setState({pendingImageElementId:u.id},(function(){e.insertImageElement(u,s,!0)})),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(1),"AbortError"!==t.t0.name?console.error(t.t0):console.warn(t.t0),e.setState({pendingImageElementId:null,editingElement:null,activeTool:(0,P.Om)(e.state,{type:"selection"})},(function(){e.actionManager.executeAction(k.pL)}));case 16:case"end":return t.stop()}}),t,null,[[1,12]])}))),this.initializeImageDimensions=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(0,V.wi)(t)&&(null===(n=e.imageCache.get(t.fileId))||void 0===n?void 0:n.image);if(!o||o instanceof Promise){if(t.width<T.f/e.state.zoom.value&&t.height<T.f/e.state.zoom.value){var i=100/e.state.zoom.value;(0,_.DR)(t,{x:t.x-i/2,y:t.y-i/2,width:i,height:i})}}else if(r||t.width<T.f/e.state.zoom.value&&t.height<T.f/e.state.zoom.value){var a=Math.max(e.state.height-120,160),l=Math.min(a,Math.floor(.5*e.state.height)/e.state.zoom.value),c=Math.min(o.naturalHeight,l),s=c*(o.naturalWidth/o.naturalHeight),u=t.x+t.width/2-s/2,d=t.y+t.height/2-c/2;(0,_.DR)(t,{x:u,y:d,width:s,height:c})}},this.updateImageCache=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s,u=arguments;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:e.files,t.next=3,(0,In.Xx)({imageCache:e.imageCache,fileIds:n.map((function(e){return e.fileId})),files:r});case 3:if(o=t.sent,i=o.updatedFiles,a=o.erroredFiles,i.size||a.size){l=Kn(n);try{for(l.s();!(c=l.n()).done;)s=c.value,i.has(s.fileId)&&(0,oe.bI)(s)}catch(e){l.e(e)}finally{l.f()}}return a.size&&e.scene.replaceAllElements(e.scene.getElementsIncludingDeleted().map((function(e){return(0,V.wi)(e)&&a.has(e.fileId)?(0,_.BE)(e,{status:"error"}):e}))),t.abrupt("return",{updatedFiles:i,erroredFiles:a});case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.addNewImagesToImageCache=(0,a.Z)(m().mark((function t(){var n,r,o,i,a=arguments;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:(0,In.oA)(e.scene.getNonDeletedElements()),r=a.length>1&&void 0!==a[1]?a[1]:e.files,!(o=n.filter((function(t){return!t.isDeleted&&!e.imageCache.has(t.fileId)}))).length){t.next=9;break}return t.next=6,e.updateImageCache(o,r);case 6:i=t.sent,i.updatedFiles.size&&e.scene.informMutation();case 9:case"end":return t.stop()}}),t)}))),this.scheduleImageRefresh=Dn()((function(){e.addNewImagesToImageCache()}),T.LL),this.updateBindingEnabledOnPointerMove=function(t){var n=(0,C.cz)(t);e.state.isBindingEnabled!==n&&e.setState({isBindingEnabled:n})},this.maybeSuggestBindingAtCursor=function(t){var n=(0,C.Y9)(t,e.scene);e.setState({suggestedBindings:null!=n?[n]:[]})},this.maybeSuggestBindingsForLinearElementAtCoords=function(t,n,r){if(n.length){var o=n.reduce((function(n,o){var i=(0,C.Y9)(o,e.scene);return null==i||(0,C.DK)(t,null==r?void 0:r.id,i)||n.push(i),n}),[]);e.setState({suggestedBindings:o})}},this.handleCanvasRef=function(t){var n,r,o;null!==t?(e.canvas=t,e.rc=y.Z.canvas(e.canvas),e.canvas.addEventListener(T.Ks.WHEEL,e.handleWheel,{passive:!1}),e.canvas.addEventListener(T.Ks.TOUCH_START,e.onTapStart),e.canvas.addEventListener(T.Ks.TOUCH_END,e.onTapEnd)):(null===(n=e.canvas)||void 0===n||n.removeEventListener(T.Ks.WHEEL,e.handleWheel),null===(r=e.canvas)||void 0===r||r.removeEventListener(T.Ks.TOUCH_START,e.onTapStart),null===(o=e.canvas)||void 0===o||o.removeEventListener(T.Ks.TOUCH_END,e.onTapEnd))},this.handleAppOnDrop=function(){var t=(0,a.Z)(m().mark((function t(n){var r,o,i,a,l,c,s,u,d,f;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ye.bv)(n);case 2:if(r=t.sent,o=r.file,i=r.fileHandle,t.prev=5,!(0,Ye.Wr)(o)){t.next=26;break}if((null==o?void 0:o.type)!==T.LO.png&&(null==o?void 0:o.type)!==T.LO.svg){t.next=20;break}return t.prev=8,t.next=11,(0,H.cT)(o,e.state,e.scene.getElementsIncludingDeleted(),i);case 11:return a=t.sent,e.syncActionResult(Xn(Xn({},a),{},{appState:Xn(Xn({},a.appState||e.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),t.abrupt("return");case 16:if(t.prev=16,t.t0=t.catch(8),"EncodingError"===t.t0.name){t.next=20;break}throw t.t0;case 20:return l=(0,P.dE)(n,e.state),c=l.x,s=l.y,u=e.createImageElement({sceneX:c,sceneY:s}),e.insertImageElement(u,o),e.initializeImageDimensions(u),e.setState({selectedElementIds:(0,p.Z)({},u.id,!0)}),t.abrupt("return");case 26:t.next=31;break;case 28:return t.prev=28,t.t1=t.catch(5),t.abrupt("return",e.setState({isLoading:!1,errorMessage:t.t1.message}));case 31:if(!(d=n.dataTransfer.getData(T.LO.excalidrawlib))||"string"!=typeof d){t.next=35;break}try{f=(0,Ye.wf)(d),e.addElementsFromPasteOrLibrary({elements:(0,W.WV)(f),position:n,files:null})}catch(t){e.setState({errorMessage:t.message})}return t.abrupt("return");case 35:if(!o){t.next=38;break}return t.next=38,e.loadFileToCanvas(o,i);case 38:case"end":return t.stop()}}),t,null,[[5,28],[8,16]])})));return function(e){return t.apply(this,arguments)}}(),this.loadFileToCanvas=function(){var t=(0,a.Z)(m().mark((function t(n,r){var o;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Ye.gY)(n);case 2:return n=t.sent,t.prev=3,t.next=6,(0,Ye.ZY)(n,e.state,e.scene.getElementsIncludingDeleted(),r);case 6:if((o=t.sent).type!==T.LO.excalidraw){t.next=12;break}e.setState({isLoading:!0}),e.syncActionResult(Xn(Xn({},o.data),{},{appState:Xn(Xn({},o.data.appState||e.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),t.next=15;break;case 12:if(o.type!==T.LO.excalidrawlib){t.next=15;break}return t.next=15,e.library.updateLibrary({libraryItems:n,merge:!0,openLibraryMenu:!0}).catch((function(t){console.error(t),e.setState({errorMessage:(0,S.t)("errors.importLibraryError")})}));case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(3),e.setState({isLoading:!1,errorMessage:t.t0.message});case 20:case"end":return t.stop()}}),t,null,[[3,17]])})));return function(e,n){return t.apply(this,arguments)}}(),this.handleCanvasContextMenu=function(t){if(t.preventDefault(),"touch"!==t.nativeEvent.pointerType&&("pen"!==t.nativeEvent.pointerType||t.button===T.Oh.SECONDARY)||"selection"===e.state.activeTool.type){var n=(0,P.dE)(t,e.state),r=n.x,o=n.y,i=e.getElementAtPosition(r,o,{preferSelected:!0,includeLockedElements:!0}),a=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state),l=e.isHittingCommonBoundingBoxOfSelectedElements({x:r,y:o},a),c=i||l?"element":"canvas",s=e.excalidrawContainerRef.current.getBoundingClientRect(),u=s.top,d=s.left,f=t.clientX-d,h=t.clientY-u;(0,L.L)("contextMenu","openContextMenu",c),e.setState(Xn(Xn({},i&&!e.state.selectedElementIds[i.id]?(0,$.bO)(Xn(Xn({},e.state),{},{selectedElementIds:(0,p.Z)({},i.id,!0),selectedLinearElement:(0,V.bt)(i)?new K._(i,e.scene):null}),e.scene.getNonDeletedElements()):e.state),{},{showHyperlinkPopup:!1}),(function(){e.setState({contextMenu:{top:h,left:f,items:e.getContextMenuItems(c)}})}))}},this.maybeDragNewGenericElement=function(t,n){var r=e.state.draggingElement,i=t.lastCoords;if(r)if("selection"===r.type&&"eraser"!==e.state.activeTool.type)(0,U.EJ)(r,e.state.activeTool.type,t.origin.x,t.origin.y,i.x,i.y,(0,P.TE)(t.origin.x,i.x),(0,P.TE)(t.origin.y,i.y),(0,O.E0)(n),(0,O.OA)(n));else{var a,l=(0,ne.wC)(i.x,i.y,e.state.gridSize),c=(0,o.Z)(l,2),s=c[0],u=c[1],d=(0,V.wi)(r)&&(null===(a=e.imageCache.get(r.fileId))||void 0===a?void 0:a.image),f=!d||d instanceof Promise?null:d.width/d.height;(0,U.EJ)(r,e.state.activeTool.type,t.originInGrid.x,t.originInGrid.y,s,u,(0,P.TE)(t.originInGrid.x,s),(0,P.TE)(t.originInGrid.y,u),(0,V.pC)(r)?!(0,O.E0)(n):(0,O.E0)(n),(0,O.OA)(n),f),e.maybeSuggestBindingForAll([r])}},this.maybeHandleResize=function(t,n){var r=(0,ie.eD)(e.scene.getNonDeletedElements(),e.state),i=t.resize.handleType;e.setState({isResizing:i&&"rotation"!==i,isRotating:"rotation"===i});var a=t.lastCoords,l=(0,ne.wC)(a.x-t.resize.offset.x,a.y-t.resize.offset.y,e.state.gridSize),c=(0,o.Z)(l,2),s=c[0],u=c[1];return!!(0,U.vY)(t,i,r,t.resize.arrowDirection,(0,O.Ge)(n),(0,O.OA)(n),1===r.length&&(0,V.pC)(r[0])?!(0,O.E0)(n):(0,O.E0)(n),s,u,t.resize.center.x,t.resize.center.y)&&(e.maybeSuggestBindingForAll(r),!0)},this.getContextMenuItems=function(t){var n=[];return n.push(k.jK,k.FA),"canvas"===t?e.state.viewModeEnabled?[].concat(n,[k.Pb,k.JN,Tn,k.u0]):[Bn.yQ,Se,k.jK,k.FA,k.zp,Se,k.Yy,Rn.U,Se,k.Pb,k.JN,Tn,k.u0]:(n.push(k.zp),e.state.viewModeEnabled?[k.uN].concat(n):[k.ZM,k.uN,Bn.yQ,Se].concat(n,[Se,k.pw,k.W3,Se,k.EQ,k.y7,k.vD,Wn.JQ,k.s,Se,k.FL,Se,k.V,k.yA,k.zi,k.BZ,Se,k.jl,k.kt,Se,k.Qs,k.nz,k.xF,k.$h,Se,k.X9]))},this.handleWheel=(0,P.tH)((function(t){if(t.preventDefault(),!br){var n=t.deltaX,r=t.deltaY;if(t.metaKey||t.ctrlKey){var o=Math.sign(r),i=100*T.V4,a=Math.abs(r),l=r;a>i&&(l=i*o);var c=e.state.zoom.value-l/100;return c+=Math.log10(Math.max(1,e.state.zoom.value))*-o*Math.min(1,a/20),e.translateCanvas((function(e){return Xn(Xn({},(0,le.E)({viewportX:mr,viewportY:gr,nextZoom:(0,ie.j)(c)},e)),{},{shouldCacheIgnoreZoom:!0})})),void e.resetShouldCacheIgnoreZoomDebounced()}t.shiftKey?e.translateCanvas((function(e){var t=e.zoom;return{scrollX:e.scrollX-(r||n)/t.value}})):e.translateCanvas((function(e){var t=e.zoom,o=e.scrollX,i=e.scrollY;return{scrollX:o-n/t.value,scrollY:i-r/t.value}}))}})),this.savePointer=function(t,n,r){var o,i;if(t&&n){var a=(0,P.dE)({clientX:t,clientY:n},e.state);isNaN(a.x)||isNaN(a.y),null===(o=(i=e.props).onPointerUpdate)||void 0===o||o.call(i,{pointer:a,button:r,pointersMap:Cr.pointers})}},this.resetShouldCacheIgnoreZoomDebounced=(0,P.Ds)((function(){e.unmounted||e.setState({shouldCacheIgnoreZoom:!1})}),300),this.updateDOMRect=function(t){var n;if(null!==(n=e.excalidrawContainerRef)&&void 0!==n&&n.current){var r=e.excalidrawContainerRef.current.getBoundingClientRect(),o=r.width,i=r.height,a=r.left,l=r.top,c=e.state,s=c.width,u=c.height,d=c.offsetTop,f=c.offsetLeft;if(o===s&&i===u&&a===f&&l===d)return void(t&&t());e.setState({width:o,height:i,offsetLeft:a,offsetTop:l},(function(){t&&t()}))}},this.refresh=function(){e.setState(Xn({},e.getCanvasOffsets()))}};"production"!==T.Vi.TEST&&"production"!==T.Vi.DEVELOPMENT||(window.h=window.h||{},Object.defineProperties(window.h,{elements:{configurable:!0,get:function(){var e;return null===(e=this.app)||void 0===e?void 0:e.scene.getElementsIncludingDeleted()},set:function(e){var t;return null===(t=this.app)||void 0===t?void 0:t.scene.replaceAllElements(e)}}}));var Ir=Pr},7172:function(e,t,n){"use strict";n.d(t,{z:function(){return S}});var r=n(7169),o=n(2726),i=n(45),a=n(6340),l=n(487),c=n.n(l),s=n(631),u=n.n(s),d=n(2052),f=n.n(d),p=n(4010),h=n.n(p),m=n(1469),g=n.n(m),v=n(9329),b=n.n(v),y=n(3137),x={};x.styleTagTransform=b(),x.setAttributes=h(),x.insert=f().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=g();c()(y.Z,x),y.Z&&y.Z.locals&&y.Z.locals;var w=n(4512),k=["type","onSelect","selected","children","className"];function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=function(e){var t=e.type,n=void 0===t?"button":t,r=e.onSelect,l=e.selected,c=e.children,s=e.className,u=void 0===s?"":s,d=(0,o.Z)(e,k);return(0,w.jsx)("button",j(j({onClick:(0,a.Mj)(d.onClick,(function(e){r()})),type:n,className:(0,i.Z)("excalidraw-button",u,{selected:l})},d),{},{children:c}))}},3807:function(e,t,n){"use strict";n.d(t,{o:function(){return x}});var r=n(45),o=n(3646),i=n(487),a=n.n(i),l=n(631),c=n.n(l),s=n(2052),u=n.n(s),d=n(4010),f=n.n(d),p=n(1469),h=n.n(p),m=n(9329),g=n.n(m),v=n(6029),b={};b.styleTagTransform=g(),b.setAttributes=f(),b.insert=u().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=h();a()(v.Z,b),v.Z&&v.Z.locals&&v.Z.locals;var y=n(4512),x=function(e){var t=e.children,n=e.checked,i=e.onChange,a=e.className;return(0,y.jsxs)("div",{className:(0,r.Z)("Checkbox",a,{"is-checked":n}),onClick:function(e){i(!n,e),e.currentTarget.querySelector(".Checkbox-box").focus()},children:[(0,y.jsx)("button",{className:"Checkbox-box",role:"checkbox","aria-checked":n,children:o.eQ}),(0,y.jsx)("div",{className:"Checkbox-label",children:t})]})}},8206:function(e,t,n){"use strict";n.d(t,{z:function(){return Tr},L:function(){return _r}});var r=n(2577),o=n(6340),i=n(45),a=n(56),l=n(4512),c=function(e){var t,n=e.onChange,r=e.type,o=e.activeColor,c=e.topPicks;return"elementStroke"===r&&(t=a.fY),"elementBackground"===r&&(t=a.eq),"canvasBackground"===r&&(t=a.ay),c&&(t=c),t?(0,l.jsx)("div",{className:"color-picker__top-picks",children:t.map((function(e){return(0,l.jsx)("button",{className:(0,i.Z)("color-picker__button",{active:e===o,"is-transparent":"transparent"===e||!e}),style:{"--swatch-color":e},type:"button",title:e,onClick:function(){return n(e)},children:(0,l.jsx)("div",{className:"color-picker__button-outline"})},e)}))}):(console.error("Invalid type for TopPicks"),null)},s=n(9787),u=n.n(s),d=n(8211),f=n(4739),p=n(1930),h=function(e){for(var t=e.palette,n=e.hex,o=0,i=Object.entries(t);o<i.length;o++){var a=(0,r.Z)(i[o],2),l=a[0],c=a[1];if(Array.isArray(c)){var s=c.indexOf(n);if(s>-1)return{colorName:l,shade:s}}else if(c===n)return{colorName:l,shade:null}}return null},m=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),g=function(e){var t=e.color,n=e.palette;return!!t&&!Object.values(n).flat().includes(t)},v=(0,f.cn)(null),b=function(e,t,n){return(299*e+587*t+114*n)/1e3>=160?"black":"white"},y=function(e,t){if(t){var n=(new Option).style;if(n.color=e,n.color){var r=n.color.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),o=parseInt(r[0]),i=parseInt(r[1]),a=parseInt(r[2]);return b(o,i,a)}}if("transparent"===e)return"black";var l=parseInt(e.substring(1,3),16),c=parseInt(e.substring(3,5),16),s=parseInt(e.substring(5,7),16);return b(l,c,s)},x=function(e){var t=e.color,n=e.keyLabel,r=e.isCustomColor,o=void 0!==r&&r,i=e.isShade,a=void 0!==i&&i;return(0,l.jsxs)("div",{className:"color-picker__button__hotkey-label",style:{color:y(t,o)},children:[a&&"⇧",n]})},w=function(e){var t=e.hex,n=e.onChange,o=e.palette,a=h({hex:t||"transparent",palette:o}),c=(0,f.KO)(v),u=(0,r.Z)(c,2),p=u[0],m=u[1],g=(0,s.useRef)(null);if((0,s.useEffect)((function(){g.current&&"shades"===p&&g.current.focus()}),[a,p]),a){var b=a.colorName,y=a.shade,w=o[b];if(Array.isArray(w))return(0,l.jsx)("div",{className:"color-picker-content--default shades",children:w.map((function(e,t){return(0,l.jsxs)("button",{ref:t===y&&"shades"===p?g:void 0,tabIndex:-1,type:"button",className:(0,i.Z)("color-picker__button color-picker__button--large",{active:t===y}),"aria-label":"Shade",title:"".concat(b," - ").concat(t+1),style:e?{"--swatch-color":e}:void 0,onClick:function(){n(e),m("shades")},children:[(0,l.jsx)("div",{className:"color-picker__button-outline"}),(0,l.jsx)(x,{color:e,keyLabel:t+1,isShade:!0})]},t)}))})}return(0,l.jsxs)("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[(0,l.jsx)("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),(0,l.jsx)("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:(0,d.t)("colorPicker.noShades")})]})},k=function(e){var t=e.palette,n=e.color,o=e.onChange,a=(e.label,e.activeShade),c=h({hex:n||"transparent",palette:t}),u=(0,f.KO)(v),p=(0,r.Z)(u,2),g=p[0],b=p[1],y=(0,s.useRef)(null);return(0,s.useEffect)((function(){y.current&&"baseColors"===g&&y.current.focus()}),[null==c?void 0:c.colorName,g]),(0,l.jsx)("div",{className:"color-picker-content--default",children:Object.entries(t).map((function(e,t){var n=(0,r.Z)(e,2),s=n[0],u=n[1],f=(Array.isArray(u)?u[a]:u)||"transparent",p=m[t],h=(0,d.t)("colors.".concat(s.replace(/\d+/,"")),null,"");return(0,l.jsxs)("button",{ref:(null==c?void 0:c.colorName)===s?y:void 0,tabIndex:-1,type:"button",className:(0,i.Z)("color-picker__button color-picker__button--large",{active:(null==c?void 0:c.colorName)===s,"is-transparent":"transparent"===f||!f}),onClick:function(){o(f),b("baseColors")},title:"".concat(h).concat(f.startsWith("#")?" ".concat(f):""," — ").concat(p),"aria-label":"".concat(h," — ").concat(p),style:f?{"--swatch-color":f}:void 0,"data-testid":"color-".concat(s),children:[(0,l.jsx)("div",{className:"color-picker__button-outline"}),(0,l.jsx)(x,{color:f,keyLabel:p})]},s)}))})},E=function(e){var t=e.colors,n=e.color,o=e.onChange,a=e.label,c=(0,f.KO)(v),u=(0,r.Z)(c,2),d=u[0],p=u[1],h=(0,s.useRef)(null);return(0,s.useEffect)((function(){h.current&&h.current.focus()}),[n,d]),(0,l.jsx)("div",{className:"color-picker-content--default",children:t.map((function(e,t){return(0,l.jsxs)("button",{ref:n===e?h:void 0,tabIndex:-1,type:"button",className:(0,i.Z)("color-picker__button color-picker__button--large",{active:n===e,"is-transparent":"transparent"===e||!e}),onClick:function(){o(e),p("custom")},title:e,"aria-label":a,style:{"--swatch-color":e},children:[(0,l.jsx)("div",{className:"color-picker__button-outline"}),(0,l.jsx)(x,{color:e,keyLabel:t+1,isCustomColor:!0})]},t)}))})},j=n(6066),S=function(e,t,n){var r,o=Math.ceil(n/a.dC);switch(t=null!==(r=t)&&void 0!==r?r:-1,e){case"ArrowLeft":var i=t-1;return i<0?n-1:i;case"ArrowRight":return(t+1)%n;case"ArrowDown":var l=t+a.dC;return l>=n?t%a.dC:l;case"ArrowUp":var c=t-a.dC,s=c<0?a.dC*o+c:c;return s>=n?void 0:s}},O=function(e){var t=e.e,n=e.activeColorPickerSection,o=e.palette,i=e.hex,l=e.onChange,c=e.customColors,s=e.setActiveColorPickerSection,u=e.updateData,d=e.activeShade;if(t.key!==j.tW.ESCAPE&&i){var f=h({hex:i,palette:o});if(t.key===j.tW.TAB){var p={custom:!!c.length,baseColors:!0,shades:null!=(null==f?void 0:f.shade),hex:!0},g=Object.entries(p).reduce((function(e,t){var n=(0,r.Z)(t,2),o=n[0];return n[1]&&e.push(o),e}),[]),v=g.indexOf(n),b=t.shiftKey?-1:1,y=g[v+b>g.length-1?0:v+b<0?g.length-1:v+b];if(y&&s(y),"custom"===y)l(c[0]);else if("baseColors"===y){Object.entries(o).find((function(e){var t=(0,r.Z)(e,2),n=t[0],o=t[1];return Array.isArray(o)?o.includes(i):o===i?n:null}))||l(a.HO.black)}return t.preventDefault(),void t.stopPropagation()}if(function(e){var t=e.e,n=e.colorObj,r=e.onChange,o=e.palette,i=e.customColors,a=e.setActiveColorPickerSection,l=e.activeShade;if(null!=(null==n?void 0:n.shade)&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(t.code)&&t.shiftKey){var c=Number(t.code.slice(-1))-1;r(o[n.colorName][c]),a("shades")}if(["1","2","3","4","5"].includes(t.key)&&i[Number(t.key)-1]&&(r(i[Number(t.key)-1]),a("custom")),m.includes(t.key)){var s=m.indexOf(t.key),u=o[Object.keys(o)[s]];r(Array.isArray(u)?u[l]:u),a("baseColors")}}({e:t,colorObj:f,onChange:l,palette:o,customColors:c,setActiveColorPickerSection:s,activeShade:d}),"shades"===n&&f){var x=f.shade,w=S(t.key,x,a.dC);void 0!==w&&l(o[f.colorName][w])}if("baseColors"===n&&f){var k=f.colorName,E=Object.keys(o),O=E.indexOf(k),_=S(t.key,O,E.length);if(void 0!==_){var C=o[E[_]];l(Array.isArray(C)?C[d]:C)}}if("custom"===n){var P=c.indexOf(i),T=S(t.key,P,c.length);if(void 0!==T)l(c[T])}}else u({openPopup:null})},_=function(e){var t=e.children;return(0,l.jsx)("div",{className:"color-picker__heading",children:t})},C=function(e){var t,n=e.color,o=e.onChange,i=e.label,c=e.type,m=e.elements,b=e.palette,y=e.updateData,x=e.children,j=u().useState((function(){return"canvasBackground"===c?[]:function(e,t,n){var r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},o=e.filter((function(e){if(e.isDeleted)return!1;var o=e[r[t]];return g({color:o,palette:n})})),i=new Map;return o.forEach((function(e){var n=e[r[t]];i.has(n)?i.set(n,i.get(n)+1):i.set(n,1)})),(0,p.Z)(i.entries()).sort((function(e,t){return t[1]-e[1]})).map((function(e){return e[0]})).slice(0,a.Lx)}(m,c,b)})),S=(0,r.Z)(j,1)[0],C=(0,f.KO)(v),P=(0,r.Z)(C,2),T=P[0],I=P[1],M=h({hex:n||"transparent",palette:b});(0,s.useEffect)((function(){if(!T){var e=g({color:n,palette:b}),t=e&&!S.includes(n||"");I(t?"hex":e?"custom":null!=(null==M?void 0:M.shade)?"shades":"baseColors")}}),[T,n,b,I,M,S]);var D=(0,s.useState)(null!==(t=null==M?void 0:M.shade)&&void 0!==t?t:"elementBackground"===c?a._T:a.z8),A=(0,r.Z)(D,2),L=A[0],Z=A[1];return(0,s.useEffect)((function(){null!=(null==M?void 0:M.shade)&&Z(M.shade)}),[M]),(0,l.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":(0,d.t)("labels.colorPicker"),children:(0,l.jsxs)("div",{onKeyDown:function(e){e.preventDefault(),e.stopPropagation(),O({e:e,activeColorPickerSection:T,palette:b,hex:n,onChange:o,customColors:S,setActiveColorPickerSection:I,updateData:y,activeShade:L})},className:"color-picker-content",tabIndex:-1,children:[!!S.length&&(0,l.jsxs)("div",{children:[(0,l.jsx)(_,{children:(0,d.t)("colorPicker.mostUsedCustomColors")}),(0,l.jsx)(E,{colors:S,color:n,label:(0,d.t)("colorPicker.mostUsedCustomColors"),onChange:o})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(_,{children:(0,d.t)("colorPicker.colors")}),(0,l.jsx)(k,{color:n,label:i,palette:b,onChange:o,activeShade:L})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(_,{children:(0,d.t)("colorPicker.shades")}),(0,l.jsx)(w,{hex:n,onChange:o,palette:b})]}),x]})})},P=n(11),T=n(7217),I=n(9335),M=n(1267),D=n(3119),A=n(3060);const L="dismissableLayer.update",Z="dismissableLayer.pointerDownOutside",R="dismissableLayer.focusOutside";let z;const N=(0,s.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),B=(0,s.forwardRef)(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=e,d=(0,s.useContext)(N),[f,p]=(0,s.useState)(null),h=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,m]=(0,s.useState)({}),g=(0,I.e)(t,(e=>p(e))),v=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(b),x=f?v.indexOf(f):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,k=x>=y,E=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,A.W)(e),r=(0,s.useRef)(!1),o=(0,s.useRef)((()=>{}));return(0,s.useEffect)((()=>{const e=e=>{if(e.target&&!r.current){const i={originalEvent:e};function a(){W(Z,n,i,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));k&&!n&&(null==i||i(e),null==l||l(e),e.defaultPrevented||null==c||c())}),h),j=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,A.W)(e),r=(0,s.useRef)(!1);return(0,s.useEffect)((()=>{const e=e=>{if(e.target&&!r.current){W(R,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==c||c())}),h);return function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=(0,A.W)(e);(0,s.useEffect)((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}((e=>{x===d.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),(0,s.useEffect)((()=>{if(f)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(z=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),H(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=z)}}),[f,h,r,d]),(0,s.useEffect)((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),H())}),[f,d]),(0,s.useEffect)((()=>{const e=()=>m({});return document.addEventListener(L,e),()=>document.removeEventListener(L,e)}),[]),(0,s.createElement)(D.WV.div,(0,P.Z)({},u,{ref:g,style:{pointerEvents:w?k?"auto":"none":void 0,...e.style},onFocusCapture:(0,T.M)(e.onFocusCapture,j.onFocusCapture),onBlurCapture:(0,T.M)(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:(0,T.M)(e.onPointerDownCapture,E.onPointerDownCapture)}))}));function H(){const e=new CustomEvent(L);document.dispatchEvent(e)}function W(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?(0,D.jH)(o,i):o.dispatchEvent(i)}let F=0;function U(){(0,s.useEffect)((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:K()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:K()),F++,()=>{1===F&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),F--}}),[])}function K(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Y="focusScope.autoFocusOnMount",V="focusScope.autoFocusOnUnmount",G={bubbles:!1,cancelable:!0},X=(0,s.forwardRef)(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,c]=(0,s.useState)(null),u=(0,A.W)(o),d=(0,A.W)(i),f=(0,s.useRef)(null),p=(0,I.e)(t,(e=>c(e))),h=(0,s.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,s.useEffect)((()=>{if(r){function e(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:Q(f.current,{select:!0})}function t(e){!h.paused&&l&&(l.contains(e.relatedTarget)||Q(f.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,h.paused]),(0,s.useEffect)((()=>{if(l){ee.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(Y,G);l.addEventListener(Y,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Q(r,{select:t}),document.activeElement!==n)return}((e=q(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Q(l))}return()=>{l.removeEventListener(Y,u),setTimeout((()=>{const e=new CustomEvent(V,G);l.addEventListener(V,d),l.dispatchEvent(e),e.defaultPrevented||Q(null!=t?t:document.body,{select:!0}),l.removeEventListener(V,d),ee.remove(h)}),0)}}var e}),[l,u,d,h]);const m=(0,s.useCallback)((e=>{if(!n&&!r)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=q(e),n=$(t,e),r=$(t.reverse(),e);return[n,r]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&Q(i,{select:!0})):(e.preventDefault(),n&&Q(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,h.paused]);return(0,s.createElement)(D.WV.div,(0,P.Z)({tabIndex:-1},a,{ref:p,onKeyDown:m}))}));function q(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $(e,t){for(const n of e)if(!J(n,{upTo:t}))return n}function J(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Q(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const ee=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=te(e,t),e.unshift(t)},remove(t){var n;e=te(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function te(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var ne=n(5622);function re(e){return e.split("-")[0]}function oe(e){return e.split("-")[1]}function ie(e){return["top","bottom"].includes(re(e))?"x":"y"}function ae(e){return"y"===e?"height":"width"}function le(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,l=ie(t),c=ae(l),s=r[c]/2-o[c]/2,u="x"===l;let d;switch(re(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(oe(t)){case"start":d[l]-=s*(n&&u?-1:1);break;case"end":d[l]+=s*(n&&u?-1:1)}return d}function ce(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function se(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function ue(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,h=ce(p),m=l[f?"floating"===d?"reference":"floating":d],g=se(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:u,strategy:c})),v=se(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...a.floating,x:r,y:o}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),strategy:c}):a[d]);return{top:g.top-v.top+h.top,bottom:v.bottom-g.bottom+h.bottom,left:g.left-v.left+h.left,right:v.right-g.right+h.right}}const de=Math.min,fe=Math.max;function pe(e,t,n){return fe(e,de(t,n))}const he=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=null!=e?e:{},{x:o,y:i,placement:a,rects:l,platform:c}=t;if(null==n)return{};const s=ce(r),u={x:o,y:i},d=ie(a),f=oe(a),p=ae(d),h=await c.getDimensions(n),m="y"===d?"top":"left",g="y"===d?"bottom":"right",v=l.reference[p]+l.reference[d]-u[d]-l.floating[p],b=u[d]-l.reference[d],y=await(null==c.getOffsetParent?void 0:c.getOffsetParent(n));let x=y?"y"===d?y.clientHeight||0:y.clientWidth||0:0;0===x&&(x=l.floating[p]);const w=v/2-b/2,k=s[m],E=x-h[p]-s[g],j=x/2-h[p]/2+w,S=pe(k,j,E),O=("start"===f?s[m]:s[g])>0&&j!==S&&l.reference[p]<=l.floating[p];return{[d]:u[d]-(O?j<k?k-j:E-j:0),data:{[d]:S,centerOffset:j-S}}}}),me={left:"right",right:"left",bottom:"top",top:"bottom"};function ge(e){return e.replace(/left|right|bottom|top/g,(e=>me[e]))}function ve(e,t,n){void 0===n&&(n=!1);const r=oe(e),o=ie(e),i=ae(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ge(a)),{main:a,cross:ge(a)}}const be={start:"end",end:"start"};function ye(e){return e.replace(/start|end/g,(e=>be[e]))}const xe=["top","right","bottom","left"],we=(xe.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:s=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...h}=e,m=re(r),g=d||(m!==a&&p?function(e){const t=ge(e);return[ye(e),t,ye(t)]}(a):[ge(a)]),v=[a,...g],b=await ue(t,h),y=[];let x=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&y.push(b[m]),u){const{main:e,cross:t}=ve(r,i,await(null==l.isRTL?void 0:l.isRTL(c.floating)));y.push(b[e],b[t])}if(x=[...x,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,k;const e=(null!=(w=null==(k=o.flip)?void 0:k.index)?w:0)+1,t=v[e];if(t)return{data:{index:e,overflows:x},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var E;const e=null==(E=x.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}});function ke(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ee(e){return xe.some((t=>e[t]>=0))}const je=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=ke(await ue(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:Ee(t)}}}case"escaped":{const t=ke(await ue(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:Ee(t)}}}default:return{}}}}},Se=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=re(n),l=oe(n),c="x"===ie(n),s=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),c?{x:p*u,y:f*s}:{x:f*s,y:p*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function Oe(e){return"x"===e?"y":"x"}const _e=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=e,s={x:n,y:r},u=await ue(t,c),d=ie(re(o)),f=Oe(d);let p=s[d],h=s[f];if(i){const e="y"===d?"bottom":"right";p=pe(p+u["y"===d?"top":"left"],p,p-u[e])}if(a){const e="y"===f?"bottom":"right";h=pe(h+u["y"===f?"top":"left"],h,h-u[e])}const m=l.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},Ce=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:s=!0}=e,u={x:n,y:r},d=ie(o),f=Oe(d);let p=u[d],h=u[f];const m="function"==typeof l?l({...i,placement:o}):l,g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var v,b,y,x;const e="y"===d?"width":"height",t=["top","left"].includes(re(o)),n=i.reference[f]-i.floating[e]+(t&&null!=(v=null==(b=a.offset)?void 0:b[f])?v:0)+(t?0:g.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:null!=(y=null==(x=a.offset)?void 0:x[f])?y:0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}},Pe=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a,...l}=e,c=await ue(t,l),s=re(n),u=oe(n);let d,f;"top"===s||"bottom"===s?(d=s,f=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(f=s,d="end"===u?"top":"bottom");const p=fe(c.left,0),h=fe(c.right,0),m=fe(c.top,0),g=fe(c.bottom,0),v={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==m||0!==g?m+g:fe(c.top,c.bottom)):c[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==h?p+h:fe(c.left,c.right)):c[f])},b=await o.getDimensions(i.floating);null==a||a({...t,...v});const y=await o.getDimensions(i.floating);return b.width!==y.width||b.height!==y.height?{reset:{rects:!0}}:{}}}};function Te(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Ie(e){if(null==e)return window;if(!Te(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Me(e){return Ie(e).getComputedStyle(e)}function De(e){return Te(e)?"":e?(e.nodeName||"").toLowerCase():""}function Ae(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function Le(e){return e instanceof Ie(e).HTMLElement}function Ze(e){return e instanceof Ie(e).Element}function Re(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Ie(e).ShadowRoot||e instanceof ShadowRoot)}function ze(e){const{overflow:t,overflowX:n,overflowY:r}=Me(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Ne(e){return["table","td","th"].includes(De(e))}function Be(e){const t=/firefox/i.test(Ae()),n=Me(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function He(){return!/^((?!chrome|android).)*safari/i.test(Ae())}const We=Math.min,Fe=Math.max,Ue=Math.round;function Ke(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let c=1,s=1;t&&Le(e)&&(c=e.offsetWidth>0&&Ue(l.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Ue(l.height)/e.offsetHeight||1);const u=Ze(e)?Ie(e):window,d=!He()&&n,f=(l.left+(d&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/c,p=(l.top+(d&&null!=(i=null==(a=u.visualViewport)?void 0:a.offsetTop)?i:0))/s,h=l.width/c,m=l.height/s;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function Ye(e){return(t=e,(t instanceof Ie(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Ve(e){return Ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ge(e){return Ke(Ye(e)).left+Ve(e).scrollLeft}function Xe(e,t,n){const r=Le(t),o=Ye(t),i=Ke(e,r&&function(e){const t=Ke(e);return Ue(t.width)!==e.offsetWidth||Ue(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==De(t)||ze(o))&&(a=Ve(t)),Le(t)){const e=Ke(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Ge(o));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function qe(e){return"html"===De(e)?e:e.assignedSlot||e.parentNode||(Re(e)?e.host:null)||Ye(e)}function $e(e){return Le(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Je(e){const t=Ie(e);let n=$e(e);for(;n&&Ne(n)&&"static"===getComputedStyle(n).position;)n=$e(n);return n&&("html"===De(n)||"body"===De(n)&&"static"===getComputedStyle(n).position&&!Be(n))?t:n||function(e){let t=qe(e);for(Re(t)&&(t=t.host);Le(t)&&!["html","body"].includes(De(t));){if(Be(t))return t;t=t.parentNode}return null}(e)||t}function Qe(e){if(Le(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Ke(e);return{width:t.width,height:t.height}}function et(e){const t=qe(e);return["html","body","#document"].includes(De(t))?e.ownerDocument.body:Le(t)&&ze(t)?t:et(t)}function tt(e,t){var n;void 0===t&&(t=[]);const r=et(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Ie(r),a=o?[i].concat(i.visualViewport||[],ze(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(tt(a))}function nt(e,t,n){return"viewport"===t?se(function(e,t){const n=Ie(e),r=Ye(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){i=o.width,a=o.height;const e=He();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:l,y:c}}(e,n)):Ze(t)?function(e,t){const n=Ke(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):se(function(e){var t;const n=Ye(e),r=Ve(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Fe(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Fe(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+Ge(e);const c=-r.scrollTop;return"rtl"===Me(o||n).direction&&(l+=Fe(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:c}}(Ye(e)))}function rt(e){const t=tt(e),n=["absolute","fixed"].includes(Me(e).position)&&Le(e)?Je(e):e;return Ze(n)?t.filter((e=>Ze(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Re(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==De(e))):[]}const ot={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?rt(t):[].concat(n),r],a=i[0],l=i.reduce(((e,n)=>{const r=nt(t,n,o);return e.top=Fe(r.top,e.top),e.right=We(r.right,e.right),e.bottom=We(r.bottom,e.bottom),e.left=Fe(r.left,e.left),e}),nt(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Le(n),i=Ye(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==De(n)||ze(i))&&(a=Ve(n)),Le(n))){const e=Ke(n,!0);l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+l.x,y:t.y-a.scrollTop+l.y}},isElement:Ze,getDimensions:Qe,getOffsetParent:Je,getDocumentElement:Ye,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Xe(t,Je(n),r),floating:{...Qe(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Me(e).direction};function it(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=r,c=o&&!l,s=i&&!l,u=c||s?[...Ze(e)?tt(e):[],...tt(t)]:[];u.forEach((e=>{c&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));let d,f=null;if(a){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),Ze(e)&&!l&&f.observe(e),f.observe(t)}let p=l?Ke(e):null;return l&&function t(){const r=Ke(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{c&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const at=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:u}=le(c,r,l),d=r,f={},p=0;for(let n=0;n<i.length;n++){const{name:h,fn:m}=i[n],{x:g,y:v,data:b,reset:y}=await m({x:s,y:u,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});s=null!=g?g:s,u=null!=v?v:u,f={...f,[h]:{...f[h],...b}},y&&p<=50&&(p++,"object"==typeof y&&(y.placement&&(d=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:s,y:u}=le(c,d,l))),n=-1)}return{x:s,y:u,placement:d,strategy:o,middlewareData:f}})(e,t,{platform:ot,...n});var lt=n(5156),ct=n.n(lt),st="undefined"!=typeof document?s.useLayoutEffect:s.useEffect;function ut(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!ut(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!ut(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function dt(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const i=s.useRef(null),a=s.useRef(null),l=function(e){const t=s.useRef(e);return st((()=>{t.current=e})),t}(o),c=s.useRef(null),[u,d]=s.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[f,p]=s.useState(t);ut(null==f?void 0:f.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||p(t);const h=s.useCallback((()=>{i.current&&a.current&&at(i.current,a.current,{middleware:f,placement:n,strategy:r}).then((e=>{m.current&&lt.flushSync((()=>{d(e)}))}))}),[f,n,r]);st((()=>{m.current&&h()}),[h]);const m=s.useRef(!1);st((()=>(m.current=!0,()=>{m.current=!1})),[]);const g=s.useCallback((()=>{if("function"==typeof c.current&&(c.current(),c.current=null),i.current&&a.current)if(l.current){const e=l.current(i.current,a.current,h);c.current=e}else h()}),[h,l]),v=s.useCallback((e=>{i.current=e,g()}),[g]),b=s.useCallback((e=>{a.current=e,g()}),[g]),y=s.useMemo((()=>({reference:i,floating:a})),[]);return s.useMemo((()=>({...u,update:h,refs:y,reference:v,floating:b})),[u,h,y,v,b])}const ft=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){return r=t,Object.prototype.hasOwnProperty.call(r,"current")?null!=t.current?he({element:t.current,padding:n}).fn(e):{}:t?he({element:t,padding:n}).fn(e):{};var r}}},pt=(0,s.forwardRef)(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return(0,s.createElement)(D.WV.svg,(0,P.Z)({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,s.createElement)("polygon",{points:"0,0 30,0 15,10"}))})),ht=pt;var mt=n(3348);const gt="Popper",[vt,bt]=(0,M.b)(gt),[yt,xt]=vt(gt),wt=e=>{const{__scopePopper:t,children:n}=e,[r,o]=(0,s.useState)(null);return(0,s.createElement)(yt,{scope:t,anchor:r,onAnchorChange:o},n)},kt="PopperAnchor",Et=(0,s.forwardRef)(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=xt(kt,n),a=(0,s.useRef)(null),l=(0,I.e)(t,a);return(0,s.useEffect)((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:(0,s.createElement)(D.WV.div,(0,P.Z)({},o,{ref:l}))})),jt="PopperContent",[St,Ot]=vt(jt),[_t,Ct]=vt(jt,{hasParent:!1,positionUpdateFns:new Set}),Pt=(0,s.forwardRef)(((e,t)=>{var n,r,o,i,a,l,c,u;const{__scopePopper:d,side:f="bottom",sideOffset:p=0,align:h="center",alignOffset:m=0,arrowPadding:g=0,collisionBoundary:v=[],collisionPadding:b=0,sticky:y="partial",hideWhenDetached:x=!1,avoidCollisions:w=!0,onPlaced:k,...E}=e,j=xt(jt,d),[S,O]=(0,s.useState)(null),_=(0,I.e)(t,(e=>O(e))),[C,P]=(0,s.useState)(null),T=function(e){const[t,n]=(0,s.useState)(void 0);return(0,mt.b)((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(C),M=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,L=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,Z=f+("center"!==h?"-"+h:""),R="number"==typeof b?b:{top:0,right:0,bottom:0,left:0,...b},z=Array.isArray(v)?v:[v],N=z.length>0,B={padding:R,boundary:z.filter(At),altBoundary:N},{reference:H,floating:W,strategy:F,x:U,y:K,placement:Y,middlewareData:V,update:G}=dt({strategy:"fixed",placement:Z,whileElementsMounted:it,middleware:[Lt(),Se({mainAxis:p+L,alignmentAxis:m}),w?_e({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?Ce():void 0,...B}):void 0,C?ft({element:C,padding:g}):void 0,w?we({...B}):void 0,Pe({...B,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),Zt({arrowWidth:M,arrowHeight:L}),x?je({strategy:"referenceHidden"}):void 0].filter(Dt)});(0,mt.b)((()=>{H(j.anchor)}),[H,j.anchor]);const X=null!==U&&null!==K,[q,$]=Rt(Y),J=(0,A.W)(k);(0,mt.b)((()=>{X&&(null==J||J())}),[X,J]);const Q=null===(o=V.arrow)||void 0===o?void 0:o.x,ee=null===(i=V.arrow)||void 0===i?void 0:i.y,te=0!==(null===(a=V.arrow)||void 0===a?void 0:a.centerOffset),[ne,re]=(0,s.useState)();(0,mt.b)((()=>{S&&re(window.getComputedStyle(S).zIndex)}),[S]);const{hasParent:oe,positionUpdateFns:ie}=Ct(jt,d),ae=!oe;(0,s.useLayoutEffect)((()=>{if(!ae)return ie.add(G),()=>{ie.delete(G)}}),[ae,ie,G]),(0,mt.b)((()=>{ae&&X&&Array.from(ie).reverse().forEach((e=>requestAnimationFrame(e)))}),[ae,X,ie]);const le={"data-side":q,"data-align":$,...E,ref:_,style:{...E.style,animation:X?void 0:"none",opacity:null!==(l=V.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return(0,s.createElement)("div",{ref:W,"data-radix-popper-content-wrapper":"",style:{position:F,left:0,top:0,transform:X?`translate3d(${Math.round(U)}px, ${Math.round(K)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null===(c=V.transformOrigin)||void 0===c?void 0:c.x,null===(u=V.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},(0,s.createElement)(St,{scope:d,placedSide:q,onArrowChange:P,arrowX:Q,arrowY:ee,shouldHideArrow:te},ae?(0,s.createElement)(_t,{scope:d,hasParent:!0,positionUpdateFns:ie},(0,s.createElement)(D.WV.div,le)):(0,s.createElement)(D.WV.div,le)))})),Tt="PopperArrow",It={top:"bottom",right:"left",bottom:"top",left:"right"},Mt=(0,s.forwardRef)((function(e,t){const{__scopePopper:n,...r}=e,o=Ot(Tt,n),i=It[o.placedSide];return(0,s.createElement)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},(0,s.createElement)(ht,(0,P.Z)({},r,{ref:t,style:{...r.style,display:"block"}})))}));function Dt(e){return void 0!==e}function At(e){return null!==e}const Lt=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),Zt=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:l,rects:c,middlewareData:s}=t,u=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,h]=Rt(l),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,v=(null!==(i=null===(a=s.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let b="",y="";return"bottom"===p?(b=u?m:`${g}px`,y=-f+"px"):"top"===p?(b=u?m:`${g}px`,y=`${c.floating.height+f}px`):"right"===p?(b=-f+"px",y=u?m:`${v}px`):"left"===p&&(b=`${c.floating.width+f}px`,y=u?m:`${v}px`),{data:{x:b,y:y}}}});function Rt(e){const[t,n="center"]=e.split("-");return[t,n]}const zt=wt,Nt=Et,Bt=Pt,Ht=Mt,Wt=(0,s.forwardRef)(((e,t)=>{var n;const{container:r=(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?ct().createPortal((0,s.createElement)(D.WV.div,(0,P.Z)({},o,{ref:t})),r):null}));var Ft=n(1483),Ut=n(4801),Kt=n(2673),Yt=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Vt=new WeakMap,Gt=new WeakMap,Xt={},qt=0,$t=function(e){return e&&(e.host||$t(e.parentNode))},Jt=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=$t(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Xt[n]||(Xt[n]=new WeakMap);var i=Xt[n],a=[],l=new Set,c=new Set(o),s=function(e){e&&!l.has(e)&&(l.add(e),s(e.parentNode))};o.forEach(s);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(l.has(e))u(e);else{var t=e.getAttribute(r),o=null!==t&&"false"!==t,c=(Vt.get(e)||0)+1,s=(i.get(e)||0)+1;Vt.set(e,c),i.set(e,s),a.push(e),1===c&&o&&Gt.set(e,!0),1===s&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}}))};return u(t),l.clear(),qt++,function(){a.forEach((function(e){var t=Vt.get(e)-1,o=i.get(e)-1;Vt.set(e,t),i.set(e,o),t||(Gt.has(e)||e.removeAttribute(r),Gt.delete(e)),o||e.removeAttribute(n)})),--qt||(Vt=new WeakMap,Vt=new WeakMap,Gt=new WeakMap,Xt={})}},Qt=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Yt(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Jt(r,o,n,"aria-hidden")):function(){return null}};var en=function(){return en=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},en.apply(this,arguments)};function tn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create;Object.create;var nn="right-scroll-bar-position",rn="width-before-scroll-bar";function on(e,t){return n=t||null,r=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},(o=(0,s.useState)((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=r,o.facade;var n,r,o}function an(e){return e}function ln(e,t){void 0===t&&(t=an);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return o}var cn=function(e){void 0===e&&(e={});var t=ln(null);return t.options=en({async:!0,ssr:!1},e),t}(),sn=function(){},un=s.forwardRef((function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:sn,onWheelCapture:sn,onTouchMoveCapture:sn}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,b=void 0===v?"div":v,y=tn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=p,w=on([n,t]),k=en(en({},y),o);return s.createElement(s.Fragment,null,d&&s.createElement(x,{sideCar:cn,removeScrollBar:u,shards:f,noIsolation:h,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:n}),a?s.cloneElement(s.Children.only(l),en(en({},k),{ref:w})):s.createElement(b,en({},k,{className:c,ref:w}),l))}));un.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},un.classNames={fullWidth:rn,zeroRight:nn};var dn,fn=function(e){var t=e.sideCar,n=tn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,en({},n))};fn.isSideCarExport=!0;function pn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dn||n.nc;return t&&e.setAttribute("nonce",t),e}var hn=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=pn())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mn=function(){var e,t=(e=hn(),function(t,n){s.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},gn={left:0,top:0,right:0,gap:0},vn=function(e){return parseInt(e||"",10)||0},bn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return gn;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[vn(n),vn(r),vn(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},yn=mn(),xn=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(nn," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(rn," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(nn," .").concat(nn," {\n right: 0 ").concat(r,";\n }\n \n .").concat(rn," .").concat(rn," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},wn=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r,i=s.useMemo((function(){return bn(o)}),[o]);return s.createElement(yn,{styles:xn(i,!t,o,n?"":"!important")})},kn=!1;if("undefined"!=typeof window)try{var En=Object.defineProperty({},"passive",{get:function(){return kn=!0,!0}});window.addEventListener("test",En,En),window.removeEventListener("test",En,En)}catch(e){kn=!1}var jn=!!kn&&{passive:!1},Sn=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},On=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),_n(e,n)){var r=Cn(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},_n=function(e,t){return"v"===e?function(e){return Sn(e,"overflowY")}(t):function(e){return Sn(e,"overflowX")}(t)},Cn=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Pn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Tn=function(e){return[e.deltaX,e.deltaY]},In=function(e){return e&&"current"in e?e.current:e},Mn=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Dn=0,An=[];var Ln,Zn=(Ln=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(Dn++)[0],i=s.useState((function(){return mn()}))[0],a=s.useRef(e);s.useEffect((function(){a.current=e}),[e]),s.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(In),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=Pn(e),l=n.current,c="deltaX"in e?e.deltaX:l[0]-i[0],s="deltaY"in e?e.deltaY:l[1]-i[1],u=e.target,d=Math.abs(c)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=On(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=On(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(c||s)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,l=n.target,c=t.contains(l),s=!1,u=a>0,d=0,f=0;do{var p=Cn(e,l),h=p[0],m=p[1]-p[2]-i*h;(h||m)&&_n(e,l)&&(d+=m,f+=h),l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(u&&(o&&0===d||!o&&a>d)||!u&&(o&&0===f||!o&&-a>f))&&(s=!0),s}(p,t,e,"h"===p?c:s,!0)}),[]),c=s.useCallback((function(e){var n=e;if(An.length&&An[An.length-1]===i){var r="deltaY"in n?Tn(n):Pn(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var c=(a.current.shards||[]).map(In).filter(Boolean).filter((function(e){return e.contains(n.target)}));(c.length>0?l(n,c[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=s.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=s.useCallback((function(e){n.current=Pn(e),r.current=void 0}),[]),f=s.useCallback((function(t){u(t.type,Tn(t),t.target,l(t,e.lockRef.current))}),[]),p=s.useCallback((function(t){u(t.type,Pn(t),t.target,l(t,e.lockRef.current))}),[]);s.useEffect((function(){return An.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,jn),document.addEventListener("touchmove",c,jn),document.addEventListener("touchstart",d,jn),function(){An=An.filter((function(e){return e!==i})),document.removeEventListener("wheel",c,jn),document.removeEventListener("touchmove",c,jn),document.removeEventListener("touchstart",d,jn)}}),[]);var h=e.removeScrollBar,m=e.inert;return s.createElement(s.Fragment,null,m?s.createElement(i,{styles:Mn(o)}):null,h?s.createElement(wn,{gapMode:"margin"}):null)},cn.useMedium(Ln),fn),Rn=s.forwardRef((function(e,t){return s.createElement(un,en({},e,{ref:t,sideCar:Zn}))}));Rn.classNames=un.classNames;var zn=Rn;const Nn="Popover",[Bn,Hn]=(0,M.b)(Nn,[bt]),Wn=bt(),[Fn,Un]=Bn(Nn),Kn=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,l=Wn(t),c=(0,s.useRef)(null),[u,d]=(0,s.useState)(!1),[f=!1,p]=(0,Kt.T)({prop:r,defaultProp:o,onChange:i});return(0,s.createElement)(zt,l,(0,s.createElement)(Fn,{scope:t,contentId:(0,ne.M)(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:(0,s.useCallback)((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:(0,s.useCallback)((()=>d(!0)),[]),onCustomAnchorRemove:(0,s.useCallback)((()=>d(!1)),[]),modal:a},n))},Yn="PopoverTrigger",Vn=(0,s.forwardRef)(((e,t)=>{const{__scopePopover:n,...r}=e,o=Un(Yn,n),i=Wn(n),a=(0,I.e)(t,o.triggerRef),l=(0,s.createElement)(D.WV.button,(0,P.Z)({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":or(o.open)},r,{ref:a,onClick:(0,T.M)(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?l:(0,s.createElement)(Nt,(0,P.Z)({asChild:!0},i),l)})),Gn="PopoverPortal",[Xn,qn]=Bn(Gn,{forceMount:void 0}),$n=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Un(Gn,t);return(0,s.createElement)(Xn,{scope:t,forceMount:n},(0,s.createElement)(Ft.z,{present:n||i.open},(0,s.createElement)(Wt,{asChild:!0,container:o},r)))},Jn="PopoverContent",Qn=(0,s.forwardRef)(((e,t)=>{const n=qn(Jn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Un(Jn,e.__scopePopover);return(0,s.createElement)(Ft.z,{present:r||i.open},i.modal?(0,s.createElement)(er,(0,P.Z)({},o,{ref:t})):(0,s.createElement)(tr,(0,P.Z)({},o,{ref:t})))})),er=(0,s.forwardRef)(((e,t)=>{const n=Un(Jn,e.__scopePopover),r=(0,s.useRef)(null),o=(0,I.e)(t,r),i=(0,s.useRef)(!1);return(0,s.useEffect)((()=>{const e=r.current;if(e)return Qt(e)}),[]),(0,s.createElement)(zn,{as:Ut.g7,allowPinchZoom:!0},(0,s.createElement)(nr,(0,P.Z)({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,T.M)(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),i.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:(0,T.M)(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:(0,T.M)(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),tr=(0,s.forwardRef)(((e,t)=>{const n=Un(Jn,e.__scopePopover),r=(0,s.useRef)(!1);return(0,s.createElement)(nr,(0,P.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(r.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault());r.current=!1},onInteractOutside:t=>{var o,i;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const a=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(a))&&t.preventDefault()}}))})),nr=(0,s.forwardRef)(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=e,p=Un(Jn,n),h=Wn(n);return U(),(0,s.createElement)(X,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},(0,s.createElement)(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1)},(0,s.createElement)(Bt,(0,P.Z)({"data-state":or(p.open),role:"dialog",id:p.contentId},h,f,{ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))})),rr=(0,s.forwardRef)(((e,t)=>{const{__scopePopover:n,...r}=e,o=Wn(n);return(0,s.createElement)(Ht,(0,P.Z)({},o,r,{ref:t}))}));function or(e){return e?"open":"closed"}const ir=Kn,ar=Vn,lr=$n,cr=Qn,sr=rr;var ur=n(6936),dr=function(e){var t=e.color,n=e.onChange,o=e.label,i=(0,s.useState)(t),a=(0,r.Z)(i,2),c=a[0],u=a[1],d=(0,f.KO)(v),p=(0,r.Z)(d,2),h=p[0],m=p[1];(0,s.useEffect)((function(){u(t)}),[t]);var g=(0,s.useCallback)((function(e){var t=e.toLowerCase(),r=_r(t);r&&n(r),u(t)}),[n]),b=(0,s.useRef)(null),y=(0,s.useRef)(null);return(0,s.useEffect)((function(){b.current&&b.current.focus()}),[h]),(0,l.jsxs)("label",{className:"color-picker__input-label",children:[(0,l.jsx)("div",{className:"color-picker__input-hash",children:"#"}),(0,l.jsx)("input",{ref:"hex"===h?b:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":o,onChange:function(e){g(e.target.value)},value:(c||"").replace(/^#/,""),onBlur:function(){u(t)},tabIndex:-1,onFocus:function(){return m("hex")},onKeyDown:function(e){if(e.key!==j.tW.TAB){var t;if(e.key===j.tW.ESCAPE)null===(t=y.current)||void 0===t||t.focus();e.stopPropagation()}}})]})},fr=n(487),pr=n.n(fr),hr=n(631),mr=n.n(hr),gr=n(2052),vr=n.n(gr),br=n(4010),yr=n.n(br),xr=n(1469),wr=n.n(xr),kr=n(9329),Er=n.n(kr),jr=n(4269),Sr={};Sr.styleTagTransform=Er(),Sr.setAttributes=yr(),Sr.insert=vr().bind(null,"head"),Sr.domAPI=mr(),Sr.insertStyleElement=wr();pr()(jr.Z,Sr),jr.Z&&jr.Z.locals&&jr.Z.locals;var Or=function(e){var t=(new Option).style;return t.color=e,!!t.color},_r=function(e){return(0,o.Qm)(e)?e:Or("#".concat(e))?"#".concat(e):Or(e)?e:null},Cr=function(e){var t=e.type,n=e.color,o=e.onChange,i=e.label,c=e.elements,s=e.palette,u=void 0===s?a.HO:s,p=e.updateData,h=(0,f.KO)(v),m=(0,r.Z)(h,2)[1],g=(0,ur.J0)().container,b=(0,ur.Fy)(),y=b.isMobile,x=b.isLandscape,w=(0,l.jsxs)("div",{children:[(0,l.jsx)(_,{children:(0,d.t)("colorPicker.hexCode")}),(0,l.jsx)(dr,{color:n,label:i,onChange:function(e){o(e)}})]});return(0,l.jsx)(lr,{container:g,children:(0,l.jsxs)(cr,{className:"focus-visible-none","data-prevent-outside-click":!0,onCloseAutoFocus:function(e){g&&g.focus(),e.preventDefault(),e.stopPropagation(),m(null)},side:y&&!x?"bottom":"right",align:y&&!x?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:9999,backgroundColor:"var(--popup-bg-color)",maxWidth:"208px",maxHeight:window.innerHeight,padding:"12px",borderRadius:"8px",boxSizing:"border-box",overflowY:"auto",boxShadow:"0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702)"},children:[u?(0,l.jsx)(C,{palette:u,color:n||null,onChange:function(e){o(e)},label:i,type:t,elements:c,updateData:p,children:w}):w,(0,l.jsx)(sr,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})},Pr=function(e){var t=e.label,n=e.color,r=e.type;return(0,l.jsx)(ar,{type:"button",className:(0,i.Z)("color-picker__button active-color",{"is-transparent":"transparent"===n||!n}),"aria-label":t,style:n?{"--swatch-color":n}:void 0,title:"elementStroke"===r?(0,d.t)("labels.showStroke"):(0,d.t)("labels.showBackground"),children:(0,l.jsx)("div",{className:"color-picker__button-outline"})})},Tr=function(e){var t=e.type,n=e.color,r=e.onChange,o=e.label,i=e.elements,s=e.palette,u=void 0===s?a.HO:s,d=e.topPicks,f=e.updateData,p=e.appState;return(0,l.jsx)("div",{children:(0,l.jsxs)("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[(0,l.jsx)(c,{activeColor:n,onChange:r,type:t,topPicks:d}),(0,l.jsx)("div",{style:{width:1,height:"100%",backgroundColor:"var(--default-border-color)",margin:"0 auto"}}),(0,l.jsxs)(ir,{open:p.openPopup===t,onOpenChange:function(e){f({openPopup:e?t:null})},children:[(0,l.jsx)(Pr,{color:n,label:o,type:t}),p.openPopup===t&&(0,l.jsx)(Cr,{type:t,color:n,onChange:r,label:o,elements:i,palette:u,updateData:f})]})]})})}},7046:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var r=n(7169),o=n(2726),i=n(8211),a=n(8396),l=n(487),c=n.n(l),s=n(631),u=n.n(s),d=n(2052),f=n.n(d),p=n(4010),h=n.n(p),m=n(1469),g=n.n(m),v=n(9329),b=n.n(v),y=n(9393),x={};x.styleTagTransform=b(),x.setAttributes=h(),x.insert=f().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=g();c()(y.Z,x),y.Z&&y.Z.locals&&y.Z.locals;var w=n(6428),k=n(4739),E=n(6527),j=n(6936),S=n(9487),O=n(4512),_=["onConfirm","onCancel","children","confirmText","cancelText","className"];function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=function(e){var t=e.onConfirm,n=e.onCancel,r=e.children,l=e.confirmText,c=void 0===l?(0,i.t)("buttons.confirm"):l,s=e.cancelText,u=void 0===s?(0,i.t)("buttons.cancel"):s,d=e.className,f=void 0===d?"":d,p=(0,o.Z)(e,_),h=(0,j.n9)(),m=(0,k.b9)(E.uh,S.yE),g=(0,j.J0)().container;return(0,O.jsxs)(a.V,P(P({onCloseRequest:n,small:!0},p),{},{className:"confirm-dialog ".concat(f),children:[r,(0,O.jsxs)("div",{className:"confirm-dialog-buttons",children:[(0,O.jsx)(w.Z,{label:u,onClick:function(){h({openMenu:null}),m(!1),n(),null==g||g.focus()}}),(0,O.jsx)(w.Z,{label:c,onClick:function(){h({openMenu:null}),m(!1),t(),null==g||g.focus()},actionType:"danger"})]})]}))}},704:function(e,t,n){"use strict";n.d(t,{O:function(){return E}});var r=n(2726),o=n(7169),i=n(45),a=n(2335),l=n(7681),c=n(96),s=n(8211),u=n(6340),d=n(6936),f=n(7145),p=n(6527),h=n(1034),m=n(4512),g=n(9787),v=["children"],b=["children","className","onDock","docked"];function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=(0,f.$)("DefaultSidebarTrigger",(function(e){var t=(0,l.R6)().DefaultSidebarTriggerTunnel;return(0,m.jsx)(t.In,{children:(0,m.jsx)(h.YE.Trigger,x(x({},e),{},{className:"default-sidebar-trigger",name:a.Cc.name}))})}));w.displayName="DefaultSidebarTrigger";var k=function(e){var t=e.children,n=(0,r.Z)(e,v),o=(0,l.R6)().DefaultSidebarTabTriggersTunnel;return(0,m.jsx)(o.In,{children:(0,m.jsx)(h.YE.TabTriggers,x(x({},n),{},{children:t}))})};k.displayName="DefaultTabTriggers";var E=Object.assign((0,f.$)("DefaultSidebar",(function(e){var t=e.children,n=e.className,o=e.onDock,f=e.docked,v=(0,r.Z)(e,b),y=(0,c.I)(),w=(0,d.n9)(),k=(0,l.R6)().DefaultSidebarTabTriggersTunnel;return(0,g.createElement)(h.YE,x(x({},v),{},{name:"default",key:"default",className:(0,i.Z)("default-sidebar",n),docked:null!=f?f:y.defaultSidebarDockedPreference,onDock:!1===o||!o&&null!=f?void 0:(0,u.Mj)(o,(function(e){w({defaultSidebarDockedPreference:e})}))}),(0,m.jsxs)(h.YE.Tabs,{children:[(0,m.jsxs)(h.YE.Header,{children:[v.__fallback&&(0,m.jsx)("div",{style:{color:"var(--color-primary)",fontSize:"1.2em",fontWeight:"bold",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",paddingRight:"1em"},children:(0,s.t)("toolBar.library")}),(0,m.jsx)(k.Out,{})]}),(0,m.jsx)(h.YE.Tab,{tab:a.tf,children:(0,m.jsx)(p.rY,{})}),t]}))})),{Trigger:w,TabTriggers:k})},8396:function(e,t,n){"use strict";n.d(t,{V:function(){return Z}});var r=n(2577),o=n(45),i=n(9787),a=n(8211),l=n(6936),c=n(6066),s=n(487),u=n.n(s),d=n(631),f=n.n(d),p=n(2052),h=n.n(p),m=n(4010),g=n.n(m),v=n(1469),b=n.n(v),y=n(9329),x=n.n(y),w=n(9482),k={};k.styleTagTransform=x(),k.setAttributes=g(),k.insert=h().bind(null,"head"),k.domAPI=f(),k.insertStyleElement=b();u()(w.Z,k),w.Z&&w.Z.locals&&w.Z.locals;var E=n(3646),j=n(1881),S=n(6843),O={};O.styleTagTransform=x(),O.setAttributes=g(),O.insert=h().bind(null,"head"),O.domAPI=f(),O.insertStyleElement=b();u()(S.Z,O),S.Z&&S.Z.locals&&S.Z.locals;var _=n(5156),C=n(2335),P=n(4512),T=function(e){var t=e.theme,n=void 0===t?C.C6.LIGHT:t,r=e.closeOnClickOutside,i=void 0===r||r,a=I(n);if(!a)return null;return(0,_.createPortal)((0,P.jsxs)("div",{className:(0,o.Z)("Modal",e.className),role:"dialog","aria-modal":"true",onKeyDown:function(t){t.key===c.tW.ESCAPE&&(t.nativeEvent.stopImmediatePropagation(),t.stopPropagation(),e.onCloseRequest())},"aria-labelledby":e.labelledBy,"data-prevent-outside-click":!0,children:[(0,P.jsx)("div",{className:"Modal__background",onClick:i?e.onCloseRequest:void 0}),(0,P.jsx)("div",{className:"Modal__content",style:{"--max-width":"".concat(e.maxWidth,"px")},tabIndex:0,children:e.children})]}),a)},I=function(e){var t=(0,i.useState)(null),n=(0,r.Z)(t,2),o=n[0],a=n[1],c=(0,l.Fy)(),s=(0,i.useRef)(c.isMobile);s.current=c.isMobile;var u=(0,l.J0)().container;return(0,i.useLayoutEffect)((function(){o&&o.classList.toggle("excalidraw--mobile",c.isMobile)}),[o,c.isMobile]),(0,i.useLayoutEffect)((function(){var t=!(null==u||!u.classList.contains("theme--dark"))||"dark"===e,n=document.createElement("div");return n.classList.add("excalidraw","excalidraw-modal-container"),n.classList.toggle("excalidraw--mobile",s.current),t&&(n.classList.add("theme--dark"),n.classList.add("theme--dark-background-none")),document.body.appendChild(n),a(n),function(){document.body.removeChild(n)}}),[u,e]),o},M=n(6340),D=n(4739),A=n(6527),L=n(9487),Z=function(e){var t=function(){var e=(0,i.useState)(null),t=(0,r.Z)(e,2),n=t[0],o=t[1];return[n,(0,i.useCallback)((function(e){return o(e)}),[])]}(),n=(0,r.Z)(t,2),s=n[0],u=n[1],d=(0,i.useState)(document.activeElement),f=(0,r.Z)(d,1)[0],p=(0,l.J0)().id;(0,i.useEffect)((function(){if(s){var t=(0,M.xp)(s);t.length>0&&!1!==e.autofocus&&(t[1]||t[0]).focus();var n=function(e){if(e.key===c.tW.TAB){var t=(0,M.xp)(s),n=document.activeElement,r=t.findIndex((function(e){return e===n}));0===r&&e.shiftKey?(t[t.length-1].focus(),e.preventDefault()):r!==t.length-1||e.shiftKey||(t[0].focus(),e.preventDefault())}};return s.addEventListener("keydown",n),function(){return s.removeEventListener("keydown",n)}}}),[s,e.autofocus]);var h=(0,l.n9)(),m=(0,D.b9)(A.uh,L.yE),g=function(){h({openMenu:null}),m(!1),f.focus(),e.onCloseRequest()};return(0,P.jsx)(T,{className:(0,o.Z)("Dialog",e.className),labelledBy:"dialog-title",maxWidth:e.small?550:800,onCloseRequest:g,theme:e.theme,closeOnClickOutside:e.closeOnClickOutside,children:(0,P.jsxs)(j.W,{ref:u,children:[(0,P.jsxs)("h2",{id:"".concat(p,"-dialog-title"),className:"Dialog__title",children:[(0,P.jsx)("span",{className:"Dialog__titleContent",children:e.title}),(0,P.jsx)("button",{className:"Modal__close",onClick:g,title:(0,a.t)("buttons.close"),"aria-label":(0,a.t)("buttons.close"),children:(0,l.Fy)().isMobile?E.op:E.Tw})]}),(0,P.jsx)("div",{className:"Dialog__content",children:e.children})]})})}},6428:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(7169),o=n(2726),i=n(45),a=n(487),l=n.n(a),c=n(631),s=n.n(c),u=n(2052),d=n.n(u),f=n(4010),p=n.n(f),h=n(1469),m=n.n(h),g=n(9329),v=n.n(g),b=n(6148),y={};y.styleTagTransform=v(),y.setAttributes=p(),y.insert=d().bind(null,"head"),y.domAPI=s(),y.insertStyleElement=m();l()(b.Z,y),b.Z&&b.Z.locals&&b.Z.locals;var x=n(5644),w=n(4512),k=["label","onClick","className","children","actionType","type","isLoading"];function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=function(e){var t=e.label,n=e.onClick,r=e.className,a=e.children,l=e.actionType,c=e.type,s=void 0===c?"button":c,u=e.isLoading,d=(0,o.Z)(e,k),f=l?"Dialog__action-button--".concat(l):"";return(0,w.jsxs)("button",j(j({className:(0,i.Z)("Dialog__action-button",f,r),type:s,"aria-label":t,onClick:n},d),{},{children:[a&&(0,w.jsx)("div",{style:u?{visibility:"hidden"}:{},children:a}),(0,w.jsx)("div",{style:u?{visibility:"hidden"}:{},children:t}),u&&(0,w.jsx)("div",{style:{position:"absolute",inset:0},children:(0,w.jsx)(x.Z,{})})]}))}},1881:function(e,t,n){"use strict";n.d(t,{W:function(){return j}});var r=n(7169),o=n(487),i=n.n(o),a=n(631),l=n.n(a),c=n(2052),s=n.n(c),u=n(4010),d=n.n(u),f=n(1469),p=n.n(f),h=n(9329),m=n.n(h),g=n(7369),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p();i()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=n(9787),y=n.n(b),x=n(45),w=n(4512);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=y().forwardRef((function(e,t){var n=e.children,r=e.padding,o=e.className,i=e.style;return(0,w.jsx)("div",{className:(0,x.Z)("Island",o),style:E({"--padding":r},i),ref:t,children:n})}))},6527:function(e,t,n){"use strict";n.d(t,{rY:function(){return Oe},uh:function(){return Ee}});var r=n(1930),o=n(8950),i=n(2577),a=n(2975),l=n.n(a),c=n(9787),s=n(7053),u=n(8211),d=n(6954),f=n(7169),p=n(5523),h=n(6340),m=n(45),g=n(6936),v=n(3024),b=n(487),y=n.n(b),x=n(631),w=n.n(x),k=n(2052),E=n.n(k),j=n(4010),S=n.n(j),O=n(1469),_=n.n(O),C=n(9329),P=n.n(C),T=n(2701),I={};I.styleTagTransform=P(),I.setAttributes=S(),I.insert=E().bind(null,"head"),I.domAPI=w(),I.insertStyleElement=_();y()(T.Z,I),T.Z&&T.Z.locals&&T.Z.locals;var M=n(3807),D=n(3646),A=n(56),L=n(4512),Z=function(e){var t=e.id,n=e.elements,r=e.isPending,a=e.onClick,s=e.selected,u=e.onToggle,d=e.onDrag,f=(0,c.useRef)(null);(0,c.useEffect)((function(){var e=f.current;if(e)return(0,o.Z)(l().mark((function t(){var r,o;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,(0,v.$D)({elements:n,appState:{exportBackground:!1,viewBackgroundColor:A.HO.white},files:null});case 4:o=t.sent,null===(r=o.querySelector(".style-fonts"))||void 0===r||r.remove(),e.innerHTML=o.outerHTML;case 7:case"end":return t.stop()}}),t)})))(),function(){e.innerHTML=""}}),[n]);var p=(0,c.useState)(!1),h=(0,i.Z)(p,2),b=h[0],y=h[1],x=(0,g.Fy)().isMobile,w=r&&(0,L.jsx)("div",{className:"library-unit__adder",children:D.pO});return(0,L.jsxs)("div",{className:(0,m.Z)("library-unit",{"library-unit__active":n,"library-unit--hover":n&&b,"library-unit--selected":s}),onMouseEnter:function(){return y(!0)},onMouseLeave:function(){return y(!1)},children:[(0,L.jsx)("div",{className:(0,m.Z)("library-unit__dragger",{"library-unit__pulse":!!r}),ref:f,draggable:!!n,onClick:n||r?function(e){t&&e.shiftKey?u(t,e):a()}:void 0,onDragStart:function(e){t?(y(!1),d(t,e)):e.preventDefault()}}),w,t&&n&&(b||x||s)&&(0,L.jsx)(M.o,{checked:s,onChange:function(e,n){return u(t,n)},className:"library-unit__checkbox"})]})},R=n(7239),z=n(2335),N=n(5644),B=n(2791),H=function(e){var t=e.theme,n=e.id,r=e.libraryReturnUrl||window.location.origin+window.location.pathname;return(0,L.jsx)("a",{className:"library-menu-browse-button",href:"".concat("https://libraries.excalidraw.com","?target=").concat(window.name||"_blank","&referrer=").concat(r,"&useHash=true&token=").concat(n,"&theme=").concat(t,"&version=").concat(z.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,u.t)("labels.libraries")})},W=function(e){var t=e.libraryReturnUrl,n=e.theme,r=e.id,o=e.style,i=e.children,a=e.className;return(0,L.jsxs)("div",{className:(0,m.Z)("library-menu-control-buttons",a),style:o,children:[(0,L.jsx)(H,{id:r,libraryReturnUrl:t,theme:n}),i]})},F=n(2242),U=n(9487),K=n(1319),Y=n(1393),V=n(4739),G=n(7046),X=n(5284),q=n(8396),$=n(434),J=n(6428),Q=n(7589),ee={};ee.styleTagTransform=P(),ee.setAttributes=S(),ee.insert=E().bind(null,"head"),ee.domAPI=w(),ee.insertStyleElement=_();y()(Q.Z,ee),Q.Z&&Q.Z.locals&&Q.Z.locals;function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ie="publish-library-data",ae=function(){var e=(0,o.Z)(l().mark((function e(t){var n,r,o,a,c,s,u,d,f,p,m,g,b,y,x,w,k;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=6,r=128,o=Math.round(r/16),a=Math.max(Math.round(r/64),2),c=(0,h.yo)(t,n),(s=document.createElement("canvas")).width=c[0].length*r+(c[0].length+1)*(2*o)-2*o,s.height=c.length*r+(c.length+1)*(2*o)-2*o,(u=s.getContext("2d")).fillStyle=X.white,u.fillRect(0,0,s.width,s.height),d=re(t.entries()),e.prev=12,d.s();case 14:if((f=d.n()).done){e.next=28;break}return p=(0,i.Z)(f.value,2),m=p[0],g=p[1],e.next=18,(0,v.NL)({elements:g.elements,files:null,maxWidthOrHeight:r});case 18:b=e.sent,y=b.width,x=b.height,w=Math.floor(m/n)*(r+2*o),k=m%n*(r+2*o),u.drawImage(b,k+(r-y)/2+o,w+(r-x)/2+o),u.lineWidth=a,u.strokeStyle=X.gray[4],u.strokeRect(k+o/2,w+o/2,r+o,r+o);case 26:e.next=14;break;case 28:e.next=33;break;case 30:e.prev=30,e.t0=e.catch(12),d.e(e.t0);case 33:return e.prev=33,d.f(),e.finish(33);case 36:return e.t1=$.Tu,e.t2=File,e.next=40,(0,$._c)(s);case 40:return e.t3=e.sent,e.t4=[e.t3],e.t5={type:z.LO.png},e.t6=new e.t2(e.t4,"preview",e.t5),e.t7={outputType:z.LO.jpg,maxWidthOrHeight:5e3},e.next=47,(0,e.t1)(e.t6,e.t7);case 47:return e.abrupt("return",e.sent);case 48:case"end":return e.stop()}}),e,null,[[12,30,33,36]])})));return function(t){return e.apply(this,arguments)}}(),le=function(e){var t=e.libItem,n=e.appState,r=e.index,i=e.onChange,a=e.onRemove,s=(0,c.useRef)(null),d=(0,c.useRef)(null);return(0,c.useEffect)((function(){var e=s.current;e&&(0,o.Z)(l().mark((function r(){var o;return l().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,v.$D)({elements:t.elements,appState:ne(ne({},n),{},{viewBackgroundColor:X.white,exportBackground:!0}),files:null});case 2:o=r.sent,e.innerHTML=o.outerHTML;case 4:case"end":return r.stop()}}),r)})))()}),[t.elements,n]),(0,L.jsxs)("div",{className:"single-library-item",children:["published"===t.status&&(0,L.jsx)("span",{className:"single-library-item-status",children:(0,u.t)("labels.statusPublished")}),(0,L.jsx)("div",{ref:s,className:"single-library-item__svg"}),(0,L.jsx)(K.V,{"aria-label":(0,u.t)("buttons.remove"),type:"button",icon:D.Tw,className:"single-library-item--remove",onClick:a.bind(null,t.id),title:(0,u.t)("buttons.remove")}),(0,L.jsxs)("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[(0,L.jsxs)("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,L.jsxs)("div",{style:{padding:"0.5em 0"},children:[(0,L.jsx)("span",{style:{fontWeight:500,color:X.gray[6]},children:(0,u.t)("publishDialog.itemName")}),(0,L.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,L.jsx)("input",{type:"text",ref:d,style:{width:"80%",padding:"0.2rem"},defaultValue:t.name,placeholder:"Item name",onChange:function(e){i(e.target.value,r)}})]}),(0,L.jsx)("span",{className:"error",children:t.error})]})]})},ce=function(e){var t=e.onClose,n=e.libraryItems,r=e.appState,a=e.onSuccess,s=e.onError,d=e.updateItemsInStorage,p=e.onRemove,h=(0,c.useState)({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),m=(0,i.Z)(h,2),g=m[0],v=m[1],b=(0,c.useState)(!1),y=(0,i.Z)(b,2),x=y[0],w=y[1];(0,c.useEffect)((function(){var e=function(){try{var e=localStorage.getItem(ie);if(e)return JSON.parse(e)}catch(e){console.error(e)}return null}();e&&v(e)}),[]);var k=(0,c.useState)(n.slice()),E=(0,i.Z)(k,2),j=E[0],S=E[1];(0,c.useEffect)((function(){S(n.slice())}),[n]);var O,_=function(e){v(ne(ne({},g),{},(0,f.Z)({},e.target.name,e.target.value)))},C=function(){var e=(0,o.Z)(l().mark((function e(t){var n,r,o,i,c,d,f;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),w(!0),n=[],r=!1,j.forEach((function(e){var t="";e.name||(t=(0,u.t)("publishDialog.errors.required"),r=!0),n.push(ne(ne({},e),{},{error:t}))})),!r){e.next=9;break}return S(n),w(!1),e.abrupt("return");case 9:return e.next=11,ae(j);case 11:o=e.sent,i={type:z.r8.excalidrawLibrary,version:z.Kr.excalidrawLibrary,source:z.pb,libraryItems:j},c=JSON.stringify(i,null,2),d=new Blob([c],{type:"application/json"}),(f=new FormData).append("excalidrawLib",d),f.append("previewImage",o),f.append("previewImageType",o.type),f.append("title",g.name),f.append("authorName",g.authorName),f.append("githubHandle",g.githubHandle),f.append("name",g.name),f.append("description",g.description),f.append("twitterHandle",g.twitterHandle),f.append("website",g.website),fetch("".concat("https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries","/submit"),{method:"post",body:f}).then((function(e){return e.ok?e.json().then((function(e){var t=e.url;localStorage.removeItem(ie),a({url:t,authorName:g.authorName,items:j})})):e.json().catch((function(){throw new Error(e.statusText||"something went wrong")})).then((function(t){throw new Error(t.message||e.statusText||"something went wrong")}))}),(function(e){console.error(e),s(e),w(!1)})).catch((function(e){console.error(e),s(e),w(!1)}));case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),P=(0,c.useCallback)((function(){d(j),function(e){try{localStorage.setItem(ie,JSON.stringify(e))}catch(e){console.error(e)}}(g),t()}),[j,t,d,g]),T=!!n.length,I=n.some((function(e){return"published"===e.status}));return(0,L.jsx)(q.V,{onCloseRequest:P,title:(0,u.t)("publishDialog.title"),className:"publish-library",children:T?(0,L.jsxs)("form",{onSubmit:C,children:[(0,L.jsx)("div",{className:"publish-library-note",children:(0,L.jsx)(F.Z,{i18nKey:"publishDialog.noteDescription",link:function(e){return(0,L.jsx)("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:e})}})}),(0,L.jsx)("span",{className:"publish-library-note",children:(0,L.jsx)(F.Z,{i18nKey:"publishDialog.noteGuidelines",link:function(e){return(0,L.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:e})}})}),(0,L.jsx)("div",{className:"publish-library-note",children:(0,u.t)("publishDialog.noteItems")}),I&&(0,L.jsx)("span",{className:"publish-library-note publish-library-warning",children:(0,u.t)("publishDialog.republishWarning")}),(O=[],j.forEach((function(e,t){O.push((0,L.jsx)("div",{className:"single-library-item-wrapper",children:(0,L.jsx)(le,{libItem:e,appState:r,index:t,onChange:function(e,t){var n=j.slice();n[t].name=e,S(n)},onRemove:p})},t))})),(0,L.jsx)("div",{className:"selected-library-items",children:O})),(0,L.jsxs)("div",{className:"publish-library__fields",children:[(0,L.jsxs)("label",{children:[(0,L.jsxs)("div",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.libraryName")}),(0,L.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,L.jsx)("input",{type:"text",name:"name",required:!0,value:g.name,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.libraryName")})]}),(0,L.jsxs)("label",{style:{alignItems:"flex-start"},children:[(0,L.jsxs)("div",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.libraryDesc")}),(0,L.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,L.jsx)("textarea",{name:"description",rows:4,required:!0,value:g.description,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.libraryDesc")})]}),(0,L.jsxs)("label",{children:[(0,L.jsxs)("div",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.authorName")}),(0,L.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,L.jsx)("input",{type:"text",name:"authorName",required:!0,value:g.authorName,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.authorName")})]}),(0,L.jsxs)("label",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.githubUsername")}),(0,L.jsx)("input",{type:"text",name:"githubHandle",value:g.githubHandle,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.githubHandle")})]}),(0,L.jsxs)("label",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.twitterUsername")}),(0,L.jsx)("input",{type:"text",name:"twitterHandle",value:g.twitterHandle,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.twitterHandle")})]}),(0,L.jsxs)("label",{children:[(0,L.jsx)("span",{children:(0,u.t)("publishDialog.website")}),(0,L.jsx)("input",{type:"text",name:"website",pattern:"https?://.+",title:(0,u.t)("publishDialog.errors.website"),value:g.website,onChange:_,placeholder:(0,u.t)("publishDialog.placeholder.website")})]}),(0,L.jsx)("span",{className:"publish-library-note",children:(0,L.jsx)(F.Z,{i18nKey:"publishDialog.noteLicense",link:function(e){return(0,L.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:e})}})})]}),(0,L.jsxs)("div",{className:"publish-library__buttons",children:[(0,L.jsx)(J.Z,{label:(0,u.t)("buttons.cancel"),onClick:P,"data-testid":"cancel-clear-canvas-button"}),(0,L.jsx)(J.Z,{type:"submit",label:(0,u.t)("buttons.submit"),actionType:"primary",isLoading:x})]})]}):(0,L.jsx)("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:(0,u.t)("publishDialog.atleastOneLibItem")})})},se=n(9127),ue=n(96),de=function(e,t){return e.filter((function(e){return t.includes(e.id)}))},fe=function(e){var t=e.setAppState,n=e.selectedItems,r=e.library,a=e.onRemoveFromLibrary,d=e.resetLibrary,f=e.onSelectItems,g=e.appState,v=e.className,b=(0,V.KO)(s.rF,U.yE),y=(0,i.Z)(b,1)[0],x=(0,V.KO)(Ee,U.yE),w=(0,i.Z)(x,2),k=w[0],E=w[1],j=(0,c.useCallback)((function(){var e=n.length?(0,u.t)("alerts.removeItemsFromsLibrary",{count:n.length}):(0,u.t)("alerts.resetLibrary"),t=n.length?(0,u.t)("confirmDialog.removeItemsFromLib"):(0,u.t)("confirmDialog.resetLibrary");return(0,L.jsx)(G.Z,{onConfirm:function(){n.length?a():d(),C(!1)},onCancel:function(){C(!1)},title:t,children:(0,L.jsx)("p",{children:e})})}),[n,a,d]),S=(0,c.useState)(!1),O=(0,i.Z)(S,2),_=O[0],C=O[1],P=!!n.length,T=P?y.libraryItems.filter((function(e){return n.includes(e.id)})):y.libraryItems,I=P?(0,u.t)("buttons.remove"):(0,u.t)("buttons.resetLibrary"),M=(0,c.useState)(!1),A=(0,i.Z)(M,2),Z=A[0],R=A[1],z=(0,c.useState)(null),N=(0,i.Z)(z,2),B=N[0],H=N[1],W=(0,c.useCallback)((function(){return(0,L.jsxs)(q.V,{onCloseRequest:function(){return H(null)},title:(0,u.t)("publishSuccessDialog.title"),className:"publish-library-success",small:!0,children:[(0,L.jsx)("p",{children:(0,L.jsx)(F.Z,{i18nKey:"publishSuccessDialog.content",authorName:B.authorName,link:function(e){return(0,L.jsx)("a",{href:null==B?void 0:B.url,target:"_blank",rel:"noopener noreferrer",children:e})}})}),(0,L.jsx)(K.V,{type:"button",title:(0,u.t)("buttons.close"),"aria-label":(0,u.t)("buttons.close"),label:(0,u.t)("buttons.close"),onClick:function(){return H(null)},"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]})}),[H,B]),X=(0,c.useCallback)((function(e,t){R(!1),H({url:e.url,authorName:e.authorName});var o=t.slice();o.forEach((function(e){n.includes(e.id)&&(e.status="published")})),r.setLibrary(o)}),[R,H,n,r]),$=function(){var e=(0,o.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.updateLibrary({libraryItems:(0,Y.I$)({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0});case 3:e.next=11;break;case 5:if(e.prev=5,e.t0=e.catch(0),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=10;break}return console.warn(e.t0),e.abrupt("return");case 10:t({errorMessage:(0,u.t)("errors.importLibraryError")});case 11:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),J=function(){var e=(0,o.Z)(l().mark((function e(){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!P){e.next=4;break}e.t0=T,e.next=7;break;case 4:return e.next=6,r.getLatestLibrary();case 6:e.t0=e.sent;case 7:n=e.t0,(0,p.t1)(n).catch(h.FG).catch((function(e){t({errorMessage:e.message})}));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,L.jsxs)("div",{className:(0,m.Z)("library-menu-dropdown-container",v),children:[(0,L.jsxs)(se.Z,{open:k,children:[(0,L.jsx)(se.Z.Trigger,{onToggle:function(){return E(!k)},children:D.YA}),(0,L.jsxs)(se.Z.Content,{onClickOutside:function(){return E(!1)},onSelect:function(){return E(!1)},className:"library-menu",children:[!P&&(0,L.jsx)(se.Z.Item,{onSelect:$,icon:D.Tl,"data-testid":"lib-dropdown--load",children:(0,u.t)("buttons.load")}),!!T.length&&(0,L.jsx)(se.Z.Item,{onSelect:J,icon:D.Hy,"data-testid":"lib-dropdown--export",children:(0,u.t)("buttons.export")}),!!T.length&&(0,L.jsx)(se.Z.Item,{onSelect:function(){return C(!0)},icon:D.XH,children:I}),P&&(0,L.jsx)(se.Z.Item,{icon:D.Nw,onSelect:function(){return R(!0)},"data-testid":"lib-dropdown--remove",children:(0,u.t)("buttons.publishLibrary")})]})]}),n.length>0&&(0,L.jsx)("div",{className:"library-actions-counter",children:n.length}),_&&j(),Z&&(0,L.jsx)(ce,{onClose:function(){return R(!1)},libraryItems:de(y.libraryItems,n),appState:g,onSuccess:function(e){return X(e,y.libraryItems)},onError:function(e){return window.alert(e)},updateItemsInStorage:function(){return r.setLibrary(y.libraryItems)},onRemove:function(e){return f(n.filter((function(t){return t!==e})))}}),B&&W()]})},pe=function(e){var t=e.selectedItems,n=e.onSelectItems,r=e.className,a=(0,g.qD)().library,d=(0,ue.I)(),f=(0,g.n9)(),p=(0,V.KO)(s.rF,U.yE),h=(0,i.Z)(p,1)[0],m=(0,c.useCallback)(function(){var e=(0,o.Z)(l().mark((function e(r){var o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=r.filter((function(e){return!t.includes(e.id)})),a.setLibrary(o).catch((function(){f({errorMessage:(0,u.t)("alerts.errorRemovingFromLibrary")})})),n([]);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[a,f,t,n]),v=(0,c.useCallback)((function(){a.resetLibrary()}),[a]);return(0,L.jsx)(fe,{appState:d,setAppState:f,selectedItems:t,onSelectItems:n,library:a,onRemoveFromLibrary:function(){return m(h.libraryItems)},resetLibrary:v,className:r})},he=n(6440),me={};me.styleTagTransform=P(),me.setAttributes=S(),me.insert=E().bind(null,"head"),me.domAPI=w(),me.insertStyleElement=_();y()(he.Z,me),he.Z&&he.Z.locals&&he.Z.locals;function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var be=function(e){var t=e.isLoading,n=e.libraryItems,o=e.onAddToLibrary,a=e.onInsertLibraryItems,l=e.pendingElements,s=e.selectedItems,d=e.onSelectItems,f=e.theme,m=e.id,g=e.libraryReturnUrl,v=(0,c.useState)(null),b=(0,i.Z)(v,2),y=b[0],x=b[1],w=function(e,t){var n=!s.includes(e),o=[].concat((0,r.Z)(S),(0,r.Z)(O));if(n){if(t.shiftKey&&y){var i=o.findIndex((function(e){return e.id===y})),a=o.findIndex((function(t){return t.id===e}));if(-1===i||-1===a)return void d([].concat((0,r.Z)(s),[e]));var l=(0,h.xn)(s),c=o.reduce((function(e,t,n){return(n>=i&&n<=a||l.has(t.id))&&e.push(t.id),e}),[]);d(c)}else d([].concat((0,r.Z)(s),[e]));x(e)}else x(null),d(s.filter((function(t){return t!==e})))},k=function(e){return(s.includes(e)?n.filter((function(e){return s.includes(e.id)})):n.filter((function(t){return t.id===e}))).map((function(e){return ve(ve({},e),{},{elements:(0,B._N)(e.elements,{randomizeSeed:!0})})}))},E=function(e){var t,n,r,o,i;return(0,L.jsx)(R.Z.Col,{children:(0,L.jsx)(Z,{elements:null===(t=e.item)||void 0===t?void 0:t.elements,isPending:!(null!==(n=e.item)&&void 0!==n&&n.id||null===(r=e.item)||void 0===r||!r.elements),onClick:e.onClick||function(){},id:(null===(o=e.item)||void 0===o?void 0:o.id)||null,selected:!(null===(i=e.item)||void 0===i||!i.id)&&s.includes(e.item.id),onToggle:w,onDrag:function(e,t){t.dataTransfer.setData(z.LO.excalidrawlib,(0,p.NI)(k(e)))}})},e.key)},j=function(e){var t=e.map((function(e){return e.id?E({item:e,onClick:function(){return a(k(e.id))},key:e.id}):E({key:"__pending__item__",item:e,onClick:function(){return o(l)}})})),n=(0,h.yo)(t,4);return n.length||(n=[[]]),n.map((function(e,t,n){return t===n.length-1&&(e=e.concat(new Array(4-e.length).fill(null).map((function(e,t){return E({key:"empty_".concat(t),item:null})})))),(0,L.jsx)(R.Z.Row,{align:"center",className:"library-menu-items-container__row",children:e},t)}))},S=n.filter((function(e){return"published"!==e.status})),O=n.filter((function(e){return"published"===e.status})),_=!n.length&&!l.length,C=!l.length&&!S.length&&!O.length;return(0,L.jsxs)("div",{className:"library-menu-items-container",style:l.length||S.length||O.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[!C&&(0,L.jsx)(pe,{selectedItems:s,onSelectItems:d,className:"library-menu-dropdown-container--in-heading"}),(0,L.jsxs)(R.Z.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:O.length>0?1:"0 1 auto",marginBottom:0},children:[(0,L.jsxs)(L.Fragment,{children:[!C&&(0,L.jsx)("div",{className:"library-menu-items-container__header",children:(0,u.t)("labels.personalLib")}),t&&(0,L.jsx)("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:(0,L.jsx)(N.Z,{})}),(0,L.jsx)("div",{className:"library-menu-items-private-library-container",children:l.length||S.length?j([].concat((0,r.Z)(l.length?[{id:null,elements:l}]:[]),(0,r.Z)(S))):(0,L.jsxs)("div",{className:"library-menu-items__no-items",children:[(0,L.jsx)("div",{className:"library-menu-items__no-items__label",children:(0,u.t)("library.noItems")}),(0,L.jsx)("div",{className:"library-menu-items__no-items__hint",children:O.length>0?(0,u.t)("library.hint_emptyPrivateLibrary"):(0,u.t)("library.hint_emptyLibrary")})]})})]}),(0,L.jsxs)(L.Fragment,{children:[(O.length>0||l.length>0||S.length>0)&&(0,L.jsx)("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",children:(0,u.t)("labels.excalidrawLib")}),O.length>0?j(O):S.length>0?(0,L.jsx)("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:(0,u.t)("library.noItems")}):null]}),_&&(0,L.jsx)(W,{style:{padding:"16px 0",width:"100%"},id:m,libraryReturnUrl:g,theme:f,children:(0,L.jsx)(pe,{selectedItems:s,onSelectItems:d})})]})]})},ye=n(7047),xe=n(75),we=n(8923),ke={};ke.styleTagTransform=P(),ke.setAttributes=S(),ke.insert=E().bind(null,"head"),ke.domAPI=w(),ke.insertStyleElement=_();y()(we.Z,ke),we.Z&&we.Z.locals&&we.Z.locals;var Ee=(0,V.cn)(!1),je=function(e){var t=e.children;return(0,L.jsx)("div",{className:"layer-ui__library",children:t})},Se=function(e){var t=e.onInsertLibraryItems,n=e.pendingElements,a=e.onAddToLibrary,f=e.setAppState,p=e.libraryReturnUrl,h=e.library,m=e.id,g=e.appState,v=e.selectedItems,b=e.onSelectItems,y=(0,V.KO)(s.rF,U.yE),x=(0,i.Z)(y,1)[0],w=(0,c.useCallback)(function(){var e=(0,o.Z)(l().mark((function e(t,n){var o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,ye.L)("element","addToLibrary","ui"),!t.some((function(e){return"image"===e.type}))){e.next=3;break}return e.abrupt("return",f({errorMessage:"Support for adding images to the library coming soon!"}));case 3:o=[{status:"unpublished",elements:t,id:(0,d.kb)(),created:Date.now()}].concat((0,r.Z)(n)),a(),h.setLibrary(o).catch((function(){f({errorMessage:(0,u.t)("alerts.errorAddingToLibrary")})}));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[a,h,f]);if("loading"===x.status&&!x.isInitialized)return(0,L.jsx)(je,{children:(0,L.jsx)("div",{className:"layer-ui__library-message",children:(0,L.jsxs)("div",{children:[(0,L.jsx)(N.Z,{size:"2em"}),(0,L.jsx)("span",{children:(0,u.t)("labels.libraryLoadingMessage")})]})})});var k=x.libraryItems.length>0||n.length>0;return(0,L.jsxs)(je,{children:[(0,L.jsx)(be,{isLoading:"loading"===x.status,libraryItems:x.libraryItems,onAddToLibrary:function(e){return w(e,x.libraryItems)},onInsertLibraryItems:t,pendingElements:n,selectedItems:v,onSelectItems:b,id:m,libraryReturnUrl:p,theme:g.theme}),k&&(0,L.jsx)(W,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:m,libraryReturnUrl:p,theme:g.theme})]})},Oe=function(){var e=(0,g.qD)(),t=e.library,n=e.id,r=e.onInsertElements,o=(0,g.hY)(),a=(0,ue.I)(),l=(0,g.n9)(),u=(0,g.bd)(),d=(0,c.useState)([]),f=(0,i.Z)(d,2),p=f[0],h=f[1],m=(0,c.useCallback)((function(){l({selectedElementIds:{},selectedGroupIds:{}})}),[l]);return(0,L.jsx)(Se,{pendingElements:(0,xe.eD)(u,a,!0),onInsertLibraryItems:function(e){r((0,s.WV)(e))},onAddToLibrary:m,setAppState:l,libraryReturnUrl:o.libraryReturnUrl,library:t,id:n,appState:a,selectedItems:p,onSelectItems:h})}},5440:function(e,t,n){"use strict";n.d(t,{z:function(){return u}});var r=n(2577),o=n(8211),i=n(9787),a=n(5644),l=n(45),c=n(2335),s=n(4512),u=function(e){var t=e.delay,n=e.theme,u=(0,i.useState)(!!t),d=(0,r.Z)(u,2),f=d[0],p=d[1];return(0,i.useEffect)((function(){if(t){var e=setTimeout((function(){p(!1)}),t);return function(){return clearTimeout(e)}}}),[t]),f?null:(0,s.jsxs)("div",{className:(0,l.Z)("LoadingMessage",{"LoadingMessage--dark":n===c.C6.DARK}),children:[(0,s.jsx)("div",{children:(0,s.jsx)(a.Z,{})}),(0,s.jsx)("div",{className:"LoadingMessage-text",children:(0,o.t)("labels.loadingScene")})]})}},2891:function(e,t,n){"use strict";n.d(t,{J:function(){return k}});var r=n(9787),o=n(487),i=n.n(o),a=n(631),l=n.n(a),c=n(2052),s=n.n(c),u=n(4010),d=n.n(u),f=n(1469),p=n.n(f),h=n(9329),m=n.n(h),g=n(9935),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p();i()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=n(5156),y=n(6340),x=n(6066),w=n(4512),k=function(e){var t=e.children,n=e.left,o=e.top,i=e.onCloseRequest,a=e.fitInViewport,l=void 0!==a&&a,c=e.offsetLeft,s=void 0===c?0:c,u=e.offsetTop,d=void 0===u?0:u,f=e.viewportWidth,p=void 0===f?window.innerWidth:f,h=e.viewportHeight,m=void 0===h?window.innerHeight:h,g=(0,r.useRef)(null);(0,r.useEffect)((function(){var e=g.current;if(e){e.contains(document.activeElement)||e.focus();var t=function(t){if(t.key===x.tW.TAB){var n=(0,y.xp)(e),r=document.activeElement,o=n.findIndex((function(e){return e===r}));if(r===e){var i;if(t.shiftKey)null===(i=n[n.length-1])||void 0===i||i.focus();else n[0].focus();t.preventDefault(),t.stopImmediatePropagation()}else if(0===o&&t.shiftKey){var a;null===(a=n[n.length-1])||void 0===a||a.focus(),t.preventDefault(),t.stopImmediatePropagation()}else if(o===n.length-1&&!t.shiftKey){var l;null===(l=n[0])||void 0===l||l.focus(),t.preventDefault(),t.stopImmediatePropagation()}}};return e.addEventListener("keydown",t),function(){return e.removeEventListener("keydown",t)}}}),[]);var v=(0,r.useRef)(null);return(0,r.useLayoutEffect)((function(){if(l&&g.current&&null!=o&&null!=n){var e,t,r=g.current,i=r.getBoundingClientRect(),a=i.width,c=i.height;if((null===(e=v.current)||void 0===e?void 0:e.top)===o&&(null===(t=v.current)||void 0===t?void 0:t.left)===n)return;v.current={top:o,left:n},a>=p?(r.style.width="".concat(p,"px"),r.style.left="0px",r.style.overflowX="scroll"):r.style.left="".concat(n+a-s>p?p-a-10:n,"px"),c>=m?(r.style.height="".concat(m-20,"px"),r.style.top="10px",r.style.overflowY="scroll"):r.style.top="".concat(o+c-d>m?m-c:o,"px")}}),[o,n,l,p,m,s,d]),(0,r.useEffect)((function(){if(i){var e=function(e){var t;null!==(t=g.current)&&void 0!==t&&t.contains(e.target)||(0,b.unstable_batchedUpdates)((function(){return i(e)}))};return document.addEventListener("pointerdown",e,!1),function(){return document.removeEventListener("pointerdown",e,!1)}}}),[i]),(0,w.jsx)("div",{className:"popover",ref:g,tabIndex:-1,children:t})}},1034:function(e,t,n){"use strict";n.d(t,{YE:function(){return rt},t6:function(){return tt}});var r=n(2577),o=n(7169),i=n(2726),a=n(9787),l=n.n(a),c=n(1881),s=n(4739),u=n(9487),d=l().createContext({}),f=n(45),p=n(8211),h=n(6936),m=n(3646),g=n(1894),v=n(7172),b=n(4512),y=function(e){var t=e.children,n=e.className,r=(0,h.Fy)(),o=(0,a.useContext)(d),i=!(!r.canDeviceFitSidebar||!o.shouldRenderDockButton);return(0,b.jsxs)("div",{className:(0,f.Z)("sidebar__header",n),"data-testid":"sidebar-header",children:[t,(0,b.jsxs)("div",{className:"sidebar__header__buttons",children:[i&&(0,b.jsx)(g.u,{label:(0,p.t)("labels.sidebarLock"),children:(0,b.jsx)(v.z,{onSelect:function(){var e;return null===(e=o.onDock)||void 0===e?void 0:e.call(o,!o.docked)},selected:!!o.docked,className:"sidebar__dock","data-testid":"sidebar-dock","aria-label":(0,p.t)("labels.sidebarLock"),children:m.qQ})}),(0,b.jsx)(v.z,{"data-testid":"sidebar-close",className:"sidebar__close",onSelect:o.onCloseRequest,"aria-label":(0,p.t)("buttons.close"),children:m.Tw})]})]})};y.displayName="SidebarHeader";var x=n(6340),w=n(6066),k=n(2335),E=n(96),j=n(487),S=n.n(j),O=n(631),_=n.n(O),C=n(2052),P=n.n(C),T=n(4010),I=n.n(T),M=n(1469),D=n.n(M),A=n(9329),L=n.n(A),Z=n(7051),R={};R.styleTagTransform=L(),R.setAttributes=I(),R.insert=P().bind(null,"head"),R.domAPI=_(),R.insertStyleElement=D();S()(Z.Z,R),Z.Z&&Z.Z.locals&&Z.Z.locals;var z=function(e){var t,n=e.name,r=e.tab,o=e.icon,i=e.title,a=e.children,l=e.onToggle,c=e.className,s=e.style,u=(0,h.n9)(),d=(0,E.I)();return(0,b.jsxs)("label",{title:i,children:[(0,b.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",onChange:function(e){var t;null===(t=document.querySelector(".layer-ui__wrapper"))||void 0===t||t.classList.remove("animate");var o=e.target.checked;u({openSidebar:o?{name:n,tab:r}:null}),null==l||l(o)},checked:(null===(t=d.openSidebar)||void 0===t?void 0:t.name)===n,"aria-label":i,"aria-keyshortcuts":"0"}),(0,b.jsxs)("div",{className:(0,f.Z)("sidebar-trigger",c),style:s,children:[o&&(0,b.jsx)("div",{children:o}),a&&(0,b.jsx)("div",{className:"sidebar-trigger__label",children:a})]})]})};z.displayName="SidebarTrigger";var N=n(11),B=n(7217),H=n(1267),W=n(9335),F=n(4801);var U=n(5622),K=n(3119),Y=n(3060),V=n(2673);const G=(0,a.createContext)(void 0);function X(e){const t=(0,a.useContext)(G);return e||t||"ltr"}const q="rovingFocusGroup.onEntryFocus",$={bubbles:!1,cancelable:!0},J="RovingFocusGroup",[Q,ee,te]=function(e){const t=e+"CollectionProvider",[n,r]=(0,H.b)(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{const{scope:t,children:n}=e,r=l().useRef(null),i=l().useRef(new Map).current;return l().createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},c=e+"CollectionSlot",s=l().forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=i(c,n),a=(0,W.e)(t,o.collectionRef);return l().createElement(F.g7,{ref:a},r)})),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=l().forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=l().useRef(null),c=(0,W.e)(t,a),s=i(u,n);return l().useEffect((()=>(s.itemMap.set(a,{ref:a,...o}),()=>{s.itemMap.delete(a)}))),l().createElement(F.g7,{[d]:"",ref:c},r)}));return[{Provider:a,Slot:s,ItemSlot:f},function(t){const n=i(e+"CollectionConsumer",t);return l().useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}(J),[ne,re]=(0,H.b)(J,[te]),[oe,ie]=ne(J),ae=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(Q.Provider,{scope:e.__scopeRovingFocusGroup},(0,a.createElement)(Q.Slot,{scope:e.__scopeRovingFocusGroup},(0,a.createElement)(le,(0,N.Z)({},e,{ref:t})))))),le=(0,a.forwardRef)(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:s,onEntryFocus:u,...d}=e,f=(0,a.useRef)(null),p=(0,W.e)(t,f),h=X(i),[m=null,g]=(0,V.T)({prop:l,defaultProp:c,onChange:s}),[v,b]=(0,a.useState)(!1),y=(0,Y.W)(u),x=ee(n),w=(0,a.useRef)(!1),[k,E]=(0,a.useState)(0);return(0,a.useEffect)((()=>{const e=f.current;if(e)return e.addEventListener(q,y),()=>e.removeEventListener(q,y)}),[y]),(0,a.createElement)(oe,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:m,onItemFocus:(0,a.useCallback)((e=>g(e)),[g]),onItemShiftTab:(0,a.useCallback)((()=>b(!0)),[]),onFocusableItemAdd:(0,a.useCallback)((()=>E((e=>e+1))),[]),onFocusableItemRemove:(0,a.useCallback)((()=>E((e=>e-1))),[])},(0,a.createElement)(K.WV.div,(0,N.Z)({tabIndex:v||0===k?-1:0,"data-orientation":r},d,{ref:p,style:{outline:"none",...e.style},onMouseDown:(0,B.M)(e.onMouseDown,(()=>{w.current=!0})),onFocus:(0,B.M)(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(q,$);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));de([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:(0,B.M)(e.onBlur,(()=>b(!1)))})))})),ce="RovingFocusGroupItem",se=(0,a.forwardRef)(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...l}=e,c=(0,U.M)(),s=i||c,u=ie(ce,n),d=u.currentTabStopId===s,f=ee(n),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return(0,a.useEffect)((()=>{if(r)return p(),()=>h()}),[r,p,h]),(0,a.createElement)(Q.ItemSlot,{scope:n,id:s,focusable:r,active:o},(0,a.createElement)(K.WV.span,(0,N.Z)({tabIndex:d?0:-1,"data-orientation":u.orientation},l,{ref:t,onMouseDown:(0,B.M)(e.onMouseDown,(e=>{r?u.onItemFocus(s):e.preventDefault()})),onFocus:(0,B.M)(e.onFocus,(()=>u.onItemFocus(s))),onKeyDown:(0,B.M)(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:ue[r]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let o=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=u.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>de(o)))}var n,r}))})))})),ue={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function de(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const fe=ae,pe=se;var he=n(1483);const me="Tabs",[ge,ve]=(0,H.b)(me,[re]),be=re(),[ye,xe]=ge(me),we=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:l="horizontal",dir:c,activationMode:s="automatic",...u}=e,d=X(c),[f,p]=(0,V.T)({prop:r,onChange:o,defaultProp:i});return(0,a.createElement)(ye,{scope:n,baseId:(0,U.M)(),value:f,onValueChange:p,orientation:l,dir:d,activationMode:s},(0,a.createElement)(K.WV.div,(0,N.Z)({dir:d,"data-orientation":l},u,{ref:t})))})),ke="TabsList",Ee=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=xe(ke,n),l=be(n);return(0,a.createElement)(fe,(0,N.Z)({asChild:!0},l,{orientation:i.orientation,dir:i.dir,loop:r}),(0,a.createElement)(K.WV.div,(0,N.Z)({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))})),je="TabsTrigger",Se=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,l=xe(je,n),c=be(n),s=Ce(l.baseId,r),u=Pe(l.baseId,r),d=r===l.value;return(0,a.createElement)(pe,(0,N.Z)({asChild:!0},c,{focusable:!o,active:d}),(0,a.createElement)(K.WV.button,(0,N.Z)({type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:s},i,{ref:t,onMouseDown:(0,B.M)(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(r)})),onKeyDown:(0,B.M)(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&l.onValueChange(r)})),onFocus:(0,B.M)(e.onFocus,(()=>{const e="manual"!==l.activationMode;d||o||!e||l.onValueChange(r)}))})))})),Oe="TabsContent",_e=(0,a.forwardRef)(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...l}=e,c=xe(Oe,n),s=Ce(c.baseId,r),u=Pe(c.baseId,r),d=r===c.value,f=(0,a.useRef)(d);return(0,a.useEffect)((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),(0,a.createElement)(he.z,{present:o||d},(({present:n})=>(0,a.createElement)(K.WV.div,(0,N.Z)({"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":s,hidden:!n,id:u,tabIndex:0},l,{ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0}}),n&&i)))}));function Ce(e,t){return`${e}-trigger-${t}`}function Pe(e,t){return`${e}-content-${t}`}const Te=we,Ie=Ee,Me=Se,De=_e;var Ae=["children"];function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Re=function(e){var t=e.children,n=(0,i.Z)(e,Ae);return(0,b.jsx)(Ie,Ze(Ze({className:"sidebar-triggers"},n),{},{children:t}))};Re.displayName="SidebarTabTriggers";var ze=["children","tab","onSelect"];function Ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var He=function(e){var t=e.children,n=e.tab,r=e.onSelect,o=(0,i.Z)(e,ze);return(0,b.jsx)(Me,{value:n,asChild:!0,onSelect:r,children:(0,b.jsx)("button",Be(Be({type:"button",className:"excalidraw-button sidebar-tab-trigger"},o),{},{children:t}))})};He.displayName="SidebarTabTrigger";var We=["children"];function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ke=function(e){var t=e.children,n=(0,i.Z)(e,We),r=(0,E.I)(),o=(0,h.n9)();if(!r.openSidebar)return null;var a=r.openSidebar.name;return(0,b.jsx)(Te,Ue(Ue({className:"sidebar-tabs-root",value:r.openSidebar.tab,onValueChange:function(e){return o((function(t){return Ue(Ue({},t),{},{openSidebar:Ue(Ue({},t.openSidebar),{},{name:a,tab:e})})}))}},n),{},{children:t}))};Ke.displayName="SidebarTabs";var Ye=["tab","children"];function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xe=function(e){var t=e.tab,n=e.children,r=(0,i.Z)(e,Ye);return(0,b.jsx)(De,Ge(Ge({},r),{},{value:t,children:n}))};Xe.displayName="SidebarTab";var qe=n(8208),$e={};$e.styleTagTransform=L(),$e.setAttributes=I(),$e.insert=P().bind(null,"head"),$e.domAPI=_(),$e.insertStyleElement=D();S()(qe.Z,$e),qe.Z&&qe.Z.locals&&qe.Z.locals;var Je=["name","children","onDock","docked","className"];function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tt=(0,s.cn)(!1),nt=(0,a.forwardRef)((function(e,t){e.name;var n=e.children,r=e.onDock,o=e.docked,l=e.className,p=(0,i.Z)(e,Je);var m=(0,h.n9)(),g=(0,s.b9)(tt,u.yE);(0,a.useLayoutEffect)((function(){return g(!!o),function(){g(!1)}}),[g,o]);var v=(0,a.useRef)({});v.current.onCloseRequest=function(){m({openSidebar:null})},v.current.onDock=function(e){return null==r?void 0:r(e)},v.current=(0,x.v4)(v.current,{docked:o,shouldRenderDockButton:!!r&&null!=o});var y=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(function(){return y.current}));var E=(0,h.Fy)(),j=(0,a.useCallback)((function(){!!document.querySelector(".Dialog")||m({openSidebar:null})}),[m]);return function(e,t){(0,a.useEffect)((function(){var n=function(n){e.current&&(n.target instanceof Element&&(e.current.contains(n.target)||!document.body.contains(n.target))||t(n))};return document.addEventListener("pointerdown",n,!1),function(){document.removeEventListener("pointerdown",n)}}),[e,t])}(y,(0,a.useCallback)((function(e){e.target.closest(".sidebar-trigger")||o&&E.canDeviceFitSidebar||j()}),[j,o,E.canDeviceFitSidebar])),(0,a.useEffect)((function(){var e=function(e){e.key!==w.tW.ESCAPE||o&&E.canDeviceFitSidebar||j()};return document.addEventListener(k.Ks.KEYDOWN,e),function(){document.removeEventListener(k.Ks.KEYDOWN,e)}}),[j,o,E.canDeviceFitSidebar]),(0,b.jsx)(c.W,et(et({},p),{},{className:(0,f.Z)("sidebar",{"sidebar--docked":o},l),ref:y,children:(0,b.jsx)(d.Provider,{value:v.current,children:n})}))}));nt.displayName="SidebarInner";var rt=Object.assign((0,a.forwardRef)((function(e,t){var n,o=(0,E.I)(),i=e.onStateChange,l=(0,a.useRef)(o.openSidebar);(0,a.useEffect)((function(){var t,n,r,a,c;(!o.openSidebar&&(null==l||null===(t=l.current)||void 0===t?void 0:t.name)===e.name||(null===(n=o.openSidebar)||void 0===n?void 0:n.name)===e.name&&(null==l||null===(r=l.current)||void 0===r?void 0:r.name)!==e.name||(null===(a=l.current)||void 0===a?void 0:a.name)===e.name)&&o.openSidebar!==l.current&&(null==i||i((null===(c=o.openSidebar)||void 0===c?void 0:c.name)!==e.name?null:o.openSidebar));l.current=o.openSidebar}),[o.openSidebar,i,e.name]);var c=(0,a.useState)(!1),s=(0,r.Z)(c,2),u=s[0],d=s[1];return(0,a.useLayoutEffect)((function(){return d(!0),function(){return d(!1)}}),[]),u&&(null===(n=o.openSidebar)||void 0===n?void 0:n.name)===e.name?(0,a.createElement)(nt,et(et({},e),{},{ref:t,key:e.name})):null})),{Header:y,TabTriggers:Re,TabTrigger:He,Tabs:Ke,Tab:Xe,Trigger:z});rt.displayName="Sidebar"},5644:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(487),o=n.n(r),i=n(631),a=n.n(i),l=n(2052),c=n.n(l),s=n(4010),u=n.n(s),d=n(1469),f=n.n(d),p=n(9329),h=n.n(p),m=n(5892),g={};g.styleTagTransform=h(),g.setAttributes=u(),g.insert=c().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=f();o()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals;var v=n(4512),b=function(e){var t=e.size,n=void 0===t?"1em":t,r=e.circleWidth,o=void 0===r?8:r;return(0,v.jsx)("div",{className:"Spinner",children:(0,v.jsx)("svg",{viewBox:"0 0 100 100",style:{width:n,height:n},children:(0,v.jsx)("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})}},7239:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(7169),o=n(487),i=n.n(o),a=n(631),l=n.n(a),c=n(2052),s=n.n(c),u=n(4010),d=n.n(u),f=n(1469),p=n.n(f),h=n(9329),m=n.n(h),g=n(3874),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p();i()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=n(45),y=n(4512);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k={Row:function(e){var t=e.children,n=e.gap,r=e.align,o=e.justifyContent,i=e.className,a=e.style;return(0,y.jsx)("div",{className:(0,b.Z)("Stack Stack_horizontal",i),style:w({"--gap":n,alignItems:r,justifyContent:o},a),children:t})},Col:function(e){var t=e.children,n=e.gap,r=e.align,o=e.justifyContent,i=e.className,a=e.style;return(0,y.jsx)("div",{className:(0,b.Z)("Stack Stack_vertical",i),style:w({"--gap":n,justifyItems:r,justifyContent:o},a),children:t})}}},1319:function(e,t,n){"use strict";n.d(t,{V:function(){return h}});var r=n(8950),o=n(2577),i=n(2975),a=n.n(i),l=(n(5422),n(9787)),c=n.n(l),s=n(45),u=n(6936),d=n(6797),f=n(5644),p=n(4512),h=c().forwardRef((function(e,t){var n=(0,u.J0)().id,i=c().useRef(null);c().useImperativeHandle(t,(function(){return i.current}));var h="ToolIcon_size_".concat(e.size),m=(0,l.useState)(!1),g=(0,o.Z)(m,2),v=g[0],b=g[1],y=(0,l.useRef)(!0),x=function(){var t=(0,r.Z)(a().mark((function t(n){var r,o;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o="onClick"in e&&(null===(r=e.onClick)||void 0===r?void 0:r.call(e,n)))||!("then"in o)){t.next=18;break}return t.prev=2,b(!0),t.next=6,o;case 6:t.next=15;break;case 8:if(t.prev=8,t.t0=t.catch(2),t.t0 instanceof d._){t.next=14;break}throw t.t0;case 14:console.warn(t.t0);case 15:return t.prev=15,y.current&&b(!1),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[2,8,15,18]])})));return function(e){return t.apply(this,arguments)}}();(0,l.useEffect)((function(){return function(){y.current=!1}}),[]);var w=(0,l.useRef)(null);if("button"===e.type||"icon"===e.type||"submit"===e.type){var k="icon"===e.type?"button":e.type;return(0,p.jsxs)("button",{className:(0,s.Z)("ToolIcon_type_button",h,e.className,e.visible&&!e.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!e.hidden,"ToolIcon--selected":e.selected,"ToolIcon--plain":"icon"===e.type}),"data-testid":e["data-testid"],hidden:e.hidden,title:e.title,"aria-label":e["aria-label"],type:k,onClick:x,ref:i,disabled:v||e.isLoading,children:[(e.icon||e.label)&&(0,p.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[e.icon||e.label,e.keyBindingLabel&&(0,p.jsx)("span",{className:"ToolIcon__keybinding",children:e.keyBindingLabel}),e.isLoading&&(0,p.jsx)(f.Z,{})]}),e.showAriaLabel&&(0,p.jsxs)("div",{className:"ToolIcon__label",children:[e["aria-label"]," ",v&&(0,p.jsx)(f.Z,{})]}),e.children]})}return(0,p.jsxs)("label",{className:(0,s.Z)("ToolIcon",e.className),title:e.title,onPointerDown:function(t){var n;w.current=t.pointerType||null,null===(n=e.onPointerDown)||void 0===n||n.call(e,{pointerType:t.pointerType||null})},onPointerUp:function(){requestAnimationFrame((function(){w.current=null}))},children:[(0,p.jsx)("input",{className:"ToolIcon_type_radio ".concat(h),type:"radio",name:e.name,"aria-label":e["aria-label"],"aria-keyshortcuts":e["aria-keyshortcuts"],"data-testid":e["data-testid"],id:"".concat(n,"-").concat(e.id),onChange:function(){var t;null===(t=e.onChange)||void 0===t||t.call(e,{pointerType:w.current})},checked:e.checked,ref:i}),(0,p.jsxs)("div",{className:"ToolIcon__icon",children:[e.icon,e.keyBindingLabel&&(0,p.jsx)("span",{className:"ToolIcon__keybinding",children:e.keyBindingLabel})]})]})}));h.defaultProps={visible:!0,className:"",size:"medium"},h.displayName="ToolButton"},1894:function(e,t,n){"use strict";n.d(t,{u:function(){return w},bK:function(){return y},Js:function(){return x}});var r=n(487),o=n.n(r),i=n(631),a=n.n(i),l=n(2052),c=n.n(l),s=n(4010),u=n.n(s),d=n(1469),f=n.n(d),p=n(9329),h=n.n(p),m=n(6626),g={};g.styleTagTransform=h(),g.setAttributes=u(),g.insert=c().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=f();o()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals;var v=n(9787),b=n(4512),y=function(){var e=document.querySelector(".excalidraw-tooltip");if(e)return e;var t=document.createElement("div");return document.body.appendChild(t),t.classList.add("excalidraw-tooltip"),t},x=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"bottom",o=e.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,l=5,c=t.left+t.width/2-o.width/2;c<0?c=l:c+o.width>=i&&(c=i-o.width-l),"bottom"===r?(n=t.top+t.height+l)+o.height>=a&&(n=t.top-o.height-l):(n=t.top-o.height-l)<0&&(n=t.top+t.height+l),Object.assign(e.style,{top:"".concat(n,"px"),left:"".concat(c,"px")})},w=function(e){var t=e.children,n=e.label,r=e.long,o=void 0!==r&&r,i=e.style;return(0,v.useEffect)((function(){return function(){return y().classList.remove("excalidraw-tooltip--visible")}}),[]),(0,b.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:function(e){return function(e,t,n,r){t.classList.add("excalidraw-tooltip--visible"),t.style.minWidth=r?"50ch":"10ch",t.style.maxWidth=r?"50ch":"15ch",t.textContent=n;var o=e.getBoundingClientRect();x(t,o)}(e.currentTarget,y(),n,o)},onPointerLeave:function(){return y().classList.remove("excalidraw-tooltip--visible")},style:i,children:t})}},2242:function(e,t,n){"use strict";var r=n(2726),o=n(1930),i=n(9787),a=n.n(i),l=n(8211),c=["i18nKey","children"],s=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,u=/{{([\w-]+)}}/,d=/<([\w-]+)>/,f=/<\/([\w-]+)>/;t.Z=function(e){var t=e.i18nKey,n=(e.children,(0,r.Z)(e,c)),i=(0,l.QT)().t;return a().createElement.apply(a(),[a().Fragment,{}].concat((0,o.Z)(function(e,t){var n=[{name:"",children:[]}];return e.split(s).filter(Boolean).forEach((function(r){var i=r.match(d),l=r.match(f),c=r.match(u);if(null!==i){var s=i[1];t.hasOwnProperty(s)?n.push({name:s,children:[]}):console.warn("Trans: missed to pass in prop ".concat(s," for interpolating ").concat(e))}else if(null!==l)if(l[1]===n[n.length-1].name){var p=n.pop(),h=a().createElement.apply(a(),[a().Fragment,{}].concat((0,o.Z)(p.children))),m=t[p.name];"function"==typeof m&&n[n.length-1].children.push(m(h))}else console.warn("Trans: unexpected end tag ".concat(r," for interpolating ").concat(e));else if(null!==c){var g=c[1];t.hasOwnProperty(g)?n[n.length-1].children.push(t[g]):console.warn("Trans: key ".concat(g," not in props for interpolating ").concat(e))}else n[n.length-1].children.push(r)})),1!==n.length&&console.warn("Trans: stack not empty for interpolating ".concat(e)),n[0].children}(i(t),n))))}},6773:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(2577),o=n(487),i=n.n(o),a=n(631),l=n.n(a),c=n(2052),s=n.n(c),u=n(4010),d=n.n(u),f=n(1469),p=n.n(f),h=n(9329),m=n.n(h),g=n(6359),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p();i()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=n(9787),y=n.n(b),x=n(45),w=n(1894),k=n(6936),E=n(4512),j=function(e){var t=e.className,n=e.mobile,o=e.collaborators,i=(0,k.eh)(),a=new Map;o.forEach((function(e,t){a.set(e.id||t,e)}));var l=a.size>0&&Array.from(a).filter((function(e){var t=(0,r.Z)(e,2),n=(t[0],t[1]);return 0!==Object.keys(n).length})).map((function(e){var t=(0,r.Z)(e,2),o=t[0],a=t[1],l=i.renderAction("goToCollaborator",[o,a]);return n?(0,E.jsx)(w.u,{label:a.username||"Unknown user",children:l},o):(0,E.jsx)(y().Fragment,{children:l},o)}));return(0,E.jsx)("div",{className:(0,x.Z)("UserList",t,{UserList_mobile:n}),children:l})}},9127:function(e,t,n){"use strict";n.d(t,{Z:function(){return U}});var r=n(45),o=n(96),i=n(6936),a=n(4512),l=function(e){var t=e.className,n=void 0===t?"":t,l=e.children,c=e.onToggle,s=(0,o.I)(),u=(0,i.Fy)(),d=(0,r.Z)("dropdown-menu-button ".concat(n),"zen-mode-transition",{"transition-left":s.zenModeEnabled,"dropdown-menu-button--mobile":u.isMobile}).trim();return(0,a.jsx)("button",{"data-prevent-outside-click":!0,className:d,onClick:c,type:"button","data-testid":"dropdown-menu-button",children:l})},c=l;l.displayName="DropdownMenuTrigger";var s=n(2739),u=function(){return(0,a.jsx)("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0"}})},d=u;u.displayName="DropdownMenuSeparator";var f=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.style,i=e.title;return(0,a.jsxs)("div",{className:"dropdown-menu-group ".concat(r),style:o,children:[i&&(0,a.jsx)("p",{className:"dropdown-menu-group-title",children:i}),t]})},p=f;f.displayName="DropdownMenuGroup";var h=n(1930),m=n(9787),g=n.n(m),v=n(1881),b=n(7239),y=n(6772),x=function(e){var t,n,o=e.children,l=e.onClickOutside,c=e.className,s=void 0===c?"":c,u=e.onSelect,d=e.style,f=(0,i.Fy)(),p=(t=function(){null==l||l()},n=(0,m.useRef)(null),(0,m.useEffect)((function(){var e=function(e){var r=n.current;!r||r.contains(e.target)||(0,h.Z)(document.querySelectorAll("[data-prevent-outside-click]")).some((function(t){return t.contains(e.target)}))||t(e)};return document.addEventListener("pointerdown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("pointerdown",e),document.removeEventListener("touchstart",e)}}),[n,t]),n),g=(0,r.Z)("dropdown-menu ".concat(s),{"dropdown-menu--mobile":f.isMobile}).trim();return(0,a.jsx)(y.N7.Provider,{value:{onSelect:u},children:(0,a.jsx)("div",{ref:p,className:g,style:d,"data-testid":"dropdown-menu",children:f.isMobile?(0,a.jsx)(b.Z.Col,{className:"dropdown-menu-container",children:o}):(0,a.jsx)(v.W,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:o})})})};x.displayName="DropdownMenuContent";var w=x,k=n(4215),E=n(7169),j=n(2726),S=["children","className"];function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,E.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=(0,j.Z)(e,S);return(0,a.jsx)("div",_(_({},o),{},{className:"dropdown-menu-item-base dropdown-menu-item-custom ".concat(r).trim(),children:t}))},P=n(487),T=n.n(P),I=n(631),M=n.n(I),D=n(2052),A=n.n(D),L=n(4010),Z=n.n(L),R=n(1469),z=n.n(R),N=n(9329),B=n.n(N),H=n(7399),W={};W.styleTagTransform=B(),W.setAttributes=Z(),W.insert=A().bind(null,"head"),W.domAPI=M(),W.insertStyleElement=z();T()(H.Z,W),H.Z&&H.Z.locals&&H.Z.locals;var F=function(e){var t=e.children,n=e.open,r=function(e){return g().Children.toArray(e).find((function(e){return g().isValidElement(e)&&"string"!=typeof e.type&&(null==e?void 0:e.type.displayName)&&"DropdownMenuTrigger"===e.type.displayName}))||null}(t),o=function(e){return g().Children.toArray(e).find((function(e){return g().isValidElement(e)&&"string"!=typeof e.type&&(null==e?void 0:e.type.displayName)&&"DropdownMenuContent"===e.type.displayName}))||null}(t);return(0,a.jsxs)(a.Fragment,{children:[r,n&&o]})};F.Trigger=c,F.Content=w,F.Item=s.Z,F.ItemLink=k.Z,F.ItemCustom=C,F.Group=p,F.Separator=d;var U=F;F.displayName="DropdownMenu"},2739:function(e,t,n){"use strict";var r=n(7169),o=n(2726),i=n(6772),a=n(4122),l=n(4512),c=["icon","onSelect","children","shortcut","className"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){var t,n=e.icon,r=e.onSelect,s=e.children,d=e.shortcut,f=e.className,p=(0,o.Z)(e,c),h=(0,i.qZ)(p.onClick,r);return(0,l.jsx)("button",u(u({},p),{},{onClick:h,type:"button",className:(0,i.n)(f),title:null!==(t=p.title)&&void 0!==t?t:p["aria-label"],children:(0,l.jsx)(a.Z,{icon:n,shortcut:d,children:s})}))};t.Z=d,d.displayName="DropdownMenuItem"},4122:function(e,t,n){"use strict";var r=n(6936),o=n(4512);t.Z=function(e){var t=e.icon,n=e.shortcut,i=e.children,a=(0,r.Fy)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"dropdown-menu-item__icon",children:t}),(0,o.jsx)("div",{className:"dropdown-menu-item__text",children:i}),n&&!a.isMobile&&(0,o.jsx)("div",{className:"dropdown-menu-item__shortcut",children:n})]})}},4215:function(e,t,n){"use strict";var r=n(7169),o=n(2726),i=n(4122),a=n(6772),l=n(4512),c=["icon","shortcut","href","children","onSelect","className"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){var t,n=e.icon,r=e.shortcut,s=e.href,d=e.children,f=e.onSelect,p=e.className,h=void 0===p?"":p,m=(0,o.Z)(e,c),g=(0,a.qZ)(m.onClick,f);return(0,l.jsx)("a",u(u({},m),{},{href:s,target:"_blank",rel:"noreferrer",className:(0,a.n)(h),title:null!==(t=m.title)&&void 0!==t?t:m["aria-label"],onClick:g,children:(0,l.jsx)(i.Z,{icon:n,shortcut:r,children:d})}))};t.Z=d,d.displayName="DropdownMenuItemLink"},6772:function(e,t,n){"use strict";n.d(t,{N7:function(){return l},n:function(){return c},qZ:function(){return s}});var r=n(9787),o=n.n(r),i=n(2335),a=n(6340),l=o().createContext({}),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"dropdown-menu-item dropdown-menu-item-base ".concat(e).trim()},s=function(e,t){var n=(0,r.useContext)(l);return(0,a.Mj)(e,(function(e){var r,o=new CustomEvent(i.Ks.MENU_ITEM_SELECT,{bubbles:!0,cancelable:!0});(null==t||t(o),o.defaultPrevented)||(null===(r=n.onSelect)||void 0===r||r.call(n,o))}))}},7145:function(e,t,n){"use strict";n.d(t,{$:function(){return u}});var r=n(7169),o=n(2577),i=n(4739),a=n(9787),l=n(7681),c=n(4512);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var u=function(e,t){var n=(0,i.cn)(0),u=!1,d=0,f=function(e){var f=(0,l.R6)().jotaiScope,p=(0,i.KO)(n,f),h=(0,o.Z)(p,2)[1];return(0,a.useLayoutEffect)((function(){return h((function(e){var t=e+1;return d=t,t})),function(){h((function(e){var t=e-1;return d=t,t||(u=!1),t}))}}),[h]),e.__fallback||(u=!0),!d&&e.__fallback&&u||d>1&&e.__fallback?null:(0,c.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))};return f.displayName=e,f}},3646:function(e,t,n){"use strict";n.d(t,{$c:function(){return le},$q:function(){return z},BF:function(){return Oe},BR:function(){return re},Ct:function(){return me},D7:function(){return q},DG:function(){return oe},DJ:function(){return O},DS:function(){return He},EO:function(){return nt},ET:function(){return X},FC:function(){return E},Gc:function(){return fe},HL:function(){return ge},Hk:function(){return at},Hy:function(){return Y},IN:function(){return pe},J8:function(){return ie},Mw:function(){return _},NA:function(){return W},NW:function(){return U},Nw:function(){return it},OA:function(){return qe},OW:function(){return P},P7:function(){return ot},Pm:function(){return L},RJ:function(){return _e},RY:function(){return K},Re:function(){return I},ST:function(){return we},Sd:function(){return N},TP:function(){return ae},Tl:function(){return ne},Tw:function(){return je},UE:function(){return ce},VL:function(){return Z},Vl:function(){return ue},Vq:function(){return b},W2:function(){return Ne},W5:function(){return xe},Wl:function(){return De},X7:function(){return Ie},XB:function(){return R},XH:function(){return H},YA:function(){return x},ZA:function(){return Me},Zm:function(){return $},_C:function(){return k},_U:function(){return S},a0:function(){return Pe},a1:function(){return ee},a5:function(){return Le},aA:function(){return rt},aT:function(){return Ze},bf:function(){return Re},by:function(){return V},e0:function(){return M},eQ:function(){return J},fr:function(){return We},gK:function(){return ke},h0:function(){return G},il:function(){return Fe},j8:function(){return Ye},jn:function(){return Ee},kL:function(){return F},kM:function(){return ze},lF:function(){return Ce},m:function(){return Ke},m9:function(){return Ae},mh:function(){return be},nb:function(){return T},np:function(){return Te},nq:function(){return Ge},o3:function(){return et},oQ:function(){return j},oT:function(){return tt},op:function(){return Se},pO:function(){return y},po:function(){return te},pw:function(){return he},q0:function(){return Ve},qQ:function(){return w},rr:function(){return Qe},t5:function(){return de},tW:function(){return Xe},tb:function(){return A},tn:function(){return Ue},uD:function(){return ye},vo:function(){return $e},wr:function(){return Be},xL:function(){return B},xP:function(){return Q},xs:function(){return ve},z6:function(){return Je},zG:function(){return se},zb:function(){return D},zu:function(){return C}});var r=n(7169),o=n(2726),i=n(9787),a=n.n(i),l=n(5284),c=n(45),s=n(2335),u=n(4512),d=["width","height","mirror","style"];function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(e){return e===s.C6.LIGHT?l.white:"#1e1e1e"},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:512,n="number"==typeof t?{width:t}:t,r=n.width,i=void 0===r?512:r,a=n.height,l=void 0===a?i:a,s=n.mirror,f=n.style,h=(0,o.Z)(n,d);return(0,u.jsx)("svg",p(p({"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 ".concat(i," ").concat(l),className:(0,c.Z)({"rtl-mirror":s}),style:f},h),{},{children:"string"==typeof e?(0,u.jsx)("path",{fill:"currentColor",d:e}):e}))},g={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},v={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},b=(m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:3,y:8,width:18,height:4,rx:1}),(0,u.jsx)("line",{x1:12,y1:8,x2:12,y2:21}),(0,u.jsx)("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),(0,u.jsx)("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),g),m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),(0,u.jsx)("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),g)),y=m((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),g),x=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"19",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"5",r:"1"})]}),g),w=m((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),(0,u.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),(0,u.jsx)("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),g),k=m((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:(0,u.jsx)("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),(0,u.jsx)("g",{mask:"url(#UnlockedIcon)",children:(0,u.jsx)("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),v),E=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,u.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),(0,u.jsx)("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),v),j=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),S=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),O=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),_=m((0,u.jsxs)("g",{fill:"currentColor",children:[(0,u.jsx)("path",{d:"M24.296 12.214c0 .112-.134.224-.291.224-.135 0-.516.629-.808 1.392-.897 2.335-9.867 20.096-9.89 19.534 0-.292-.134-.494-.359-.494-.313 0-.358.18-.224 1.055.135 1.01.045 1.236-3.14 7.432-1.793 3.525-3.722 7.208-4.282 8.196-.584 1.032-1.032 2.155-1.077 2.626-.067.809.022.92 1.973 2.605 1.122.988 2.557 2.223 3.185 2.784 2.826 2.582 4.149 3.615 4.508 3.547.538-.09 8.858-8.823 8.88-9.317 0-.225-.403-3.638-.897-7.59-.852-6.735-1.66-14.616-1.57-15.38.068-.47-.269-2.85-.516-3.884-.201-.808-.112-1.145 1.503-4.827.942-2.178 2.176-4.85 2.714-5.928.515-1.077.964-2.02.964-2.088 0-.067-.157-.112-.336-.112-.18 0-.337.09-.337.225Zm-5.158 16.772c.247 1.572.74 5.344 1.099 8.375.695 5.568 1.503 11.742 1.727 13.314.135.786.045.943-1.413 2.56-2.534 2.851-5.225 5.658-6.145 6.376l-.852.674-4.373-4.086c-4.037-3.728-4.373-4.11-4.127-4.558a5154.2 5154.2 0 0 1 2.535-4.626 727.864 727.864 0 0 0 3.678-6.78c.784-1.46 1.502-2.717 1.637-2.785.156-.09.201 2.178.156 7.006-.09 7.207-.067 7.23.651 7.072.09 0 .157-3.637.157-8.06V35.43l2.355-4.715c1.3-2.605 2.377-4.693 2.422-4.67.045.022.27 1.347.493 2.94ZM9.562 1.818C7.903 3.143 5.346 5.388 3.328 7.32L1.735 8.823l.292 1.976c.157 1.078.449 3.188.628 4.67.202 1.482.404 2.874.47 3.077.09.269 0 .404-.246.404-.426 0-.449-.113.718 3.592.286.952.577 1.903.875 2.851.044.158.224.225.425.158.202-.09.314-.27.247-.427-.067-.18.045-.36.224-.427.247-.09.225-.269-.157-.92-.605-1.01-2.152-9.633-2.242-12.416-.067-1.976-.067-1.999.762-3.121.808-1.1 2.67-2.762 5.54-4.873.807-.605 1.614-1.28 1.839-1.504.336-.404.493-.292 3.319 2.717 1.637 1.729 3.453 3.502 4.037 3.952l1.076.808-.83 1.75c-.448.944-2.265 4.581-4.059 8.04-3.745 7.274-2.983 6.578-7.333 6.645l-2.826.023-.942 1.077c-.987 1.146-1.121 1.572-.65 2.29.18.248.313.652.313.898 0 .405.157.472 1.055.517.56.023 1.076.09 1.144.157.067.068.156 1.46.224 3.098l.09 2.965-1.503 3.232C1.735 45.422.749 47.891.749 48.7c0 .427.09.786.18.786.224 0 .224-.022 9.35-19.085a4398.495 4398.495 0 0 1 8.927-18.546c.672-1.369 1.278-2.626 1.323-2.806.045-.202-1.503-1.751-3.97-3.93-2.22-1.975-4.171-3.772-4.35-3.974-.516-.628-1.279-.426-2.647.674ZM8.441 31.231c-.18.472-.65 1.46-1.031 2.2-.629 1.258-.696 1.303-.853.786-.09-.314-.157-1.235-.18-2.066-.022-1.639-.067-1.616 1.817-1.728L8.8 30.4l-.358.831Zm1.884-3.592c-1.032 1.998-1.077 2.02-3.903 2.155-2.489.135-2.533.112-2.533-.36 0-.269-.09-.628-.203-.808-.134-.202-.044-.56.27-1.055l.493-.763H6.69c1.234-.023 2.647-.113 3.14-.202.494-.09.92-.135.965-.113.045.023-.18.54-.471 1.146Zm-.09-20.477c-.404.292-.516.584-.516 1.325 0 .875.067 1.01.673 1.257.605.247.763.224 1.458-.247.92-.629.941-.786.269-1.796-.583-.876-1.166-1.033-1.884-.54Z"}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.703 11.793c.166-.291.501-.514.93-.514.38 0 .698.161.82.283.161.162.225.35.225.54a.822.822 0 0 1-.056.289c-.08.218-.5 1.106-.983 2.116-.535 1.071-1.76 3.727-2.699 5.895-.79 1.802-1.209 2.784-1.404 3.416-.142.461-.132.665-.058.961.264 1.103.6 3.647.53 4.132-.088.756.727 8.547 1.57 15.21.5 3.997.903 7.45.903 7.676l-.001.033c-.004.087-.041.288-.211.54-.24.354-.914 1.143-1.8 2.119-2.004 2.21-5.107 5.423-6.463 6.653-.322.292-.566.485-.696.56a.884.884 0 0 1-.289.111c-.194.037-.579-.007-1.11-.349-.707-.453-1.981-1.522-4-3.366-.627-.561-2.061-1.794-3.176-2.776-.81-.699-1.308-1.138-1.612-1.466-.32-.343-.47-.61-.549-.87-.078-.257-.085-.515-.055-.874.05-.52.521-1.769 1.166-2.91.559-.985 2.48-4.654 4.269-8.17 1.579-3.071 2.392-4.663 2.792-5.612.32-.759.329-1 .277-1.387-.085-.553-.092-.891-.052-1.092a.942.942 0 0 1 .274-.52c.164-.157.384-.261.704-.261.094 0 .184.011.27.033 1.924-3.44 8.554-16.632 9.316-18.616.276-.724.64-1.336.848-1.556a.965.965 0 0 1 .32-.228Zm-5.399 16.402c-.49.942-.971 1.888-1.446 2.837l-2.28 4.565v7.871c0 4.023-.06 7.404-.136 8.04-.067.552-.474.691-.654.722l.075-.008c-.317.07-.574.063-.778-.023-.234-.098-.5-.297-.63-.857-.156-.681-.158-2.462-.103-6.893.019-2.022.022-3.592.008-4.725-.156.276-.315.562-.467.843a737.624 737.624 0 0 1-3.682 6.79 3618.972 3618.972 0 0 0-2.462 4.493c.062.088.169.231.289.364.55.61 1.631 1.623 3.624 3.462l3.931 3.674.377-.298c.907-.709 3.554-3.479 6.055-6.293.425-.47.73-.814.946-1.084.175-.22.28-.36.319-.501.031-.117.002-.227-.024-.379l-.004-.02c-.224-1.572-1.032-7.753-1.728-13.33-.358-3.022-.85-6.782-1.096-8.349l-.002-.01c-.042-.301-.087-.603-.132-.891ZM9.118 1.264C9.91.628 10.537.27 11.028.144c.727-.186 1.27.003 1.713.53.186.209 2.107 1.972 4.287 3.912 2.02 1.783 3.434 3.16 3.897 3.743.326.41.322.756.296.873a1.046 1.046 0 0 1-.005.018c-.047.188-.669 1.512-1.374 2.947a4348.55 4348.55 0 0 0-8.923 18.54c-7.335 15.32-8.808 18.396-9.217 19.015-.235.355-.419.404-.525.437a.815.815 0 0 1-.249.036.745.745 0 0 1-.647-.363C.176 49.67.04 49.222.04 48.7c0-.286.09-.754.316-1.434.452-1.356 1.466-3.722 3.225-7.53l1.432-3.083-.084-2.787a72.902 72.902 0 0 0-.156-2.53 7.307 7.307 0 0 0-.539-.046c-.463-.024-.764-.062-.96-.124-.304-.096-.48-.252-.598-.438-.105-.165-.17-.374-.17-.663 0-.134-.081-.348-.178-.481l-.019-.028c-.293-.448-.406-.831-.373-1.234.04-.484.34-1.052 1.08-1.91l.759-.869c-.103-.325-.471-1.513-.854-2.787-.737-2.339-1.004-3.238-1.018-3.578-.016-.393.134-.59.27-.715a.721.721 0 0 1 .192-.125 89.87 89.87 0 0 1-.414-2.782 231.651 231.651 0 0 0-.625-4.652l-.292-1.976a.71.71 0 0 1 .215-.62l1.589-1.501C4.87 4.86 7.446 2.599 9.118 1.264Zm-1.833 33.75a.819.819 0 0 1-.406.208.73.73 0 0 1-.491-.063l.048 1.618v.009l.849-1.773Zm5.874.697c-.035.087-.07.175-.107.261a20.92 20.92 0 0 1-.36.798.688.688 0 0 1 .457.007l.01.004v-1.07Zm.72-1.892-.015.018a.745.745 0 0 1-.407.236c.02.195.027.378 0 .592l.422-.846ZM7.7 31.175c-.268.027-.489.055-.6.07-.006.056-.013.13-.016.194-.005.19 0 .42.004.694.003.111.006.225.011.338.232-.471.459-.956.6-1.296Zm2.12-1.456a2.04 2.04 0 0 1-.415.31c.064.104.099.222.104.341l.132-.277.18-.374Zm-.14-2.374c-.654.079-1.882.153-2.974.173h-1.87l-.281.435c-.09.141-.17.331-.203.414.102.21.189.508.226.788h.007c.364.006.928-.023 1.805-.07 1.243-.06 1.88-.052 2.315-.291.154-.086.266-.215.387-.393.176-.261.354-.605.587-1.056Zm2.136-1.784c-.157.16-.331.3-.52.422a.631.631 0 0 1 .182.281l.337-.703Zm7.205-1.478c-.222.442-.445.883-.667 1.32a.787.787 0 0 1 .61.007c.036.018.145.07.243.2-.032-.165-.067-.33-.105-.493-.088-.351-.137-.633-.08-1.034h-.001ZM11.415 2.546c-.358.319-1.039.879-1.725 1.394C6.903 5.989 5.087 7.59 4.301 8.662c-.28.38-.458.605-.556.852-.15.38-.103.798-.068 1.824.063 1.923.833 6.669 1.493 9.686.262 1.199.483 2.11.654 2.394.25.426.364.71.398.894a.923.923 0 0 1-.184.764l1.27-.01c.863-.014 1.523.003 2.056-.019.424-.017.75-.052 1.034-.187.336-.159.596-.458.921-.955.62-.948 1.373-2.515 2.705-5.103 1.789-3.448 3.6-7.076 4.047-8.015l.582-1.227-.62-.466c-.595-.458-2.45-2.263-4.12-4.027a59.654 59.654 0 0 0-2.498-2.52ZM5.81 24.876v-.001l-.013-.03.013.031Zm-.71-.835.027-.011a.55.55 0 0 0-.028.011Zm19.904-11.777v.01-.01Zm.002-.016v-.034.034ZM9.82 6.587c-.587.424-.81.823-.81 1.9 0 .787.12 1.157.344 1.42.158.186.388.339.77.494.352.144.603.207.838.209.347.002.688-.12 1.285-.525.707-.483.98-.864 1.036-1.238.052-.352-.09-.812-.574-1.54-.412-.619-.853-.95-1.29-1.072-.489-.139-1.016-.05-1.586.342l-.013.01Zm2.015 2.028a6.288 6.288 0 0 0-.306-.52c-.19-.284-.326-.488-.531-.5-.113-.007-.224.058-.352.146-.218.159-.218.34-.218.745 0 .198.02.419.028.504.047.025.133.068.204.097.133.054.222.102.312.103.04 0 .071-.027.12-.054a4.29 4.29 0 0 0 .358-.225c.147-.1.299-.223.385-.296ZM9.12 1.263l-.002.002.002-.002Z"})]}),{width:26,height:62,fill:"none"}),C=m((0,u.jsxs)("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),(0,u.jsx)("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),P=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),g),T=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),g),I=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"})]}),g),M=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),g),D=m((0,u.jsx)("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),v),A=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),(0,u.jsx)("path",{d:"M16 7h4"}),(0,u.jsx)("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),g),L=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),(0,u.jsx)("path",{d:"m11.25 5.417 3.333 3.333"})]}),v),Z=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),(0,u.jsx)("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),(0,u.jsx)("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),(0,u.jsx)("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),(0,u.jsx)("polyline",{points:"5 20 11 4 13 4 20 20"})]}),g),R=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M12.5 6.667h.01"}),(0,u.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),(0,u.jsx)("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),(0,u.jsx)("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),v),z=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),(0,u.jsx)("path",{d:"M18 13.3l-6.3 -6.3"})]}),g),N=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),v),B=m((0,u.jsx)("path",{d:"M5 10h10",strokeWidth:"1.25"}),v),H=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),v),W=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,u.jsx)("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),v),F=m((0,u.jsx)("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),v),U=m((0,u.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),v),K=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),g),Y=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),v),V=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,u.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),g),G=m((0,u.jsx)("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),v),X=m((0,u.jsx)("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),v),q=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),(0,u.jsx)("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),v),$=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z"})]}),g),J=m((0,u.jsx)("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),Q=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),(0,u.jsx)("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),v),ee=m("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",{width:448,height:512}),te=m("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),ne=m((0,u.jsx)("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),v),re=m("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512}),oe=m("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),ie=m((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15 8h.01"}),(0,u.jsx)("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),(0,u.jsx)("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),(0,u.jsx)("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),(0,u.jsx)("path",{d:"M19 16v6"}),(0,u.jsx)("path",{d:"M22 19l-3 3l-3 -3"})]}),g),ae=m("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",{width:512,height:512}),le=(m("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),m("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),m("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z")),ce=(m("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"),m((0,u.jsx)("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),v)),se=m((0,u.jsx)("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),v),ue=m("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",{mirror:!0}),de=(m((0,u.jsx)("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),v),m("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24}),m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),(0,u.jsx)("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),m((0,u.jsx)("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v)),fe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388",fill:"currentColor"}),(0,u.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),pe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),he=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",children:[(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"SendToBackIcon",fill:"#fff",children:(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z"})}),(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z",fill:"currentColor"}),(0,u.jsx)("path",{d:"M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z",fill:"currentColor",mask:"url(#SendToBackIcon)"}),(0,u.jsx)("path",{d:"M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z",stroke:"currentColor",strokeWidth:"1.25"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),me=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),ge=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),ve=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),be=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),ye=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),xe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),we=m((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),v),ke=m((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),v),Ee=m((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,u.jsx)("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),(0,u.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),(0,u.jsx)("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),g),je=(m("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"),m("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"),m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M15 5 5 15M5 5l10 10"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v)),Se=m("M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z",{width:320,height:512,style:{marginLeft:"-0.2rem"},mirror:!0}),Oe=(m("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",{mirror:!0}),m("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24}),m("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",{width:384,height:512}),a().memo((function(e){var t=e.theme;return m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,u.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,u.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,u.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,u.jsxs)("g",{fill:h(t),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})}))),_e=a().memo((function(e){var t=e.theme;return m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,u.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,u.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,u.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,u.jsxs)("g",{fill:h(t),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})})),Ce=m((0,u.jsx)("g",{strokeWidth:1.25,children:(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),v),Pe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),(0,u.jsx)("g",{mask:"url(#FillHachureIcon)",children:(0,u.jsx)("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),v),Te=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",children:[(0,u.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:(0,u.jsx)("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("g",{mask:"url(#FillCrossHatchIcon)",children:(0,u.jsx)("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),Ie=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),p(p({},v),{},{fill:"currentColor"})),Me=m((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),v),De=m((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),v),Ae=m((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),v),Le=m((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 12h2"}),(0,u.jsx)("path",{d:"M17 12h2"}),(0,u.jsx)("path",{d:"M11 12h2"})]}),g),Ze=m((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v.01"}),(0,u.jsx)("path",{d:"M8 12v.01"}),(0,u.jsx)("path",{d:"M12 12v.01"}),(0,u.jsx)("path",{d:"M16 12v.01"}),(0,u.jsx)("path",{d:"M20 12v.01"})]}),g),Re=m((0,u.jsx)("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),v),ze=m((0,u.jsx)("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),v),Ne=m((0,u.jsx)("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),v),Be=m((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),(0,u.jsx)("path",{d:"M13.3333 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 6.66669V6.67669"}),(0,u.jsx)("path",{d:"M16.6667 10V10.01"}),(0,u.jsx)("path",{d:"M3.33334 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M16.6667 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M3.33334 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M6.66666 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M10 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M13.3333 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M16.6667 16.6667V16.6767"})]}),v),He=m((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),(0,u.jsx)("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),(0,u.jsx)("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),(0,u.jsx)("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),(0,u.jsx)("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),(0,u.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),(0,u.jsx)("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),(0,u.jsx)("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),g),We=m((0,u.jsx)("path",{d:"M6 10H34",stroke:"currentColor",strokeWidth:2,fill:"none"}),{width:40,height:20}),Fe=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsxs)("g",{transform:n?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[(0,u.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,u.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})})),Ue=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:n?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})})),Ke=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsx)("g",{transform:n?"translate(40, 0) scale(-1, 1)":"",children:(0,u.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})})),Ye=a().memo((function(e){var t=e.flip,n=void 0!==t&&t;return m((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:n?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})})),Ve=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),Ge=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),Xe=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),qe=m((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),v),$e=m((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),v),Je=m((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),v),Qe=m((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),g),et=m((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),(0,u.jsx)("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),g),tt=m((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),g),nt=a().memo((function(e){e.theme;return m((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),(0,u.jsx)("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),g)})),rt=a().memo((function(e){e.theme;return m((0,u.jsxs)("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),(0,u.jsx)("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),g)})),ot=a().memo((function(e){e.theme;return m((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),g)})),it=m((0,u.jsx)("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512}),at=(m((0,u.jsx)("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),m((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.jsx)("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),(0,u.jsx)("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.jsx)("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),g))},6756:function(e,t,n){"use strict";n.d(t,{Z:function(){return Y}});var r={};n.r(r),n.d(r,{ChangeCanvasBackground:function(){return z},ClearCanvas:function(){return Z},Export:function(){return N},Help:function(){return L},LiveCollaborationTrigger:function(){return H},LoadScene:function(){return M},SaveAsImage:function(){return A},SaveToActiveFile:function(){return D},Socials:function(){return B},ToggleTheme:function(){return R}});var o=n(6936),i=n(9127),a=n(785),l=n(8211),c=n(3646),s=n(2739),u=n(4215),d=n(1e3),f=n(487),p=n.n(f),h=n(631),m=n.n(h),g=n(2052),v=n.n(g),b=n(4010),y=n.n(b),x=n(1469),w=n.n(x),k=n(9329),E=n.n(k),j=n(4343),S={};S.styleTagTransform=E(),S.setAttributes=y(),S.insert=v().bind(null,"head"),S.domAPI=m(),S.insertStyleElement=w();p()(j.Z,S),j.Z&&j.Z.locals&&j.Z.locals;var O=n(45),_=n(4739),C=n(6798),P=n(9487),T=n(96),I=n(4512),M=function(){var e=(0,l.QT)().t,t=(0,o.eh)();return t.isActionEnabled(d._d)?(0,I.jsx)(s.Z,{icon:c.Tl,onSelect:function(){return t.executeAction(d._d)},"data-testid":"load-button",shortcut:(0,a.C)("loadScene"),"aria-label":e("buttons.load"),children:e("buttons.load")}):null};M.displayName="LoadScene";var D=function(){var e=(0,l.QT)().t,t=(0,o.eh)();return t.isActionEnabled(d.ns)?(0,I.jsx)(s.Z,{shortcut:(0,a.C)("saveScene"),"data-testid":"save-button",onSelect:function(){return t.executeAction(d.ns)},icon:c.a1,"aria-label":"".concat(e("buttons.save")),children:"".concat(e("buttons.save"))}):null};D.displayName="SaveToActiveFile";var A=function(){var e=(0,o.n9)(),t=(0,l.QT)().t;return(0,I.jsx)(s.Z,{icon:c.J8,"data-testid":"image-export-button",onSelect:function(){return e({openDialog:"imageExport"})},shortcut:(0,a.C)("imageExport"),"aria-label":t("buttons.exportImage"),children:t("buttons.exportImage")})};A.displayName="SaveAsImage";var L=function(){var e=(0,l.QT)().t,t=(0,o.eh)();return(0,I.jsx)(s.Z,{"data-testid":"help-menu-item",icon:c.by,onSelect:function(){return t.executeAction(d.jY)},shortcut:"?","aria-label":e("helpDialog.title"),children:e("helpDialog.title")})};L.displayName="Help";var Z=function(){var e=(0,l.QT)().t,t=(0,_.b9)(C.w,P.yE);return(0,o.eh)().isActionEnabled(d.mo)?(0,I.jsx)(s.Z,{icon:c.XH,onSelect:function(){return t("clearCanvas")},"data-testid":"clear-canvas-button","aria-label":e("buttons.clearReset"),children:e("buttons.clearReset")}):null};Z.displayName="ClearCanvas";var R=function(){var e=(0,l.QT)().t,t=(0,T.I)(),n=(0,o.eh)();return n.isActionEnabled(d.Zp)?(0,I.jsx)(s.Z,{onSelect:function(e){return e.preventDefault(),n.executeAction(d.Zp)},icon:"dark"===t.theme?c.NW:c.kL,"data-testid":"toggle-dark-mode",shortcut:(0,a.C)("toggleTheme"),"aria-label":"dark"===t.theme?e("buttons.lightMode"):e("buttons.darkMode"),children:"dark"===t.theme?e("buttons.lightMode"):e("buttons.darkMode")}):null};R.displayName="ToggleTheme";var z=function(){var e=(0,l.QT)().t,t=(0,T.I)(),n=(0,o.eh)();return t.viewModeEnabled?null:(0,I.jsxs)("div",{style:{marginTop:"0.5rem"},children:[(0,I.jsx)("div",{style:{fontSize:".75rem",marginBottom:".5rem"},children:e("labels.canvasBackground")}),(0,I.jsx)("div",{style:{padding:"0 0.625rem"},children:n.renderAction("changeViewBackgroundColor")})]})};z.displayName="ChangeCanvasBackground";var N=function(){var e=(0,l.QT)().t,t=(0,o.n9)();return(0,I.jsx)(s.Z,{icon:c.Hy,onSelect:function(){t({openDialog:"jsonExport"})},"data-testid":"json-export-button","aria-label":e("buttons.export"),children:e("buttons.export")})};N.displayName="Export";var B=function(){return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(u.Z,{icon:c.ET,href:"https://github.com/excalidraw/excalidraw","aria-label":"GitHub",children:"GitHub"}),(0,I.jsx)(u.Z,{icon:c.D7,href:"https://discord.gg/UexuTaE","aria-label":"Discord",children:"Discord"}),(0,I.jsx)(u.Z,{icon:c.Zm,href:"https://twitter.com/excalidraw","aria-label":"Twitter",children:"Twitter"})]})};B.displayName="Socials";var H=function(e){var t=e.onSelect,n=e.isCollaborating,r=(0,l.QT)().t;return(0,I.jsx)(s.Z,{"data-testid":"collab-button",icon:c.jn,className:(0,O.Z)({"active-collab":n}),onSelect:t,children:r("labels.liveCollaboration")})};H.displayName="LiveCollaborationTrigger";var W=n(6773),F=n(7145),U=n(6340),K=n(7681),Y=Object.assign((0,F.$)("MainMenu",(function(e){var t=e.children,n=e.onSelect,r=(0,K.R6)().MainMenuTunnel,a=(0,o.Fy)(),s=(0,T.I)(),u=(0,o.n9)(),d=a.isMobile?void 0:function(){return u({openMenu:null})};return(0,I.jsx)(r.In,{children:(0,I.jsxs)(i.Z,{open:"canvas"===s.openMenu,children:[(0,I.jsx)(i.Z.Trigger,{onToggle:function(){u({openMenu:"canvas"===s.openMenu?null:"canvas"})},children:c.RY}),(0,I.jsxs)(i.Z.Content,{onClickOutside:d,onSelect:(0,U.Mj)(n,(function(){u({openMenu:null})})),children:[t,a.isMobile&&s.collaborators.size>0&&(0,I.jsxs)("fieldset",{className:"UserList-Wrapper",children:[(0,I.jsx)("legend",{children:(0,l.t)("labels.collaborators")}),(0,I.jsx)(W.Z,{mobile:!0,collaborators:s.collaborators})]})]})]})})})),{Trigger:i.Z.Trigger,Item:i.Z.Item,ItemLink:i.Z.ItemLink,ItemCustom:i.Z.ItemCustom,Group:i.Z.Group,Separator:i.Z.Separator,DefaultItems:r})},2335:function(e,t,n){"use strict";n.d(t,{iC:function(){return C},gK:function(){return ke},$C:function(){return z},oc:function(){return L},_9:function(){return _e},HN:function(){return Te},qy:function(){return ve},rk:function(){return F},n5:function(){return W},h6:function(){return be},Rx:function(){return Oe},Cc:function(){return Me},Hg:function(){return U},cW:function(){return ce},hs:function(){return K},f:function(){return P},xY:function(){return Se},Iw:function(){return I},$e:function(){return M},Vi:function(){return R},Ks:function(){return w},r8:function(){return q},I_:function(){return X},ZB:function(){return ge},pb:function(){return $},ut:function(){return N},k:function(){return Y},sA:function(){return oe},KL:function(){return V},LL:function(){return J},tf:function(){return Ie},EE:function(){return he},qx:function(){return T},$n:function(){return ye},zK:function(){return me},LO:function(){return G},Zj:function(){return re},Yx:function(){return fe},sS:function(){return de},kV:function(){return ue},sk:function(){return pe},eF:function(){return se},Oh:function(){return Z},WR:function(){return Pe},a6:function(){return Ce},HM:function(){return te},ay:function(){return A},hR:function(){return xe},Gj:function(){return Q},I8:function(){return je},wZ:function(){return D},C6:function(){return B},ZF:function(){return ie},nM:function(){return ee},ah:function(){return le},UO:function(){return ae},Kr:function(){return we},oX:function(){return Ee},_D:function(){return H},V4:function(){return ne},Dt:function(){return j},jP:function(){return _},Um:function(){return k},vU:function(){return S},G6:function(){return O},ED:function(){return E}});var r=n(7169),o=n(487),i=n.n(o),a=n(631),l=n.n(a),c=n(2052),s=n.n(c),u=n(4010),d=n.n(u),f=n(1469),p=n.n(f),h=n(9329),m=n.n(h),g=n(6464),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p();i()(g.Z,v);var b=g.Z&&g.Z.locals?g.Z.locals:void 0,y=n(56);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var w,k=/Mac|iPod|iPhone|iPad/.test(navigator.platform),E=/^Win/.test(navigator.platform),j=/\b(android)\b/i.test(navigator.userAgent),S="netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,O=!(-1!==navigator.userAgent.indexOf("Chrome"))&&-1!==navigator.userAgent.indexOf("Safari"),_=function(){var e,t;return"isBrave"===(null===(e=navigator.brave)||void 0===e||null===(t=e.isBrave)||void 0===t?void 0:t.name)},C="Excalidraw",P=10,T=8,I=5,M=1,D=30,A=Math.PI/12,L={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},Z={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1};!function(e){e.COPY="copy",e.PASTE="paste",e.CUT="cut",e.KEYDOWN="keydown",e.KEYUP="keyup",e.MOUSE_MOVE="mousemove",e.RESIZE="resize",e.UNLOAD="unload",e.FOCUS="focus",e.BLUR="blur",e.DRAG_OVER="dragover",e.DROP="drop",e.GESTURE_END="gestureend",e.BEFORE_UNLOAD="beforeunload",e.GESTURE_START="gesturestart",e.GESTURE_CHANGE="gesturechange",e.POINTER_MOVE="pointermove",e.POINTER_UP="pointerup",e.STATE_CHANGE="statechange",e.WHEEL="wheel",e.TOUCH_START="touchstart",e.TOUCH_END="touchend",e.HASHCHANGE="hashchange",e.VISIBILITY_CHANGE="visibilitychange",e.SCROLL="scroll",e.EXCALIDRAW_LINK="excalidraw-link",e.MENU_ITEM_SELECT="menu.itemSelect"}(w||(w={}));var R={TEST:"test",DEVELOPMENT:"development"},z={SHAPE_ACTIONS_MENU:"App-menu__left"},N={Virgil:1,Helvetica:2,Cascadia:3},B={LIGHT:"light",DARK:"dark"},H="Segoe UI Emoji",W=20,F=N.Virgil,U="left",K="top",Y=20,V={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif",jfif:"image/jfif"},G=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json","excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream"},V),X={png:"png",svg:"svg",clipboard:"clipboard"},q={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib"},$=window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,J=500,Q=300,ee=500,te=100,ne=.1,re=.1,oe=300,ie=b.themeFilter,ae={addLibrary:"addLibrary"},le={addLibrary:"addLibrary"},ce={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0}},se=640,ue=730,de=1e3,fe=500,pe=1229,he=parseInt(b.rightSidebarWidth),me=2,ge=[1,2,3],ve=10,be=1440,ye=2097152,xe="http://www.w3.org/2000/svg",we={excalidraw:2,excalidrawLibrary:2},ke=5,Ee={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},je={LEFT:"left",CENTER:"center",RIGHT:"right"},Se=20,Oe=.25,_e=32,Ce={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Pe="__precedingElement__",Te={strokeColor:y.HO.black,backgroundColor:y.HO.transparent,fillStyle:"hachure",strokeWidth:1,strokeStyle:"solid",roughness:1,opacity:100,locked:!1},Ie="library",Me={name:"default",defaultTab:Ie}},7681:function(e,t,n){"use strict";n.d(t,{A3:function(){return m},ZC:function(){return v},R6:function(){return g}});var r=n(9787),o=n.n(r);const i=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},a=e=>e?i(e):i;var l=n(5668);const{useSyncExternalStoreWithSelector:c}=l;const s=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?a(e):e,n=(e,n)=>function(e,t=e.getState,n){const o=c(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return(0,r.useDebugValue)(o),o}(t,e,n);return Object.assign(n,t),n},u=e=>e?s(e):s;var d,f;const p="undefined"!=typeof window&&(null!=(d=window.document)&&d.createElement||"ReactNative"===(null==(f=window.navigator)?void 0:f.product))?o().useLayoutEffect:o().useEffect;function h(){const e=u((e=>({current:new Array,version:0,set:e})));return{In:({children:t})=>{const n=e((e=>e.set)),r=e((e=>e.version));return p((()=>{n((e=>({version:e.version+1})))}),[]),p((()=>(n((({current:e})=>({current:[...e,t]}))),()=>n((({current:e})=>({current:e.filter((e=>e!==t))}))))),[t,r]),null},Out:()=>{const t=e((e=>e.current));return o().createElement(o().Fragment,null,t)}}}var m=o().createContext(null),g=function(){return o().useContext(m)},v=function(){return o().useMemo((function(){return{MainMenuTunnel:h(),WelcomeScreenMenuHintTunnel:h(),WelcomeScreenToolbarHintTunnel:h(),WelcomeScreenHelpHintTunnel:h(),WelcomeScreenCenterTunnel:h(),FooterCenterTunnel:h(),DefaultSidebarTriggerTunnel:h(),DefaultSidebarTabTriggersTunnel:h(),jotaiScope:Symbol()}}),[])}},96:function(e,t,n){"use strict";n.d(t,{I:function(){return a},k:function(){return i}});var r=n(9787),o=n.n(r),i=o().createContext(null),a=function(){return o().useContext(i)}},434:function(e,t,n){"use strict";n.d(t,{DQ:function(){return j},KG:function(){return A},Pn:function(){return Z},Qk:function(){return E},Sf:function(){return D},Tu:function(){return L},Wr:function(){return O},ZY:function(){return _},_c:function(){return I},bv:function(){return R},cT:function(){return C},g8:function(){return S},gY:function(){return H},lV:function(){return T},tW:function(){return M},vZ:function(){return W},wf:function(){return P}});var r=n(1930),o=n(2577),i=n(7169),a=n(8950),l=n(2975),c=n.n(l),s=n(5605),u=n(8897),d=n(2335),f=n(1047),p=n(6797),h=n(8211),m=n(75),g=n(6340),v=n(1393),b=n(5523),y=n(679);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k=function(){var e=(0,a.Z)(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type!==d.LO.png){e.next=18;break}return e.prev=1,e.next=4,Promise.resolve().then(n.bind(n,673));case 4:return e.next=6,e.sent.decodePngMetadata(t);case 6:return e.abrupt("return",e.sent);case 9:if(e.prev=9,e.t0=e.catch(1),"INVALID"!==e.t0.message){e.next=15;break}throw new DOMException((0,h.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 15:throw new DOMException((0,h.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 16:e.next=43;break;case 18:if(!("text"in Blob)){e.next=24;break}return e.next=21,t.text();case 21:r=e.sent,e.next=27;break;case 24:return e.next=26,new Promise((function(e){var n=new FileReader;n.readAsText(t,"utf8"),n.onloadend=function(){n.readyState===FileReader.DONE&&e(n.result)}}));case 26:r=e.sent;case 27:if(t.type!==d.LO.svg){e.next=43;break}return e.prev=28,e.next=31,Promise.resolve().then(n.bind(n,673));case 31:return e.next=33,e.sent.decodeSvgMetadata({svg:r});case 33:return e.abrupt("return",e.sent);case 36:if(e.prev=36,e.t1=e.catch(28),"INVALID"!==e.t1.message){e.next=42;break}throw new DOMException((0,h.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 42:throw new DOMException((0,h.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 43:return e.abrupt("return",r);case 44:case"end":return e.stop()}}),e,null,[[1,9],[28,36]])})));return function(t){return e.apply(this,arguments)}}(),E=function(e){var t;return e&&(null===(t=e.name.match(/\.(json|excalidraw|png|svg)$/))||void 0===t?void 0:t[1])||null},j=function(e){return"png"===e||"svg"===e},S=function(e){var t=E(e);return"png"===t||"svg"===t},O=function(e){var t=(e||{}).type;return!!t&&Object.values(d.KL).includes(t)},_=function(){var e=(0,a.Z)(c().mark((function e(t,n,r,o){var i,a;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k(t);case 2:if(i=e.sent,e.prev=3,a=JSON.parse(i),!(0,b.dS)(a)){e.next=9;break}return e.abrupt("return",{type:d.LO.excalidraw,data:(0,y.nu)({elements:(0,f._M)(a.elements||[]),appState:w(w({theme:null==n?void 0:n.theme,fileHandle:o||t.handle||null},(0,u.s)(a.appState||{})),n?(0,m.W)(a.elements||[],n,null):{}),files:a.files},n,r,{repairBindings:!0,refreshDimensions:!1})});case 9:if(!(0,b.HT)(a)){e.next=11;break}return e.abrupt("return",{type:d.LO.excalidrawlib,data:a});case 11:throw new Error((0,h.t)("alerts.couldNotLoadInvalidFile"));case 14:throw e.prev=14,e.t0=e.catch(3),console.error(e.t0.message),new Error((0,h.t)("alerts.couldNotLoadInvalidFile"));case 18:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(t,n,r,o){return e.apply(this,arguments)}}(),C=function(){var e=(0,a.Z)(c().mark((function e(t,n,r,o){var i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_(t,n,r,o);case 2:if((i=e.sent).type===d.LO.excalidraw){e.next=5;break}throw new Error((0,h.t)("alerts.couldNotLoadInvalidFile"));case 5:return e.abrupt("return",i.data);case 6:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unpublished",n=JSON.parse(e);if(!(0,b.HT)(n))throw new Error("Invalid library");var r=n.libraryItems||n.library;return(0,y.wJ)(r,t)},T=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r=arguments;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:"unpublished",e.t0=P,e.next=4,k(t);case 4:return e.t1=e.sent,e.t2=n,e.abrupt("return",(0,e.t0)(e.t1,e.t2));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=(0,a.Z)(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){try{t.toBlob((function(t){if(!t)return n(new p.l((0,h.t)("canvasError.canvasTooBig"),"CANVAS_POSSIBLY_TOO_BIG"));e(t)}))}catch(e){n(e)}})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=(0,a.Z)(c().mark((function e(t){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=window.crypto.subtle,e.next=4,W(t);case 4:return e.t1=e.sent,e.next=7,e.t0.digest.call(e.t0,"SHA-1",e.t1);case 7:return n=e.sent,e.abrupt("return",(0,g.G3)(new Uint8Array(n)));case 11:return e.prev=11,e.t2=e.catch(0),console.error(e.t2),e.abrupt("return",(0,s.x0)(40));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=(0,a.Z)(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new FileReader;r.onload=function(){var t=r.result;e(t)},r.onerror=function(e){return n(e)},r.readAsDataURL(t)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.indexOf(","),r=atob(e.slice(n+1)),o=e.slice(0,n).split(":")[1].split(";")[0],i=new ArrayBuffer(r.length),a=new Uint8Array(i),l=0;l<r.length;l++)a[l]=r.charCodeAt(l);return new File([i],t,{type:o})},L=function(){var e=(0,a.Z)(c().mark((function e(t,r){var i,a,l,s,u,f;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type!==d.LO.svg){e.next=2;break}return e.abrupt("return",t);case 2:return e.next=4,Promise.all([n.e(4736).then(n.t.bind(n,4881,23)).then((function(e){return e.default})),n.e(4736).then(n.bind(n,100)).then((function(e){return e.default}))]);case 4:if(i=e.sent,a=(0,o.Z)(i,2),l=a[0],s=a[1],u=s({pica:l({features:["js","wasm"]})}),r.outputType&&(f=r.outputType,u._create_blob=function(e){return this.pica.toBlob(e.out_canvas,f,.8).then((function(t){return e.out_blob=t,e}))}),O(t)){e.next=12;break}throw new Error((0,h.t)("errors.unsupportedFileType"));case 12:return e.t0=File,e.next=15,u.toBlob(t,{max:r.maxWidthOrHeight});case 15:return e.t1=e.sent,e.t2=[e.t1],e.t3=t.name,e.t4={type:r.outputType||t.type},e.abrupt("return",new e.t0(e.t2,e.t3,e.t4));case 20:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new File([(new TextEncoder).encode(e)],t,{type:d.LO.svg})},R=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.dataTransfer.files.item(0),e.next=3,z(t);case 3:if(r=e.sent,!n){e.next=10;break}return e.next=7,H(n);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=null;case 11:return e.t1=e.t0,e.t2=r,e.abrupt("return",{file:e.t1,fileHandle:e.t2});case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),z=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!v.kr){e.next=16;break}return e.prev=1,n=t.dataTransfer.items[0],e.next=5,n.getAsFileSystemHandle();case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0=null;case 8:return r=e.t0,e.abrupt("return",r);case 12:return e.prev=12,e.t1=e.catch(1),console.warn(e.t1.name,e.t1.message),e.abrupt("return",null);case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(t){return e.apply(this,arguments)}}(),N=function(e){var t=null,n="".concat((0,r.Z)(new Uint8Array(e).slice(0,8)).join(" ")," "),o="255 216 255 ",i="71 73 70 56 57 97 ";return n==="137 80 78 71 13 10 26 10 "?t=d.LO.png:n.startsWith(o)?t=d.LO.jpg:n.startsWith(i)&&(t=d.LO.gif),t},B=function(e,t,n){return new File([e],n||"",{type:t})},H=function(){var e=(0,a.Z)(c().mark((function e(t){var n,r,o,i,a,l,s,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type){e.next=28;break}if(null===(n=t)||void 0===n||null===(r=n.name)||void 0===r||!r.endsWith(".excalidrawlib")){e.next=11;break}return e.t0=B,e.next=5,W(t);case 5:e.t1=e.sent,e.t2=d.LO.excalidrawlib,e.t3=t.name,t=(0,e.t0)(e.t1,e.t2,e.t3),e.next=26;break;case 11:if(null===(o=t)||void 0===o||null===(i=o.name)||void 0===i||!i.endsWith(".excalidraw")){e.next=21;break}return e.t4=B,e.next=15,W(t);case 15:e.t5=e.sent,e.t6=d.LO.excalidraw,e.t7=t.name,t=(0,e.t4)(e.t5,e.t6,e.t7),e.next=26;break;case 21:return e.next=23,W(t);case 23:a=e.sent,(l=N(a))&&(t=B(a,l,t.name));case 26:e.next=34;break;case 28:if(!O(t)){e.next=34;break}return e.next=31,W(t);case 31:s=e.sent,(u=N(s))&&u!==t.type&&(t=B(s,u,t.name));case 34:return e.abrupt("return",t);case 35:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),W=function(e){return"arrayBuffer"in e?e.arrayBuffer():new Promise((function(t,n){var r=new FileReader;r.onload=function(e){var r;if(null===(r=e.target)||void 0===r||!r.result)return n(new Error("Couldn't convert blob to ArrayBuffer"));t(e.target.result)},r.readAsArrayBuffer(e)}))}},1393:function(e,t,n){"use strict";n.d(t,{I$:function(){return h},NL:function(){return m},kr:function(){return a}});var r=n(1930),o=n(8950),i=n(2975),a=function(){if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top}catch(e){return!1}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1}(),l=a?n.e(4736).then(n.bind(n,2254)):n.e(4736).then(n.bind(n,3499));function c(){return c=(0,o.Z)(i.mark((function e(){var t,n=arguments;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l;case 2:return e.abrupt("return",(t=e.sent).default.apply(t,n));case 3:case"end":return e.stop()}}),e)}))),c.apply(this,arguments)}a?n.e(4736).then(n.bind(n,6474)):n.e(4736).then(n.bind(n,9521));var s=a?n.e(4736).then(n.bind(n,9475)):n.e(4736).then(n.bind(n,6281));function u(){return u=(0,o.Z)(i.mark((function e(){var t,n=arguments;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s;case 2:return e.abrupt("return",(t=e.sent).default.apply(t,n));case 3:case"end":return e.stop()}}),e)}))),u.apply(this,arguments)}var d=n(2335),f=n(6797),p=n(6340),h=function(e){var t,n,o,i=null===(t=e.extensions)||void 0===t?void 0:t.reduce((function(e,t){return e.push(d.LO[t]),e}),[]),a=null===(n=e.extensions)||void 0===n?void 0:n.reduce((function(e,t){return"jpg"===t?e.concat(".jpg",".jpeg"):e.concat(".".concat(t))}),[]);return function(){return c.apply(this,arguments)}({description:e.description,extensions:a,mimeTypes:i,multiple:null!==(o=e.multiple)&&void 0!==o&&o,legacySetup:function(t,n,o){var i=(0,p.Ds)(n,500),a=function(){l(),document.addEventListener(d.Ks.KEYUP,i),document.addEventListener(d.Ks.POINTER_UP,i),i()},l=function(){var n;if(null!==(n=o.files)&&void 0!==n&&n.length){var i=e.multiple?(0,r.Z)(o.files):o.files[0];t(i)}};requestAnimationFrame((function(){window.addEventListener(d.Ks.FOCUS,a)}));var c=window.setInterval((function(){l()}),500);return function(e){clearInterval(c),i.cancel(),window.removeEventListener(d.Ks.FOCUS,a),document.removeEventListener(d.Ks.KEYUP,i),document.removeEventListener(d.Ks.POINTER_UP,i),e&&(console.warn("Opening the file was canceled (legacy-fs)."),e(new f._))}}})},m=function(e,t){return function(){return u.apply(this,arguments)}(e,{fileName:"".concat(t.name,".").concat(t.extension),description:t.description,extensions:[".".concat(t.extension)]},t.fileHandle)}},673:function(e,t,n){"use strict";n.r(t),n.d(t,{decodePngMetadata:function(){return E},decodeSvgMetadata:function(){return S},encodePngMetadata:function(){return k},encodeSvgMetadata:function(){return j},getTEXtChunk:function(){return w}});var r=n(8950),o=n(2975),i=n.n(o),a=n(2983),l=n.n(a),c=n(1194),s=n(3434),u=n.n(s),d=n(2744),f=n(2335),p=n(434),h=function(e){return new Promise((function(t,n){var r="string"==typeof e?new Blob([(new TextEncoder).encode(e)]):new Blob([e instanceof Uint8Array?e:new Uint8Array(e)]),o=new FileReader;o.onload=function(e){if(!e.target||"string"!=typeof e.target.result)return n(new Error("couldn't convert to byte string"));t(e.target.result)},o.readAsBinaryString(r)}))},m=function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0,o=e.length;r<o;r++)n[r]=e.charCodeAt(r);return t},g=function(e){return new TextDecoder("utf-8").decode(m(e))},v=function(){var e=(0,r.Z)(i().mark((function e(t){var n=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.length>1&&void 0!==n[1]&&n[1])){e.next=5;break}e.t0=window.btoa(t),e.next=10;break;case 5:return e.t1=window,e.next=8,h(t);case 8:e.t2=e.sent,e.t0=e.t1.btoa.call(e.t1,e.t2);case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]&&r[1],e.abrupt("return",n?window.atob(t):g(window.atob(t)));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.text,!1===t.compress){e.next=11;break}return e.prev=2,e.next=5,h((0,d.deflate)(n));case 5:r=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error("encode: cannot deflate",e.t0);case 11:if(e.t1=!!r,e.t2=r,e.t2){e.next=17;break}return e.next=16,h(n);case 16:e.t2=e.sent;case 17:return e.t3=e.t2,e.abrupt("return",{version:"1",encoding:"bstring",compressed:e.t1,encoded:e.t3});case 19:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=(0,r.Z)(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.encoding,e.next="bstring"===e.t0?3:12;break;case 3:if(!t.compressed){e.next=7;break}e.t1=t.encoded,e.next=10;break;case 7:return e.next=9,g(t.encoded);case 9:e.t1=e.sent;case 10:return n=e.t1,e.abrupt("break",13);case 12:throw new Error('decode: unknown encoding "'.concat(t.encoding,'"'));case 13:if(!t.compressed){e.next=15;break}return e.abrupt("return",(0,d.inflate)(new Uint8Array(m(n)),{to:"string"}));case 15:return e.abrupt("return",n);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var w=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=l(),e.t1=Uint8Array,e.next=4,(0,p.vZ)(t);case 4:if(e.t2=e.sent,e.t3=new e.t1(e.t2),n=(0,e.t0)(e.t3),!(r=n.find((function(e){return"tEXt"===e.name})))){e.next=10;break}return e.abrupt("return",c.decode(r.data));case 10:return e.abrupt("return",null);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.blob,r=t.metadata,e.t0=l(),e.t1=Uint8Array,e.next=5,(0,p.vZ)(n);case 5:return e.t2=e.sent,e.t3=new e.t1(e.t2),o=(0,e.t0)(e.t3),e.t4=c,e.t5=f.LO.excalidraw,e.t6=JSON,e.next=13,y({text:r,compress:!0});case 13:return e.t7=e.sent,e.t8=e.t6.stringify.call(e.t6,e.t7),a=e.t4.encode.call(e.t4,e.t5,e.t8),o.splice(-1,0,a),e.abrupt("return",new Blob([u()(o)],{type:f.LO.png}));case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w(t);case 2:if((null==(n=e.sent)?void 0:n.keyword)!==f.LO.excalidraw){e.next=19;break}if(e.prev=4,"encoded"in(r=JSON.parse(n.text))){e.next=10;break}if(!("type"in r)||r.type!==f.r8.excalidraw){e.next=9;break}return e.abrupt("return",n.text);case 9:throw new Error("FAILED");case 10:return e.next=12,x(r);case 12:return e.abrupt("return",e.sent);case 15:throw e.prev=15,e.t0=e.catch(4),console.error(e.t0),new Error("FAILED");case 19:throw new Error("INVALID");case 20:case"end":return e.stop()}}),e,null,[[4,15]])})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.text,e.t0=v,e.t1=JSON,e.next=5,y({text:n});case 5:return e.t2=e.sent,e.t3=e.t1.stringify.call(e.t1,e.t2),e.next=9,(0,e.t0)(e.t3,!0);case 9:return r=e.sent,o="",o+="\x3c!-- payload-type:".concat(f.LO.excalidraw," --\x3e"),o+="\x3c!-- payload-version:2 --\x3e",o+="\x3c!-- payload-start --\x3e",o+=r,o+="\x3c!-- payload-end --\x3e",e.abrupt("return",o);case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o,a,l,c,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=t.svg).includes("payload-type:".concat(f.LO.excalidraw))){e.next=26;break}if(r=n.match(/<!-- payload-start -->\s*(.+?)\s*<!-- payload-end -->/)){e.next=5;break}throw new Error("INVALID");case 5:return o=n.match(/<!-- payload-version:(\d+) -->/),a=(null==o?void 0:o[1])||"1",l="1"!==a,e.prev=8,e.next=11,b(r[1],l);case 11:if(c=e.sent,"encoded"in(s=JSON.parse(c))){e.next=17;break}if(!("type"in s)||s.type!==f.r8.excalidraw){e.next=16;break}return e.abrupt("return",c);case 16:throw new Error("FAILED");case 17:return e.next=19,x(s);case 19:return e.abrupt("return",e.sent);case 22:throw e.prev=22,e.t0=e.catch(8),console.error(e.t0),new Error("FAILED");case 26:throw new Error("INVALID");case 27:case"end":return e.stop()}}),e,null,[[8,22]])})));return function(t){return e.apply(this,arguments)}}()},9485:function(e,t,n){"use strict";n.d(t,{Um:function(){return f.Um},cT:function(){return u.cT},n8:function(){return f.n8},p1:function(){return p}});var r=n(8950),o=n(2975),i=n.n(o),a=n(6665),l=n(2335),c=n(8211),s=n(4162),u=n(434),d=n(1393),f=n(5523),p=function(){var e=(0,r.Z)(i().mark((function e(t,r,o,p,h){var m,g,v,b,y,x,w,k,E,j,S;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m=h.exportBackground,g=h.exportPadding,v=void 0===g?l.qy:g,b=h.viewBackgroundColor,y=h.name,x=h.fileHandle,w=void 0===x?null:x,0!==r.length){e.next=3;break}throw new Error((0,c.t)("alerts.cannotExportEmptyCanvas"));case 3:if("svg"!==t&&"clipboard-svg"!==t){e.next=17;break}return e.next=6,(0,s.$D)(r,{exportBackground:m,exportWithDarkMode:o.exportWithDarkMode,viewBackgroundColor:b,exportPadding:v,exportScale:o.exportScale,exportEmbedScene:o.exportEmbedScene&&"svg"===t},p);case 6:if(k=e.sent,"svg"!==t){e.next=13;break}return e.next=10,(0,d.NL)(new Blob([k.outerHTML],{type:l.LO.svg}),{description:"Export to SVG",name:y,extension:o.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:w});case 10:return e.abrupt("return",e.sent);case 13:if("clipboard-svg"!==t){e.next=17;break}return e.next=16,(0,a.dd)(k.outerHTML);case 16:return e.abrupt("return");case 17:return e.next=19,(0,s.NL)(r,o,p,{exportBackground:m,viewBackgroundColor:b,exportPadding:v});case 19:if((E=e.sent).style.display="none",document.body.appendChild(E),"png"!==t){e.next=38;break}return e.next=25,(0,u._c)(E);case 25:if(j=e.sent,E.remove(),!o.exportEmbedScene){e.next=33;break}return e.next=30,Promise.resolve().then(n.bind(n,673));case 30:return e.next=32,e.sent.encodePngMetadata({blob:j,metadata:(0,f.I_)(r,o,p,"local")});case 32:j=e.sent;case 33:return e.next=35,(0,d.NL)(j,{description:"Export to PNG",name:y,extension:"png",fileHandle:w});case 35:return e.abrupt("return",e.sent);case 38:if("clipboard"!==t){e.next=60;break}return e.prev=39,S=(0,u._c)(E),e.next=43,(0,a.uR)(S);case 43:e.next=55;break;case 45:if(e.prev=45,e.t0=e.catch(39),console.warn(e.t0),"CANVAS_POSSIBLY_TOO_BIG"!==e.t0.name){e.next=50;break}throw e.t0;case 50:if(!l.vU||"TypeError"!==e.t0.name){e.next=54;break}throw new Error("".concat((0,c.t)("alerts.couldNotCopyToClipboard"),"\n\n").concat((0,c.t)("hints.firefox_clipboard_write")));case 54:throw new Error((0,c.t)("alerts.couldNotCopyToClipboard"));case 55:return e.prev=55,E.remove(),e.finish(55);case 58:e.next=62;break;case 60:throw E.remove(),new Error("Unsupported export type");case 62:case"end":return e.stop()}}),e,null,[[39,45,55,58]])})));return function(t,n,r,o,i){return e.apply(this,arguments)}}()},5523:function(e,t,n){"use strict";n.d(t,{HT:function(){return y},I_:function(){return m},NI:function(){return x},Um:function(){return g},dS:function(){return b},n8:function(){return v},t1:function(){return w}});var r=n(6655),o=n(8950),i=n(2975),a=n.n(i),l=n(1393),c=n(8897),s=n(2335),u=n(1047),d=n(434);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e,t){var n,r={},o=f(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;!i.isDeleted&&"fileId"in i&&i.fileId&&t[i.fileId]&&(r[i.fileId]=t[i.fileId])}}catch(e){o.e(e)}finally{o.f()}return r},m=function(e,t,n,r){var o={type:s.r8.excalidraw,version:s.Kr.excalidraw,source:s.pb,elements:"local"===r?(0,u._M)(e):(0,u.BQ)(e),appState:"local"===r?(0,c.s)(t):(0,c.eS)(t),files:"local"===r?h(e,n):void 0};return JSON.stringify(o,null,2)},g=function(){var e=(0,o.Z)(a().mark((function e(t,n,r){var o,i,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=m(t,n,r,"local"),i=new Blob([o],{type:s.LO.excalidraw}),e.next=4,(0,l.NL)(i,{name:n.name,extension:"excalidraw",description:"Excalidraw file",fileHandle:(0,d.g8)(n.fileHandle)?null:n.fileHandle});case 4:return c=e.sent,e.abrupt("return",{fileHandle:c});case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),v=function(){var e=(0,o.Z)(a().mark((function e(t,n){var r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.I$)({description:"Excalidraw files"});case 2:return r=e.sent,e.t0=d.cT,e.next=6,(0,d.gY)(r);case 6:return e.t1=e.sent,e.t2=t,e.t3=n,e.t4=r.handle,e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t3,e.t4));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),b=function(e){return(null==e?void 0:e.type)===s.r8.excalidraw&&(!e.elements||Array.isArray(e.elements)&&(!e.appState||"object"===(0,r.Z)(e.appState)))},y=function(e){return"object"===(0,r.Z)(e)&&e&&e.type===s.r8.excalidrawLibrary&&(1===e.version||2===e.version)},x=function(e){var t={type:s.r8.excalidrawLibrary,version:s.Kr.excalidrawLibrary,source:s.pb,libraryItems:e};return JSON.stringify(t,null,2)},w=function(){var e=(0,o.Z)(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=x(t),e.next=3,(0,l.NL)(new Blob([n],{type:s.LO.excalidrawlib}),{name:"library",extension:"excalidrawlib",description:"Excalidraw library file"});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},7053:function(e,t,n){"use strict";n.d(t,{Di:function(){return P},WV:function(){return C},rF:function(){return E},xS:function(){return T},zh:function(){return O}});var r=n(7169),o=n(8950),i=n(5169),a=n(8821),l=n(1930),c=n(2975),s=n.n(c),u=n(434),d=n(679),f=n(4739),p=n(9487),h=n(8925),m=n(6797),g=n(8211),v=n(9787),b=n(2335);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E=(0,f.cn)({status:"loaded",isInitialized:!0,libraryItems:[]}),j=function(e){return JSON.parse(JSON.stringify(e))},S=function(e,t){return!e.find((function(e){return e.elements.length===t.elements.length&&e.elements.every((function(e,n){return e.id===t.elements[n].id&&e.versionNonce===t.elements[n].versionNonce}))}))},O=function(e,t){var n,r=[],o=w(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;S(e,i)&&r.push(i)}}catch(e){o.e(e)}finally{o.f()}return[].concat(r,(0,l.Z)(e))},_=(0,i.Z)((function e(t){var n=this;(0,a.Z)(this,e),this.lastLibraryItems=[],this.isInitialized=!1,this.updateQueue=[],this.getLastUpdateTask=function(){return n.updateQueue[n.updateQueue.length-1]},this.notifyListeners=function(){if(n.updateQueue.length>0)p.e_.set(E,{status:"loading",libraryItems:n.lastLibraryItems,isInitialized:n.isInitialized});else{n.isInitialized=!0,p.e_.set(E,{status:"loaded",libraryItems:n.lastLibraryItems,isInitialized:n.isInitialized});try{var e,t;null===(e=(t=n.app.props).onLibraryChange)||void 0===e||e.call(t,j(n.lastLibraryItems))}catch(e){console.error(e)}}},this.resetLibrary=function(){return n.setLibrary([])},this.getLatestLibrary=function(){return new Promise(function(){var e=(0,o.Z)(s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.getLastUpdateTask()||n.lastLibraryItems;case 3:r=e.sent,n.updateQueue.length>0?t(n.getLatestLibrary()):t(j(r)),e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",t(n.lastLibraryItems));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}())},this.updateLibrary=function(){var e=(0,o.Z)(s().mark((function e(t){var r,i,a,l,c,f,p,h,v;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.libraryItems,i=t.prompt,a=void 0!==i&&i,l=t.merge,c=void 0!==l&&l,f=t.openLibraryMenu,p=void 0!==f&&f,h=t.defaultStatus,v=void 0===h?"unpublished":h,p&&n.app.setState({openSidebar:{name:b.Cc.name,tab:b.tf}}),e.abrupt("return",n.setLibrary((function(){return new Promise(function(){var e=(0,o.Z)(s().mark((function e(t,o){var i,l;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,"function"!=typeof r||r instanceof Blob?r:r(n.lastLibraryItems);case 3:if(!((i=e.sent)instanceof Blob)){e.next=10;break}return e.next=7,(0,u.lV)(i,v);case 7:l=e.sent,e.next=11;break;case 10:l=(0,d.wJ)(i,v);case 11:!a||window.confirm((0,g.t)("alerts.confirmAddLibrary",{numShapes:l.length}))?(a&&n.app.focusContainer(),t(c?O(n.lastLibraryItems,l):l)):o(new m._),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),o(e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t,n){return e.apply(this,arguments)}}())})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.setLibrary=function(e){var t=new Promise(function(){var t=(0,o.Z)(s().mark((function t(r,o){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.getLastUpdateTask();case 3:return"function"==typeof e&&(e=e(n.lastLibraryItems)),t.t0=j,t.next=7,e;case 7:t.t1=t.sent,n.lastLibraryItems=(0,t.t0)(t.t1),r(n.lastLibraryItems),t.next=15;break;case 12:t.prev=12,t.t2=t.catch(0),o(t.t2);case 15:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(e,n){return t.apply(this,arguments)}}()).catch((function(e){if("AbortError"===e.name)return console.warn("Library update aborted by user"),n.lastLibraryItems;throw e})).finally((function(){n.updateQueue=n.updateQueue.filter((function(e){return e!==t})),n.notifyListeners()}));return n.updateQueue.push(t),n.notifyListeners(),t},this.app=t}));t.ZP=_;var C=function(e){var t,n=Math.ceil(Math.sqrt(e.length)),r=[],o=0,i=0,a=0,c=0,s=0,u=0,d=0,f=w(e);try{var p=function(){var f=t.value;s&&s%n==0&&(i+=a+50,o=0,u=0,d++),0===u&&(a=function(t){return e.slice(t*n,t*n+n).reduce((function(e,t){var n=(0,h.v2)(t.elements).height;return Math.max(e,n)}),0)}(d)),c=function(t){var r,o=0,i=0,a=0,l=w(e);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(o%n==0&&(i=0),i===t){var s=(0,h.v2)(c.elements).width;a=Math.max(a,s)}o++,i++}}catch(e){l.e(e)}finally{l.f()}return a}(u);var p=(0,h.v2)(f.elements),m=p.minX,g=p.minY,v=p.width,b=p.height,y=(c-v)/2,k=(a-b)/2;r.push.apply(r,(0,l.Z)(f.elements.map((function(e){return x(x({},e),{},{x:e.x+o+y-m,y:e.y+i+k-g})})))),o+=c+50,s++,u++};for(f.s();!(t=f.n()).done;)p()}catch(e){f.e(e)}finally{f.f()}return r},P=function(){var e=new URLSearchParams(window.location.hash.slice(1)).get(b.ah.addLibrary)||new URLSearchParams(window.location.search).get(b.UO.addLibrary),t=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:t}:null},T=function(e){var t=e.excalidrawAPI,n=e.getInitialLibraryItems,r=(0,v.useRef)(n);(0,v.useEffect)((function(){if(t){var e=function(){var e=(0,o.Z)(s().mark((function e(n){var r,i,a,l,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.libraryUrl,i=n.idToken,a=new Promise(function(){var e=(0,o.Z)(s().mark((function e(t,n){var o,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(decodeURIComponent(r));case 3:return o=e.sent,e.next=6,o.blob();case 6:i=e.sent,t(i),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),n(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n){return e.apply(this,arguments)}}()),l=i!==t.id,e.next=5,l&&document.hidden?new Promise((function(e){window.addEventListener("focus",(function(){return e()}),{once:!0})})):null;case 5:return e.prev=5,e.next=8,t.updateLibrary({libraryItems:a,prompt:l,merge:!0,defaultStatus:"published",openLibraryMenu:!0});case 8:e.next=13;break;case 10:throw e.prev=10,e.t0=e.catch(5),e.t0;case 13:return e.prev=13,window.location.hash.includes(b.ah.addLibrary)?((c=new URLSearchParams(window.location.hash.slice(1))).delete(b.ah.addLibrary),window.history.replaceState({},b.iC,"#".concat(c.toString()))):window.location.search.includes(b.UO.addLibrary)&&((u=new URLSearchParams(window.location.search)).delete(b.UO.addLibrary),window.history.replaceState({},b.iC,"?".concat(u.toString()))),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(t){return e.apply(this,arguments)}}(),n=function(t){t.preventDefault();var n=P();n&&(t.stopImmediatePropagation(),window.history.replaceState({},"",t.oldURL),e(n))};r.current&&t.updateLibrary({libraryItems:r.current()});var i=P();return i&&e(i),window.addEventListener(b.Ks.HASHCHANGE,n),function(){window.removeEventListener(b.Ks.HASHCHANGE,n)}}}),[t])}},679:function(e,t,n){"use strict";n.d(t,{ET:function(){return j},lY:function(){return _},nu:function(){return C},wJ:function(){return T}});var r=n(2577),o=n(7169),i=n(1047),a=n(1974),l=n(6954),c=n(2335),s=n(8897),u=n(6938),d=n(1935),f=n(6340),p=n(5710),h=n(56);function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y={selection:!0,text:!0,rectangle:!0,diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0,hand:!0},x=function(e){return Object.keys(c.ut).includes(e)?c.ut[e]:c.rk},w=function(e,t){var n,r,o,s,u,d,p,m,g,v,y,x,w,k,E={type:t.type||e.type,version:e.version||1,versionNonce:null!==(n=e.versionNonce)&&void 0!==n?n:0,isDeleted:null!==(r=e.isDeleted)&&void 0!==r&&r,id:e.id||(0,l.kb)(),fillStyle:e.fillStyle||"hachure",strokeWidth:e.strokeWidth||1,strokeStyle:null!==(o=e.strokeStyle)&&void 0!==o?o:"solid",roughness:null!==(s=e.roughness)&&void 0!==s?s:1,opacity:null==e.opacity?100:e.opacity,angle:e.angle||0,x:null!==(u=null!==(d=t.x)&&void 0!==d?d:e.x)&&void 0!==u?u:0,y:null!==(p=null!==(m=t.y)&&void 0!==m?m:e.y)&&void 0!==p?p:0,strokeColor:e.strokeColor||h.HO.black,backgroundColor:e.backgroundColor||h.HO.transparent,width:e.width||0,height:e.height||0,seed:null!==(g=e.seed)&&void 0!==g?g:1,groupIds:null!==(v=e.groupIds)&&void 0!==v?v:[],roundness:e.roundness?e.roundness:"round"===e.strokeSharpness?{type:(0,a.QI)(e.type)?c.a6.LEGACY:c.a6.PROPORTIONAL_RADIUS}:null,boundElements:e.boundElementIds?e.boundElementIds.map((function(e){return{type:"arrow",id:e}})):null!==(y=e.boundElements)&&void 0!==y?y:[],updated:null!==(x=e.updated)&&void 0!==x?x:(0,f.C3)(),link:null!==(w=e.link)&&void 0!==w?w:null,locked:null!==(k=e.locked)&&void 0!==k&&k};return"customData"in e&&(E.customData=e.customData),c.WR in e&&(E[c.WR]=e[c.WR]),b(b(b({},E),(0,i.Qp)(E)),t)},k=function(e,t){if(e.boundElements){var n=e.boundElements.slice(),r=new Set;e.boundElements=n.reduce((function(n,o){var i=t.get(o.id);if(i&&!r.has(o.id)){if(r.add(o.id),i.isDeleted)return n;n.push(o),(0,a.iB)(i)&&!i.containerId&&(i.containerId=e.id)}return n}),[])}},E=function(e,t){var n=e.containerId?t.get(e.containerId):null;if(n){if(!e.isDeleted&&n.boundElements&&!n.boundElements.find((function(t){return t.id===e.id}))){var r=(n.boundElements||(n.boundElements=[])).slice();r.push({type:"text",id:e.id}),n.boundElements=r}}else e.containerId=null},j=function(e,t,n){var o=new Set,s=t?(0,f.xn)(t):null,h=(e||[]).reduce((function(e,t){if("selection"!==t.type&&!(0,i.QD)(t)){var a=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.type){case"text":var a=e.fontSize,l=e.fontFamily;if("font"in e){var s=e.font.split(" "),d=(0,r.Z)(s,2),h=d[0],m=d[1];a=parseFloat(h),l=x(m)}var g=null!==(t=e.text)&&void 0!==t?t:"",v=e.lineHeight||(e.height?(0,p.$2)(e):(0,p.PT)(e.fontFamily)),y=(0,p.R8)(e.text,(0,f.mO)(e),v);return e=w(e,{fontSize:a,fontFamily:l,text:g,textAlign:e.textAlign||c.Hg,verticalAlign:e.verticalAlign||c.hs,containerId:null!==(n=e.containerId)&&void 0!==n?n:null,originalText:e.originalText||g,lineHeight:v,baseline:y}),o&&(e=b(b({},e),(0,i.JZ)(e))),e;case"freedraw":return w(e,{points:e.points,lastCommittedPoint:null,simulatePressure:e.simulatePressure,pressures:e.pressures});case"image":return w(e,{status:e.status||"pending",fileId:e.fileId,scale:e.scale||[1,1]});case"line":case"draw":case"arrow":var k=e,E=k.startArrowhead,j=void 0===E?null:E,S=k.endArrowhead,O=void 0===S?"arrow"===e.type?"arrow":null:S,_=e.x,C=e.y,P=!Array.isArray(e.points)||e.points.length<2?[[0,0],[e.width,e.height]]:e.points;if(0!==P[0][0]||0!==P[0][1]){var T=u._.getNormalizedPoints(e);P=T.points,_=T.x,C=T.y}return w(e,{type:"draw"===e.type?"line":e.type,startBinding:e.startBinding,endBinding:e.endBinding,lastCommittedPoint:null,startArrowhead:j,endArrowhead:O,points:P,x:_,y:C});case"ellipse":case"rectangle":case"diamond":return w(e,{})}}(t,null==n?void 0:n.refreshDimensions);if(a){var h=null==s?void 0:s.get(t.id);h&&h.version>a.version&&(a=(0,d.ZP)(a,h.version)),o.has(a.id)&&(a=b(b({},a),{},{id:(0,l.kb)()})),o.add(a.id),e.push(a)}}return e}),[]);if(null==n||!n.repairBindings)return h;var g,v=(0,f.xn)(h),y=m(h);try{for(y.s();!(g=y.n()).done;){var j=g.value;(0,a.iB)(j)&&j.containerId?E(j,v):j.boundElements&&k(j,v)}}catch(e){y.e(e)}finally{y.f()}return h},S=function(e,t,n){var r=t[e];return void 0!==r?r:n[e]},O={isSidebarDocked:function(e,t){var n;return["defaultSidebarDockedPreference",null!==(n=e.isSidebarDocked)&&void 0!==n?n:S("defaultSidebarDockedPreference",e,t)]}},_=function(e,t){var n,o,i,a;e=e||{};for(var l=(0,s.im)(),u={},d=0,p=Object.keys(O);d<p.length;d++){var h=p[d];if(h in e){var m=O[h](e,l),g=(0,r.Z)(m,2),v=g[0],x=g[1];u[v]=x}}for(var w=0,k=Object.entries(l);w<k.length;w++){var E=(0,r.Z)(k[w],2),j=E[0],S=E[1],_=e[j],C=t?t[j]:void 0;u[j]=void 0!==_?_:void 0!==C?C:S}return b(b({},u),{},{cursorButton:(null==t?void 0:t.cursorButton)||"up",penDetected:null!==(n=null==t?void 0:t.penDetected)&&void 0!==n?n:!!e.penMode&&(null!==(o=e.penDetected)&&void 0!==o&&o),activeTool:b(b({},(0,f.Om)(l,u.activeTool.type&&y[u.activeTool.type]?u.activeTool:{type:"selection"})),{},{lastActiveTool:null,locked:null!==(i=u.activeTool.locked)&&void 0!==i&&i}),zoom:"number"==typeof e.zoom?{value:e.zoom}:null!==(a=e.zoom)&&void 0!==a&&a.value?e.zoom:l.zoom,openSidebar:"string"==typeof e.openSidebar?{name:c.Cc.name}:u.openSidebar})},C=function(e,t,n,r){return{elements:j(null==e?void 0:e.elements,n,r),appState:_(null==e?void 0:e.appState,t||null),files:(null==e?void 0:e.files)||{}}},P=function(e){var t=j((0,i.Lm)(e.elements),null);return t.length?b(b({},e),{},{elements:t}):null},T=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=[],o=m(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;if(Array.isArray(i)){var a=P({status:n,elements:i,id:(0,l.kb)(),created:Date.now()});a&&r.push(a)}else{var c=i,s=P(b(b({},c),{},{id:c.id||(0,l.kb)(),status:c.status||n,created:c.created||Date.now()}));s&&r.push(s)}}}catch(e){o.e(e)}finally{o.f()}return r}},4929:function(e,t,n){"use strict";n.d(t,{rj:function(){return B},nW:function(){return W},nz:function(){return Y},sw:function(){return G},lV:function(){return Q},q$:function(){return K},wq:function(){return X},$u:function(){return U},Pp:function(){return $}});var r=n(7169),o=n(2577),i=n(6340),a=n(1935),l=n(7901),c=n(1319),s=n(3646),u=n(8211),d=n(9787),f=n(45),p=n(6066),h=n(3063),m=n(6552),g=n(2335),v=n(1894),b=n(75),y=n(2325),x=n(1047),w=n(487),k=n.n(w),E=n(631),j=n.n(E),S=n(2052),O=n.n(S),_=n(4010),C=n.n(_),P=n(1469),T=n.n(P),I=n(9329),M=n.n(I),D=n(5260),A={};A.styleTagTransform=M(),A.setAttributes=C(),A.insert=O().bind(null,"head"),A.domAPI=j(),A.insertStyleElement=T();k()(D.Z,A),D.Z&&D.Z.locals&&D.Z.locals;var L=n(7047),Z=n(6936),R=n(4512);function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var B=document.createElement("img");B.src="data:".concat(g.LO.svg,", ").concat(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#1971c2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>'));var H=!1,W=function(e){var t=e.element,n=e.setAppState,r=e.onLinkOpen,l=(0,Z.gF)(),h=t.link||"",m=(0,d.useState)(h),v=(0,o.Z)(m,2),b=v[0],y=v[1],x=(0,d.useRef)(null),w="editor"===l.showHyperlinkPopup||!h,k=(0,d.useCallback)((function(){if(x.current){var e=U(x.current.value);!t.link&&e&&(0,L.L)("hyperlink","create"),(0,a.DR)(t,{link:e}),n({showHyperlinkPopup:"info"})}}),[t,n]);(0,d.useLayoutEffect)((function(){return function(){k()}}),[k]),(0,d.useEffect)((function(){var e=null,r=function(r){w||(e&&clearTimeout(e),ee(t,l,[r.clientX,r.clientY])&&(e=window.setTimeout((function(){n({showHyperlinkPopup:!1})}),500)))};return window.addEventListener(g.Ks.POINTER_MOVE,r,!1),function(){window.removeEventListener(g.Ks.POINTER_MOVE,r,!1),e&&clearTimeout(e)}}),[l,t,w,n]);var E=(0,d.useCallback)((function(){(0,L.L)("hyperlink","delete"),(0,a.DR)(t,{link:null}),w&&(x.current.value=""),n({showHyperlinkPopup:!1})}),[n,t,w]),j=F(t,l),S=j.x,O=j.y;return l.draggingElement||l.resizingElement||l.isRotating||l.openMenu?null:(0,R.jsxs)("div",{className:"excalidraw-hyperlinkContainer",style:{top:"".concat(O,"px"),left:"".concat(S,"px"),width:320,padding:5},children:[w?(0,R.jsx)("input",{className:(0,f.Z)("excalidraw-hyperlinkContainer-input"),placeholder:"Type or paste your link here",ref:x,value:b,onChange:function(e){return y(e.target.value)},autoFocus:!0,onKeyDown:function(e){e.stopPropagation(),e[p.tW.CTRL_OR_CMD]&&e.key===p.tW.K&&e.preventDefault(),e.key!==p.tW.ENTER&&e.key!==p.tW.ESCAPE||k()}}):(0,R.jsx)("a",{href:t.link||"",className:(0,f.Z)("excalidraw-hyperlinkContainer-link",{"d-none":w}),target:K(t.link)?"_self":"_blank",onClick:function(e){if(t.link&&r){var n=(0,i.ag)(g.Ks.EXCALIDRAW_LINK,e.nativeEvent);r(t,n),n.defaultPrevented&&e.preventDefault()}},rel:"noopener noreferrer",children:t.link}),(0,R.jsxs)("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!w&&(0,R.jsx)(c.V,{type:"button",title:(0,u.t)("buttons.edit"),"aria-label":(0,u.t)("buttons.edit"),label:(0,u.t)("buttons.edit"),onClick:function(){(0,L.L)("hyperlink","edit","popup-ui"),n({showHyperlinkPopup:"editor"})},className:"excalidraw-hyperlinkContainer--edit",icon:s.Pm}),h&&(0,R.jsx)(c.V,{type:"button",title:(0,u.t)("buttons.remove"),"aria-label":(0,u.t)("buttons.remove"),label:(0,u.t)("buttons.remove"),onClick:E,className:"excalidraw-hyperlinkContainer--remove",icon:s.XH})]})]})},F=function(e,t){var n=(0,x.qf)(e),r=(0,o.Z)(n,2),a=r[0],l=r[1],c=(0,i._i)({sceneX:a+e.width/2,sceneY:l},t),s=c.x,u=c.y;return{x:s-t.offsetLeft-160,y:u-t.offsetTop-85}},U=function(e){return(e=e.trim())&&(e.includes("://")||/^[[\\/]/.test(e)||(e="https://".concat(e))),e},K=function(e){return!!(null!=e&&e.includes(location.origin)||null!=e&&e.startsWith("/"))},Y=(0,l.z)({name:"hyperlink",perform:function(e,t){return"editor"!==t.showHyperlinkPopup&&{elements:e,appState:N(N({},t),{},{showHyperlinkPopup:"editor",openMenu:null}),commitToHistory:!0}},trackEvent:{category:"hyperlink",action:"click"},keyTest:function(e){return e[p.tW.CTRL_OR_CMD]&&e.key===p.tW.K},contextItemLabel:function(e,t){return V(e,t)},predicate:function(e,t){return 1===(0,b.eD)(e,t).length},PanelComponent:function(e){var t=e.elements,n=e.appState,r=e.updateData,o=(0,b.eD)(t,n);return(0,R.jsx)(c.V,{type:"button",icon:s.xP,"aria-label":(0,u.t)(V(t,n)),title:"".concat((0,u.t)("labels.link.label")," - ").concat((0,i.uY)("CtrlOrCmd+K")),onClick:function(){return r(null)},selected:1===o.length&&!!o[0].link})}}),V=function(e,t){return(0,b.eD)(e,t)[0].link?"labels.link.edit":"labels.link.create"},G=function(e,t,n){var r=(0,o.Z)(e,4),i=r[0],a=r[1],l=r[2],c=r[3],s=h.Dn,u=s/n.zoom.value,d=s/n.zoom.value,f=s/n.zoom.value,p=(i+l)/2,g=(a+c)/2,v=(s-8)/(2*n.zoom.value),b=4/n.zoom.value,y=l+b-v,x=a-b-f+v,w=(0,m.U1)(y+u/2,x+d/2,p,g,t),k=(0,o.Z)(w,2);return[k[0]-u/2,k[1]-d/2,u,d]},X=function(e,t,n,r){var i=(0,o.Z)(n,2),a=i[0],l=i[1];if(!e.link||t.selectedElementIds[e.id])return!1;var c=4/t.zoom.value;if(!r&&t.viewModeEnabled&&(0,y.pX)(e,[a,l],c))return!0;var s=(0,x.qf)(e),u=(0,o.Z)(s,4),d=u[0],f=u[1],p=u[2],h=u[3],m=G([d,f,p,h],e.angle,t),g=(0,o.Z)(m,4),v=g[0],b=g[1],w=g[2],k=g[3];return a>v-c&&a<v+c+w&&l>b-c&&l<b+k+c},q=null,$=function(e,t){q&&clearTimeout(q),q=window.setTimeout((function(){return J(e,t)}),g.sA)},J=function(e,t){if(e.link){var n=(0,v.bK)();n.classList.add("excalidraw-tooltip--visible"),n.style.maxWidth="20rem",n.textContent=e.link;var r=(0,x.qf)(e),a=(0,o.Z)(r,4),l=a[0],c=a[1],s=a[2],u=a[3],d=G([l,c,s,u],e.angle,t),f=(0,o.Z)(d,4),p=f[0],h=f[1],m=f[2],g=f[3],b=(0,i._i)({sceneX:p,sceneY:h},t);(0,v.Js)(n,{left:b.x,top:b.y,width:m,height:g},"top"),(0,L.L)("hyperlink","tooltip","link-icon"),H=!0}},Q=function(){q&&clearTimeout(q),H&&(H=!1,(0,v.bK)().classList.remove("excalidraw-tooltip--visible"))},ee=function(e,t,n){var r=(0,o.Z)(n,2),a=r[0],l=r[1],c=(0,i.dE)({clientX:a,clientY:l},t),s=c.x,u=c.y,d=15/t.zoom.value;if((0,y.pX)(e,[s,u],d))return!1;var f=(0,x.qf)(e),p=(0,o.Z)(f,3),h=p[0],m=p[1],g=p[2];if(s>=h&&s<=g&&u>=m-85&&u<=m)return!1;var v=F(e,t),b=v.x,w=v.y;return!(a>=b-d&&a<=b+320+10+d&&l>=w-d&&l<=w+d+10+42)}},8290:function(e,t,n){"use strict";n.d(t,{$q:function(){return F},DK:function(){return S},H:function(){return O},HG:function(){return b},N1:function(){return g},R:function(){return k},Ww:function(){return T},Y9:function(){return C},ZB:function(){return L},cz:function(){return m},ek:function(){return H},el:function(){return x}});var r=n(7169),o=n(2577),i=n(75),a=n(1974),l=n(2325),c=n(1935),s=n(1564),u=n(6938),d=n(6340),f=n(6066),p=n(5710);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var m=function(e){return!e[f.tW.CTRL_OR_CMD]},g=function(e){return e.isBindingEnabled},v=function(e,t){var n=[];return t.forEach((function(t){var r=e.getNonDeletedElement(t);null!=r&&n.push(r)})),n},b=function(e,t,n){var r=new Set,o=new Set;y(e,t,n,"start",r,o),y(e,n,t,"end",r,o);var i=Array.from(o).filter((function(e){return!r.has(e)}));v(s.Z.getScene(e),i).forEach((function(t){var n;(0,c.DR)(t,{boundElements:null===(n=t.boundElements)||void 0===n?void 0:n.filter((function(t){return"arrow"!==t.type||t.id!==e.id}))})}))},y=function(e,t,n,r,o,i){if("keep"!==t)if(null!=t)null!=n&&("keep"===n?j(e,t,r):"start"!==r&&n.id===t.id)||(E(e,t,r),o.add(t.id));else{var a=_(e,r);null!=a&&i.add(a)}},x=function(e){e.forEach((function(e){(0,a.Mn)(e)?b(e,R(e,"start"),R(e,"end")):(0,a.f0)(e)&&w(e)}))},w=function(e){N(e).forEach((function(t){var n=(0,o.Z)(t,2),r=n[0],i=n[1];return b(r,"end"===i?"keep":e,"start"===i?"keep":e)}))},k=function(e,t,n,r){null!=t.startBoundElement&&E(e,t.startBoundElement,"start");var o=C(r,n);null==o||j(e,o,"end")||E(e,o,"end")},E=function(e,t,n){(0,c.DR)(e,(0,r.Z)({},"start"===n?"startBinding":"endBinding",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({elementId:t.id},P(e,t,n)))),(0,d.xn)(t.boundElements||[]).has(e.id)||(0,c.DR)(t,{boundElements:(t.boundElements||[]).concat({id:e.id,type:"arrow"})})},j=function(e,t,n){var r=e["start"===n?"endBinding":"startBinding"];return S(e,null==r?void 0:r.elementId,t)},S=function(e,t,n){return t===n.id&&e.points.length<3},O=function(e){e.forEach((function(e){(0,a.Mn)(e)&&b(e,null,null)}))},_=function(e,t){var n="start"===t?"startBinding":"endBinding",o=e[n];return null==o?null:((0,c.DR)(e,(0,r.Z)({},n,null)),o.elementId)},C=function(e,t){return(0,i.QG)(t.getNonDeletedElements(),(function(t){return(0,a.f0)(t,!1)&&(0,l.uu)(t,e)}))},P=function(e,t,n){var r="start"===n?-1:1,o=-1===r?0:e.points.length-1,i=o-r,a=u._.getPointAtIndexGlobalCoordinates(e,o),c=u._.getPointAtIndexGlobalCoordinates(e,i);return{focus:(0,l.T_)(t,c,a),gap:Math.max(1,(0,l.oT)(t,a))}},T=function(e,t){var n,r=(null!==(n=e.boundElements)&&void 0!==n?n:[]).filter((function(e){return"arrow"===e.type}));if(0!==r.length){var o=null!=t?t:{},i=o.newSize,l=o.simultaneouslyUpdated,u=M(l);v(s.Z.getScene(e),r.map((function(e){return e.id}))).forEach((function(t){if((0,a.bt)(t)){var n=e;if(I(t,n)){var r=A(n,t.startBinding,i),o=A(n,t.endBinding,i);if(u.has(t.id))(0,c.DR)(t,{startBinding:r,endBinding:o});else D(t,"start",r,e),D(t,"end",o,e),(0,p.WJ)(t)&&(0,p.RB)(t,!1)}}}))}},I=function(e,t){var n,r;return(null===(n=e.startBinding)||void 0===n?void 0:n.elementId)===t.id||(null===(r=e.endBinding)||void 0===r?void 0:r.elementId)===t.id},M=function(e){return new Set((e||[]).map((function(e){return e.id})))},D=function(e,t,n,o){if(!(null==n||n.elementId!==o.id&&e.points.length>2)){var i=s.Z.getScene(e).getElement(n.elementId);if(null!=i){var a,c="start"===t?-1:1,d=-1===c?0:e.points.length-1,f=d-c,p=u._.getPointAtIndexGlobalCoordinates(e,f),h=(0,l.j_)(i,n.focus,p);if(0===n.gap)a=h;else{var m=(0,l.MZ)(i,p,h,n.gap);a=0===m.length?h:m[0]}u._.movePoints(e,[{index:d,point:u._.pointFromAbsoluteCoords(e,a)}],(0,r.Z)({},"start"===t?"startBinding":"endBinding",n))}}},A=function(e,t,n){if(null==t||null==n)return t;var r=t.gap,o=t.focus,i=t.elementId,a=n.width,c=n.height,s=e.width,u=e.height;return{elementId:i,gap:Math.max(1,Math.min((0,l.fb)(e,a,c),r*(a<c?a/s:c/u))),focus:o}},L=function(e){var t=new Set(e.map((function(e){return e.id})));return e.flatMap((function(e){return(0,a.Mn)(e,!1)?Z(e).filter((function(e){return!t.has(e.id)})):(0,a.f0)(e,!1)?N(e).filter((function(e){return!t.has(e[0].id)})):[]}))},Z=function(e){return[R(e,"start"),R(e,"end")].filter((function(e){return null!=e}))},R=function(e,t){return C(z(e,t),s.Z.getScene(e))},z=function(e,t){var n="start"===t?0:-1;return(0,d.AK)(u._.getPointAtIndexGlobalCoordinates(e,n))},N=function(e){return s.Z.getScene(e).getNonDeletedElements().map((function(t){if(!(0,a.Mn)(t,!1))return null;var n=B(t,"start",e),r=B(t,"end",e);return n||r?[t,n&&r?"both":n?"start":"end",e]:null})).filter((function(e){return null!=e}))},B=function(e,t,n){return null==e["start"===t?"startBinding":"endBinding"]&&!j(e,n,t)&&(0,l.uu)(n,z(e,t))},H=function(e,t,n,r){var o=new Set,i=new Set,l="duplicatesServeAsOld"===r;t.forEach((function(e){var t=e.boundElements;if(null!=t&&t.length>0&&(t.forEach((function(e){l&&!n.has(e.id)&&o.add(e.id)})),i.add(n.get(e.id))),(0,a.Mn)(e)){if(null!=e.startBinding){var r=e.startBinding.elementId;l&&!n.has(r)&&i.add(r)}if(null!=e.endBinding){var c=e.endBinding.elementId;l&&!n.has(c)&&i.add(c)}null==e.startBinding&&null==e.endBinding||o.add(n.get(e.id))}})),e.filter((function(e){var t=e.id;return o.has(t)})).forEach((function(e){var t=e.startBinding,r=e.endBinding;(0,c.DR)(e,{startBinding:W(t,n),endBinding:W(r,n)})})),e.filter((function(e){var t=e.id;return i.has(t)})).forEach((function(e){var t=e.boundElements;null!=t&&t.length>0&&(0,c.DR)(e,{boundElements:t.map((function(e){return n.has(e.id)?{id:n.get(e.id),type:e.type}:e}))})}))},W=function(e,t){var n;if(null==e)return null;var r=e.elementId;return{focus:e.focus,gap:e.gap,elementId:null!==(n=t.get(r))&&void 0!==n?n:r}},F=function(e,t){var n=new Set(t.map((function(e){return e.id}))),r=new Set;t.forEach((function(e){var t;(0,a.f0)(e)?null===(t=e.boundElements)||void 0===t||t.forEach((function(e){n.has(e.id)||r.add(e.id)})):(0,a.Mn)(e)&&(e.startBinding&&r.add(e.startBinding.elementId),e.endBinding&&r.add(e.endBinding.elementId))})),e.filter((function(e){var t=e.id;return r.has(t)})).forEach((function(e){(0,a.f0)(e)?(0,c.DR)(e,{boundElements:K(e.boundElements,n)}):(0,a.Mn)(e)&&(0,c.DR)(e,{startBinding:U(e.startBinding,n),endBinding:U(e.endBinding,n)})}))},U=function(e,t){return null==e||t.has(e.elementId)?null:e},K=function(e,t){return e?e.filter((function(e){return!t.has(e.id)})):null}},8925:function(e,t,n){"use strict";n.d(t,{CM:function(){return g},IX:function(){return y},KP:function(){return S},Pi:function(){return j},UC:function(){return m},Ut:function(){return _},Y5:function(){return k},os:function(){return C},qf:function(){return h},v2:function(){return P},wC:function(){return O}});var r=n(2577),o=n(1930),i=n(6552),a=n(8234),l=n(3063),c=n(1974),s=n(5001),u=n(5710),d=n(6938);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,c.F9)(e))return w(e);if((0,c.bt)(e))return d._.getElementAbsoluteCoords(e,t);if((0,c.iB)(e)){var n=(0,u.tl)(e);if((0,c.Yv)(n)){var r=d._.getBoundTextElementPosition(n,e);return[r.x,r.y,r.x+e.width,r.y+e.height,r.x+e.width/2,r.y+e.height/2]}}return[e.x,e.y,e.x+e.width,e.y+e.height,e.x+e.width/2,e.y+e.height/2]},m=function(e){var t=Math.floor(e.width/2)+1,n=e.width,r=Math.floor(e.height/2)+1;return[t,0,n,r,t,e.height,0,r]},g=function(e){var t,n=f(e.sets);try{for(n.s();!(t=n.n()).done;){var r=t.value;if("path"===r.type)return r.ops}}catch(e){n.e(e)}finally{n.f()}return e.sets[0].ops},v=function(e,t,n,r,o){var i=1-e;return Math.pow(i,3)*t+3*Math.pow(i,2)*e*n+3*i*Math.pow(e,2)*r+Math.pow(e,3)*o},b=function(e,t,n,r){var o=t-e,i=n-t,a=3*o-6*i+3*(r-n),l=6*i-6*o,c=3*o,s=l*l-4*a*c;if(!(s>=0))return!1;var u=null,d=null,f=1/0,p=1/0;return 0===a?f=p=-c/l:(f=(-l+Math.sqrt(s))/(2*a),p=(-l-Math.sqrt(s))/(2*a)),f>=0&&f<=1&&(u=v(f,e,t,n,r)),p>=0&&p<=1&&(d=v(p,e,t,n,r)),[u,d]},y=function(e,t){var n=[0,0],i=e.reduce((function(e,i){var a=i.op,l=i.data;if("move"===a)n=l;else if("bcurveTo"===a){var c=[l[0],l[1]],s=[l[2],l[3]],u=[l[4],l[5]],d=t?t.apply(void 0,c):c,f=t?t.apply(void 0,s):s,p=t?t.apply(void 0,u):u,h=t?t.apply(void 0,(0,o.Z)(n)):n;n=u;var m=function(e,t,n,r){var i=b(e[0],t[0],n[0],r[0]),a=b(e[1],t[1],n[1],r[1]),l=Math.min(e[0],r[0]),c=Math.max(e[0],r[0]);if(i){var s=i.filter((function(e){return null!==e}));l=Math.min.apply(Math,[l].concat((0,o.Z)(s))),c=Math.max.apply(Math,[c].concat((0,o.Z)(s)))}var u=Math.min(e[1],r[1]),d=Math.max(e[1],r[1]);if(a){var f=a.filter((function(e){return null!==e}));u=Math.min.apply(Math,[u].concat((0,o.Z)(f))),d=Math.max.apply(Math,[d].concat((0,o.Z)(f)))}return[l,u,c,d]}(h,d,f,p),g=(0,r.Z)(m,4),v=g[0],y=g[1],x=g[2],w=g[3];e.minX=Math.min(e.minX,v),e.minY=Math.min(e.minY,y),e.maxX=Math.max(e.maxX,x),e.maxY=Math.max(e.maxY,w)}return e}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[i.minX,i.minY,i.maxX,i.maxY]},x=function(e){var t,n=1/0,o=1/0,i=-1/0,a=-1/0,l=f(e);try{for(l.s();!(t=l.n()).done;){var c=(0,r.Z)(t.value,2),s=c[0],u=c[1];n=Math.min(n,s),o=Math.min(o,u),i=Math.max(i,s),a=Math.max(a,u)}}catch(e){l.e(e)}finally{l.f()}return[n,o,i,a]},w=function(e){var t=x(e.points),n=(0,r.Z)(t,4),o=n[0],i=n[1],a=n[2],l=n[3],c=o+e.x,s=i+e.y,u=a+e.x,d=l+e.y;return[c,s,u,d,(c+u)/2,(s+d)/2]},k=function(e,t,n,o){var a=g(t[0]);if(a.length<1)return null;var l="start"===n?1:a.length-1,c=a[l].data,s=[c[4],c[5]],u=[c[2],c[3]],d=[c[0],c[1]],f=a[l-1],p=[0,0];"move"===f.op?p=f.data:"bcurveTo"===f.op&&(p=[f.data[4],f.data[5]]);var h=function(e,t){return Math.pow(1-e,3)*s[t]+3*e*Math.pow(1-e,2)*u[t]+3*Math.pow(e,2)*(1-e)*d[t]+p[t]*Math.pow(e,3)},m="start"===n?p:s,v=(0,r.Z)(m,2),b=v[0],y=v[1],x=[h(.3,0),h(.3,1)],w=x[0],k=x[1],E=Math.hypot(b-w,y-k),j=(b-w)/E,S=(y-k)/E,O={arrow:30,bar:15,dot:15,triangle:15}[o],_=0;if("arrow"===o){var C=(0,r.Z)(e.points[e.points.length-1],2),P=C[0],T=C[1],I=e.points.length>1?e.points[e.points.length-2]:[0,0],M=(0,r.Z)(I,2),D=M[0],A=M[1];_=Math.hypot(P-D,T-A)}else for(var L=0;L<e.points.length;L++){var Z=e.points[L-1]||[0,0],R=(0,r.Z)(Z,2),z=R[0],N=R[1],B=(0,r.Z)(e.points[L],2),H=B[0],W=B[1];_+=Math.hypot(H-z,W-N)}var F=Math.min(O,_/2),U=b-j*F,K=y-S*F;if("dot"===o)return[b,y,Math.hypot(K-y,U-b)+e.strokeWidth];var Y={arrow:20,bar:90,triangle:25}[o],V=(0,i.U1)(U,K,b,y,-Y*Math.PI/180),G=(0,r.Z)(V,2),X=G[0],q=G[1],$=(0,i.U1)(U,K,b,y,Y*Math.PI/180),J=(0,r.Z)($,2);return[b,y,X,q,J[0],J[1]]},E=function(e,t,n){var o;if(e.points.length<2){var c=(0,r.Z)(e.points[0],2),s=c[0],f=c[1],p=(0,i.U1)(e.x+s,e.y+f,t,n,e.angle),h=(0,r.Z)(p,2),m=h[0],v=h[1],b=[m,v,m,v],x=(0,u.WJ)(e);if(x){var w=d._.getMinMaxXYWithBoundText(e,[m,v,m,v],x);b=[w[0],w[1],w[2],w[3]]}return b}var k=null===(o=(0,l.R2)(e))||void 0===o?void 0:o[0],E=null!=k?k:function(e){var t=a.Z.generator(),n=(0,l.i)(e);return t[e.roundness?"curve":n.fill?"polygon":"linearPath"](e.points,n)}(e),j=g(E),S=y(j,(function(r,o){return(0,i.U1)(e.x+r,e.y+o,t,n,e.angle)})),O=[S[0],S[1],S[2],S[3]],_=(0,u.WJ)(e);if(_){var C=d._.getMinMaxXYWithBoundText(e,O,_);O=[C[0],C[1],C[2],C[3]]}return O},j=function(e){var t,n=h(e),o=(0,r.Z)(n,6),a=o[0],l=o[1],s=o[2],u=o[3],d=o[4],f=o[5];if((0,c.F9)(e)){var p=x(e.points.map((function(t){var n=(0,r.Z)(t,2),o=n[0],a=n[1];return(0,i.U1)(o,a,d-e.x,f-e.y,e.angle)}))),m=(0,r.Z)(p,4),g=m[0],v=m[1],b=m[2],y=m[3];return[g+e.x,v+e.y,b+e.x,y+e.y]}if((0,c.bt)(e))t=E(e,d,f);else if("diamond"===e.type){var w=(0,i.U1)(d,l,d,f,e.angle),k=(0,r.Z)(w,2),j=k[0],S=k[1],O=(0,i.U1)(d,u,d,f,e.angle),_=(0,r.Z)(O,2),C=_[0],P=_[1],T=(0,i.U1)(a,f,d,f,e.angle),I=(0,r.Z)(T,2),M=I[0],D=I[1],A=(0,i.U1)(s,f,d,f,e.angle),L=(0,r.Z)(A,2),Z=L[0],R=L[1];t=[Math.min(j,C,M,Z),Math.min(S,P,D,R),Math.max(j,C,M,Z),Math.max(S,P,D,R)]}else if("ellipse"===e.type){var z=(s-a)/2,N=(u-l)/2,B=Math.cos(e.angle),H=Math.sin(e.angle),W=Math.hypot(z*B,N*H),F=Math.hypot(N*B,z*H);t=[d-W,f-F,d+W,f+F]}else{var U=(0,i.U1)(a,l,d,f,e.angle),K=(0,r.Z)(U,2),Y=K[0],V=K[1],G=(0,i.U1)(a,u,d,f,e.angle),X=(0,r.Z)(G,2),q=X[0],$=X[1],J=(0,i.U1)(s,u,d,f,e.angle),Q=(0,r.Z)(J,2),ee=Q[0],te=Q[1],ne=(0,i.U1)(s,l,d,f,e.angle),re=(0,r.Z)(ne,2),oe=re[0],ie=re[1];t=[Math.min(Y,q,ee,oe),Math.min(V,$,te,ie),Math.max(Y,q,ee,oe),Math.max(V,$,te,ie)]}return t},S=function(e){if(!e.length)return[0,0,0,0];var t=1/0,n=-1/0,o=1/0,i=-1/0;return e.forEach((function(e){var a=j(e),l=(0,r.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3];t=Math.min(t,c),o=Math.min(o,s),n=Math.max(n,u),i=Math.max(i,d)})),[t,o,n,i]},O=function(e,t,n,o){if(!(0,c.bt)(e)&&!(0,c.F9)(e))return[e.x,e.y,e.x+t,e.y+n];var i,u=(0,s.z)(0,t,(0,s.z)(1,n,e.points,o),o);if((0,c.F9)(e))i=x(u);else{var d=a.Z.generator(),f=e.roundness?d.curve(u,(0,l.i)(e)):d.linearPath(u,(0,l.i)(e)),p=g(f);i=y(p)}var h=i,m=(0,r.Z)(h,4),v=m[0],b=m[1],w=m[2],k=m[3];return[v+e.x,b+e.y,w+e.x,k+e.y]},_=function(e,t){var n=a.Z.generator(),o=null==e.roundness?n.linearPath(t,(0,l.i)(e)):n.curve(t,(0,l.i)(e)),i=g(o),c=y(i),s=(0,r.Z)(c,4),u=s[0],d=s[1],f=s[2],p=s[3];return[u+e.x,d+e.y,f+e.x,p+e.y]},C=function(e,t){if(!e.length)return[0,0,0,0];var n=1/0,o=e[0];return e.forEach((function(e){var a=j(e),l=(0,r.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3],f=(0,i.LW)((c+u)/2,(s+d)/2,t.x,t.y);f<n&&(n=f,o=e)})),j(o)},P=function(e){var t=S(e),n=(0,r.Z)(t,4),o=n[0],i=n[1],a=n[2],l=n[3];return{minX:o,minY:i,maxX:a,maxY:l,width:a-o,height:l-i,midX:(o+a)/2,midY:(i+l)/2}}},2325:function(e,t,n){"use strict";n.d(t,{uu:function(){return F},T_:function(){return ae},j_:function(){return le},oT:function(){return Y},wX:function(){return z},MZ:function(){return ce},wB:function(){return N},Qu:function(){return B},pX:function(){return W},fb:function(){return U}});var r=n(2577),o=function(e,t){return[0,0,0,0,t,e,1,0]},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[0,0,0,0,0,0,0,0];if(t<0||t>7)throw new Error("Expected `index` between 0 and 7, got `".concat(t,"`"));return 0!==e&&(n[t]=e),n},a=function(e){return[e[0],e[1],e[2],e[3],-e[4],-e[5],-e[6],-e[7]]},l=function(e,t){return m(t)?[e[0]-t,e[1],e[2],e[3],e[4],e[5],e[6],e[7]]:[e[0]-t[0],e[1]-t[1],e[2]-t[2],e[3]-t[3],e[4]-t[4],e[5]-t[5],e[6]-t[6],e[7]-t[7]]},c=function(e,t){return m(t)?[e[0]*t,e[1]*t,e[2]*t,e[3]*t,e[4]*t,e[5]*t,e[6]*t,e[7]*t]:[s(e,t),t[1]*e[0]+t[0]*e[1]-t[4]*e[2]+t[5]*e[3]+t[2]*e[4]-t[3]*e[5]-t[7]*e[6]-t[6]*e[7],t[2]*e[0]+t[0]*e[2]-t[6]*e[3]+t[3]*e[6],t[3]*e[0]+t[6]*e[2]+t[0]*e[3]-t[2]*e[6],t[4]*e[0]+t[2]*e[1]-t[1]*e[2]+t[7]*e[3]+t[0]*e[4]+t[6]*e[5]-t[5]*e[6]+t[3]*e[7],t[5]*e[0]-t[3]*e[1]+t[7]*e[2]+t[1]*e[3]-t[6]*e[4]+t[0]*e[5]+t[4]*e[6]+t[2]*e[7],t[6]*e[0]+t[3]*e[2]-t[2]*e[3]+t[0]*e[6],t[7]*e[0]+t[6]*e[1]+t[5]*e[2]+t[4]*e[3]+t[3]*e[4]+t[2]*e[5]+t[1]*e[6]+t[0]*e[7]]},s=function(e,t){return t[0]*e[0]+t[2]*e[2]+t[3]*e[3]-t[6]*e[6]},u=function(e,t){return[d(e,t),e[1]*t[7]+e[4]*t[5]-e[5]*t[4]+e[7]*t[1],e[2]*t[7]-e[4]*t[6]+e[6]*t[4]+e[7]*t[2],e[3]*t[7]+e[5]*t[6]-e[6]*t[5]+e[7]*t[3],e[4]*t[7]+e[7]*t[4],e[5]*t[7]+e[7]*t[5],e[6]*t[7]+e[7]*t[6],e[7]*t[7]]},d=function(e,t){return e[0]*t[7]+e[1]*t[6]+e[2]*t[5]+e[3]*t[4]+e[4]*t[3]+e[5]*t[2]+e[6]*t[1]+e[7]*t[0]},f=function(e){return Math.sqrt(Math.abs(e[0]*e[0]-e[2]*e[2]-e[3]*e[3]+e[6]*e[6]))},p=function(e){var t=f(e);if(0===t||1===t)return e;var n=e[6]<0?-1:1;return c(e,n/t)},h=function(e){var t=function(e){return Math.sqrt(Math.abs(e[7]*e[7]-e[5]*e[5]-e[4]*e[4]+e[1]*e[1]))}(e);return 0===t||1===t?e:c(e,1/t)},m=function(e){return"number"==typeof e},g=(i(1,1),i(1,2),i(1,3),i(1,4),i(1,5),i(1,6),i(1,7),function(e,t,n){return p([0,n,e,t,0,0,0,0])}),v=function(e,t){return p(u(t,e))},b=function(e,t){return n=e,[(r=t)[0]*n[0]+r[2]*n[2]+r[3]*n[3]-r[6]*n[6],r[1]*n[0]+r[0]*n[1]-r[4]*n[2]+r[5]*n[3]+r[2]*n[4]-r[3]*n[5]-r[7]*n[6]-r[6]*n[7],r[2]*n[0]+r[0]*n[2]-r[6]*n[3]+r[3]*n[6],r[3]*n[0]+r[6]*n[2]+r[0]*n[3]-r[2]*n[6],r[4]*n[0]+r[7]*n[3]+r[0]*n[4]+r[3]*n[7],r[5]*n[0]+r[7]*n[2]+r[0]*n[5]+r[2]*n[7],r[6]*n[0]+r[0]*n[6],r[7]*n[0]+r[0]*n[7]];var n,r},y=function(e){var t=(0,r.Z)(e,2),n=t[0];return[0,0,0,0,t[1],n,1,0]},x=function(e){return[e[5],e[4]]},w=function(e,t){return p((n=e,[(r=t)[0]*n[0],r[1]*n[0]+r[0]*n[1],r[2]*n[0]+r[0]*n[2],r[3]*n[0]+r[0]*n[3],r[4]*n[0]+r[2]*n[1]-r[1]*n[2]+r[0]*n[4],r[5]*n[0]-r[3]*n[1]+r[1]*n[3]+r[0]*n[5],r[6]*n[0]+r[3]*n[2]-r[2]*n[3]+r[0]*n[6],r[7]*n[0]+r[6]*n[1]+r[5]*n[2]+r[4]*n[3]+r[3]*n[4]+r[2]*n[5]+r[1]*n[6]]));var n,r},k=function(e,t){return f(u(e,t))},E=function(e,t){return d(e,t)},j=function(e){return[0,0,0,0,e[4],e[5],0,0]},S=function(e,t){return n=c(e,Math.sin(t/2)),r=Math.cos(t/2),m(r)?[n[0]+r,n[1],n[2],n[3],n[4],n[5],n[6],n[7]]:[n[0]+r[0],n[1]+r[1],n[2]+r[2],n[3]+r[3],n[4]+r[4],n[5]+r[5],n[6]+r[6],n[7]+r[7]];var n,r},O=function(e,t){return p(c(c(e,t),a(e)))},_=n(6552),C=n(1493),P=n(8925),T=n(3063),I=n(1974),M=n(1047),D=n(6340),A=n(267),L=n(5710);function Z(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var z=function e(t,n,r,o){var i=10/n.zoom.value,a=[r,o];if(H(n,t)&&(0,A.oY)([t],n))return W(t,a,i);var l=(0,L.WJ)(t);if(l&&e(l,n,r,o))return!0;return B(t,n,a)},N=function(e,t,n,r){var o=10/t.zoom.value,i=(0,L.WJ)(e);return(!i||!z(i,t,n,r))&&(!B(e,t,[n,r])&&W(e,[n,r],o))},B=function(e,t,n){var r=10/t.zoom.value,o=(0,M.iB)(e)?V:function(e){if("arrow"===e.type)return!1;if("freedraw"===e.type)return!0;var t=!(0,D.Qm)(e.backgroundColor)||(0,I.Xo)(e);return"line"===e.type?t&&(0,_.g6)(e.points):t||(0,I.pC)(e)}(e)?G:X;return K({element:e,point:n,threshold:r,check:o})},H=function(e,t){return e.selectedElementIds[t.id]},W=function(e,t,n){var o=(0,r.Z)(t,2),i=o[0],a=o[1],l=(0,P.qf)(e),c=(0,r.Z)(l,4),s=c[0],u=c[1],d=c[2],f=c[3],p=(s+d)/2,h=(u+f)/2,m=(0,_.U1)(i,a,p,h,-e.angle),g=(0,r.Z)(m,2),v=g[0],b=g[1];return v>s-n&&v<d+n&&b>u-n&&b<f+n},F=function(e,t){var n=t.x,r=t.y,o=U(e,e.width,e.height);return K({element:e,point:[n,r],threshold:o,check:q})},U=function(e,t,n){var r=("diamond"===e.type?1/Math.sqrt(2):1)*Math.min(t,n);return Math.max(16,Math.min(.25*r,32))},K=function(e){switch(e.element.type){case"rectangle":case"image":case"text":case"diamond":case"ellipse":var t=Y(e.element,e.point);return e.check(t,e.threshold);case"freedraw":return!!e.check($(e.element,e.point),e.threshold)&&te(e.element,e.point,e.threshold);case"arrow":case"line":return ne(e);case"selection":return console.warn("This should not happen, we need to investigate why it does."),!1}},Y=function(e,t){switch(e.type){case"rectangle":case"image":case"text":return $(e,t);case"diamond":return J(e,t);case"ellipse":return Q(e,t)}},V=function(e,t){return e<0},G=function(e,t){return e<t},X=function(e,t){return Math.abs(e)<t},q=function(e,t){return 0<=e&&e<t},$=function(e,t){var n=re(e,t),o=(0,r.Z)(n,4),i=o[1],a=o[2],l=o[3];return Math.max(E(i,g(0,1,-l)),E(i,g(1,0,-a)))},J=function(e,t){var n=re(e,t),o=(0,r.Z)(n,4),i=o[1],a=o[2],l=o[3],c=g(l,a,-l*a);return E(i,c)},Q=function(e,t){var n,o=ee(e,t),i=(0,r.Z)(o,2),a=i[0],l=i[1];return n=l,-Math.sign(n[1])*E(a,l)},ee=function(e,t){var n=re(e,t),i=(0,r.Z)(n,4),a=i[1],l=i[2],c=i[3],s=x(a),u=(0,r.Z)(s,2),d=u[0],f=u[1],p=.707,h=.707,m=l,g=c;[0,1,2,3].forEach((function(e){var t=m*p,n=g*h,r=(m*m-g*g)*Math.pow(p,3)/m,o=(g*g-m*m)*Math.pow(h,3)/g,i=t-r,a=n-o,l=d-r,c=f-o,s=Math.hypot(a,i),u=Math.hypot(c,l);p=Math.min(1,Math.max(0,(l*s/u+r)/m)),h=Math.min(1,Math.max(0,(c*s/u+o)/g));var v=Math.hypot(h,p);p/=v,h/=v}));var y,w=o(m*p,g*h);return[a,b(v(a,y=w),y)]},te=function(e,t,n){var o,i;if(0===e.angle)o=t[0]-e.x,i=t[1]-e.y;else{var a=(0,P.qf)(e),l=(0,r.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3],f=(0,_.xj)(t,[c+(u-c)/2,s+(d-s)/2],-e.angle);o=f[0]-e.x,i=f[1]-e.y}var p,h=(0,r.Z)(e.points,2),m=h[0],g=h[1];if((0,_.LW)(m[0],m[1],o,i)<n||(0,_.LW)(g[0],g[1],o,i)<n)return!0;for(var v=0;v<e.points.length;v++){var b=[g[0]-m[0],g[1]-m[1]],y=Math.hypot(b[1],b[0]),x=[b[0]/y,b[1]/y],w=[o-m[0],i-m[1]],k=(w[0]*x[0]+w[1]*x[1])/Math.hypot(x[1],x[0]);p=[m[0]+x[0]*k,m[1]+x[1]*k];var E=(0,_.LW)(p[0],p[1],m[0],m[1]),j=(0,_.LW)(p[0],p[1],g[0],g[1]);if(p=j<E&&E>y?g:E<j&&j>y?m:p,Math.hypot(i-p[1],o-p[0])<n)return!0;m=g,g=e.points[v+1]}var S=(0,T.R2)(e);return!(!S||!S.sets.length)&&be(S,o,i,n)},ne=function(e){var t=e.element,n=e.threshold;if(!(0,T.R2)(t))return!1;var o=re(e.element,e.point),i=(0,r.Z)(o,4),a=i[0],l=i[1],c=i[2],s=i[3],u=g(0,1,-s),d=g(1,0,-c);if(!G(E(l,u),n)||!G(E(l,d),n))return!1;var f=x(a),p=(0,r.Z)(f,2),h=p[0],m=p[1],v=(0,T.R2)(t);if(!v)return!1;if(e.check===G&&v.some((function(e){return ve(e,h,m,t.roundness?"round":"sharp")})))return!0;return v.some((function(e){return be(e,h,m,n)}))},re=function(e,t){var n,o=y(t),i=(0,P.qf)(e),a=(0,r.Z)(i,4),c=a[0],s=a[1],u=a[2],d=a[3],f=(0,P.qf)(e),p=ie([c,s,u,d]),h=S(p,e.angle),m=O(h,o),g=function(e){return[0,0,0,0,Math.abs(e[4]),Math.abs(e[5]),1,0]}(l(m,j(p))),v=(n=e.x,[0,0,0,0,e.y,n,0,0]),b=l(m,v),x=(0,r.Z)(f,4),w=x[0],k=x[1];return[b,g,(x[2]-w)/2,(x[3]-k)/2]},oe=function(e){var t=(0,P.qf)(e),n=(0,r.Z)(t,4),o=n[0],i=n[1],l=n[2],s=n[3],u=ie([o,i,l,s]),d=S(u,e.angle),f=a(function(e){return[1,0,0,0,-.5*e[5],.5*e[4],0,0]}(j(u)));return c(f,d)},ie=function(e){var t=(0,r.Z)(e,4),n=t[0],i=t[1],a=t[2],l=t[3];return o((n+a)/2,(i+l)/2)},ae=function(e,t,n){var r=oe(e),o=O(r,y(t)),i=O(r,y(n)),a=v(o,i),l=e.height/e.width,c=e.width/2,s=e.height/2,u=a[2],d=a[3],f=a[1],p=Math.abs(d),h=Math.abs(u);switch(e.type){case"rectangle":case"image":case"text":return f/(c*(h+l*p));case"diamond":return p<h?f/(h*c):f/(p*s);case"ellipse":return f/(c*Math.sqrt(Math.pow(u,2)+Math.pow(l,2)*Math.pow(d,2)))}},le=function(e,t,n){if(0===t){var o=(0,P.qf)(e),i=(0,r.Z)(o,4),l=i[0],c=i[1],s=i[2],u=i[3],d=ie([l,c,s,u]);return x(d)}var f,p=oe(e),h=O(p,y(n)),m=a(p);switch(e.type){case"rectangle":case"image":case"text":case"diamond":f=ge(e,t,h);break;case"ellipse":f=me(e,t,h)}return x(O(m,f))},ce=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=oe(e),i=O(o,y(t)),l=O(o,y(n)),c=v(i,l),s=a(o),u=se(e,c,i,r);return u.map((function(e){return x(O(s,e))}))},se=function(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;switch(e.type){case"rectangle":case"image":case"text":case"diamond":var i=ue(e);r=i.flatMap((function(e,n){var r=[e,i[(n+1)%4]];return de(t,fe(r,o))})).concat(i.flatMap((function(e){return he(e,o,t)})));break;case"ellipse":r=pe(e,o,t)}if(r.length<2)return[];var a=r.sort((function(e,t){return k(e,n)-k(t,n)}));return[a[0],a[a.length-1]]},ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t*e.width/2,r=t*e.height/2;switch(e.type){case"rectangle":case"image":case"text":return[o(n,r),o(n,-r),o(-n,-r),o(-n,r)];case"diamond":return[o(0,r),o(n,0),o(0,-r),o(-n,0)]}},de=function(e,t){var n=(0,r.Z)(t,2),o=n[0],i=n[1];return E(o,e)*E(i,e)>=0?[]:[w(e,v(o,i))]},fe=function(e,t){var n=(0,r.Z)(e,2),o=n[0],i=n[1],a=function(e,t){var n=.5*t;return[1,0,0,0,n*e[4],n*e[5],0,0]}(function(e,t){return h([0,0,0,0,t[4]-e[4],t[5]-e[5],0,0])}(o,i),t);return[O(a,o),O(a,i)]},pe=function(e,t,n){var r=e.width/2+t,i=e.height/2+t,a=n[2],l=n[3],c=n[1],s=r*r*a*a+i*i*l*l,u=s-c*c;if(0===s||u<=0)return[];var d=Math.sqrt(u),f=-r*r*a*c,p=-i*i*l*c;return[o((f+r*i*l*d)/s,(p-r*i*a*d)/s),o((f-r*i*l*d)/s,(p+r*i*a*d)/s)]},he=function(e,t,n){if(0===t)return 0===E(n,e)?[e]:[];var i=n[2],a=n[3],l=n[1],c=x(e),s=(0,r.Z)(c,2),u=s[0],d=s[1],f=i*i+a*a,p=t*t*f-Math.pow(i*u+a*d+l,2);if(0===f||p<=0)return[];var h=Math.sqrt(p),m=u*a*a-d*i*a-i*l,g=d*i*i-u*i*a-a*l;return[o((m+a*h)/f,(g-i*h)/f),o((m-a*h)/f,(g+i*h)/f)]},me=function(e,t,n){var i=Math.abs(t),a=e.width*i/2,l=e.height*i/2,c=Math.sign(t),s=x(n),u=(0,r.Z)(s,2),d=u[0],f=u[1],p=0===f?1e-4:f,h=Math.pow(d,2)*Math.pow(l,2)+Math.pow(p,2)*Math.pow(a,2),m=(-d*Math.pow(l,2)+c*p*Math.sqrt(Math.max(0,h-Math.pow(a,2)*Math.pow(l,2))))/h,g=(-m*d-1)/p;0===g&&(g=.01*(Object.is(g,-0)?-1:1));var v=-Math.pow(a,2)*m/(Math.pow(g,2)*Math.pow(l,2)+Math.pow(m,2)*Math.pow(a,2));return o(v,(-m*v-1)/g)},ge=function(e,t,n){var r=Math.abs(t),o=Math.sign(t),i=ue(e,r),a=0,l=null;return i.forEach((function(e){var t=o*v(n,e)[1];t>a&&(a=t,l=e)})),l},ve=function(e,t,n,r){var o,i=[],a=!1,l=Z((0,P.CM)(e));try{for(l.s();!(o=l.n()).done;){var c=o.value;"move"===c.op?(a=!a)&&i.push([c.data[0],c.data[1]]):"bcurveTo"===c.op?a&&(i.push([c.data[0],c.data[1]]),i.push([c.data[2],c.data[3]]),i.push([c.data[4],c.data[5]])):"lineTo"===c.op&&a&&i.push([c.data[0],c.data[1]])}}catch(e){l.e(e)}finally{l.f()}if(i.length>=4){if("sharp"===r)return(0,_.c9)(i,t,n);var s=(0,C.s)(i,10,5);return(0,_.c9)(s,t,n)}return!1},be=function(e,t,n,o){var i=(0,P.CM)(e),a=[0,0];return i.some((function(i,l){var c=i.op,s=i.data;if("move"===c)a=s;else{if("bcurveTo"===c){var u=[s[0],s[1]],d=[s[2],s[3]],f=[s[4],s[5]],p=a;a=f;var h=function(e,t,n,o,i,a){for(var l=(0,r.Z)(i,2),c=l[0],s=l[1],u=function(r,i){return Math.pow(1-r,3)*o[i]+3*r*Math.pow(1-r,2)*n[i]+3*Math.pow(r,2)*(1-r)*t[i]+e[i]*Math.pow(r,3)},d=0;d<=1;){var f=u(d,0),p=u(d,1);if(Math.sqrt(Math.pow(f-c,2)+Math.pow(p-s,2))<a)return!0;d+=.01}return!1}(p,u,d,f,[t,n],o);return h}if("lineTo"===c)return ve(e,t,n,"sharp");"qcurveTo"===c&&console.warn("qcurveTo is not implemented yet")}return!1}))}},5637:function(e,t,n){"use strict";n.d(t,{PK:function(){return p},Xx:function(){return h},bp:function(){return g},oA:function(){return m}});var r=n(2577),o=n(7169),i=n(8950),a=n(2975),l=n.n(a),c=n(2335),s=n(8211),u=n(1974);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},h=function(){var e=(0,i.Z)(l().mark((function e(t){var n,r,o,a,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fileIds,r=t.files,o=t.imageCache,a=new Map,s=new Map,e.next=5,Promise.all(n.reduce((function(e,t){var n=r[t];return n&&!a.has(t)?(a.set(t,!0),e.concat((0,i.Z)(l().mark((function e(){var r,i,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n.mimeType!==c.LO.binary){e.next=3;break}throw new Error("Only images can be added to ImageCache");case 3:return r=p(n.dataURL),i={image:r,mimeType:n.mimeType},o.set(t,i),e.next=8,r;case 8:a=e.sent,o.set(t,f(f({},i),{},{image:a})),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),s.set(t,!0);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})))())):e}),[]));case 5:return e.abrupt("return",{imageCache:o,updatedFiles:a,erroredFiles:s});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(e){return e.filter((function(e){return(0,u.wi)(e)}))},g=function(){var e=(0,i.Z)(l().mark((function e(t){var n,o,i,a,u,d,f;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(new DOMParser).parseFromString(t,c.LO.svg),o=n.querySelector("svg"),!n.querySelector("parsererror")&&"svg"===(null==(l=o)?void 0:l.nodeName.toLowerCase())){e.next=7;break}throw new Error((0,s.t)("errors.invalidSVGString"));case 7:return o.hasAttribute("xmlns")||o.setAttribute("xmlns",c.hR),o.hasAttribute("width")&&o.hasAttribute("height")||(i=o.getAttribute("viewBox"),a=o.getAttribute("width")||"50",u=o.getAttribute("height")||"50",i&&(d=i.match(/\d+ +\d+ +(\d+) +(\d+)/))&&(f=(0,r.Z)(d,3),a=f[1],u=f[2]),o.setAttribute("width",a),o.setAttribute("height",u)),e.abrupt("return",o.outerHTML);case 10:case"end":return e.stop()}var l}),e)})));return function(t){return e.apply(this,arguments)}}()},1047:function(e,t,n){"use strict";n.d(t,{ox:function(){return p.ox},BQ:function(){return H},_M:function(){return W},EJ:function(){return T},o8:function(){return _},Sy:function(){return d.Sy},os:function(){return f.os},KP:function(){return f.KP},Un:function(){return k},$V:function(){return P},qf:function(){return f.qf},Pi:function(){return f.Pi},jt:function(){return y},o4:function(){return s},Lm:function(){return z},Qp:function(){return u},T:function(){return E.T},xx:function(){return E.xx},Uo:function(){return Z},n2:function(){return x},PC:function(){return p.PC},kK:function(){return p.kK},n_:function(){return R},wX:function(){return h.wX},r2:function(){return i.r2},wB:function(){return h.wB},QD:function(){return l},qP:function(){return N},iB:function(){return i.iB},Up:function(){return d.Up},vw:function(){return d.vw},y8:function(){return d.y8},VL:function(){return d.VL},oN:function(){return S.oN},JZ:function(){return d.JZ},RT:function(){return D},b_:function(){return I.b_},vY:function(){return E.vY},N_:function(){return d.N_}});var r=n(7169),o=n(1935),i=n(1974),a=n(2335),l=function(e){return(0,i.bt)(e)||(0,i.F9)(e)?e.points.length<2:0===e.width&&0===e.height},c=function(e,t,n){var r=Math.abs(t),o=Math.abs(n);if("line"===e||"arrow"===e||"freedraw"===e){var i=Math.round(Math.atan(o/r)/a.ay)*a.ay;0===i?n=0:i===Math.PI/2?t=0:n=r*Math.tan(i)*Math.sign(n)||n}else"selection"!==e&&(n=r*Math.sign(n));return{width:t,height:n}},s=function(e,t,n,r){var o=n-e,i=r-t,l=Math.round(Math.atan(i/o)/a.ay)*a.ay;if(0===l)i=0;else if(l===Math.PI/2)o=0;else{var c=Math.tan(l),s=t-c*e,u=-1/c,d=r-u*n;o=(-1*d- -1*s)/(-1*c- -1*u)-e,i=(s*u-d*c)/(-1*c- -1*u)-t}return{width:o,height:i}},u=function(e){var t={width:e.width,height:e.height,x:e.x,y:e.y};if(e.width<0){var n=Math.abs(e.width);t.width=n,t.x=e.x-n}if(e.height<0){var r=Math.abs(e.height);t.height=r,t.y=e.y-r}return t},d=n(2791),f=n(8925),p=n(267),h=n(2325),m=n(2577),g=n(2726),v=["rotation"],b=function(e,t,n){return t>=e[0]&&t<=e[0]+e[2]&&n>=e[1]&&n<=e[1]+e[3]},y=function(e,t,n,r,o,i){return e.reduce((function(e,a){if(e)return e;var l=function(e,t,n,r,o,i){if(!t.selectedElementIds[e.id])return!1;var a=(0,p.PC)(e,o,i),l=a.rotation,c=(0,g.Z)(a,v);if(l&&b(l,n,r))return"rotation";var s=Object.keys(c).filter((function(e){var t=c[e];return!!t&&b(t,n,r)}));return s.length>0&&s[0]}(a,t,n,r,o,i);return l?{element:a,transformHandleType:l}:null}),null)},x=function(e,t,n,r,o){var i=(0,m.Z)(e,4),a=i[0],l=i[1],c=i[2],s=i[3],u=(0,p.kK)([a,l,c,s,(a+c)/2,(l+s)/2],0,r,o,p.ox);return Object.keys(u).find((function(e){var r=u[e];return r&&b(r,t,n)}))||!1},w=["ns","nesw","ew","nwse"],k=function(e){var t=e.element,n=e.transformHandleType,r=t&&Math.sign(t.height)*Math.sign(t.width)==-1,o=null;switch(n){case"n":case"s":o="ns";break;case"w":case"e":o="ew";break;case"nw":case"se":o=r?"nesw":"nwse";break;case"ne":case"sw":o=r?"nwse":"nesw";break;case"rotation":return"grab"}return o&&t&&(o=function(e,t){var n=w.indexOf(e);if(n>=0){var r=Math.round(t/(Math.PI/4));e=w[(n+r)%w.length]}return e}(o,t.angle)),o?"".concat(o,"-resize"):""},E=n(8634),j=n(8290),S=n(5710),O=n(242),_=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,l=arguments.length>7?arguments[7]:void 0,c=(0,f.KP)(t),s=(0,m.Z)(c,2),u=s[0],d=s[1],p={x:n-u,y:r-d};t.forEach((function(n){if(C(o,i,a,e,n,p),!n.groupIds.length||l.editingGroupId&&!(0,O.zq)(l,n)){var r=(0,S.WJ)(n);r&&C(o,i,a,e,r,p)}(0,j.Ww)(n,{simultaneouslyUpdated:t})}))},C=function(e,t,n,r,i,a){var l,c;if(e){var s=e&&t<n,u=e&&t>n,d=r.originalElements.get(i.id);l=s&&d?d.x:i.x+a.x,c=u&&d?d.y:i.y+a.y}else l=i.x+a.x,c=i.y+a.y;(0,o.DR)(i,{x:l,y:c})},P=function(e,t,n){var r=(0,f.KP)(e),o=(0,m.Z)(r,2);return[t-o[0],n-o[1]]},T=function(e,t,n,r,i,a,l,s,u,d,f){if(u&&"selection"!==e.type)if(f)s=l/f;else{if(Math.abs(a-r)>Math.abs(i-n)){var p=c(t,s,i<n?-l:l);l=p.width,s=p.height}else{var h=c(t,l,a<r?-s:s);l=h.width,s=h.height}s<0&&(s=-s)}var m=i<n?n-l:n,g=a<r?r-s:r;d&&(m=n-(l+=l)/2,g=r-(s+=s)/2),0!==l&&0!==s&&(0,o.DR)(e,{x:m,y:g,width:l,height:s})},I=n(6906),M=n(75),D=function(e,t){return Boolean(!e.viewModeEnabled&&"custom"!==e.activeTool.type&&(e.editingElement||"selection"!==e.activeTool.type&&"eraser"!==e.activeTool.type&&"hand"!==e.activeTool.type)||(0,M.eD)(t,e).length)};function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Z=function(e){return e.reduce((function(e,t){return e+t.version}),0)},R=function(e){return e.filter((function(e){return!e.isDeleted&&!l(e)}))},z=function(e){return e.filter((function(e){return!e.isDeleted}))},N=function(e){return!e.isDeleted},B=function(e){return z(e).map((function(e){return(0,i.dt)(e.type)?L(L({},e),{},{lastCommittedPoint:null}):e}))},H=function(e){return B(e)},W=function(e){return B(e)}},6938:function(e,t,n){"use strict";n.d(t,{_:function(){return S}});var r=n(1930),o=n(7169),i=n(2577),a=n(8821),l=n(5169),c=n(6552),s=n(1047),u=n(8925),d=n(1935),f=n(1564),p=n(8290),h=n(6340),m=n(1974),g=n(6066),v=n(5710),b=n(3063),y=n(2335);function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j={version:null,points:[],zoom:null},S=function(){function e(t,n){(0,a.Z)(this,e),this.elementId=t.id,f.Z.mapElementToScene(this.elementId,n),e.normalizePoints(t),this.selectedPointsIndices=null,this.lastUncommittedPoint=null,this.isDragging=!1,this.pointerOffset={x:0,y:0},this.startBindingElement="keep",this.endBindingElement="keep",this.pointerDownState={prevSelectedPointsIndices:null,lastClickedPoint:-1,origin:null,segmentMidpoint:{value:null,index:null,added:!1}},this.hoverPointIndex=-1,this.segmentMidPointHoveredCoords=null}return(0,l.Z)(e,null,[{key:"getElement",value:function(e){var t,n=null===(t=f.Z.getScene(e))||void 0===t?void 0:t.getNonDeletedElement(e);return n||null}},{key:"handleBoxSelection",value:function(t,n,r){var o;if(!n.editingLinearElement||"selection"!==(null===(o=n.draggingElement)||void 0===o?void 0:o.type))return!1;var a=n.editingLinearElement,l=a.selectedPointsIndices,c=a.elementId,u=e.getElement(c);if(!u)return!1;var d=(0,s.qf)(n.draggingElement),f=(0,i.Z)(d,4),p=f[0],h=f[1],m=f[2],g=f[3],v=e.getPointsGlobalCoordinates(u).reduce((function(e,n,r){return(n[0]>=p&&n[0]<=m&&n[1]>=h&&n[1]<=g||t.shiftKey&&null!=l&&l.includes(r))&&e.push(r),e}),[]);r({editingLinearElement:E(E({},a),{},{selectedPointsIndices:v.length?v:null})})}},{key:"handlePointDragging",value:function(t,n,r,o,a,l){if(!l)return!1;var c=l.selectedPointsIndices,s=l.elementId,u=e.getElement(s);if(!u)return!1;var d=u.points[l.pointerDownState.lastClickedPoint];if(c&&d){if((0,g.Ge)(t)&&1===c.length&&u.points.length>1){var f=c[0],p=u.points[0===f?1:f-1],b=e._getShiftLockedDelta(u,p,[r,o],n.gridSize),y=(0,i.Z)(b,2),x=y[0],w=y[1];e.movePoints(u,[{index:f,point:[x+p[0],w+p[1]],isDragging:f===l.pointerDownState.lastClickedPoint}])}else{var k=e.createPointAt(u,r-l.pointerOffset.x,o-l.pointerOffset.y,n.gridSize),E=k[0]-d[0],j=k[1]-d[1];e.movePoints(u,c.map((function(t){return{index:t,point:t===l.pointerDownState.lastClickedPoint?e.createPointAt(u,r-l.pointerOffset.x,o-l.pointerOffset.y,n.gridSize):[u.points[t][0]+E,u.points[t][1]+j],isDragging:t===l.pointerDownState.lastClickedPoint}}))),(0,v.WJ)(u)&&(0,v.RB)(u,!1)}if((0,m.Mn)(u,!1)){var S=[];0===c[0]&&S.push((0,h.AK)(e.getPointGlobalCoordinates(u,u.points[0])));var O=c[c.length-1];O===u.points.length-1&&S.push((0,h.AK)(e.getPointGlobalCoordinates(u,u.points[O]))),S.length&&a(u,S)}return!0}return!1}},{key:"handlePointerUp",value:function(t,n,r){var o,i=n.elementId,a=n.selectedPointsIndices,l=n.isDragging,s=n.pointerDownState,u=e.getElement(i);if(!u)return n;var d={};if(l&&a){var m,g=x(a);try{for(g.s();!(m=g.n()).done;){var v=m.value;if(0===v||v===u.points.length-1){(0,c.g6)(u.points,r.zoom.value)&&e.movePoints(u,[{index:v,point:0===v?u.points[u.points.length-1]:u.points[0]}]);var b=(0,p.N1)(r)?(0,p.Y9)((0,h.AK)(e.getPointAtIndexGlobalCoordinates(u,v)),f.Z.getScene(u)):null;d[0===v?"startBindingElement":"endBindingElement"]=b}}}catch(e){g.e(e)}finally{g.f()}}return E(E(E({},n),d),{},{selectedPointsIndices:l||t.shiftKey?!l&&t.shiftKey&&null!==(o=s.prevSelectedPointsIndices)&&void 0!==o&&o.includes(s.lastClickedPoint)?a&&a.filter((function(e){return e!==s.lastClickedPoint})):a:null!=a&&a.includes(s.lastClickedPoint)?[s.lastClickedPoint]:a,isDragging:!1,pointerOffset:{x:0,y:0}})}},{key:"isSegmentTooShort",value:function(t,n,r,o){var i=(0,c.LW)(n[0],n[1],r[0],r[1]);return t.points.length>2&&t.roundness&&(i=(0,c.eH)(t,r)),i*o.value<4*e.POINT_HANDLE_SIZE}},{key:"getSegmentMidPoint",value:function(t,n,r,o){var a=(0,c.H5)(n,r);if(t.points.length>2&&t.roundness){var l=(0,c.yB)(t,t.points[o]);if(l){var s=(0,c.lk)(t,t.points[o],.5),u=(0,c.N_)(l[0],l[1],l[2],l[3],s),d=(0,i.Z)(u,2),f=d[0],p=d[1];a=e.getPointGlobalCoordinates(t,[f,p])}}return a}},{key:"getSegmentMidPointIndex",value:function(t,n,r){var o=e.getElement(t.elementId);if(!o)return-1;for(var i=e.getEditorMidPoints(o,n),a=0;a<i.length;){if(e.arePointsEqual(r,i[a]))return a+1;a++}return-1}},{key:"handlePointerDown",value:function(t,n,o,a,l){var u,h={didAddPoint:!1,hitElement:null,linearElementEditor:null};if(!l)return h;var g=l.elementId,v=e.getElement(g);if(!v)return h;var b=e.getSegmentMidpointHitCoords(l,a,n),y=null;if(b&&(y=e.getSegmentMidPointIndex(l,n,b)),t.altKey&&n.editingLinearElement)return null==l.lastUncommittedPoint&&((0,d.DR)(v,{points:[].concat((0,r.Z)(v.points),[e.createPointAt(v,a.x,a.y,n.gridSize)])}),h.didAddPoint=!0),o.resumeRecording(),h.linearElementEditor=E(E({},l),{},{pointerDownState:{prevSelectedPointsIndices:l.selectedPointsIndices,lastClickedPoint:-1,origin:{x:a.x,y:a.y},segmentMidpoint:{value:b,index:y,added:!1}},selectedPointsIndices:[v.points.length-1],lastUncommittedPoint:null,endBindingElement:(0,p.Y9)(a,f.Z.getScene(v))}),h.didAddPoint=!0,h;var x=e.getPointIndexUnderCursor(v,n.zoom,a.x,a.y);if(x>=0||b)h.hitElement=v;else{var w=l.startBindingElement,k=l.endBindingElement;(0,p.N1)(n)&&(0,m.Mn)(v)&&(0,p.HG)(v,w,k)}var j=(0,s.qf)(v),S=(0,i.Z)(j,4),_=S[0],C=S[1],P=(_+S[2])/2,T=(C+S[3])/2,I=x>-1&&(0,c.U1)(v.x+v.points[x][0],v.y+v.points[x][1],P,T,v.angle),M=x>-1||t.shiftKey?t.shiftKey||null!==(u=l.selectedPointsIndices)&&void 0!==u&&u.includes(x)?O([].concat((0,r.Z)(l.selectedPointsIndices||[]),[x])):[x]:null;return h.linearElementEditor=E(E({},l),{},{pointerDownState:{prevSelectedPointsIndices:l.selectedPointsIndices,lastClickedPoint:x,origin:{x:a.x,y:a.y},segmentMidpoint:{value:b,index:y,added:!1}},selectedPointsIndices:M,pointerOffset:I?{x:a.x-I[0],y:a.y-I[1]}:{x:0,y:0}}),h}},{key:"arePointsEqual",value:function(e,t){return!e&&!t||!(!e||!t)&&(0,c.Jj)(e,t)}},{key:"handlePointerMove",value:function(t,n,r,o){if(!o.editingLinearElement)return null;var a=o.editingLinearElement,l=a.elementId,c=a.lastUncommittedPoint,s=e.getElement(l);if(!s)return o.editingLinearElement;var u,d=s.points,f=d[d.length-1];if(!t.altKey)return f===c&&e.deletePoints(s,[d.length-1]),E(E({},o.editingLinearElement),{},{lastUncommittedPoint:null});if((0,g.Ge)(t)&&d.length>=2){var p=d[d.length-2],h=e._getShiftLockedDelta(s,p,[n,r],o.gridSize),m=(0,i.Z)(h,2),v=m[0],b=m[1];u=[v+p[0],b+p[1]]}else u=e.createPointAt(s,n-o.editingLinearElement.pointerOffset.x,r-o.editingLinearElement.pointerOffset.y,o.gridSize);return f===c?e.movePoints(s,[{index:s.points.length-1,point:u}]):e.addPoints(s,o,[{point:u}]),E(E({},o.editingLinearElement),{},{lastUncommittedPoint:s.points[s.points.length-1]})}},{key:"getPointGlobalCoordinates",value:function(e,t){var n=(0,s.qf)(e),r=(0,i.Z)(n,4),o=r[0],a=r[1],l=(o+r[2])/2,u=(a+r[3])/2,d=e.x,f=e.y,p=(0,c.U1)(d+t[0],f+t[1],l,u,e.angle),h=(0,i.Z)(p,2);return[d=h[0],f=h[1]]}},{key:"getPointsGlobalCoordinates",value:function(e){var t=(0,s.qf)(e),n=(0,i.Z)(t,4),r=n[0],o=n[1],a=n[2],l=n[3],u=(r+a)/2,d=(o+l)/2;return e.points.map((function(t){var n=e.x,r=e.y,o=(0,c.U1)(n+t[0],r+t[1],u,d,e.angle),a=(0,i.Z)(o,2);return[n=a[0],r=a[1]]}))}},{key:"getPointAtIndexGlobalCoordinates",value:function(e,t){var n=t<0?e.points.length+t:t,r=(0,s.qf)(e),o=(0,i.Z)(r,4),a=o[0],l=o[1],u=(a+o[2])/2,d=(l+o[3])/2,f=e.points[n],p=e.x,h=e.y;return f?(0,c.U1)(p+f[0],h+f[1],u,d,e.angle):(0,c.U1)(p,h,u,d,e.angle)}},{key:"pointFromAbsoluteCoords",value:function(e,t){var n=(0,s.qf)(e),r=(0,i.Z)(n,4),o=r[0],a=r[1],l=(o+r[2])/2,u=(a+r[3])/2,d=(0,c.U1)(t[0],t[1],l,u,-e.angle),f=(0,i.Z)(d,2),p=f[0],h=f[1];return[p-e.x,h-e.y]}},{key:"getPointIndexUnderCursor",value:function(t,n,r,o){for(var i=e.getPointsGlobalCoordinates(t),a=i.length;--a>-1;){var l=i[a];if((0,c.LW)(r,o,l[0],l[1])*n.value<e.POINT_HANDLE_SIZE+1)return a}return-1}},{key:"createPointAt",value:function(e,t,n,r){var o=(0,c.wC)(t,n,r),a=(0,s.qf)(e),l=(0,i.Z)(a,4),u=l[0],d=l[1],f=(u+l[2])/2,p=(d+l[3])/2,h=(0,c.U1)(o[0],o[1],f,p,-e.angle),m=(0,i.Z)(h,2),g=m[0],v=m[1];return[g-e.x,v-e.y]}},{key:"getNormalizedPoints",value:function(e){var t=e.points,n=t[0][0],r=t[0][1];return{points:t.map((function(e,t){return[e[0]-n,e[1]-r]})),x:e.x+n,y:e.y+r}}},{key:"normalizePoints",value:function(t){(0,d.DR)(t,e.getNormalizedPoints(t))}},{key:"duplicateSelectedPoints",value:function(t){if(!t.editingLinearElement)return!1;var n=t.editingLinearElement,r=n.selectedPointsIndices,o=n.elementId,i=e.getElement(o);if(!i||null===r)return!1;var a=i.points,l=[],c=!1,s=-1,u=a.reduce((function(e,t,n){if(++s,e.push(t),r.includes(n)){var o=a[n+1];o||(c=!0),e.push(o?[(t[0]+o[0])/2,(t[1]+o[1])/2]:[t[0],t[1]]),l.push(s+1),++s}return e}),[]);if((0,d.DR)(i,{points:u}),c){var f=i.points[i.points.length-1];e.movePoints(i,[{index:i.points.length-1,point:[f[0]+30,f[1]+30]}])}return{appState:E(E({},t),{},{editingLinearElement:E(E({},t.editingLinearElement),{},{selectedPointsIndices:l})})}}},{key:"deletePoints",value:function(t,n){var r=0,o=0;if(n.includes(0)){var i=t.points.find((function(e,t){return!n.includes(t)}));i&&(r=i[0],o=i[1])}var a=t.points.reduce((function(e,t,i){return n.includes(i)||e.push(e.length?[t[0]-r,t[1]-o]:[0,0]),e}),[]);e._updatePoints(t,a,r,o)}},{key:"addPoints",value:function(t,n,o){var i=[].concat((0,r.Z)(t.points),(0,r.Z)(o.map((function(e){return e.point}))));e._updatePoints(t,i,0,0)}},{key:"movePoints",value:function(t,n,r){var o=t.points,i=0,a=0,l=n.find((function(e){return 0===e.index}));l&&(i=l.point[0]+o[l.index][0],a=l.point[1]+o[l.index][1]);var c=o.map((function(e,t){var r=n.find((function(e){return e.index===t}));if(r){if(l)return e;var c=r.point[0]-o[r.index][0],s=r.point[1]-o[r.index][1];return[e[0]+c,e[1]+s]}return i||a?[e[0]-i,e[1]-a]:e}));e._updatePoints(t,c,i,a,r)}},{key:"shouldAddMidpoint",value:function(t,n,r){if(!e.getElement(t.elementId))return!1;var o=t.pointerDownState.segmentMidpoint;if(o.added||null===o.value||null===o.index||null===t.pointerDownState.origin)return!1;var i=t.pointerDownState.origin,a=(0,c.LW)(i.x,i.y,n.x,n.y);return!(!r.editingLinearElement&&a<y.f/r.zoom.value)}},{key:"addMidpoint",value:function(t,n,o){var i=e.getElement(t.elementId);if(i){var a=t.pointerDownState.segmentMidpoint,l={pointerDownState:t.pointerDownState,selectedPointsIndices:t.selectedPointsIndices},c=e.createPointAt(i,n.x,n.y,o.gridSize),s=[].concat((0,r.Z)(i.points.slice(0,a.index)),[c],(0,r.Z)(i.points.slice(a.index)));return(0,d.DR)(i,{points:s}),l.pointerDownState=E(E({},t.pointerDownState),{},{segmentMidpoint:E(E({},t.pointerDownState.segmentMidpoint),{},{added:!0}),lastClickedPoint:a.index}),l.selectedPointsIndices=[a.index],l}}},{key:"_updatePoints",value:function(e,t,n,r,o){var i=(0,u.Ut)(e,t),a=(0,u.Ut)(e,e.points),l=(i[0]+i[2])/2,s=(i[1]+i[3])/2,f=(a[0]+a[2])/2-l,p=(a[1]+a[3])/2-s,h=(0,c.U1)(n,r,f,p,e.angle);(0,d.DR)(e,E(E({},o),{},{points:t,x:e.x+h[0],y:e.y+h[1]}))}},{key:"_getShiftLockedDelta",value:function(t,n,r,o){var a=e.getPointGlobalCoordinates(t,n),l=(0,c.wC)(r[0],r[1],o),u=(0,i.Z)(l,2),d=u[0],f=u[1],p=(0,s.o4)(a[0],a[1],d,f),h=p.width,m=p.height;return(0,c.xj)([h,m],[0,0],-t.angle)}}]),e}();S.POINT_HANDLE_SIZE=10,S.getEditorMidPoints=function(e,t){var n=(0,v.WJ)(e);return!t.editingLinearElement&&e.points.length>2&&!n?[]:(j.version===e.version&&j.zoom===t.zoom.value||S.updateEditorMidPointsCache(e,t),j.points)},S.updateEditorMidPointsCache=function(e,t){for(var n=S.getPointsGlobalCoordinates(e),r=0,o=[];r<n.length-1;)if(S.isSegmentTooShort(e,e.points[r],e.points[r+1],t.zoom))o.push(null),r++;else{var i=S.getSegmentMidPoint(e,n[r],n[r+1],r+1);o.push(i),r++}j.points=o,j.version=e.version,j.zoom=t.zoom.value},S.getSegmentMidpointHitCoords=function(e,t,n){var r=e.elementId,o=S.getElement(r);if(!o)return null;if(S.getPointIndexUnderCursor(o,n.zoom,t.x,t.y)>=0)return null;if(S.getPointsGlobalCoordinates(o).length>=3&&!n.editingLinearElement)return null;var i=S.POINT_HANDLE_SIZE/n.zoom.value,a=e.segmentMidPointHoveredCoords;if(a&&(0,c.LW)(a[0],a[1],t.x,t.y)<=i)return a;for(var l=0,s=S.getEditorMidPoints(o,n);l<s.length;){if(null!==s[l])if((0,c.LW)(s[l][0],s[l][1],t.x,t.y)<=i)return s[l];l++}return null},S.getBoundTextElementPosition=function(e,t){var n=S.getPointsGlobalCoordinates(e);n.length<2&&(0,d.DR)(t,{isDeleted:!0});var r=0,o=0;if(e.points.length%2==1){var i=Math.floor(e.points.length/2),a=S.getPointGlobalCoordinates(e,e.points[i]);r=a[0]-t.width/2,o=a[1]-t.height/2}else{var l=e.points.length/2-1,s=j.points[l];2===e.points.length&&(s=(0,c.H5)(n[0],n[1])),s&&j.version===e.version||(s=S.getSegmentMidPoint(e,n[l],n[l+1],l+1)),r=s[0]-t.width/2,o=s[1]-t.height/2}return{x:r,y:o}},S.getMinMaxXYWithBoundText=function(e,t,n){var r=(0,i.Z)(t,4),o=r[0],a=r[1],l=r[2],s=r[3],u=(o+l)/2,d=(a+s)/2,f=S.getBoundTextElementPosition(e,n),p=f.x,h=f.y,m=p+n.width,g=h+n.height,v=(0,c.xj)([o,a],[u,d],e.angle),b=(0,c.xj)([l,a],[u,d],e.angle),y=(0,c.xj)([p,h],[u,d],-e.angle),x=(0,c.xj)([m,h],[u,d],-e.angle),w=(0,c.xj)([p,g],[u,d],-e.angle),k=(0,c.xj)([m,g],[u,d],-e.angle);return v[0]<b[0]&&v[1]>=b[1]?(o=Math.min(o,w[0]),l=Math.max(l,Math.max(x[0],k[0])),a=Math.min(a,y[1]),s=Math.max(s,k[1])):v[0]>=b[0]&&v[1]>b[1]?(o=Math.min(o,k[0]),l=Math.max(l,Math.max(y[0],x[0])),a=Math.min(a,w[1]),s=Math.max(s,x[1])):v[0]>=b[0]?(o=Math.min(o,x[0]),l=Math.max(l,w[0]),a=Math.min(a,k[1]),s=Math.max(s,y[1])):v[1]<=b[1]&&(o=Math.min(o,Math.min(x[0],y[0])),l=Math.max(l,k[0]),a=Math.min(a,x[1]),s=Math.max(s,w[1])),[o,a,l,s,u,d]},S.getElementAbsoluteCoords=function(e){var t,n,r,o,a,l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.points.length<2||!(0,b.R2)(e)){var c=e.points.reduce((function(e,t){var n=(0,i.Z)(t,2),r=n[0],o=n[1];return e.minY=Math.min(e.minY,o),e.minX=Math.min(e.minX,r),e.maxX=Math.max(e.maxX,r),e.maxY=Math.max(e.maxY,o),e}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}),s=c.minX,d=c.minY,f=c.maxX,p=c.maxY;n=s+e.x,r=d+e.y,o=f+e.x,a=p+e.y}else{var h=(0,b.R2)(e),m=(0,u.CM)(h[0]),g=(0,u.IX)(m),y=(0,i.Z)(g,4),x=y[0],w=y[1],k=y[2],E=y[3];n=x+e.x,r=w+e.y,o=k+e.x,a=E+e.y}var j=(n+o)/2,O=(r+a)/2;if(t=[n,r,o,a,j,O],!l)return t;var _=(0,v.WJ)(e);return _&&(t=S.getMinMaxXYWithBoundText(e,[n,r,o,a],_)),t};var O=function(e){var t=(0,r.Z)(new Set(e.filter((function(e){return null!==e&&-1!==e}))));return(t=t.sort((function(e,t){return e-t}))).length?t:null}},1935:function(e,t,n){"use strict";n.d(t,{BE:function(){return p},DR:function(){return f},ZP:function(){return h}});var r=n(6655),o=n(7169),i=n(3063),a=n(1564),l=n(5001),c=n(6954),s=n(6340);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e,t){var n,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=!1,f=t,p=f.points,h=f.fileId;for(var m in void 0!==p&&(t=d(d({},(0,l.k)(p)),t)),t){var g=t[m];if(void 0!==g){if(e[m]===g&&("object"!==(0,r.Z)(g)||null===g||"groupIds"===m||"scale"===m))continue;if("scale"===m){var v=e[m],b=g;if(v[0]===b[0]&&v[1]===b[1])continue}else if("points"===m){var y=e[m],x=g;if(y.length===x.length){for(var w=!1,k=y.length;--k;){var E=y[k],j=x[k];if(E[0]!==j[0]||E[1]!==j[1]){w=!0;break}}if(!w)continue}}e[m]=g,u=!0}}if(!u)return e;(void 0===t.height&&void 0===t.width&&void 0===h&&void 0===p||(0,i.bI)(e),e.version++,e.versionNonce=(0,c.LU)(),e.updated=(0,s.C3)(),o)&&(null===(n=a.Z.getScene(e))||void 0===n||n.informMutation());return e},p=function(e,t){var n=!1;for(var o in t){var i=t[o];if(void 0!==i){if(e[o]===i&&("object"!==(0,r.Z)(i)||null===i))continue;n=!0}}return n?d(d(d({},e),t),{},{updated:(0,s.C3)(),version:e.version+1,versionNonce:(0,c.LU)()}):e},h=function(e,t){return e.version=(null!=t?t:e.version)+1,e.versionNonce=(0,c.LU)(),e.updated=(0,s.C3)(),e}},2791:function(e,t,n){"use strict";n.d(t,{JZ:function(){return _},KE:function(){return P},N_:function(){return C},OL:function(){return D},Sy:function(){return L},Up:function(){return E},VL:function(){return S},_N:function(){return Z},vw:function(){return I},y8:function(){return T}});var r=n(6655),o=n(2577),i=n(7169),a=n(2726),l=n(6340),c=n(6954),s=n(1935),u=n(242),d=n(1047),f=n(6552),p=n(8925),h=n(5710),m=n(2335),g=n(1974),v=["x","y","strokeColor","backgroundColor","fillStyle","strokeWidth","strokeStyle","roughness","opacity","width","height","angle","groupIds","roundness","boundElements","link","locked"];function b(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k=function(e,t){var n,r,o=t.x,i=t.y,s=t.strokeColor,u=void 0===s?m.HN.strokeColor:s,d=t.backgroundColor,f=void 0===d?m.HN.backgroundColor:d,p=t.fillStyle,h=void 0===p?m.HN.fillStyle:p,g=t.strokeWidth,b=void 0===g?m.HN.strokeWidth:g,y=t.strokeStyle,x=void 0===y?m.HN.strokeStyle:y,w=t.roughness,k=void 0===w?m.HN.roughness:w,E=t.opacity,j=void 0===E?m.HN.opacity:E,S=t.width,O=void 0===S?0:S,_=t.height,C=void 0===_?0:_,P=t.angle,T=void 0===P?0:P,I=t.groupIds,M=void 0===I?[]:I,D=t.roundness,A=void 0===D?null:D,L=t.boundElements,Z=void 0===L?null:L,R=t.link,z=void 0===R?null:R,N=t.locked,B=void 0===N?m.HN.locked:N,H=(0,a.Z)(t,v);return{id:H.id||(0,c.kb)(),type:e,x:o,y:i,width:O,height:C,angle:T,strokeColor:u,backgroundColor:f,fillStyle:h,strokeWidth:b,strokeStyle:x,roughness:k,opacity:j,groupIds:M,roundness:A,seed:null!==(n=H.seed)&&void 0!==n?n:(0,c.LU)(),version:H.version||1,versionNonce:null!==(r=H.versionNonce)&&void 0!==r?r:0,isDeleted:!1,boundElements:Z,updated:(0,l.C3)(),link:z,locked:B}},E=function(e){return k(e.type,e)},j=function(e,t){return{x:"center"===e.textAlign?t.width/2:"right"===e.textAlign?t.width:0,y:"middle"===e.verticalAlign?t.height/2:0}},S=function(e){var t=e.fontFamily||m.rk,n=e.fontSize||m.n5,r=e.lineHeight||(0,h.PT)(t),o=(0,h.bG)(e.text),i=(0,h.X1)(o,(0,l.mO)({fontFamily:t,fontSize:n}),r),a=e.textAlign||m.Hg,c=e.verticalAlign||m.hs,u=j({textAlign:a,verticalAlign:c},i);return(0,s.BE)(w(w({},k("text",e)),{},{text:o,fontSize:n,fontFamily:t,textAlign:a,verticalAlign:c,x:e.x-u.x,y:e.y-u.y,width:i.width,height:i.height,baseline:i.baseline,containerId:e.containerId||null,originalText:o,lineHeight:r}),{})},O=function(e,t){var n,r,i=(0,h.tl)(e),a=(0,h.X1)(t,(0,l.mO)(e),e.lineHeight),c=a.width,u=a.height,v=a.baseline,b=e.textAlign,y=e.verticalAlign;if("center"!==b||y!==m.oX.MIDDLE||e.containerId){var x=(0,d.qf)(e),w=(0,o.Z)(x,4),k=w[0],E=w[1],S=w[2],O=w[3],_=(0,p.wC)(e,c,u,!1),C=(0,o.Z)(_,4),P=(k-C[0])/2,T=(E-C[1])/2,I=(S-C[2])/2,M=(O-C[3])/2,D=(0,f.yq)({s:!0,e:"center"===b||"left"===b,w:"center"===b||"right"===b},e.x,e.y,e.angle,P,T,I,M),A=(0,o.Z)(D,2);n=A[0],r=A[1]}else{var L=(0,h.X1)(e.text,(0,l.mO)(e),e.lineHeight),Z=j(e,{width:c-L.width,height:u-L.height});n=e.x-Z.x,r=e.y-Z.y}if(i){var R=(0,h.S)(e),z=(0,h.HE)(i),N=z.height,B=z.width;u>N-2*R&&(N=u+2*R),c>B-2*R&&(B=c+2*R),(0,g.Yv)(i)||N===z.height&&B===z.width||(0,s.DR)(i,{height:N,width:B})}return{width:c,height:u,baseline:v,x:Number.isFinite(n)?n:e.x,y:Number.isFinite(r)?r:e.y}},_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.text;if(!e.isDeleted){var n=(0,h.tl)(e);n&&(t=(0,h.lD)(t,(0,l.mO)(e),(0,h.iZ)(n)));var r=O(e,t);return w({text:t},r)}},C=function(e,t){t.text;var n=t.isDeleted,r=t.originalText;return(0,s.BE)(e,w({originalText:r,isDeleted:null!=n?n:e.isDeleted},_(e,r)))},P=function(e){return w(w({},k(e.type,e)),{},{points:e.points||[],pressures:[],simulatePressure:e.simulatePressure,lastCommittedPoint:null})},T=function(e){return w(w({},k(e.type,e)),{},{points:e.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:e.startArrowhead,endArrowhead:e.endArrowhead})},I=function(e){var t,n,r;return w(w({},k("image",e)),{},{strokeColor:"transparent",status:null!==(t=e.status)&&void 0!==t?t:"pending",fileId:null!==(n=e.fileId)&&void 0!==n?n:null,scale:null!==(r=e.scale)&&void 0!==r?r:[1,1]})},M=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(null==t||"object"!==(0,r.Z)(t))return t;var o=Object.prototype.toString.call(t);if("[object Object]"===o){var i="function"==typeof t.constructor?Object.create(Object.getPrototypeOf(t)):{};for(var a in t)if(t.hasOwnProperty(a)){if(0===n&&("shape"===a||"canvas"===a))continue;i[a]=e(t[a],n+1)}return i}if(Array.isArray(t)){for(var l=t.length,c=new Array(l);l--;)c[l]=e(t[l],n+1);return c}return t},D=function(e){return M(e)},A=function(e){if((0,l.h2)()&&e){var t,n,r="".concat(e,"_copy");return null!==(t=window.h)&&void 0!==t&&null!==(n=t.app)&&void 0!==n&&n.getSceneElementsIncludingDeleted().find((function(e){return e.id===r}))&&(r+="_copy"),r}return(0,c.kb)()},L=function(e,t,n,r){var o=D(n);return o.id=A(o.id),o.boundElements=null,o.updated=(0,l.C3)(),o.seed=(0,c.LU)(),o.groupIds=(0,u.Qy)(o.groupIds,e,(function(e){return t.has(e)||t.set(e,A(e)),t.get(e)})),r&&(o=Object.assign(o,r)),o},Z=function(e,t){var n,r=[],o=(0,l.xn)(e),i=new Map,a=function(e){if(i.has(e))return i.get(e);if(o.has(e)){var t=A(e);return i.set(e,t),t}return null},u=new Map,d=b(e);try{for(d.s();!(n=d.n()).done;){var f=n.value,p=M(f);if(p.id=a(f.id),null!=t&&t.randomizeSeed&&(p.seed=(0,c.LU)(),(0,s.ZP)(p)),p.groupIds&&(p.groupIds=p.groupIds.map((function(e){return u.has(e)||u.set(e,A(e)),u.get(e)}))),"containerId"in p&&p.containerId){var h=a(p.containerId);p.containerId=h}if("boundElements"in p&&p.boundElements&&(p.boundElements=p.boundElements.reduce((function(e,t){var n=a(t.id);return n&&e.push(w(w({},t),{},{id:n})),e}),[])),"endBinding"in p&&p.endBinding){var m=a(p.endBinding.elementId);p.endBinding=m?w(w({},p.endBinding),{},{elementId:m}):null}if("startBinding"in p&&p.startBinding){var g=a(p.startBinding.elementId);p.startBinding=g?w(w({},p.startBinding),{},{elementId:g}):null}r.push(p)}}catch(e){d.e(e)}finally{d.f()}return r}},8634:function(e,t,n){"use strict";n.d(t,{LW:function(){return b},T:function(){return _},l2:function(){return E},vY:function(){return y},xx:function(){return O}});var r=n(1930),o=n(7169),i=n(2577),a=n(2335),l=n(5001),c=n(6552),s=n(8925),u=n(1974),d=n(1935),f=n(6340),p=n(8290),h=n(1564),m=n(5710);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=function(e){return e>=2*Math.PI?e-2*Math.PI:e},y=function(e,t,n,r,o,a,l,c,s,d,f){if(1===n.length){var h=(0,i.Z)(n,1)[0];return"rotation"===t?(x(h,c,s,o,e.originalElements),(0,p.Ww)(h)):!(0,u.iB)(h)||"nw"!==t&&"ne"!==t&&"sw"!==t&&"se"!==t?t&&E(e.originalElements,l,h,t,a,c,s):(k(h,t,a,c,s),(0,p.Ww)(h)),!0}if(n.length>1){if("rotation"===t)return S(e,n,c,s,o,d,f),!0;if("nw"===t||"ne"===t||"sw"===t||"se"===t)return j(e,n,t,a,c,s),!0}return!1},x=function(e,t,n,r,o){var l=(0,s.qf)(e),c=(0,i.Z)(l,4),f=c[0],p=c[1],g=(f+c[2])/2,v=(p+c[3])/2,y=5*Math.PI/2+Math.atan2(n-v,t-g);r&&(y+=a.ay/2,y-=y%a.ay),y=b(y);var x=(0,m.xB)(e);if((0,d.DR)(e,{angle:y}),x){var w,k=null===(w=h.Z.getScene(e))||void 0===w?void 0:w.getElement(x);k&&!(0,u.Yv)(e)&&(0,d.DR)(k,{angle:y})}},w=function(e,t,n){var r=e.width;if((0,u.Xh)(e)){var o=(0,m.tl)(e);o&&(r=(0,m.iZ)(o))}var i=e.fontSize*(t/r);if(i<1)return null;var a=(0,m.X1)(e.text,(0,f.mO)({fontSize:i,fontFamily:e.fontFamily}),e.lineHeight);return{size:i,baseline:a.baseline+(n-a.height)}},k=function(e,t,n,r,o){var a,l=(0,s.qf)(e),u=(0,i.Z)(l,4),f=u[0],p=u[1],h=u[2],m=u[3],g=(f+h)/2,v=(p+m)/2,b=(0,c.U1)(r,o,g,v,-e.angle),y=(0,i.Z)(b,2),x=y[0],k=y[1];switch(t){case"se":a=Math.max((x-f)/(h-f),(k-p)/(m-p));break;case"nw":a=Math.max((h-x)/(h-f),(m-k)/(m-p));break;case"ne":a=Math.max((x-f)/(h-f),(m-k)/(m-p));break;case"sw":a=Math.max((h-x)/(h-f),(k-p)/(m-p))}if(a>0){var E=e.width*a,j=e.height*a,S=w(e,E,j);if(null===S)return;var O=(0,s.wC)(e,E,j,!1),_=(0,i.Z)(O,4),C=(f-_[0])/2,P=(p-_[1])/2,T=(h-_[2])/2,I=(m-_[3])/2,M=(0,c.yq)(function(e,t){return{n:/^(n|ne|nw)$/.test(e)||t&&/^(s|se|sw)$/.test(e),s:/^(s|se|sw)$/.test(e)||t&&/^(n|ne|nw)$/.test(e),w:/^(w|nw|sw)$/.test(e)||t&&/^(e|ne|se)$/.test(e),e:/^(e|ne|se)$/.test(e)||t&&/^(w|nw|sw)$/.test(e)}}(t,n),e.x,e.y,e.angle,C,P,T,I),D=(0,i.Z)(M,2),A=D[0],L=D[1];(0,d.DR)(e,{fontSize:S.size,width:E,height:j,baseline:S.baseline,x:A,y:L})}},E=function(e,t,n,o,a,h,g){var b=e.get(n.id),y=(0,s.wC)(b,b.width,b.height,!0),x=(0,i.Z)(y,4),k=[x[0],x[1]],E=[x[2],x[3]],j=(0,c.H5)(k,E),S=(0,c.xj)([h,g],j,-b.angle),O=(0,s.wC)(n,n.width,n.height,!0),_=(0,i.Z)(O,4),C=_[0],P=_[1],T=_[2]-C,I=_[3]-P,M=(E[0]-k[0])/T,D=(E[1]-k[1])/I,A={},L=(0,m.WJ)(n);o.includes("e")&&(M=(S[0]-k[0])/T),o.includes("s")&&(D=(S[1]-k[1])/I),o.includes("w")&&(M=(E[0]-S[0])/T),o.includes("n")&&(D=(E[1]-S[1])/I);var Z=b.width,R=b.height,z=n.width*M,N=n.height*D;if(a&&(z=2*z-Z,N=2*N-R),t){var B=Math.abs(z)/Z,H=Math.abs(N)/R;if(1===o.length&&(N*=B,z*=H),2===o.length){var W=Math.max(B,H);z=Z*W*Math.sign(z),N=R*W*Math.sign(N)}}if(L){var F=e.get(L.id);if(F&&(A={fontSize:F.fontSize,baseline:F.baseline}),t){var U=v(v({},n),{},{width:z,height:N}),K=w(L,(0,m.iZ)(U),(0,m.D9)(U,L));if(null===K)return;A={fontSize:K.size,baseline:K.baseline}}else{var Y=(0,m.AT)((0,f.mO)(L),L.lineHeight),V=(0,m.w_)(L.fontSize,L.lineHeight);z=Math.ceil(Math.max(z,Y)),N=Math.ceil(Math.max(N,V))}}var G=(0,s.wC)(b,z,N,!0),X=(0,i.Z)(G,4),q=X[0],$=X[1],J=X[2],Q=X[3],ee=J-q,te=Q-$,ne=[].concat(k);if(["n","w","nw"].includes(o)&&(ne=[E[0]-Math.abs(ee),E[1]-Math.abs(te)]),"ne"===o){var re=[k[0],E[1]];ne=[re[0],re[1]-Math.abs(te)]}if("sw"===o){var oe=[E[0],k[1]];ne=[oe[0]-Math.abs(ee),oe[1]]}t&&(["s","n"].includes(o)&&(ne[0]=j[0]-ee/2),["e","w"].includes(o)&&(ne[1]=j[1]-te/2)),z<0&&(o.includes("e")&&(ne[0]-=Math.abs(ee)),o.includes("w")&&(ne[0]+=Math.abs(ee))),N<0&&(o.includes("s")&&(ne[1]-=Math.abs(te)),o.includes("n")&&(ne[1]+=Math.abs(te))),a&&(ne[0]=j[0]-Math.abs(ee)/2,ne[1]=j[1]-Math.abs(te)/2);var ie,ae,le=b.angle,ce=(0,c.xj)(ne,j,le),se=[ne[0]+Math.abs(ee)/2,ne[1]+Math.abs(te)/2],ue=(0,c.xj)(se,j,le);ne=(0,c.xj)(ce,ue,-le),((0,u.bt)(n)||(0,u.F9)(n))&&(ie=(0,l.z)(1,N,b.points,!0),ae=(0,l.z)(0,z,ie,!0));var de=(0,r.Z)(ne);de[0]+=b.x-q,de[1]+=b.y-$;var fe={width:Math.abs(z),height:Math.abs(N),x:de[0],y:de[1],points:ae};"scale"in n&&"scale"in b&&(0,d.DR)(n,{scale:[(Math.sign(J-b.x)||b.scale[0])*b.scale[0],(Math.sign(Q-b.y)||b.scale[1])*b.scale[1]]}),0!==fe.width&&0!==fe.height&&Number.isFinite(fe.x)&&Number.isFinite(fe.y)&&((0,p.Ww)(n,{newSize:{width:fe.width,height:fe.height}}),(0,d.DR)(n,fe),L&&null!=A&&(0,d.DR)(L,{fontSize:A.fontSize,baseline:A.baseline}),(0,m.RB)(n,o))},j=function(e,t,n,r,o,a){var c=t.reduce((function(t,n){var r=e.originalElements.get(n.id);return r&&t.push({orig:r,latest:n}),t}),[]),f=(0,s.v2)(c.map((function(e){return e.orig}))),h=f.minX,g=f.minY,b=f.maxX,y=f.maxY,x=f.midX,k=f.midY,E=n,j=r?[x,k]:{ne:[h,y],se:[h,g],sw:[b,g],nw:[b,y]}[E],S=(0,i.Z)(j,2),O=S[0],_=S[1],C={ne:[o>=O,a<=_],se:[o>=O,a>=_],sw:[o<=O,a>=_],nw:[o<=O,a<=_]}[E].map((function(e){return e?1:-1})),P=(0,i.Z)(C,2),T=P[0],I=P[1];if(!(T<0&&I<0)){var M=Math.max(T*Math.abs(o-O)/(b-h),I*Math.abs(a-_)/(y-g))*(r?2:1);0!==M&&c.forEach((function(e){var t=e.orig.width*M,r=e.orig.height*M,o=O+(e.orig.x-O)*M,i=_+(e.orig.y-_)*M,a=function(e,t,n,r){return(0,u.bt)(e)||(0,u.F9)(e)?{points:(0,l.z)(0,t,(0,l.z)(1,n,e.points,r),r)}:{}}(e.orig,t,r,!1),c=v({width:t,height:r,x:o,y:i},a),s=null,f=(0,m.WJ)(e.latest);if(f||(0,u.iB)(e.orig)){var h=v(v({},e.latest),{},{width:t,height:r}),g=w(null!=f?f:e.orig,f?(0,m.iZ)(h):h.width,f?(0,m.D9)(h,f):h.height);if(!g)return;(0,u.iB)(e.orig)&&(c.fontSize=g.size,c.baseline=g.baseline),f&&(s={fontSize:g.size,baseline:g.baseline})}(0,p.Ww)(e.latest,{newSize:{width:t,height:r}}),(0,d.DR)(e.latest,c),f&&s&&((0,d.DR)(f,s),(0,m.RB)(e.latest,n))}))}},S=function(e,t,n,r,o,l,f){var p=5*Math.PI/2+Math.atan2(r-f,n-l);o&&(p+=a.ay/2,p-=p%a.ay),t.forEach((function(t){var n,r,o=(0,s.qf)(t),a=(0,i.Z)(o,4),g=a[0],v=a[1],y=(g+a[2])/2,x=(v+a[3])/2,w=null!==(n=null===(r=e.originalElements.get(t.id))||void 0===r?void 0:r.angle)&&void 0!==n?n:t.angle,k=(0,c.U1)(y,x,l,f,p+w-t.angle),E=(0,i.Z)(k,2),j=E[0],S=E[1];(0,d.DR)(t,{x:t.x+(j-y),y:t.y+(S-x),angle:b(p+w)});var O=(0,m.xB)(t);if(O){var _,C=null===(_=h.Z.getScene(t))||void 0===_?void 0:_.getElement(O);C&&!(0,u.Yv)(t)&&(0,d.DR)(C,{x:C.x+(j-y),y:C.y+(S-x),angle:b(p+w)})}}))},O=function(e,t,n,r){var o=1===t.length?(0,s.qf)(t[0]):(0,s.KP)(t),a=(0,i.Z)(o,4),l=a[0],u=a[1],d=a[2],f=a[3],p=(l+d)/2,h=(u+f)/2,m=1===t.length?t[0].angle:0,g=(0,c.U1)(n,r,p,h,-m),v=(0,i.Z)(g,2);switch(n=v[0],r=v[1],e){case"n":return(0,c.U1)(n-(l+d)/2,r-u,0,0,m);case"s":return(0,c.U1)(n-(l+d)/2,r-f,0,0,m);case"w":return(0,c.U1)(n-l,r-(u+f)/2,0,0,m);case"e":return(0,c.U1)(n-d,r-(u+f)/2,0,0,m);case"nw":return(0,c.U1)(n-l,r-u,0,0,m);case"ne":return(0,c.U1)(n-d,r-u,0,0,m);case"sw":return(0,c.U1)(n-l,r-f,0,0,m);case"se":return(0,c.U1)(n-d,r-f,0,0,m);default:return[0,0]}},_=function(e,t){var n=(0,i.Z)(t.points,2),r=(0,i.Z)(n[1],2),o=r[0],a=r[1];return"nw"===e&&(o<0||a<0)||"ne"===e&&o>=0||"sw"===e&&o<=0||"se"===e&&(o>0||a>0)?"end":"origin"}},5710:function(e,t,n){"use strict";n.d(t,{$2:function(){return P},AT:function(){return z},D9:function(){return te},FE:function(){return O},HE:function(){return F},H_:function(){return Y},NS:function(){return Q},OW:function(){return q},P7:function(){return j},PT:function(){return oe},R8:function(){return C},RB:function(){return S},Rg:function(){return T},S:function(){return V},TP:function(){return U},WJ:function(){return H},X1:function(){return _},Zr:function(){return J},aV:function(){return X},bG:function(){return w},cn:function(){return G},cw:function(){return K},eB:function(){return ne},iZ:function(){return ee},lD:function(){return L},mY:function(){return D},oN:function(){return E},tl:function(){return W},w_:function(){return I},xB:function(){return B}});var r,o=n(2577),i=n(1930),a=n(7169),l=n(6340),c=n(1935),s=n(2335),u=n(1564),d=n(1047),f=n(1974),p=n(6938),h=n(75),m=n(2325),g=n(6906);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y,x,w=function(e){return e.replace(/\t/g," ").replace(/\r?\n|\r/g,"\n")},k=function(e){return w(e).split("\n")},E=function(e,t){var n=void 0,r={x:e.x,y:e.y,text:e.text,width:e.width,height:e.height,baseline:e.baseline};r.text=e.text,t&&(n=ee(t),r.text=L(e.originalText,(0,l.mO)(e),n));var o=_(r.text,(0,l.mO)(e),e.lineHeight);if(r.width=o.width,r.height=o.height,r.baseline=o.baseline,t){var i=F(t),a=te(t,e),s=i.height;o.height>a&&(s=Q(o.height,t.type),(0,c.DR)(t,{height:s}),(0,g.h_)(t.id,s));var u=b(b({},e),r),d=O(t,u),f=d.x,p=d.y;r.x=f,r.y=p}(0,c.DR)(e,r)},j=function(e,t,n){var r=(0,l.xn)(e);t.forEach((function(e){var t=n.get(e.id),o=B(e);if(o){var i=n.get(o);if(i){var a=r.get(t);a&&(0,c.DR)(a,{boundElements:(e.boundElements||[]).filter((function(e){return e.id!==i&&e.id!==o})).concat({type:"text",id:i})});var l=r.get(i);l&&(0,d.iB)(l)&&(0,c.DR)(l,{containerId:a?t:null})}}}))},S=function(e,t){var n=B(e);if(n){(0,g.kT)(e.id);var r=u.Z.getScene(e).getElement(n);if(r&&r.text){if(!e)return;var o=(r=u.Z.getScene(e).getElement(n)).text,i=r.height,a=r.width,s=F(e),d=ee(e),p=te(e,r),h=s.height,m=r.baseline;if("n"!==t&&"s"!==t){o&&(o=L(r.originalText,(0,l.mO)(r),d));var v=_(o,(0,l.mO)(r),r.lineHeight);i=v.height,a=v.width,m=v.baseline}if(i>p){var b=(h=Q(i,e.type))-s.height,y=(0,f.Yv)(e)||"ne"!==t&&"nw"!==t&&"n"!==t?e.y:e.y-b;(0,c.DR)(e,{height:h,y:y})}(0,c.DR)(r,{text:o,width:a,height:i,baseline:m}),(0,f.Yv)(e)||(0,c.DR)(r,O(e,r))}}},O=function(e,t){if((0,f.Yv)(e))return p._.getBoundTextElementPosition(e,t);var n,r=K(e),o=te(e,t),i=ee(e);return n=t.verticalAlign===s.oX.TOP?r.y:t.verticalAlign===s.oX.BOTTOM?r.y+(o-t.height):r.y+(o/2-t.height/2),{x:t.textAlign===s.I8.LEFT?r.x:t.textAlign===s.I8.RIGHT?r.x+(i-t.width):r.x+(i/2-t.width/2),y:n}},_=function(e,t,n){e=e.split("\n").map((function(e){return e||" "})).join("\n");var r=parseFloat(t),o=A(e,r,n);return{width:D(e,t),height:o,baseline:C(e,t,n)}},C=function(e,t,n,r){var o=document.createElement("div");o.style.position="absolute",o.style.whiteSpace="pre",o.style.font=t,o.style.minHeight="1em",r&&(o.style.overflow="hidden",o.style.wordBreak="break-word",o.style.whiteSpace="pre-wrap"),o.style.lineHeight=String(n),o.innerText=e,document.body.appendChild(o);var i=document.createElement("span");i.style.display="inline-block",i.style.overflow="hidden",i.style.width="1px",i.style.height="1px",o.appendChild(i);var a=i.offsetTop+i.offsetHeight,l=o.offsetHeight;if(s.G6){var c=A(e,parseFloat(t),n),u=parseFloat(t),d=A(e,Math.round(u),n);c>l&&(a+=c-d),l>c&&(a-=d-c)}return document.body.removeChild(o),a},P=function(e){var t=k(e.text).length;return e.height/t/e.fontSize},T=function(e,t){return e*t},I=function(e,t){return T(e,t)+2*s.gK},M=function(e,t){y||(y=document.createElement("canvas"));var n=y.getContext("2d");n.font=t;var r=n.measureText(e).width;return(0,l.h2)()?10*r:r},D=function(e,t){var n=k(e),r=0;return n.forEach((function(e){r=Math.max(r,M(e,t))})),r},A=function(e,t,n){var r=k(e).length;return T(t,n)*r},L=function(e,t,n){if(!Number.isFinite(n)||n<0)return e;var r=[],o=e.split("\n"),i=M(" ",t),a="",l=0,c=function(e){e.trim()&&r.push(e)},s=function(){a="",l=0};return o.forEach((function(e){if(D(e,t)<=n)r.push(e);else{var o=function(e){var t=e.split("-");return t.length>1&&t.forEach((function(e,n){n!==t.length-1&&(t[n]=e+="-")})),t.join(" ").split(" ")}(e);s();for(var u=0;u<o.length;){var d=M(o[u],t);if(d===n)c(o[u]),u++;else if(d>n){for(c(a),s();o[u].length>0;){var f=String.fromCodePoint(o[u].codePointAt(0)),p=Z.calculate(f,t);l+=p,o[u]=o[u].slice(f.length),l>=n?(c(a),a=f,l=p):a+=f}l+i>=n?(c(a),s()):a.endsWith("-")||(a+=" ",l+=i),u++}else for(;l<n&&u<o.length;){var h=o[u];if((l=M(a+h,t))>n){c(a),s();break}u++;var m=!h.endsWith("-");if(a+=h,m&&(a+=" "),l+i>=n){m?r.push(a.slice(0,-1)):r.push(a),s();break}}}" "===a.slice(-1)&&(a=a.slice(0,-1),c(a))}})),r.join("\n")},Z=(x={},{calculate:function(e,t){var n=e.charCodeAt(0);if(x[t]||(x[t]=[]),!x[t][n]){var r=M(e,t);x[t][n]=r}return x[t][n]},getCache:function(e){return x[e]}}),R="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(),z=function(e,t){var n=N(e);return 0===n?_(R.split("").join("\n"),e,t).width+2*s.gK:n+2*s.gK},N=function(e){var t=Z.getCache(e);if(!t)return 0;var n=t.filter((function(e){return void 0!==e}));return Math.max.apply(Math,(0,i.Z)(n))},B=function(e){var t,n,r;return null!=e&&null!==(t=e.boundElements)&&void 0!==t&&t.length&&(null==e||null===(n=e.boundElements)||void 0===n||null===(r=n.filter((function(e){return"text"===e.type}))[0])||void 0===r?void 0:r.id)||null},H=function(e){if(!e)return null;var t,n=B(e);return n&&(null===(t=u.Z.getScene(e))||void 0===t?void 0:t.getElement(n))||null},W=function(e){return e&&e.containerId&&(null===(t=u.Z.getScene(e))||void 0===t?void 0:t.getElement(e.containerId))||null;var t},F=function(e){return(0,f.Yv)(e)?{width:Math.max(e.width,300),height:e.height}:{width:e.width,height:e.height}},U=function(e,t){if(!(0,f.Yv)(e))return{x:e.x+e.width/2,y:e.y+e.height/2};var n=p._.getPointsGlobalCoordinates(e);if(n.length%2==1){var r=Math.floor(e.points.length/2),o=p._.getPointGlobalCoordinates(e,e.points[r]);return{x:o[0],y:o[1]}}var i=e.points.length/2-1,a=p._.getEditorMidPoints(e,t)[i];return a||(a=p._.getSegmentMidPoint(e,n[i],n[i+1],i+1)),{x:a[0],y:a[1]}},K=function(e){var t=s.gK,n=s.gK;return"ellipse"===e.type&&(t+=e.width/2*(1-Math.sqrt(2)/2),n+=e.height/2*(1-Math.sqrt(2)/2)),"diamond"===e.type&&(t+=e.width/4,n+=e.height/4),{x:e.x+t,y:e.y+n}},Y=function(e){var t=W(e);return!t||(0,f.Yv)(t)?e.angle:t.angle},V=function(e){var t=W(e);return t&&e?(0,f.Yv)(t)?8*s.gK:s.gK:0},G=function(e){return e.some((function(e){if((0,f.Xh)(e)){var t=W(e);return!(0,d.iB)(e)||!(0,f.Yv)(t)}return!1}))},X=function(e){return e.some((function(e){if((0,f.Xh)(e)){var t=W(e);return!(0,d.iB)(e)||!(0,f.Yv)(t)}return(0,d.iB)(e)}))},q=function(e,t,n,r){var i=(0,h.eD)(e,t);if(1===i.length)return(0,f.mG)(i[0],!1)?i[0]:null;for(var a=null,l=e.length-1;l>=0;--l)if(!e[l].isDeleted){var c=(0,d.qf)(e[l]),s=(0,o.Z)(c,4),u=s[0],p=s[1],g=s[2],v=s[3];if((0,f.Yv)(e[l])&&(0,m.Qu)(e[l],t,[n,r])){a=e[l];break}if(u<n&&n<g&&p<r&&r<v){a=e[l];break}}return(0,f.mG)(a,!1)?a:null},$=new Set(["rectangle","ellipse","diamond","image","arrow"]),J=function(e){return $.has(e.type)},Q=function(e,t){e=Math.ceil(e);var n=2*s.gK;return"ellipse"===t?Math.round((e+n)/Math.sqrt(2)*2):"arrow"===t?e+8*n:"diamond"===t?2*(e+n):e+n},ee=function(e){var t=F(e).width;return(0,f.Yv)(e)?t-8*s.gK*2:"ellipse"===e.type?Math.round(t/2*Math.sqrt(2))-2*s.gK:"diamond"===e.type?Math.round(t/2)-2*s.gK:t-2*s.gK},te=function(e,t){var n=F(e).height;return(0,f.Yv)(e)?n-8*s.gK*2<=0?t.height:n:"ellipse"===e.type?Math.round(n/2*Math.sqrt(2))-2*s.gK:"diamond"===e.type?Math.round(n/2)-2*s.gK:n-2*s.gK},ne=function(){return D(R,(0,l.mO)({fontSize:s.n5,fontFamily:s.rk}))>0},re=(r={},(0,a.Z)(r,s.ut.Virgil,1.25),(0,a.Z)(r,s.ut.Helvetica,1.15),(0,a.Z)(r,s.ut.Cascadia,1.2),r),oe=function(e){return e in re?re[e]:re[s.rk]}},6906:function(e,t,n){"use strict";n.d(t,{b_:function(){return O},eR:function(){return S},h_:function(){return E},kT:function(){return j}});var r=n(8950),o=n(7169),i=n(2577),a=n(2975),l=n.n(a),c=n(6066),s=n(6340),u=n(1564),d=n(1974),f=n(2335),p=n(1935),h=n(5710),m=n(6208),g=n(2416),v=n(6938),b=n(6665);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e,t,n,r,o,i){var a=r.zoom,l=180*n/Math.PI,c=e*(a.value-1)/2,s=t*(a.value-1)/2;return e>o&&1!==a.value&&(c=o*(a.value-1)/2),t>i&&1!==a.value&&(s=i*(a.value-1)/2),"translate(".concat(c,"px, ").concat(s,"px) scale(").concat(a.value,") rotate(").concat(l,"deg)")},k={},E=function(e,t){var n=k[e]||(k[e]={height:t});return n.height=t,n},j=function(e){k[e]&&delete k[e]},S=function(e){var t,n;return null!==(t=null===(n=k[e])||void 0===n?void 0:n.height)&&void 0!==t?t:null},O=function(e){var t=e.id,n=e.onChange,o=e.onSubmit,a=e.getViewportCoords,y=e.element,j=e.canvas,S=e.excalidrawContainer,O=e.app,_=function(){var e,n=O.state,r=null===(e=u.Z.getScene(y))||void 0===e?void 0:e.getElement(t);if(r){var o=r.textAlign,l=r.verticalAlign;if(r&&(0,d.iB)(r)){var c=r.x,m=r.y,g=(0,h.tl)(r),b=r.width,j=r.height,S=r.width,_=r.height;if(g&&r.containerId){if((0,d.Yv)(g)){var P=v._.getBoundTextElementPosition(g,r);c=P.x,m=P.y}var T,I=function(e,t){if(!t.style.fontFamily||!t.style.fontSize)return!1;var n=t.style.fontFamily.replace(/"/g,"");return(0,s.$g)({fontFamily:e.fontFamily})!==n||"".concat(e.fontSize,"px")!==t.style.fontSize}(r,C),M=(0,h.HE)(g),D=Number(C.style.height.slice(0,-2));if(D>0&&(_=D),I&&(_=r.height),I?T=E(g.id,M.height):(T=k[g.id])||(T=E(g.id,M.height)),b=(0,h.iZ)(g),j=(0,h.D9)(g,r),!(0,d.Yv)(g)&&_>j){var A=(0,h.NS)(_,g.type);return void(0,p.DR)(g,{height:A})}if(!(0,d.Yv)(g)&&M.height>T.height&&_<j){var L=(0,h.NS)(_,g.type);(0,p.DR)(g,{height:L})}else{var Z=(0,h.cw)(g);l===f.oX.MIDDLE&&((0,d.Yv)(g)||(m=Z.y+j/2-_/2)),l===f.oX.BOTTOM&&(m=Z.y+(j-_))}}var R=a(c,m),z=(0,i.Z)(R,2),N=z[0],B=z[1],H=C.selectionStart,W=C.selectionEnd,F=C.value.length;if(H===W&&W!==F){var U=F-W;C.selectionStart=C.value.length-U,C.selectionEnd=C.value.length-U}g?S+=.5:(b=(n.width-8-N)/n.zoom.value,S=Math.min(S,b));var K=r.lineHeight;f.G6&&(K=(0,h.$2)(x(x({},r),{},{fontSize:Math.round(r.fontSize)})));var Y=(n.height-B)/n.zoom.value;Object.assign(C.style,{font:(0,s.mO)(r),lineHeight:K,width:"".concat(S,"px"),height:"".concat(_,"px"),left:"".concat(N,"px"),top:"".concat(B,"px"),transform:w(S,_,(0,h.H_)(r),n,b,Y),textAlign:o,verticalAlign:l,color:r.strokeColor,opacity:r.opacity/100,filter:"var(--theme-filter)",maxHeight:"".concat(Y,"px")}),C.scrollTop=0,(0,s.h2)()&&(C.style.fontFamily=(0,s.$g)(r)),(0,p.DR)(r,{x:c,y:m})}}},C=document.createElement("textarea");C.dir="auto",C.tabIndex=0,C.dataset.type="wysiwyg",C.wrap="off",C.classList.add("excalidraw-wysiwyg");var P="pre",T="normal";(0,d.Xh)(y)&&(P="pre-wrap",T="break-word"),Object.assign(C.style,{position:"absolute",display:"inline-block",minHeight:"1em",backfaceVisibility:"hidden",margin:0,padding:0,border:0,outline:0,resize:"none",background:"transparent",overflow:"hidden",zIndex:"var(--zIndex-wysiwyg)",wordBreak:T,whiteSpace:P,overflowWrap:"break-word",boxSizing:"content-box"}),C.value=y.originalText,_(),n&&(C.onpaste=function(){var e=(0,r.Z)(l().mark((function e(t){var n,r,o,i,a,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.mQ)(t,!0);case 2:if((n=e.sent).text){e.next=5;break}return e.abrupt("return");case 5:if(r=(0,h.bG)(n.text)){e.next=8;break}return e.abrupt("return");case 8:o=(0,h.tl)(y),i=(0,s.mO)({fontSize:O.state.currentItemFontSize,fontFamily:O.state.currentItemFontFamily}),o&&(a=(0,h.lD)("".concat(C.value).concat(r),i,(0,h.iZ)(o)),c=(0,h.mY)(a,i),C.style.width="".concat(c,"px"));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C.oninput=function(){var e,r=null===(e=u.Z.getScene(y))||void 0===e?void 0:e.getElement(t),o=(0,s.mO)(r);if((0,d.Xh)(y)){var i=(0,h.tl)(y),a=(0,h.lD)((0,h.bG)(C.value),o,(0,h.iZ)(i)),l=(0,h.X1)(a,o,r.lineHeight),c=l.width,f=l.height;C.style.width="".concat(c,"px"),C.style.height="".concat(f,"px")}n((0,h.bG)(C.value))}),C.onkeydown=function(e){if(!e.shiftKey&&g.Lo.keyTest(e))e.preventDefault(),O.actionManager.executeAction(g.Lo),_();else if(!e.shiftKey&&g.CZ.keyTest(e))e.preventDefault(),O.actionManager.executeAction(g.CZ),_();else if(m.Tu.keyTest(e))O.actionManager.executeAction(m.Tu);else if(m.Zq.keyTest(e))O.actionManager.executeAction(m.Zq);else if(e.key===c.tW.ESCAPE)e.preventDefault(),R=!0,z();else if(e.key===c.tW.ENTER&&e[c.tW.CTRL_OR_CMD]){if(e.preventDefault(),e.isComposing||229===e.keyCode)return;R=!0,z()}else if(e.key===c.tW.TAB||e[c.tW.CTRL_OR_CMD]&&(e.code===c.aU.BRACKET_LEFT||e.code===c.aU.BRACKET_RIGHT)){if(e.preventDefault(),e.isComposing)return;e.shiftKey||e.code===c.aU.BRACKET_LEFT?A():D(),C.dispatchEvent(new Event("input"))}};var I=" ".repeat(4),M=new RegExp("^ {1,".concat(4,"}")),D=function(){var e=C.selectionStart,t=C.selectionEnd,n=L(),r=C.value;n.forEach((function(e){var t=r.slice(0,e),n=r.slice(e);r="".concat(t).concat(I).concat(n)})),C.value=r,C.selectionStart=e+4,C.selectionEnd=t+4*n.length},A=function(){var e=C.selectionStart,t=C.selectionEnd,n=L(),r=[],o=C.value;n.forEach((function(e){var t=o.slice(e,e+4).match(M);if(t){var n=o.slice(0,e),i=o.slice(e+t[0].length);o="".concat(n).concat(i),r.push(e)}})),C.value=o,r.length&&(e>r[r.length-1]?C.selectionStart=Math.max(e-4,r[r.length-1]):C.selectionStart=e,C.selectionEnd=Math.max(C.selectionStart,t-4*r.length))},L=function(){var e=C.selectionStart,t=C.selectionEnd,n=C.value,r=n.slice(0,e).match(/[^\n]*$/)[0].length;return e-=r,n.slice(e,t).split("\n").reduce((function(t,n,r,o){return t.concat(r?t[r-1]+o[r-1].length+1:e)}),[]).reverse()},Z=function(e){e.preventDefault(),e.stopPropagation()},R=!1,z=function(){var e;N();var t=null===(e=u.Z.getScene(y))||void 0===e?void 0:e.getElement(y.id);if(t){var n=C.value,r=(0,h.tl)(t);if(r){if(n=t.text,C.value.trim()){var i=(0,h.xB)(r);i&&i===y.id||(0,p.DR)(r,{boundElements:(r.boundElements||[]).concat({type:"text",id:y.id})})}else{var a;(0,p.DR)(r,{boundElements:null===(a=r.boundElements)||void 0===a?void 0:a.filter((function(e){return!(0,d.iB)(e)}))})}(0,h.oN)(t,r)}o({text:n,viaKeyboard:R,originalText:C.value})}},N=function(){F||(F=!0,C.onblur=null,C.oninput=null,C.onkeydown=null,U&&U.disconnect(),window.removeEventListener("resize",_),window.removeEventListener("wheel",Z,!0),window.removeEventListener("pointerdown",H),window.removeEventListener("pointerup",B),window.removeEventListener("blur",z),W(),C.remove())},B=function e(t){window.removeEventListener("pointerup",e);var n=null==t?void 0:t.target,r=n instanceof HTMLElement&&n.classList.contains("active-color");setTimeout((function(){if(C.onblur=z,r){var e=new MutationObserver((function(e,t){e.find((function(e){var t;return e.removedNodes.length>0&&void 0!==(null===(t=e.removedNodes[0].dataset)||void 0===t?void 0:t.radixPopperContentWrapper)}))&&(setTimeout((function(){C.focus()})),t.disconnect())}));e.observe(document.querySelector(".excalidraw-container"),{childList:!0})}r||C.focus()}))},H=function(e){var t=e.target instanceof HTMLElement&&e.target.classList.contains("active-color");((e.target instanceof HTMLElement||e.target instanceof SVGElement)&&e.target.closest(".".concat(f.$C.SHAPE_ACTIONS_MENU))&&!(0,s.s)(e.target)||t)&&(C.onblur=null,window.addEventListener("pointerup",B),window.addEventListener("blur",z))},W=u.Z.getScene(y).addCallback((function(){var e;_(),!(null===(e=document.activeElement)||void 0===e||!e.closest(".color-picker-content"))||C.focus()})),F=!1;C.select(),B();var U=null;j&&"ResizeObserver"in window?(U=new window.ResizeObserver((function(){_()}))).observe(j):window.addEventListener("resize",_),window.addEventListener("pointerdown",H),window.addEventListener("wheel",Z,{passive:!1,capture:!0}),null==S||S.querySelector(".excalidraw-textEditorContainer").appendChild(C)}},267:function(e,t,n){"use strict";n.d(t,{PC:function(){return g},kK:function(){return m},oY:function(){return v},ox:function(){return u}});var r=n(2577),o=n(8925),i=n(6552),a=n(1047),l=n(1974),c=n(3547),s={mouse:8,pen:16,touch:28},u={e:!0,s:!0,n:!0,w:!0},d={e:!0,s:!0,n:!0,w:!0},f={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},p={e:!0,s:!0,n:!0,w:!0},h=function(e,t,n,o,a,l,c){var s=(0,i.U1)(e+n/2,t+o/2,a,l,c),u=(0,r.Z)(s,2);return[u[0]-n/2,u[1]-o/2,n,o]},m=function(e,t,n,o){var i=(0,r.Z)(e,6),a=i[0],l=i[1],u=i[2],d=i[3],f=i[4],p=i[5],m=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},g=arguments.length>5&&void 0!==arguments[5]?arguments[5]:4,v=s[o],b=v/n.value,y=v/n.value,x=v/n.value,w=v/n.value,k=u-a,E=d-l,j=g/n.value,S=(v-2*c.Lu)/(2*n.value),O={nw:m.nw?void 0:h(a-j-x+S,l-j-w+S,b,y,f,p,t),ne:m.ne?void 0:h(u+j-S,l-j-w+S,b,y,f,p,t),sw:m.sw?void 0:h(a-j-x+S,d+j-S,b,y,f,p,t),se:m.se?void 0:h(u+j-S,d+j-S,b,y,f,p,t),rotation:m.rotation?void 0:h(a+k/2-b/2,l-j-w+S-16/n.value,b,y,f,p,t)},_=5*s.mouse/n.value;return Math.abs(k)>_&&(m.n||(O.n=h(a+k/2-b/2,l-j-w+S,b,y,f,p,t)),m.s||(O.s=h(a+k/2-b/2,d+j-S,b,y,f,p,t))),Math.abs(E)>_&&(m.w||(O.w=h(a-j-x+S,l+E/2-y/2,b,y,f,p,t)),m.e||(O.e=h(u+j-S,l+E/2-y/2,b,y,f,p,t))),O},g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mouse";if(e.locked)return{};var i={};if("freedraw"===e.type||(0,l.bt)(e)){if(2===e.points.length){var s=(0,r.Z)(e.points,2),u=s[1];0===u[0]||0===u[1]?i=p:u[0]>0&&u[1]<0?i=f:u[0]>0&&u[1]>0?i=p:u[0]<0&&u[1]>0?i=f:u[0]<0&&u[1]<0&&(i=p)}}else(0,a.iB)(e)&&(i=d);var h=(0,l.bt)(e)?c.Lu+8:c.Lu;return m((0,o.qf)(e,!0),e.angle,t,n,i,h)},v=function(e,t){if(t.editingLinearElement)return!1;if(e.length>1)return!0;var n=e[0];return!(0,l.bt)(n)||n.points.length>2}},1974:function(e,t,n){"use strict";n.d(t,{F9:function(){return l},Lx:function(){return p},Mn:function(){return f},QI:function(){return y},UQ:function(){return w},Xh:function(){return b},Xo:function(){return v},Yv:function(){return u},bt:function(){return s},dt:function(){return d},eK:function(){return x},f0:function(){return h},iB:function(){return a},mG:function(){return m},pC:function(){return i},r2:function(){return g},wi:function(){return o}});var r=n(2335),o=function(e){return!!e&&"image"===e.type&&!!e.fileId},i=function(e){return!!e&&"image"===e.type},a=function(e){return null!=e&&"text"===e.type},l=function(e){return null!=e&&c(e.type)},c=function(e){return"freedraw"===e},s=function(e){return null!=e&&d(e.type)},u=function(e){return null!=e&&"arrow"===e.type},d=function(e){return"arrow"===e||"line"===e},f=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null!=e&&(!e.locked||!0===t)&&p(e.type)},p=function(e){return"arrow"===e},h=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(null==e||e.locked&&!0!==t||"rectangle"!==e.type&&"diamond"!==e.type&&"ellipse"!==e.type&&"image"!==e.type&&("text"!==e.type||e.containerId))},m=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null!=e&&(!e.locked||!0===t)&&("rectangle"===e.type||"diamond"===e.type||"ellipse"===e.type||"image"===e.type||u(e))},g=function(e){return"text"===(null==e?void 0:e.type)||"diamond"===(null==e?void 0:e.type)||"rectangle"===(null==e?void 0:e.type)||"ellipse"===(null==e?void 0:e.type)||"arrow"===(null==e?void 0:e.type)||"freedraw"===(null==e?void 0:e.type)||"line"===(null==e?void 0:e.type)},v=function(e){var t;return m(e)&&!(null===(t=e.boundElements)||void 0===t||!t.some((function(e){return"text"===e.type})))},b=function(e){return null!==e&&"containerId"in e&&null!==e.containerId&&a(e)},y=function(e){return"rectangle"===e},x=function(e,t){return!(e!==r.a6.ADAPTIVE_RADIUS&&e!==r.a6.LEGACY||!y(t.type))||e===r.a6.PROPORTIONAL_RADIUS&&("line"===(n=t.type)||"arrow"===n||"diamond"===n);var n},w=function(e){return"arrow"===e.type||"line"===e.type||"diamond"===e.type?{type:r.a6.PROPORTIONAL_RADIUS}:"rectangle"===e.type?{type:r.a6.ADAPTIVE_RADIUS}:null}},6797:function(e,t,n){"use strict";n.d(t,{_:function(){return h},l:function(){return p}});var r=n(5169),o=n(8821),i=n(2248),a=n(7245),l=n(2312),c=n(5901);function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return u=s()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&(0,c.Z)(o,n.prototype),o},u.apply(null,arguments)}function d(e){var t="function"==typeof Map?new Map:void 0;return d=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,(0,l.Z)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,c.Z)(r,e)},d(e)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,l.Z)(e);if(t){var o=(0,l.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,a.Z)(this,n)}}var p=function(e){(0,i.Z)(n,e);var t=f(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Couldn't export canvas.",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CANVAS_ERROR";return(0,o.Z)(this,n),(e=t.call(this)).name=i,e.message=r,e}return(0,r.Z)(n)}(d(Error)),h=function(e){(0,i.Z)(n,e);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Request Aborted";return(0,o.Z)(this,n),t.call(this,e,"AbortError")}return(0,r.Z)(n)}(d(DOMException))},242:function(e,t,n){"use strict";n.d(t,{AI:function(){return j},F$:function(){return f},Fb:function(){return y},Nd:function(){return b},Qy:function(){return w},S_:function(){return k},YS:function(){return x},bO:function(){return g},h6:function(){return E},iE:function(){return v},iJ:function(){return m},yO:function(){return h},zq:function(){return p}});var r=n(1930),o=n(2577),i=n(7169),a=n(75),l=n(5710);function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e,t,n){var r=n.filter((function(t){return t.groupIds.includes(e)}));return r.length<2?t.selectedGroupIds[e]||t.editingGroupId===e?d(d({},t),{},{selectedGroupIds:d(d({},t.selectedGroupIds),{},(0,i.Z)({},e,!1)),editingGroupId:null}):t:d(d({},t),{},{selectedGroupIds:d(d({},t.selectedGroupIds),{},(0,i.Z)({},e,!0)),selectedElementIds:d(d({},t.selectedElementIds),Object.fromEntries(r.map((function(e){return[e.id,!0]}))))})},p=function(e,t){return null!=h(e,t)},h=function(e,t){return t.groupIds.filter((function(t){return t!==e.editingGroupId})).find((function(t){return e.selectedGroupIds[t]}))},m=function(e){return Object.entries(e.selectedGroupIds).filter((function(e){var t=(0,o.Z)(e,2);t[0];return t[1]})).map((function(e){var t=(0,o.Z)(e,2),n=t[0];t[1];return n}))},g=function(e,t){var n=d(d({},e),{},{selectedGroupIds:{}}),r=(0,a.eD)(t,e);if(!r.length)return d(d({},n),{},{editingGroupId:null});var o,i=c(r);try{for(i.s();!(o=i.n()).done;){var l=o.value.groupIds;if(e.editingGroupId){var s=l.indexOf(e.editingGroupId);s>-1&&(l=l.slice(0,s))}if(l.length>0){var u=l[l.length-1];n=f(u,n,t)}}}catch(e){i.e(e)}finally{i.f()}return n},v=function(e,t){return d(d({},e),{},{editingGroupId:t.groupIds.length?t.groupIds[0]:null,selectedGroupIds:{},selectedElementIds:(0,i.Z)({},t.id,!0)})},b=function(e,t){return e.groupIds.includes(t)},y=function(e,t){return e.filter((function(e){return b(e,t)}))},x=function(e,t){return e.groupIds.find((function(e){return t[e]}))},w=function(e,t,n){for(var o=(0,r.Z)(e),i=t?e.indexOf(t):-1,a=i>-1?i:e.length,l=0;l<a;l++)o[l]=n(o[l]);return o},k=function(e,t,n){var o=(0,r.Z)(e),i=n?o.indexOf(n):-1,a=i>-1?i:o.length;return o.splice(a,0,t),o},E=function(e,t){return e.filter((function(e){return!t[e]}))},j=function(e){var t=new Map;return e.forEach((function(e){var n=0===e.groupIds.length?e.id:e.groupIds[e.groupIds.length-1],o=t.get(n)||[],i=(0,l.WJ)(e);i&&o.push(i),t.set(n,[].concat((0,r.Z)(o),[e]))})),Array.from(t.values())}},8211:function(e,t,n){"use strict";n.d(t,{Fp:function(){return f},G3:function(){return b},Mj:function(){return p},QT:function(){return k},m0:function(){return v},t:function(){return x}});var r=n(8950),o=n(1930),i=n(2975),a=n.n(i),l=n(1463),c=n(4451),s=n(2335),u=n(9487),d=n(4739),f={code:"en",label:"English"},p=[f].concat((0,o.Z)([{code:"ar-SA",label:"العربية",rtl:!0},{code:"bg-BG",label:"Български"},{code:"ca-ES",label:"Català"},{code:"cs-CZ",label:"Česky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"Ελληνικά"},{code:"es-ES",label:"Español"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"فارسی",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Français"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"עברית",rtl:!0},{code:"hi-IN",label:"हिन्दी"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"日本語"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"Қазақ тілі"},{code:"ko-KR",label:"한국어"},{code:"ku-TR",label:"Kurdî"},{code:"lt-LT",label:"Lietuvių"},{code:"lv-LV",label:"Latviešu"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokmål"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"ਪੰਜਾਬੀ"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Português Brasileiro"},{code:"pt-PT",label:"Português"},{code:"ro-RO",label:"Română"},{code:"ru-RU",label:"Русский"},{code:"sk-SK",label:"Slovenčina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Slovenščina"},{code:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"vi-VN",label:"Tiếng Việt"},{code:"mr-IN",label:"मराठी"}].filter((function(e){return c[e.code]>=85})).sort((function(e,t){return e.label>t.label?1:-1})))),h="__test__";"production"===s.Vi.DEVELOPMENT&&p.unshift({code:h,label:"test language"},{code:"".concat(h,".rtl"),label:"‪test language (rtl)‬",rtl:!0});var m=f,g={},v=function(){var e=(0,r.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m=t,document.documentElement.dir=m.rtl?"rtl":"ltr",document.documentElement.lang=m.code,!t.code.startsWith(h)){e.next=7;break}g={},e.next=17;break;case 7:return e.prev=7,e.next=10,n(940)("./".concat(m.code,".json"));case 10:g=e.sent,e.next=17;break;case 13:e.prev=13,e.t0=e.catch(7),console.error("Failed to load language ".concat(t.code,":"),e.t0.message),g=l;case 17:u.e_.set(w,t.code);case 18:case"end":return e.stop()}}),e,null,[[7,13]])})));return function(t){return e.apply(this,arguments)}}(),b=function(){return m},y=function(e,t){for(var n=0;n<t.length;++n){var r=t[n];if(void 0===e[r])return;e=e[r]}if("string"==typeof e)return e},x=function(e,t,n){if(m.code.startsWith(h)){var r=t?"".concat(e,"(").concat(JSON.stringify(t).slice(1,-1),")"):e;return"‪[[".concat(r,"]]‬")}var o=e.split("."),i=y(g,o)||y(l,o)||n;if(void 0===i){var a="Can't find translation for ".concat(e);return console.warn(a),""}if(t)for(var c in t)i=i.replace("{{".concat(c,"}}"),String(t[c]));return i},w=(0,d.cn)(f.code),k=function(){var e=(0,d.Dv)(w,u.yE);return{t:x,langCode:e}}},9487:function(e,t,n){"use strict";n.d(t,{e_:function(){return i},yE:function(){return o}});var r=n(4739),o=(n(9787),Symbol()),i=(0,r.Vv)()},6066:function(e,t,n){"use strict";n.d(t,{E0:function(){return c},Ge:function(){return s},OA:function(){return l},Wl:function(){return a},aU:function(){return o},tW:function(){return i}});var r=n(2335),o={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",R:"KeyR"},i={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:r.Um?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",A:"a",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},a=function(e){return e===i.ARROW_LEFT||e===i.ARROW_RIGHT||e===i.ARROW_DOWN||e===i.ARROW_UP},l=function(e){return e.altKey},c=function(e){return e.shiftKey},s=function(e){return e.shiftKey}},6552:function(e,t,n){"use strict";n.d(t,{EK:function(){return j},H5:function(){return u},Jj:function(){return E},LW:function(){return s},N_:function(){return y},U1:function(){return a},c9:function(){return f},eH:function(){return w},g6:function(){return d},lk:function(){return k},wC:function(){return g},xj:function(){return l},yB:function(){return b},yW:function(){return v},yq:function(){return c}});var r=n(2335),o=n(3063),i=n(8925),a=function(e,t,n,r,o){return[(e-n)*Math.cos(o)-(t-r)*Math.sin(o)+n,(e-n)*Math.sin(o)+(t-r)*Math.cos(o)+r]},l=function(e,t,n){return a(e[0],e[1],t[0],t[1],n)},c=function(e,t,n,r,o,i,a,l){var c=Math.cos(r),s=Math.sin(r);return e.e&&e.w?t+=o+a:e.e?(t+=o*(1+c),n+=o*s,t+=a*(1-c),n+=a*-s):e.w&&(t+=o*(1-c),n+=o*-s,t+=a*(1+c),n+=a*s),e.n&&e.s?n+=i+l:e.n?(t+=i*s,n+=i*(1-c),t+=l*-s,n+=l*(1+c)):e.s&&(t+=i*-s,n+=i*(1+c),t+=l*s,n+=l*(1-c)),[t,n]},s=function(e,t,n,r){var o=n-e,i=r-t;return Math.hypot(o,i)},u=function(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e.length>=3){var n=[e[0],e[e.length-1]],o=n[0],i=n[1],a=s(o[0],o[1],i[0],i[1]);return a<=r.qx/t}return!1},f=function(e,t,n){var r=e.length;if(r<3)return!1;for(var o=[Number.MAX_SAFE_INTEGER,n],i=[t,n],a=0,l=0;l<r;l++){var c=e[l],s=e[(l+1)%r];if(m(c,s,i,o)){if(0===h(c,i,s))return p(c,i,s);a++}}return a%2==1},p=function(e,t,n){return t[0]<=Math.max(e[0],n[0])&&t[0]>=Math.min(e[0],n[0])&&t[1]<=Math.max(e[1],n[1])&&t[1]>=Math.min(e[1],n[1])},h=function(e,t,n){var r=(t[1]-e[1])*(n[0]-t[0])-(t[0]-e[0])*(n[1]-t[1]);return 0===r?0:r>0?1:2},m=function(e,t,n,r){var o=h(e,t,n),i=h(e,t,r),a=h(n,r,e),l=h(n,r,t);return o!==i&&a!==l||(!(0!==o||!p(e,n,t))||(!(0!==i||!p(e,r,t))||(!(0!==a||!p(n,e,r))||!(0!==l||!p(n,t,r)))))},g=function(e,t,n){return n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t]},v=function(e,t){var n,o,i;if((null===(n=t.roundness)||void 0===n?void 0:n.type)===r.a6.PROPORTIONAL_RADIUS||(null===(o=t.roundness)||void 0===o?void 0:o.type)===r.a6.LEGACY)return e*r.Rx;if((null===(i=t.roundness)||void 0===i?void 0:i.type)===r.a6.ADAPTIVE_RADIUS){var a,l,c=null!==(a=null===(l=t.roundness)||void 0===l?void 0:l.value)&&void 0!==a?a:r._9;return e<=c/r.Rx?e*r.Rx:c}return 0},b=function(e,t){var n=(0,o.R2)(e);if(!n)return null;for(var r=(0,i.CM)(n[0]),a=[0,0],l=0,c=1/0,u=null;l<r.length;){var d=r[l],f=d.op,p=d.data;if("move"===f&&(a=p),"bcurveTo"===f){var h=a,m=[p[0],p[1]],g=[p[2],p[3]],v=[p[4],p[5]],b=s(v[0],v[1],t[0],t[1]);b<c&&(c=b,u=[h,m,g,v]),a=v}l++}return u},y=function(e,t,n,r,o){var i=function(o,i){return Math.pow(1-o,3)*r[i]+3*o*Math.pow(1-o,2)*n[i]+3*Math.pow(o,2)*(1-o)*t[i]+e[i]*Math.pow(o,3)};return[i(o,0),i(o,1)]},x=function(e,t){var n=[];n[0]=0;for(var r=function(e,t){var n=b(e,t);if(!n)return[];for(var r=[],o=1;o>0;){var i=y(n[0],n[1],n[2],n[3],o);r.push([i[0],i[1]]),o-=.05}return r.length&&E(r.at(-1),t)&&r.push([t[0],t[1]]),r}(e,t),o=0,i=0;o<r.length-1;){i+=s(r[o][0],r[o][1],r[o+1][0],r[o+1][1]),n.push(i),o++}return n},w=function(e,t){return x(e,t).at(-1)},k=function(e,t,n){for(var r=x(e,t),o=r.length-1,i=n*r.at(-1),a=0,l=o,c=0;a<l;)r[c=Math.floor(a+(l-a)/2)]<i?a=c+1:l=c;return r[c]>i&&c--,r[c]===i?c/o:1-(c+(i-r[c])/(r[c+1]-r[c]))/o},E=function(e,t){return e[0]===t[0]&&e[1]===t[1]},j=function(e){return Math.round(e/Math.PI*1e4)%5e3==0}},3024:function(e,t,n){"use strict";n.d(t,{$D:function(){return j},Fl:function(){return E},I_:function(){return f.I_},N7:function(){return v.N7},NI:function(){return f.NI},NL:function(){return k},ZY:function(){return g.ZY},cT:function(){return g.cT},i1:function(){return S},lV:function(){return g.lV},zh:function(){return b.zh}});var r=n(8950),o=n(7169),i=n(2975),a=n.n(i),l=n(4162),c=n(8897),s=n(679),u=n(2335),d=n(673),f=n(5523),p=n(6665),h=n(1564),m=n(2791),g=n(434),v=n(3063),b=n(7053);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e){var t=new h.Z;return t.replaceAllElements((0,m._N)(e)),t.getNonDeletedElements()},k=function(e){var t=e.elements,n=e.appState,r=e.files,o=e.maxWidthOrHeight,i=e.getDimensions,a=e.exportPadding,c=(0,s.nu)({elements:t,appState:n},null,null),u=c.elements,d=c.appState,f=d.exportBackground,p=d.viewBackgroundColor;return(0,l.NL)(w(u),x(x({},d),{},{offsetTop:0,offsetLeft:0,width:0,height:0}),r||{},{exportBackground:f,exportPadding:a,viewBackgroundColor:p},(function(e,t){var r,a=document.createElement("canvas");if(o){var l;"function"==typeof i&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");var c=Math.max(e,t),s=o<c?o/c:null!==(l=null==n?void 0:n.exportScale)&&void 0!==l?l:1;return a.width=e*s,a.height=t*s,{canvas:a,scale:s}}var u=(null==i?void 0:i(e,t))||{width:e,height:t};return a.width=u.width,a.height=u.height,{canvas:a,scale:null!==(r=u.scale)&&void 0!==r?r:1}}))},E=function(){var e=(0,r.Z)(a().mark((function e(t){var n,o,i,l,c,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(o=t).mimeType,l=void 0===i?u.LO.png:i,c=o.quality,l===u.LO.png&&"number"==typeof c&&console.warn('"quality" will be ignored for "'.concat(u.LO.png,'" mimeType')),"image/jpg"===l&&(l=u.LO.jpg),l!==u.LO.jpg||null!==(n=t.appState)&&void 0!==n&&n.exportBackground||(console.warn('Defaulting "exportBackground" to "true" for "'.concat(u.LO.jpg,'" mimeType')),t=x(x({},t),{},{appState:x(x({},t.appState),{},{exportBackground:!0})})),e.next=6,k(x(x({},t),{},{elements:w(t.elements)}));case 6:return s=e.sent,c=c||(/image\/jpe?g/.test(l)?.92:.8),e.abrupt("return",new Promise((function(e,n){s.toBlob(function(){var o=(0,r.Z)(a().mark((function r(o){var i;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o){r.next=2;break}return r.abrupt("return",n(new Error("couldn't export to blob")));case 2:if(!o||l!==u.LO.png||null===(i=t.appState)||void 0===i||!i.exportEmbedScene){r.next=6;break}return r.next=5,(0,d.encodePngMetadata)({blob:o,metadata:(0,f.I_)(t.elements,t.appState,t.files||{},"local")});case 5:o=r.sent;case 6:e(o);case 7:case"end":return r.stop()}}),r)})));return function(e){return o.apply(this,arguments)}}(),l,c)})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=(0,r.Z)(a().mark((function e(t){var n,r,o,i,u,d,p,h,m,g;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.elements,r=t.appState,o=void 0===r?(0,c.im)():r,i=t.files,u=void 0===i?{}:i,d=t.exportPadding,p=(0,s.nu)({elements:n,appState:o},null,null),h=p.elements,m=p.appState,g=x(x({},m),{},{exportPadding:d}),e.abrupt("return",(0,l.$D)(w(h),g,u,{serializeAsJSON:function(){return(0,f.I_)(h,g,u||{},"local")}}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=(0,r.Z)(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("svg"!==t.type){e.next=8;break}return e.next=3,j(t);case 3:return n=e.sent,e.next=6,(0,p.dd)(n.outerHTML);case 6:case 11:case 16:e.next=19;break;case 8:if("png"!==t.type){e.next=13;break}return e.next=11,(0,p.uR)(E(t));case 13:if("json"!==t.type){e.next=18;break}return e.next=16,(0,p.vQ)(t.elements,t.files);case 18:throw new Error("Invalid export type");case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},5001:function(e,t,n){"use strict";n.d(t,{k:function(){return o},z:function(){return i}});var r=n(1930),o=function(e){var t=e.map((function(e){return e[0]})),n=e.map((function(e){return e[1]}));return{width:Math.max.apply(Math,(0,r.Z)(t))-Math.min.apply(Math,(0,r.Z)(t)),height:Math.max.apply(Math,(0,r.Z)(n))-Math.min.apply(Math,(0,r.Z)(n))}},i=function(e,t,n,o){var i=n.map((function(t){return t[e]})),a=Math.max.apply(Math,(0,r.Z)(i)),l=Math.min.apply(Math,(0,r.Z)(i)),c=a-l,s=0===c?1:t/c,u=1/0,d=n.map((function(t){var n=t[e]*s,o=(0,r.Z)(t);return o[e]=n,n<u&&(u=n),o}));if(!o)return d;if(2===d.length)return d;var f=l-u;return d.map((function(t){return t.map((function(t,n){return n===e?t+f:t}))}))}},6954:function(e,t,n){"use strict";n.d(t,{LU:function(){return c},kb:function(){return s}});var r=n(8152),o=n(5605),i=n(6340),a=new r.k(Date.now()),l=0,c=function(){return Math.floor(a.next()*Math.pow(2,31))},s=function(){return(0,i.h2)()?"id".concat(l++):(0,o.x0)()}},3063:function(e,t,n){"use strict";n.d(t,{Dn:function(){return W},i:function(){return $},N7:function(){return ae},R2:function(){return G},bI:function(){return q},lw:function(){return te},Rg:function(){return re}});var r=n(1930),o=n(7169),i=n(2577),a=n(1974),l=n(8925),c=n(6340),s=n(6552),u=n(8234),d=n(8897),f=n(2335);function p(e,t,n,r=(e=>e)){return e*r(.5-t*(.5-n))}function h(e,t){return[e[0]+t[0],e[1]+t[1]]}function m(e,t){return[e[0]-t[0],e[1]-t[1]]}function g(e,t){return[e[0]*t,e[1]*t]}function v(e){return[e[1],-e[0]]}function b(e,t){return e[0]*t[0]+e[1]*t[1]}function y(e,t){return e[0]===t[0]&&e[1]===t[1]}function x(e,t){return function(e){return e[0]*e[0]+e[1]*e[1]}(m(e,t))}function w(e){return function(e,t){return[e[0]/t,e[1]/t]}(e,function(e){return Math.hypot(e[0],e[1])}(e))}function k(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function E(e,t,n){let r=Math.sin(n),o=Math.cos(n),i=e[0]-t[0],a=e[1]-t[1],l=i*r+a*o;return[i*o-a*r+t[0],l+t[1]]}function j(e,t,n){return h(e,g(m(t,e),n))}function S(e,t,n){return h(e,g(t,n))}var{min:O,PI:_}=Math,C=_+1e-4;function P(e,t={}){return function(e,t={}){let{size:n=16,smoothing:r=.5,thinning:o=.5,simulatePressure:i=!0,easing:a=(e=>e),start:l={},end:c={},last:s=!1}=t,{cap:u=!0,easing:d=(e=>e*(2-e))}=l,{cap:f=!0,easing:y=(e=>--e*e*e+1)}=c;if(0===e.length||n<=0)return[];let k,_=e[e.length-1].runningLength,P=!1===l.taper?0:!0===l.taper?Math.max(n,_):l.taper,T=!1===c.taper?0:!0===c.taper?Math.max(n,_):c.taper,I=Math.pow(n*r,2),M=[],D=[],A=e.slice(0,10).reduce(((e,t)=>{let r=t.pressure;if(i){let o=O(1,t.distance/n),i=O(1,1-o);r=O(1,e+.275*o*(i-e))}return(e+r)/2}),e[0].pressure),L=p(n,o,e[e.length-1].pressure,a),Z=e[0].vector,R=e[0].point,z=R,N=R,B=z,H=!1;for(let t=0;t<e.length;t++){let{pressure:r}=e[t],{point:l,vector:c,distance:s,runningLength:u}=e[t];if(t<e.length-1&&_-u<3)continue;if(o){if(i){let e=O(1,s/n),t=O(1,1-e);r=O(1,A+.275*e*(t-A))}L=p(n,o,r,a)}else L=n/2;void 0===k&&(k=L);let f=u<P?d(u/P):1,w=_-u<T?y((_-u)/T):1;L=Math.max(.01,L*Math.min(f,w));let S=(t<e.length-1?e[t+1]:e[t]).vector,W=t<e.length-1?b(c,S):1,F=null!==W&&W<0;if(b(c,Z)<0&&!H||F){let e=g(v(Z),L);for(let t=1/13,n=0;n<=1;n+=t)N=E(m(l,e),l,C*n),M.push(N),B=E(h(l,e),l,C*-n),D.push(B);R=N,z=B,F&&(H=!0);continue}if(H=!1,t===e.length-1){let e=g(v(c),L);M.push(m(l,e)),D.push(h(l,e));continue}let U=g(v(j(S,c,W)),L);N=m(l,U),(t<=1||x(R,N)>I)&&(M.push(N),R=N),B=h(l,U),(t<=1||x(z,B)>I)&&(D.push(B),z=B),A=r,Z=c}let W=e[0].point.slice(0,2),F=e.length>1?e[e.length-1].point.slice(0,2):h(e[0].point,[1,1]),U=[],K=[];if(1===e.length){if(!P&&!T||s){let e=S(W,w(v(m(W,F))),-(k||L)),t=[];for(let n=1/13,r=n;r<=1;r+=n)t.push(E(e,W,2*C*r));return t}}else{if(!(P||T&&1===e.length))if(u)for(let e=1/13,t=e;t<=1;t+=e){let e=E(D[0],W,C*t);U.push(e)}else{let e=m(M[0],D[0]),t=g(e,.5),n=g(e,.51);U.push(m(W,t),m(W,n),h(W,n),h(W,t))}let t=v(function(e){return[-e[0],-e[1]]}(e[e.length-1].vector));if(T||P&&1===e.length)K.push(F);else if(f){let e=S(F,t,L);for(let t=1/29,n=t;n<1;n+=t)K.push(E(e,F,3*C*n))}else K.push(h(F,g(t,L)),h(F,g(t,.99*L)),m(F,g(t,.99*L)),m(F,g(t,L)))}return M.concat(K,D.reverse(),U)}(function(e,t={}){var n;let{streamline:r=.5,size:o=16,last:i=!1}=t;if(0===e.length)return[];let a=.15+.85*(1-r),l=Array.isArray(e[0])?e:e.map((({x:e,y:t,pressure:n=.5})=>[e,t,n]));if(2===l.length){let e=l[1];l=l.slice(0,-1);for(let t=1;t<5;t++)l.push(j(l[0],e,t/4))}1===l.length&&(l=[...l,[...h(l[0],[1,1]),...l[0].slice(2)]]);let c=[{point:[l[0][0],l[0][1]],pressure:l[0][2]>=0?l[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],s=!1,u=0,d=c[0],f=l.length-1;for(let e=1;e<l.length;e++){let t=i&&e===f?l[e].slice(0,2):j(d.point,l[e],a);if(y(d.point,t))continue;let n=k(t,d.point);if(u+=n,e<f&&!s){if(u<o)continue;s=!0}d={point:t,pressure:l[e][2]>=0?l[e][2]:.5,vector:w(m(d.point,t)),distance:n,runningLength:u},c.push(d)}return c[0].vector=(null==(n=c[1])?void 0:n.vector)||[0,0],c}(e,t),t)}var T=n(5710),I=n(6938);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A="invert(100%) hue-rotate(180deg) saturate(1.25)",L=(0,d.im)(),Z=function(e,t){return(0,a.wi)(e)&&!t.imageCache.has(e.fileId)},R=function(e,t){var n;return"dark"===t.theme&&(0,a.wi)(e)&&!Z(e,t)&&(null===(n=t.imageCache.get(e.fileId))||void 0===n?void 0:n.mimeType)!==f.LO.svg},z=function(e){return[8,8+e]},N=function(e){return[1.5,6+e]},B=function(e){return"freedraw"===e.type?12*e.strokeWidth:20},H=function(e,t,n){var r,o=document.createElement("canvas"),s=o.getContext("2d"),d=B(e),f=function(e,t){var n=16777216,r=32767,o=B(e),s=(0,l.qf)(e),u=(0,i.Z)(s,4),d=u[0],f=u[1],p=u[2],h=u[3],m=(0,a.bt)(e)||(0,a.F9)(e)?(0,c.TE)(d,p):e.width,g=(0,a.bt)(e)||(0,a.F9)(e)?(0,c.TE)(f,h):e.height,v=m*window.devicePixelRatio+2*o,b=g*window.devicePixelRatio+2*o,y=t.value;return(v*y>r||b*y>r)&&(y=Math.min(r/v,r/b)),v*b*y*y>n&&(y=Math.sqrt(n/(v*b))),{width:v=Math.floor(v*y),height:b=Math.floor(b*y),scale:y}}(e,t),p=f.width,h=f.height,m=f.scale;o.width=p,o.height=h;var g=0,v=0;if((0,a.bt)(e)||(0,a.F9)(e)){var b=(0,l.qf)(e),y=(0,i.Z)(b,2),x=y[0],w=y[1];g=e.x>x?(0,c.TE)(e.x,x)*window.devicePixelRatio*m:0,v=e.y>w?(0,c.TE)(e.y,w)*window.devicePixelRatio*m:0,s.translate(g,v)}s.save(),s.translate(d*m,d*m),s.scale(window.devicePixelRatio*m,window.devicePixelRatio*m);var k=u.Z.canvas(o);return R(e,n)&&(s.filter=A),K(e,k,s,n),s.restore(),{element:e,canvas:o,theme:n.theme,scale:m,zoomValue:t.value,canvasOffsetX:g,canvasOffsetY:v,boundTextElementVersion:(null===(r=(0,T.WJ)(e))||void 0===r?void 0:r.version)||null}},W=14,F=document.createElement("img");F.src="data:".concat(f.LO.svg,",").concat(encodeURIComponent('<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="image" class="svg-inline--fa fa-image fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#888" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>'));var U=document.createElement("img");U.src="data:".concat(f.LO.svg,",").concat(encodeURIComponent('<svg viewBox="0 0 668 668" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.81709 0 0 .81709 124.825 145.825)"/><path d="M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.30366 0 0 .30366 506.822 60.065)"/></svg>'));var K=function(e,t,n,r){switch(n.globalAlpha=e.opacity/100,e.type){case"rectangle":case"diamond":case"ellipse":n.lineJoin="round",n.lineCap="round",t.draw(G(e));break;case"arrow":case"line":n.lineJoin="round",n.lineCap="round",G(e).forEach((function(e){t.draw(e)}));break;case"freedraw":n.save(),n.fillStyle=e.strokeColor;var o=function(e){return oe.get(e)}(e),i=G(e);i&&t.draw(i),n.fillStyle=e.strokeColor,n.fill(o),n.restore();break;case"image":var l,s=(0,a.wi)(e)?null===(l=r.imageCache.get(e.fileId))||void 0===l?void 0:l.image:void 0;null==s||s instanceof Promise?function(e,t,n){t.fillStyle="#E7E7E7",t.fillRect(0,0,e.width,e.height);var r=Math.min(e.width,e.height),o=Math.min(r,Math.min(.4*r,100));t.drawImage("error"===e.status?U:F,e.width/2-o/2,e.height/2-o/2,o,o)}(e,n,r.zoom.value):n.drawImage(s,0,0,e.width,e.height);break;default:if(!(0,a.iB)(e))throw new Error("Unimplemented type ".concat(e.type));var u=(0,c.dZ)(e.text),d=u&&!n.canvas.isConnected;d&&document.body.appendChild(n.canvas),n.canvas.setAttribute("dir",u?"rtl":"ltr"),n.save(),n.font=(0,c.mO)(e),n.fillStyle=e.strokeColor,n.textAlign=e.textAlign;for(var f=e.text.replace(/\r\n?/g,"\n").split("\n"),p="center"===e.textAlign?e.width/2:"right"===e.textAlign?e.width:0,h=(0,T.Rg)(e.fontSize,e.lineHeight),m=e.height-e.baseline,g=0;g<f.length;g++)n.fillText(f[g],p,(g+1)*h-m);n.restore(),d&&n.canvas.remove()}n.globalAlpha=1},Y=new WeakMap,V=new WeakMap,G=function(e){return V.get(e)},X=function(e,t){return V.set(e,t)},q=function(e){return V.delete(e)},$=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={seed:e.seed,strokeLineDash:"dashed"===e.strokeStyle?z(e.strokeWidth):"dotted"===e.strokeStyle?N(e.strokeWidth):void 0,disableMultiStroke:"solid"!==e.strokeStyle,strokeWidth:"solid"!==e.strokeStyle?e.strokeWidth+.5:e.strokeWidth,fillWeight:e.strokeWidth/2,hachureGap:4*e.strokeWidth,roughness:e.roughness,stroke:e.strokeColor,preserveVertices:t};switch(e.type){case"rectangle":case"diamond":case"ellipse":return n.fillStyle=e.fillStyle,n.fill="transparent"===e.backgroundColor?void 0:e.backgroundColor,"ellipse"===e.type&&(n.curveFitting=1),n;case"line":case"freedraw":return(0,s.g6)(e.points)&&(n.fillStyle=e.fillStyle,n.fill="transparent"===e.backgroundColor?void 0:e.backgroundColor),n;case"arrow":return n;default:throw new Error("Unimplemented type ".concat(e.type))}},J=function(e,t){var n=V.get(e);if(void 0===n)switch(Y.delete(e),e.type){case"rectangle":if(e.roundness){var o=e.width,a=e.height,c=(0,s.yW)(Math.min(o,a),e);n=t.path("M ".concat(c," 0 L ").concat(o-c," 0 Q ").concat(o," 0, ").concat(o," ").concat(c," L ").concat(o," ").concat(a-c," Q ").concat(o," ").concat(a,", ").concat(o-c," ").concat(a," L ").concat(c," ").concat(a," Q 0 ").concat(a,", 0 ").concat(a-c," L 0 ").concat(c," Q 0 0, ").concat(c," 0"),$(e,!0))}else n=t.rectangle(0,0,e.width,e.height,$(e));X(e,n);break;case"diamond":var u=(0,l.UC)(e),d=(0,i.Z)(u,8),f=d[0],p=d[1],h=d[2],m=d[3],g=d[4],v=d[5],b=d[6],y=d[7];if(e.roundness){var x=(0,s.yW)(Math.abs(f-b),e),w=(0,s.yW)(Math.abs(m-p),e);n=t.path("M ".concat(f+x," ").concat(p+w," L ").concat(h-x," ").concat(m-w,"\n C ").concat(h," ").concat(m,", ").concat(h," ").concat(m,", ").concat(h-x," ").concat(m+w,"\n L ").concat(g+x," ").concat(v-w,"\n C ").concat(g," ").concat(v,", ").concat(g," ").concat(v,", ").concat(g-x," ").concat(v-w,"\n L ").concat(b+x," ").concat(y+w,"\n C ").concat(b," ").concat(y,", ").concat(b," ").concat(y,", ").concat(b+x," ").concat(y-w,"\n L ").concat(f-x," ").concat(p+w,"\n C ").concat(f," ").concat(p,", ").concat(f," ").concat(p,", ").concat(f+x," ").concat(p+w),$(e,!0))}else n=t.polygon([[f,p],[h,m],[g,v],[b,y]],$(e));X(e,n);break;case"ellipse":n=t.ellipse(e.width/2,e.height/2,e.width,e.height,$(e)),X(e,n);break;case"line":case"arrow":var k=$(e),E=e.points.length?e.points:[[0,0]];if(n=e.roundness?[t.curve(E,k)]:k.fill?[t.polygon(E,k)]:[t.linearPath(E,k)],"arrow"===e.type){var j=e.startArrowhead,S=void 0===j?null:j,O=e.endArrowhead,_=void 0===O?"arrow":O,C=function(e,n,r,o){var a=(0,l.Y5)(e,n,r,o);if(null===a)return[];if("dot"===o){var c=(0,i.Z)(a,3),s=c[0],u=c[1],d=c[2];return[t.circle(s,u,d,D(D({},k),{},{fill:e.strokeColor,fillStyle:"solid",stroke:"none"}))]}if("triangle"===o){var f=(0,i.Z)(a,6),p=f[0],h=f[1],m=f[2],g=f[3],v=f[4],b=f[5];return delete k.strokeLineDash,[t.polygon([[p,h],[m,g],[v,b],[p,h]],D(D({},k),{},{fill:e.strokeColor,fillStyle:"solid"}))]}var y=(0,i.Z)(a,6),x=y[0],w=y[1],E=y[2],j=y[3],S=y[4],O=y[5];if("dotted"===e.strokeStyle){var _=N(e.strokeWidth-1);k.strokeLineDash=[_[0],_[1]-1]}else delete k.strokeLineDash;return[t.line(E,j,x,w,k),t.line(S,O,x,w,k)]};if(null!==S){var P,T=C(e,n,"start",S);(P=n).push.apply(P,(0,r.Z)(T))}if(null!==_){var I,M=C(e,n,"end",_);(I=n).push.apply(I,(0,r.Z)(M))}}X(e,n);break;case"freedraw":ie(e),n=(0,s.g6)(e.points)?t.polygon(e.points,D(D({},$(e)),{},{stroke:"none"})):null,X(e,n);break;case"text":case"image":X(e,null)}},Q=function(e,t){var n,r=t?t.zoom:L.zoom,o=Y.get(e),i=o&&o.zoomValue!==r.value&&!(null!=t&&t.shouldCacheIgnoreZoom),a=(null===(n=(0,T.WJ)(e))||void 0===n?void 0:n.version)||null;if(!o||i||o.theme!==t.theme||o.boundTextElementVersion!==a){var l=H(e,r,t);return Y.set(e,l),l}return o},ee=function(e,t,n,r){var o=e.element,s=B(o),u=e.scale,d=(0,l.qf)(o),p=(0,i.Z)(d,4),h=p[0],m=p[1],g=p[2],v=p[3];(0,a.F9)(o)&&(h=Math.floor(h),g=Math.ceil(g),m=Math.floor(m),v=Math.ceil(v));var b=((h+g)/2+r.scrollX)*window.devicePixelRatio,y=((m+v)/2+r.scrollY)*window.devicePixelRatio;n.save(),n.scale(1/window.devicePixelRatio,1/window.devicePixelRatio);var x=(0,T.WJ)(o);if((0,a.Yv)(o)&&x){var w=document.createElement("canvas"),k=w.getContext("2d"),E=Math.max((0,c.TE)(h,g),(0,c.TE)(m,v));w.width=E*window.devicePixelRatio*u+s*e.scale*10,w.height=E*window.devicePixelRatio*u+s*e.scale*10;var j=(w.width-e.canvas.width)/2,S=(w.height-e.canvas.height)/2;k.translate(w.width/2,w.height/2),k.rotate(o.angle),k.drawImage(e.canvas,-e.canvas.width/2,-e.canvas.height/2,e.canvas.width,e.canvas.height);var O=(0,l.qf)(x),_=(0,i.Z)(O,6),C=_[4],P=_[5];k.rotate(-o.angle);var I=w.width/2-(C-h)*window.devicePixelRatio*u-j-s*u,M=w.height/2-(P-m)*window.devicePixelRatio*u-S-s*u;k.translate(-I,-M),k.clearRect(-(x.width/2+f.gK)*window.devicePixelRatio*u,-(x.height/2+f.gK)*window.devicePixelRatio*u,(x.width+2*f.gK)*window.devicePixelRatio*u,(x.height+2*f.gK)*window.devicePixelRatio*u),n.translate(b,y),n.drawImage(w,-(g-h)/2*window.devicePixelRatio-j/u-s,-(v-m)/2*window.devicePixelRatio-S/u-s,w.width/u,w.height/u)}else if(n.translate(b,y),n.rotate(o.angle),"scale"in e.element&&!Z(o,r)&&n.scale(e.element.scale[0],e.element.scale[1]),n.translate(-b,-y),n.drawImage(e.canvas,(h+r.scrollX)*window.devicePixelRatio-s*e.scale/e.scale,(m+r.scrollY)*window.devicePixelRatio-s*e.scale/e.scale,e.canvas.width/e.scale,e.canvas.height/e.scale),"true"==={REACT_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",REACT_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",REACT_APP_LIBRARY_URL:"https://libraries.excalidraw.com",REACT_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",REACT_APP_PORTAL_URL:"https://portal.excalidraw.com",REACT_APP_WS_SERVER_URL:"",REACT_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',REACT_APP_GOOGLE_ANALYTICS_ID:"UA-387204-13",REACT_APP_MATOMO_URL:"https://excalidraw.matomo.cloud/",REACT_APP_CDN_MATOMO_TRACKER_URL:"//cdn.matomo.cloud/excalidraw.matomo.cloud/matomo.js",REACT_APP_MATOMO_SITE_ID:"1",REACT_APP_PLUS_APP:"https://app.excalidraw.com",PKG_NAME:"@excalidraw/excalidraw",PKG_VERSION:"0.15.2-a89952e",IS_EXCALIDRAW_NPM_PACKAGE:!0}.REACT_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX&&(0,a.Xo)(o)){var D=(0,T.WJ)(o),A=(0,T.cw)(o);n.strokeStyle="#c92a2a",n.lineWidth=3,n.strokeRect((A.x+r.scrollX)*window.devicePixelRatio,(A.y+r.scrollY)*window.devicePixelRatio,(0,T.iZ)(o)*window.devicePixelRatio,(0,T.D9)(o,D)*window.devicePixelRatio)}n.restore()},te=function(e,t,n,r,o){var d=t.generator;switch(e.type){case"selection":n.save(),n.translate(e.x+r.scrollX,e.y+r.scrollY),n.fillStyle="rgba(0, 0, 200, 0.04)";var f=.5/r.zoom.value;n.fillRect(f,f,e.width,e.height),n.lineWidth=1/r.zoom.value,n.strokeStyle="rgb(105, 101, 219)",n.strokeRect(f,f,e.width,e.height),n.restore();break;case"freedraw":if(J(e,d),r.isExporting){var p=(0,l.qf)(e),h=(0,i.Z)(p,4),m=h[0],g=h[1],v=h[2],b=h[3],y=(m+v)/2+r.scrollX,x=(g+b)/2+r.scrollY,w=(v-m)/2-(e.x-m),k=(b-g)/2-(e.y-g);n.save(),n.translate(y,x),n.rotate(e.angle),n.translate(-w,-k),K(e,t,n,r),n.restore()}else{var E=Q(e,r);ee(E,0,n,r)}break;case"rectangle":case"diamond":case"ellipse":case"line":case"arrow":case"image":case"text":if(J(e,d),r.isExporting){var j=(0,l.qf)(e),S=(0,i.Z)(j,4),O=S[0],_=S[1],C=S[2],P=S[3],M=(O+C)/2+r.scrollX,D=(_+P)/2+r.scrollY,A=(C-O)/2-(e.x-O),L=(P-_)/2-(e.y-_);if((0,a.iB)(e)){var Z=(0,T.tl)(e);if((0,a.Yv)(Z)){var z=I._.getBoundTextElementPosition(Z,e);A=(C-O)/2-(z.x-O),L=(P-_)/2-(z.y-_)}}n.save(),n.translate(M,D),R(e,r)&&(n.filter="none");var N=(0,T.WJ)(e);if((0,a.Yv)(e)&&N){var H=document.createElement("canvas"),W=H.getContext("2d"),F=Math.max((0,c.TE)(O,C),(0,c.TE)(_,P)),U=B(e);H.width=F*o.exportScale+10*U*o.exportScale,H.height=F*o.exportScale+10*U*o.exportScale,W.translate(H.width/2,H.height/2),W.scale(o.exportScale,o.exportScale),A=e.width/2-(e.x-O),L=e.height/2-(e.y-_),W.rotate(e.angle);var Y=u.Z.canvas(H);W.translate(-A,-L),K(e,Y,W,r),W.translate(A,L),W.rotate(-e.angle);var V=(0,l.qf)(N),G=(0,i.Z)(V,6),X=(O+C)/2-G[4],q=(_+P)/2-G[5];W.translate(-X,-q),W.clearRect(-N.width/2,-N.height/2,N.width,N.height),n.scale(1/o.exportScale,1/o.exportScale),n.drawImage(H,-H.width/2,-H.height/2,H.width,H.height)}else n.rotate(e.angle),"image"===e.type&&n.scale(e.scale[0],e.scale[1]),n.translate(-A,-L),K(e,t,n,r);n.restore()}else{var $=Q(e,r),te=n.imageSmoothingEnabled;null!=r&&r.shouldCacheIgnoreZoom||e.angle&&!(0,s.EK)(e.angle)||(n.imageSmoothingEnabled=!1),ee($,0,n,r),n.imageSmoothingEnabled=te}break;default:throw new Error("Unimplemented type ".concat(e.type))}},ne=function(e,t,n){if(void 0===n)return e.draw(t);var r={sets:t.sets,shape:t.shape,options:D(D({},t.options),{},{fixedDecimalPlaceDigits:n})};return e.draw(r)},re=function(e,t,n,r,o,u,d){var p=(0,l.qf)(e),h=(0,i.Z)(p,4),m=h[0],g=h[1],v=h[2],b=h[3],y=(v-m)/2-(e.x-m),x=(b-g)/2-(e.y-g);if((0,a.iB)(e)){var w=(0,T.tl)(e);if((0,a.Yv)(w)){var k=(0,l.qf)(w),E=(0,i.Z)(k,4),j=E[0],S=E[1],O=E[2],_=E[3],C=I._.getBoundTextElementPosition(w,e);y=(O-j)/2-(C.x-j),x=(_-S)/2-(C.y-S),o=o+C.x-e.x,u=u+C.y-e.y}}var P=180*e.angle/Math.PI,M=t.generator,D=n;if(e.link){var L=n.ownerDocument.createElementNS(f.hR,"a");L.setAttribute("href",e.link),D.appendChild(L),D=L}switch(e.type){case"selection":throw new Error("Selection rendering is not supported for SVG");case"rectangle":case"diamond":case"ellipse":J(e,M);var Z=ne(t,G(e),f.zK),R=e.opacity/100;1!==R&&(Z.setAttribute("stroke-opacity","".concat(R)),Z.setAttribute("fill-opacity","".concat(R))),Z.setAttribute("stroke-linecap","round"),Z.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(P," ").concat(y," ").concat(x,")")),D.appendChild(Z);break;case"line":case"arrow":var z=(0,T.WJ)(e),N=n.ownerDocument.createElementNS(f.hR,"mask");if(z){N.setAttribute("id","mask-".concat(e.id));var B=n.ownerDocument.createElementNS(f.hR,"rect");o=o||0,u=u||0,B.setAttribute("x","0"),B.setAttribute("y","0"),B.setAttribute("fill","#fff"),B.setAttribute("width","".concat(e.width+100+o)),B.setAttribute("height","".concat(e.height+100+u)),N.appendChild(B);var H=n.ownerDocument.createElementNS(f.hR,"rect"),W=I._.getBoundTextElementPosition(e,z),F=o+W.x-e.x,U=u+W.y-e.y;H.setAttribute("x",F.toString()),H.setAttribute("y",U.toString()),H.setAttribute("fill","#000"),H.setAttribute("width","".concat(z.width)),H.setAttribute("height","".concat(z.height)),H.setAttribute("opacity","1"),N.appendChild(H)}J(e,M);var K=n.ownerDocument.createElementNS(f.hR,"g");z&&K.setAttribute("mask","url(#mask-".concat(e.id,")"));var Y=e.opacity/100;K.setAttribute("stroke-linecap","round"),G(e).forEach((function(n){var r=ne(t,n,f.zK);1!==Y&&(r.setAttribute("stroke-opacity","".concat(Y)),r.setAttribute("fill-opacity","".concat(Y))),r.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(P," ").concat(y," ").concat(x,")")),"line"===e.type&&(0,s.g6)(e.points)&&"transparent"!==e.backgroundColor&&r.setAttribute("fill-rule","evenodd"),K.appendChild(r)})),D.appendChild(K),D.append(N);break;case"freedraw":J(e,M),ie(e);var V=e.opacity/100,X=G(e),q=X?ne(t,X,f.zK):n.ownerDocument.createElementNS(f.hR,"g");1!==V&&(q.setAttribute("stroke-opacity","".concat(V)),q.setAttribute("fill-opacity","".concat(V))),q.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(P," ").concat(y," ").concat(x,")")),q.setAttribute("stroke","none");var $=n.ownerDocument.createElementNS(f.hR,"path");$.setAttribute("fill",e.strokeColor),$.setAttribute("d",ae(e)),q.appendChild($),D.appendChild(q);break;case"image":var Q=Math.round(e.width),ee=Math.round(e.height),te=(0,a.wi)(e)&&r[e.fileId];if(te){var re="image-".concat(te.id),oe=n.querySelector("#".concat(re));if(!oe){(oe=n.ownerDocument.createElementNS(f.hR,"symbol")).id=re;var le=n.ownerDocument.createElementNS(f.hR,"image");le.setAttribute("width","100%"),le.setAttribute("height","100%"),le.setAttribute("href",te.dataURL),oe.appendChild(le),D.prepend(oe)}var ce=n.ownerDocument.createElementNS(f.hR,"use");if(ce.setAttribute("href","#".concat(re)),d&&te.mimeType!==f.LO.svg&&ce.setAttribute("filter",A),ce.setAttribute("width","".concat(Q)),ce.setAttribute("height","".concat(ee)),1!==e.scale[0]||1!==e.scale[1]){var se=1!==e.scale[0]?-Q:0,ue=1!==e.scale[1]?-ee:0;ce.setAttribute("transform","scale(".concat(e.scale[0],", ").concat(e.scale[1],") translate(").concat(se," ").concat(ue,")"))}var de=n.ownerDocument.createElementNS(f.hR,"g");de.appendChild(ce),de.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(P," ").concat(y," ").concat(x,")")),D.appendChild(de)}break;default:if(!(0,a.iB)(e))throw new Error("Unimplemented type ".concat(e.type));var fe=e.opacity/100,pe=n.ownerDocument.createElementNS(f.hR,"g");1!==fe&&(pe.setAttribute("stroke-opacity","".concat(fe)),pe.setAttribute("fill-opacity","".concat(fe))),pe.setAttribute("transform","translate(".concat(o||0," ").concat(u||0,") rotate(").concat(P," ").concat(y," ").concat(x,")"));for(var he=e.text.replace(/\r\n?/g,"\n").split("\n"),me=(0,T.Rg)(e.fontSize,e.lineHeight),ge="center"===e.textAlign?e.width/2:"right"===e.textAlign?e.width:0,ve=(0,c.dZ)(e.text)?"rtl":"ltr",be="center"===e.textAlign?"middle":"right"===e.textAlign||"rtl"===ve?"end":"start",ye=0;ye<he.length;ye++){var xe=n.ownerDocument.createElementNS(f.hR,"text");xe.textContent=he[ye],xe.setAttribute("x","".concat(ge)),xe.setAttribute("y","".concat(ye*me)),xe.setAttribute("font-family",(0,c.$g)(e)),xe.setAttribute("font-size","".concat(e.fontSize,"px")),xe.setAttribute("fill",e.strokeColor),xe.setAttribute("text-anchor",be),xe.setAttribute("style","white-space: pre;"),xe.setAttribute("direction",ve),xe.setAttribute("dominant-baseline","text-before-edge"),pe.appendChild(xe)}D.appendChild(pe)}},oe=new WeakMap([]);function ie(e){var t=ae(e),n=new Path2D(t);return oe.set(e,n),n}function ae(e){return function(e){if(!e.length)return"";var t=e.length-1;return e.reduce((function(e,n,r,o){return r===t?e.push(n,le(n,o[0]),"L",o[0],"Z"):e.push(n,le(n,o[r+1])),e}),["M",e[0],"Q"]).join(" ").replace(ce,"$1")}(P(e.simulatePressure?e.points:e.points.length?e.points.map((function(t,n){var r=(0,i.Z)(t,2);return[r[0],r[1],e.pressures[n]]})):[[0,0,.5]],{simulatePressure:e.simulatePressure,size:4.25*e.strokeWidth,thinning:.6,smoothing:.5,streamline:.5,easing:function(e){return Math.sin(e*Math.PI/2)},last:!!e.lastCommittedPoint}))}function le(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}var ce=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g},3547:function(e,t,n){"use strict";n.d(t,{Lu:function(){return S},Eu:function(){return D},M_:function(){return H}});var r,o=n(2577),i=n(1930),a=n(5284),l=n(1047),c=n(756),s=n(1868),u=n(3063),d=n(8982),f=n(6938),p=n(242),h=n(2325),m=n(8290),g=n(267),v=n(6340);!function(e){e.ACTIVE="active",e.AWAY="away",e.IDLE="idle"}(r||(r={}));var b=n(2335),y=n(4929),x=n(1974);function w(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E,j=(0,v.Q5)(),S=2,O=function(e,t,n,r,o,i,a,l){var c=arguments.length>8&&void 0!==arguments[8]&&arguments[8];e.save(),e.translate(i,a),e.rotate(l),c&&e.fillRect(t-i,n-a,r,o),e.strokeRect(t-i,n-a,r,o),e.restore()},_=function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];e.beginPath(),e.arc(t,n,r,0,2*Math.PI),e.fill(),o&&e.stroke()},C=function(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6];e.strokeStyle="#5e5ad8",e.setLineDash([]),e.fillStyle="rgba(255, 255, 255, 0.9)",i?e.fillStyle="rgba(134, 131, 226, 0.9)":a&&(e.fillStyle="rgba(177, 151, 252, 0.7)"),_(e,r[0],r[1],o/n.zoom.value,!a)},P=function(e,t,n,r){if(t.selectedLinearElement){e.save(),e.translate(n.scrollX,n.scrollY),e.lineWidth=1/n.zoom.value;var o=f._.getPointsGlobalCoordinates(r),i=f._.POINT_HANDLE_SIZE,a=t.editingLinearElement?i:i/2;o.forEach((function(r,o){var i,l,c=!(null===(i=t.editingLinearElement)||void 0===i||null===(l=i.selectedPointsIndices)||void 0===l||!l.includes(o));C(e,t,n,r,a,c)})),f._.getEditorMidPoints(r,t).filter((function(e){return null!==e})).forEach((function(r){var l;null!=t&&null!==(l=t.selectedLinearElement)&&void 0!==l&&l.segmentMidPointHoveredCoords&&f._.arePointsEqual(r,t.selectedLinearElement.segmentMidPointHoveredCoords)?t.editingLinearElement?(C(e,t,n,r,a,!1),T(r,e,n)):(T(r,e,n),C(e,t,n,r,a,!1)):(t.editingLinearElement||2===o.length)&&C(e,t,n,r,i/2,!1,!0)})),e.restore()}},T=function(e,t,n){t.fillStyle="rgba(105, 101, 219, 0.4)",_(t,e[0],e[1],f._.POINT_HANDLE_SIZE/n.zoom.value,!1)},I=function(e){var t,n=e.elements,h=e.appState,v=e.scale,y=e.rc,k=e.canvas,E=e.renderConfig;if(null===k)return{atLeastOneVisibleElement:!1};var _=E.renderScrollbars,C=void 0===_||_,I=E.renderSelection,M=void 0===I||I,D=E.renderGrid,R=void 0===D||D,z=E.isExporting,H=E.selectionColor||a.black,W=k.getContext("2d");W.setTransform(1,0,0,1,0,0),W.save(),W.scale(v,v);var F=k.width/v,U=k.height/v;(z&&"dark"===E.theme&&(W.filter=b.ZF),"string"==typeof E.viewBackgroundColor)?(("transparent"===E.viewBackgroundColor||5===E.viewBackgroundColor.length||9===E.viewBackgroundColor.length||/(hsla|rgba)\(/.test(E.viewBackgroundColor))&&W.clearRect(0,0,F,U),W.save(),W.fillStyle=E.viewBackgroundColor,W.fillRect(0,0,F,U),W.restore()):W.clearRect(0,0,F,U);W.save(),W.scale(E.zoom.value,E.zoom.value),R&&h.gridSize&&function(e,t,n,r,o,i){e.save(),e.strokeStyle="rgba(0,0,0,0.1)",e.beginPath();for(var a=n;a<n+o+2*t;a+=t)e.moveTo(a,r-t),e.lineTo(a,r+i+2*t);for(var l=r;l<r+i+2*t;l+=t)e.moveTo(n-t,l),e.lineTo(n+o+2*t,l);e.stroke(),e.restore()}(W,h.gridSize,-Math.ceil(E.zoom.value/h.gridSize)*h.gridSize+E.scrollX%h.gridSize,-Math.ceil(E.zoom.value/h.gridSize)*h.gridSize+E.scrollY%h.gridSize,F/E.zoom.value,U/E.zoom.value);var K=n.filter((function(e){return B(e,F,U,{zoom:E.zoom,offsetLeft:h.offsetLeft,offsetTop:h.offsetTop,scrollX:E.scrollX,scrollY:E.scrollY})})),Y=void 0;if(K.forEach((function(e){try{var t;(0,u.lw)(e,y,W,E,h),(null===(t=h.editingLinearElement)||void 0===t?void 0:t.elementId)===e.id&&e&&(Y=e),z||N(e,W,h)}catch(e){console.error(e)}})),Y&&P(W,h,E,Y),h.selectionElement)try{(0,u.lw)(h.selectionElement,y,W,E,h)}catch(e){console.error(e)}(0,m.N1)(h)&&h.suggestedBindings.filter((function(e){return null!=e})).forEach((function(e){Z(W,E,e)}));var V,G=(0,s.eD)(n,h);if(1===G.length&&(null===(t=h.editingLinearElement)||void 0===t?void 0:t.elementId)===G[0].id&&P(W,h,E,G[0]),h.selectedLinearElement&&h.selectedLinearElement.hoverPointIndex>=0&&function(e,t,n){var r,o,i=t.selectedLinearElement,a=i.elementId,l=i.hoverPointIndex;if(null===(r=t.editingLinearElement)||void 0===r||null===(o=r.selectedPointsIndices)||void 0===o||!o.includes(l)){var c=f._.getElement(a);if(c){var s=f._.getPointAtIndexGlobalCoordinates(c,l);e.save(),e.translate(n.scrollX,n.scrollY),T(s,e,n),e.restore()}}}(W,h,E),M&&!h.multiElement&&!h.editingLinearElement){var X,q=(0,g.oY)(G,h),$=G.map((function(e){return e.id}));if(1===G.length&&(0,x.bt)(G[0])&&(null===(X=h.selectedLinearElement)||void 0===X?void 0:X.elementId)===G[0].id&&!G[0].locked&&P(W,h,E,G[0]),q){var J,Q=n.reduce((function(e,t){var n=[];if($.includes(t.id)&&!(0,p.zq)(h,t)&&n.push(H),E.remoteSelectedElementIds[t.id]&&n.push.apply(n,(0,i.Z)(E.remoteSelectedElementIds[t.id].map((function(e){return(0,d.X)(e,h).background})))),n.length){var r=(0,l.qf)(t,!0),a=(0,o.Z)(r,6),c=a[0],s=a[1],u=a[2],f=a[3],m=a[4],g=a[5];e.push({angle:t.angle,elementX1:c,elementY1:s,elementX2:u,elementY2:f,selectionColors:n,dashed:!!E.remoteSelectedElementIds[t.id],cx:m,cy:g})}return e}),[]),ee=function(e){var t=(0,p.Fb)(n,e),r=(0,l.KP)(t),i=(0,o.Z)(r,4),c=i[0],s=i[1],u=i[2],d=i[3];Q.push({angle:0,elementX1:c,elementX2:u,elementY1:s,elementY2:d,selectionColors:[a.black],dashed:!0,cx:c+(u-c)/2,cy:s+(d-s)/2})},te=w((0,p.iJ)(h));try{for(te.s();!(J=te.n()).done;){ee(J.value)}}catch(e){te.e(e)}finally{te.f()}h.editingGroupId&&ee(h.editingGroupId),Q.forEach((function(e){return L(W,E,e)}))}if(W.save(),W.translate(E.scrollX,E.scrollY),1===G.length){W.fillStyle=a.white;var ne=(0,l.PC)(G[0],E.zoom,"mouse");!h.viewModeEnabled&&q&&A(W,E,ne,G[0].angle)}else if(G.length>1&&!h.isRotating){var re=2*S/E.zoom.value;W.fillStyle=a.white;var oe=(0,l.KP)(G),ie=(0,o.Z)(oe,4),ae=ie[0],le=ie[1],ce=ie[2],se=ie[3],ue=W.getLineDash();W.setLineDash([2/E.zoom.value]);var de=W.lineWidth;W.lineWidth=1/E.zoom.value,W.strokeStyle=H,O(W,ae-re,le-re,ce-ae+2*re,se-le+2*re,(ae+ce)/2,(le+se)/2,0),W.lineWidth=de,W.setLineDash(ue);var fe=(0,l.kK)([ae,le,ce,se,(ae+ce)/2,(le+se)/2],0,E.zoom,"mouse",l.ox);G.some((function(e){return!e.locked}))&&A(W,E,fe,0)}W.restore()}for(var pe in W.restore(),E.remotePointerViewportCoords){var he=E.remotePointerViewportCoords[pe],me=he.x,ge=he.y;me-=h.offsetLeft,ge-=h.offsetTop;var ve=me<0||me>F-9||ge<0||ge>U-14;me=Math.max(me,0),me=Math.min(me,F-9),ge=Math.max(ge,0),ge=Math.min(ge,U-14);var be=(0,d.X)(pe,h),ye=be.background,xe=be.stroke;W.save(),W.strokeStyle=xe,W.fillStyle=ye;var we=E.remotePointerUserStates[pe];(ve||we===r.AWAY)&&(W.globalAlpha=.48),E.remotePointerButton&&"down"===E.remotePointerButton[pe]&&(W.beginPath(),W.arc(me,ge,15,0,2*Math.PI,!1),W.lineWidth=3,W.strokeStyle="#ffffff88",W.stroke(),W.closePath(),W.beginPath(),W.arc(me,ge,15,0,2*Math.PI,!1),W.lineWidth=1,W.strokeStyle=xe,W.stroke(),W.closePath()),W.beginPath(),W.moveTo(me,ge),W.lineTo(me+1,ge+14),W.lineTo(me+4,ge+9),W.lineTo(me+9,ge+10),W.lineTo(me,ge),W.fill(),W.stroke();var ke=E.remotePointerUsernames[pe],Ee="";we===r.AWAY?Ee=j?"⚫️":" (".concat(r.AWAY,")"):we===r.IDLE&&(Ee=j?"💤":" (".concat(r.IDLE,")"));var je="".concat(ke||"").concat(Ee?" ".concat(Ee):"");if(!ve&&je){var Se=me+9,Oe=ge+14,_e=W.measureText(je),Ce=_e.actualBoundingBoxDescent+_e.actualBoundingBoxAscent,Pe=Se-1,Te=Oe-1,Ie=_e.width+8+2,Me=Ce+8+2;W.roundRect?(W.beginPath(),W.roundRect(Pe,Te,Ie,Me,4/E.zoom.value),W.fillStyle=ye,W.fill(),W.fillStyle=xe,W.stroke()):(W.fillStyle=xe,W.fillRect(Pe,Te,Ie,Me),W.fillStyle=ye,W.fillRect(Se,Oe,Ie-2,Me-2)),W.fillStyle=a.white,W.fillText(je,Se+4,Oe+4+_e.actualBoundingBoxAscent)}W.restore(),W.closePath()}return C&&(V=(0,c.tJ)(n,F,U,E),W.save(),W.fillStyle=c.w1,W.strokeStyle="rgba(255,255,255,0.8)",[V.horizontal,V.vertical].forEach((function(e){e&&function(e,t,n,r,o,i){e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+r-i,n),e.quadraticCurveTo(t+r,n,t+r,n+i),e.lineTo(t+r,n+o-i),e.quadraticCurveTo(t+r,n+o,t+r-i,n+o),e.lineTo(t+i,n+o),e.quadraticCurveTo(t,n+o,t,n+o-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath(),e.fill(),e.stroke()}(W,e.x,e.y,e.width,e.height,c.nn/2)})),W.restore()),W.restore(),{atLeastOneVisibleElement:K.length>0,scrollBars:V}},M=(0,v.hR)((function(e){var t,n=I(e);null===(t=e.callback)||void 0===t||t.call(e,n)}),{trailing:!0}),D=function(e,t){var n;if(!t){var r=I(e);return null===(n=e.callback)||void 0===n||n.call(e,r),r}M(e)},A=function(e,t,n,r){Object.keys(n).forEach((function(i){var a=n[i];if(void 0!==a){var l=(0,o.Z)(a,4),c=l[0],s=l[1],u=l[2],d=l[3];e.save(),e.lineWidth=1/t.zoom.value,t.selectionColor&&(e.strokeStyle=t.selectionColor),"rotation"===i?_(e,c+u/2,s+d/2,u/2):e.roundRect?(e.beginPath(),e.roundRect(c,s,u,d,2/t.zoom.value),e.fill(),e.stroke()):O(e,c,s,u,d,c+u/2,s+d/2,r,!0),e.restore()}}))},L=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2*S,o=n.angle,i=n.elementX1,a=n.elementY1,l=n.elementX2,c=n.elementY2,s=n.selectionColors,u=n.cx,d=n.cy,f=n.dashed,p=l-i,h=c-a,m=r/t.zoom.value,g=8/t.zoom.value,v=4/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=1/t.zoom.value;for(var b=s.length,y=0;y<b;++y)e.strokeStyle=s[y],f&&e.setLineDash([g,v+(g+v)*(b-1)]),e.lineDashOffset=(g+v)*y,O(e,i-m,a-m,p+2*m,h+2*m,u,d,o);e.restore()},Z=function(e,t,n){var r=Array.isArray(n)?z:R;e.save(),e.translate(t.scrollX,t.scrollY),r(e,n),e.restore()},R=function(e,t){var n=(0,l.qf)(t),r=(0,o.Z)(n,4),i=r[0],a=r[1],c=r[2]-i,s=r[3]-a,u=(0,h.fb)(t,c,s);e.strokeStyle="rgba(0,0,0,.05)",e.lineWidth=u-4;var d=2+u/2;switch(t.type){case"rectangle":case"text":case"image":O(e,i-d,a-d,c+2*d,s+2*d,i+c/2,a+s/2,t.angle);break;case"diamond":var f=Math.hypot(c,s);!function(e,t,n,r,o,i){e.save(),e.translate(r,o),e.rotate(i),e.beginPath(),e.moveTo(0,n/2),e.lineTo(t/2,0),e.lineTo(0,-n/2),e.lineTo(-t/2,0),e.closePath(),e.stroke(),e.restore()}(e,c+2*(d*f/s),s+2*(d*f/c),i+c/2,a+s/2,t.angle);break;case"ellipse":!function(e,t,n,r,o,i){e.beginPath(),e.ellipse(r,o,t/2,n/2,i,0,2*Math.PI),e.stroke()}(e,c+2*d,s+2*d,i+c/2,a+s/2,t.angle)}},z=function(e,t){var n=(0,o.Z)(t,3),r=n[0],i=n[1],a=n[2],l=(0,h.fb)(a,a.width,a.height);e.strokeStyle="rgba(0,0,0,0)",e.fillStyle="rgba(0,0,0,.05)",("both"===i?[0,-1]:"start"===i?[0]:[-1]).forEach((function(t){var n=f._.getPointAtIndexGlobalCoordinates(r,t),i=(0,o.Z)(n,2),a=i[0],c=i[1];_(e,a,c,l)}))},N=function(e,t,n){if(e.link&&!n.selectedElementIds[e.id]){var r=(0,l.qf)(e),i=(0,o.Z)(r,4),a=i[0],c=i[1],s=i[2],u=i[3],d=(0,y.sw)([a,c,s,u],e.angle,n),f=(0,o.Z)(d,4),p=f[0],h=f[1],m=f[2],g=f[3],v=p+m/2,b=h+g/2;if(t.save(),t.translate(n.scrollX+v,n.scrollY+b),t.rotate(e.angle),E&&E.zoom===n.zoom.value)t.drawImage(E,p-v,h-b,m,g);else{(E=document.createElement("canvas")).zoom=n.zoom.value,E.width=m*window.devicePixelRatio*n.zoom.value,E.height=g*window.devicePixelRatio*n.zoom.value;var x=E.getContext("2d");x.scale(window.devicePixelRatio*n.zoom.value,window.devicePixelRatio*n.zoom.value),x.fillStyle="#fff",x.fillRect(0,0,m,g),x.drawImage(y.rj,0,0,m,g),x.restore(),t.drawImage(E,p-v,h-b,m,g)}t.restore()}},B=function(e,t,n,r){var i=(0,l.Pi)(e),a=(0,o.Z)(i,4),c=a[0],s=a[1],u=a[2],d=a[3],f=(0,v.dE)({clientX:r.offsetLeft,clientY:r.offsetTop},r),p=(0,v.dE)({clientX:r.offsetLeft+t,clientY:r.offsetTop+n},r);return f.x<=u&&f.y<=d&&p.x>=c&&p.y>=s},H=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=o.offsetX,a=void 0===i?0:i,l=o.offsetY,c=void 0===l?0:l,s=o.exportWithDarkMode,d=void 0!==s&&s;n&&e.forEach((function(e,o){if(!e.isDeleted)try{(0,u.Rg)(e,t,n,r,e.x+a,e.y+c,d)}catch(e){console.error(e)}}))}},1564:function(e,t,n){"use strict";var r=n(1930),o=n(8821),i=n(5169),a=n(1047),l=function(e){return"string"==typeof e},c=function(){function e(){(0,o.Z)(this,e),this.callbacks=new Set,this.nonDeletedElements=[],this.elements=[],this.elementsMap=new Map}return(0,i.Z)(e,[{key:"getElementsIncludingDeleted",value:function(){return this.elements}},{key:"getNonDeletedElements",value:function(){return this.nonDeletedElements}},{key:"getElement",value:function(e){return this.elementsMap.get(e)||null}},{key:"getNonDeletedElement",value:function(e){var t=this.getElement(e);return t&&(0,a.qP)(t)?t:null}},{key:"mapElements",value:function(e){var t=!1,n=this.elements.map((function(n){var r=e(n);return r!==n&&(t=!0),r}));return t&&this.replaceAllElements(n),t}},{key:"replaceAllElements",value:function(t){var n=this;this.elements=t,this.elementsMap.clear(),t.forEach((function(t){n.elementsMap.set(t.id,t),e.mapElementToScene(t,n)})),this.nonDeletedElements=(0,a.Lm)(this.elements),this.informMutation()}},{key:"informMutation",value:function(){for(var e=0,t=Array.from(this.callbacks);e<t.length;e++){(0,t[e])()}}},{key:"addCallback",value:function(e){var t=this;if(this.callbacks.has(e))throw new Error;return this.callbacks.add(e),function(){if(!t.callbacks.has(e))throw new Error;t.callbacks.delete(e)}}},{key:"destroy",value:function(){var t=this;e.sceneMapById.forEach((function(n,r){n===t&&e.sceneMapById.delete(r)})),this.callbacks.clear()}},{key:"insertElementAtIndex",value:function(e,t){if(!Number.isFinite(t)||t<0)throw new Error("insertElementAtIndex can only be called with index >= 0");var n=[].concat((0,r.Z)(this.elements.slice(0,t)),[e],(0,r.Z)(this.elements.slice(t)));this.replaceAllElements(n)}},{key:"getElementIndex",value:function(e){return this.elements.findIndex((function(t){return t.id===e}))}}],[{key:"mapElementToScene",value:function(e,t){l(e)?this.sceneMapById.set(e,t):(this.sceneMapByElement.set(e,t),this.sceneMapById.set(e.id,t))}},{key:"getScene",value:function(e){return l(e)?this.sceneMapById.get(e)||null:this.sceneMapByElement.get(e)||null}}]),e}();c.sceneMapByElement=new WeakMap,c.sceneMapById=new Map,t.Z=c},8120:function(e,t,n){"use strict";n.d(t,{$b:function(){return r},CJ:function(){return d},M9:function(){return a},PD:function(){return o},QG:function(){return u},Un:function(){return s},Zd:function(){return i},bZ:function(){return c},sh:function(){return l}});var r=function(e){return"rectangle"===e||"ellipse"===e||"diamond"===e||"line"===e||"freedraw"===e},o=function(e){return"image"!==e},i=function(e){return"rectangle"===e||"ellipse"===e||"diamond"===e||"freedraw"===e||"arrow"===e||"line"===e},a=function(e){return"rectangle"===e||"ellipse"===e||"diamond"===e||"arrow"===e||"line"===e},l=function(e){return"rectangle"===e||"arrow"===e||"line"===e||"diamond"===e},c=function(e){return"text"===e},s=function(e){return"arrow"===e},u=function(e,t){for(var n=null,r=e.length-1;r>=0;--r){var o=e[r];if(!o.isDeleted&&t(o)){n=o;break}}return n},d=function(e,t){return e.filter((function(e){return!e.isDeleted&&t(e)}))}},4162:function(e,t,n){"use strict";n.d(t,{$D:function(){return v},Cg:function(){return y},NL:function(){return g},oj:function(){return m}});var r=n(2577),o=n(8950),i=n(2975),a=n.n(i),l=n(8234),c=n(8925),s=n(3547),u=n(6340),d=n(2335),f=n(8897),p=n(5523),h=n(5637),m="\x3c!-- svg-source:excalidraw --\x3e",g=function(){var e=(0,o.Z)(a().mark((function e(t,n,o,i){var c,u,p,m,g,v,y,x,w,k,E,j,S,O,_,C,P,T,I=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=i.exportBackground,u=i.exportPadding,p=void 0===u?d.qy:u,m=i.viewBackgroundColor,g=I.length>4&&void 0!==I[4]?I[4]:function(e,t){var r=document.createElement("canvas");return r.width=e*n.exportScale,r.height=t*n.exportScale,{canvas:r,scale:n.exportScale}},v=b(t,p),y=(0,r.Z)(v,4),x=y[0],w=y[1],k=y[2],E=y[3],j=g(k,E),S=j.canvas,O=j.scale,_=void 0===O?1:O,C=(0,f.im)(),e.next=7,(0,h.Xx)({imageCache:new Map,fileIds:(0,h.oA)(t).map((function(e){return e.fileId})),files:o});case 7:return P=e.sent,T=P.imageCache,(0,s.Eu)({elements:t,appState:n,scale:_,rc:l.Z.canvas(S),canvas:S,renderConfig:{viewBackgroundColor:c?m:null,scrollX:-x+p,scrollY:-w+p,zoom:C.zoom,remotePointerViewportCoords:{},remoteSelectedElementIds:{},shouldCacheIgnoreZoom:!1,remotePointerUsernames:{},remotePointerUserStates:{},theme:n.exportWithDarkMode?"dark":"light",imageCache:T,renderScrollbars:!1,renderSelection:!1,renderGrid:!1,isExporting:!0}}),e.abrupt("return",S);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),v=function(){var e=(0,o.Z)(a().mark((function e(t,o,i,c){var u,f,h,g,v,y,x,w,k,E,j,S,O,_,C,P,T,I,M;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=o.exportPadding,f=void 0===u?d.qy:u,h=o.viewBackgroundColor,g=o.exportScale,v=void 0===g?1:g,y=o.exportEmbedScene,x="",!y){e.next=14;break}return e.prev=3,e.next=6,Promise.resolve().then(n.bind(n,673));case 6:return e.next=8,e.sent.encodeSvgMetadata({text:null!=c&&c.serializeAsJSON?null==c||null===(w=c.serializeAsJSON)||void 0===w?void 0:w.call(c):(0,p.I_)(t,o,i||{},"local")});case 8:x=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),console.error(e.t0);case 14:return k=b(t,f),E=(0,r.Z)(k,4),j=E[0],S=E[1],O=E[2],_=E[3],(C=document.createElementNS(d.hR,"svg")).setAttribute("version","1.1"),C.setAttribute("xmlns",d.hR),C.setAttribute("viewBox","0 0 ".concat(O," ").concat(_)),C.setAttribute("width","".concat(O*v)),C.setAttribute("height","".concat(_*v)),o.exportWithDarkMode&&C.setAttribute("filter",d.ZF),P="https://excalidraw.com/",P=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.15.2-a89952e"),null!==(T=P)&&void 0!==T&&T.startsWith("/")&&(P=P.replace("/","".concat(window.location.origin,"/"))),P="".concat(P,"/dist/excalidraw-assets/"),C.innerHTML="\n ".concat(m,"\n ").concat(x,'\n <defs>\n <style class="style-fonts">\n @font-face {\n font-family: "Virgil";\n src: url("').concat(P,'Virgil.woff2");\n }\n @font-face {\n font-family: "Cascadia";\n src: url("').concat(P,'Cascadia.woff2");\n }\n </style>\n </defs>\n '),o.exportBackground&&h&&((I=C.ownerDocument.createElementNS(d.hR,"rect")).setAttribute("x","0"),I.setAttribute("y","0"),I.setAttribute("width","".concat(O)),I.setAttribute("height","".concat(_)),I.setAttribute("fill",h),C.appendChild(I)),M=l.Z.svg(C),(0,s.M_)(t,M,C,i||{},{offsetX:-j+f,offsetY:-S+f,exportWithDarkMode:o.exportWithDarkMode}),e.abrupt("return",C);case 29:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,n,r,o){return e.apply(this,arguments)}}(),b=function(e,t){var n=(0,c.KP)(e),o=(0,r.Z)(n,4),i=o[0],a=o[1],l=o[2],s=o[3];return[i,a,(0,u.TE)(i,l)+2*t,(0,u.TE)(a,s)+t+t]},y=function(e,t,n){var o=b(e,t).map((function(e){return Math.trunc(e*n)})),i=(0,r.Z)(o,4);return[i[2],i[3]]}},75:function(e,t,n){"use strict";n.d(t,{$b:function(){return a.$b},CJ:function(){return a.CJ},M9:function(){return a.M9},N:function(){return o.N},PR:function(){return o.PR},QG:function(){return a.QG},Un:function(){return a.Un},W:function(){return i.W},Yp:function(){return o.Yp},Zd:function(){return a.Zd},Zs:function(){return o.Zs},_4:function(){return r._4},bZ:function(){return a.bZ},eD:function(){return o.eD},j:function(){return l.j},sh:function(){return a.sh}});var r=n(756),o=n(1868),i=n(2264),a=n(8120),l=n(746)},2264:function(e,t,n){"use strict";n.d(t,{W:function(){return l},s:function(){return a}});var r=n(2577),o=n(1047),i=n(6340),a=function(e){var t=e.scenePoint,n=e.viewportDimensions,r=e.zoom;return{scrollX:n.width/2/r.value-t.x,scrollY:n.height/2/r.value-t.y}},l=function(e,t,n){if(!(e=(0,o.n_)(e)).length)return{scrollX:0,scrollY:0};var l=(0,o.KP)(e),c=(0,r.Z)(l,4),s=c[0],u=c[1],d=c[2],f=c[3];if(function(e,t,n){var o=(0,r.Z)(n,4),a=o[0],l=o[1],c=o[2],s=o[3],u=(0,i._i)({sceneX:a,sceneY:l},e),d=u.x,f=u.y,p=(0,i._i)({sceneX:c,sceneY:s},e),h=p.x,m=p.y;return h-d>e.width||m-f>e.height}(t,0,[s,u,d,f])){var p=(0,o.os)(e,(0,i.dE)({clientX:t.scrollX,clientY:t.scrollY},t)),h=(0,r.Z)(p,4);s=h[0],u=h[1],d=h[2],f=h[3]}return a({scenePoint:{x:(s+d)/2,y:(u+f)/2},viewportDimensions:{width:t.width,height:t.height},zoom:t.zoom})}},756:function(e,t,n){"use strict";n.d(t,{WM:function(){return l},_4:function(){return d},nn:function(){return c},tJ:function(){return u},w1:function(){return s}});var r=n(2577),o=n(1047),i=n(6340),a=n(8211),l=4,c=6,s="rgba(0,0,0,0.3)",u=function(e,t,n,s){var u=s.scrollX,d=s.scrollY,f=s.zoom;if(0===e.length)return{horizontal:null,vertical:null};var p=(0,o.KP)(e),h=(0,r.Z)(p,4),m=h[0],g=h[1],v=h[2],b=h[3],y=t/f.value,x=n/f.value,w=t-y,k=n-x,E={top:parseInt((0,i.IH)("sat")),bottom:parseInt((0,i.IH)("sab")),left:parseInt((0,i.IH)("sal")),right:parseInt((0,i.IH)("sar"))},j=(0,a.G3)().rtl,S=w/2-u+E.left,O=k/2-d+E.top,_=S+y-E.right,C=O+x-E.bottom,P=Math.min(m,S),T=Math.min(g,O),I=Math.max(v,_),M=Math.max(b,C);return{horizontal:S===P&&_===I?null:{x:Math.max(E.left,l)+(S-P)/(I-P)*t,y:n-c-Math.max(l,E.bottom),width:(_-S)/(I-P)*t-Math.max(2*l,E.left+E.right),height:c},vertical:O===T&&C===M?null:{x:j?Math.max(E.left,l):t-c-Math.max(E.right,l),y:(O-T)/(M-T)*n+Math.max(E.top,l),width:c,height:(C-O)/(M-T)*n-Math.max(2*l,E.top+E.bottom)}}},d=function(e,t,n){var o=[e.horizontal,e.vertical].map((function(e){return null!=e&&e.x<=t&&t<=e.x+e.width&&e.y<=n&&n<=e.y+e.height})),i=(0,r.Z)(o,2),a=i[0],l=i[1];return{isOverEither:a||l,isOverHorizontal:a,isOverVertical:l}}},1868:function(e,t,n){"use strict";n.d(t,{N:function(){return l},PR:function(){return c},Yp:function(){return a},Zs:function(){return u},eD:function(){return s}});var r=n(2577),o=n(1047),i=n(1974),a=function(e,t){var n=(0,o.qf)(t),a=(0,r.Z)(n,4),l=a[0],c=a[1],s=a[2],u=a[3];return e.filter((function(e){var t=(0,o.Pi)(e),n=(0,r.Z)(t,4),a=n[0],d=n[1],f=n[2],p=n[3];return!1===e.locked&&"selection"!==e.type&&!(0,i.Xh)(e)&&l<=a&&c<=d&&s>=f&&u>=p}))},l=function(e,t){return e.some((function(e){return t.selectedElementIds[e.id]}))},c=function(e,t,n){var r=Array.from(new Set(s(e,t).map((function(e){return n(e)}))));return 1===r.length?r[0]:null},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.filter((function(e){return t.selectedElementIds[e.id]||n&&(0,i.Xh)(e)&&t.selectedElementIds[null==e?void 0:e.containerId]?e:null}))},u=function(e,t){return t.editingElement?[t.editingElement]:s(e,t,!0)}},746:function(e,t,n){"use strict";n.d(t,{E:function(){return i},j:function(){return o}});var r=n(2335),o=function(e){return Math.max(r.Zj,Math.min(e,30))},i=function(e,t){var n=e.viewportX,r=e.viewportY,o=e.nextZoom,i=n-t.offsetLeft,a=r-t.offsetTop,l=t.zoom.value;return{scrollX:t.scrollX+(i-i/l)+-(i-i/o),scrollY:t.scrollY+(a-a/l)+-(a-a/o),zoom:{value:o}}}},6340:function(e,t,n){"use strict";n.d(t,{$9:function(){return $},$g:function(){return x},$h:function(){return ce},AK:function(){return U},B4:function(){return _},C3:function(){return ne},Ds:function(){return k},FG:function(){return K},Fc:function(){return m},G3:function(){return te},I4:function(){return oe},IH:function(){return H},Ip:function(){return Q},KJ:function(){return M},Mj:function(){return fe},OF:function(){return D},Om:function(){return T},Oo:function(){return g},PI:function(){return X},Pr:function(){return R},Q5:function(){return J},Qm:function(){return G},TE:function(){return P},Uk:function(){return A},_Z:function(){return b},_i:function(){return B},ag:function(){return ae},cx:function(){return Y},dE:function(){return N},dZ:function(){return F},h2:function(){return ie},hR:function(){return E},mO:function(){return w},qr:function(){return V},qz:function(){return ee},rB:function(){return L},s:function(){return y},tH:function(){return q},uY:function(){return z},v4:function(){return le},w8:function(){return de},wO:function(){return v},wo:function(){return Z},xn:function(){return re},xp:function(){return ue},y8:function(){return se},yo:function(){return C},z8:function(){return I}});var r=n(6655),o=n(7169),i=n(1930),a=n(2577),l=n(5284),c=n(56),s=n(2335),u=n(5156),d=n(8897);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=null,m=function(){if(h)return h;var e=new Date,t=e.getFullYear(),n="".concat(e.getMonth()+1).padStart(2,"0"),r="".concat(e.getDate()).padStart(2,"0"),o="".concat(e.getHours()).padStart(2,"0"),i="".concat(e.getMinutes()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(r,"-").concat(o).concat(i)},g=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},v=function(e){return e instanceof HTMLElement&&e.className.includes("ToolIcon")},b=function(e){return e instanceof HTMLElement&&"wysiwyg"===e.dataset.type||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement},y=function(e){return e instanceof HTMLElement&&"wysiwyg"===e.dataset.type||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&("text"===e.type||"number"===e.type)},x=function(e){for(var t=e.fontFamily,n=0,r=Object.entries(s.ut);n<r.length;n++){var o=(0,a.Z)(r[n],2),i=o[0];if(o[1]===t)return"".concat(i,", ").concat(s._D)}return s._D},w=function(e){var t=e.fontSize,n=e.fontFamily;return"".concat(t,"px ").concat(x({fontFamily:n}))},k=function(e,t){var n=0,r=null,o=function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r=i,clearTimeout(n),n=window.setTimeout((function(){r=null,e.apply(void 0,i)}),t)};return o.flush=function(){if(clearTimeout(n),r){var t=r;r=null,e.apply(void 0,(0,i.Z)(t))}},o.cancel=function(){r=null,clearTimeout(n)},o},E=function(e,t){var n=null,r=null,o=null,a=function t(a){n=window.requestAnimationFrame((function(){n=null,e.apply(void 0,(0,i.Z)(a)),r=null,o&&(r=o,o=null,t(r))}))},l=function(){for(var e=arguments.length,i=new Array(e),l=0;l<e;l++)i[l]=arguments[l];r=i,null===n?a(r):null!=t&&t.trailing&&(o=i)};return l.flush=function(){null!==n&&(cancelAnimationFrame(n),n=null),r&&(e.apply(void 0,(0,i.Z)(o||r)),r=o=null)},l.cancel=function(){r=o=null,null!==n&&(cancelAnimationFrame(n),n=null)},l};function j(e){return 1-Math.pow(1-e,4)}var S,O,_=function(e,t,n,r){var o,a=!1,l=0,c=(null==r?void 0:r.duration)||250,s=(null==r?void 0:r.easeFn)||j;return l=window.requestAnimationFrame((function r(u){if(!a){void 0===o&&(o=u);var d=u-o;if(d<c){var f=s(d/c),p=e.map((function(e,n){return(t[n]-e)*f+e}));n.apply(void 0,(0,i.Z)(p)),l=window.requestAnimationFrame(r)}else n.apply(void 0,(0,i.Z)(t))}})),function(){a=!0,window.cancelAnimationFrame(l)}},C=function(e,t){if(!e.length||t<1)return[];for(var n=0,r=0,o=Array(Math.ceil(e.length/t));n<e.length;)o[r++]=e.slice(n,n+=t);return o},P=function(e,t){return Math.abs(e-t)},T=function(e,t){return"custom"===t.type?p(p({},e.activeTool),{},{type:"custom",customType:t.customType}):p(p({},e.activeTool),{},{lastActiveTool:void 0===t.lastActiveToolBeforeEraser?e.activeTool.lastActiveTool:t.lastActiveToolBeforeEraser,type:t.type,customType:null})},I=function(e){e&&(e.style.cursor="")},M=function(e,t){e&&(e.style.cursor=t)},D=function(e,t){S&&S.theme===t||function(){var e=t===s.C6.DARK;(S=document.createElement("canvas")).theme=t,S.height=20,S.width=20;var n=S.getContext("2d");n.lineWidth=1,n.beginPath(),n.arc(S.width/2,S.height/2,5,0,2*Math.PI),n.fillStyle=e?l.black:l.white,n.fill(),n.strokeStyle=e?l.white:l.black,n.stroke(),O=S.toDataURL(s.LO.svg)}(),M(e,"url(".concat(O,") ").concat(10," ").concat(10,", auto"))},A=function(e,t){e&&("selection"===t.activeTool.type?I(e):(0,d.l$)(t)?e.style.cursor=s.oc.GRAB:(0,d.EN)(t)?D(e,t.theme):["image","custom"].includes(t.activeTool.type)||(e.style.cursor=s.oc.CROSSHAIR))},L=function(){var e;return"HTML"===(null===(e=document.fullscreenElement)||void 0===e?void 0:e.nodeName)},Z=function(){return document.documentElement.requestFullscreen()},R=function(){return document.exitFullscreen()},z=function(e){return e=e.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter"),s.Um?e.replace(/\bCtrlOrCmd\b/gi,"Cmd").replace(/\bAlt\b/i,"Option"):e.replace(/\bCtrlOrCmd\b/gi,"Ctrl")},N=function(e,t){var n=e.clientX,r=e.clientY,o=t.zoom,i=t.offsetLeft,a=t.offsetTop,l=t.scrollX,c=t.scrollY;return{x:(n-i)/o.value-l,y:(r-a)/o.value-c}},B=function(e,t){var n=e.sceneX,r=e.sceneY,o=t.zoom,i=t.offsetLeft,a=t.offsetTop,l=t.scrollX,c=t.scrollY;return{x:(n+l)*o.value+i,y:(r+c)*o.value+a}},H=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},W=new RegExp("^[^".concat("A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿Ⰰ-﬜﷾-﹯﻽-￿","]*[").concat("֑-߿יִ-﷽ﹰ-ﻼ","]")),F=function(e){return W.test(e)},U=function(e){var t=(0,a.Z)(e,2);return{x:t[0],y:t[1]}},K=function(e){if("AbortError"!==(null==e?void 0:e.name))throw e;console.warn(e)},Y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;n<0&&(n=e.length+n);for(var r=(n=Math.min(e.length,Math.max(n,0)))-1;++r<e.length;)if(t(e[r],r,e))return r;return-1},V=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-1;n<0&&(n=e.length+n);for(var r=(n=Math.min(e.length-1,Math.max(n,0)))+1;--r>-1;)if(t(e[r],r,e))return r;return-1},G=function(e){var t=5===e.length&&"0"===e.substr(4,1),n=9===e.length&&"00"===e.substr(7,2);return t||n||e===c.HO.transparent},X=function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n},q=function(e){return function(t){(0,u.unstable_batchedUpdates)(e,t)}},$=function(e){return E((function(t){(0,u.unstable_batchedUpdates)(e,t)}))},J=function(){var e=document.createElement("canvas").getContext("2d");if(!e)return!1;return e.fillStyle="#f00",e.textBaseline="top",e.font="32px Arial",e.fillText("😀",0,0),0!==e.getImageData(12,12,1,1).data[0]},Q=function(e){for(var t=e.parentElement;t;){if(t===document.body)return document;var n=window.getComputedStyle(t).overflowY;if(t.scrollHeight>t.clientHeight&&("auto"===n||"scroll"===n||"overlay"===n))return t;t=t.parentElement}return document},ee=function(e){for(var t=e.parentElement;t;){if(t.tabIndex>-1)return void t.focus();t=t.parentElement}},te=function(e){return Array.from(e).map((function(e){return"0".concat(e.toString(16)).slice(-2)})).join("")},ne=function(){return ie()?1:Date.now()},re=function(e){return e.reduce((function(e,t){return e.set("string"==typeof t?t:t.id,t),e}),new Map)},oe=function(e){return e.reduce((function(e,t,n){return e.set(t.id,[t,n]),e}),new Map)},ie=function(){return!1},ae=function(e,t){return new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0})},le=function(e,t){var n=!1;for(var o in t){var i=t[o];if(void 0!==i){if(e[o]===i&&("object"!==(0,r.Z)(i)||null===i))continue;n=!0}}return n?p(p({},e),t):e},ce=function(){try{return window.self===window.top?"top":"iframe"}catch(e){return"iframe"}},se=function(e){return!!e&&"object"===(0,r.Z)(e)&&"then"in e&&"catch"in e&&"finally"in e},ue=function(e){var t=null==e?void 0:e.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter((function(e){return e.tabIndex>-1&&!e.disabled})):[]},de=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Object.keys(e),i=Object.keys(t);return o.length===i.length&&o.every((function(o){var i=null==n?void 0:n[o],a=i?i(e[o],t[o]):e[o]===t[o];return!a&&r&&console.info("%cisShallowEqual: ".concat(o," not equal ->"),"color: #8B4000",e[o],t[o]),a}))},fe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.checkForDefaultPrevented,o=void 0===r||r;return function(n){if(null==e||e(n),!o||!n.defaultPrevented)return null==t?void 0:t(n)}}},9669:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg=="},7984:function(e){"use strict";e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},1639:function(e){"use strict";e.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path fill="%23ced4da" d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},9729:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-Bold.woff2"},1273:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-Medium.woff2"},8303:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-Regular.woff2"},9577:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Assistant-SemiBold.woff2"},3147:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Cascadia.woff2"},3940:function(e,t,n){"use strict";e.exports=n.p+"excalidraw-assets/Virgil.woff2"},9787:function(t){"use strict";t.exports=e},5156:function(e){"use strict";e.exports=t},9649:function(e,t,n){var r=n(8114).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",s=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),l=new C(r||[]);return a(i,"_invoke",{value:j(e,n,l)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h={};function m(){}function g(){}function v(){}var b={};d(b,c,(function(){return this}));var y=Object.getPrototypeOf,x=y&&y(y(P([])));x&&x!==n&&i.call(x,c)&&(b=x);var w=v.prototype=m.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,a,l,c){var s=p(e[o],e,a);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==r(d)&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,l,c)}),(function(e){n("throw",e,l,c)})):t.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return n("throw",e,l,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function j(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return T()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=S(a,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=p(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function S(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=p(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return g.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:g,configurable:!0}),g.displayName=d(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,d(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},k(E.prototype),d(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(f(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(w),d(w,u,"Generator"),d(w,c,(function(){return this})),d(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},8114:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2975:function(e,t,n){var r=n(9649)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},7017:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},3173:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},8950:function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function l(e){r(a,o,i,l,c,"next",e)}function c(e){r(a,o,i,l,c,"throw",e)}l(void 0)}))}}n.d(t,{Z:function(){return o}})},8821:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},5169:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(3525);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(0,r.Z)(o.key),o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},7169:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(3525);function o(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},11:function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:function(){return r}})},2312:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},2248:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(5901);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},2726:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{Z:function(){return r}})},7245:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(6655),o=n(3173);function i(e,t){if(t&&("object"===(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}},5901:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},2577:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9139);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},1930:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(7017);var o=n(9139);function i(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},3525:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(6655);function o(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==(0,r.Z)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},6655:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},9139:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7017);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},5605:function(e,t,n){"use strict";n.d(t,{x0:function(){return r}});let r=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")},5284:function(e){"use strict";e.exports=JSON.parse('{"white":"#ffffff","black":"#000000","gray":["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],"red":["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],"pink":["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],"grape":["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],"violet":["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],"indigo":["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],"blue":["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],"cyan":["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],"teal":["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],"green":["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],"lime":["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],"yellow":["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],"orange":["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]}')},1463:function(e){"use strict";e.exports=JSON.parse('{"labels":{"paste":"Paste","pasteAsPlaintext":"Paste as plaintext","pasteCharts":"Paste charts","selectAll":"Select all","multiSelect":"Add element to selection","moveCanvas":"Move canvas","cut":"Cut","copy":"Copy","copyAsPng":"Copy to clipboard as PNG","copyAsSvg":"Copy to clipboard as SVG","copyText":"Copy to clipboard as text","bringForward":"Bring forward","sendToBack":"Send to back","bringToFront":"Bring to front","sendBackward":"Send backward","delete":"Delete","copyStyles":"Copy styles","pasteStyles":"Paste styles","stroke":"Stroke","background":"Background","fill":"Fill","strokeWidth":"Stroke width","strokeStyle":"Stroke style","strokeStyle_solid":"Solid","strokeStyle_dashed":"Dashed","strokeStyle_dotted":"Dotted","sloppiness":"Sloppiness","opacity":"Opacity","textAlign":"Text align","edges":"Edges","sharp":"Sharp","round":"Round","arrowheads":"Arrowheads","arrowhead_none":"None","arrowhead_arrow":"Arrow","arrowhead_bar":"Bar","arrowhead_dot":"Dot","arrowhead_triangle":"Triangle","fontSize":"Font size","fontFamily":"Font family","onlySelected":"Only selected","withBackground":"Background","exportEmbedScene":"Embed scene","exportEmbedScene_details":"Scene data will be saved into the exported PNG/SVG file so that the scene can be restored from it.\\nWill increase exported file size.","addWatermark":"Add \\"Made with Excalidraw\\"","handDrawn":"Hand-drawn","normal":"Normal","code":"Code","small":"Small","medium":"Medium","large":"Large","veryLarge":"Very large","solid":"Solid","hachure":"Hachure","zigzag":"Zigzag","crossHatch":"Cross-hatch","thin":"Thin","bold":"Bold","left":"Left","center":"Center","right":"Right","extraBold":"Extra bold","architect":"Architect","artist":"Artist","cartoonist":"Cartoonist","fileTitle":"File name","colorPicker":"Color picker","canvasColors":"Used on canvas","canvasBackground":"Canvas background","drawingCanvas":"Drawing canvas","layers":"Layers","actions":"Actions","language":"Language","liveCollaboration":"Live collaboration...","duplicateSelection":"Duplicate","untitled":"Untitled","name":"Name","yourName":"Your name","madeWithExcalidraw":"Made with Excalidraw","group":"Group selection","ungroup":"Ungroup selection","collaborators":"Collaborators","showGrid":"Show grid","addToLibrary":"Add to library","removeFromLibrary":"Remove from library","libraryLoadingMessage":"Loading library…","libraries":"Browse libraries","loadingScene":"Loading scene…","align":"Align","alignTop":"Align top","alignBottom":"Align bottom","alignLeft":"Align left","alignRight":"Align right","centerVertically":"Center vertically","centerHorizontally":"Center horizontally","distributeHorizontally":"Distribute horizontally","distributeVertically":"Distribute vertically","flipHorizontal":"Flip horizontal","flipVertical":"Flip vertical","viewMode":"View mode","toggleExportColorScheme":"Toggle export color scheme","share":"Share","showStroke":"Show stroke color picker","showBackground":"Show background color picker","toggleTheme":"Toggle theme","personalLib":"Personal Library","excalidrawLib":"Excalidraw Library","decreaseFontSize":"Decrease font size","increaseFontSize":"Increase font size","unbindText":"Unbind text","bindText":"Bind text to the container","createContainerFromText":"Wrap text in a container","link":{"edit":"Edit link","create":"Create link","label":"Link"},"lineEditor":{"edit":"Edit line","exit":"Exit line editor"},"elementLock":{"lock":"Lock","unlock":"Unlock","lockAll":"Lock all","unlockAll":"Unlock all"},"statusPublished":"Published","sidebarLock":"Keep sidebar open"},"library":{"noItems":"No items added yet...","hint_emptyLibrary":"Select an item on canvas to add it here, or install a library from the public repository, below.","hint_emptyPrivateLibrary":"Select an item on canvas to add it here."},"buttons":{"clearReset":"Reset the canvas","exportJSON":"Export to file","exportImage":"Export image...","export":"Save to...","exportToPng":"Export to PNG","exportToSvg":"Export to SVG","copyToClipboard":"Copy to clipboard","copyPngToClipboard":"Copy PNG to clipboard","scale":"Scale","save":"Save to current file","saveAs":"Save as","load":"Open","getShareableLink":"Get shareable link","close":"Close","selectLanguage":"Select language","scrollBackToContent":"Scroll back to content","zoomIn":"Zoom in","zoomOut":"Zoom out","resetZoom":"Reset zoom","menu":"Menu","done":"Done","edit":"Edit","undo":"Undo","redo":"Redo","resetLibrary":"Reset library","createNewRoom":"Create new room","fullScreen":"Full screen","darkMode":"Dark mode","lightMode":"Light mode","zenMode":"Zen mode","exitZenMode":"Exit zen mode","cancel":"Cancel","clear":"Clear","remove":"Remove","publishLibrary":"Publish","submit":"Submit","confirm":"Confirm"},"alerts":{"clearReset":"This will clear the whole canvas. Are you sure?","couldNotCreateShareableLink":"Couldn\'t create shareable link.","couldNotCreateShareableLinkTooBig":"Couldn\'t create shareable link: the scene is too big","couldNotLoadInvalidFile":"Couldn\'t load invalid file","importBackendFailed":"Importing from backend failed.","cannotExportEmptyCanvas":"Cannot export empty canvas.","couldNotCopyToClipboard":"Couldn\'t copy to clipboard.","decryptFailed":"Couldn\'t decrypt data.","uploadedSecurly":"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can\'t read the content.","loadSceneOverridePrompt":"Loading external drawing will replace your existing content. Do you wish to continue?","collabStopOverridePrompt":"Stopping the session will overwrite your previous, locally stored drawing. Are you sure?\\n\\n(If you want to keep your local drawing, simply close the browser tab instead.)","errorAddingToLibrary":"Couldn\'t add item to the library","errorRemovingFromLibrary":"Couldn\'t remove item from the library","confirmAddLibrary":"This will add {{numShapes}} shape(s) to your library. Are you sure?","imageDoesNotContainScene":"This image does not seem to contain any scene data. Have you enabled scene embedding during export?","cannotRestoreFromImage":"Scene couldn\'t be restored from this image file","invalidSceneUrl":"Couldn\'t import scene from the supplied URL. It\'s either malformed, or doesn\'t contain valid Excalidraw JSON data.","resetLibrary":"This will clear your library. Are you sure?","removeItemsFromsLibrary":"Delete {{count}} item(s) from library?","invalidEncryptionKey":"Encryption key must be of 22 characters. Live collaboration is disabled.","collabOfflineWarning":"No internet connection available.\\nYour changes will not be saved!"},"errors":{"unsupportedFileType":"Unsupported file type.","imageInsertError":"Couldn\'t insert image. Try again later...","fileTooBig":"File is too big. Maximum allowed size is {{maxSize}}.","svgImageInsertError":"Couldn\'t insert SVG image. The SVG markup looks invalid.","invalidSVGString":"Invalid SVG.","cannotResolveCollabServer":"Couldn\'t connect to the collab server. Please reload the page and try again.","importLibraryError":"Couldn\'t load library","collabSaveFailed":"Couldn\'t save to the backend database. If problems persist, you should save your file locally to ensure you don\'t lose your work.","collabSaveFailed_sizeExceeded":"Couldn\'t save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don\'t lose your work.","brave_measure_text_error":{"line1":"Looks like you are using Brave browser with the <bold>Aggressively Block Fingerprinting</bold> setting enabled.","line2":"This could result in breaking the <bold>Text Elements</bold> in your drawings.","line3":"We strongly recommend disabling this setting. You can follow <link>these steps</link> on how to do so.","line4":"If disabling this setting doesn\'t fix the display of text elements, please open an <issueLink>issue</issueLink> on our GitHub, or write us on <discordLink>Discord</discordLink>"}},"toolBar":{"selection":"Selection","image":"Insert image","rectangle":"Rectangle","diamond":"Diamond","ellipse":"Ellipse","arrow":"Arrow","line":"Line","freedraw":"Draw","text":"Text","library":"Library","lock":"Keep selected tool active after drawing","penMode":"Pen mode - prevent touch","link":"Add/ Update link for a selected shape","eraser":"Eraser","hand":"Hand (panning tool)"},"headings":{"canvasActions":"Canvas actions","selectedShapeActions":"Selected shape actions","shapes":"Shapes"},"hints":{"canvasPanning":"To move canvas, hold mouse wheel or spacebar while dragging, or use the hand tool","linearElement":"Click to start multiple points, drag for single line","freeDraw":"Click and drag, release when you\'re finished","text":"Tip: you can also add text by double-clicking anywhere with the selection tool","text_selected":"Double-click or press ENTER to edit text","text_editing":"Press Escape or CtrlOrCmd+ENTER to finish editing","linearElementMulti":"Click on last point or press Escape or Enter to finish","lockAngle":"You can constrain angle by holding SHIFT","resize":"You can constrain proportions by holding SHIFT while resizing,\\nhold ALT to resize from the center","resizeImage":"You can resize freely by holding SHIFT,\\nhold ALT to resize from the center","rotate":"You can constrain angles by holding SHIFT while rotating","lineEditor_info":"Hold CtrlOrCmd and Double-click or press CtrlOrCmd + Enter to edit points","lineEditor_pointSelected":"Press Delete to remove point(s),\\nCtrlOrCmd+D to duplicate, or drag to move","lineEditor_nothingSelected":"Select a point to edit (hold SHIFT to select multiple),\\nor hold Alt and click to add new points","placeImage":"Click to place the image, or click and drag to set its size manually","publishLibrary":"Publish your own library","bindTextToElement":"Press enter to add text","deepBoxSelect":"Hold CtrlOrCmd to deep select, and to prevent dragging","eraserRevert":"Hold Alt to revert the elements marked for deletion","firefox_clipboard_write":"This feature can likely be enabled by setting the \\"dom.events.asyncClipboard.clipboardItem\\" flag to \\"true\\". To change the browser flags in Firefox, visit the \\"about:config\\" page."},"canvasError":{"cannotShowPreview":"Cannot show preview","canvasTooBig":"The canvas may be too big.","canvasTooBigTip":"Tip: try moving the farthest elements a bit closer together."},"errorSplash":{"headingMain":"Encountered an error. Try <button>reloading the page</button>.","clearCanvasMessage":"If reloading doesn\'t work, try <button>clearing the canvas</button>.","clearCanvasCaveat":" This will result in loss of work ","trackedToSentry":"The error with identifier {{eventId}} was tracked on our system.","openIssueMessage":"We were very cautious not to include your scene information on the error. If your scene is not private, please consider following up on our <button>bug tracker</button>. Please include information below by copying and pasting into the GitHub issue.","sceneContent":"Scene content:"},"roomDialog":{"desc_intro":"You can invite people to your current scene to collaborate with you.","desc_privacy":"Don\'t worry, the session uses end-to-end encryption, so whatever you draw will stay private. Not even our server will be able to see what you come up with.","button_startSession":"Start session","button_stopSession":"Stop session","desc_inProgressIntro":"Live-collaboration session is now in progress.","desc_shareLink":"Share this link with anyone you want to collaborate with:","desc_exitSession":"Stopping the session will disconnect you from the room, but you\'ll be able to continue working with the scene, locally. Note that this won\'t affect other people, and they\'ll still be able to collaborate on their version.","shareTitle":"Join a live collaboration session on Excalidraw"},"errorDialog":{"title":"Error"},"exportDialog":{"disk_title":"Save to disk","disk_details":"Export the scene data to a file from which you can import later.","disk_button":"Save to file","link_title":"Shareable link","link_details":"Export as a read-only link.","link_button":"Export to Link","excalidrawplus_description":"Save the scene to your Excalidraw+ workspace.","excalidrawplus_button":"Export","excalidrawplus_exportError":"Couldn\'t export to Excalidraw+ at this moment..."},"helpDialog":{"blog":"Read our blog","click":"click","deepSelect":"Deep select","deepBoxSelect":"Deep select within box, and prevent dragging","curvedArrow":"Curved arrow","curvedLine":"Curved line","documentation":"Documentation","doubleClick":"double-click","drag":"drag","editor":"Editor","editLineArrowPoints":"Edit line/arrow points","editText":"Edit text / add label","github":"Found an issue? Submit","howto":"Follow our guides","or":"or","preventBinding":"Prevent arrow binding","tools":"Tools","shortcuts":"Keyboard shortcuts","textFinish":"Finish editing (text editor)","textNewLine":"Add new line (text editor)","title":"Help","view":"View","zoomToFit":"Zoom to fit all elements","zoomToSelection":"Zoom to selection","toggleElementLock":"Lock/unlock selection","movePageUpDown":"Move page up/down","movePageLeftRight":"Move page left/right"},"clearCanvasDialog":{"title":"Clear canvas"},"publishDialog":{"title":"Publish library","itemName":"Item name","authorName":"Author name","githubUsername":"GitHub username","twitterUsername":"Twitter username","libraryName":"Library name","libraryDesc":"Library description","website":"Website","placeholder":{"authorName":"Your name or username","libraryName":"Name of your library","libraryDesc":"Description of your library to help people understand its usage","githubHandle":"GitHub handle (optional), so you can edit the library once submitted for review","twitterHandle":"Twitter username (optional), so we know who to credit when promoting over Twitter","website":"Link to your personal website or elsewhere (optional)"},"errors":{"required":"Required","website":"Enter a valid URL"},"noteDescription":"Submit your library to be included in the <link>public library repository</link> for other people to use in their drawings.","noteGuidelines":"The library needs to be manually approved first. Please read the <link>guidelines</link> before submitting. You will need a GitHub account to communicate and make changes if requested, but it is not strictly required.","noteLicense":"By submitting, you agree the library will be published under the <link>MIT License</link>, which in short means anyone can use them without restrictions.","noteItems":"Each library item must have its own name so it\'s filterable. The following library items will be included:","atleastOneLibItem":"Please select at least one library item to get started","republishWarning":"Note: some of the selected items are marked as already published/submitted. You should only resubmit items when updating an existing library or submission."},"publishSuccessDialog":{"title":"Library submitted","content":"Thank you {{authorName}}. Your library has been submitted for review. You can track the status <link>here</link>"},"confirmDialog":{"resetLibrary":"Reset library","removeItemsFromLib":"Remove selected items from library"},"encrypted":{"tooltip":"Your drawings are end-to-end encrypted so Excalidraw\'s servers will never see them.","link":"Blog post on end-to-end encryption in Excalidraw"},"stats":{"angle":"Angle","element":"Element","elements":"Elements","height":"Height","scene":"Scene","selected":"Selected","storage":"Storage","title":"Stats for nerds","total":"Total","version":"Version","versionCopy":"Click to copy","versionNotAvailable":"Version not available","width":"Width"},"toast":{"addedToLibrary":"Added to library","copyStyles":"Copied styles.","copyToClipboard":"Copied to clipboard.","copyToClipboardAsPng":"Copied {{exportSelection}} to clipboard as PNG\\n({{exportColorScheme}})","fileSaved":"File saved.","fileSavedToFilename":"Saved to {filename}","canvas":"canvas","selection":"selection","pasteAsSingleElement":"Use {{shortcut}} to paste as a single element,\\nor paste into an existing text editor"},"colors":{"transparent":"Transparent","black":"Black","white":"White","red":"Red","pink":"Pink","grape":"Grape","violet":"Violet","gray":"Gray","blue":"Blue","cyan":"Cyan","teal":"Teal","green":"Green","yellow":"Yellow","orange":"Orange","bronze":"Bronze"},"welcomeScreen":{"app":{"center_heading":"All your data is saved locally in your browser.","center_heading_plus":"Did you want to go to the Excalidraw+ instead?","menuHint":"Export, preferences, languages, ..."},"defaults":{"menuHint":"Export, preferences, and more...","center_heading":"Diagrams. Made. Simple.","toolbarHint":"Pick a tool & Start drawing!","helpHint":"Shortcuts & help"}},"colorPicker":{"mostUsedCustomColors":"Most used custom colors","colors":"Colors","shades":"Shades","hexCode":"Hex code","noShades":"No shades available for this color"}}')},4451:function(e){"use strict";e.exports=JSON.parse('{"ar-SA":83,"bg-BG":57,"bn-BD":63,"ca-ES":92,"cs-CZ":67,"da-DK":35,"de-DE":94,"el-GR":92,"en":100,"es-ES":93,"eu-ES":94,"fa-IR":93,"fi-FI":92,"fr-FR":93,"gl-ES":92,"he-IL":91,"hi-IN":74,"hu-HU":80,"id-ID":92,"it-IT":94,"ja-JP":92,"kaa":18,"kab-KAB":92,"kk-KZ":22,"km-KH":2,"ko-KR":94,"ku-TR":94,"lt-LT":59,"lv-LV":93,"mr-IN":93,"my-MM":43,"nb-NO":94,"nl-NL":87,"nn-NO":81,"oc-FR":91,"pa-IN":82,"pl-PL":83,"pt-BR":94,"pt-PT":93,"ro-RO":94,"ru-RU":94,"si-LK":9,"sk-SK":94,"sl-SI":94,"sv-SE":94,"ta-IN":86,"th-TH":41,"tr-TR":91,"uk-UA":94,"vi-VN":59,"zh-CN":94,"zh-HK":27,"zh-TW":94}')}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={id:e,exports:{}};return a[e](n,n.exports,c),n.exports}c.m=a,c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},r=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},c.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var i={};n=n||[null,r({}),r([]),r(r)];for(var a=2&t&&e;"object"==typeof a&&!~n.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((function(t){i[t]=function(){return e[t]}}));return i.default=function(){return e},c.d(o,i),o},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.f={},c.e=function(e){return Promise.all(Object.keys(c.f).reduce((function(t,n){return c.f[n](e,t),t}),[]))},c.u=function(e){return"excalidraw-assets/"+{22:"locales/kk-KZ-json",537:"locales/th-TH-json",663:"locales/kaa-json",1204:"locales/ja-JP-json",1302:"locales/si-LK-json",1477:"locales/my-MM-json",1513:"locales/el-GR-json",1628:"locales/bg-BG-json",1690:"locales/oc-FR-json",1790:"locales/da-DK-json",2091:"locales/ar-SA-json",2312:"locales/he-IL-json",2359:"locales/nb-NO-json",2404:"locales/ta-IN-json",2943:"locales/gl-ES-json",3024:"locales/nl-NL-json",3031:"locales/ku-TR-json",3082:"locales/de-DE-json",3162:"locales/pa-IN-json",3397:"locales/mr-IN-json",3421:"locales/zh-TW-json",3512:"locales/fi-FI-json",3674:"locales/pl-PL-json",3682:"locales/fr-FR-json",3721:"locales/pt-BR-json",3808:"locales/id-ID-json",3885:"locales/nn-NO-json",4e3:"locales/vi-VN-json",4680:"locales/zh-CN-json",4736:"vendor",4977:"locales/tr-TR-json",5089:"locales/ro-RO-json",5130:"locales/ca-ES-json",5330:"locales/fa-IR-json",5395:"locales/pt-PT-json",6071:"locales/sl-SI-json",6239:"locales/it-IT-json",6265:"locales/cs-CZ-json",6566:"locales/km-KH-json",6768:"locales/lv-LV-json",6844:"locales/ko-KR-json",7368:"locales/hu-HU-json",7429:"locales/bn-BD-json",7759:"locales/uk-UA-json",7920:"locales/zh-HK-json",8081:"locales/eu-ES-json",8124:"locales/ru-RU-json",8340:"locales/lt-LT-json",8534:"locales/sv-SE-json",8750:"locales/sk-SK-json",8759:"locales/es-ES-json",9551:"locales/kab-KAB-json",9828:"locales/hi-IN-json"}[e]+"-"+{22:"f7739980a0373cac0448",537:"56e28d7ee80115f5dc07",663:"52971f5d051ddd65887f",1204:"46cf12c4be04cc8b452d",1302:"def580f91ccb834e3c2a",1477:"09e2cd449c159b515bd5",1513:"ca506c54e42e135959b0",1628:"9194ad23121157147546",1690:"8bfe443f96fa0cc7073b",1790:"547418996cfd8bb285be",2091:"0a59aece60276ed11321",2312:"a3aadae77e5d8f9d9477",2359:"fa893095b70cefc2f7e2",2404:"aa166453a01a662a3e07",2943:"190e4b913c120f078129",3024:"3117b157902ca19b9cc3",3031:"1ce02dc10f8f18a3e609",3082:"b03af65bb5eff6d7023b",3162:"5b1c3903004d63ad7bda",3397:"9fbf7ef2fc6a57f19633",3421:"666cdd14005847709d40",3512:"1640f182578a4d4a77ba",3674:"85d9c16b934129641849",3682:"08f595b2a14a7f1b5c3f",3721:"fc4b878ac107c23255dd",3808:"d1156d23b30643d02794",3885:"e630a5b8e3fd3e0d98d4",4e3:"79622fb3b0a457d8c17b",4680:"a4a9d3ae663b3dadfc4a",4736:"53d1c69ef585b6dd219b",4977:"abd9e64817a5f1bf722a",5089:"cbce5205231a582024d7",5130:"79f84ac70a367a68e9a0",5330:"d891247fdcbdfc77d42a",5395:"47032f63e88e79dd73f2",6071:"2d3159666a9b694373e0",6239:"304768049d19d44f8b7c",6265:"26c3db7e8a6c4e8bcf23",6566:"93e08aa0ef1c18f9abe6",6768:"2754b00cb2959287583a",6844:"d347255ddd5b17936d70",7368:"7137c9d42ad71e4291e1",7429:"ebf1d26fdb12c5bb181e",7759:"f41664cf41fa0a75d303",7920:"b5ebaab9e5576589fd75",8081:"8714a4293a6a397560c4",8124:"99829b1ba9d5093b157b",8340:"21dccba82996be6c9978",8534:"81f406cec5a178dfc603",8750:"48d5acc83691a9e45243",8759:"265b459985c4898b7781",9551:"3d0babc84b87ba5a6c40",9828:"f7636cdb60eac7c6d0e9"}[e]+".js"},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o={},i="ExcalidrawLib:",c.l=function(e,t,n,r){if(o[e])o[e].push(t);else{var a,l;if(void 0!==n)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var d=s[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==i+n){a=d;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",i+n),a.src=e),o[e]=[t];var f=function(t,n){a.onerror=a.onload=null,clearTimeout(p);var r=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((function(e){return e(n)})),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),l&&document.head.appendChild(a)}},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="",function(){c.b=document.baseURI||self.location.href;var e={1388:0};c.f.j=function(t,n){var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var i=c.p+c.u(t),a=new Error;c.l(i,(function(n){if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=function(t,n){var r,o,i=n[0],a=n[1],l=n[2],s=0;if(i.some((function(t){return 0!==e[t]}))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(l)l(c)}for(t&&t(n);s<i.length;s++)o=i[s],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),c.nc=void 0;var s={};return function(){"use strict";c.r(s),c.d(s,{Button:function(){return xe.z},DefaultSidebar:function(){return Le.O},Excalidraw:function(){return Fe},FONT_FAMILY:function(){return e.ut},Footer:function(){return Y},LiveCollaborationTrigger:function(){return _e},MIME_TYPES:function(){return e.LO},MainMenu:function(){return V.Z},Sidebar:function(){return Ae.YE},THEME:function(){return e.C6},WelcomeScreen:function(){return ye},bumpVersion:function(){return Me.ZP},defaultLang:function(){return P.Fp},exportToBlob:function(){return Te.Fl},exportToCanvas:function(){return Te.NL},exportToClipboard:function(){return Te.i1},exportToSvg:function(){return Te.$D},getFreeDrawSvgPath:function(){return Te.N7},getNonDeletedElements:function(){return Ce.Lm},getSceneVersion:function(){return Ce.Uo},isInvisiblySmallElement:function(){return Ce.QD},isLinearElement:function(){return Ie.bt},languages:function(){return P.Mj},loadFromBlob:function(){return Te.cT},loadLibraryFromBlob:function(){return Te.lV},loadSceneOrLibraryFromBlob:function(){return Te.ZY},mergeLibraryItems:function(){return Te.zh},mutateElement:function(){return Me.DR},newElementWith:function(){return Me.BE},parseLibraryTokensFromUrl:function(){return De.Di},restore:function(){return Pe.nu},restoreAppState:function(){return Pe.lY},restoreElements:function(){return Pe.ET},restoreLibraryItems:function(){return Pe.wJ},sceneCoordsToViewportCoords:function(){return D._i},serializeAsJSON:function(){return Te.I_},serializeLibraryAsJSON:function(){return Te.NI},useDevice:function(){return M.Fy},useHandleLibrary:function(){return De.xS},useI18n:function(){return P.QT},viewportCoordsToSceneCoords:function(){return D.dE}});var e=c(2335);"production"!==e.Vi.TEST&&(c.p=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.15.2-a89952e","/dist/"));var t=function(){Array.prototype.at||Object.defineProperty(Array.prototype,"at",{value:function(e){if((e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this[e]},writable:!0,enumerable:!1,configurable:!0})},n=c(487),r=c.n(n),o=c(631),i=c.n(o),a=c(2052),l=c.n(a),u=c(4010),d=c.n(u),f=c(1469),p=c.n(f),h=c(9329),m=c.n(h),g=c(4295),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=l().bind(null,"head"),v.domAPI=i(),v.insertStyleElement=p();r()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=c(6479),y=c.n(b),x=c(9713),w=c.n(x),k=c(9787),E=c.n(k),j=c(8950),S=c(2577),O=c(2975),_=c.n(O),C=c(5440),P=c(8211),T=c(4512),I=function(e){var t=(0,k.useState)(!0),n=(0,S.Z)(t,2),r=n[0],o=n[1];return(0,k.useEffect)((function(){var t=function(){var e=(0,j.Z)(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,P.m0)(n);case 2:o(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n=P.Mj.find((function(t){return t.code===e.langCode}))||P.Fp;t()}),[e.langCode]),r?(0,T.jsx)(C.z,{theme:e.theme}):e.children},M=c(6936),D=c(6340),A=c(9915),L={};L.styleTagTransform=m(),L.setAttributes=d(),L.insert=l().bind(null,"head"),L.domAPI=i(),L.insertStyleElement=p();r()(A.Z,L),A.Z&&A.Z.locals&&A.Z.locals;var Z=c(9310),R={};R.styleTagTransform=m(),R.setAttributes=d(),R.insert=l().bind(null,"head"),R.domAPI=i(),R.insertStyleElement=p();r()(Z.Z,R),Z.Z&&Z.Z.locals&&Z.Z.locals;var z=c(4739),N=c(9487),B=c(45),H=c(7681),W=c(8793),F={};F.styleTagTransform=m(),F.setAttributes=d(),F.insert=l().bind(null,"head"),F.domAPI=i(),F.insertStyleElement=p();r()(W.Z,F),W.Z&&W.Z.locals&&W.Z.locals;var U=c(96),K=function(e){var t=e.children,n=(0,H.R6)().FooterCenterTunnel,r=(0,U.I)();return(0,T.jsx)(n.In,{children:(0,T.jsx)("div",{className:(0,B.Z)("footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":r.zenModeEnabled}),children:t})})},Y=K;K.displayName="FooterCenter";var V=c(6756),G=c(7169),X=c(2726),q=c(1e3),$=c(785),J=c(3646),Q=["onSelect","children","icon","shortcut","className"],ee=["children","href","icon","shortcut","className"];function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){(0,G.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=function(e){var t=e.icon,n=e.shortcut,r=e.children,o=(0,M.Fy)();return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{className:"welcome-screen-menu-item__icon",children:t}),(0,T.jsx)("div",{className:"welcome-screen-menu-item__text",children:r}),n&&!o.isMobile&&(0,T.jsx)("div",{className:"welcome-screen-menu-item__shortcut",children:n})]})};re.displayName="WelcomeScreenMenuItemContent";var oe=function(e){var t=e.onSelect,n=e.children,r=e.icon,o=e.shortcut,i=e.className,a=void 0===i?"":i,l=(0,X.Z)(e,Q);return(0,T.jsx)("button",ne(ne({},l),{},{type:"button",className:"welcome-screen-menu-item ".concat(a),onClick:t,children:(0,T.jsx)(re,{icon:r,shortcut:o,children:n})}))};oe.displayName="WelcomeScreenMenuItem";var ie=function(e){var t=e.children,n=e.href,r=e.icon,o=e.shortcut,i=e.className,a=void 0===i?"":i,l=(0,X.Z)(e,ee);return(0,T.jsx)("a",ne(ne({},l),{},{className:"welcome-screen-menu-item ".concat(a),href:n,target:"_blank",rel:"noreferrer",children:(0,T.jsx)(re,{icon:r,shortcut:o,children:t})}))};ie.displayName="WelcomeScreenMenuItemLink";var ae=function(e){var t=e.children,n=(0,H.R6)().WelcomeScreenCenterTunnel;return(0,T.jsx)(n.In,{children:(0,T.jsx)("div",{className:"welcome-screen-center",children:t||(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(le,{}),(0,T.jsx)(ce,{children:(0,P.t)("welcomeScreen.defaults.center_heading")}),(0,T.jsxs)(se,{children:[(0,T.jsx)(de,{}),(0,T.jsx)(ue,{})]})]})})})};ae.displayName="Center";var le=function(e){var t=e.children;return(0,T.jsx)("div",{className:"welcome-screen-center__logo virgil welcome-screen-decor",children:t||(0,T.jsxs)(T.Fragment,{children:[J.Mw," Excalidraw"]})})};le.displayName="Logo";var ce=function(e){var t=e.children;return(0,T.jsx)("div",{className:"welcome-screen-center__heading welcome-screen-decor virgil",children:t})};ce.displayName="Heading";var se=function(e){var t=e.children;return(0,T.jsx)("div",{className:"welcome-screen-menu",children:t})};se.displayName="Menu";var ue=function(){var e=(0,M.eh)();return(0,T.jsx)(oe,{onSelect:function(){return e.executeAction(q.jY)},shortcut:"?",icon:J.by,children:(0,P.t)("helpDialog.title")})};ue.displayName="MenuItemHelp";var de=function(){var e=(0,U.I)(),t=(0,M.eh)();return e.viewModeEnabled?null:(0,T.jsx)(oe,{onSelect:function(){return t.executeAction(q._d)},shortcut:(0,$.C)("loadScene"),icon:J.Tl,children:(0,P.t)("buttons.load")})};de.displayName="MenuItemLoadScene";var fe=function(e){var t=e.onSelect,n=(0,P.QT)().t;return(0,T.jsx)(oe,{shortcut:null,onSelect:t,icon:J.jn,children:n("labels.liveCollaboration")})};fe.displayName="MenuItemLiveCollaborationTrigger",ae.Logo=le,ae.Heading=ce,ae.Menu=se,ae.MenuItem=oe,ae.MenuItemLink=ie,ae.MenuItemHelp=ue,ae.MenuItemLoadScene=de,ae.MenuItemLiveCollaborationTrigger=fe;var pe=function(e){var t=e.children,n=(0,H.R6)().WelcomeScreenMenuHintTunnel;return(0,T.jsx)(n.In,{children:(0,T.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu",children:[J.oQ,(0,T.jsx)("div",{className:"welcome-screen-decor-hint__label",children:t||(0,P.t)("welcomeScreen.defaults.menuHint")})]})})};pe.displayName="MenuHint";var he=function(e){var t=e.children,n=(0,H.R6)().WelcomeScreenToolbarHintTunnel;return(0,T.jsx)(n.In,{children:(0,T.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar",children:[(0,T.jsx)("div",{className:"welcome-screen-decor-hint__label",children:t||(0,P.t)("welcomeScreen.defaults.toolbarHint")}),J.DJ]})})};he.displayName="ToolbarHint";var me=function(e){var t=e.children,n=(0,H.R6)().WelcomeScreenHelpHintTunnel;return(0,T.jsx)(n.In,{children:(0,T.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help",children:[(0,T.jsx)("div",{children:t||(0,P.t)("welcomeScreen.defaults.helpHint")}),J._U]})})};me.displayName="HelpHint";var ge=c(1569),ve={};ve.styleTagTransform=m(),ve.setAttributes=d(),ve.insert=l().bind(null,"head"),ve.domAPI=i(),ve.insertStyleElement=p();r()(ge.Z,ve),ge.Z&&ge.Z.locals&&ge.Z.locals;var be=function(e){return(0,T.jsx)(T.Fragment,{children:e.children||(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(ae,{}),(0,T.jsx)(pe,{}),(0,T.jsx)(he,{}),(0,T.jsx)(me,{})]})})};be.displayName="WelcomeScreen",be.Center=ae,be.Hints={MenuHint:pe,ToolbarHint:he,HelpHint:me};var ye=be,xe=c(7172),we=c(3397),ke={};ke.styleTagTransform=m(),ke.setAttributes=d(),ke.insert=l().bind(null,"head"),ke.domAPI=i(),ke.insertStyleElement=p();r()(we.Z,ke),we.Z&&we.Z.locals&&we.Z.locals;var Ee=["isCollaborating","onSelect"];function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){(0,G.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oe=function(e){var t=e.isCollaborating,n=e.onSelect,r=(0,X.Z)(e,Ee),o=(0,U.I)();return(0,T.jsxs)(xe.z,Se(Se({},r),{},{className:(0,B.Z)("collab-button",{active:t}),type:"button",onSelect:n,style:{position:"relative"},title:(0,P.t)("labels.liveCollaboration"),children:[J.jn,o.collaborators.size>0&&(0,T.jsx)("div",{className:"CollabButton-collaborators",children:o.collaborators.size})]}))},_e=Oe;Oe.displayName="LiveCollaborationTrigger";var Ce=c(1047),Pe=c(679),Te=c(3024),Ie=c(1974),Me=c(1935),De=c(7053),Ae=c(1034),Le=c(704),Ze=["initialData","UIOptions"],Re=["initialData","UIOptions"];function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){w()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Be=function(t){var n,r,o,i=t.onChange,a=t.initialData,l=t.excalidrawRef,c=t.isCollaborating,s=void 0!==c&&c,u=t.onPointerUpdate,d=t.renderTopRightUI,f=t.langCode,p=void 0===f?P.Fp.code:f,h=t.viewModeEnabled,m=t.zenModeEnabled,g=t.gridModeEnabled,v=t.libraryReturnUrl,b=t.theme,y=t.name,x=t.renderCustomStats,w=t.onPaste,E=t.detectScroll,j=void 0===E||E,S=t.handleKeyboardGlobally,O=void 0!==S&&S,_=t.onLibraryChange,C=t.autoFocus,D=void 0!==C&&C,A=t.generateIdForFile,L=t.onLinkOpen,Z=t.onPointerDown,R=t.onScrollChange,B=t.children,H=null===(n=t.UIOptions)||void 0===n?void 0:n.canvasActions,W=Ne(Ne({},t.UIOptions),{},{canvasActions:Ne(Ne({},e.cW.canvasActions),H)});null!=H&&H.export&&(W.canvasActions.export.saveFileToDisk=null!==(r=null===(o=H.export)||void 0===o?void 0:o.saveFileToDisk)&&void 0!==r?r:e.cW.canvasActions.export.saveFileToDisk);return null===W.canvasActions.toggleTheme&&void 0===b&&(W.canvasActions.toggleTheme=!0),(0,k.useEffect)((function(){var e=function(e){"number"==typeof e.scale&&1!==e.scale&&e.preventDefault()};return document.addEventListener("touchmove",e,{passive:!1}),function(){document.removeEventListener("touchmove",e)}}),[]),(0,T.jsx)(z.zt,{unstable_createStore:function(){return N.e_},scope:N.yE,children:(0,T.jsx)(I,{langCode:p,theme:b,children:(0,T.jsx)(M.ZP,{onChange:i,initialData:a,excalidrawRef:l,isCollaborating:s,onPointerUpdate:u,renderTopRightUI:d,langCode:p,viewModeEnabled:h,zenModeEnabled:m,gridModeEnabled:g,libraryReturnUrl:v,theme:b,name:y,renderCustomStats:x,UIOptions:W,onPaste:w,detectScroll:j,handleKeyboardGlobally:O,onLibraryChange:_,autoFocus:D,generateIdForFile:A,onLinkOpen:L,onPointerDown:Z,onScrollChange:R,children:B})})})},He=function(e,t){if(e.children!==t.children)return!1;e.initialData;var n=e.UIOptions,r=void 0===n?{}:n,o=y()(e,Ze),i=(t.initialData,t.UIOptions),a=void 0===i?{}:i,l=y()(t,Re),c=Object.keys(r),s=Object.keys(a);return c.length===s.length&&(c.every((function(e){return"canvasActions"===e?Object.keys(r.canvasActions).every((function(e){var t,n,o,i;return"export"===e&&null!=r&&null!==(t=r.canvasActions)&&void 0!==t&&t.export&&null!=a&&null!==(n=a.canvasActions)&&void 0!==n&&n.export?r.canvasActions.export.saveFileToDisk===a.canvasActions.export.saveFileToDisk:(null==r||null===(o=r.canvasActions)||void 0===o?void 0:o[e])===(null==a||null===(i=a.canvasActions)||void 0===i?void 0:i[e])})):r[e]===a[e]}))&&(0,D.w8)(o,l))},We=(0,k.forwardRef)((function(e,t){return(0,T.jsx)(Be,Ne(Ne({},e),{},{excalidrawRef:t}))})),Fe=E().memo(We,He);Fe.displayName="Excalidraw",t()}(),s}()}));