@verdocs/web-sdk 2.2.26 → 2.2.30

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 (325) hide show
  1. package/dist/cjs/{EnvelopeStore-ac58a485.js → EnvelopeStore-eda7addf.js} +2 -2
  2. package/dist/cjs/{Envelopes-a06cab96.js → Envelopes-ef06e293.js} +5 -4
  3. package/dist/cjs/{TemplateStore-9026139c.js → TemplateStore-8bf09f12.js} +1 -1
  4. package/dist/cjs/{index-39554143.js → index-5463795e.js} +0 -3
  5. package/dist/cjs/{index-7d1c0557.js → index-f712049c.js} +1 -1
  6. package/dist/cjs/ipc-test.cjs.entry.js +3 -3
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{utils-c5675274.js → utils-06248dca.js} +1 -9
  9. package/dist/cjs/verdocs-activity-box.cjs.entry.js +2 -2
  10. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-build.cjs.entry.js +3 -3
  12. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +3 -3
  13. package/dist/cjs/verdocs-button_3.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-checkbox_3.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +3 -3
  16. package/dist/cjs/verdocs-dialog_2.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +3 -3
  19. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +4 -4
  20. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +5 -5
  21. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +3 -3
  22. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +3 -3
  23. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -3
  24. package/dist/cjs/verdocs-field-date.cjs.entry.js +3 -3
  25. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -3
  26. package/dist/cjs/verdocs-field-initial.cjs.entry.js +3 -3
  27. package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -3
  28. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -3
  29. package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -3
  30. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +3 -3
  31. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -3
  32. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +3 -3
  33. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  34. package/dist/cjs/verdocs-floating-menu.cjs.entry.js +2 -2
  35. package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +1 -1
  36. package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +1 -1
  37. package/dist/cjs/verdocs-loader.cjs.entry.js +1 -1
  38. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
  39. package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
  40. package/dist/cjs/verdocs-pagination_3.cjs.entry.js +3 -3
  41. package/dist/cjs/verdocs-preview_8.cjs.entry.js +5 -5
  42. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  43. package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
  44. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  45. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  46. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +3 -3
  47. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  48. package/dist/cjs/verdocs-sign.cjs.entry.js +3 -3
  49. package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +1 -1
  50. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
  51. package/dist/cjs/verdocs-tabs.cjs.entry.js +1 -1
  52. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  53. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +3 -3
  54. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +5 -5
  55. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  56. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  57. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  58. package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
  59. package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +1 -1
  60. package/dist/cjs/verdocs-view.cjs.entry.js +27 -22
  61. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  62. package/dist/collection/components/embeds/verdocs-view/verdocs-view.css +11 -0
  63. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +25 -20
  64. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.css +28 -3
  65. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.stories.js +1 -1
  66. package/dist/components/Envelopes.js +5 -4
  67. package/dist/components/utils.js +1 -8
  68. package/dist/components/verdocs-envelope-sidebar.js +1 -1
  69. package/dist/components/verdocs-view2.js +26 -21
  70. package/dist/docs.json +1 -1
  71. package/dist/esm/{EnvelopeStore-6476418d.js → EnvelopeStore-03f3f9f4.js} +2 -2
  72. package/dist/esm/{Envelopes-2d89a065.js → Envelopes-7ba36e68.js} +5 -4
  73. package/dist/esm/{TemplateStore-4918792b.js → TemplateStore-555a4b49.js} +1 -1
  74. package/dist/esm/{index-d5ba09f3.js → index-172625c5.js} +1 -3
  75. package/dist/esm/{index-1ce2872b.js → index-4439b0d1.js} +1 -1
  76. package/dist/esm/ipc-test.entry.js +3 -3
  77. package/dist/esm/loader.js +1 -1
  78. package/dist/esm/{utils-a0bb69d7.js → utils-36e03f93.js} +2 -9
  79. package/dist/esm/verdocs-activity-box.entry.js +2 -2
  80. package/dist/esm/verdocs-auth.entry.js +1 -1
  81. package/dist/esm/verdocs-build.entry.js +3 -3
  82. package/dist/esm/verdocs-button-panel_2.entry.js +3 -3
  83. package/dist/esm/verdocs-button_3.entry.js +1 -1
  84. package/dist/esm/verdocs-checkbox_3.entry.js +1 -1
  85. package/dist/esm/verdocs-contact-picker_2.entry.js +3 -3
  86. package/dist/esm/verdocs-dialog_2.entry.js +1 -1
  87. package/dist/esm/verdocs-dropdown.entry.js +1 -1
  88. package/dist/esm/verdocs-envelope-document-page.entry.js +3 -3
  89. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +4 -4
  90. package/dist/esm/verdocs-envelope-sidebar.entry.js +5 -5
  91. package/dist/esm/verdocs-envelopes-list.entry.js +3 -3
  92. package/dist/esm/verdocs-field-attachment.entry.js +3 -3
  93. package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
  94. package/dist/esm/verdocs-field-date.entry.js +3 -3
  95. package/dist/esm/verdocs-field-dropdown.entry.js +3 -3
  96. package/dist/esm/verdocs-field-initial.entry.js +3 -3
  97. package/dist/esm/verdocs-field-payment.entry.js +3 -3
  98. package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
  99. package/dist/esm/verdocs-field-signature.entry.js +3 -3
  100. package/dist/esm/verdocs-field-textarea.entry.js +3 -3
  101. package/dist/esm/verdocs-field-textbox.entry.js +3 -3
  102. package/dist/esm/verdocs-field-timestamp.entry.js +3 -3
  103. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  104. package/dist/esm/verdocs-floating-menu.entry.js +2 -2
  105. package/dist/esm/verdocs-initial-dialog.entry.js +1 -1
  106. package/dist/esm/verdocs-kba-dialog.entry.js +1 -1
  107. package/dist/esm/verdocs-loader.entry.js +1 -1
  108. package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
  109. package/dist/esm/verdocs-organization-card.entry.js +1 -1
  110. package/dist/esm/verdocs-pagination_3.entry.js +3 -3
  111. package/dist/esm/verdocs-preview_8.entry.js +5 -5
  112. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  113. package/dist/esm/verdocs-radio-button.entry.js +1 -1
  114. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  115. package/dist/esm/verdocs-search.entry.js +1 -1
  116. package/dist/esm/verdocs-settings-api-keys_4.entry.js +3 -3
  117. package/dist/esm/verdocs-settings.entry.js +1 -1
  118. package/dist/esm/verdocs-sign.entry.js +3 -3
  119. package/dist/esm/verdocs-signature-dialog.entry.js +1 -1
  120. package/dist/esm/verdocs-status-indicator.entry.js +1 -1
  121. package/dist/esm/verdocs-tabs.entry.js +1 -1
  122. package/dist/esm/verdocs-template-card.entry.js +1 -1
  123. package/dist/esm/verdocs-template-document-page_2.entry.js +3 -3
  124. package/dist/esm/verdocs-template-fields_4.entry.js +5 -5
  125. package/dist/esm/verdocs-template-star.entry.js +1 -1
  126. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  127. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  128. package/dist/esm/verdocs-toggle.entry.js +1 -1
  129. package/dist/esm/verdocs-upload-dialog.entry.js +1 -1
  130. package/dist/esm/verdocs-view.entry.js +27 -22
  131. package/dist/esm/verdocs-web-sdk.js +1 -1
  132. package/dist/esm-es5/{EnvelopeStore-6476418d.js → EnvelopeStore-03f3f9f4.js} +1 -1
  133. package/dist/esm-es5/Envelopes-7ba36e68.js +1 -0
  134. package/dist/esm-es5/{TemplateStore-4918792b.js → TemplateStore-555a4b49.js} +1 -1
  135. package/dist/esm-es5/index-172625c5.js +2 -0
  136. package/dist/esm-es5/{index-1ce2872b.js → index-4439b0d1.js} +1 -1
  137. package/dist/esm-es5/ipc-test.entry.js +1 -1
  138. package/dist/esm-es5/loader.js +1 -1
  139. package/dist/esm-es5/{utils-a0bb69d7.js → utils-36e03f93.js} +2 -2
  140. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  141. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  142. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  143. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  144. package/dist/esm-es5/verdocs-button_3.entry.js +1 -1
  145. package/dist/esm-es5/verdocs-checkbox_3.entry.js +1 -1
  146. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  147. package/dist/esm-es5/verdocs-dialog_2.entry.js +1 -1
  148. package/dist/esm-es5/verdocs-dropdown.entry.js +1 -1
  149. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  150. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  151. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  152. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  153. package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
  154. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  155. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  156. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  157. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  158. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  159. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  160. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  161. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  162. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  163. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  164. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  165. package/dist/esm-es5/verdocs-floating-menu.entry.js +1 -1
  166. package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
  167. package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
  168. package/dist/esm-es5/verdocs-loader.entry.js +1 -1
  169. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  170. package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
  171. package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -1
  172. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  173. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  174. package/dist/esm-es5/verdocs-radio-button.entry.js +1 -1
  175. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  176. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  177. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  178. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  179. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  180. package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
  181. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  182. package/dist/esm-es5/verdocs-tabs.entry.js +1 -1
  183. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  184. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  185. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  186. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  187. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  188. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  189. package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
  190. package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
  191. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  192. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  193. package/dist/verdocs-web-sdk/{p-6d4d4760.system.entry.js → p-005f8cbc.system.entry.js} +1 -1
  194. package/dist/verdocs-web-sdk/{p-2d71c20a.system.entry.js → p-013d1556.system.entry.js} +1 -1
  195. package/dist/verdocs-web-sdk/{p-b136d75e.entry.js → p-04580be0.entry.js} +1 -1
  196. package/dist/verdocs-web-sdk/{p-44209a2a.system.entry.js → p-066822ff.system.entry.js} +1 -1
  197. package/dist/verdocs-web-sdk/{p-9dec146d.entry.js → p-07118e76.entry.js} +1 -1
  198. package/dist/verdocs-web-sdk/p-073fcf03.js +1 -0
  199. package/dist/verdocs-web-sdk/p-0a4856ac.entry.js +1 -0
  200. package/dist/verdocs-web-sdk/{p-5a0d4098.entry.js → p-0edfbbb9.entry.js} +1 -1
  201. package/dist/verdocs-web-sdk/{p-876d3ff3.js → p-14b44491.js} +2 -2
  202. package/dist/verdocs-web-sdk/{p-789c8c91.system.entry.js → p-1540e617.system.entry.js} +1 -1
  203. package/dist/verdocs-web-sdk/{p-1184e653.entry.js → p-17479228.entry.js} +1 -1
  204. package/dist/verdocs-web-sdk/{p-7b0874c1.system.entry.js → p-185f5fa5.system.entry.js} +1 -1
  205. package/dist/verdocs-web-sdk/{p-044d38be.js → p-19b70691.js} +2 -2
  206. package/dist/verdocs-web-sdk/{p-b7789921.entry.js → p-19e9660c.entry.js} +1 -1
  207. package/dist/verdocs-web-sdk/{p-247325a5.system.entry.js → p-1c70b492.system.entry.js} +1 -1
  208. package/dist/verdocs-web-sdk/{p-8df64e0a.system.entry.js → p-1d0342e6.system.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/{p-636c6fdd.entry.js → p-1d52f0a4.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/{p-1b1f4fd2.entry.js → p-1db55e60.entry.js} +1 -1
  211. package/dist/verdocs-web-sdk/{p-5f0afd02.system.entry.js → p-1fd723e3.system.entry.js} +1 -1
  212. package/dist/verdocs-web-sdk/{p-36458469.entry.js → p-20986706.entry.js} +1 -1
  213. package/dist/verdocs-web-sdk/{p-aded66bf.entry.js → p-25988bd7.entry.js} +1 -1
  214. package/dist/verdocs-web-sdk/{p-16242585.system.entry.js → p-264085f1.system.entry.js} +1 -1
  215. package/dist/verdocs-web-sdk/{p-821c78c4.system.js → p-271dafb1.system.js} +1 -1
  216. package/dist/verdocs-web-sdk/{p-ce7c4eb0.system.entry.js → p-2727f8c1.system.entry.js} +1 -1
  217. package/dist/verdocs-web-sdk/{p-972004c2.system.entry.js → p-272933c6.system.entry.js} +1 -1
  218. package/dist/verdocs-web-sdk/{p-390b7f97.entry.js → p-27395399.entry.js} +1 -1
  219. package/dist/verdocs-web-sdk/{p-5b789032.entry.js → p-2a0ed0ab.entry.js} +1 -1
  220. package/dist/verdocs-web-sdk/{p-9a5904a9.system.entry.js → p-2f177d12.system.entry.js} +1 -1
  221. package/dist/verdocs-web-sdk/{p-f61573a3.entry.js → p-316dfb50.entry.js} +1 -1
  222. package/dist/verdocs-web-sdk/{p-aab15290.entry.js → p-334a7cd0.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/{p-39145cce.entry.js → p-354179b9.entry.js} +1 -1
  224. package/dist/verdocs-web-sdk/{p-2b8644a1.system.entry.js → p-36e20c7d.system.entry.js} +1 -1
  225. package/dist/verdocs-web-sdk/p-3a603691.system.entry.js +1 -0
  226. package/dist/verdocs-web-sdk/p-3af6b910.system.js +1 -0
  227. package/dist/verdocs-web-sdk/{p-6f70e215.system.entry.js → p-3c64c237.system.entry.js} +1 -1
  228. package/dist/verdocs-web-sdk/{p-96f0ba19.entry.js → p-3c798272.entry.js} +1 -1
  229. package/dist/verdocs-web-sdk/{p-96f3cfd3.system.entry.js → p-3ce7e733.system.entry.js} +1 -1
  230. package/dist/verdocs-web-sdk/{p-802bd493.system.js → p-3d20f09f.system.js} +2 -2
  231. package/dist/verdocs-web-sdk/{p-fb65a186.system.entry.js → p-41cd34db.system.entry.js} +1 -1
  232. package/dist/verdocs-web-sdk/{p-b1ba251d.system.entry.js → p-43226b70.system.entry.js} +1 -1
  233. package/dist/verdocs-web-sdk/{p-abf16c2b.entry.js → p-450a3908.entry.js} +1 -1
  234. package/dist/verdocs-web-sdk/{p-897ccc19.system.entry.js → p-4583338b.system.entry.js} +1 -1
  235. package/dist/verdocs-web-sdk/{p-a051e533.entry.js → p-47ff8ea2.entry.js} +1 -1
  236. package/dist/verdocs-web-sdk/{p-584928fe.entry.js → p-4a371820.entry.js} +1 -1
  237. package/dist/verdocs-web-sdk/p-4a500a3f.system.entry.js +1 -0
  238. package/dist/verdocs-web-sdk/{p-c027e0e1.system.js → p-4c0f38c5.system.js} +1 -1
  239. package/dist/verdocs-web-sdk/{p-665fd61c.entry.js → p-4d2e73d9.entry.js} +1 -1
  240. package/dist/verdocs-web-sdk/{p-e3bd1b4c.system.entry.js → p-4d8287cb.system.entry.js} +1 -1
  241. package/dist/verdocs-web-sdk/{p-09b05f65.entry.js → p-4f6f538d.entry.js} +1 -1
  242. package/dist/verdocs-web-sdk/{p-aa8d725f.system.entry.js → p-4f914da5.system.entry.js} +1 -1
  243. package/dist/verdocs-web-sdk/{p-7e5ee08a.entry.js → p-521a3fec.entry.js} +1 -1
  244. package/dist/verdocs-web-sdk/{p-853489f8.system.entry.js → p-57c09a21.system.entry.js} +1 -1
  245. package/dist/verdocs-web-sdk/{p-e8cf4ad9.system.entry.js → p-58eb94ab.system.entry.js} +1 -1
  246. package/dist/verdocs-web-sdk/{p-83c052a3.system.entry.js → p-5c01f483.system.entry.js} +1 -1
  247. package/dist/verdocs-web-sdk/{p-330f7d43.entry.js → p-604d7791.entry.js} +1 -1
  248. package/dist/verdocs-web-sdk/p-65c99d51.system.entry.js +1 -0
  249. package/dist/verdocs-web-sdk/{p-cb8b910c.system.entry.js → p-6a5ef696.system.entry.js} +1 -1
  250. package/dist/verdocs-web-sdk/{p-baf0f5b0.system.entry.js → p-6f8eb3d7.system.entry.js} +1 -1
  251. package/dist/verdocs-web-sdk/{p-7fbcd534.entry.js → p-6ff8759f.entry.js} +1 -1
  252. package/dist/verdocs-web-sdk/{p-c7b34331.entry.js → p-70685224.entry.js} +1 -1
  253. package/dist/verdocs-web-sdk/{p-672fad08.entry.js → p-71eefe0e.entry.js} +1 -1
  254. package/dist/verdocs-web-sdk/{p-85d0e79d.js → p-7648c449.js} +1 -1
  255. package/dist/verdocs-web-sdk/{p-bf90e11b.system.entry.js → p-7783d364.system.entry.js} +1 -1
  256. package/dist/verdocs-web-sdk/{p-d5941fd4.entry.js → p-793b6a49.entry.js} +1 -1
  257. package/dist/verdocs-web-sdk/{p-40db9709.entry.js → p-7bab7252.entry.js} +1 -1
  258. package/dist/verdocs-web-sdk/{p-c73ba4ca.system.entry.js → p-7cb3209d.system.entry.js} +1 -1
  259. package/dist/verdocs-web-sdk/{p-2d631b6f.entry.js → p-7d5e91f5.entry.js} +1 -1
  260. package/dist/verdocs-web-sdk/{p-741b2436.system.entry.js → p-7efaf5de.system.entry.js} +1 -1
  261. package/dist/verdocs-web-sdk/p-84341e03.js +1 -0
  262. package/dist/verdocs-web-sdk/{p-19c3bb25.system.entry.js → p-84b2f1f0.system.entry.js} +1 -1
  263. package/dist/verdocs-web-sdk/{p-ba610846.system.entry.js → p-84b84302.system.entry.js} +1 -1
  264. package/dist/verdocs-web-sdk/{p-218a42f0.entry.js → p-8e2b8c08.entry.js} +1 -1
  265. package/dist/verdocs-web-sdk/{p-ba9e472b.entry.js → p-96325d87.entry.js} +1 -1
  266. package/dist/verdocs-web-sdk/{p-dac44c07.entry.js → p-9871a31d.entry.js} +1 -1
  267. package/dist/verdocs-web-sdk/p-9a510e13.system.entry.js +1 -0
  268. package/dist/verdocs-web-sdk/{p-740d5a16.system.entry.js → p-9b02abc9.system.entry.js} +1 -1
  269. package/dist/verdocs-web-sdk/{p-10f9133d.entry.js → p-9df48701.entry.js} +1 -1
  270. package/dist/verdocs-web-sdk/{p-240d814a.system.js → p-a2a9d906.system.js} +1 -1
  271. package/dist/verdocs-web-sdk/{p-56270b66.entry.js → p-a3208fbe.entry.js} +1 -1
  272. package/dist/verdocs-web-sdk/{p-58a4d8ad.system.entry.js → p-a5f450a1.system.entry.js} +1 -1
  273. package/dist/verdocs-web-sdk/{p-5d16cfed.system.entry.js → p-a6048cc9.system.entry.js} +1 -1
  274. package/dist/verdocs-web-sdk/{p-f9f2b4c6.system.entry.js → p-a6cbd0a4.system.entry.js} +1 -1
  275. package/dist/verdocs-web-sdk/{p-e2b6a8ae.system.entry.js → p-aad7ef50.system.entry.js} +1 -1
  276. package/dist/verdocs-web-sdk/{p-4720767e.system.entry.js → p-ab889005.system.entry.js} +1 -1
  277. package/dist/verdocs-web-sdk/{p-22a86241.js → p-adc052fa.js} +1 -1
  278. package/dist/verdocs-web-sdk/{p-216bbc4c.system.entry.js → p-af1c6957.system.entry.js} +1 -1
  279. package/dist/verdocs-web-sdk/{p-741c0a94.entry.js → p-b68d2dba.entry.js} +1 -1
  280. package/dist/verdocs-web-sdk/{p-dffa796e.system.entry.js → p-b8266baf.system.entry.js} +1 -1
  281. package/dist/verdocs-web-sdk/{p-0d6462e0.system.entry.js → p-ba50174c.system.entry.js} +1 -1
  282. package/dist/verdocs-web-sdk/{p-1fbd8615.system.entry.js → p-ba87f33c.system.entry.js} +1 -1
  283. package/dist/verdocs-web-sdk/{p-2568de0e.entry.js → p-bd264e9b.entry.js} +1 -1
  284. package/dist/verdocs-web-sdk/{p-6c75ea76.entry.js → p-c1164de2.entry.js} +1 -1
  285. package/dist/verdocs-web-sdk/{p-8c92254d.entry.js → p-c230e3d1.entry.js} +1 -1
  286. package/dist/verdocs-web-sdk/{p-8b4633ae.system.entry.js → p-c3874a8d.system.entry.js} +1 -1
  287. package/dist/verdocs-web-sdk/{p-b58505d4.entry.js → p-c41a65a9.entry.js} +1 -1
  288. package/dist/verdocs-web-sdk/{p-d3c4d7da.entry.js → p-c4255966.entry.js} +1 -1
  289. package/dist/verdocs-web-sdk/{p-734c32bc.entry.js → p-cb9f22d7.entry.js} +1 -1
  290. package/dist/verdocs-web-sdk/{p-b2631a37.entry.js → p-ced58601.entry.js} +1 -1
  291. package/dist/verdocs-web-sdk/{p-b7c4f1d8.entry.js → p-d477824e.entry.js} +1 -1
  292. package/dist/verdocs-web-sdk/{p-2f3eacbb.entry.js → p-d6588808.entry.js} +1 -1
  293. package/dist/verdocs-web-sdk/{p-a13a4ae6.system.entry.js → p-d96f37d0.system.entry.js} +1 -1
  294. package/dist/verdocs-web-sdk/{p-c808a3de.entry.js → p-dca97ec0.entry.js} +1 -1
  295. package/dist/verdocs-web-sdk/{p-a57c46bd.entry.js → p-e27ec758.entry.js} +1 -1
  296. package/dist/verdocs-web-sdk/{p-4157d80b.system.entry.js → p-e2fe0aa5.system.entry.js} +1 -1
  297. package/dist/verdocs-web-sdk/{p-52f4ddf3.entry.js → p-e40d07cd.entry.js} +1 -1
  298. package/dist/verdocs-web-sdk/{p-930f2b08.entry.js → p-e491d531.entry.js} +1 -1
  299. package/dist/verdocs-web-sdk/{p-fb35b11f.system.entry.js → p-ecfa94fb.system.entry.js} +1 -1
  300. package/dist/verdocs-web-sdk/{p-9f4f2ad3.system.entry.js → p-ed818dbd.system.entry.js} +1 -1
  301. package/dist/verdocs-web-sdk/{p-5e203333.system.js → p-f04bf956.system.js} +1 -1
  302. package/dist/verdocs-web-sdk/{p-9cb5d470.entry.js → p-f0f27520.entry.js} +1 -1
  303. package/dist/verdocs-web-sdk/{p-aa51dac9.system.entry.js → p-f4e40ebd.system.entry.js} +1 -1
  304. package/dist/verdocs-web-sdk/{p-c2a628e8.entry.js → p-f4eaffc6.entry.js} +1 -1
  305. package/dist/verdocs-web-sdk/p-f520ee27.entry.js +1 -0
  306. package/dist/verdocs-web-sdk/{p-8f7aca9f.system.entry.js → p-f5222669.system.entry.js} +1 -1
  307. package/dist/verdocs-web-sdk/{p-94ea5e96.entry.js → p-f720f49e.entry.js} +1 -1
  308. package/dist/verdocs-web-sdk/{p-cfe6b8c9.system.entry.js → p-f7641208.system.entry.js} +1 -1
  309. package/dist/verdocs-web-sdk/{p-88000f71.entry.js → p-f8c3d844.entry.js} +1 -1
  310. package/dist/verdocs-web-sdk/{p-0733c3e1.system.entry.js → p-faae78ce.system.entry.js} +1 -1
  311. package/dist/verdocs-web-sdk/{p-cd61fea7.system.js → p-fbb8023f.system.js} +2 -2
  312. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  313. package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
  314. package/package.json +2 -2
  315. package/dist/esm-es5/Envelopes-2d89a065.js +0 -1
  316. package/dist/esm-es5/index-d5ba09f3.js +0 -2
  317. package/dist/verdocs-web-sdk/p-047b4bd1.js +0 -1
  318. package/dist/verdocs-web-sdk/p-0de7f044.js +0 -1
  319. package/dist/verdocs-web-sdk/p-1921f008.system.entry.js +0 -1
  320. package/dist/verdocs-web-sdk/p-2cc908f8.system.entry.js +0 -1
  321. package/dist/verdocs-web-sdk/p-39e8600d.system.js +0 -1
  322. package/dist/verdocs-web-sdk/p-b3d43687.system.entry.js +0 -1
  323. package/dist/verdocs-web-sdk/p-c2690e79.entry.js +0 -1
  324. package/dist/verdocs-web-sdk/p-c2ae8a0b.system.entry.js +0 -1
  325. package/dist/verdocs-web-sdk/p-fd174087.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as e,c as i,h as o,H as t,F as s,a as n}from"./p-14b44491.js";import{t as l,k as a,c as d}from"./p-84341e03.js";import{b as r}from"./p-29f64c27.js";import"./p-05788c2b.js";import{V as c}from"./p-2174e539.js";import{i as p}from"./p-5e808a0b.js";import{s as h}from"./p-19b70691.js";import{S as v}from"./p-7a1b2643.js";import"./p-eab67c09.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-c220af42.js";const x=class{constructor(o){e(this,o),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.another=i(this,"another",7),this.view=i(this,"view",7),this.next=i(this,"next",7),this.endpoint=c.getDefault(),this.envelopeId="",this.headerTargetId=null,this.canceling=!1,this.envelope=null,this.roleNames=[],this.showCancelDone=!1}componentWillLoad(){this.endpoint.loadSession()}async componentWillRender(){if(this.envelopeId)return this.reloadEnvelope();console.error("[VIEW] Missing required envelopeId")}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null,i=document.getElementById("verdocs-view-header");e&&i&&(console.log("[VIEW] Moving header"),i.remove(),e.append(i))}async reloadEnvelope(){var e,i,o;console.log("[VIEW] Loading envelope...");try{this.envelope=await l(this.endpoint,this.envelopeId),console.log("[VIEW] Loaded envelope",this.envelope),this.roleNames=this.envelope.recipients.map((e=>e.role_name)),setTimeout((async()=>{console.log("[VIEW] Reloading envelope..."),this.envelope=await l(this.endpoint,this.envelopeId),console.log("[VIEW] Reloaded envelope",this.envelope)}),2e3)}catch(t){null===(e=this.sdkError)||void 0===e||e.emit(new v(t.message,null===(i=t.response)||void 0===i?void 0:i.status,null===(o=t.response)||void 0===o?void 0:o.data))}}handlePageRendered(e){console.log("[VIEW] Page rendered",e.detail)}async handleOptionSelected(e){var i,o;switch(e.detail.id){case"cancel":confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")&&(this.canceling=!0,d(this.endpoint,this.envelopeId).then((e=>(this.canceling=!1,console.log("[VIEW] Envelope canceled",e),l(this.endpoint,this.envelopeId)))).then((e=>{console.log("[VIEW] Loaded new envelope details",e),this.envelope=e})).catch((e=>{var i,o,t;this.canceling=!1,console.log("[VIEW] Error canceling envelope",e),null===(i=this.sdkError)||void 0===i||i.emit(new v(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(t=e.response)||void 0===t?void 0:t.data))})),this.showCancelDone=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"}));break;case"print":window.print(),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download-attachments":{const e=await a(this.endpoint,this.envelopeId,this.envelope.envelope_document_id);window.open(e,"_blank")}break;case"download-certificate":{const e=await a(this.endpoint,this.envelopeId,this.envelope.certificate_document_id);window.open(e,"_blank")}break;case"download-all":h(this.endpoint,[this.envelope]).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading Zip",e)}))}}render(){var e;if(!this.envelope)return o(t,null,o("img",{src:"https://verdocs-public-assets.s3.amazonaws.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}));const i=[{id:"print",label:"Print"}];r(this.endpoint.session,this.envelope)&&i.push({id:"cancel",label:"Cancel"});const n=this.envelope.documents.length>0,l=this.envelope.documents.filter((e=>"attachment"===e.type)).length,a=void 0!==this.envelope.documents.find((e=>"certificate"===e.type));return(n||a)&&(i.push({label:""}),n&&i.push({id:"download-attachments",label:l>1?"Download Documents":"Download Document"}),a&&i.push({id:"download-certificate",label:"Download Certificate"}),n&&a&&i.push({id:"download-all",label:"Download All Files"})),o(t,null,o("div",{id:"verdocs-view-header"},o("div",{class:"inner"},o("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),o("div",{class:"title"},this.envelope.name),o("div",{style:{flex:"1"}}),o("div",{style:{marginLeft:"10px"}}),o("verdocs-dropdown",{options:i,onOptionSelected:e=>this.handleOptionSelected(e)}))),o("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},((null===(e=this.envelope)||void 0===e?void 0:e.documents)||[]).filter((e=>"certificate"!==e.type)).map((e=>{const i=p(1,e.page_numbers);return o(s,null,i.map((i=>o("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,type:"filled",virtualWidth:612,virtualHeight:792,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showCancelDone&&o("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:()=>{this.showCancelDone=!1}}),this.canceling&&o("div",{class:"loading-indicator"},o("verdocs-loader",null)))}get component(){return n(this)}};x.style='verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';export{x as verdocs_view}
@@ -1 +1 @@
1
- import{r as e,c as o,h as i,H as t}from"./p-876d3ff3.js";import{f as a}from"./p-aa124212.js";const l=class{constructor(i){e(this,i),this.exit=o(this,"exit",7),this.next=o(this,"next",7),this.draggingOver=!1,this.decodedFiles=[]}handleCancel(){this.exit.emit()}handleDismiss(e){"background-overlay"===e.target.className&&(e.preventDefault(),this.handleCancel())}handleDone(){this.next.emit(this.decodedFiles)}handleDragOver(e){e.preventDefault(),this.draggingOver=!0}handleDragLeave(e){e.preventDefault(),this.draggingOver=!1}async handleDrop(e){e.preventDefault(),this.draggingOver=!1;let o=[];if(e.dataTransfer.items){for(let i=0;i<e.dataTransfer.items.length;i++)if("file"===e.dataTransfer.items[i].kind){const t=e.dataTransfer.items[i].getAsFile();o.push(t)}}else o=e.dataTransfer.files;this.decodedFiles=await Promise.all(o.map(a))}handleRemoveAttachment(e){const o=[...this.decodedFiles];o.splice(e,1),this.decodedFiles=o}handleSelectFile(){var e;null===(e=this.fileInput)||void 0===e||e.click()}async handleFileChange(){var e,o;let i=[];for(let t=0;t<(null===(e=this.fileInput)||void 0===e?void 0:e.files.length);t++)i.push(null===(o=this.fileInput)||void 0===o?void 0:o.files[t]);this.decodedFiles=await Promise.all(i.map(a))}render(){return i(t,null,i("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},i("div",{class:"dialog"},i("div",{class:"heading"},"Upload attachment"),this.decodedFiles.length<1?i("div",{class:{"drop-target":!0,"dragging-over":this.draggingOver},onDragOver:e=>this.handleDragOver(e),onDragLeave:e=>this.handleDragLeave(e),onDrop:e=>this.handleDrop(e)},i("p",null,"Drag and drop a file here..."),i("p",null,"- or -"),i("verdocs-button",{label:"Select a file...",onClick:()=>this.handleSelectFile()}),i("input",{type:"file",ref:e=>this.fileInput=e,style:{display:"none"},onChange:()=>this.handleFileChange()})):i("div",{class:"attachments"},this.decodedFiles.map(((e,o)=>i("div",{class:"attachment"},i("div",{class:"icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" /></svg>'}),i("div",{class:"name"},e.name),i("div",{class:"icon trash",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>',onClick:()=>this.handleRemoveAttachment(o)}))))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:"Done",onClick:()=>this.handleDone(),disabled:this.decodedFiles.length<1})))))}};l.style='verdocs-upload-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-upload-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-upload-dialog .background-overlay{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:absolute;-ms-flex-align:center;align-items:center;background:#0000007f;-ms-flex-pack:center;justify-content:center}verdocs-upload-dialog .dialog{width:320px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-upload-dialog .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-upload-dialog .buttons verdocs-button{margin-left:16px}verdocs-upload-dialog .drop-target{opacity:1;width:100%;display:-ms-flexbox;display:flex;margin:20px 0;min-height:260px;padding:30px 15px;text-align:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;background-color:#f5f5f5;color:rgba(0, 0, 0, 0.54);border:2px dashed #979797}verdocs-upload-dialog .drop-target p{margin:12px 0}verdocs-upload-dialog .drop-target.dragging-over{border:5px solid #4c56cb}verdocs-upload-dialog .drop-target>verdocs-button{margin:12px 0;display:inline-block}verdocs-upload-dialog .attachments{height:56px;font-size:0;margin:20px 0;padding:0 16px;line-height:56px;white-space:normal;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-upload-dialog .attachments .attachment{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .attachments .attachment .icon{width:18px;height:18px;line-height:18px}verdocs-upload-dialog .attachments .attachment .icon.trash{cursor:pointer}verdocs-upload-dialog .attachments .attachment .name{-ms-flex:1;flex:1;font-size:14px;overflow:hidden;font-weight:400;white-space:nowrap;text-overflow:ellipsis}';export{l as verdocs_upload_dialog}
1
+ import{r as e,c as o,h as i,H as t}from"./p-14b44491.js";import{f as a}from"./p-aa124212.js";const l=class{constructor(i){e(this,i),this.exit=o(this,"exit",7),this.next=o(this,"next",7),this.draggingOver=!1,this.decodedFiles=[]}handleCancel(){this.exit.emit()}handleDismiss(e){"background-overlay"===e.target.className&&(e.preventDefault(),this.handleCancel())}handleDone(){this.next.emit(this.decodedFiles)}handleDragOver(e){e.preventDefault(),this.draggingOver=!0}handleDragLeave(e){e.preventDefault(),this.draggingOver=!1}async handleDrop(e){e.preventDefault(),this.draggingOver=!1;let o=[];if(e.dataTransfer.items){for(let i=0;i<e.dataTransfer.items.length;i++)if("file"===e.dataTransfer.items[i].kind){const t=e.dataTransfer.items[i].getAsFile();o.push(t)}}else o=e.dataTransfer.files;this.decodedFiles=await Promise.all(o.map(a))}handleRemoveAttachment(e){const o=[...this.decodedFiles];o.splice(e,1),this.decodedFiles=o}handleSelectFile(){var e;null===(e=this.fileInput)||void 0===e||e.click()}async handleFileChange(){var e,o;let i=[];for(let t=0;t<(null===(e=this.fileInput)||void 0===e?void 0:e.files.length);t++)i.push(null===(o=this.fileInput)||void 0===o?void 0:o.files[t]);this.decodedFiles=await Promise.all(i.map(a))}render(){return i(t,null,i("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},i("div",{class:"dialog"},i("div",{class:"heading"},"Upload attachment"),this.decodedFiles.length<1?i("div",{class:{"drop-target":!0,"dragging-over":this.draggingOver},onDragOver:e=>this.handleDragOver(e),onDragLeave:e=>this.handleDragLeave(e),onDrop:e=>this.handleDrop(e)},i("p",null,"Drag and drop a file here..."),i("p",null,"- or -"),i("verdocs-button",{label:"Select a file...",onClick:()=>this.handleSelectFile()}),i("input",{type:"file",ref:e=>this.fileInput=e,style:{display:"none"},onChange:()=>this.handleFileChange()})):i("div",{class:"attachments"},this.decodedFiles.map(((e,o)=>i("div",{class:"attachment"},i("div",{class:"icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" /></svg>'}),i("div",{class:"name"},e.name),i("div",{class:"icon trash",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>',onClick:()=>this.handleRemoveAttachment(o)}))))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:"Done",onClick:()=>this.handleDone(),disabled:this.decodedFiles.length<1})))))}};l.style='verdocs-upload-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-upload-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-upload-dialog .background-overlay{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:absolute;-ms-flex-align:center;align-items:center;background:#0000007f;-ms-flex-pack:center;justify-content:center}verdocs-upload-dialog .dialog{width:320px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-upload-dialog .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-upload-dialog .buttons verdocs-button{margin-left:16px}verdocs-upload-dialog .drop-target{opacity:1;width:100%;display:-ms-flexbox;display:flex;margin:20px 0;min-height:260px;padding:30px 15px;text-align:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;background-color:#f5f5f5;color:rgba(0, 0, 0, 0.54);border:2px dashed #979797}verdocs-upload-dialog .drop-target p{margin:12px 0}verdocs-upload-dialog .drop-target.dragging-over{border:5px solid #4c56cb}verdocs-upload-dialog .drop-target>verdocs-button{margin:12px 0;display:inline-block}verdocs-upload-dialog .attachments{height:56px;font-size:0;margin:20px 0;padding:0 16px;line-height:56px;white-space:normal;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-upload-dialog .attachments .attachment{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .attachments .attachment .icon{width:18px;height:18px;line-height:18px}verdocs-upload-dialog .attachments .attachment .icon.trash{cursor:pointer}verdocs-upload-dialog .attachments .attachment .name{-ms-flex:1;flex:1;font-size:14px;overflow:hidden;font-weight:400;white-space:nowrap;text-overflow:ellipsis}';export{l as verdocs_upload_dialog}
@@ -1,2 +1,2 @@
1
- let e,t,n=!1,l=!1,o=!1,s=!1,i=null,r=!1;const c={},f=e=>"object"==(e=typeof e)||"function"===e,a=(e,t,...n)=>{let l=null,o=null,s=null,i=!1,r=!1;const c=[],a=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!f(l))&&(l+=""),i&&r?c[c.length-1].t+=l:c.push(i?u(null,l):l),r=i)};if(a(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,$);const d=u(e,null);return d.l=t,c.length>0&&(d.o=c),d.i=o,d.u=s,d},u=(e,t)=>({$:0,p:e,t,h:null,o:null,l:null,i:null,u:null}),d={},$={forEach:(e,t)=>e.map(p).forEach(t),map:(e,t)=>e.map(p).map(t).map(h)},p=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.p,vtext:e.t}),h=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),a(e.vtag,t,...e.vchildren||[])}const t=u(e.vtag,e.vtext);return t.l=e.vattrs,t.o=e.vchildren,t.i=e.vkey,t.u=e.vname,t},m=e=>oe(e).m,y=(e,t,n)=>{const l=m(e);return{emit:e=>b(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},b=(e,t,n)=>{const l=he.ce(t,n);return e.dispatchEvent(l),l},w=new WeakMap,g=e=>"sc-"+e.g,v=(e,t,n,l,o,s)=>{if(n!==l){let i=re(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,o=j(n),s=j(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const r=f(l);if((i||r&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&s||o)&&!r&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):re(de,r)?r.slice(2):r[2]+t.slice(3),n&&he.rel(e,t,n,!1),l&&he.ael(e,t,l,!1)}},k=/\s/,j=e=>e?e.split(k):[],S=(e,t,n,l)=>{const o=11===t.h.nodeType&&t.h.host?t.h.host:t.h,s=e&&e.l||c,i=t.l||c;for(l in s)l in i||v(o,l,s[l],void 0,n,t.$);for(l in i)v(o,l,s[l],i[l],n,t.$)},O=(l,i,r)=>{const c=i.o[r];let f,a,u,d=0;if(n||(o=!0,"slot"===c.p&&(c.$|=c.o?2:1)),null!==c.t)f=c.h=$e.createTextNode(c.t);else if(1&c.$)f=c.h=$e.createTextNode("");else{if(s||(s="svg"===c.p),f=c.h=$e.createElementNS(s?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&c.$?"slot-fb":c.p),s&&"foreignObject"===c.p&&(s=!1),S(null,c,s),c.o)for(d=0;d<c.o.length;++d)a=O(l,c,d),a&&f.appendChild(a);"svg"===c.p?s=!1:"foreignObject"===f.tagName&&(s=!0)}return f["s-hn"]=t,3&c.$&&(f["s-sr"]=!0,f["s-cr"]=e,f["s-sn"]=c.u||"",u=l&&l.o&&l.o[r],u&&u.p===c.p&&l.h&&M(l.h,!1)),f},M=(e,n)=>{he.$|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const s=l[e];s["s-hn"]!==t&&s["s-ol"]&&(T(s).insertBefore(s,P(s)),s["s-ol"].remove(),s["s-ol"]=void 0,o=!0),n&&M(s,n)}he.$&=-2},C=(e,t,n,l,o,s)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(;o<=s;++o)l[o]&&(i=O(null,n,o),i&&(l[o].h=i,r.insertBefore(i,P(t))))},R=(e,t,n,o,s)=>{for(;t<=n;++t)(o=e[t])&&(s=o.h,D(o),l=!0,s["s-ol"]?s["s-ol"].remove():M(s,!0),s.remove())},x=(e,t)=>e.p===t.p&&("slot"===e.p?e.u===t.u:e.i===t.i),P=e=>e&&e["s-ol"]||e,T=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,W=(e,t)=>{const n=t.h=e.h,l=e.o,o=t.o,i=t.p,r=t.t;let c;null===r?(s="svg"===i||"foreignObject"!==i&&s,"slot"===i||S(e,t,s),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,r=0,c=0,f=0,a=t.length-1,u=t[0],d=t[a],$=l.length-1,p=l[0],h=l[$];for(;i<=a&&r<=$;)if(null==u)u=t[++i];else if(null==d)d=t[--a];else if(null==p)p=l[++r];else if(null==h)h=l[--$];else if(x(u,p))W(u,p),u=t[++i],p=l[++r];else if(x(d,h))W(d,h),d=t[--a],h=l[--$];else if(x(u,h))"slot"!==u.p&&"slot"!==h.p||M(u.h.parentNode,!1),W(u,h),e.insertBefore(u.h,d.h.nextSibling),u=t[++i],h=l[--$];else if(x(d,p))"slot"!==u.p&&"slot"!==h.p||M(d.h.parentNode,!1),W(d,p),e.insertBefore(d.h,u.h),d=t[--a],p=l[++r];else{for(c=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].i&&t[f].i===p.i){c=f;break}c>=0?(s=t[c],s.p!==p.p?o=O(t&&t[r],n,c):(W(s,p),t[c]=void 0,o=s.h),p=l[++r]):(o=O(t&&t[r],n,r),p=l[++r]),o&&T(u.h).insertBefore(o,P(u.h))}i>a?C(e,null==l[$+1]?null:l[$+1].h,n,l,r,$):r>$&&R(t,i,a)})(n,l,t,o):null!==o?(null!==e.t&&(n.textContent=""),C(n,null,t,o,0,o.length-1)):null!==l&&R(l,0,l.length-1),s&&"svg"===i&&(s=!1)):(c=n["s-cr"])?c.parentNode.textContent=r:e.t!==r&&(n.data=r)},E=e=>{const t=e.childNodes;let n,l,o,s,i,r;for(l=0,o=t.length;l<o;l++)if(n=t[l],1===n.nodeType){if(n["s-sr"])for(i=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(r=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||""!==i){if(1===r&&i===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===r||3===r&&""!==t[s].textContent.trim()){n.hidden=!0;break}E(n)}},L=[],N=e=>{let t,n,o,s,i,r,c=0;const f=e.childNodes,a=f.length;for(;c<a;c++){if(t=f[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(o=n.parentNode.childNodes,s=t["s-sn"],r=o.length-1;r>=0;r--)n=o[r],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(U(n,s)?(i=L.find((e=>e.v===n)),l=!0,n["s-sn"]=n["s-sn"]||s,i?i.k=t:L.push({k:t,v:n}),n["s-sr"]&&L.map((e=>{U(e.v,n["s-sn"])&&(i=L.find((e=>e.v===n)),i&&!e.k&&(e.k=i.k))}))):L.some((e=>e.v===n))||L.push({v:n}));1===t.nodeType&&N(t)}},U=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,D=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(D)},F=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},A=(e,t)=>{if(e.$|=16,!(4&e.$))return F(e,e.S),Se((()=>H(e,t)));e.$|=512},H=(e,t)=>{const n=e.O;let l;return t?(e.$|=256,e.M&&(e.M.map((([e,t])=>I(n,e,t))),e.M=null),l=I(n,"componentWillLoad")):l=I(n,"componentWillUpdate"),l=J(l,(()=>I(n,"componentWillRender"))),J(l,(()=>q(e,n,t)))},q=async(e,t,n)=>{const l=e.m,o=l["s-rc"];n&&(e=>{const t=e.C;((e,t)=>{let n=g(t);const l=ue.get(n);if(e=11===e.nodeType?e:$e,l)if("string"==typeof l){let t,o=w.get(e=e.head||e);o||w.set(e,o=new Set),o.has(n)||(t=$e.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l])})(e.m.getRootNode(),t)})(e);V(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>z(e);0===t.length?n():(Promise.all(t).then(n),e.$|=4,t.length=0)}},V=(s,r)=>{try{i=r,r=r.render(),s.$&=-17,s.$|=2,((s,i)=>{const r=s.m,c=s.C,f=s.R||u(null,null),$=(e=>e&&e.p===d)(i)?i:a(null,null,i);if(t=r.tagName,c.P&&($.l=$.l||{},c.P.map((([e,t])=>$.l[t]=r[e]))),$.p=null,$.$|=4,s.R=$,$.h=f.h=r,e=r["s-cr"],n=0!=(1&c.$),l=!1,W(f,$),he.$|=1,o){let e,t,n,l,o,s;N($.h);let i=0;for(;i<L.length;i++)e=L[i],t=e.v,t["s-ol"]||(n=$e.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<L.length;i++)if(e=L[i],t=e.v,e.k){for(l=e.k.parentNode,o=e.k.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}l&&E($.h),he.$&=-2,L.length=0})(s,r)}catch(e){ce(e,s.m)}return i=null,null},_=()=>i,z=e=>{const t=e.m,n=e.O,l=e.S;I(n,"componentDidRender"),64&e.$?I(n,"componentDidUpdate"):(e.$|=64,K(t),I(n,"componentDidLoad"),e.T(t),l||G()),e.W(t),e.j&&(e.j(),e.j=void 0),512&e.$&&je((()=>A(e,!1))),e.$&=-517},B=e=>{{const t=oe(e),n=t.m.isConnected;return n&&2==(18&t.$)&&A(t,!1),n}},G=()=>{K($e.documentElement),je((()=>b(de,"appload",{detail:{namespace:"verdocs-web-sdk"}})))},I=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ce(e)}},J=(e,t)=>e&&e.then?e.then(t):t(),K=e=>e.classList.add("hydrated"),Q=(e,t,n)=>{if(t.L){e.watchers&&(t.N=e.watchers);const l=Object.entries(t.L),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>oe(this).U.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=oe(e),s=o.m,i=o.U.get(t),r=o.$,c=o.O;if(n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.L[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.U.set(t,n),c)){if(l.N&&128&r){const e=l.N[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){ce(e,s)}}))}2==(18&r)&&A(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=oe(this);return n.D.then((()=>n.O[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){he.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.P.push([e,o]),o}))}}return e},X=(e,t={})=>{const n=[],l=t.exclude||[],o=de.customElements,s=$e.head,i=s.querySelector("meta[charset]"),r=$e.createElement("style"),c=[];let f,a=!0;Object.assign(he,t),he.F=new URL(t.resourcesUrl||"./",$e.baseURI).href,e.map((e=>{e[1].map((t=>{const s={$:t[0],g:t[1],L:t[2],A:t[3]};s.L=t[2],s.A=t[3],s.P=[],s.N={};const i=s.g,r=class extends HTMLElement{constructor(e){super(e),ie(e=this,s)}connectedCallback(){f&&(clearTimeout(f),f=null),a?c.push(this):he.jmp((()=>(e=>{if(0==(1&he.$)){const t=oe(e),n=t.C,l=()=>{};if(1&t.$)Z(e,t,n.A);else{t.$|=1,12&n.$&&(e=>{const t=e["s-cr"]=$e.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){F(t,t.S=n);break}}n.L&&Object.entries(n.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.$)){{if(t.$|=32,(o=ae(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.N=o.watchers,Q(o,n,2),o.isProxied=!0);const e=()=>{};t.$|=8;try{new o(t)}catch(e){ce(e)}t.$&=-9,t.$|=128,e()}if(o.style){let e=o.style;const t=g(n);if(!ue.has(t)){const l=()=>{};((e,t,n)=>{let l=ue.get(e);ye&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,ue.set(e,l)})(t,e,!!(1&n.$)),l()}}}const s=t.S,i=()=>A(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){he.jmp((()=>(()=>{if(0==(1&he.$)){const e=oe(this),t=e.O;e.H&&(e.H.map((e=>e())),e.H=void 0),I(t,"disconnectedCallback")}})()))}componentOnReady(){return oe(this).q}};s.V=e[0],l.includes(i)||o.get(i)||(n.push(i),o.define(i,Q(r,s,1)))}))})),r.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles",""),s.insertBefore(r,i?i.nextSibling:s.firstChild),a=!1,c.length?c.map((e=>e.connectedCallback())):he.jmp((()=>f=setTimeout(G,30)))},Y=(e,t)=>t,Z=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=te(e,n),i=ee(t,o),r=ne(n);he.ael(s,l,i,r),(t.H=t.H||[]).push((()=>he.rel(s,l,i,r)))}))},ee=(e,t)=>n=>{try{256&e.$?e.O[t](n):(e.M=e.M||[]).push([t,n])}catch(e){ce(e)}},te=(e,t)=>4&t?$e:8&t?de:e,ne=e=>0!=(2&e),le=new WeakMap,oe=e=>le.get(e),se=(e,t)=>le.set(t.O=e,t),ie=(e,t)=>{const n={$:0,m:e,C:t,U:new Map};return n.D=new Promise((e=>n.W=e)),n.q=new Promise((e=>n.T=e)),e["s-p"]=[],e["s-rc"]=[],Z(e,n,t.A),le.set(e,n)},re=(e,t)=>t in e,ce=(e,t)=>(0,console.error)(e,t),fe=new Map,ae=e=>{const t=e.g.replace(/-/g,"_"),n=e.V,l=fe.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(fe.set(n,e),e[t])),ce)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ue=new Map,de="undefined"!=typeof window?window:{},$e=de.document||{head:{}},pe=de.HTMLElement||class{},he={$:0,F:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},me=e=>Promise.resolve(e),ye=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),be=[],we=[],ge=(e,t)=>n=>{e.push(n),r||(r=!0,t&&4&he.$?je(ke):he.raf(ke))},ve=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ce(e)}e.length=0},ke=()=>{ve(be),ve(we),(r=be.length>0)&&he.raf(ke)},je=e=>me().then(e),Se=ge(we,!0);export{Y as F,d as H,m as a,X as b,y as c,pe as d,B as f,_ as g,a as h,me as p,se as r}
1
+ let e,t,n=!1,l=!1,o=!1,s=!1,i=null,r=!1;const c={},f=e=>"object"==(e=typeof e)||"function"===e,a=(e,t,...n)=>{let l=null,o=null,s=null,i=!1,r=!1;const c=[],a=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!f(l))&&(l+=""),i&&r?c[c.length-1].t+=l:c.push(i?u(null,l):l),r=i)};if(a(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,$);const d=u(e,null);return d.l=t,c.length>0&&(d.o=c),d.i=o,d.u=s,d},u=(e,t)=>({$:0,p:e,t,h:null,o:null,l:null,i:null,u:null}),d={},$={forEach:(e,t)=>e.map(p).forEach(t),map:(e,t)=>e.map(p).map(t).map(h)},p=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.p,vtext:e.t}),h=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),a(e.vtag,t,...e.vchildren||[])}const t=u(e.vtag,e.vtext);return t.l=e.vattrs,t.o=e.vchildren,t.i=e.vkey,t.u=e.vname,t},m=e=>oe(e).m,y=(e,t,n)=>{const l=m(e);return{emit:e=>b(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},b=(e,t,n)=>{const l=pe.ce(t,n);return e.dispatchEvent(l),l},w=new WeakMap,g=e=>"sc-"+e.g,v=(e,t,n,l,o,s)=>{if(n!==l){let i=re(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,o=j(n),s=j(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const r=f(l);if((i||r&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&s||o)&&!r&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):re(de,r)?r.slice(2):r[2]+t.slice(3),n&&pe.rel(e,t,n,!1),l&&pe.ael(e,t,l,!1)}},k=/\s/,j=e=>e?e.split(k):[],S=(e,t,n,l)=>{const o=11===t.h.nodeType&&t.h.host?t.h.host:t.h,s=e&&e.l||c,i=t.l||c;for(l in s)l in i||v(o,l,s[l],void 0,n,t.$);for(l in i)v(o,l,s[l],i[l],n,t.$)},O=(l,i,r)=>{const c=i.o[r];let f,a,u,d=0;if(n||(o=!0,"slot"===c.p&&(c.$|=c.o?2:1)),null!==c.t)f=c.h=$e.createTextNode(c.t);else if(1&c.$)f=c.h=$e.createTextNode("");else{if(s||(s="svg"===c.p),f=c.h=$e.createElementNS(s?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&c.$?"slot-fb":c.p),s&&"foreignObject"===c.p&&(s=!1),S(null,c,s),c.o)for(d=0;d<c.o.length;++d)a=O(l,c,d),a&&f.appendChild(a);"svg"===c.p?s=!1:"foreignObject"===f.tagName&&(s=!0)}return f["s-hn"]=t,3&c.$&&(f["s-sr"]=!0,f["s-cr"]=e,f["s-sn"]=c.u||"",u=l&&l.o&&l.o[r],u&&u.p===c.p&&l.h&&M(l.h,!1)),f},M=(e,n)=>{pe.$|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const s=l[e];s["s-hn"]!==t&&s["s-ol"]&&(T(s).insertBefore(s,P(s)),s["s-ol"].remove(),s["s-ol"]=void 0,o=!0),n&&M(s,n)}pe.$&=-2},C=(e,t,n,l,o,s)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(;o<=s;++o)l[o]&&(i=O(null,n,o),i&&(l[o].h=i,r.insertBefore(i,P(t))))},R=(e,t,n,o,s)=>{for(;t<=n;++t)(o=e[t])&&(s=o.h,D(o),l=!0,s["s-ol"]?s["s-ol"].remove():M(s,!0),s.remove())},x=(e,t)=>e.p===t.p&&("slot"===e.p?e.u===t.u:e.i===t.i),P=e=>e&&e["s-ol"]||e,T=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,W=(e,t)=>{const n=t.h=e.h,l=e.o,o=t.o,i=t.p,r=t.t;let c;null===r?(s="svg"===i||"foreignObject"!==i&&s,"slot"===i||S(e,t,s),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,r=0,c=0,f=0,a=t.length-1,u=t[0],d=t[a],$=l.length-1,p=l[0],h=l[$];for(;i<=a&&r<=$;)if(null==u)u=t[++i];else if(null==d)d=t[--a];else if(null==p)p=l[++r];else if(null==h)h=l[--$];else if(x(u,p))W(u,p),u=t[++i],p=l[++r];else if(x(d,h))W(d,h),d=t[--a],h=l[--$];else if(x(u,h))"slot"!==u.p&&"slot"!==h.p||M(u.h.parentNode,!1),W(u,h),e.insertBefore(u.h,d.h.nextSibling),u=t[++i],h=l[--$];else if(x(d,p))"slot"!==u.p&&"slot"!==h.p||M(d.h.parentNode,!1),W(d,p),e.insertBefore(d.h,u.h),d=t[--a],p=l[++r];else{for(c=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].i&&t[f].i===p.i){c=f;break}c>=0?(s=t[c],s.p!==p.p?o=O(t&&t[r],n,c):(W(s,p),t[c]=void 0,o=s.h),p=l[++r]):(o=O(t&&t[r],n,r),p=l[++r]),o&&T(u.h).insertBefore(o,P(u.h))}i>a?C(e,null==l[$+1]?null:l[$+1].h,n,l,r,$):r>$&&R(t,i,a)})(n,l,t,o):null!==o?(null!==e.t&&(n.textContent=""),C(n,null,t,o,0,o.length-1)):null!==l&&R(l,0,l.length-1),s&&"svg"===i&&(s=!1)):(c=n["s-cr"])?c.parentNode.textContent=r:e.t!==r&&(n.data=r)},E=e=>{const t=e.childNodes;let n,l,o,s,i,r;for(l=0,o=t.length;l<o;l++)if(n=t[l],1===n.nodeType){if(n["s-sr"])for(i=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(r=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||""!==i){if(1===r&&i===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===r||3===r&&""!==t[s].textContent.trim()){n.hidden=!0;break}E(n)}},L=[],N=e=>{let t,n,o,s,i,r,c=0;const f=e.childNodes,a=f.length;for(;c<a;c++){if(t=f[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(o=n.parentNode.childNodes,s=t["s-sn"],r=o.length-1;r>=0;r--)n=o[r],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(U(n,s)?(i=L.find((e=>e.v===n)),l=!0,n["s-sn"]=n["s-sn"]||s,i?i.k=t:L.push({k:t,v:n}),n["s-sr"]&&L.map((e=>{U(e.v,n["s-sn"])&&(i=L.find((e=>e.v===n)),i&&!e.k&&(e.k=i.k))}))):L.some((e=>e.v===n))||L.push({v:n}));1===t.nodeType&&N(t)}},U=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,D=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(D)},F=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},A=(e,t)=>{if(e.$|=16,!(4&e.$))return F(e,e.S),je((()=>H(e,t)));e.$|=512},H=(e,t)=>{const n=e.O;let l;return t?(e.$|=256,e.M&&(e.M.map((([e,t])=>I(n,e,t))),e.M=null),l=I(n,"componentWillLoad")):l=I(n,"componentWillUpdate"),l=J(l,(()=>I(n,"componentWillRender"))),J(l,(()=>q(e,n,t)))},q=async(e,t,n)=>{const l=e.m,o=l["s-rc"];n&&(e=>{const t=e.C;((e,t)=>{let n=g(t);const l=ue.get(n);if(e=11===e.nodeType?e:$e,l)if("string"==typeof l){let t,o=w.get(e=e.head||e);o||w.set(e,o=new Set),o.has(n)||(t=$e.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l])})(e.m.getRootNode(),t)})(e);V(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>z(e);0===t.length?n():(Promise.all(t).then(n),e.$|=4,t.length=0)}},V=(s,r)=>{try{i=r,r=r.render(),s.$&=-17,s.$|=2,((s,i)=>{const r=s.m,c=s.C,f=s.R||u(null,null),$=(e=>e&&e.p===d)(i)?i:a(null,null,i);if(t=r.tagName,c.P&&($.l=$.l||{},c.P.map((([e,t])=>$.l[t]=r[e]))),$.p=null,$.$|=4,s.R=$,$.h=f.h=r,e=r["s-cr"],n=0!=(1&c.$),l=!1,W(f,$),pe.$|=1,o){let e,t,n,l,o,s;N($.h);let i=0;for(;i<L.length;i++)e=L[i],t=e.v,t["s-ol"]||(n=$e.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<L.length;i++)if(e=L[i],t=e.v,e.k){for(l=e.k.parentNode,o=e.k.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}l&&E($.h),pe.$&=-2,L.length=0})(s,r)}catch(e){ce(e,s.m)}return i=null,null},_=()=>i,z=e=>{const t=e.m,n=e.O,l=e.S;I(n,"componentDidRender"),64&e.$?I(n,"componentDidUpdate"):(e.$|=64,K(t),I(n,"componentDidLoad"),e.T(t),l||G()),e.W(t),e.j&&(e.j(),e.j=void 0),512&e.$&&ke((()=>A(e,!1))),e.$&=-517},B=e=>{{const t=oe(e),n=t.m.isConnected;return n&&2==(18&t.$)&&A(t,!1),n}},G=()=>{K($e.documentElement),ke((()=>b(de,"appload",{detail:{namespace:"verdocs-web-sdk"}})))},I=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ce(e)}},J=(e,t)=>e&&e.then?e.then(t):t(),K=e=>e.classList.add("hydrated"),Q=(e,t,n)=>{if(t.L){e.watchers&&(t.N=e.watchers);const l=Object.entries(t.L),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>oe(this).U.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=oe(e),s=o.m,i=o.U.get(t),r=o.$,c=o.O;if(n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.L[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.U.set(t,n),c)){if(l.N&&128&r){const e=l.N[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){ce(e,s)}}))}2==(18&r)&&A(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=oe(this);return n.D.then((()=>n.O[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){pe.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.P.push([e,o]),o}))}}return e},X=(e,t={})=>{const n=[],l=t.exclude||[],o=de.customElements,s=$e.head,i=s.querySelector("meta[charset]"),r=$e.createElement("style"),c=[];let f,a=!0;Object.assign(pe,t),pe.F=new URL(t.resourcesUrl||"./",$e.baseURI).href,e.map((e=>{e[1].map((t=>{const s={$:t[0],g:t[1],L:t[2],A:t[3]};s.L=t[2],s.A=t[3],s.P=[],s.N={};const i=s.g,r=class extends HTMLElement{constructor(e){super(e),ie(e=this,s)}connectedCallback(){f&&(clearTimeout(f),f=null),a?c.push(this):pe.jmp((()=>(e=>{if(0==(1&pe.$)){const t=oe(e),n=t.C,l=()=>{};if(1&t.$)Z(e,t,n.A);else{t.$|=1,12&n.$&&(e=>{const t=e["s-cr"]=$e.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){F(t,t.S=n);break}}n.L&&Object.entries(n.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.$)){{if(t.$|=32,(o=ae(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.N=o.watchers,Q(o,n,2),o.isProxied=!0);const e=()=>{};t.$|=8;try{new o(t)}catch(e){ce(e)}t.$&=-9,t.$|=128,e()}if(o.style){let e=o.style;const t=g(n);if(!ue.has(t)){const l=()=>{};((e,t,n)=>{let l=ue.get(e);me&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,ue.set(e,l)})(t,e,!!(1&n.$)),l()}}}const s=t.S,i=()=>A(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){pe.jmp((()=>(()=>{if(0==(1&pe.$)){const e=oe(this),t=e.O;e.H&&(e.H.map((e=>e())),e.H=void 0),I(t,"disconnectedCallback")}})()))}componentOnReady(){return oe(this).q}};s.V=e[0],l.includes(i)||o.get(i)||(n.push(i),o.define(i,Q(r,s,1)))}))})),r.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles",""),s.insertBefore(r,i?i.nextSibling:s.firstChild),a=!1,c.length?c.map((e=>e.connectedCallback())):pe.jmp((()=>f=setTimeout(G,30)))},Y=(e,t)=>t,Z=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=te(e,n),i=ee(t,o),r=ne(n);pe.ael(s,l,i,r),(t.H=t.H||[]).push((()=>pe.rel(s,l,i,r)))}))},ee=(e,t)=>n=>{try{256&e.$?e.O[t](n):(e.M=e.M||[]).push([t,n])}catch(e){ce(e)}},te=(e,t)=>4&t?$e:8&t?de:e,ne=e=>0!=(2&e),le=new WeakMap,oe=e=>le.get(e),se=(e,t)=>le.set(t.O=e,t),ie=(e,t)=>{const n={$:0,m:e,C:t,U:new Map};return n.D=new Promise((e=>n.W=e)),n.q=new Promise((e=>n.T=e)),e["s-p"]=[],e["s-rc"]=[],Z(e,n,t.A),le.set(e,n)},re=(e,t)=>t in e,ce=(e,t)=>(0,console.error)(e,t),fe=new Map,ae=e=>{const t=e.g.replace(/-/g,"_"),n=e.V,l=fe.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(fe.set(n,e),e[t])),ce)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ue=new Map,de="undefined"!=typeof window?window:{},$e=de.document||{head:{}},pe={$:0,F:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},he=e=>Promise.resolve(e),me=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),ye=[],be=[],we=(e,t)=>n=>{e.push(n),r||(r=!0,t&&4&pe.$?ke(ve):pe.raf(ve))},ge=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ce(e)}e.length=0},ve=()=>{ge(ye),ge(be),(r=ye.length>0)&&pe.raf(ve)},ke=e=>he().then(e),je=we(be,!0);export{Y as F,d as H,m as a,X as b,y as c,B as f,_ as g,a as h,he as p,se as r}
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?i(e.value):r(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];r=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-cd61fea7.system.js","./p-3305a941.system.js","./p-54498887.system.js","./p-24f0c391.system.js","./p-b1288daf.system.js","./p-05eb4fed.system.js","./p-802bd493.system.js","./p-bbee73c8.system.js","./p-821c78c4.system.js","./p-327858f0.system.js","./p-7fd7152d.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,i,n,r,o,s,a,l,d,c;return{setters:[function(e){t=e.r;i=e.c;n=e.h;r=e.H;o=e.a},function(e){s=e.i},function(){},function(e){a=e.V},function(e){l=e.u},function(e){d=e.g},function(e){c=e.g},function(){},function(){},function(){},function(){},function(){}],execute:function(){var u='verdocs-field-textarea{width:150px;height:15px;display:block;font-size:11px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textarea.disabled{opacity:0.5}verdocs-field-textarea textarea{cursor:inherit;width:100%;height:100%;resize:none;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87)}verdocs-field-textarea textarea.hide{display:none}verdocs-field-textarea.required{border:1px solid #cc0000}verdocs-field-textarea.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textarea verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textarea verdocs-button-panel[data-active],verdocs-field-textarea verdocs-button-panel:hover{opacity:1}verdocs-field-textarea verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textarea verdocs-button-panel .icon:hover svg{fill:#000000}';var f='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';var h=e("verdocs_field_textarea",function(){function e(e){t(this,e);this.settingsChanged=i(this,"settingsChanged",7);this.deleted=i(this,"deleted",7);this.endpoint=a.getDefault();this.templateid="";this.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.xscale=1;this.yscale=1;this.rerender=0}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.inputEl.focus();return[2]}))}))};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}return[2]}))}))};e.prototype.componentDidRender=function(){s.dynamicDrop(true);if(this.editable){s(this.el).resizable({edges:{top:true,bottom:true,left:true,right:true},listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}};e.prototype.handleResizeStart=function(e){e.preventDefault();e.stopPropagation()};e.prototype.handleResize=function(e){var t=e.target.dataset,i=t.x,n=i===void 0?0:i,r=t.y,o=r===void 0?0:r,s=t.h,a=s===void 0?0:s;var l=e.rect,d=l.width,c=l.height;n=(parseFloat(n)||0)+e.deltaRect.left;o=(parseFloat(o)||0)+e.deltaRect.top;a=(parseFloat(a)||0)+e.deltaRect.height;Object.assign(e.target.style,{width:"".concat(d,"px"),height:"".concat(c,"px"),transform:"translate(".concat(n,"px, ").concat(o+a,"px)")});Object.assign(e.target.dataset,{x:n,y:o,h:a})};e.prototype.handleResizeEnd=function(e){var t=this;var i=__assign({},c(this.field));var n=e.target.style.transform.split("(")[1].split(")")[0].split(",").map(parseFloat),r=n[0],o=n[1];i.width=Math.round(parseFloat(e.target.style.width)/this.xscale);i.height=Math.round(parseFloat(e.target.style.height)/this.yscale);i.x=Math.round(i.x+r/this.xscale);i.y=Math.round(i.y-o/this.yscale);l(this.endpoint,this.templateid,this.field.name,{setting:i}).then((function(n){var r;(r=t.settingsChanged)===null||r===void 0?void 0:r.emit({fieldName:t.field.name,settings:i,field:n});Object.assign(e.target.dataset,{x:0,y:0,h:0})})).catch((function(e){return console.log("Field update failed",e)}))};e.prototype.render=function(){var e=this;var t,i,o,s;var a=c(this.field);var l=(i=(t=this.disabled)!==null&&t!==void 0?t:a.disabled)!==null&&i!==void 0?i:false;var u=this.field["rgba"]||d(this.roleindex);if(this.done){return n(r,{class:{done:this.done}},a.value)}return n(r,{class:{required:(o=this.field)===null||o===void 0?void 0:o.required,disabled:l,done:this.done},style:{backgroundColor:u}},n("textarea",{placeholder:a.placeholder||"",tabIndex:a.order,value:a.value,disabled:l,name:this.field.name,required:(s=this.field)===null||s===void 0?void 0:s.required,ref:function(t){return e.inputEl=t}}),this.editable&&n("verdocs-button-panel",{icon:f,id:"verdocs-settings-panel-".concat(this.field.name)},n("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:function(){return e.hideSettingsPanel()},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:e.field.name});return e.hideSettingsPanel()},onSettingsChanged:function(t){var i;(i=e.settingsChanged)===null||i===void 0?void 0:i.emit(t.detail);return e.hideSettingsPanel()}})))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());h.style=u}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?i(e.value):r(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];r=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-3305a941.system.js","./p-54498887.system.js","./p-24f0c391.system.js","./p-b1288daf.system.js","./p-05eb4fed.system.js","./p-3d20f09f.system.js","./p-bbee73c8.system.js","./p-271dafb1.system.js","./p-327858f0.system.js","./p-7fd7152d.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,i,n,r,o,s,a,l,d,c;return{setters:[function(e){t=e.r;i=e.c;n=e.h;r=e.H;o=e.a},function(e){s=e.i},function(){},function(e){a=e.V},function(e){l=e.u},function(e){d=e.g},function(e){c=e.g},function(){},function(){},function(){},function(){},function(){}],execute:function(){var u='verdocs-field-textarea{width:150px;height:15px;display:block;font-size:11px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textarea.disabled{opacity:0.5}verdocs-field-textarea textarea{cursor:inherit;width:100%;height:100%;resize:none;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87)}verdocs-field-textarea textarea.hide{display:none}verdocs-field-textarea.required{border:1px solid #cc0000}verdocs-field-textarea.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textarea verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textarea verdocs-button-panel[data-active],verdocs-field-textarea verdocs-button-panel:hover{opacity:1}verdocs-field-textarea verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textarea verdocs-button-panel .icon:hover svg{fill:#000000}';var f='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';var h=e("verdocs_field_textarea",function(){function e(e){t(this,e);this.settingsChanged=i(this,"settingsChanged",7);this.deleted=i(this,"deleted",7);this.endpoint=a.getDefault();this.templateid="";this.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.xscale=1;this.yscale=1;this.rerender=0}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.inputEl.focus();return[2]}))}))};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}return[2]}))}))};e.prototype.componentDidRender=function(){s.dynamicDrop(true);if(this.editable){s(this.el).resizable({edges:{top:true,bottom:true,left:true,right:true},listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}};e.prototype.handleResizeStart=function(e){e.preventDefault();e.stopPropagation()};e.prototype.handleResize=function(e){var t=e.target.dataset,i=t.x,n=i===void 0?0:i,r=t.y,o=r===void 0?0:r,s=t.h,a=s===void 0?0:s;var l=e.rect,d=l.width,c=l.height;n=(parseFloat(n)||0)+e.deltaRect.left;o=(parseFloat(o)||0)+e.deltaRect.top;a=(parseFloat(a)||0)+e.deltaRect.height;Object.assign(e.target.style,{width:"".concat(d,"px"),height:"".concat(c,"px"),transform:"translate(".concat(n,"px, ").concat(o+a,"px)")});Object.assign(e.target.dataset,{x:n,y:o,h:a})};e.prototype.handleResizeEnd=function(e){var t=this;var i=__assign({},c(this.field));var n=e.target.style.transform.split("(")[1].split(")")[0].split(",").map(parseFloat),r=n[0],o=n[1];i.width=Math.round(parseFloat(e.target.style.width)/this.xscale);i.height=Math.round(parseFloat(e.target.style.height)/this.yscale);i.x=Math.round(i.x+r/this.xscale);i.y=Math.round(i.y-o/this.yscale);l(this.endpoint,this.templateid,this.field.name,{setting:i}).then((function(n){var r;(r=t.settingsChanged)===null||r===void 0?void 0:r.emit({fieldName:t.field.name,settings:i,field:n});Object.assign(e.target.dataset,{x:0,y:0,h:0})})).catch((function(e){return console.log("Field update failed",e)}))};e.prototype.render=function(){var e=this;var t,i,o,s;var a=c(this.field);var l=(i=(t=this.disabled)!==null&&t!==void 0?t:a.disabled)!==null&&i!==void 0?i:false;var u=this.field["rgba"]||d(this.roleindex);if(this.done){return n(r,{class:{done:this.done}},a.value)}return n(r,{class:{required:(o=this.field)===null||o===void 0?void 0:o.required,disabled:l,done:this.done},style:{backgroundColor:u}},n("textarea",{placeholder:a.placeholder||"",tabIndex:a.order,value:a.value,disabled:l,name:this.field.name,required:(s=this.field)===null||s===void 0?void 0:s.required,ref:function(t){return e.inputEl=t}}),this.editable&&n("verdocs-button-panel",{icon:f,id:"verdocs-settings-panel-".concat(this.field.name)},n("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:function(){return e.hideSettingsPanel()},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:e.field.name});return e.hideSettingsPanel()},onSettingsChanged:function(t){var i;(i=e.settingsChanged)===null||i===void 0?void 0:i.emit(t.detail);return e.hideSettingsPanel()}})))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());h.style=u}}}));
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as s}from"./p-876d3ff3.js";import"./p-05788c2b.js";import{V as o,c as l,u as a}from"./p-2174e539.js";import{r as n,b as r}from"./p-044d38be.js";import{g as d,a as c}from"./p-047b4bd1.js";import{S as h}from"./p-7a1b2643.js";import{j as p}from"./p-0de7f044.js";import{a as v,i as m}from"./p-e8ce0b6f.js";import{g as u}from"./p-6de76553.js";import{c as x,d as f}from"./p-567a6e7c.js";import{D as b,P as g,J as y,a as w,F as k,b as S,T as E}from"./p-637fee9b.js";import{V as z}from"./p-ed416acf.js";import"./p-eab67c09.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-c220af42.js";import"./p-85d0e79d.js";const C=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=o.getDefault(),this.templateId=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[PREVIEW] Unable to start builder session, must be authenticated");this.store=await d(this.endpoint,this.templateId,!0),console.log(`[PREVIEW] Loading template ${this.templateId}`,this.endpoint.session)}catch(s){console.log("[PREVIEW] Error with preview session",s),null===(e=this.sdkError)||void 0===e||e.emit(new h(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handlePageRendered(e){var t,i;const s=e.detail;(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.fields.filter((e=>e.page_sequence===s.pageNumber))).forEach((e=>n(e,s,r(c(this.store),e.role_name),{disabled:!0,editable:!1,draggable:!1})))}render(){var e,t,o,l;if(!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded))return i(s,null,i("verdocs-loader",null));const a=[...null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.pages];return a.sort(((e,t)=>e.sequence-t.sequence)),i(s,null,a.map((e=>i("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}};C.style='verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';const T='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>',I=class{constructor(i){e(this,i),this.send=t(this,"send",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.searchContacts=t(this,"searchContacts",7),this.levels=[],this.store=null,this.endpoint=o.getDefault(),this.templateId=null,this.environment="web",this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`,this.rolesAtLevel={},this.showPickerForId="",this.sessionContacts=[],this.sending=!1,this.rolesCompleted={}}async reset(){this.rolesCompleted={}}async componentWillLoad(){var e,t,i,s,o,l,a,n,r,c;try{const n=this.endpoint.loadSession();if(!this.templateId)return void console.log(`[SEND] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[SEND] Unable to start builder session, must be authenticated");if(this.store=await d(this.endpoint,this.templateId,!0),(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_sendable)||console.warn("[SEND] Template is not sendable",this.templateId),null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.roles){const e={};this.rolesCompleted={},null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l||l.roles.forEach((t=>{const i=t.sequence-1;e[i]||(e[i]=[]);const s=`r-${i}-${e[i].length}`;e[i].push({...t,id:s})})),this.rolesAtLevel=e,this.levels=Object.keys(e).map((e=>+e)),this.levels.sort(((e,t)=>e-t))}(null===(a=null==n?void 0:n.session)||void 0===a?void 0:a.profile)&&this.sessionContacts.push({id:n.session.profile.id,name:`${n.session.profile.first_name} ${n.session.profile.last_name}`,email:n.session.profile.email,phone:n.session.profile.phone})}catch(e){console.log("[SEND] Error with preview session",e),null===(n=this.sdkError)||void 0===n||n.emit(new h(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(c=e.response)||void 0===c?void 0:c.data))}}getLevelIcon(e){return i("div",e<0?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}:e>=this.levels.length?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}:{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'})}handleSelectContact(e,t){e.preventDefault(),this.rolesCompleted[t.id]={...t,...e.detail},this.showPickerForId=""}handleClickRole(e,t){e.stopPropagation(),this.showPickerForId=t.id}handleSend(e){var t,i;console.log("Sending",e),e.preventDefault(),e.stopPropagation(),this.sending=!0;const s={template_id:this.templateId,name:null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,environment:this.environment,roles:Object.values(this.rolesCompleted),prepared_fields:[]};console.log("[SEND] Creating envelope",s),p(this.endpoint,s).then((e=>{var t;console.log("[SEND] Send envelope",e),this.reset().catch((e=>console.log("Unknown Error",e))),this.sending=!1,null===(t=this.send)||void 0===t||t.emit(s)})).catch((e=>{console.log("Send error",e),this.sending=!1}))}handleCancel(e){var t;e.stopPropagation(),null===(t=this.exit)||void 0===t||t.emit()}render(){var e,t,o,l;const a=((null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles)||[]).map((e=>e.name))||[],n=Object.values(this.rolesCompleted).filter((e=>v(e.email)||m(e.phone))).length>=a.length;return i(s,{class:{sendable:null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Envelope")),this.levels.map((e=>i("div",{class:`level level-${e}`},this.getLevelIcon(e),this.rolesAtLevel[e].map((e=>{var t,s,o,l,n,d;return e.email?i("div",{class:"recipient",style:{borderColor:u(r(a,e.name))},onClick:t=>this.handleClickRole(t,e)},null!==(n=null===(l=this.rolesCompleted[e.id])||void 0===l?void 0:l.full_name)&&void 0!==n?n:e.full_name,i("div",{class:"icon",innerHTML:T}),this.showPickerForId===e.id&&i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(d=this.rolesCompleted[e.id])&&void 0!==d?d:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}})):i("div",{class:"recipient",style:{backgroundColor:u(r(a,e.name))},onClick:t=>this.handleClickRole(t,e)},null!==(s=null===(t=this.rolesCompleted[e.id])||void 0===t?void 0:t.full_name)&&void 0!==s?s:e.name,i("div",{class:"icon",innerHTML:T}),this.showPickerForId===e.id&&i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(o=this.rolesCompleted[e.id])&&void 0!==o?o:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}}))}))))),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e)}),i("verdocs-button",{label:"Send",size:"small",disabled:!n,onClick:e=>this.handleSend(e)})))}};I.style='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';const L=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.templateUpdated=t(this,"templateUpdated",7),this.sdkError=t(this,"sdkError",7),this.endpoint=o.getDefault(),this.templateId="",this.uploading=!1,this.progressLabel="Uploading...",this.progressPercent=0,this.showDeleteError=!1,this.confirmDeleteDocument=null,this.store=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await d(this.endpoint,this.templateId,!1)}catch(s){console.log("[TEMPLATE ATTACHMENTS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new h(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handleCancel(e){e.stopPropagation(),this.exit.emit()}handleUploadProgress(e){e>=99?(this.progressPercent=100,this.progressLabel="Processing..."):this.progressPercent=e}async handleUpload(e){var t,i,s,o;e.stopPropagation();const l=e.detail.file;if(l){console.log("[ATTACHMENTS] Uploading...",l),this.uploading=!0,this.progressLabel="Uploading...";try{const e=await x(this.endpoint,this.templateId,l,this.handleUploadProgress.bind(this));console.log("[ATTACHMENTS] Created attachment",e),this.store=await d(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] Updated template",this.store.state),null===(t=this.templateUpdated)||void 0===t||t.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"}),this.uploading=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[ATTACHMENTS] Error creating template",e),null===(i=this.sdkError)||void 0===i||i.emit(new h(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data)),this.uploading=!1}}}handleNext(e){var t;e.stopPropagation(),this.uploading=!1,this.progressLabel="",this.progressPercent=0,null===(t=this.next)||void 0===t||t.emit({template:this.store.state})}async confirmDelete(){await f(this.endpoint,this.templateId,this.confirmDeleteDocument.id),this.store=await d(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] New template",this.store.state),this.confirmDeleteDocument=null}async handleDelete(e){var t;(null===(t=this.store.state)||void 0===t?void 0:t.template_documents.length)>1?this.confirmDeleteDocument=e:this.showDeleteError=!0}getFileIcon(e){switch(e.mime){case"application/pdf":return w;case"image/jpeg":return y;case"image/png":return g;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return b}return k}render(){var e,t,o;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));const l=null===(e=this.store)||void 0===e?void 0:e.state;return l.isLoaded?this.endpoint.session&&l.profile_id?i(s,null,i("h5",null,"Existing Attachments"),i("div",{class:"attachments"},null===(t=this.store)||void 0===t?void 0:t.state.template_documents.map((e=>i("div",{class:"attachment"},i("div",{class:"file-icon",innerHTML:this.getFileIcon(e)}),i("div",{class:"filename",title:e.name},e.name),i("div",{class:"pages"},i("div",{class:"count"},e.page_numbers),i("div",{class:"pages-icon",innerHTML:S})),i("div",{class:"trash-icon",innerHTML:E,onClick:()=>this.handleDelete(e)}))))),i("h5",null,"Attach a New Document"),this.uploading?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("verdocs-file-chooser",{onFileSelected:e=>this.handleUpload(e)}),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.uploading}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleNext(e),disabled:!(null===(o=this.store)||void 0===o?void 0:o.state.template_documents.length)||this.uploading})),this.showDeleteError&&i("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:()=>this.showDeleteError=!1}),this.confirmDeleteDocument&&i("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:()=>this.confirmDelete(),showCancel:!0,onExit:()=>{this.confirmDeleteDocument=null}})):i(s,{class:"empty"}):i(s,{class:"loading"},i("verdocs-loader",null))}};L.style='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';const U=["attachments","roles","settings","fields","preview"],M=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.stepChanged=t(this,"stepChanged",7),this.endpoint=o.getDefault(),this.templateId=null,this.step="preview",this.store=null}onStepChanged(){console.log("Step changed",this.step,this.templateId),this.loadTemplate().catch((e=>console.log("Unknown Error",e)))}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.endpoint.session)return void console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");if(!this.templateId)return void(this.step="preview");this.loadTemplate().catch((e=>console.log("[BUILD_TABS] Unable to load template",e)))}catch(s){console.log("[BUILD_TABS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new h(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}async loadTemplate(){this.templateId&&(this.store=await d(this.endpoint,this.templateId,!1))}setStep(e){var t;console.log("Selected step",e.detail.tab.id),e.stopPropagation(),e.preventDefault(),this.step=e.detail.tab.id,null===(t=this.stepChanged)||void 0===t||t.emit(e.detail.tab.id)}render(){var e,t,o,l,a,n,r,d,c,h,p,v;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));let m=!1,u=!1,x=!1;this.templateId&&this.store&&(console.log("lengths",null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.template_documents.length,null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.roles.length,null===(n=null===(a=this.store)||void 0===a?void 0:a.state)||void 0===n?void 0:n.fields.length),x=(null===(d=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===d?void 0:d.template_documents.length)>0,u=x&&(null===(h=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===h?void 0:h.roles.length)>0,m=u&&(null===(v=null===(p=this.store)||void 0===p?void 0:p.state)||void 0===v?void 0:v.fields.length)>0);let f=Math.max(U.indexOf(this.step),0);return!m&&f>=4&&(f=3),!u&&f>=3&&(f=1),!x&&f>=1&&(f=0),console.log({selectedStepIndex:f,canPreview:m,canEditFields:u,canEditRoles:x}),console.log("[BUILD_TABS] Rendering",this.step,f),i(s,null,i("verdocs-tabs",{onSelectTab:e=>this.setStep(e),selectedTab:f,tabs:[{id:"attachments",disabled:!1,label:this.templateId&&this.store?"Attachment(s)":"Upload Attachment(s)"},{id:"roles",disabled:!x,label:"Roles"},{id:"settings",disabled:!u,label:"Settings"},{id:"fields",disabled:!u,label:"Fields"},{id:"preview",disabled:!m,label:"Preview/Send"}]}))}static get watchers(){return{step:["onStepChanged"]}}};M.style='verdocs-template-build-tabs{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}';const N=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.templateCreated=t(this,"templateCreated",7),this.endpoint=o.getDefault(),this.file=void 0,this.creating=!1,this.progressLabel="Uploading...",this.progressPercent=0}componentWillLoad(){this.endpoint.setTimeout(3e4),this.endpoint.loadSession()}handleFileChanged(e){var t;this.file=(null===(t=e.target.files)||void 0===t?void 0:t[0])||null,console.log("[CREATE] Selected file",this.file)}handleUpload(e){e.stopPropagation(),document.getElementById("verdocs-template-create-file").click()}handleCancel(e){e.stopPropagation(),this.exit.emit()}async handleSubmit(e){var t,i,s,o,a;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0,this.progressLabel="Uploading...";try{const e=await l(this.endpoint,{name:this.file.name,documents:[this.file]},(e=>{e>=99?(this.progressLabel="Processing...",this.progressPercent=100):this.progressPercent=e}));console.log("[CREATE] Created template",e),null===(t=this.templateCreated)||void 0===t||t.emit({endpoint:this.endpoint,template:e,templateId:e.id}),null===(i=this.next)||void 0===i||i.emit(e),this.creating=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[CREATE] Error creating template",e),null===(s=this.sdkError)||void 0===s||s.emit(new h(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(a=e.response)||void 0===a?void 0:a.data)),this.creating=!1}}}render(){return i(s,null,this.endpoint.session?i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("input",{type:"file",id:"verdocs-template-create-file",multiple:!0,accept:"application/pdf",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),this.creating?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("div",{class:"upload-box",onDrop:e=>{e.preventDefault(),e.target.classList.remove("drag-over"),this.file=e.dataTransfer.files[0]},onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"},onDragEnter:e=>e.target.classList.add("drag-over"),onDragLeave:e=>e.target.classList.remove("drag-over")},i("div",null,i("span",{innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>'})),i("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),i("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?" ":"Or, if you prefer..."),i("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:e=>this.handleUpload(e)})),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.creating}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file||this.creating}))):i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};N.style='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';const R=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.name="",this.dirty=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await d(this.endpoint,this.templateId,!1),this.name=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.name,this.dirty=!1}catch(e){console.log("[TEMPLATE NAME] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new h(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.name=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,this.dirty=!1,console.log("Closing"),null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await a(this.endpoint,this.templateId,{name:this.name}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.name=this.name),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"name"}),null===(s=this.close)||void 0===s||s.emit()}render(){var e,t;return this.endpoint.session?(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoading)?i(s,{class:"loading"},i("verdocs-loader",null)):i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("label",{htmlFor:"verdocs-template-name"},"Template Name"),i("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:e=>{var t,i;this.name=e.target.value,this.dirty=this.name!==(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name)}}),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};R.style="";const A=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.showPlanBlocker=!1,this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1",this.dirty=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await d(this.endpoint,this.templateId,!0),this.sendReminders=!!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.reminder_id),this.dirty=!1}catch(e){console.log("[TEMPLATE REMINDERS] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new h(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.sendReminders=!!(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id),this.dirty=!1,null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s,o,l,a,n,r,c,p,v,m;e.stopPropagation();try{if(this.sendReminders){const e={setup_time:+this.firstReminderDays,interval_time:+this.reminderDays};(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id)?(await function(e,t,i,s){return e.api.put("/templates/".concat(t,"/reminder/").concat(i),s).then((function(e){return e.data}))}(this.endpoint,this.templateId,null===(s=this.store)||void 0===s?void 0:s.state.reminder_id,e),this.store=await d(this.endpoint,this.templateId,!0)):(await function(e,t,i){return e.api.post("/templates/".concat(t,"/reminder/"),i).then((function(e){return e.data}))}(this.endpoint,this.templateId,e),this.store=await d(this.endpoint,this.templateId,!0))}else await(p=this.endpoint,v=this.templateId,m=null===(o=this.store)||void 0===o?void 0:o.state.reminder_id,p.api.delete("/templates/".concat(v,"/reminder/").concat(m)).then((function(e){return e.data}))),this.store=await d(this.endpoint,this.templateId,!0);null===(l=this.templateUpdated)||void 0===l||l.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"})}catch(e){console.log("[TEMPLATE REMINDERS] Unable to update reminders",e),z(e.message),null===(a=this.sdkError)||void 0===a||a.emit(new h(e.message,null===(n=e.response)||void 0===n?void 0:n.status,null===(r=e.response)||void 0===r?void 0:r.data))}this.dirty=!1,null===(c=this.close)||void 0===c||c.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Reminders"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),i("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>{this.sendReminders=e.target.checked,this.dirty=!0}})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),i("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:e=>{this.firstReminderDays=e.target.value,this.dirty=!0},disabled:!this.sendReminders})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),i("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:e=>{this.reminderDays=e.target.value,this.dirty=!0},disabled:!this.sendReminders})),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))),this.showPlanBlocker&&i("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:()=>this.showPlanBlocker=!1})):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};A.style='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';const D=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.dirty=!1,this.personal=!1,this.public=!1}async componentWillLoad(){var e,t,i,s,o,l,a;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[VISIBILITY] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[VISIBILITY] Unable to start builder session, must be authenticated");this.store=await d(this.endpoint,this.templateId,!1),this.personal=(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_personal)||!0,this.public=(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.is_public)||!1,this.dirty=!1}catch(e){console.log("[TEMPLATE VISIBILITY] Error loading template",e),null===(o=this.sdkError)||void 0===o||o.emit(new h(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(a=e.response)||void 0===a?void 0:a.data))}}handleCancel(e){var t,i,s,o,l;e.stopPropagation(),this.personal=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.is_personal,this.public=null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.is_public,this.dirty=!1,null===(l=this.close)||void 0===l||l.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await a(this.endpoint,this.templateId,{is_personal:this.personal,is_public:this.public}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.is_personal=this.personal,this.store.state.is_public=this.public),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"visibility"}),null===(s=this.close)||void 0===s||s.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Visibility"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-shared"},"Shared"),i("verdocs-checkbox",{id:"verdocs-is-shared",name:"is-shared",checked:!this.personal,value:"on",onInput:e=>{this.personal=!e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Shared templates are visible to other members of your Organization (if any)."),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-public"},"Public"),i("verdocs-checkbox",{id:"verdocs-is-public",name:"is-public",checked:this.public,value:"on",onInput:e=>{this.public=e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};D.style='verdocs-template-visibility{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}';export{C as verdocs_preview,I as verdocs_send,L as verdocs_template_attachments,M as verdocs_template_build_tabs,N as verdocs_template_create,R as verdocs_template_name,A as verdocs_template_reminders,D as verdocs_template_visibility}
1
+ import{r as e,c as t,h as i,H as s}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as o,c as l,u as a}from"./p-2174e539.js";import{r as n,b as r}from"./p-19b70691.js";import{g as d,a as c}from"./p-073fcf03.js";import{S as h}from"./p-7a1b2643.js";import{j as p}from"./p-84341e03.js";import{a as v,i as m}from"./p-e8ce0b6f.js";import{g as u}from"./p-6de76553.js";import{c as x,d as f}from"./p-567a6e7c.js";import{D as b,P as g,J as y,a as w,F as k,b as S,T as E}from"./p-637fee9b.js";import{V as z}from"./p-ed416acf.js";import"./p-eab67c09.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-c220af42.js";import"./p-7648c449.js";const C=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=o.getDefault(),this.templateId=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[PREVIEW] Unable to start builder session, must be authenticated");this.store=await d(this.endpoint,this.templateId,!0),console.log(`[PREVIEW] Loading template ${this.templateId}`,this.endpoint.session)}catch(s){console.log("[PREVIEW] Error with preview session",s),null===(e=this.sdkError)||void 0===e||e.emit(new h(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handlePageRendered(e){var t,i;const s=e.detail;(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.fields.filter((e=>e.page_sequence===s.pageNumber))).forEach((e=>n(e,s,r(c(this.store),e.role_name),{disabled:!0,editable:!1,draggable:!1})))}render(){var e,t,o,l;if(!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded))return i(s,null,i("verdocs-loader",null));const a=[...null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.pages];return a.sort(((e,t)=>e.sequence-t.sequence)),i(s,null,a.map((e=>i("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}};C.style='verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';const T='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>',I=class{constructor(i){e(this,i),this.send=t(this,"send",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.searchContacts=t(this,"searchContacts",7),this.levels=[],this.store=null,this.endpoint=o.getDefault(),this.templateId=null,this.environment="web",this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`,this.rolesAtLevel={},this.showPickerForId="",this.sessionContacts=[],this.sending=!1,this.rolesCompleted={}}async reset(){this.rolesCompleted={}}async componentWillLoad(){var e,t,i,s,o,l,a,n,r,c;try{const n=this.endpoint.loadSession();if(!this.templateId)return void console.log(`[SEND] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[SEND] Unable to start builder session, must be authenticated");if(this.store=await d(this.endpoint,this.templateId,!0),(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_sendable)||console.warn("[SEND] Template is not sendable",this.templateId),null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.roles){const e={};this.rolesCompleted={},null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l||l.roles.forEach((t=>{const i=t.sequence-1;e[i]||(e[i]=[]);const s=`r-${i}-${e[i].length}`;e[i].push({...t,id:s})})),this.rolesAtLevel=e,this.levels=Object.keys(e).map((e=>+e)),this.levels.sort(((e,t)=>e-t))}(null===(a=null==n?void 0:n.session)||void 0===a?void 0:a.profile)&&this.sessionContacts.push({id:n.session.profile.id,name:`${n.session.profile.first_name} ${n.session.profile.last_name}`,email:n.session.profile.email,phone:n.session.profile.phone})}catch(e){console.log("[SEND] Error with preview session",e),null===(n=this.sdkError)||void 0===n||n.emit(new h(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(c=e.response)||void 0===c?void 0:c.data))}}getLevelIcon(e){return i("div",e<0?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}:e>=this.levels.length?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}:{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'})}handleSelectContact(e,t){e.preventDefault(),this.rolesCompleted[t.id]={...t,...e.detail},this.showPickerForId=""}handleClickRole(e,t){e.stopPropagation(),this.showPickerForId=t.id}handleSend(e){var t,i;console.log("Sending",e),e.preventDefault(),e.stopPropagation(),this.sending=!0;const s={template_id:this.templateId,name:null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,environment:this.environment,roles:Object.values(this.rolesCompleted),prepared_fields:[]};console.log("[SEND] Creating envelope",s),p(this.endpoint,s).then((e=>{var t;console.log("[SEND] Send envelope",e),this.reset().catch((e=>console.log("Unknown Error",e))),this.sending=!1,null===(t=this.send)||void 0===t||t.emit(s)})).catch((e=>{console.log("Send error",e),this.sending=!1}))}handleCancel(e){var t;e.stopPropagation(),null===(t=this.exit)||void 0===t||t.emit()}render(){var e,t,o,l;const a=((null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles)||[]).map((e=>e.name))||[],n=Object.values(this.rolesCompleted).filter((e=>v(e.email)||m(e.phone))).length>=a.length;return i(s,{class:{sendable:null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Envelope")),this.levels.map((e=>i("div",{class:`level level-${e}`},this.getLevelIcon(e),this.rolesAtLevel[e].map((e=>{var t,s,o,l,n,d;return e.email?i("div",{class:"recipient",style:{borderColor:u(r(a,e.name))},onClick:t=>this.handleClickRole(t,e)},null!==(n=null===(l=this.rolesCompleted[e.id])||void 0===l?void 0:l.full_name)&&void 0!==n?n:e.full_name,i("div",{class:"icon",innerHTML:T}),this.showPickerForId===e.id&&i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(d=this.rolesCompleted[e.id])&&void 0!==d?d:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}})):i("div",{class:"recipient",style:{backgroundColor:u(r(a,e.name))},onClick:t=>this.handleClickRole(t,e)},null!==(s=null===(t=this.rolesCompleted[e.id])||void 0===t?void 0:t.full_name)&&void 0!==s?s:e.name,i("div",{class:"icon",innerHTML:T}),this.showPickerForId===e.id&&i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(o=this.rolesCompleted[e.id])&&void 0!==o?o:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}}))}))))),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e)}),i("verdocs-button",{label:"Send",size:"small",disabled:!n,onClick:e=>this.handleSend(e)})))}};I.style='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';const L=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.templateUpdated=t(this,"templateUpdated",7),this.sdkError=t(this,"sdkError",7),this.endpoint=o.getDefault(),this.templateId="",this.uploading=!1,this.progressLabel="Uploading...",this.progressPercent=0,this.showDeleteError=!1,this.confirmDeleteDocument=null,this.store=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await d(this.endpoint,this.templateId,!1)}catch(s){console.log("[TEMPLATE ATTACHMENTS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new h(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handleCancel(e){e.stopPropagation(),this.exit.emit()}handleUploadProgress(e){e>=99?(this.progressPercent=100,this.progressLabel="Processing..."):this.progressPercent=e}async handleUpload(e){var t,i,s,o;e.stopPropagation();const l=e.detail.file;if(l){console.log("[ATTACHMENTS] Uploading...",l),this.uploading=!0,this.progressLabel="Uploading...";try{const e=await x(this.endpoint,this.templateId,l,this.handleUploadProgress.bind(this));console.log("[ATTACHMENTS] Created attachment",e),this.store=await d(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] Updated template",this.store.state),null===(t=this.templateUpdated)||void 0===t||t.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"}),this.uploading=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[ATTACHMENTS] Error creating template",e),null===(i=this.sdkError)||void 0===i||i.emit(new h(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data)),this.uploading=!1}}}handleNext(e){var t;e.stopPropagation(),this.uploading=!1,this.progressLabel="",this.progressPercent=0,null===(t=this.next)||void 0===t||t.emit({template:this.store.state})}async confirmDelete(){await f(this.endpoint,this.templateId,this.confirmDeleteDocument.id),this.store=await d(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] New template",this.store.state),this.confirmDeleteDocument=null}async handleDelete(e){var t;(null===(t=this.store.state)||void 0===t?void 0:t.template_documents.length)>1?this.confirmDeleteDocument=e:this.showDeleteError=!0}getFileIcon(e){switch(e.mime){case"application/pdf":return w;case"image/jpeg":return y;case"image/png":return g;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return b}return k}render(){var e,t,o;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));const l=null===(e=this.store)||void 0===e?void 0:e.state;return l.isLoaded?this.endpoint.session&&l.profile_id?i(s,null,i("h5",null,"Existing Attachments"),i("div",{class:"attachments"},null===(t=this.store)||void 0===t?void 0:t.state.template_documents.map((e=>i("div",{class:"attachment"},i("div",{class:"file-icon",innerHTML:this.getFileIcon(e)}),i("div",{class:"filename",title:e.name},e.name),i("div",{class:"pages"},i("div",{class:"count"},e.page_numbers),i("div",{class:"pages-icon",innerHTML:S})),i("div",{class:"trash-icon",innerHTML:E,onClick:()=>this.handleDelete(e)}))))),i("h5",null,"Attach a New Document"),this.uploading?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("verdocs-file-chooser",{onFileSelected:e=>this.handleUpload(e)}),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.uploading}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleNext(e),disabled:!(null===(o=this.store)||void 0===o?void 0:o.state.template_documents.length)||this.uploading})),this.showDeleteError&&i("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:()=>this.showDeleteError=!1}),this.confirmDeleteDocument&&i("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:()=>this.confirmDelete(),showCancel:!0,onExit:()=>{this.confirmDeleteDocument=null}})):i(s,{class:"empty"}):i(s,{class:"loading"},i("verdocs-loader",null))}};L.style='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';const U=["attachments","roles","settings","fields","preview"],M=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.stepChanged=t(this,"stepChanged",7),this.endpoint=o.getDefault(),this.templateId=null,this.step="preview",this.store=null}onStepChanged(){console.log("Step changed",this.step,this.templateId),this.loadTemplate().catch((e=>console.log("Unknown Error",e)))}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.endpoint.session)return void console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");if(!this.templateId)return void(this.step="preview");this.loadTemplate().catch((e=>console.log("[BUILD_TABS] Unable to load template",e)))}catch(s){console.log("[BUILD_TABS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new h(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}async loadTemplate(){this.templateId&&(this.store=await d(this.endpoint,this.templateId,!1))}setStep(e){var t;console.log("Selected step",e.detail.tab.id),e.stopPropagation(),e.preventDefault(),this.step=e.detail.tab.id,null===(t=this.stepChanged)||void 0===t||t.emit(e.detail.tab.id)}render(){var e,t,o,l,a,n,r,d,c,h,p,v;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));let m=!1,u=!1,x=!1;this.templateId&&this.store&&(console.log("lengths",null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.template_documents.length,null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.roles.length,null===(n=null===(a=this.store)||void 0===a?void 0:a.state)||void 0===n?void 0:n.fields.length),x=(null===(d=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===d?void 0:d.template_documents.length)>0,u=x&&(null===(h=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===h?void 0:h.roles.length)>0,m=u&&(null===(v=null===(p=this.store)||void 0===p?void 0:p.state)||void 0===v?void 0:v.fields.length)>0);let f=Math.max(U.indexOf(this.step),0);return!m&&f>=4&&(f=3),!u&&f>=3&&(f=1),!x&&f>=1&&(f=0),console.log({selectedStepIndex:f,canPreview:m,canEditFields:u,canEditRoles:x}),console.log("[BUILD_TABS] Rendering",this.step,f),i(s,null,i("verdocs-tabs",{onSelectTab:e=>this.setStep(e),selectedTab:f,tabs:[{id:"attachments",disabled:!1,label:this.templateId&&this.store?"Attachment(s)":"Upload Attachment(s)"},{id:"roles",disabled:!x,label:"Roles"},{id:"settings",disabled:!u,label:"Settings"},{id:"fields",disabled:!u,label:"Fields"},{id:"preview",disabled:!m,label:"Preview/Send"}]}))}static get watchers(){return{step:["onStepChanged"]}}};M.style='verdocs-template-build-tabs{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}';const N=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.templateCreated=t(this,"templateCreated",7),this.endpoint=o.getDefault(),this.file=void 0,this.creating=!1,this.progressLabel="Uploading...",this.progressPercent=0}componentWillLoad(){this.endpoint.setTimeout(3e4),this.endpoint.loadSession()}handleFileChanged(e){var t;this.file=(null===(t=e.target.files)||void 0===t?void 0:t[0])||null,console.log("[CREATE] Selected file",this.file)}handleUpload(e){e.stopPropagation(),document.getElementById("verdocs-template-create-file").click()}handleCancel(e){e.stopPropagation(),this.exit.emit()}async handleSubmit(e){var t,i,s,o,a;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0,this.progressLabel="Uploading...";try{const e=await l(this.endpoint,{name:this.file.name,documents:[this.file]},(e=>{e>=99?(this.progressLabel="Processing...",this.progressPercent=100):this.progressPercent=e}));console.log("[CREATE] Created template",e),null===(t=this.templateCreated)||void 0===t||t.emit({endpoint:this.endpoint,template:e,templateId:e.id}),null===(i=this.next)||void 0===i||i.emit(e),this.creating=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[CREATE] Error creating template",e),null===(s=this.sdkError)||void 0===s||s.emit(new h(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(a=e.response)||void 0===a?void 0:a.data)),this.creating=!1}}}render(){return i(s,null,this.endpoint.session?i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("input",{type:"file",id:"verdocs-template-create-file",multiple:!0,accept:"application/pdf",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),this.creating?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("div",{class:"upload-box",onDrop:e=>{e.preventDefault(),e.target.classList.remove("drag-over"),this.file=e.dataTransfer.files[0]},onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"},onDragEnter:e=>e.target.classList.add("drag-over"),onDragLeave:e=>e.target.classList.remove("drag-over")},i("div",null,i("span",{innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>'})),i("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),i("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?" ":"Or, if you prefer..."),i("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:e=>this.handleUpload(e)})),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.creating}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file||this.creating}))):i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};N.style='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';const R=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.name="",this.dirty=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await d(this.endpoint,this.templateId,!1),this.name=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.name,this.dirty=!1}catch(e){console.log("[TEMPLATE NAME] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new h(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.name=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,this.dirty=!1,console.log("Closing"),null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await a(this.endpoint,this.templateId,{name:this.name}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.name=this.name),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"name"}),null===(s=this.close)||void 0===s||s.emit()}render(){var e,t;return this.endpoint.session?(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoading)?i(s,{class:"loading"},i("verdocs-loader",null)):i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("label",{htmlFor:"verdocs-template-name"},"Template Name"),i("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:e=>{var t,i;this.name=e.target.value,this.dirty=this.name!==(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name)}}),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};R.style="";const A=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.showPlanBlocker=!1,this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1",this.dirty=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await d(this.endpoint,this.templateId,!0),this.sendReminders=!!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.reminder_id),this.dirty=!1}catch(e){console.log("[TEMPLATE REMINDERS] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new h(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.sendReminders=!!(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id),this.dirty=!1,null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s,o,l,a,n,r,c,p,v,m;e.stopPropagation();try{if(this.sendReminders){const e={setup_time:+this.firstReminderDays,interval_time:+this.reminderDays};(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id)?(await function(e,t,i,s){return e.api.put("/templates/".concat(t,"/reminder/").concat(i),s).then((function(e){return e.data}))}(this.endpoint,this.templateId,null===(s=this.store)||void 0===s?void 0:s.state.reminder_id,e),this.store=await d(this.endpoint,this.templateId,!0)):(await function(e,t,i){return e.api.post("/templates/".concat(t,"/reminder/"),i).then((function(e){return e.data}))}(this.endpoint,this.templateId,e),this.store=await d(this.endpoint,this.templateId,!0))}else await(p=this.endpoint,v=this.templateId,m=null===(o=this.store)||void 0===o?void 0:o.state.reminder_id,p.api.delete("/templates/".concat(v,"/reminder/").concat(m)).then((function(e){return e.data}))),this.store=await d(this.endpoint,this.templateId,!0);null===(l=this.templateUpdated)||void 0===l||l.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"})}catch(e){console.log("[TEMPLATE REMINDERS] Unable to update reminders",e),z(e.message),null===(a=this.sdkError)||void 0===a||a.emit(new h(e.message,null===(n=e.response)||void 0===n?void 0:n.status,null===(r=e.response)||void 0===r?void 0:r.data))}this.dirty=!1,null===(c=this.close)||void 0===c||c.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Reminders"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),i("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>{this.sendReminders=e.target.checked,this.dirty=!0}})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),i("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:e=>{this.firstReminderDays=e.target.value,this.dirty=!0},disabled:!this.sendReminders})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),i("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:e=>{this.reminderDays=e.target.value,this.dirty=!0},disabled:!this.sendReminders})),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))),this.showPlanBlocker&&i("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:()=>this.showPlanBlocker=!1})):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};A.style='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';const D=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.dirty=!1,this.personal=!1,this.public=!1}async componentWillLoad(){var e,t,i,s,o,l,a;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[VISIBILITY] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[VISIBILITY] Unable to start builder session, must be authenticated");this.store=await d(this.endpoint,this.templateId,!1),this.personal=(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_personal)||!0,this.public=(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.is_public)||!1,this.dirty=!1}catch(e){console.log("[TEMPLATE VISIBILITY] Error loading template",e),null===(o=this.sdkError)||void 0===o||o.emit(new h(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(a=e.response)||void 0===a?void 0:a.data))}}handleCancel(e){var t,i,s,o,l;e.stopPropagation(),this.personal=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.is_personal,this.public=null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.is_public,this.dirty=!1,null===(l=this.close)||void 0===l||l.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await a(this.endpoint,this.templateId,{is_personal:this.personal,is_public:this.public}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.is_personal=this.personal,this.store.state.is_public=this.public),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"visibility"}),null===(s=this.close)||void 0===s||s.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Visibility"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-shared"},"Shared"),i("verdocs-checkbox",{id:"verdocs-is-shared",name:"is-shared",checked:!this.personal,value:"on",onInput:e=>{this.personal=!e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Shared templates are visible to other members of your Organization (if any)."),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-public"},"Public"),i("verdocs-checkbox",{id:"verdocs-is-public",name:"is-public",checked:this.public,value:"on",onInput:e=>{this.public=e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};D.style='verdocs-template-visibility{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}';export{C as verdocs_preview,I as verdocs_send,L as verdocs_template_attachments,M as verdocs_template_build_tabs,N as verdocs_template_create,R as verdocs_template_name,A as verdocs_template_reminders,D as verdocs_template_visibility}
@@ -1 +1 @@
1
- System.register(["./p-cd61fea7.system.js","./p-54498887.system.js","./p-24f0c391.system.js","./p-802bd493.system.js","./p-bbee73c8.system.js","./p-821c78c4.system.js","./p-327858f0.system.js","./p-7fd7152d.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,o,n,i,s,a;return{setters:[function(e){t=e.r;o=e.c;n=e.h;i=e.H},function(){},function(e){s=e.V},function(e){a=e.d},function(){},function(){},function(){},function(){},function(){}],execute:function(){var c='verdocs-contact-picker{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;background-color:#ffffff}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';var l='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';var r='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>';var d='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>';var u=e("verdocs_contact_picker",function(){function e(e){t(this,e);this.searchContacts=o(this,"searchContacts",7);this.exit=o(this,"exit",7);this.next=o(this,"next",7);this.endpoint=s.getDefault();this.templateRole=null;this.contactSuggestions=[];this.name=undefined;this.email=undefined;this.phone=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.nameFieldId="verdocs-contact-picker-name-".concat(Math.random().toString(36).substring(2,11));this.emailFieldId="verdocs-contact-picker-email-".concat(Math.random().toString(36).substring(2,11));this.phoneFieldId="verdocs-contact-picker-phone-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentWillLoad=function(){if(this.templateRole){this.name=this.templateRole.full_name||"";this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!==""}};e.prototype.handleNameChange=function(e){var t;this.name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.name})};e.prototype.handleEmailChange=function(e){this.email=e.target.value};e.prototype.handlePhoneChange=function(e){this.phone=a(e.target.value)};e.prototype.handleMessageChange=function(e){this.message=e.target.value};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})};e.prototype.handleSelectSuggestion=function(e,t){e.stopPropagation();this.name=t.name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;return n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("div",{class:"row"},n("label",{htmlFor:this.nameFieldId},"Name:"),n("input",{id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:function(){var t;return e.showSuggestions=((t=e.contactSuggestions)===null||t===void 0?void 0:t.length)>0},onInput:function(t){return e.handleNameChange(t)}}),this.showSuggestions&&n("div",{class:"dropdown"},this.contactSuggestions.map((function(t){var o;return n("div",{key:(o=t.id)!==null&&o!==void 0?o:t.name,class:"suggestion",onClick:function(o){return e.handleSelectSuggestion(o,t)}},t.avatar?n("img",{alt:"Avatar",class:"avatar",src:t.avatar}):n("div",{class:"avatar",innerHTML:d}),n("div",{class:"details"},n("div",{class:"name"},t.name),t.email&&n("div",{class:"destination"},t.email),t.phone&&n("div",{class:"destination"},t.phone)))})))),n("div",{class:"row"},n("label",{htmlFor:this.emailFieldId},"Email:"),n("input",{id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email Address...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleEmailChange(t)}})),n("div",{class:"row"},n("label",{htmlFor:this.phoneFieldId},"Phone:"),n("input",{id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handlePhoneChange(t)}})),this.showMessage&&n("div",{class:"row"},n("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),n("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleMessageChange(t)}})),n("div",{class:"buttons"},n("verdocs-toggle-button",{icon:l,size:"small",active:this.showMessage,onToggle:function(t){e.showMessage=t.detail.active;e.showSuggestions=false}}),n("verdocs-toggle-button",{icon:r,size:"small",active:this.delegator,onToggle:function(t){e.delegator=t.detail.active;e.showSuggestions=false}}),n("div",{class:"flex-fill"}),n("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),n("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}());u.style=c;var p='verdocs-toggle-button{font-family:"Inter", "Barlow", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}';var h=e("verdocs_toggle_button",function(){function e(e){t(this,e);this.toggle=o(this,"toggle",7);this.active=false;this.icon=null;this.label=null;this.size="normal";this._active=false}e.prototype.componentWillLoad=function(){this._active=this.active};e.prototype.handleToggle=function(e){var t;e.stopPropagation();var o=!this._active;this._active=o;(t=this.toggle)===null||t===void 0?void 0:t.emit({active:o})};e.prototype.render=function(){var e=this;return n(i,{class:"size-".concat(this.size)},this.icon?n("button",{innerHTML:this.icon,class:{active:this._active},onClick:function(t){return e.handleToggle(t)}}):n("button",{class:{active:this._active},onClick:function(t){return e.handleToggle(t)}},this.label))};return e}());h.style=p}}}));
1
+ System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-24f0c391.system.js","./p-3d20f09f.system.js","./p-bbee73c8.system.js","./p-271dafb1.system.js","./p-327858f0.system.js","./p-7fd7152d.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,o,n,i,s,a;return{setters:[function(e){t=e.r;o=e.c;n=e.h;i=e.H},function(){},function(e){s=e.V},function(e){a=e.d},function(){},function(){},function(){},function(){},function(){}],execute:function(){var c='verdocs-contact-picker{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;background-color:#ffffff}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';var l='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';var r='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>';var d='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>';var u=e("verdocs_contact_picker",function(){function e(e){t(this,e);this.searchContacts=o(this,"searchContacts",7);this.exit=o(this,"exit",7);this.next=o(this,"next",7);this.endpoint=s.getDefault();this.templateRole=null;this.contactSuggestions=[];this.name=undefined;this.email=undefined;this.phone=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.nameFieldId="verdocs-contact-picker-name-".concat(Math.random().toString(36).substring(2,11));this.emailFieldId="verdocs-contact-picker-email-".concat(Math.random().toString(36).substring(2,11));this.phoneFieldId="verdocs-contact-picker-phone-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentWillLoad=function(){if(this.templateRole){this.name=this.templateRole.full_name||"";this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!==""}};e.prototype.handleNameChange=function(e){var t;this.name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.name})};e.prototype.handleEmailChange=function(e){this.email=e.target.value};e.prototype.handlePhoneChange=function(e){this.phone=a(e.target.value)};e.prototype.handleMessageChange=function(e){this.message=e.target.value};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})};e.prototype.handleSelectSuggestion=function(e,t){e.stopPropagation();this.name=t.name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;return n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("div",{class:"row"},n("label",{htmlFor:this.nameFieldId},"Name:"),n("input",{id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:function(){var t;return e.showSuggestions=((t=e.contactSuggestions)===null||t===void 0?void 0:t.length)>0},onInput:function(t){return e.handleNameChange(t)}}),this.showSuggestions&&n("div",{class:"dropdown"},this.contactSuggestions.map((function(t){var o;return n("div",{key:(o=t.id)!==null&&o!==void 0?o:t.name,class:"suggestion",onClick:function(o){return e.handleSelectSuggestion(o,t)}},t.avatar?n("img",{alt:"Avatar",class:"avatar",src:t.avatar}):n("div",{class:"avatar",innerHTML:d}),n("div",{class:"details"},n("div",{class:"name"},t.name),t.email&&n("div",{class:"destination"},t.email),t.phone&&n("div",{class:"destination"},t.phone)))})))),n("div",{class:"row"},n("label",{htmlFor:this.emailFieldId},"Email:"),n("input",{id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email Address...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleEmailChange(t)}})),n("div",{class:"row"},n("label",{htmlFor:this.phoneFieldId},"Phone:"),n("input",{id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handlePhoneChange(t)}})),this.showMessage&&n("div",{class:"row"},n("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),n("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleMessageChange(t)}})),n("div",{class:"buttons"},n("verdocs-toggle-button",{icon:l,size:"small",active:this.showMessage,onToggle:function(t){e.showMessage=t.detail.active;e.showSuggestions=false}}),n("verdocs-toggle-button",{icon:r,size:"small",active:this.delegator,onToggle:function(t){e.delegator=t.detail.active;e.showSuggestions=false}}),n("div",{class:"flex-fill"}),n("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),n("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}());u.style=c;var p='verdocs-toggle-button{font-family:"Inter", "Barlow", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}';var h=e("verdocs_toggle_button",function(){function e(e){t(this,e);this.toggle=o(this,"toggle",7);this.active=false;this.icon=null;this.label=null;this.size="normal";this._active=false}e.prototype.componentWillLoad=function(){this._active=this.active};e.prototype.handleToggle=function(e){var t;e.stopPropagation();var o=!this._active;this._active=o;(t=this.toggle)===null||t===void 0?void 0:t.emit({active:o})};e.prototype.render=function(){var e=this;return n(i,{class:"size-".concat(this.size)},this.icon?n("button",{innerHTML:this.icon,class:{active:this._active},onClick:function(t){return e.handleToggle(t)}}):n("button",{class:{active:this._active},onClick:function(t){return e.handleToggle(t)}},this.label))};return e}());h.style=p}}}));