@verdocs/web-sdk 6.10.0 → 6.10.2

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 (633) hide show
  1. package/dist/cjs/{Environment-3vWt0C1Q.js → Environment-CP-XG6Lt.js} +2 -3
  2. package/dist/cjs/{Environment-3vWt0C1Q.js.map → Environment-CP-XG6Lt.js.map} +1 -1
  3. package/dist/cjs/_commonjsHelpers-CFO10eej.js +10 -0
  4. package/dist/cjs/_commonjsHelpers-CFO10eej.js.map +1 -0
  5. package/dist/cjs/{en-DyXpAt1T.js → en-B5Y8bwF8.js} +3 -3
  6. package/dist/cjs/{en-DyXpAt1T.js.map → en-B5Y8bwF8.js.map} +1 -1
  7. package/dist/cjs/index-DLmnUl1_.js +4 -4
  8. package/dist/cjs/{interact.min-BAnZvLwr.js → interact.min-CGi6ndGs.js} +3 -3
  9. package/dist/cjs/{interact.min-BAnZvLwr.js.map → interact.min-CGi6ndGs.js.map} +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +8 -8
  12. package/dist/cjs/verdocs-button-panel.cjs.entry.js +2 -2
  13. package/dist/cjs/verdocs-button_3.cjs.entry.js +6 -6
  14. package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +4 -4
  15. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +22 -5214
  16. package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
  17. package/dist/cjs/verdocs-date-input.cjs.entry.js +4 -4
  18. package/dist/cjs/verdocs-dialog.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +5 -5
  20. package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +6 -6
  22. package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +4 -4
  23. package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -2
  24. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +2 -2
  25. package/dist/cjs/verdocs-flag.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +1 -1
  27. package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +8 -8
  28. package/dist/cjs/verdocs-multiselect.cjs.entry.js +1 -1
  29. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
  30. package/dist/cjs/verdocs-organization-card_2.cjs.entry.js +2 -2
  31. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +2 -2
  32. package/dist/cjs/verdocs-preview_6.cjs.entry.js +3 -3
  33. package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
  34. package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
  35. package/dist/cjs/verdocs-search-box.cjs.entry.js +1 -1
  36. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  37. package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +1 -1
  38. package/dist/cjs/verdocs-spinner.cjs.entry.js +1 -1
  39. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +2 -2
  40. package/dist/cjs/verdocs-switch.cjs.entry.js +2 -2
  41. package/dist/cjs/verdocs-table.cjs.entry.js +2 -2
  42. package/dist/cjs/verdocs-tabs.cjs.entry.js +1 -1
  43. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  44. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  45. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  46. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  47. package/dist/cjs/verdocs-templates-list.cjs.entry.js +7 -7
  48. package/dist/cjs/verdocs-toggle-button.cjs.entry.js +1 -1
  49. package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
  50. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  51. package/dist/collection/components/controls/verdocs-button/verdocs-button.js +1 -1
  52. package/dist/collection/components/controls/verdocs-button-panel/verdocs-button-panel.js +2 -2
  53. package/dist/collection/components/controls/verdocs-checkbox/verdocs-checkbox.js +1 -1
  54. package/dist/collection/components/controls/verdocs-component-error/verdocs-component-error.js +1 -1
  55. package/dist/collection/components/controls/verdocs-date-input/verdocs-date-input.js +2 -2
  56. package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.js +1 -1
  57. package/dist/collection/components/controls/verdocs-file-chooser/verdocs-file-chooser.js +1 -1
  58. package/dist/collection/components/controls/verdocs-flag/verdocs-flag.js +1 -1
  59. package/dist/collection/components/controls/verdocs-help-icon/verdocs-help-icon.js +1 -1
  60. package/dist/collection/components/controls/verdocs-loader/verdocs-loader.js +1 -1
  61. package/dist/collection/components/controls/verdocs-menu-panel/verdocs-menu-panel.js +1 -1
  62. package/dist/collection/components/controls/verdocs-multiselect/verdocs-multiselect.js +1 -1
  63. package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.js +1 -1
  64. package/dist/collection/components/controls/verdocs-pagination/verdocs-pagination.js +1 -1
  65. package/dist/collection/components/controls/verdocs-portal/verdocs-portal.js +1 -1
  66. package/dist/collection/components/controls/verdocs-progress-bar/verdocs-progress-bar.js +1 -1
  67. package/dist/collection/components/controls/verdocs-quick-filter/verdocs-quick-filter.js +1 -1
  68. package/dist/collection/components/controls/verdocs-radio-button/verdocs-radio-button.js +1 -1
  69. package/dist/collection/components/controls/verdocs-select-input/verdocs-select-input.js +1 -1
  70. package/dist/collection/components/controls/verdocs-spinner/verdocs-spinner.js +1 -1
  71. package/dist/collection/components/controls/verdocs-switch/verdocs-switch.js +2 -2
  72. package/dist/collection/components/controls/verdocs-table/verdocs-table.js +2 -2
  73. package/dist/collection/components/controls/verdocs-tabs/verdocs-tabs.js +1 -1
  74. package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.js +4 -4
  75. package/dist/collection/components/controls/verdocs-toggle/verdocs-toggle.js +1 -1
  76. package/dist/collection/components/controls/verdocs-toggle-button/verdocs-toggle-button.js +1 -1
  77. package/dist/collection/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.js +1 -1
  78. package/dist/collection/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.js +3 -3
  79. package/dist/collection/components/dialogs/verdocs-delegate-dialog/verdocs-delegate-dialog.js +1 -1
  80. package/dist/collection/components/dialogs/verdocs-dialog/verdocs-dialog.js +1 -1
  81. package/dist/collection/components/dialogs/verdocs-disclosure-dialog/verdocs-disclosure-dialog.js +1 -1
  82. package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.js +2 -2
  83. package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +1 -1
  84. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +1 -1
  85. package/dist/collection/components/dialogs/verdocs-otp-dialog/verdocs-otp-dialog.js +1 -1
  86. package/dist/collection/components/dialogs/verdocs-passcode-dialog/verdocs-passcode-dialog.js +1 -1
  87. package/dist/collection/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.js +1 -1
  88. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +1 -1
  89. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +1 -1
  90. package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +1 -1
  91. package/dist/collection/components/elements/verdocs-search-box/verdocs-search-box.js +1 -1
  92. package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +1 -1
  93. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +24 -41
  94. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
  95. package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -1
  96. package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +6 -6
  97. package/dist/collection/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.js +1 -1
  98. package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.js +2 -2
  99. package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.js +1 -1
  100. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +7 -7
  101. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
  102. package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
  103. package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +7 -7
  104. package/dist/components/{p-CyDWJAOZ.js → p--jRXEN0c.js} +2 -2
  105. package/dist/components/{p-C_Xku1v2.js → p-29evahil.js} +2 -2
  106. package/dist/components/{p-BasWFMeN.js → p-5fVPVL_Z.js} +2 -2
  107. package/dist/components/{p-BhtYCb5T.js → p-B0HO2i65.js} +2 -2
  108. package/dist/components/p-B3UP88BP.js +2 -0
  109. package/dist/components/{p-BxOEoXie.js.map → p-B3UP88BP.js.map} +1 -1
  110. package/dist/components/{p-B845hxhl.js → p-B3nCB2u5.js} +2 -2
  111. package/dist/components/{p-tub_01MP.js → p-B7fdmef7.js} +2 -2
  112. package/dist/components/p-B85MJLTf.js +2 -0
  113. package/dist/components/{p-Dmw-lE3L.js → p-BA3SxsdQ.js} +2 -2
  114. package/dist/components/{p-DxBUReLi.js → p-BD2vHbCJ.js} +2 -2
  115. package/dist/components/{p-CUKiMdwd.js → p-BLo_-c7G.js} +2 -2
  116. package/dist/components/{p-DYtSnUj9.js → p-BMGs9CCD.js} +2 -2
  117. package/dist/components/{p-2bW-AL6b.js → p-BMzxhyLu.js} +2 -2
  118. package/dist/components/{p-pyA5cdVX.js → p-BUKCOnKs.js} +2 -2
  119. package/dist/components/{p-D3ohABOv.js → p-BWrwPDuU.js} +2 -2
  120. package/dist/components/{p-DXLcCG08.js → p-Bi94seCl.js} +2 -2
  121. package/dist/components/{p-Dtndevf4.js → p-ByJ9WBGR.js} +2 -2
  122. package/dist/components/{p-Bdf8pPWm.js → p-C0SHIuoK.js} +2 -2
  123. package/dist/components/{p-5E7bNT3k.js → p-C1VW_3fv.js} +2 -2
  124. package/dist/components/{p-CGNX5HqF.js → p-C4ygd3v_.js} +2 -2
  125. package/dist/components/p-CA8hWmuL.js +2 -0
  126. package/dist/components/p-CA8hWmuL.js.map +1 -0
  127. package/dist/components/{p-CLxwSMOV.js → p-CAGp0qKc.js} +2 -2
  128. package/dist/components/{p-Dm9oOnhq.js → p-CAxzfAvp.js} +2 -2
  129. package/dist/components/{p-Yxa93LOl.js → p-CC7jlZnx.js} +2 -2
  130. package/dist/components/{p-BwEGkh_6.js → p-CHzNcBIz.js} +2 -2
  131. package/dist/components/p-CIgqf7hj.js +2 -0
  132. package/dist/components/{p-C-V6jrel.js → p-CL2-oWjL.js} +2 -2
  133. package/dist/components/{p-BvtSJusb.js → p-CLtldaUs.js} +2 -2
  134. package/dist/components/{p-CQUMhFM4.js → p-CVF-R2yg.js} +2 -2
  135. package/dist/components/p-CVjehb2X.js +2 -0
  136. package/dist/components/{p-eFfgv2Gb.js.map → p-CVjehb2X.js.map} +1 -1
  137. package/dist/components/{p-Bxmki12o.js → p-CYqVJ_kJ.js} +2 -2
  138. package/dist/components/p-CZwyK_uo.js +2 -0
  139. package/dist/components/{p-COfQ1FzC.js.map → p-CZwyK_uo.js.map} +1 -1
  140. package/dist/components/{p-DwPH0TQ4.js → p-C_mtaGHG.js} +2 -2
  141. package/dist/components/{p-C0cAW-8a.js → p-CjUdD_Dm.js} +2 -2
  142. package/dist/components/{p-BXQO5Vza.js → p-CoeB7U-_.js} +2 -2
  143. package/dist/components/{p-Cfiprngx.js → p-CqVkL8_m.js} +2 -2
  144. package/dist/components/{p-CBKrl6B7.js → p-Cujbc8tg.js} +2 -2
  145. package/dist/components/{p-CioaaWeS.js → p-CxIhMndz.js} +2 -2
  146. package/dist/components/{p-DFXK-FYy.js → p-D17kbVUt.js} +2 -2
  147. package/dist/components/{p-wUsR0Dpa.js → p-D9yawpPk.js} +2 -2
  148. package/dist/components/{p-DVGumEtx.js → p-DEhaAbKn.js} +2 -2
  149. package/dist/components/{p-CFEw4Xbi.js → p-DL4-aTsZ.js} +2 -2
  150. package/dist/components/{p-BT8wzCXz.js → p-DP_N7u8w.js} +2 -2
  151. package/dist/components/{p-DfaM_cug.js → p-DTE1GYJt.js} +2 -2
  152. package/dist/components/{p-REnrt0JM.js → p-DVx4efoX.js} +2 -2
  153. package/dist/components/p-Dc3BDcaU.js +2 -0
  154. package/dist/components/{p-D3qUITiS.js.map → p-Dc3BDcaU.js.map} +1 -1
  155. package/dist/{verdocs-web-sdk/p-CjPsvAbb.js → components/p-DcAXub3q.js} +2 -2
  156. package/dist/components/{p-DIOVejyL.js → p-Dj-aIazM.js} +2 -2
  157. package/dist/components/{p-CnoHN1S8.js → p-DnqXAqmP.js} +2 -2
  158. package/dist/components/{p-BX2umpfl.js → p-Dw7l6M37.js} +2 -2
  159. package/dist/components/{p-BaH_hK8j.js → p-F1PgSiVa.js} +2 -2
  160. package/dist/components/{p-DT0LGcPi.js → p-JGWMBIGy.js} +2 -2
  161. package/dist/components/{p-u16vefxk.js → p-LYpUmpqf.js} +2 -2
  162. package/dist/components/{p-B_dAoCMu.js → p-RvR1j0oO.js} +2 -2
  163. package/dist/components/p-aj0qlBQ1.js +2 -0
  164. package/dist/components/{p-DsEO0-XR.js.map → p-aj0qlBQ1.js.map} +1 -1
  165. package/dist/components/{p-CDMCVJys.js → p-nh9PxN8s.js} +3 -3
  166. package/dist/components/{p-DhO1wfh-.js → p-ohuuh9ZE.js} +2 -2
  167. package/dist/components/{p-CrONbj5k.js → p-rasc67fl.js} +2 -2
  168. package/dist/components/{p-BXGNkmyr.js → p-u9H54zUE.js} +2 -2
  169. package/dist/components/{p-DjOTs59Z.js → p-v9WkIq1Z.js} +2 -2
  170. package/dist/components/{p-B-_kYJtC.js → p-vimrvRye.js} +2 -2
  171. package/dist/components/verdocs-adopt-signature-dialog.js +1 -1
  172. package/dist/components/verdocs-auth.js +1 -1
  173. package/dist/components/verdocs-build.js +1 -1
  174. package/dist/components/verdocs-button-panel.js +1 -1
  175. package/dist/components/verdocs-button.js +1 -1
  176. package/dist/components/verdocs-checkbox.js +1 -1
  177. package/dist/components/verdocs-component-error.js +1 -1
  178. package/dist/components/verdocs-contact-picker.js +1 -1
  179. package/dist/components/verdocs-date-input.js +1 -1
  180. package/dist/components/verdocs-delegate-dialog.js +1 -1
  181. package/dist/components/verdocs-dialog.js +1 -1
  182. package/dist/components/verdocs-disclosure-dialog.js +1 -1
  183. package/dist/components/verdocs-download-dialog.js +1 -1
  184. package/dist/components/verdocs-dropdown.js +1 -1
  185. package/dist/components/verdocs-envelope-document-page.js +1 -1
  186. package/dist/components/verdocs-envelope-recipient-link.js +1 -1
  187. package/dist/components/verdocs-envelope-recipient-summary.js +1 -1
  188. package/dist/components/verdocs-envelope-sidebar.js +1 -1
  189. package/dist/components/verdocs-envelope-update-recipient.js +1 -1
  190. package/dist/components/verdocs-envelopes-list.js +1 -1
  191. package/dist/components/verdocs-field-attachment.js +1 -1
  192. package/dist/components/verdocs-field-checkbox.js +1 -1
  193. package/dist/components/verdocs-field-date.js +1 -1
  194. package/dist/components/verdocs-field-dropdown.js +1 -1
  195. package/dist/components/verdocs-field-initial.js +1 -1
  196. package/dist/components/verdocs-field-payment.js +1 -1
  197. package/dist/components/verdocs-field-radio.js +1 -1
  198. package/dist/components/verdocs-field-signature.js +1 -1
  199. package/dist/components/verdocs-field-textarea.js +1 -1
  200. package/dist/components/verdocs-field-textbox.js +1 -1
  201. package/dist/components/verdocs-field-timestamp.js +1 -1
  202. package/dist/components/verdocs-file-chooser.js +1 -1
  203. package/dist/components/verdocs-flag.js +1 -1
  204. package/dist/components/verdocs-help-icon.js +1 -1
  205. package/dist/components/verdocs-initial-dialog.js +1 -1
  206. package/dist/components/verdocs-kba-dialog.js +1 -1
  207. package/dist/components/verdocs-loader.js +1 -1
  208. package/dist/components/verdocs-menu-panel.js +1 -1
  209. package/dist/components/verdocs-multiselect.js +1 -1
  210. package/dist/components/verdocs-ok-dialog.js +1 -1
  211. package/dist/components/verdocs-organization-card.js +1 -1
  212. package/dist/components/verdocs-organization-card.js.map +1 -1
  213. package/dist/components/verdocs-otp-dialog.js +1 -1
  214. package/dist/components/verdocs-pagination.js +1 -1
  215. package/dist/components/verdocs-passcode-dialog.js +1 -1
  216. package/dist/components/verdocs-portal.js +1 -1
  217. package/dist/components/verdocs-preview.js +1 -1
  218. package/dist/components/verdocs-progress-bar.js +1 -1
  219. package/dist/components/verdocs-question-dialog.js +1 -1
  220. package/dist/components/verdocs-quick-filter.js +1 -1
  221. package/dist/components/verdocs-quick-functions.js +1 -1
  222. package/dist/components/verdocs-radio-button.js +1 -1
  223. package/dist/components/verdocs-search-box.js +1 -1
  224. package/dist/components/verdocs-search-tabs.js +1 -1
  225. package/dist/components/verdocs-select-input.js +1 -1
  226. package/dist/components/verdocs-send.js +1 -1
  227. package/dist/components/verdocs-sign-footer.js +1 -1
  228. package/dist/components/verdocs-sign.js +1 -1
  229. package/dist/components/verdocs-signature-dialog.js +1 -1
  230. package/dist/components/verdocs-signing-progress.js +1 -1
  231. package/dist/components/verdocs-spinner.js +1 -1
  232. package/dist/components/verdocs-status-indicator.js +1 -1
  233. package/dist/components/verdocs-switch.js +1 -1
  234. package/dist/components/verdocs-table.js +1 -1
  235. package/dist/components/verdocs-tabs.js +1 -1
  236. package/dist/components/verdocs-template-attachments.js +1 -1
  237. package/dist/components/verdocs-template-build-tabs.js +1 -1
  238. package/dist/components/verdocs-template-card.js +1 -1
  239. package/dist/components/verdocs-template-create.js +1 -1
  240. package/dist/components/verdocs-template-document-page.js +1 -1
  241. package/dist/components/verdocs-template-field-properties.js +1 -1
  242. package/dist/components/verdocs-template-fields.js +1 -1
  243. package/dist/components/verdocs-template-role-properties.js +1 -1
  244. package/dist/components/verdocs-template-roles.js +1 -1
  245. package/dist/components/verdocs-template-settings.js +1 -1
  246. package/dist/components/verdocs-template-star.js +1 -1
  247. package/dist/components/verdocs-template-tags.js +1 -1
  248. package/dist/components/verdocs-templates-list.js +1 -1
  249. package/dist/components/verdocs-text-input.js +1 -1
  250. package/dist/components/verdocs-toggle-button.js +1 -1
  251. package/dist/components/verdocs-toggle.js +1 -1
  252. package/dist/components/verdocs-toolbar-icon.js +1 -1
  253. package/dist/components/verdocs-upload-dialog.js +1 -1
  254. package/dist/components/verdocs-view.js +1 -1
  255. package/dist/esm/{Environment-C_Xku1v2.js → Environment-29evahil.js} +3 -3
  256. package/dist/esm/{Environment-C_Xku1v2.js.map → Environment-29evahil.js.map} +1 -1
  257. package/dist/esm/_commonjsHelpers-B85MJLTf.js +8 -0
  258. package/dist/esm/_commonjsHelpers-B85MJLTf.js.map +1 -0
  259. package/dist/esm/{en-bsV5YfOZ.js → en-DZgdXBKq.js} +3 -3
  260. package/dist/{esm-es5/en-bsV5YfOZ.js.map → esm/en-DZgdXBKq.js.map} +1 -1
  261. package/dist/esm/index-CjTHbolG.js +4 -4
  262. package/dist/esm/{interact.min-BepJAdBZ.js → interact.min-BO_a_7pQ.js} +3 -3
  263. package/dist/esm/{interact.min-BepJAdBZ.js.map → interact.min-BO_a_7pQ.js.map} +1 -1
  264. package/dist/esm/loader.js +1 -1
  265. package/dist/esm/{utils-D9l-GFdv.js → utils-Bh3zb1Xs.js} +3 -3
  266. package/dist/{esm-es5/utils-D9l-GFdv.js.map → esm/utils-Bh3zb1Xs.js.map} +1 -1
  267. package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +8 -8
  268. package/dist/esm/verdocs-button-panel.entry.js +2 -2
  269. package/dist/esm/verdocs-button_3.entry.js +6 -6
  270. package/dist/esm/verdocs-checkbox_5.entry.js +4 -4
  271. package/dist/esm/verdocs-contact-picker.entry.js +23 -5215
  272. package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
  273. package/dist/esm/verdocs-date-input.entry.js +4 -4
  274. package/dist/esm/verdocs-dialog.entry.js +1 -1
  275. package/dist/esm/verdocs-download-dialog_4.entry.js +6 -6
  276. package/dist/esm/verdocs-dropdown.entry.js +1 -1
  277. package/dist/esm/verdocs-envelopes-list.entry.js +7 -7
  278. package/dist/esm/verdocs-field-attachment_11.entry.js +4 -4
  279. package/dist/esm/verdocs-field-payment.entry.js +2 -2
  280. package/dist/esm/verdocs-file-chooser_2.entry.js +2 -2
  281. package/dist/esm/verdocs-flag.entry.js +1 -1
  282. package/dist/esm/verdocs-initial-dialog.entry.js +1 -1
  283. package/dist/esm/verdocs-menu-panel_2.entry.js +8 -8
  284. package/dist/esm/verdocs-multiselect.entry.js +1 -1
  285. package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
  286. package/dist/esm/verdocs-organization-card_2.entry.js +2 -2
  287. package/dist/esm/verdocs-pagination_2.entry.js +3 -3
  288. package/dist/esm/verdocs-preview_6.entry.js +4 -4
  289. package/dist/esm/verdocs-quick-functions.entry.js +1 -1
  290. package/dist/esm/verdocs-radio-button.entry.js +1 -1
  291. package/dist/esm/verdocs-search-box.entry.js +1 -1
  292. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  293. package/dist/esm/verdocs-sign.entry.js +1 -1
  294. package/dist/esm/verdocs-signature-dialog.entry.js +1 -1
  295. package/dist/esm/verdocs-signing-progress.entry.js +1 -1
  296. package/dist/esm/verdocs-spinner.entry.js +1 -1
  297. package/dist/esm/verdocs-status-indicator.entry.js +2 -2
  298. package/dist/esm/verdocs-switch.entry.js +2 -2
  299. package/dist/esm/verdocs-table.entry.js +2 -2
  300. package/dist/esm/verdocs-tabs.entry.js +1 -1
  301. package/dist/esm/verdocs-template-card.entry.js +1 -1
  302. package/dist/esm/verdocs-template-document-page_2.entry.js +2 -2
  303. package/dist/esm/verdocs-template-star.entry.js +1 -1
  304. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  305. package/dist/esm/verdocs-templates-list.entry.js +7 -7
  306. package/dist/esm/verdocs-toggle-button.entry.js +1 -1
  307. package/dist/esm/verdocs-toggle.entry.js +1 -1
  308. package/dist/esm/verdocs-web-sdk.js +1 -1
  309. package/dist/esm-es5/{Environment-C_Xku1v2.js → Environment-29evahil.js} +2 -2
  310. package/dist/esm-es5/{Environment-C_Xku1v2.js.map → Environment-29evahil.js.map} +1 -1
  311. package/dist/esm-es5/_commonjsHelpers-B85MJLTf.js +2 -0
  312. package/dist/esm-es5/_commonjsHelpers-B85MJLTf.js.map +1 -0
  313. package/dist/esm-es5/{en-bsV5YfOZ.js → en-DZgdXBKq.js} +2 -2
  314. package/dist/{esm/en-bsV5YfOZ.js.map → esm-es5/en-DZgdXBKq.js.map} +1 -1
  315. package/dist/esm-es5/index-CjTHbolG.js +1 -1
  316. package/dist/esm-es5/{interact.min-BepJAdBZ.js → interact.min-BO_a_7pQ.js} +2 -2
  317. package/dist/esm-es5/{interact.min-BepJAdBZ.js.map → interact.min-BO_a_7pQ.js.map} +1 -1
  318. package/dist/esm-es5/loader.js +1 -1
  319. package/dist/esm-es5/{utils-D9l-GFdv.js → utils-Bh3zb1Xs.js} +2 -2
  320. package/dist/{esm/utils-D9l-GFdv.js.map → esm-es5/utils-Bh3zb1Xs.js.map} +1 -1
  321. package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
  322. package/dist/esm-es5/verdocs-button-panel.entry.js +1 -1
  323. package/dist/esm-es5/verdocs-button_3.entry.js +1 -1
  324. package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
  325. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -2
  326. package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
  327. package/dist/esm-es5/verdocs-date-input.entry.js +1 -1
  328. package/dist/esm-es5/verdocs-dialog.entry.js +1 -1
  329. package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
  330. package/dist/esm-es5/verdocs-dropdown.entry.js +1 -1
  331. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  332. package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
  333. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  334. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  335. package/dist/esm-es5/verdocs-flag.entry.js +1 -1
  336. package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
  337. package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
  338. package/dist/esm-es5/verdocs-multiselect.entry.js +1 -1
  339. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  340. package/dist/esm-es5/verdocs-organization-card_2.entry.js +1 -1
  341. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  342. package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
  343. package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
  344. package/dist/esm-es5/verdocs-radio-button.entry.js +1 -1
  345. package/dist/esm-es5/verdocs-search-box.entry.js +1 -1
  346. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  347. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  348. package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
  349. package/dist/esm-es5/verdocs-signing-progress.entry.js +1 -1
  350. package/dist/esm-es5/verdocs-spinner.entry.js +1 -1
  351. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  352. package/dist/esm-es5/verdocs-switch.entry.js +1 -1
  353. package/dist/esm-es5/verdocs-table.entry.js +1 -1
  354. package/dist/esm-es5/verdocs-tabs.entry.js +1 -1
  355. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  356. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  357. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  358. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  359. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  360. package/dist/esm-es5/verdocs-toggle-button.entry.js +1 -1
  361. package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
  362. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  363. package/dist/types/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.d.ts +2 -3
  364. package/dist/verdocs-web-sdk/{p-f645909b.entry.js → p-0893bd27.entry.js} +2 -2
  365. package/dist/verdocs-web-sdk/{p-2f96e7c9.system.entry.js → p-08de250b.system.entry.js} +2 -2
  366. package/dist/verdocs-web-sdk/{p-eb8091da.system.entry.js → p-098b3852.system.entry.js} +2 -2
  367. package/dist/verdocs-web-sdk/{p-421c231a.entry.js → p-0b7c0d25.entry.js} +2 -2
  368. package/dist/verdocs-web-sdk/{p-7e6d153f.system.entry.js → p-0d19368a.system.entry.js} +2 -2
  369. package/dist/verdocs-web-sdk/{p-a4a12a7f.entry.js → p-0e2505e5.entry.js} +2 -2
  370. package/dist/verdocs-web-sdk/p-0eaeb487.system.entry.js +2 -0
  371. package/dist/verdocs-web-sdk/p-0eaeb487.system.entry.js.map +1 -0
  372. package/dist/verdocs-web-sdk/{p-d67b615f.system.entry.js → p-112ff1d7.system.entry.js} +2 -2
  373. package/dist/verdocs-web-sdk/{p-810e09ca.entry.js → p-11d11e68.entry.js} +2 -2
  374. package/dist/verdocs-web-sdk/{p-d60cfa3e.system.entry.js → p-1273627b.system.entry.js} +2 -2
  375. package/dist/verdocs-web-sdk/{p-6ad6e461.system.entry.js → p-147256a8.system.entry.js} +2 -2
  376. package/dist/verdocs-web-sdk/{p-adae5a12.system.entry.js → p-1bae66d5.system.entry.js} +2 -2
  377. package/dist/verdocs-web-sdk/{p-5f967601.system.entry.js → p-1d100b90.system.entry.js} +2 -2
  378. package/dist/verdocs-web-sdk/{p-f97ca49e.entry.js → p-21b8567c.entry.js} +2 -2
  379. package/dist/verdocs-web-sdk/p-2636ac4d.entry.js +2 -0
  380. package/dist/verdocs-web-sdk/p-2636ac4d.entry.js.map +1 -0
  381. package/dist/verdocs-web-sdk/{p-8adef8f2.entry.js → p-26b82394.entry.js} +2 -2
  382. package/dist/verdocs-web-sdk/{p-4798c2a5.system.entry.js → p-28418080.system.entry.js} +2 -2
  383. package/dist/verdocs-web-sdk/{p-C_Xku1v2.js → p-29evahil.js} +2 -2
  384. package/dist/verdocs-web-sdk/{p-C_Xku1v2.js.map → p-29evahil.js.map} +1 -1
  385. package/dist/verdocs-web-sdk/{p-ee84944b.entry.js → p-2edfa589.entry.js} +2 -2
  386. package/dist/verdocs-web-sdk/{p-ca03555a.system.entry.js → p-34829b57.system.entry.js} +2 -2
  387. package/dist/verdocs-web-sdk/{p-812244ec.entry.js → p-349a2532.entry.js} +2 -2
  388. package/dist/verdocs-web-sdk/p-34ae1f00.system.entry.js +2 -0
  389. package/dist/verdocs-web-sdk/{p-0496538b.entry.js → p-35f1973a.entry.js} +2 -2
  390. package/dist/verdocs-web-sdk/{p-9454a3b8.system.entry.js → p-38bdedc5.system.entry.js} +2 -2
  391. package/dist/verdocs-web-sdk/p-431ed4cf.entry.js +2 -0
  392. package/dist/verdocs-web-sdk/{p-e95723ac.entry.js → p-4471c1b4.entry.js} +2 -2
  393. package/dist/verdocs-web-sdk/{p-744a9a03.entry.js → p-4a157584.entry.js} +2 -2
  394. package/dist/verdocs-web-sdk/{p-e608d2bc.system.entry.js → p-4a2d69b9.system.entry.js} +2 -2
  395. package/dist/verdocs-web-sdk/{p-d3d177d0.system.entry.js → p-4f5e39eb.system.entry.js} +2 -2
  396. package/dist/verdocs-web-sdk/{p-04d2fa80.system.entry.js → p-4f9bd0bd.system.entry.js} +2 -2
  397. package/dist/verdocs-web-sdk/p-51a3c97d.system.entry.js +2 -0
  398. package/dist/verdocs-web-sdk/{p-d4f72da9.entry.js → p-52f3ccb3.entry.js} +2 -2
  399. package/dist/verdocs-web-sdk/p-5608f245.entry.js +2 -0
  400. package/dist/verdocs-web-sdk/{p-495ed75e.system.entry.js → p-5aca9c76.system.entry.js} +2 -2
  401. package/dist/verdocs-web-sdk/{p-d09a4bb9.entry.js → p-5b49bd49.entry.js} +2 -2
  402. package/dist/verdocs-web-sdk/{p-50d51d96.entry.js → p-5c2025ca.entry.js} +2 -2
  403. package/dist/verdocs-web-sdk/{p-cfb275c5.entry.js → p-5d532790.entry.js} +2 -2
  404. package/dist/verdocs-web-sdk/{p-ad40c4aa.system.entry.js → p-5f92320e.system.entry.js} +2 -2
  405. package/dist/verdocs-web-sdk/{p-eceed44b.entry.js → p-61f66f45.entry.js} +2 -2
  406. package/dist/verdocs-web-sdk/{p-0af6c4f0.system.entry.js → p-629301d3.system.entry.js} +2 -2
  407. package/dist/verdocs-web-sdk/{p-992d4116.system.entry.js → p-6379773e.system.entry.js} +2 -2
  408. package/dist/verdocs-web-sdk/{p-1ed16766.entry.js → p-66144da6.entry.js} +2 -2
  409. package/dist/verdocs-web-sdk/{p-1929a794.system.entry.js → p-66375e80.system.entry.js} +2 -2
  410. package/dist/verdocs-web-sdk/{p-0638a269.entry.js → p-665748fe.entry.js} +2 -2
  411. package/dist/verdocs-web-sdk/{p-7de7cb5b.entry.js → p-67ccf629.entry.js} +2 -2
  412. package/dist/verdocs-web-sdk/{p-edab1fed.system.entry.js → p-6af0110a.system.entry.js} +3 -3
  413. package/dist/verdocs-web-sdk/{p-60812b90.entry.js → p-79fdd519.entry.js} +2 -2
  414. package/dist/verdocs-web-sdk/{p-2c25292b.entry.js → p-7e1f895c.entry.js} +2 -2
  415. package/dist/verdocs-web-sdk/{p-f10199fe.system.entry.js → p-83d23528.system.entry.js} +2 -2
  416. package/dist/verdocs-web-sdk/{p-2584c2b2.system.entry.js → p-869024e0.system.entry.js} +2 -2
  417. package/dist/verdocs-web-sdk/{p-2d72560a.entry.js → p-871792ab.entry.js} +2 -2
  418. package/dist/verdocs-web-sdk/{p-d7284af0.entry.js → p-8f50f83f.entry.js} +2 -2
  419. package/dist/verdocs-web-sdk/{p-83a863b1.system.entry.js → p-97fcac5e.system.entry.js} +2 -2
  420. package/dist/verdocs-web-sdk/{p-e632e92c.entry.js → p-9c481477.entry.js} +2 -2
  421. package/dist/verdocs-web-sdk/{p-682c5a5c.entry.js → p-9c9d49cd.entry.js} +2 -2
  422. package/dist/verdocs-web-sdk/{p-fd59f055.system.entry.js → p-9cae97dc.system.entry.js} +2 -2
  423. package/dist/verdocs-web-sdk/{p-cfac9703.system.entry.js → p-9f65fa0d.system.entry.js} +2 -2
  424. package/dist/verdocs-web-sdk/p-B85MJLTf.js +2 -0
  425. package/dist/verdocs-web-sdk/p-B85MJLTf.js.map +1 -0
  426. package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
  427. package/dist/verdocs-web-sdk/{p-CGNX5HqF.js → p-C4ygd3v_.js} +2 -2
  428. package/dist/verdocs-web-sdk/{p-CGNX5HqF.js.map → p-C4ygd3v_.js.map} +1 -1
  429. package/dist/verdocs-web-sdk/{p-T412l3FU.js → p-CGsVCy75.js} +2 -2
  430. package/dist/verdocs-web-sdk/{p-T412l3FU.js.map → p-CGsVCy75.js.map} +1 -1
  431. package/dist/verdocs-web-sdk/p-CHg64SCg.system.js +2 -0
  432. package/dist/verdocs-web-sdk/{p-C9y1KCYV.system.js.map → p-CHg64SCg.system.js.map} +1 -1
  433. package/dist/verdocs-web-sdk/p-D6-Ny6z1.system.js +2 -0
  434. package/dist/verdocs-web-sdk/p-D6-Ny6z1.system.js.map +1 -0
  435. package/dist/verdocs-web-sdk/{p-DE0Cygqz.system.js → p-DQMNv-mt.system.js} +2 -2
  436. package/dist/verdocs-web-sdk/{p-DE0Cygqz.system.js.map → p-DQMNv-mt.system.js.map} +1 -1
  437. package/dist/{components/p-CjPsvAbb.js → verdocs-web-sdk/p-DcAXub3q.js} +2 -2
  438. package/dist/verdocs-web-sdk/{p-CjPsvAbb.js.map → p-DcAXub3q.js.map} +1 -1
  439. package/dist/verdocs-web-sdk/{p-C06jLDFm.system.js → p-RE5sZHi0.system.js} +2 -2
  440. package/dist/verdocs-web-sdk/{p-C06jLDFm.system.js.map → p-RE5sZHi0.system.js.map} +1 -1
  441. package/dist/verdocs-web-sdk/{p-aa3b0fb7.system.entry.js → p-a06772cc.system.entry.js} +2 -2
  442. package/dist/verdocs-web-sdk/{p-df2a1bd4.system.entry.js → p-a65e1762.system.entry.js} +2 -2
  443. package/dist/verdocs-web-sdk/{p-88ccf564.system.entry.js → p-abe7c086.system.entry.js} +2 -2
  444. package/dist/verdocs-web-sdk/{p-297d1631.system.entry.js → p-b3ac740e.system.entry.js} +2 -2
  445. package/dist/verdocs-web-sdk/{p-e1bf3431.system.entry.js → p-b5572507.system.entry.js} +2 -2
  446. package/dist/verdocs-web-sdk/{p-d3b798ae.system.entry.js → p-b73405ad.system.entry.js} +2 -2
  447. package/dist/verdocs-web-sdk/{p-6754dfcf.system.entry.js → p-c45927e3.system.entry.js} +2 -2
  448. package/dist/verdocs-web-sdk/{p-33cfc977.system.entry.js → p-c5d0abe5.system.entry.js} +2 -2
  449. package/dist/verdocs-web-sdk/{p-f2876180.entry.js → p-c6f52cd7.entry.js} +2 -2
  450. package/dist/verdocs-web-sdk/{p-1827477d.system.entry.js → p-c72daca8.system.entry.js} +2 -2
  451. package/dist/verdocs-web-sdk/{p-1258cb3f.system.entry.js → p-cfc2d31b.system.entry.js} +2 -2
  452. package/dist/verdocs-web-sdk/{p-d0e8419b.entry.js → p-d06d9cfd.entry.js} +3 -3
  453. package/dist/verdocs-web-sdk/{p-b0aafc0a.entry.js → p-d26c81ec.entry.js} +2 -2
  454. package/dist/verdocs-web-sdk/{p-2e76c944.entry.js → p-d9e8be34.entry.js} +2 -2
  455. package/dist/verdocs-web-sdk/{p-143c6b5c.entry.js → p-df1262b2.entry.js} +2 -2
  456. package/dist/verdocs-web-sdk/{p-40f5ecf3.system.entry.js → p-e2acf751.system.entry.js} +2 -2
  457. package/dist/verdocs-web-sdk/{p-226be1fc.entry.js → p-e50ec253.entry.js} +2 -2
  458. package/dist/verdocs-web-sdk/{p-ed953cca.entry.js → p-eccd653b.entry.js} +2 -2
  459. package/dist/verdocs-web-sdk/{p-9624aa95.entry.js → p-f0e794bc.entry.js} +2 -2
  460. package/dist/verdocs-web-sdk/{p-a90b623c.entry.js → p-f12fcb84.entry.js} +2 -2
  461. package/dist/verdocs-web-sdk/{p-1f1fc6d7.entry.js → p-f32fde74.entry.js} +2 -2
  462. package/dist/verdocs-web-sdk/{p-842c345c.entry.js → p-f60672f5.entry.js} +2 -2
  463. package/dist/verdocs-web-sdk/{p-11c3e5bb.entry.js → p-f9ef8d34.entry.js} +2 -2
  464. package/dist/verdocs-web-sdk/{p-c5b70927.system.entry.js → p-fafc51b9.system.entry.js} +2 -2
  465. package/dist/verdocs-web-sdk/{p-EtGQEmqo.system.js → p-nfw6V5pF.system.js} +2 -2
  466. package/dist/verdocs-web-sdk/{p-EtGQEmqo.system.js.map → p-nfw6V5pF.system.js.map} +1 -1
  467. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  468. package/package.json +1 -1
  469. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -13
  470. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js.map +0 -1
  471. package/dist/collection/utils/Unleash.js +0 -18
  472. package/dist/collection/utils/Unleash.js.map +0 -1
  473. package/dist/components/p-BFTU3MAI.js +0 -2
  474. package/dist/components/p-BxOEoXie.js +0 -2
  475. package/dist/components/p-COfQ1FzC.js +0 -2
  476. package/dist/components/p-CPYFXW2q.js +0 -3
  477. package/dist/components/p-CPYFXW2q.js.map +0 -1
  478. package/dist/components/p-D3qUITiS.js +0 -2
  479. package/dist/components/p-DQTI8vRX.js +0 -2
  480. package/dist/components/p-DsEO0-XR.js +0 -2
  481. package/dist/components/p-eFfgv2Gb.js +0 -2
  482. package/dist/custom-elements.json +0 -2501
  483. package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -10
  484. package/dist/esm/_commonjsHelpers-BFTU3MAI.js.map +0 -1
  485. package/dist/esm-es5/_commonjsHelpers-BFTU3MAI.js +0 -2
  486. package/dist/esm-es5/_commonjsHelpers-BFTU3MAI.js.map +0 -1
  487. package/dist/types/utils/Unleash.d.ts +0 -14
  488. package/dist/verdocs-web-sdk/p-04640b2c.system.entry.js +0 -2
  489. package/dist/verdocs-web-sdk/p-13e7d40b.system.entry.js +0 -2
  490. package/dist/verdocs-web-sdk/p-1ce27c81.system.entry.js +0 -4
  491. package/dist/verdocs-web-sdk/p-1ce27c81.system.entry.js.map +0 -1
  492. package/dist/verdocs-web-sdk/p-4e84a5b6.entry.js +0 -3
  493. package/dist/verdocs-web-sdk/p-4e84a5b6.entry.js.map +0 -1
  494. package/dist/verdocs-web-sdk/p-62b6402f.entry.js +0 -2
  495. package/dist/verdocs-web-sdk/p-BFTU3MAI.js +0 -2
  496. package/dist/verdocs-web-sdk/p-BFTU3MAI.js.map +0 -1
  497. package/dist/verdocs-web-sdk/p-Bzy18UgU.system.js +0 -2
  498. package/dist/verdocs-web-sdk/p-Bzy18UgU.system.js.map +0 -1
  499. package/dist/verdocs-web-sdk/p-C9y1KCYV.system.js +0 -2
  500. package/dist/verdocs-web-sdk/p-aa6d4398.entry.js +0 -2
  501. /package/dist/components/{p-CyDWJAOZ.js.map → p--jRXEN0c.js.map} +0 -0
  502. /package/dist/components/{p-C_Xku1v2.js.map → p-29evahil.js.map} +0 -0
  503. /package/dist/components/{p-BasWFMeN.js.map → p-5fVPVL_Z.js.map} +0 -0
  504. /package/dist/components/{p-BhtYCb5T.js.map → p-B0HO2i65.js.map} +0 -0
  505. /package/dist/components/{p-B845hxhl.js.map → p-B3nCB2u5.js.map} +0 -0
  506. /package/dist/components/{p-tub_01MP.js.map → p-B7fdmef7.js.map} +0 -0
  507. /package/dist/components/{p-BFTU3MAI.js.map → p-B85MJLTf.js.map} +0 -0
  508. /package/dist/components/{p-Dmw-lE3L.js.map → p-BA3SxsdQ.js.map} +0 -0
  509. /package/dist/components/{p-DxBUReLi.js.map → p-BD2vHbCJ.js.map} +0 -0
  510. /package/dist/components/{p-CUKiMdwd.js.map → p-BLo_-c7G.js.map} +0 -0
  511. /package/dist/components/{p-DYtSnUj9.js.map → p-BMGs9CCD.js.map} +0 -0
  512. /package/dist/components/{p-2bW-AL6b.js.map → p-BMzxhyLu.js.map} +0 -0
  513. /package/dist/components/{p-pyA5cdVX.js.map → p-BUKCOnKs.js.map} +0 -0
  514. /package/dist/components/{p-D3ohABOv.js.map → p-BWrwPDuU.js.map} +0 -0
  515. /package/dist/components/{p-DXLcCG08.js.map → p-Bi94seCl.js.map} +0 -0
  516. /package/dist/components/{p-Dtndevf4.js.map → p-ByJ9WBGR.js.map} +0 -0
  517. /package/dist/components/{p-Bdf8pPWm.js.map → p-C0SHIuoK.js.map} +0 -0
  518. /package/dist/components/{p-5E7bNT3k.js.map → p-C1VW_3fv.js.map} +0 -0
  519. /package/dist/components/{p-CGNX5HqF.js.map → p-C4ygd3v_.js.map} +0 -0
  520. /package/dist/components/{p-CLxwSMOV.js.map → p-CAGp0qKc.js.map} +0 -0
  521. /package/dist/components/{p-Dm9oOnhq.js.map → p-CAxzfAvp.js.map} +0 -0
  522. /package/dist/components/{p-Yxa93LOl.js.map → p-CC7jlZnx.js.map} +0 -0
  523. /package/dist/components/{p-BwEGkh_6.js.map → p-CHzNcBIz.js.map} +0 -0
  524. /package/dist/components/{p-DQTI8vRX.js.map → p-CIgqf7hj.js.map} +0 -0
  525. /package/dist/components/{p-C-V6jrel.js.map → p-CL2-oWjL.js.map} +0 -0
  526. /package/dist/components/{p-BvtSJusb.js.map → p-CLtldaUs.js.map} +0 -0
  527. /package/dist/components/{p-CQUMhFM4.js.map → p-CVF-R2yg.js.map} +0 -0
  528. /package/dist/components/{p-Bxmki12o.js.map → p-CYqVJ_kJ.js.map} +0 -0
  529. /package/dist/components/{p-DwPH0TQ4.js.map → p-C_mtaGHG.js.map} +0 -0
  530. /package/dist/components/{p-C0cAW-8a.js.map → p-CjUdD_Dm.js.map} +0 -0
  531. /package/dist/components/{p-BXQO5Vza.js.map → p-CoeB7U-_.js.map} +0 -0
  532. /package/dist/components/{p-Cfiprngx.js.map → p-CqVkL8_m.js.map} +0 -0
  533. /package/dist/components/{p-CBKrl6B7.js.map → p-Cujbc8tg.js.map} +0 -0
  534. /package/dist/components/{p-CioaaWeS.js.map → p-CxIhMndz.js.map} +0 -0
  535. /package/dist/components/{p-DFXK-FYy.js.map → p-D17kbVUt.js.map} +0 -0
  536. /package/dist/components/{p-wUsR0Dpa.js.map → p-D9yawpPk.js.map} +0 -0
  537. /package/dist/components/{p-DVGumEtx.js.map → p-DEhaAbKn.js.map} +0 -0
  538. /package/dist/components/{p-CFEw4Xbi.js.map → p-DL4-aTsZ.js.map} +0 -0
  539. /package/dist/components/{p-BT8wzCXz.js.map → p-DP_N7u8w.js.map} +0 -0
  540. /package/dist/components/{p-DfaM_cug.js.map → p-DTE1GYJt.js.map} +0 -0
  541. /package/dist/components/{p-REnrt0JM.js.map → p-DVx4efoX.js.map} +0 -0
  542. /package/dist/components/{p-CjPsvAbb.js.map → p-DcAXub3q.js.map} +0 -0
  543. /package/dist/components/{p-DIOVejyL.js.map → p-Dj-aIazM.js.map} +0 -0
  544. /package/dist/components/{p-CnoHN1S8.js.map → p-DnqXAqmP.js.map} +0 -0
  545. /package/dist/components/{p-BX2umpfl.js.map → p-Dw7l6M37.js.map} +0 -0
  546. /package/dist/components/{p-BaH_hK8j.js.map → p-F1PgSiVa.js.map} +0 -0
  547. /package/dist/components/{p-DT0LGcPi.js.map → p-JGWMBIGy.js.map} +0 -0
  548. /package/dist/components/{p-u16vefxk.js.map → p-LYpUmpqf.js.map} +0 -0
  549. /package/dist/components/{p-B_dAoCMu.js.map → p-RvR1j0oO.js.map} +0 -0
  550. /package/dist/components/{p-CDMCVJys.js.map → p-nh9PxN8s.js.map} +0 -0
  551. /package/dist/components/{p-DhO1wfh-.js.map → p-ohuuh9ZE.js.map} +0 -0
  552. /package/dist/components/{p-CrONbj5k.js.map → p-rasc67fl.js.map} +0 -0
  553. /package/dist/components/{p-BXGNkmyr.js.map → p-u9H54zUE.js.map} +0 -0
  554. /package/dist/components/{p-DjOTs59Z.js.map → p-v9WkIq1Z.js.map} +0 -0
  555. /package/dist/components/{p-B-_kYJtC.js.map → p-vimrvRye.js.map} +0 -0
  556. /package/dist/verdocs-web-sdk/{p-f645909b.entry.js.map → p-0893bd27.entry.js.map} +0 -0
  557. /package/dist/verdocs-web-sdk/{p-2f96e7c9.system.entry.js.map → p-08de250b.system.entry.js.map} +0 -0
  558. /package/dist/verdocs-web-sdk/{p-eb8091da.system.entry.js.map → p-098b3852.system.entry.js.map} +0 -0
  559. /package/dist/verdocs-web-sdk/{p-421c231a.entry.js.map → p-0b7c0d25.entry.js.map} +0 -0
  560. /package/dist/verdocs-web-sdk/{p-7e6d153f.system.entry.js.map → p-0d19368a.system.entry.js.map} +0 -0
  561. /package/dist/verdocs-web-sdk/{p-a4a12a7f.entry.js.map → p-0e2505e5.entry.js.map} +0 -0
  562. /package/dist/verdocs-web-sdk/{p-d67b615f.system.entry.js.map → p-112ff1d7.system.entry.js.map} +0 -0
  563. /package/dist/verdocs-web-sdk/{p-810e09ca.entry.js.map → p-11d11e68.entry.js.map} +0 -0
  564. /package/dist/verdocs-web-sdk/{p-d60cfa3e.system.entry.js.map → p-1273627b.system.entry.js.map} +0 -0
  565. /package/dist/verdocs-web-sdk/{p-6ad6e461.system.entry.js.map → p-147256a8.system.entry.js.map} +0 -0
  566. /package/dist/verdocs-web-sdk/{p-adae5a12.system.entry.js.map → p-1bae66d5.system.entry.js.map} +0 -0
  567. /package/dist/verdocs-web-sdk/{p-5f967601.system.entry.js.map → p-1d100b90.system.entry.js.map} +0 -0
  568. /package/dist/verdocs-web-sdk/{p-f97ca49e.entry.js.map → p-21b8567c.entry.js.map} +0 -0
  569. /package/dist/verdocs-web-sdk/{p-8adef8f2.entry.js.map → p-26b82394.entry.js.map} +0 -0
  570. /package/dist/verdocs-web-sdk/{p-4798c2a5.system.entry.js.map → p-28418080.system.entry.js.map} +0 -0
  571. /package/dist/verdocs-web-sdk/{p-ee84944b.entry.js.map → p-2edfa589.entry.js.map} +0 -0
  572. /package/dist/verdocs-web-sdk/{p-ca03555a.system.entry.js.map → p-34829b57.system.entry.js.map} +0 -0
  573. /package/dist/verdocs-web-sdk/{p-812244ec.entry.js.map → p-349a2532.entry.js.map} +0 -0
  574. /package/dist/verdocs-web-sdk/{p-04640b2c.system.entry.js.map → p-34ae1f00.system.entry.js.map} +0 -0
  575. /package/dist/verdocs-web-sdk/{p-0496538b.entry.js.map → p-35f1973a.entry.js.map} +0 -0
  576. /package/dist/verdocs-web-sdk/{p-9454a3b8.system.entry.js.map → p-38bdedc5.system.entry.js.map} +0 -0
  577. /package/dist/verdocs-web-sdk/{p-62b6402f.entry.js.map → p-431ed4cf.entry.js.map} +0 -0
  578. /package/dist/verdocs-web-sdk/{p-e95723ac.entry.js.map → p-4471c1b4.entry.js.map} +0 -0
  579. /package/dist/verdocs-web-sdk/{p-744a9a03.entry.js.map → p-4a157584.entry.js.map} +0 -0
  580. /package/dist/verdocs-web-sdk/{p-e608d2bc.system.entry.js.map → p-4a2d69b9.system.entry.js.map} +0 -0
  581. /package/dist/verdocs-web-sdk/{p-d3d177d0.system.entry.js.map → p-4f5e39eb.system.entry.js.map} +0 -0
  582. /package/dist/verdocs-web-sdk/{p-04d2fa80.system.entry.js.map → p-4f9bd0bd.system.entry.js.map} +0 -0
  583. /package/dist/verdocs-web-sdk/{p-13e7d40b.system.entry.js.map → p-51a3c97d.system.entry.js.map} +0 -0
  584. /package/dist/verdocs-web-sdk/{p-d4f72da9.entry.js.map → p-52f3ccb3.entry.js.map} +0 -0
  585. /package/dist/verdocs-web-sdk/{p-aa6d4398.entry.js.map → p-5608f245.entry.js.map} +0 -0
  586. /package/dist/verdocs-web-sdk/{p-495ed75e.system.entry.js.map → p-5aca9c76.system.entry.js.map} +0 -0
  587. /package/dist/verdocs-web-sdk/{p-d09a4bb9.entry.js.map → p-5b49bd49.entry.js.map} +0 -0
  588. /package/dist/verdocs-web-sdk/{p-50d51d96.entry.js.map → p-5c2025ca.entry.js.map} +0 -0
  589. /package/dist/verdocs-web-sdk/{p-cfb275c5.entry.js.map → p-5d532790.entry.js.map} +0 -0
  590. /package/dist/verdocs-web-sdk/{p-ad40c4aa.system.entry.js.map → p-5f92320e.system.entry.js.map} +0 -0
  591. /package/dist/verdocs-web-sdk/{p-eceed44b.entry.js.map → p-61f66f45.entry.js.map} +0 -0
  592. /package/dist/verdocs-web-sdk/{p-0af6c4f0.system.entry.js.map → p-629301d3.system.entry.js.map} +0 -0
  593. /package/dist/verdocs-web-sdk/{p-992d4116.system.entry.js.map → p-6379773e.system.entry.js.map} +0 -0
  594. /package/dist/verdocs-web-sdk/{p-1ed16766.entry.js.map → p-66144da6.entry.js.map} +0 -0
  595. /package/dist/verdocs-web-sdk/{p-1929a794.system.entry.js.map → p-66375e80.system.entry.js.map} +0 -0
  596. /package/dist/verdocs-web-sdk/{p-0638a269.entry.js.map → p-665748fe.entry.js.map} +0 -0
  597. /package/dist/verdocs-web-sdk/{p-7de7cb5b.entry.js.map → p-67ccf629.entry.js.map} +0 -0
  598. /package/dist/verdocs-web-sdk/{p-edab1fed.system.entry.js.map → p-6af0110a.system.entry.js.map} +0 -0
  599. /package/dist/verdocs-web-sdk/{p-60812b90.entry.js.map → p-79fdd519.entry.js.map} +0 -0
  600. /package/dist/verdocs-web-sdk/{p-2c25292b.entry.js.map → p-7e1f895c.entry.js.map} +0 -0
  601. /package/dist/verdocs-web-sdk/{p-f10199fe.system.entry.js.map → p-83d23528.system.entry.js.map} +0 -0
  602. /package/dist/verdocs-web-sdk/{p-2584c2b2.system.entry.js.map → p-869024e0.system.entry.js.map} +0 -0
  603. /package/dist/verdocs-web-sdk/{p-2d72560a.entry.js.map → p-871792ab.entry.js.map} +0 -0
  604. /package/dist/verdocs-web-sdk/{p-d7284af0.entry.js.map → p-8f50f83f.entry.js.map} +0 -0
  605. /package/dist/verdocs-web-sdk/{p-83a863b1.system.entry.js.map → p-97fcac5e.system.entry.js.map} +0 -0
  606. /package/dist/verdocs-web-sdk/{p-e632e92c.entry.js.map → p-9c481477.entry.js.map} +0 -0
  607. /package/dist/verdocs-web-sdk/{p-682c5a5c.entry.js.map → p-9c9d49cd.entry.js.map} +0 -0
  608. /package/dist/verdocs-web-sdk/{p-fd59f055.system.entry.js.map → p-9cae97dc.system.entry.js.map} +0 -0
  609. /package/dist/verdocs-web-sdk/{p-cfac9703.system.entry.js.map → p-9f65fa0d.system.entry.js.map} +0 -0
  610. /package/dist/verdocs-web-sdk/{p-aa3b0fb7.system.entry.js.map → p-a06772cc.system.entry.js.map} +0 -0
  611. /package/dist/verdocs-web-sdk/{p-df2a1bd4.system.entry.js.map → p-a65e1762.system.entry.js.map} +0 -0
  612. /package/dist/verdocs-web-sdk/{p-88ccf564.system.entry.js.map → p-abe7c086.system.entry.js.map} +0 -0
  613. /package/dist/verdocs-web-sdk/{p-297d1631.system.entry.js.map → p-b3ac740e.system.entry.js.map} +0 -0
  614. /package/dist/verdocs-web-sdk/{p-e1bf3431.system.entry.js.map → p-b5572507.system.entry.js.map} +0 -0
  615. /package/dist/verdocs-web-sdk/{p-d3b798ae.system.entry.js.map → p-b73405ad.system.entry.js.map} +0 -0
  616. /package/dist/verdocs-web-sdk/{p-6754dfcf.system.entry.js.map → p-c45927e3.system.entry.js.map} +0 -0
  617. /package/dist/verdocs-web-sdk/{p-33cfc977.system.entry.js.map → p-c5d0abe5.system.entry.js.map} +0 -0
  618. /package/dist/verdocs-web-sdk/{p-f2876180.entry.js.map → p-c6f52cd7.entry.js.map} +0 -0
  619. /package/dist/verdocs-web-sdk/{p-1827477d.system.entry.js.map → p-c72daca8.system.entry.js.map} +0 -0
  620. /package/dist/verdocs-web-sdk/{p-1258cb3f.system.entry.js.map → p-cfc2d31b.system.entry.js.map} +0 -0
  621. /package/dist/verdocs-web-sdk/{p-d0e8419b.entry.js.map → p-d06d9cfd.entry.js.map} +0 -0
  622. /package/dist/verdocs-web-sdk/{p-b0aafc0a.entry.js.map → p-d26c81ec.entry.js.map} +0 -0
  623. /package/dist/verdocs-web-sdk/{p-2e76c944.entry.js.map → p-d9e8be34.entry.js.map} +0 -0
  624. /package/dist/verdocs-web-sdk/{p-143c6b5c.entry.js.map → p-df1262b2.entry.js.map} +0 -0
  625. /package/dist/verdocs-web-sdk/{p-40f5ecf3.system.entry.js.map → p-e2acf751.system.entry.js.map} +0 -0
  626. /package/dist/verdocs-web-sdk/{p-226be1fc.entry.js.map → p-e50ec253.entry.js.map} +0 -0
  627. /package/dist/verdocs-web-sdk/{p-ed953cca.entry.js.map → p-eccd653b.entry.js.map} +0 -0
  628. /package/dist/verdocs-web-sdk/{p-9624aa95.entry.js.map → p-f0e794bc.entry.js.map} +0 -0
  629. /package/dist/verdocs-web-sdk/{p-a90b623c.entry.js.map → p-f12fcb84.entry.js.map} +0 -0
  630. /package/dist/verdocs-web-sdk/{p-1f1fc6d7.entry.js.map → p-f32fde74.entry.js.map} +0 -0
  631. /package/dist/verdocs-web-sdk/{p-842c345c.entry.js.map → p-f60672f5.entry.js.map} +0 -0
  632. /package/dist/verdocs-web-sdk/{p-11c3e5bb.entry.js.map → p-f9ef8d34.entry.js.map} +0 -0
  633. /package/dist/verdocs-web-sdk/{p-c5b70927.system.entry.js.map → p-fafc51b9.system.entry.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=a(0),s["throw"]=a(1),s["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(a){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++){if(i||!(r in t)){if(!i)i=Array.prototype.slice.call(t,0,r);i[r]=t[r]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,g as getElement}from"./index-CjTHbolG.js";import{i as interact}from"./interact.min-BepJAdBZ.js";import{VerdocsEndpoint,getTemplate,integerSequence,getOrganizationContacts,isValidEmail,createEnvelope,formatFullName,getRGBA,createTemplateDocument,deleteTemplateDocument,updateField,createField,updateTemplateRole,createTemplateRole}from"@verdocs/js-sdk";import{a as renderDocumentField,g as getFieldId,h as updateCssTransform,i as removeCssTransform,j as setControlStyles,d as defaultHeight,k as defaultWidth}from"./utils-D9l-GFdv.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-C7hFgM52.js";import{D as DefaultEndpoint}from"./Environment-C_Xku1v2.js";import{V as VerdocsToast}from"./Toast-D97GxsI-.js";import{a as DocIcon,P as PngIcon,J as JpgIcon,b as PdfIcon,F as FileIcon,c as PageCountIcon,T as TrashIcon,D as DocumentPageIcon}from"./Icons-BU5rnXp2.js";import"./_commonjsHelpers-BFTU3MAI.js";import"./index-BglCURB-.js";import"./Types-CIxfEdV7.js";var verdocsPreviewCss=function(){return'verdocs-preview{font-family:var(--verdocs-primary-font, "Inter", "Barlow", 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}'};var VerdocsPreview=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.templateListenerId=null;this.renderedPages={};this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.loading=true;this.template=null}e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.onTemplateIdChanged=function(e){console.log("[PREVIEW] Template ID changed",e);this.listenToTemplate()};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(r){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[PREVIEW] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[PREVIEW] Missing required template ID ".concat(this.templateId));return[2]}this.listenToTemplate()}catch(r){console.log("[PREVIEW] Error with preview session",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.componentDidRender=function(){var e;(e=this.hostEl)===null||e===void 0?void 0:e.querySelectorAll(".verdocs-field").forEach((function(e){interact(e).unset()}))};e.prototype.handlePageRendered=function(e){var t;var n=e.detail;this.renderedPages["".concat(n.documentId,":").concat(n.pageNumber)]=n;var r=(((t=this.template)===null||t===void 0?void 0:t.fields)||[]).filter((function(e){if(e["document_id"]){return e["document_id"]===n.documentId&&e.page===n.pageNumber}return e.page===n.pageNumber}));r.forEach((function(e){return renderDocumentField("template",e,n,{disabled:true,editable:false,draggable:false})}))};e.prototype.render=function(){var e=this;var t;if(this.loading){return h(Host,null,h("verdocs-loader",null))}return h(Host,null,(((t=this.template)===null||t===void 0?void 0:t.documents)||[]).map((function(t){var n=integerSequence(1,t.pages);return h(Fragment,null,n.map((function(n){var r;var o=((r=t.page_sizes)===null||r===void 0?void 0:r[n])||{width:612,height:792};return h("verdocs-template-document-page",{templateId:t.template_id,documentId:t.id,pageNumber:n,disabled:true,editable:false,done:false,virtualWidth:o.width,virtualHeight:o.height,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))})))};Object.defineProperty(e.prototype,"hostEl",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{templateId:[{onTemplateIdChanged:0}]}},enumerable:false,configurable:true});return e}();VerdocsPreview.style=verdocsPreviewCss();var getRoleNames=function(e){return((e===null||e===void 0?void 0:e.roles)||[]).map((function(e){return e.name}))};var getRoleIndex=function(e,t){return Math.max(getRoleNames(e).findIndex((function(e){return e===t})),0)};var verdocsSendCss=function(){return'verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}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 rgba(151, 151, 151, 0.2666666667)}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:rgba(0, 0, 0, 0.537254902)}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-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-send .buttons .error-message{width:100%;color:#cc0000;font-size:13px;margin-bottom:10px}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)}'};var editIcon='<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>';var startIcon='<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>';var stepIcon='<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>';var doneIcon='<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>';var VerdocsSend=function(){function e(e){registerInstance(this,e);this.beforeSend=createEvent(this,"beforeSend");this.send=createEvent(this,"send");this.exit=createEvent(this,"exit");this.sdkError=createEvent(this,"sdkError");this.searchContacts=createEvent(this,"searchContacts");this.templateListenerId=null;this.endpoint=DefaultEndpoint;this.templateId=null;this.environment="";this.showCancel=true;this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.showPickerForId="";this.sessionContacts=[];this.sending=false;this.rolesCompleted={};this.loading=true;this.template=null}e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){console.log("[SEND] Loading template",this.templateId);this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),true,(function(t){console.log("[SEND] Got new template",t);e.template=t;e.loading=false;e.rolesCompleted={};e.recomputeRolesCompleted()}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rolesCompleted={};return[2]}))}))};e.prototype.onTemplateIdChanged=function(e){console.log("[SEND] Template ID changed",e);this.listenToTemplate()};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;var r=this;return __generator(this,(function(o){try{this.endpoint.onSessionChanged((function(e,t,n){if(!n){return}var o={id:n.id,first_name:n.first_name,last_name:n.last_name,email:n.email,phone:n.phone};if(n){r.sessionContacts=[o];getOrganizationContacts(r.endpoint).then((function(e){console.log("[SEND] Got contacts",e);r.sessionContacts=__spreadArray(__spreadArray([],e,true),[o],false)})).catch((function(e){console.log("[SEND] Error getting contacts",e)}))}}));this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SEND] Unable to start Send operation, must be authenticated");return[2]}if(!this.templateId){console.log("[SEND] Missing required template ID ".concat(this.templateId));return[2]}this.listenToTemplate()}catch(r){console.log("[SEND] Error with send session",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.recomputeRolesCompleted=function(){var e=this;var t;this.rolesCompleted={};var n={};(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).forEach((function(t){var r=t.sequence;n[r]||(n[r]=[]);var o="r-".concat(r,"-").concat(n[r].length);n[r].push(__assign(__assign({},t),{id:o,role_name:t.name,first_name:t.first_name,last_name:t.last_name}));if(t.first_name&&isValidEmail(t.email)){e.rolesCompleted[o]=__assign(__assign({},t),{id:o,role_name:t.name,first_name:t.first_name,last_name:t.last_name})}}))};e.prototype.getSequenceNumbers=function(){var e;var t={};(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).forEach((function(e){t[e.sequence]=true}));return Object.keys(t).map((function(e){return+e})).sort((function(e,t){return e-t}))};e.prototype.getRolesAtLevel=function(e){var t;var n=(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).filter((function(t){return t.sequence===e})).map((function(t,n){return __assign(__assign({},t),{id:"r-".concat(e,"-").concat(n),role_name:t.name,first_name:t.first_name,last_name:t.last_name})}));return n};e.prototype.getLevelIcon=function(e){if(e==="start"){return h("div",{class:"level-icon",innerHTML:startIcon})}else if(e==="end"){return h("div",{class:"level-icon",innerHTML:doneIcon})}else{return h("div",{class:"level-icon",innerHTML:stepIcon})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.rolesCompleted[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t=this;var n;if(this.sending){console.log("[SEND] Skipping duplicate send",e);return}console.log("[SEND] Sending",e);e.preventDefault();e.stopPropagation();this.sending=true;var r=Intl.DateTimeFormat().resolvedOptions();var o={template_id:this.templateId,name:((n=this.template)===null||n===void 0?void 0:n.name)||"New Envelope",environment:this.environment,initial_reminder:0,followup_reminders:0,recipients:Object.values(this.rolesCompleted),timezone:r.timeZone,locale:r.locale};var i=this.beforeSend.emit(__assign(__assign({},o),{name:o.name,template:this.template}));if(i.defaultPrevented){console.log("[SEND] Send cancelled by parent",o);this.sending=false;return}console.log("[SEND] Creating envelope",o);createEnvelope(this.endpoint,o).then((function(e){var n;console.log("[SEND] Send envelope",e);t.reset().catch((function(e){return console.log("Unknown Error",e)}));t.sending=false;(n=t.send)===null||n===void 0?void 0:n.emit(__assign(__assign({},o),{name:o.name,envelope_id:e.id,envelope:e}))})).catch((function(e){var n,r,o;console.log("[SEND] Send error",e);VerdocsToast(((r=(n=e.response)===null||n===void 0?void 0:n.data)===null||r===void 0?void 0:r.error)||"Error creating envelope, please try again later.");t.sending=false;(o=t.sdkError)===null||o===void 0?void 0:o.emit(e)}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(!this.endpoint.session){return h(Host,{style:{display:"flex"}},h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var n=this.getSequenceNumbers();var r=Object.values(this.rolesCompleted).filter((function(e){return isValidEmail(e.email)&&e.first_name&&e.last_name}));var o=r.length>=getRoleNames(this.template).length;var i=r.map((function(e){return e.email.toLowerCase()}));var s=new Set(i).size<i.length;return h(Host,{class:{sendable:(t=this.template)===null||t===void 0?void 0:t.is_sendable}},h("div",{class:"recipients"},h("div",{class:"left-line"}),h("div",{class:"level level-start"},this.getLevelIcon("start"),h("div",{class:"complete"},"Send Envelope")),n.map((function(t){return h("div",{class:"level level-".concat(t)},e.getLevelIcon("sequence"),e.getRolesAtLevel(t).map((function(t){var n,o,i;var s=!t.email||!t.first_name||!t.last_name;var a=((n=e.rolesCompleted[t.id])===null||n===void 0?void 0:n.first_name)?formatFullName(e.rolesCompleted[t.id]):s?t.role_name:formatFullName(t);var l="verdocs-send-recipient-".concat(t.role_name);var c=getRoleIndex(e.template,t.role_name);var d=getRGBA(c);var u=r.findIndex((function(e){return e.role_name===t.role_name}))>-1;var f={backgroundColor:d,border:u?"2px solid #55bc81":"2px solid #dddddd"};return s?h("div",{class:"recipient","data-ri":c,"data-rn":t.role_name,style:f,onClick:function(n){return e.handleClickRole(n,t)},id:l},a,h("div",{class:"icon",innerHTML:editIcon}),e.showPickerForId===t.id&&h("verdocs-portal",{anchor:l,onClickAway:function(){return e.showPickerForId=""}},h("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(n){return e.handleSelectContact(n,t)},contactSuggestions:e.sessionContacts,templateRole:(o=e.rolesCompleted[t.id])!==null&&o!==void 0?o:t,onSearchContacts:function(t){var n;return(n=e.searchContacts)===null||n===void 0?void 0:n.emit(t.detail)}}))):h("div",{class:"recipient","data-ri":c,"data-rn":t.role_name,style:f,onClick:function(n){return e.handleClickRole(n,t)},id:l},a,h("div",{class:"icon",innerHTML:editIcon}),e.showPickerForId===t.id&&h("verdocs-portal",{anchor:l,onClickAway:function(){return e.showPickerForId=""}},h("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(n){return e.handleSelectContact(n,t)},contactSuggestions:e.sessionContacts,templateRole:(i=e.rolesCompleted[t.id])!==null&&i!==void 0?i:t,onSearchContacts:function(t){var n;return(n=e.searchContacts)===null||n===void 0?void 0:n.emit(t.detail)}})))})))})),h("div",{class:"level level-done"},this.getLevelIcon("end"),h("div",{class:"complete"},"Signing Complete"))),h("div",{class:"buttons"},s&&h("div",{class:"error-message"},"Recipients cannot share the same email."),this.showCancel&&h("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)},disabled:this.sending}),h("verdocs-button",{label:"Send",size:"small",disabled:!o||this.sending||s,onClick:function(t){return e.handleSend(t)}}),this.sending&&h("verdocs-spinner",null)))};Object.defineProperty(e,"watchers",{get:function(){return{templateId:[{onTemplateIdChanged:0}]}},enumerable:false,configurable:true});return e}();VerdocsSend.style=verdocsSendCss();var verdocsTemplateAttachmentsCss=function(){return'verdocs-template-attachments{font-family:var(--verdocs-primary-font, "Inter", "Barlow", 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}'};var VerdocsTemplateAttachments=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit");this.next=createEvent(this,"next");this.templateUpdated=createEvent(this,"templateUpdated");this.sdkError=createEvent(this,"sdkError");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.uploading=false;this.progressLabel="Uploading...";this.progressPercent=0;this.showDeleteError=false;this.confirmDeleteDocument=null;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(r){try{this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}this.listenToTemplate()}catch(r){console.log("[TEMPLATE ATTACHMENTS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleUploadProgress=function(e){if(e>=99){this.progressPercent=100;this.progressLabel="Processing..."}else{this.progressPercent=e}};e.prototype.handleUpload=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,i,s,a,l;return __generator(this,(function(c){switch(c.label){case 0:e.stopPropagation();i=e.detail.file;if(!i){return[2]}console.log("[ATTACHMENTS] Uploading...",i);this.uploading=true;this.progressLabel="Uploading...";c.label=1;case 1:c.trys.push([1,4,,5]);return[4,createTemplateDocument(this.endpoint,this.templateId,i,this.handleUploadProgress.bind(this))];case 2:s=c.sent();console.log("[ATTACHMENTS] Created attachment",s);a=this;return[4,Store.getTemplate(this.endpoint,this.templateId,true)];case 3:a.template=c.sent();console.log("[ATTACHMENTS] Updated template",this.template);(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:this.template,event:"attachments"});this.uploading=false;this.progressLabel="";this.progressPercent=0;return[3,5];case 4:l=c.sent();console.log("[ATTACHMENTS] Error creating template",l);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(l.message,(r=l.response)===null||r===void 0?void 0:r.status,(o=l.response)===null||o===void 0?void 0:o.data));this.uploading=false;return[3,5];case 5:return[2]}}))}))};e.prototype.handleNext=function(e){var t;e.stopPropagation();this.uploading=false;this.progressLabel="";this.progressPercent=0;(t=this.next)===null||t===void 0?void 0:t.emit({template:this.template})};e.prototype.confirmDelete=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,deleteTemplateDocument(this.endpoint,this.confirmDeleteDocument.id)];case 1:t.sent();e=this;return[4,Store.getTemplate(this.endpoint,this.templateId,true)];case 2:e.template=t.sent();console.log("[ATTACHMENTS] New template",this.template);this.confirmDeleteDocument=null;return[2]}}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){if((((t=this.template)===null||t===void 0?void 0:t.documents)||[]).length>1){this.confirmDeleteDocument=e}else{this.showDeleteError=true}return[2]}))}))};e.prototype.getFileIcon=function(e){switch(e.mime){case"application/pdf":return PdfIcon;case"image/jpeg":return JpgIcon;case"image/png":return PngIcon;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return DocIcon}return FileIcon};e.prototype.render=function(){var e=this;var t,n;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(this.loading){return h(Host,{class:"loading"},h("verdocs-loader",null))}if(!this.endpoint.session||!this.template){return h(Host,{class:"empty"})}return h(Host,null,h("h5",null,"Existing Attachments"),h("div",{class:"attachments"},(((t=this.template)===null||t===void 0?void 0:t.documents)||[]).map((function(t){return h("div",{class:"attachment"},h("div",{class:"file-icon",innerHTML:e.getFileIcon(t)}),h("div",{class:"filename",title:t.name},t.name),h("div",{class:"pages"},h("div",{class:"count"},t.pages),h("div",{class:"pages-icon",innerHTML:PageCountIcon})),h("div",{class:"trash-icon",innerHTML:TrashIcon,onClick:function(){return e.handleDelete(t)}}))}))),h("h5",null,"Attach a New Document"),this.uploading?h("div",{class:"loader-wrapper"},h("verdocs-loader",null),this.progressLabel&&h("div",{class:"progress-wrapper"},h("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):h("verdocs-file-chooser",{onFileSelected:function(t){return e.handleUpload(t)}}),h("div",{class:"buttons"},h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.uploading}),h("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleNext(t)},disabled:!(((n=this.template)===null||n===void 0?void 0:n.documents)||[]).length||this.uploading})),this.showDeleteError&&h("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:function(){return e.showDeleteError=false}}),this.confirmDeleteDocument&&h("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:function(){return e.confirmDelete()},showCancel:true,onExit:function(){e.confirmDeleteDocument=null}}))};return e}();VerdocsTemplateAttachments.style=verdocsTemplateAttachmentsCss();var verdocsTemplateBuildTabsCss=function(){return'verdocs-template-build-tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;-ms-flex:0 0 50px;flex:0 0 50px;width:100%;background:#ffffff;color:#72757d;border-bottom:1px solid #dddddd;-webkit-filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-template-build-tabs .tab{position:relative;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:50px;padding:0 4px;background:#e7e7e7;font-weight:700;font-size:12px;cursor:pointer}@media (min-width: 768px){verdocs-template-build-tabs .tab{padding:0 8px 0 24px;font-size:14px}}verdocs-template-build-tabs .tab svg{position:absolute;top:0;right:-19px;z-index:10;pointer-events:none;display:none}@media (min-width: 768px){verdocs-template-build-tabs .tab svg{display:block}}verdocs-template-build-tabs .tab.active{background:#ffffff;color:#707ae5}verdocs-template-build-tabs .tab.disabled{cursor:default;color:#d1d5db}'};var VerdocsTemplateBuildTabs=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.stepChanged=createEvent(this,"stepChanged");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.onTemplateIdChanged=function(e){console.log("[BUILD_TABS] Template ID changed",e);this.listenToTemplate()};e.prototype.onStepChanged=function(e){console.log("[BUILD_TABS] Step changed",e)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(r){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){this.step="attachments";console.log("[BUILD_TABS] Missing required template ID, forcing view to attachments");return[2]}this.listenToTemplate()}catch(r){console.log("[BUILD_TABS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.handleSelect=function(e){var t;if(e.disabled||e.id===this.step){return}this.step=e.id;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e.id)};e.prototype.render=function(){var e=this;var t,n,r;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var o=(((t=this.template)===null||t===void 0?void 0:t.documents)||[]).length>0;var i=o&&(((n=this.template)===null||n===void 0?void 0:n.roles)||[]).length>0;var s=i&&(((r=this.template)===null||r===void 0?void 0:r.fields)||[]).length>0;var a=[{id:"attachments",label:"Attachments",disabled:false},{id:"roles",label:"Workflow",disabled:!o},{id:"fields",label:"Fields",disabled:!i},{id:"preview",label:"Preview & Send",disabled:!s}];return h(Host,null,a.map((function(t){var n=t.id===e.step;var r=["tab"];if(n)r.push("active");if(t.disabled)r.push("disabled");return h("div",{class:r.join(" "),onClick:function(){return e.handleSelect(t)}},h("span",null,t.label),h("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"19",height:"50",viewBox:"0 0 19 50"},h("polygon",{points:"0,0 19,25 0,50",fill:n?"#ffffff":"#e7e7e7"})))})))};Object.defineProperty(e,"watchers",{get:function(){return{templateId:[{onTemplateIdChanged:0}],step:[{onStepChanged:0}]}},enumerable:false,configurable:true});return e}();VerdocsTemplateBuildTabs.style=verdocsTemplateBuildTabsCss();var verdocsTemplateFieldsCss=function(){return"verdocs-template-fields{font-family:var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif);position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{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-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .pages .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#33364b;color:white;border-radius:6px;font-size:16px;font-weight:500;margin-top:20px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}verdocs-template-fields .pages .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-template-fields .pages .document-separator:first-child{margin-top:0}verdocs-template-fields #verdocs-template-fields-toolbar{width:100%;height:50px;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}@media all and (max-width: 1000px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;padding:0 10px 0 0}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}@media all and (max-width: 600px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-template-fields #verdocs-template-fields-toolbar .separator,verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}"};var iconTextbox='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var iconCheck='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';var iconRadio='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';var iconDatepicker='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';var iconSignature='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var iconInitial='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var iconDropdown='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';var iconAttachment='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13" /></svg>';var separator='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';var menuOptions=[{id:"signature",tooltip:"Signature",icon:iconSignature,class:"signature"},{id:"initial",tooltip:"Initials",icon:iconInitial,class:"initial"},{id:"sep1",tooltip:"",icon:separator,class:"separator"},{id:"textbox",tooltip:"Text Box",icon:iconTextbox,class:"textbox"},{id:"checkbox",tooltip:"Check Box",icon:iconCheck,class:"checkbox"},{id:"radio",tooltip:"Radio Button",icon:iconRadio,class:"radio"},{id:"dropdown",tooltip:"Dropdown",icon:iconDropdown,class:"dropdown"},{id:"sep2",tooltip:"",icon:separator,class:"separator"},{id:"date",tooltip:"Date",icon:iconDatepicker,class:"date"},{id:"attachment",tooltip:"Attachment",icon:iconAttachment,class:"attachment"}];var VerdocsTemplateFields=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.templateUpdated=createEvent(this,"templateUpdated");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.showMustSelectRole=false;this.selectedRoleName="";this.loading=true;this.template=null;this.pageHeights={};this.cachedPageInfo={}}e.prototype.onTemplateIdChanged=function(){this.listenToTemplate()};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldSettingsChanged=function(){var e;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,template:this.template,event:"updated-field"})};e.prototype.handleFieldDeleted=function(){var e;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,template:this.template,event:"deleted-field"})};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(r){try{this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[FIELDS] Unable to start builder session, must be authenticated");return[2]}this.listenToTemplate()}catch(r){console.log("[FIELDS] Error with fields session",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.componentDidRender=function(){var e=this;interact.dynamicDrop(true);document.querySelectorAll(".verdocs-field").forEach((function(t){e.makeDraggable(t)}));var t=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var n=document.getElementById("verdocs-template-fields-toolbar");if(t&&n){n.remove();t.append(n)}};e.prototype.componentWillUpdate=function(){var e=this;var t,n;var r=__spreadArray([],((t=this.template)===null||t===void 0?void 0:t.roles)||[],true).sort((function(e,t){var n,r;return((n=e.sequence)!==null&&n!==void 0?n:0)-((r=t.sequence)!==null&&r!==void 0?r:0)}));if(!this.selectedRoleName||!r.find((function(t){return t&&t.name===e.selectedRoleName}))){this.selectedRoleName=((n=r[0])===null||n===void 0?void 0:n.name)||"";console.log("[FIELDS] Selected new role",this.selectedRoleName)}};e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){var n;console.log("Template updated");e.template=t;e.loading=false;if(!e.selectedRoleName){var r=__spreadArray([],t.roles||[],true).sort((function(e,t){var n,r;return((n=e.sequence)!==null&&n!==void 0?n:0)-((r=t.sequence)!==null&&r!==void 0?r:0)}));e.selectedRoleName=((n=r[0])===null||n===void 0?void 0:n.name)||""}}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handlePageRendered=function(e){var t=this;var n,r;var o,i;var s=e.detail;console.log("[FIELDS] Page rendered",s.documentId,s.pageNumber,s.xScale,s.yScale);(n=(o=this.cachedPageInfo)[i=s.documentId])!==null&&n!==void 0?n:o[i]={};this.cachedPageInfo[s.documentId][s.pageNumber]=s;this.pageHeights[s.pageNumber]=s.naturalHeight;(((r=this.template)===null||r===void 0?void 0:r.fields)||[]).filter((function(e){return e&&e.page===s.pageNumber})).forEach((function(e){var n=getFieldId(e);var r=document.getElementById(n);if(r){r.setAttribute("templateid",t.templateId);r.setAttribute("fieldname",e.name);r.setAttribute("documentid",String(e.document_id));r.setAttribute("pagenumber",String(e.page));r.setAttribute("xScale",String(s.xScale));r.setAttribute("yScale",String(s.yScale));t.makeDraggable(r)}}))};e.prototype.makeDraggable=function(e){interact(e).draggable({listeners:{move:this.handleMoveField.bind(this),end:this.handleMoveEnd.bind(this)}})};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,i,s;return __generator(this,(function(a){t=+(e.target.getAttribute("posX")||0);n=+(e.target.getAttribute("posY")||0);r=+(e.target.getAttribute("xScale")||1);o=+(e.target.getAttribute("yScale")||1);i=e.dx/r+t;s=e.dy/o+n;e.target.setAttribute("posX",i);e.target.setAttribute("posy",s);updateCssTransform(e.target,"translate","".concat(i,"px, ").concat(s,"px"));return[2]}))}))};e.prototype.handleMoveEnd=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,i,s,a,l,c,d,u,f,h,v,p,g,m,x,b,E,w,S,_,y,I,C,T,k,D,q,M,R,A,O,P,H,L,V,z,Z;return __generator(this,(function(j){switch(j.label){case 0:c=e.target.getAttribute("fieldname");d=(((t=this.template)===null||t===void 0?void 0:t.fields)||[]).find((function(e){return e.name===c}));if(!d){console.log("[FIELDS] Unable to find field",c,e.target);return[2]}u=e.target.getAttribute("pagenumber");f=e.target.getAttribute("documentid");h=this.cachedPageInfo[f][u],v=h.naturalWidth,p=v===void 0?612:v,g=h.naturalHeight,m=g===void 0?792:g,x=h.renderedHeight,b=x===void 0?792:x;E=e.target.getBoundingClientRect();w=e.target.parentElement;S=w.getBoundingClientRect();_=d.width||defaultWidth(d.type);y=d.height||defaultHeight(d.type);I=Math.max(E.left-S.left,0);C=Math.max(b-(S.bottom-E.bottom),0);T=parseInt(u);if(C>b){T=Math.min(T+1,((o=(r=((n=this.template)===null||n===void 0?void 0:n.documents)||[])===null||r===void 0?void 0:r[0])===null||o===void 0?void 0:o.pages)||1);C-=b;b=this.cachedPageInfo[f][T].renderedHeight;console.log("Next page",{newPageNumber:T,newY:C,renderedHeight:b})}else if(C<0){T=Math.max(T-1,1);b=this.cachedPageInfo[f][T].renderedHeight;C+=b;console.log("[FIELDS] Next page",{newPageNumber:T,newY:C,renderedHeight:b})}k=this.viewCoordinatesToPageCoordinates(I,C,f,u,p-_,m-y),D=k.x,q=k.y;j.label=1;case 1:j.trys.push([1,3,,4]);M={x:D,y:q,page:T};return[4,updateField(this.endpoint,this.templateId,c,M)];case 2:R=j.sent();console.log("[FIELDS] Updated",R);A=JSON.parse(JSON.stringify(this.template));O=A.fields.findIndex((function(e){return e.name===c}));if(O>-1){A.fields[O]=R}Store.updateTemplate(this.templateId,A);e.target.removeAttribute("posX");e.target.removeAttribute("posY");removeCssTransform(e.target);P=this.cachedPageInfo[f][u],H=P.xScale,L=H===void 0?1:H,V=P.yScale,z=V===void 0?1:V;setControlStyles(e.target,R,L,z);(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:A,event:"updated-field"});return[3,4];case 3:Z=j.sent();VerdocsToast("Error updating field, please try again later",{style:"error"});console.log("[FIELDS] Error updating field",Z);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new SDKError(Z.message,(a=Z.response)===null||a===void 0?void 0:a.status,(l=Z.response)===null||l===void 0?void 0:l.data));e.target.removeAttribute("posX");e.target.removeAttribute("posY");removeCssTransform(e.target);return[3,4];case 4:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var n;var r=1;var o;do{o="".concat(e,"P").concat(t,"-").concat(r);r++}while((((n=this.template)===null||n===void 0?void 0:n.fields)||[]).some((function(e){return e&&e.name===o})));return o};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,n,r,o,i){var s=this.cachedPageInfo[n][r],a=s.xScale,l=a===void 0?1:a,c=s.yScale,d=c===void 0?1:c,u=s.renderedHeight,f=u===void 0?792:u;var h=Math.floor(Math.min(e/l,o));var v=Math.floor(Math.min(Math.max(f-t,0)/d,i));return{x:h,y:v}};e.prototype.handleClickPage=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,o,i,s,a,l,c,d,u,f,h,v,p,g,m,x;return __generator(this,(function(b){switch(b.label){case 0:if(!this.placing)return[3,2];o=e.offsetX;i=e.offsetY;s=defaultWidth(this.placing);a=defaultHeight(this.placing);l=this.cachedPageInfo[t][n];c=l.naturalWidth,d=c===void 0?612:c,u=l.naturalHeight,f=u===void 0?792:u;h=this.viewCoordinatesToPageCoordinates(o,i,t,n,d-s,f-a);v=Math.floor(h.x);p=Math.floor(h.y);g={name:this.generateFieldName(this.placing,n),role_name:this.selectedRoleName,template_id:this.templateId,document_id:l.documentId,type:this.placing,required:this.placing!=="radio"&&this.placing!=="attachment"&&this.placing!=="checkbox",page:n,validator:null,label:null,default:null,placeholder:null,group:null,settings:{},x:v,y:p,width:s,height:a,multiline:false,readonly:false,options:this.placing==="radio"?[{id:"option-1",label:"Option 1"}]:[]};return[4,createField(this.endpoint,this.templateId,g)];case 1:m=b.sent();console.log("[FIELDS] Created field",m);x=JSON.parse(JSON.stringify(this.template));x.fields.push(m);Store.updateTemplate(this.templateId,x);(r=this.templateUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,template:x,event:"added-field"});this.placing=null;b.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;var n,r,o;console.log("Rendering");if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var i=__spreadArray([],((n=this.template)===null||n===void 0?void 0:n.roles)||[],true).sort((function(e,t){var n,r;return((n=e.sequence)!==null&&n!==void 0?n:0)-((r=t.sequence)!==null&&r!==void 0?r:0)}));var s=i.map((function(e){return{value:e.name,label:e.full_name?"".concat(e.name,": ").concat(e.full_name):e.name}}));return h(Host,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},onSubmit:function(){}},h("div",{id:"verdocs-template-fields-toolbar"},h("div",{class:"add-for"},"Add field:"),h("verdocs-select-input",{value:this.selectedRoleName,options:s,onInput:function(e){return t.selectedRoleName=e.target.value}}),menuOptions.map((function(e){return h("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,class:e.class,onClick:function(){if(e.tooltip){if(t.selectedRoleName){t.placing=e.id}else{t.showMustSelectRole=true}}}})}))),h("div",{class:"pages"},(((r=this.template)===null||r===void 0?void 0:r.documents)||[]).map((function(e){var n=integerSequence(1,e.pages);return n.map((function(n){var r;var o=e.page_sizes[n];return h(Fragment,null,((r=t.template)===null||r===void 0?void 0:r.documents.length)>1&&h("div",{class:"document-separator"},h("div",{innerHTML:DocumentPageIcon}),h("span",null,e.name)),h("verdocs-template-document-page",{templateId:t.templateId,documentId:e.id,pageNumber:n,virtualWidth:(o===null||o===void 0?void 0:o.width)||612,virtualHeight:(o===null||o===void 0?void 0:o.height)||792,disabled:true,editable:true,done:false,onClick:function(r){return t.handleClickPage(r,e.id,n)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))}))}))),this.showMustSelectRole&&h("verdocs-ok-dialog",{heading:"Unable to add field",message:(((o=this.template)===null||o===void 0?void 0:o.roles)||[]).length>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:function(){return t.showMustSelectRole=false}}))};Object.defineProperty(e,"watchers",{get:function(){return{templateId:[{onTemplateIdChanged:0}]}},enumerable:false,configurable:true});return e}();VerdocsTemplateFields.style=verdocsTemplateFieldsCss();
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=a(0),s["throw"]=a(1),s["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(a){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++){if(i||!(r in t)){if(!i)i=Array.prototype.slice.call(t,0,r);i[r]=t[r]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,g as getElement}from"./index-CjTHbolG.js";import{i as interact}from"./interact.min-BO_a_7pQ.js";import{VerdocsEndpoint,getTemplate,integerSequence,getOrganizationContacts,isValidEmail,createEnvelope,formatFullName,getRGBA,createTemplateDocument,deleteTemplateDocument,updateField,createField,updateTemplateRole,createTemplateRole}from"@verdocs/js-sdk";import{a as renderDocumentField,g as getFieldId,h as updateCssTransform,i as removeCssTransform,j as setControlStyles,d as defaultHeight,k as defaultWidth}from"./utils-Bh3zb1Xs.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-C7hFgM52.js";import{D as DefaultEndpoint}from"./Environment-29evahil.js";import{V as VerdocsToast}from"./Toast-D97GxsI-.js";import{a as DocIcon,P as PngIcon,J as JpgIcon,b as PdfIcon,F as FileIcon,c as PageCountIcon,T as TrashIcon,D as DocumentPageIcon}from"./Icons-BU5rnXp2.js";import"./_commonjsHelpers-B85MJLTf.js";import"./index-BglCURB-.js";import"./Types-CIxfEdV7.js";var verdocsPreviewCss=function(){return'verdocs-preview{font-family:var(--verdocs-primary-font, "Inter", "Barlow", 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}'};var VerdocsPreview=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.templateListenerId=null;this.renderedPages={};this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.loading=true;this.template=null}e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.onTemplateIdChanged=function(e){console.log("[PREVIEW] Template ID changed",e);this.listenToTemplate()};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(r){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[PREVIEW] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[PREVIEW] Missing required template ID ".concat(this.templateId));return[2]}this.listenToTemplate()}catch(r){console.log("[PREVIEW] Error with preview session",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.componentDidRender=function(){var e;(e=this.hostEl)===null||e===void 0?void 0:e.querySelectorAll(".verdocs-field").forEach((function(e){interact(e).unset()}))};e.prototype.handlePageRendered=function(e){var t;var n=e.detail;this.renderedPages["".concat(n.documentId,":").concat(n.pageNumber)]=n;var r=(((t=this.template)===null||t===void 0?void 0:t.fields)||[]).filter((function(e){if(e["document_id"]){return e["document_id"]===n.documentId&&e.page===n.pageNumber}return e.page===n.pageNumber}));r.forEach((function(e){return renderDocumentField("template",e,n,{disabled:true,editable:false,draggable:false})}))};e.prototype.render=function(){var e=this;var t;if(this.loading){return h(Host,null,h("verdocs-loader",null))}return h(Host,null,(((t=this.template)===null||t===void 0?void 0:t.documents)||[]).map((function(t){var n=integerSequence(1,t.pages);return h(Fragment,null,n.map((function(n){var r;var o=((r=t.page_sizes)===null||r===void 0?void 0:r[n])||{width:612,height:792};return h("verdocs-template-document-page",{templateId:t.template_id,documentId:t.id,pageNumber:n,disabled:true,editable:false,done:false,virtualWidth:o.width,virtualHeight:o.height,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))})))};Object.defineProperty(e.prototype,"hostEl",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{templateId:[{onTemplateIdChanged:0}]}},enumerable:false,configurable:true});return e}();VerdocsPreview.style=verdocsPreviewCss();var getRoleNames=function(e){return((e===null||e===void 0?void 0:e.roles)||[]).map((function(e){return e.name}))};var getRoleIndex=function(e,t){return Math.max(getRoleNames(e).findIndex((function(e){return e===t})),0)};var verdocsSendCss=function(){return'verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}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 rgba(151, 151, 151, 0.2666666667)}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:rgba(0, 0, 0, 0.537254902)}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-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-send .buttons .error-message{width:100%;color:#cc0000;font-size:13px;margin-bottom:10px}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)}'};var editIcon='<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>';var startIcon='<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>';var stepIcon='<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>';var doneIcon='<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>';var VerdocsSend=function(){function e(e){registerInstance(this,e);this.beforeSend=createEvent(this,"beforeSend");this.send=createEvent(this,"send");this.exit=createEvent(this,"exit");this.sdkError=createEvent(this,"sdkError");this.searchContacts=createEvent(this,"searchContacts");this.templateListenerId=null;this.endpoint=DefaultEndpoint;this.templateId=null;this.environment="";this.showCancel=true;this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.showPickerForId="";this.sessionContacts=[];this.sending=false;this.rolesCompleted={};this.loading=true;this.template=null}e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){console.log("[SEND] Loading template",this.templateId);this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),true,(function(t){console.log("[SEND] Got new template",t);e.template=t;e.loading=false;e.rolesCompleted={};e.recomputeRolesCompleted()}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rolesCompleted={};return[2]}))}))};e.prototype.onTemplateIdChanged=function(e){console.log("[SEND] Template ID changed",e);this.listenToTemplate()};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;var r=this;return __generator(this,(function(o){try{this.endpoint.onSessionChanged((function(e,t,n){if(!n){return}var o={id:n.id,first_name:n.first_name,last_name:n.last_name,email:n.email,phone:n.phone};if(n){r.sessionContacts=[o];getOrganizationContacts(r.endpoint).then((function(e){console.log("[SEND] Got contacts",e);r.sessionContacts=__spreadArray(__spreadArray([],e,true),[o],false)})).catch((function(e){console.log("[SEND] Error getting contacts",e)}))}}));this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SEND] Unable to start Send operation, must be authenticated");return[2]}if(!this.templateId){console.log("[SEND] Missing required template ID ".concat(this.templateId));return[2]}this.listenToTemplate()}catch(r){console.log("[SEND] Error with send session",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.recomputeRolesCompleted=function(){var e=this;var t;this.rolesCompleted={};var n={};(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).forEach((function(t){var r=t.sequence;n[r]||(n[r]=[]);var o="r-".concat(r,"-").concat(n[r].length);n[r].push(__assign(__assign({},t),{id:o,role_name:t.name,first_name:t.first_name,last_name:t.last_name}));if(t.first_name&&isValidEmail(t.email)){e.rolesCompleted[o]=__assign(__assign({},t),{id:o,role_name:t.name,first_name:t.first_name,last_name:t.last_name})}}))};e.prototype.getSequenceNumbers=function(){var e;var t={};(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).forEach((function(e){t[e.sequence]=true}));return Object.keys(t).map((function(e){return+e})).sort((function(e,t){return e-t}))};e.prototype.getRolesAtLevel=function(e){var t;var n=(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).filter((function(t){return t.sequence===e})).map((function(t,n){return __assign(__assign({},t),{id:"r-".concat(e,"-").concat(n),role_name:t.name,first_name:t.first_name,last_name:t.last_name})}));return n};e.prototype.getLevelIcon=function(e){if(e==="start"){return h("div",{class:"level-icon",innerHTML:startIcon})}else if(e==="end"){return h("div",{class:"level-icon",innerHTML:doneIcon})}else{return h("div",{class:"level-icon",innerHTML:stepIcon})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.rolesCompleted[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t=this;var n;if(this.sending){console.log("[SEND] Skipping duplicate send",e);return}console.log("[SEND] Sending",e);e.preventDefault();e.stopPropagation();this.sending=true;var r=Intl.DateTimeFormat().resolvedOptions();var o={template_id:this.templateId,name:((n=this.template)===null||n===void 0?void 0:n.name)||"New Envelope",environment:this.environment,initial_reminder:0,followup_reminders:0,recipients:Object.values(this.rolesCompleted),timezone:r.timeZone,locale:r.locale};var i=this.beforeSend.emit(__assign(__assign({},o),{name:o.name,template:this.template}));if(i.defaultPrevented){console.log("[SEND] Send cancelled by parent",o);this.sending=false;return}console.log("[SEND] Creating envelope",o);createEnvelope(this.endpoint,o).then((function(e){var n;console.log("[SEND] Send envelope",e);t.reset().catch((function(e){return console.log("Unknown Error",e)}));t.sending=false;(n=t.send)===null||n===void 0?void 0:n.emit(__assign(__assign({},o),{name:o.name,envelope_id:e.id,envelope:e}))})).catch((function(e){var n,r,o;console.log("[SEND] Send error",e);VerdocsToast(((r=(n=e.response)===null||n===void 0?void 0:n.data)===null||r===void 0?void 0:r.error)||"Error creating envelope, please try again later.");t.sending=false;(o=t.sdkError)===null||o===void 0?void 0:o.emit(e)}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(!this.endpoint.session){return h(Host,{style:{display:"flex"}},h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var n=this.getSequenceNumbers();var r=Object.values(this.rolesCompleted).filter((function(e){return isValidEmail(e.email)&&e.first_name&&e.last_name}));var o=r.length>=getRoleNames(this.template).length;var i=r.map((function(e){return e.email.toLowerCase()}));var s=new Set(i).size<i.length;return h(Host,{class:{sendable:(t=this.template)===null||t===void 0?void 0:t.is_sendable}},h("div",{class:"recipients"},h("div",{class:"left-line"}),h("div",{class:"level level-start"},this.getLevelIcon("start"),h("div",{class:"complete"},"Send Envelope")),n.map((function(t){return h("div",{class:"level level-".concat(t)},e.getLevelIcon("sequence"),e.getRolesAtLevel(t).map((function(t){var n,o,i;var s=!t.email||!t.first_name||!t.last_name;var a=((n=e.rolesCompleted[t.id])===null||n===void 0?void 0:n.first_name)?formatFullName(e.rolesCompleted[t.id]):s?t.role_name:formatFullName(t);var l="verdocs-send-recipient-".concat(t.role_name);var c=getRoleIndex(e.template,t.role_name);var d=getRGBA(c);var u=r.findIndex((function(e){return e.role_name===t.role_name}))>-1;var f={backgroundColor:d,border:u?"2px solid #55bc81":"2px solid #dddddd"};return s?h("div",{class:"recipient","data-ri":c,"data-rn":t.role_name,style:f,onClick:function(n){return e.handleClickRole(n,t)},id:l},a,h("div",{class:"icon",innerHTML:editIcon}),e.showPickerForId===t.id&&h("verdocs-portal",{anchor:l,onClickAway:function(){return e.showPickerForId=""}},h("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(n){return e.handleSelectContact(n,t)},contactSuggestions:e.sessionContacts,templateRole:(o=e.rolesCompleted[t.id])!==null&&o!==void 0?o:t,onSearchContacts:function(t){var n;return(n=e.searchContacts)===null||n===void 0?void 0:n.emit(t.detail)}}))):h("div",{class:"recipient","data-ri":c,"data-rn":t.role_name,style:f,onClick:function(n){return e.handleClickRole(n,t)},id:l},a,h("div",{class:"icon",innerHTML:editIcon}),e.showPickerForId===t.id&&h("verdocs-portal",{anchor:l,onClickAway:function(){return e.showPickerForId=""}},h("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(n){return e.handleSelectContact(n,t)},contactSuggestions:e.sessionContacts,templateRole:(i=e.rolesCompleted[t.id])!==null&&i!==void 0?i:t,onSearchContacts:function(t){var n;return(n=e.searchContacts)===null||n===void 0?void 0:n.emit(t.detail)}})))})))})),h("div",{class:"level level-done"},this.getLevelIcon("end"),h("div",{class:"complete"},"Signing Complete"))),h("div",{class:"buttons"},s&&h("div",{class:"error-message"},"Recipients cannot share the same email."),this.showCancel&&h("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)},disabled:this.sending}),h("verdocs-button",{label:"Send",size:"small",disabled:!o||this.sending||s,onClick:function(t){return e.handleSend(t)}}),this.sending&&h("verdocs-spinner",null)))};Object.defineProperty(e,"watchers",{get:function(){return{templateId:[{onTemplateIdChanged:0}]}},enumerable:false,configurable:true});return e}();VerdocsSend.style=verdocsSendCss();var verdocsTemplateAttachmentsCss=function(){return'verdocs-template-attachments{font-family:var(--verdocs-primary-font, "Inter", "Barlow", 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}'};var VerdocsTemplateAttachments=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit");this.next=createEvent(this,"next");this.templateUpdated=createEvent(this,"templateUpdated");this.sdkError=createEvent(this,"sdkError");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.uploading=false;this.progressLabel="Uploading...";this.progressPercent=0;this.showDeleteError=false;this.confirmDeleteDocument=null;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(r){try{this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}this.listenToTemplate()}catch(r){console.log("[TEMPLATE ATTACHMENTS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleUploadProgress=function(e){if(e>=99){this.progressPercent=100;this.progressLabel="Processing..."}else{this.progressPercent=e}};e.prototype.handleUpload=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,i,s,a,l;return __generator(this,(function(c){switch(c.label){case 0:e.stopPropagation();i=e.detail.file;if(!i){return[2]}console.log("[ATTACHMENTS] Uploading...",i);this.uploading=true;this.progressLabel="Uploading...";c.label=1;case 1:c.trys.push([1,4,,5]);return[4,createTemplateDocument(this.endpoint,this.templateId,i,this.handleUploadProgress.bind(this))];case 2:s=c.sent();console.log("[ATTACHMENTS] Created attachment",s);a=this;return[4,Store.getTemplate(this.endpoint,this.templateId,true)];case 3:a.template=c.sent();console.log("[ATTACHMENTS] Updated template",this.template);(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:this.template,event:"attachments"});this.uploading=false;this.progressLabel="";this.progressPercent=0;return[3,5];case 4:l=c.sent();console.log("[ATTACHMENTS] Error creating template",l);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(l.message,(r=l.response)===null||r===void 0?void 0:r.status,(o=l.response)===null||o===void 0?void 0:o.data));this.uploading=false;return[3,5];case 5:return[2]}}))}))};e.prototype.handleNext=function(e){var t;e.stopPropagation();this.uploading=false;this.progressLabel="";this.progressPercent=0;(t=this.next)===null||t===void 0?void 0:t.emit({template:this.template})};e.prototype.confirmDelete=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,deleteTemplateDocument(this.endpoint,this.confirmDeleteDocument.id)];case 1:t.sent();e=this;return[4,Store.getTemplate(this.endpoint,this.templateId,true)];case 2:e.template=t.sent();console.log("[ATTACHMENTS] New template",this.template);this.confirmDeleteDocument=null;return[2]}}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){if((((t=this.template)===null||t===void 0?void 0:t.documents)||[]).length>1){this.confirmDeleteDocument=e}else{this.showDeleteError=true}return[2]}))}))};e.prototype.getFileIcon=function(e){switch(e.mime){case"application/pdf":return PdfIcon;case"image/jpeg":return JpgIcon;case"image/png":return PngIcon;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return DocIcon}return FileIcon};e.prototype.render=function(){var e=this;var t,n;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(this.loading){return h(Host,{class:"loading"},h("verdocs-loader",null))}if(!this.endpoint.session||!this.template){return h(Host,{class:"empty"})}return h(Host,null,h("h5",null,"Existing Attachments"),h("div",{class:"attachments"},(((t=this.template)===null||t===void 0?void 0:t.documents)||[]).map((function(t){return h("div",{class:"attachment"},h("div",{class:"file-icon",innerHTML:e.getFileIcon(t)}),h("div",{class:"filename",title:t.name},t.name),h("div",{class:"pages"},h("div",{class:"count"},t.pages),h("div",{class:"pages-icon",innerHTML:PageCountIcon})),h("div",{class:"trash-icon",innerHTML:TrashIcon,onClick:function(){return e.handleDelete(t)}}))}))),h("h5",null,"Attach a New Document"),this.uploading?h("div",{class:"loader-wrapper"},h("verdocs-loader",null),this.progressLabel&&h("div",{class:"progress-wrapper"},h("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):h("verdocs-file-chooser",{onFileSelected:function(t){return e.handleUpload(t)}}),h("div",{class:"buttons"},h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.uploading}),h("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleNext(t)},disabled:!(((n=this.template)===null||n===void 0?void 0:n.documents)||[]).length||this.uploading})),this.showDeleteError&&h("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:function(){return e.showDeleteError=false}}),this.confirmDeleteDocument&&h("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:function(){return e.confirmDelete()},showCancel:true,onExit:function(){e.confirmDeleteDocument=null}}))};return e}();VerdocsTemplateAttachments.style=verdocsTemplateAttachmentsCss();var verdocsTemplateBuildTabsCss=function(){return'verdocs-template-build-tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;-ms-flex:0 0 50px;flex:0 0 50px;width:100%;background:#ffffff;color:#72757d;border-bottom:1px solid #dddddd;-webkit-filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-template-build-tabs .tab{position:relative;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:50px;padding:0 4px;background:#e7e7e7;font-weight:700;font-size:12px;cursor:pointer}@media (min-width: 768px){verdocs-template-build-tabs .tab{padding:0 8px 0 24px;font-size:14px}}verdocs-template-build-tabs .tab svg{position:absolute;top:0;right:-19px;z-index:10;pointer-events:none;display:none}@media (min-width: 768px){verdocs-template-build-tabs .tab svg{display:block}}verdocs-template-build-tabs .tab.active{background:#ffffff;color:#707ae5}verdocs-template-build-tabs .tab.disabled{cursor:default;color:#d1d5db}'};var VerdocsTemplateBuildTabs=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.stepChanged=createEvent(this,"stepChanged");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.onTemplateIdChanged=function(e){console.log("[BUILD_TABS] Template ID changed",e);this.listenToTemplate()};e.prototype.onStepChanged=function(e){console.log("[BUILD_TABS] Step changed",e)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(r){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){this.step="attachments";console.log("[BUILD_TABS] Missing required template ID, forcing view to attachments");return[2]}this.listenToTemplate()}catch(r){console.log("[BUILD_TABS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.handleSelect=function(e){var t;if(e.disabled||e.id===this.step){return}this.step=e.id;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e.id)};e.prototype.render=function(){var e=this;var t,n,r;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var o=(((t=this.template)===null||t===void 0?void 0:t.documents)||[]).length>0;var i=o&&(((n=this.template)===null||n===void 0?void 0:n.roles)||[]).length>0;var s=i&&(((r=this.template)===null||r===void 0?void 0:r.fields)||[]).length>0;var a=[{id:"attachments",label:"Attachments",disabled:false},{id:"roles",label:"Workflow",disabled:!o},{id:"fields",label:"Fields",disabled:!i},{id:"preview",label:"Preview & Send",disabled:!s}];return h(Host,null,a.map((function(t){var n=t.id===e.step;var r=["tab"];if(n)r.push("active");if(t.disabled)r.push("disabled");return h("div",{class:r.join(" "),onClick:function(){return e.handleSelect(t)}},h("span",null,t.label),h("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"19",height:"50",viewBox:"0 0 19 50"},h("polygon",{points:"0,0 19,25 0,50",fill:n?"#ffffff":"#e7e7e7"})))})))};Object.defineProperty(e,"watchers",{get:function(){return{templateId:[{onTemplateIdChanged:0}],step:[{onStepChanged:0}]}},enumerable:false,configurable:true});return e}();VerdocsTemplateBuildTabs.style=verdocsTemplateBuildTabsCss();var verdocsTemplateFieldsCss=function(){return"verdocs-template-fields{font-family:var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif);position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{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-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .pages .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#33364b;color:white;border-radius:6px;font-size:16px;font-weight:500;margin-top:20px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}verdocs-template-fields .pages .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-template-fields .pages .document-separator:first-child{margin-top:0}verdocs-template-fields #verdocs-template-fields-toolbar{width:100%;height:50px;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}@media all and (max-width: 1000px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;padding:0 10px 0 0}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}@media all and (max-width: 600px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-template-fields #verdocs-template-fields-toolbar .separator,verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}"};var iconTextbox='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var iconCheck='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';var iconRadio='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';var iconDatepicker='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';var iconSignature='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var iconInitial='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var iconDropdown='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';var iconAttachment='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13" /></svg>';var separator='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';var menuOptions=[{id:"signature",tooltip:"Signature",icon:iconSignature,class:"signature"},{id:"initial",tooltip:"Initials",icon:iconInitial,class:"initial"},{id:"sep1",tooltip:"",icon:separator,class:"separator"},{id:"textbox",tooltip:"Text Box",icon:iconTextbox,class:"textbox"},{id:"checkbox",tooltip:"Check Box",icon:iconCheck,class:"checkbox"},{id:"radio",tooltip:"Radio Button",icon:iconRadio,class:"radio"},{id:"dropdown",tooltip:"Dropdown",icon:iconDropdown,class:"dropdown"},{id:"sep2",tooltip:"",icon:separator,class:"separator"},{id:"date",tooltip:"Date",icon:iconDatepicker,class:"date"},{id:"attachment",tooltip:"Attachment",icon:iconAttachment,class:"attachment"}];var VerdocsTemplateFields=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.templateUpdated=createEvent(this,"templateUpdated");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.showMustSelectRole=false;this.selectedRoleName="";this.loading=true;this.template=null;this.pageHeights={};this.cachedPageInfo={}}e.prototype.onTemplateIdChanged=function(){this.listenToTemplate()};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldSettingsChanged=function(){var e;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,template:this.template,event:"updated-field"})};e.prototype.handleFieldDeleted=function(){var e;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,template:this.template,event:"deleted-field"})};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(r){try{this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[FIELDS] Unable to start builder session, must be authenticated");return[2]}this.listenToTemplate()}catch(r){console.log("[FIELDS] Error with fields session",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.componentDidRender=function(){var e=this;interact.dynamicDrop(true);document.querySelectorAll(".verdocs-field").forEach((function(t){e.makeDraggable(t)}));var t=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var n=document.getElementById("verdocs-template-fields-toolbar");if(t&&n){n.remove();t.append(n)}};e.prototype.componentWillUpdate=function(){var e=this;var t,n;var r=__spreadArray([],((t=this.template)===null||t===void 0?void 0:t.roles)||[],true).sort((function(e,t){var n,r;return((n=e.sequence)!==null&&n!==void 0?n:0)-((r=t.sequence)!==null&&r!==void 0?r:0)}));if(!this.selectedRoleName||!r.find((function(t){return t&&t.name===e.selectedRoleName}))){this.selectedRoleName=((n=r[0])===null||n===void 0?void 0:n.name)||"";console.log("[FIELDS] Selected new role",this.selectedRoleName)}};e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){var n;console.log("Template updated");e.template=t;e.loading=false;if(!e.selectedRoleName){var r=__spreadArray([],t.roles||[],true).sort((function(e,t){var n,r;return((n=e.sequence)!==null&&n!==void 0?n:0)-((r=t.sequence)!==null&&r!==void 0?r:0)}));e.selectedRoleName=((n=r[0])===null||n===void 0?void 0:n.name)||""}}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handlePageRendered=function(e){var t=this;var n,r;var o,i;var s=e.detail;console.log("[FIELDS] Page rendered",s.documentId,s.pageNumber,s.xScale,s.yScale);(n=(o=this.cachedPageInfo)[i=s.documentId])!==null&&n!==void 0?n:o[i]={};this.cachedPageInfo[s.documentId][s.pageNumber]=s;this.pageHeights[s.pageNumber]=s.naturalHeight;(((r=this.template)===null||r===void 0?void 0:r.fields)||[]).filter((function(e){return e&&e.page===s.pageNumber})).forEach((function(e){var n=getFieldId(e);var r=document.getElementById(n);if(r){r.setAttribute("templateid",t.templateId);r.setAttribute("fieldname",e.name);r.setAttribute("documentid",String(e.document_id));r.setAttribute("pagenumber",String(e.page));r.setAttribute("xScale",String(s.xScale));r.setAttribute("yScale",String(s.yScale));t.makeDraggable(r)}}))};e.prototype.makeDraggable=function(e){interact(e).draggable({listeners:{move:this.handleMoveField.bind(this),end:this.handleMoveEnd.bind(this)}})};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,i,s;return __generator(this,(function(a){t=+(e.target.getAttribute("posX")||0);n=+(e.target.getAttribute("posY")||0);r=+(e.target.getAttribute("xScale")||1);o=+(e.target.getAttribute("yScale")||1);i=e.dx/r+t;s=e.dy/o+n;e.target.setAttribute("posX",i);e.target.setAttribute("posy",s);updateCssTransform(e.target,"translate","".concat(i,"px, ").concat(s,"px"));return[2]}))}))};e.prototype.handleMoveEnd=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,i,s,a,l,c,d,u,f,h,v,p,g,m,x,b,E,w,S,_,y,I,C,T,k,D,q,M,R,A,O,P,H,L,V,z,Z;return __generator(this,(function(j){switch(j.label){case 0:c=e.target.getAttribute("fieldname");d=(((t=this.template)===null||t===void 0?void 0:t.fields)||[]).find((function(e){return e.name===c}));if(!d){console.log("[FIELDS] Unable to find field",c,e.target);return[2]}u=e.target.getAttribute("pagenumber");f=e.target.getAttribute("documentid");h=this.cachedPageInfo[f][u],v=h.naturalWidth,p=v===void 0?612:v,g=h.naturalHeight,m=g===void 0?792:g,x=h.renderedHeight,b=x===void 0?792:x;E=e.target.getBoundingClientRect();w=e.target.parentElement;S=w.getBoundingClientRect();_=d.width||defaultWidth(d.type);y=d.height||defaultHeight(d.type);I=Math.max(E.left-S.left,0);C=Math.max(b-(S.bottom-E.bottom),0);T=parseInt(u);if(C>b){T=Math.min(T+1,((o=(r=((n=this.template)===null||n===void 0?void 0:n.documents)||[])===null||r===void 0?void 0:r[0])===null||o===void 0?void 0:o.pages)||1);C-=b;b=this.cachedPageInfo[f][T].renderedHeight;console.log("Next page",{newPageNumber:T,newY:C,renderedHeight:b})}else if(C<0){T=Math.max(T-1,1);b=this.cachedPageInfo[f][T].renderedHeight;C+=b;console.log("[FIELDS] Next page",{newPageNumber:T,newY:C,renderedHeight:b})}k=this.viewCoordinatesToPageCoordinates(I,C,f,u,p-_,m-y),D=k.x,q=k.y;j.label=1;case 1:j.trys.push([1,3,,4]);M={x:D,y:q,page:T};return[4,updateField(this.endpoint,this.templateId,c,M)];case 2:R=j.sent();console.log("[FIELDS] Updated",R);A=JSON.parse(JSON.stringify(this.template));O=A.fields.findIndex((function(e){return e.name===c}));if(O>-1){A.fields[O]=R}Store.updateTemplate(this.templateId,A);e.target.removeAttribute("posX");e.target.removeAttribute("posY");removeCssTransform(e.target);P=this.cachedPageInfo[f][u],H=P.xScale,L=H===void 0?1:H,V=P.yScale,z=V===void 0?1:V;setControlStyles(e.target,R,L,z);(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:A,event:"updated-field"});return[3,4];case 3:Z=j.sent();VerdocsToast("Error updating field, please try again later",{style:"error"});console.log("[FIELDS] Error updating field",Z);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new SDKError(Z.message,(a=Z.response)===null||a===void 0?void 0:a.status,(l=Z.response)===null||l===void 0?void 0:l.data));e.target.removeAttribute("posX");e.target.removeAttribute("posY");removeCssTransform(e.target);return[3,4];case 4:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var n;var r=1;var o;do{o="".concat(e,"P").concat(t,"-").concat(r);r++}while((((n=this.template)===null||n===void 0?void 0:n.fields)||[]).some((function(e){return e&&e.name===o})));return o};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,n,r,o,i){var s=this.cachedPageInfo[n][r],a=s.xScale,l=a===void 0?1:a,c=s.yScale,d=c===void 0?1:c,u=s.renderedHeight,f=u===void 0?792:u;var h=Math.floor(Math.min(e/l,o));var v=Math.floor(Math.min(Math.max(f-t,0)/d,i));return{x:h,y:v}};e.prototype.handleClickPage=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,o,i,s,a,l,c,d,u,f,h,v,p,g,m,x;return __generator(this,(function(b){switch(b.label){case 0:if(!this.placing)return[3,2];o=e.offsetX;i=e.offsetY;s=defaultWidth(this.placing);a=defaultHeight(this.placing);l=this.cachedPageInfo[t][n];c=l.naturalWidth,d=c===void 0?612:c,u=l.naturalHeight,f=u===void 0?792:u;h=this.viewCoordinatesToPageCoordinates(o,i,t,n,d-s,f-a);v=Math.floor(h.x);p=Math.floor(h.y);g={name:this.generateFieldName(this.placing,n),role_name:this.selectedRoleName,template_id:this.templateId,document_id:l.documentId,type:this.placing,required:this.placing!=="radio"&&this.placing!=="attachment"&&this.placing!=="checkbox",page:n,validator:null,label:null,default:null,placeholder:null,group:null,settings:{},x:v,y:p,width:s,height:a,multiline:false,readonly:false,options:this.placing==="radio"?[{id:"option-1",label:"Option 1"}]:[]};return[4,createField(this.endpoint,this.templateId,g)];case 1:m=b.sent();console.log("[FIELDS] Created field",m);x=JSON.parse(JSON.stringify(this.template));x.fields.push(m);Store.updateTemplate(this.templateId,x);(r=this.templateUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,template:x,event:"added-field"});this.placing=null;b.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;var n,r,o;console.log("Rendering");if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var i=__spreadArray([],((n=this.template)===null||n===void 0?void 0:n.roles)||[],true).sort((function(e,t){var n,r;return((n=e.sequence)!==null&&n!==void 0?n:0)-((r=t.sequence)!==null&&r!==void 0?r:0)}));var s=i.map((function(e){return{value:e.name,label:e.full_name?"".concat(e.name,": ").concat(e.full_name):e.name}}));return h(Host,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},onSubmit:function(){}},h("div",{id:"verdocs-template-fields-toolbar"},h("div",{class:"add-for"},"Add field:"),h("verdocs-select-input",{value:this.selectedRoleName,options:s,onInput:function(e){return t.selectedRoleName=e.target.value}}),menuOptions.map((function(e){return h("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,class:e.class,onClick:function(){if(e.tooltip){if(t.selectedRoleName){t.placing=e.id}else{t.showMustSelectRole=true}}}})}))),h("div",{class:"pages"},(((r=this.template)===null||r===void 0?void 0:r.documents)||[]).map((function(e){var n=integerSequence(1,e.pages);return n.map((function(n){var r;var o=e.page_sizes[n];return h(Fragment,null,((r=t.template)===null||r===void 0?void 0:r.documents.length)>1&&h("div",{class:"document-separator"},h("div",{innerHTML:DocumentPageIcon}),h("span",null,e.name)),h("verdocs-template-document-page",{templateId:t.templateId,documentId:e.id,pageNumber:n,virtualWidth:(o===null||o===void 0?void 0:o.width)||612,virtualHeight:(o===null||o===void 0?void 0:o.height)||792,disabled:true,editable:true,done:false,onClick:function(r){return t.handleClickPage(r,e.id,n)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))}))}))),this.showMustSelectRole&&h("verdocs-ok-dialog",{heading:"Unable to add field",message:(((o=this.template)===null||o===void 0?void 0:o.roles)||[]).length>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:function(){return t.showMustSelectRole=false}}))};Object.defineProperty(e,"watchers",{get:function(){return{templateId:[{onTemplateIdChanged:0}]}},enumerable:false,configurable:true});return e}();VerdocsTemplateFields.style=verdocsTemplateFieldsCss();
2
2
  /**!
3
3
  * Sortable 1.15.7
4
4
  * @author RubaXa <trash@rubaxa.org>
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,c as createEvent,h}from"./index-CjTHbolG.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";var verdocsQuickFunctionsCss=function(){return'verdocs-quick-functions{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}'};var DocumentIcon='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>';var TemplateIcon='<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>';var VerdocsQuickFunctions=function(){function e(e){registerInstance(this,e);this.createTemplate=createEvent(this,"createTemplate");this.createDocument=createEvent(this,"createDocument");this.endpoint=VerdocsEndpoint.getDefault()}e.prototype.handleCreateTemplate=function(){this.createTemplate.emit()};e.prototype.handleCreateDocument=function(){this.createDocument.emit()};e.prototype.render=function(){var e=this;return h("div",{key:"94b16b2b493647b77e5397227476bed8bae878bb",class:"container"},h("p",{key:"eb42b99fda2fd850e1dece61013f0366f7a2ffd0",class:"title"},"Quick Create"),h("button",{key:"602e51e8e73ff308c46785a1d22c1f61af2b04ca",onClick:function(){return e.handleCreateTemplate()},innerHTML:TemplateIcon},"Template"),h("button",{key:"b64dc770646621c16795ba35ee655403cfe05577",onClick:function(){return e.handleCreateDocument()},innerHTML:DocumentIcon},"Document"))};return e}();VerdocsQuickFunctions.style=verdocsQuickFunctionsCss();export{VerdocsQuickFunctions as verdocs_quick_functions};
1
+ import{r as registerInstance,c as createEvent,h}from"./index-CjTHbolG.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";var verdocsQuickFunctionsCss=function(){return'verdocs-quick-functions{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}'};var DocumentIcon='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>';var TemplateIcon='<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>';var VerdocsQuickFunctions=function(){function e(e){registerInstance(this,e);this.createTemplate=createEvent(this,"createTemplate");this.createDocument=createEvent(this,"createDocument");this.endpoint=VerdocsEndpoint.getDefault()}e.prototype.handleCreateTemplate=function(){this.createTemplate.emit()};e.prototype.handleCreateDocument=function(){this.createDocument.emit()};e.prototype.render=function(){var e=this;return h("div",{key:"3105c1e030e871a1708399307fcc09e3d6682c8f",class:"container"},h("p",{key:"9fe8c5a5ff7be7c76ab02aa830d77ebd989d1a90",class:"title"},"Quick Create"),h("button",{key:"5beefc8b1c58bdc295f24653d215c11c1c647f5b",onClick:function(){return e.handleCreateTemplate()},innerHTML:TemplateIcon},"Template"),h("button",{key:"e7c8c4e2afb5eacb0baebb84554dcd3b3fc5458a",onClick:function(){return e.handleCreateDocument()},innerHTML:DocumentIcon},"Document"))};return e}();VerdocsQuickFunctions.style=verdocsQuickFunctionsCss();export{VerdocsQuickFunctions as verdocs_quick_functions};
2
2
  //# sourceMappingURL=verdocs-quick-functions.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,h,H as Host}from"./index-CjTHbolG.js";var verdocsRadioButtonCss=function(){return'verdocs-radio-button{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);width:20px;height:20px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:100%}verdocs-radio-button.disabled{opacity:0.5}verdocs-radio-button input[type=radio]{position:absolute;opacity:0}verdocs-radio-button input[type=radio]+label:before{content:"";background:#f5f5fa;border-radius:100%;border:1px solid rgba(0, 0, 0, 0.6);display:inline-block;width:16px;height:16px;position:absolute;left:1px;top:1px;cursor:pointer;text-align:center;-webkit-transition:all 250ms ease;transition:all 250ms ease}verdocs-radio-button input[type=radio]:checked+label:before{background-color:#55bc81;-webkit-box-shadow:inset 0 0 0 2px #f5f5fa;box-shadow:inset 0 0 0 2px #f5f5fa}verdocs-radio-button input[type=radio]:focus+label:before{outline:none;border-color:#55bc81}verdocs-radio-button input[type=radio]:disabled+label:before{-webkit-box-shadow:inset 0 0 0 4px #f5f5fa;box-shadow:inset 0 0 0 4px #f5f5fa;border-color:#f3f3fc;background:#f3f3fc}verdocs-radio-button input[type=radio]+label:empty:before{margin-right:0}verdocs-radio-button.required input[type=radio]+label:before{border:1px solid #cc0000}verdocs-radio-button.hide{display:none}verdocs-radio-button.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}'};var VerdocsRadioButton=function(){function o(o){registerInstance(this,o);this.checked=false;this.name="";this.value="";this.disabled=false}o.prototype.render=function(){return h(Host,{key:"35b20ba083dfb9a04fb05dbb5740d93c490467cb",class:{disabled:this.disabled}},h("input",{key:"3453ba71e486b2782f172ba2db3ee11779f8604c",type:"radio",value:this.value,name:this.name,id:"verdocs-radio-button-".concat(this.name,"-").concat(this.value),checked:this.checked,disabled:this.disabled}),h("label",{key:"e4f0bd8386d761783ad548b4324a983726525542",htmlFor:"verdocs-radio-button-".concat(this.name,"-").concat(this.value)}))};return o}();VerdocsRadioButton.style=verdocsRadioButtonCss();export{VerdocsRadioButton as verdocs_radio_button};
1
+ import{r as registerInstance,h,H as Host}from"./index-CjTHbolG.js";var verdocsRadioButtonCss=function(){return'verdocs-radio-button{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);width:20px;height:20px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:100%}verdocs-radio-button.disabled{opacity:0.5}verdocs-radio-button input[type=radio]{position:absolute;opacity:0}verdocs-radio-button input[type=radio]+label:before{content:"";background:#f5f5fa;border-radius:100%;border:1px solid rgba(0, 0, 0, 0.6);display:inline-block;width:16px;height:16px;position:absolute;left:1px;top:1px;cursor:pointer;text-align:center;-webkit-transition:all 250ms ease;transition:all 250ms ease}verdocs-radio-button input[type=radio]:checked+label:before{background-color:#55bc81;-webkit-box-shadow:inset 0 0 0 2px #f5f5fa;box-shadow:inset 0 0 0 2px #f5f5fa}verdocs-radio-button input[type=radio]:focus+label:before{outline:none;border-color:#55bc81}verdocs-radio-button input[type=radio]:disabled+label:before{-webkit-box-shadow:inset 0 0 0 4px #f5f5fa;box-shadow:inset 0 0 0 4px #f5f5fa;border-color:#f3f3fc;background:#f3f3fc}verdocs-radio-button input[type=radio]+label:empty:before{margin-right:0}verdocs-radio-button.required input[type=radio]+label:before{border:1px solid #cc0000}verdocs-radio-button.hide{display:none}verdocs-radio-button.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}'};var VerdocsRadioButton=function(){function o(o){registerInstance(this,o);this.checked=false;this.name="";this.value="";this.disabled=false}o.prototype.render=function(){return h(Host,{key:"7e9bbed16fe3a07d442f7bd7914a7c9fbeb482e2",class:{disabled:this.disabled}},h("input",{key:"52701d1a04f0fd6b6c06a348f72559b6b6319054",type:"radio",value:this.value,name:this.name,id:"verdocs-radio-button-".concat(this.name,"-").concat(this.value),checked:this.checked,disabled:this.disabled}),h("label",{key:"ba49de718c824b19fafd79b6a772b32c836a005c",htmlFor:"verdocs-radio-button-".concat(this.name,"-").concat(this.value)}))};return o}();VerdocsRadioButton.style=verdocsRadioButtonCss();export{VerdocsRadioButton as verdocs_radio_button};
2
2
  //# sourceMappingURL=verdocs-radio-button.entry.js.map
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,t,n){function o(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,i){function c(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?t(e.value):o(e.value).then(c,s)}a((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,c=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return c.next=s(0),c["throw"]=s(1),c["return"]=s(2),typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function s(e){return function(r){return a([e,r])}}function a(s){if(n)throw new TypeError("Generator is already executing.");while(c&&(c=0,s[0]&&(t=0)),t)try{if(n=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;o=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1];i=s;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(s);break}if(i[2])t.ops.pop();t.trys.pop();continue}s=r.call(e,t)}catch(e){s=[6,e];o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h}from"./index-CjTHbolG.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";var verdocsSearchBoxCss=function(){return'verdocs-search-box{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}'};var SearchIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>';var CloseIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>';var VerdocsSearchBox=function(){function e(e){registerInstance(this,e);this.searchClicked=createEvent(this,"searchClicked");this.typeChanged=createEvent(this,"typeChanged");this.queryChanged=createEvent(this,"queryChanged");this.endpoint=VerdocsEndpoint.getDefault();this.placeholder="Search envelopes, templates, organizations...";this.type="all";this.query="";this.grabsFocus=false}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.inputEl.focus();return[2]}))}))};e.prototype.componentDidRender=function(){if(this.grabsFocus){this.inputEl.focus()}};e.prototype.handleSearch=function(e){this.searchClicked.emit({type:this.type,query:this.query});e.preventDefault();return false};e.prototype.handleChange=function(e){this.queryChanged.emit(e.target.value)};e.prototype.handleClearFilter=function(){this.typeChanged.emit("all")};e.prototype.handleKeyUp=function(e){if(e.key==="Enter"){this.searchClicked.emit({type:this.type,query:this.query})}};e.prototype.render=function(){var e=this;return h("form",{key:"55e7b1f9e5c4a6a7cdbd36afc97da09daab6ca8a",onSubmit:function(r){return e.handleSearch(r)}},this.type!==undefined&&this.type!=="all"&&h("span",{key:"bd7dd0612129534679702431caaaaea5fa442876",class:"type"},this.type,"s ",h("button",{key:"748f423a52005ffbde8787ef5ba3c55fd7977ed9",class:"remove",innerHTML:CloseIcon,onClick:function(){return e.handleClearFilter()}})),h("input",{key:"33101506a0b9bf26d4a1f40b1c6f78f6d89debdc",type:"text",value:this.query,placeholder:this.placeholder,onInput:function(r){return e.handleChange(r)},onKeyUp:function(r){return e.handleKeyUp(r)},ref:function(r){return e.inputEl=r}}),h("button",{key:"68bc2b8f11b1a7ce7addcf57fefdcd007073135c",onClick:function(r){return e.handleSearch(r)},class:"search"},h("span",{key:"bf086a3af2fc672424f62dcd7a8b7abab212241c",innerHTML:SearchIcon}),"Search"))};return e}();VerdocsSearchBox.style=verdocsSearchBoxCss();export{VerdocsSearchBox as verdocs_search_box};
1
+ var __awaiter=this&&this.__awaiter||function(e,r,t,n){function o(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,i){function c(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?t(e.value):o(e.value).then(c,s)}a((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,c=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return c.next=s(0),c["throw"]=s(1),c["return"]=s(2),typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function s(e){return function(r){return a([e,r])}}function a(s){if(n)throw new TypeError("Generator is already executing.");while(c&&(c=0,s[0]&&(t=0)),t)try{if(n=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;o=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1];i=s;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(s);break}if(i[2])t.ops.pop();t.trys.pop();continue}s=r.call(e,t)}catch(e){s=[6,e];o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h}from"./index-CjTHbolG.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";var verdocsSearchBoxCss=function(){return'verdocs-search-box{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}'};var SearchIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>';var CloseIcon='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>';var VerdocsSearchBox=function(){function e(e){registerInstance(this,e);this.searchClicked=createEvent(this,"searchClicked");this.typeChanged=createEvent(this,"typeChanged");this.queryChanged=createEvent(this,"queryChanged");this.endpoint=VerdocsEndpoint.getDefault();this.placeholder="Search envelopes, templates, organizations...";this.type="all";this.query="";this.grabsFocus=false}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.inputEl.focus();return[2]}))}))};e.prototype.componentDidRender=function(){if(this.grabsFocus){this.inputEl.focus()}};e.prototype.handleSearch=function(e){this.searchClicked.emit({type:this.type,query:this.query});e.preventDefault();return false};e.prototype.handleChange=function(e){this.queryChanged.emit(e.target.value)};e.prototype.handleClearFilter=function(){this.typeChanged.emit("all")};e.prototype.handleKeyUp=function(e){if(e.key==="Enter"){this.searchClicked.emit({type:this.type,query:this.query})}};e.prototype.render=function(){var e=this;return h("form",{key:"04600c8f163a1ec9e3608335749cbc71e0fe26ab",onSubmit:function(r){return e.handleSearch(r)}},this.type!==undefined&&this.type!=="all"&&h("span",{key:"03d4d4228516d03ce1feb1ddd867b2f307c0dad2",class:"type"},this.type,"s ",h("button",{key:"400c49c953b2f3ee69ea62aa068511f5770a339c",class:"remove",innerHTML:CloseIcon,onClick:function(){return e.handleClearFilter()}})),h("input",{key:"91dbcc6f22beacf9859be1bbf0a68c06af1ca04a",type:"text",value:this.query,placeholder:this.placeholder,onInput:function(r){return e.handleChange(r)},onKeyUp:function(r){return e.handleKeyUp(r)},ref:function(r){return e.inputEl=r}}),h("button",{key:"439f248c2a76f57e72dc8fb56162fd8e22b5281c",onClick:function(r){return e.handleSearch(r)},class:"search"},h("span",{key:"646080b9faa9c7af5b14d0ed8d5f5f13ffeaa218",innerHTML:SearchIcon}),"Search"))};return e}();VerdocsSearchBox.style=verdocsSearchBoxCss();export{VerdocsSearchBox as verdocs_search_box};
2
2
  //# sourceMappingURL=verdocs-search-box.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,h}from"./index-CjTHbolG.js";var verdocsSearchTabsCss=function(){return'verdocs-search-tabs{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:block}'};var VerdocsSearchTabs=function(){function r(r){registerInstance(this,r);this.selected="all"}r.prototype.render=function(){return h("div",{key:"41e102b159819e379c7d5acba227163528709e50"}," ")};return r}();VerdocsSearchTabs.style=verdocsSearchTabsCss();export{VerdocsSearchTabs as verdocs_search_tabs};
1
+ import{r as registerInstance,h}from"./index-CjTHbolG.js";var verdocsSearchTabsCss=function(){return'verdocs-search-tabs{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:block}'};var VerdocsSearchTabs=function(){function r(r){registerInstance(this,r);this.selected="all"}r.prototype.render=function(){return h("div",{key:"47559d52416a34751697d8813ace1471ff8fff29"}," ")};return r}();VerdocsSearchTabs.style=verdocsSearchTabsCss();export{VerdocsSearchTabs as verdocs_search_tabs};
2
2
  //# sourceMappingURL=verdocs-search-tabs.entry.js.map