@verdocs/web-sdk 2.2.25 → 2.2.28

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 (243) hide show
  1. package/dist/cjs/{EnvelopeStore-74bc60d0.js → EnvelopeStore-eda7addf.js} +1 -1
  2. package/dist/cjs/{Envelopes-49db8324.js → Envelopes-ef06e293.js} +12 -0
  3. package/dist/cjs/{TemplateStore-a5fa2b0c.js → TemplateStore-8bf09f12.js} +2 -3
  4. package/dist/cjs/{VerdocsEndpoint-45deeb6a.js → VerdocsEndpoint-a15d322b.js} +203 -35
  5. package/dist/cjs/ipc-test.cjs.entry.js +2 -3
  6. package/dist/cjs/{utils-010a1697.js → utils-06248dca.js} +1 -9
  7. package/dist/cjs/verdocs-activity-box.cjs.entry.js +2 -2
  8. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-build.cjs.entry.js +2 -3
  10. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +2 -3
  11. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +3 -3
  12. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +3 -3
  13. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +3 -3
  14. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +3 -3
  15. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +3 -3
  16. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +2 -2
  17. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -2
  18. package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -2
  19. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +2 -2
  20. package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -2
  21. package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -2
  22. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -2
  23. package/dist/cjs/verdocs-field-signature.cjs.entry.js +2 -2
  24. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +3 -3
  25. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -3
  26. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -2
  27. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  28. package/dist/cjs/verdocs-pagination_3.cjs.entry.js +2 -2
  29. package/dist/cjs/verdocs-preview_8.cjs.entry.js +7 -8
  30. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +2 -3
  31. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  32. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +3 -3
  33. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  34. package/dist/cjs/verdocs-sign.cjs.entry.js +3 -3
  35. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +3 -3
  36. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +5 -6
  37. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  38. package/dist/cjs/verdocs-templates-list.cjs.entry.js +3 -4
  39. package/dist/cjs/verdocs-view.cjs.entry.js +26 -19
  40. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +25 -18
  41. package/dist/components/EnvelopeStore.js +1 -1
  42. package/dist/components/Envelopes.js +12 -1
  43. package/dist/components/TemplateStore.js +1 -2
  44. package/dist/components/VerdocsEndpoint.js +198 -36
  45. package/dist/components/utils.js +2 -9
  46. package/dist/components/verdocs-search-activity2.js +1 -2
  47. package/dist/components/verdocs-template-create2.js +1 -2
  48. package/dist/components/verdocs-template-name2.js +1 -2
  49. package/dist/components/verdocs-template-sender2.js +1 -2
  50. package/dist/components/verdocs-template-visibility2.js +1 -2
  51. package/dist/components/verdocs-templates-list.js +1 -2
  52. package/dist/components/verdocs-view2.js +25 -18
  53. package/dist/custom-elements.json +2059 -0
  54. package/dist/docs.json +1 -1
  55. package/dist/esm/{EnvelopeStore-3ede5a1d.js → EnvelopeStore-03f3f9f4.js} +1 -1
  56. package/dist/esm/{Envelopes-9dcb88d1.js → Envelopes-7ba36e68.js} +12 -1
  57. package/dist/esm/{TemplateStore-e8cf5a15.js → TemplateStore-555a4b49.js} +1 -2
  58. package/dist/esm/{VerdocsEndpoint-d58d5544.js → VerdocsEndpoint-750b24e4.js} +198 -36
  59. package/dist/esm/ipc-test.entry.js +2 -3
  60. package/dist/esm/{utils-1a753ca5.js → utils-36e03f93.js} +2 -9
  61. package/dist/esm/verdocs-activity-box.entry.js +2 -2
  62. package/dist/esm/verdocs-auth.entry.js +1 -1
  63. package/dist/esm/verdocs-build.entry.js +2 -3
  64. package/dist/esm/verdocs-button-panel_2.entry.js +2 -3
  65. package/dist/esm/verdocs-contact-picker_2.entry.js +3 -3
  66. package/dist/esm/verdocs-envelope-document-page.entry.js +3 -3
  67. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +3 -3
  68. package/dist/esm/verdocs-envelope-sidebar.entry.js +3 -3
  69. package/dist/esm/verdocs-envelopes-list.entry.js +3 -3
  70. package/dist/esm/verdocs-field-attachment.entry.js +2 -2
  71. package/dist/esm/verdocs-field-checkbox.entry.js +2 -2
  72. package/dist/esm/verdocs-field-date.entry.js +2 -2
  73. package/dist/esm/verdocs-field-dropdown.entry.js +2 -2
  74. package/dist/esm/verdocs-field-initial.entry.js +2 -2
  75. package/dist/esm/verdocs-field-payment.entry.js +2 -2
  76. package/dist/esm/verdocs-field-radio-button.entry.js +2 -2
  77. package/dist/esm/verdocs-field-signature.entry.js +2 -2
  78. package/dist/esm/verdocs-field-textarea.entry.js +3 -3
  79. package/dist/esm/verdocs-field-textbox.entry.js +3 -3
  80. package/dist/esm/verdocs-field-timestamp.entry.js +2 -2
  81. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  82. package/dist/esm/verdocs-pagination_3.entry.js +2 -2
  83. package/dist/esm/verdocs-preview_8.entry.js +4 -5
  84. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -2
  85. package/dist/esm/verdocs-search.entry.js +1 -1
  86. package/dist/esm/verdocs-settings-api-keys_4.entry.js +3 -3
  87. package/dist/esm/verdocs-settings.entry.js +1 -1
  88. package/dist/esm/verdocs-sign.entry.js +3 -3
  89. package/dist/esm/verdocs-template-document-page_2.entry.js +3 -3
  90. package/dist/esm/verdocs-template-fields_4.entry.js +4 -5
  91. package/dist/esm/verdocs-template-star.entry.js +1 -1
  92. package/dist/esm/verdocs-templates-list.entry.js +1 -2
  93. package/dist/esm/verdocs-view.entry.js +26 -19
  94. package/dist/esm-es5/{EnvelopeStore-3ede5a1d.js → EnvelopeStore-03f3f9f4.js} +1 -1
  95. package/dist/esm-es5/Envelopes-7ba36e68.js +1 -0
  96. package/dist/esm-es5/TemplateStore-555a4b49.js +1 -0
  97. package/dist/esm-es5/VerdocsEndpoint-750b24e4.js +1 -0
  98. package/dist/esm-es5/ipc-test.entry.js +1 -1
  99. package/dist/esm-es5/{utils-1a753ca5.js → utils-36e03f93.js} +2 -2
  100. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  101. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  102. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  103. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  104. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  105. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  106. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  107. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  108. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  127. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  128. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  129. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  132. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  133. package/dist/verdocs-web-sdk/p-005f8cbc.system.entry.js +1 -0
  134. package/dist/verdocs-web-sdk/{p-24de06b4.system.entry.js → p-066822ff.system.entry.js} +1 -1
  135. package/dist/verdocs-web-sdk/{p-79b0c643.entry.js → p-07118e76.entry.js} +1 -1
  136. package/dist/verdocs-web-sdk/p-073fcf03.js +1 -0
  137. package/dist/verdocs-web-sdk/{p-6896477a.system.entry.js → p-1540e617.system.entry.js} +1 -1
  138. package/dist/verdocs-web-sdk/p-17479228.entry.js +1 -0
  139. package/dist/verdocs-web-sdk/{p-5079bd15.system.entry.js → p-185f5fa5.system.entry.js} +1 -1
  140. package/dist/verdocs-web-sdk/{p-402c3762.js → p-19b70691.js} +2 -2
  141. package/dist/verdocs-web-sdk/{p-b2c72f5a.entry.js → p-19e9660c.entry.js} +1 -1
  142. package/dist/verdocs-web-sdk/{p-64d4ada6.system.entry.js → p-1c70b492.system.entry.js} +1 -1
  143. package/dist/verdocs-web-sdk/{p-0b2102df.entry.js → p-1d52f0a4.entry.js} +1 -1
  144. package/dist/verdocs-web-sdk/{p-d9318890.entry.js → p-1db55e60.entry.js} +1 -1
  145. package/dist/verdocs-web-sdk/{p-9bbf0bc5.system.entry.js → p-1fd723e3.system.entry.js} +1 -1
  146. package/dist/verdocs-web-sdk/p-2174e539.js +1 -0
  147. package/dist/verdocs-web-sdk/p-24f0c391.system.js +1 -0
  148. package/dist/verdocs-web-sdk/{p-2b8493be.entry.js → p-25988bd7.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-7c7c56da.system.entry.js → p-264085f1.system.entry.js} +1 -1
  150. package/dist/verdocs-web-sdk/p-271dafb1.system.js +1 -0
  151. package/dist/verdocs-web-sdk/{p-6ba66b2c.system.entry.js → p-2727f8c1.system.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-143fc189.entry.js → p-28a4988e.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/{p-d4857f9e.system.entry.js → p-2f177d12.system.entry.js} +1 -1
  154. package/dist/verdocs-web-sdk/{p-84b2c661.entry.js → p-316dfb50.entry.js} +1 -1
  155. package/dist/verdocs-web-sdk/{p-248bbf52.entry.js → p-334a7cd0.entry.js} +1 -1
  156. package/dist/verdocs-web-sdk/{p-5cb5d39c.system.entry.js → p-341b83ab.system.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/{p-e092b25d.entry.js → p-354179b9.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-ae971bb4.system.entry.js → p-36e20c7d.system.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/{p-4f8a7884.system.entry.js → p-3c64c237.system.entry.js} +1 -1
  160. package/dist/verdocs-web-sdk/{p-66d45c89.system.js → p-3d20f09f.system.js} +2 -2
  161. package/dist/verdocs-web-sdk/{p-48f74a4f.system.entry.js → p-43226b70.system.entry.js} +1 -1
  162. package/dist/verdocs-web-sdk/{p-36ed1c79.entry.js → p-47ff8ea2.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/p-4918864e.entry.js +1 -0
  164. package/dist/verdocs-web-sdk/{p-eae47487.entry.js → p-4a371820.entry.js} +1 -1
  165. package/dist/verdocs-web-sdk/{p-c3ff8afd.system.js → p-4c0f38c5.system.js} +1 -1
  166. package/dist/verdocs-web-sdk/{p-bbbbddab.entry.js → p-4d2e73d9.entry.js} +1 -1
  167. package/dist/verdocs-web-sdk/{p-f5829c68.system.entry.js → p-4d8287cb.system.entry.js} +1 -1
  168. package/dist/verdocs-web-sdk/{p-99694a88.entry.js → p-4f6f538d.entry.js} +1 -1
  169. package/dist/verdocs-web-sdk/{p-2f3263a3.system.entry.js → p-57c09a21.system.entry.js} +1 -1
  170. package/dist/verdocs-web-sdk/p-58eb94ab.system.entry.js +1 -0
  171. package/dist/verdocs-web-sdk/p-604d7791.entry.js +1 -0
  172. package/dist/verdocs-web-sdk/p-6a5ef696.system.entry.js +1 -0
  173. package/dist/verdocs-web-sdk/{p-9ea2f211.system.entry.js → p-6f8eb3d7.system.entry.js} +1 -1
  174. package/dist/verdocs-web-sdk/{p-37e647a4.system.entry.js → p-7783d364.system.entry.js} +1 -1
  175. package/dist/verdocs-web-sdk/p-793b6a49.entry.js +1 -0
  176. package/dist/verdocs-web-sdk/p-84341e03.js +1 -0
  177. package/dist/verdocs-web-sdk/p-84b2f1f0.system.entry.js +1 -0
  178. package/dist/verdocs-web-sdk/{p-38891eeb.system.entry.js → p-84b84302.system.entry.js} +1 -1
  179. package/dist/verdocs-web-sdk/p-8e2b8c08.entry.js +1 -0
  180. package/dist/verdocs-web-sdk/{p-e16816bf.entry.js → p-96325d87.entry.js} +1 -1
  181. package/dist/verdocs-web-sdk/{p-3bf6619b.entry.js → p-9871a31d.entry.js} +1 -1
  182. package/dist/verdocs-web-sdk/{p-45bee3f6.system.entry.js → p-9b02abc9.system.entry.js} +1 -1
  183. package/dist/verdocs-web-sdk/{p-38aa6656.entry.js → p-9df48701.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/p-9e84991d.system.entry.js +1 -0
  185. package/dist/verdocs-web-sdk/p-a2a9d906.system.js +1 -0
  186. package/dist/verdocs-web-sdk/{p-64411279.entry.js → p-a3208fbe.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/{p-45343cef.system.entry.js → p-a6cbd0a4.system.entry.js} +1 -1
  188. package/dist/verdocs-web-sdk/{p-a881fe6b.js → p-adc052fa.js} +1 -1
  189. package/dist/verdocs-web-sdk/{p-9569539d.system.entry.js → p-af1c6957.system.entry.js} +1 -1
  190. package/dist/verdocs-web-sdk/{p-7516bd57.system.entry.js → p-b8266baf.system.entry.js} +1 -1
  191. package/dist/verdocs-web-sdk/{p-43231ac2.system.entry.js → p-ba50174c.system.entry.js} +1 -1
  192. package/dist/verdocs-web-sdk/{p-a5e3c8ee.entry.js → p-bd264e9b.entry.js} +1 -1
  193. package/dist/verdocs-web-sdk/{p-a28c7836.entry.js → p-c1164de2.entry.js} +1 -1
  194. package/dist/verdocs-web-sdk/{p-506754d5.system.entry.js → p-c3874a8d.system.entry.js} +1 -1
  195. package/dist/verdocs-web-sdk/{p-9009e136.entry.js → p-c4255966.entry.js} +1 -1
  196. package/dist/verdocs-web-sdk/{p-27a3d731.entry.js → p-ced58601.entry.js} +1 -1
  197. package/dist/verdocs-web-sdk/{p-6e62913f.entry.js → p-d477824e.entry.js} +1 -1
  198. package/dist/verdocs-web-sdk/{p-77ecee31.entry.js → p-d6588808.entry.js} +1 -1
  199. package/dist/verdocs-web-sdk/p-d96f37d0.system.entry.js +1 -0
  200. package/dist/verdocs-web-sdk/p-dca97ec0.entry.js +1 -0
  201. package/dist/verdocs-web-sdk/p-e40d07cd.entry.js +1 -0
  202. package/dist/verdocs-web-sdk/p-e491d531.entry.js +1 -0
  203. package/dist/verdocs-web-sdk/p-ed818dbd.system.entry.js +1 -0
  204. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  205. package/dist/verdocs-web-sdk/{p-f9e89b56.system.entry.js → p-f4e40ebd.system.entry.js} +1 -1
  206. package/dist/verdocs-web-sdk/{p-ceceebec.entry.js → p-f4eaffc6.entry.js} +1 -1
  207. package/dist/verdocs-web-sdk/{p-49042f24.system.entry.js → p-f5222669.system.entry.js} +1 -1
  208. package/dist/verdocs-web-sdk/{p-c82b9978.entry.js → p-f720f49e.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/{p-2284d430.system.entry.js → p-f7641208.system.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/{p-ab917e6a.entry.js → p-f8c3d844.entry.js} +1 -1
  211. package/dist/verdocs-web-sdk/{p-af3a01d5.system.entry.js → p-faae78ce.system.entry.js} +1 -1
  212. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  213. package/package.json +2 -2
  214. package/dist/cjs/Templates-f6e75719.js +0 -134
  215. package/dist/components/Templates.js +0 -127
  216. package/dist/esm/Templates-f90883f7.js +0 -127
  217. package/dist/esm-es5/Envelopes-9dcb88d1.js +0 -1
  218. package/dist/esm-es5/TemplateStore-e8cf5a15.js +0 -1
  219. package/dist/esm-es5/Templates-f90883f7.js +0 -1
  220. package/dist/esm-es5/VerdocsEndpoint-d58d5544.js +0 -1
  221. package/dist/verdocs-web-sdk/p-07f1748c.entry.js +0 -1
  222. package/dist/verdocs-web-sdk/p-15df3998.system.entry.js +0 -1
  223. package/dist/verdocs-web-sdk/p-1753f57b.system.js +0 -1
  224. package/dist/verdocs-web-sdk/p-1dda2d09.entry.js +0 -1
  225. package/dist/verdocs-web-sdk/p-2fdb7348.system.js +0 -1
  226. package/dist/verdocs-web-sdk/p-4017b53a.system.entry.js +0 -1
  227. package/dist/verdocs-web-sdk/p-41388344.system.entry.js +0 -1
  228. package/dist/verdocs-web-sdk/p-4422958b.system.js +0 -1
  229. package/dist/verdocs-web-sdk/p-51979353.entry.js +0 -1
  230. package/dist/verdocs-web-sdk/p-5ab837bf.entry.js +0 -1
  231. package/dist/verdocs-web-sdk/p-79f99e83.system.entry.js +0 -1
  232. package/dist/verdocs-web-sdk/p-7b6c0cc5.entry.js +0 -1
  233. package/dist/verdocs-web-sdk/p-976ec9e8.js +0 -1
  234. package/dist/verdocs-web-sdk/p-9caf7709.system.entry.js +0 -1
  235. package/dist/verdocs-web-sdk/p-a894761f.system.entry.js +0 -1
  236. package/dist/verdocs-web-sdk/p-af048fad.js +0 -1
  237. package/dist/verdocs-web-sdk/p-ba04698a.entry.js +0 -1
  238. package/dist/verdocs-web-sdk/p-be3e42bf.entry.js +0 -1
  239. package/dist/verdocs-web-sdk/p-ccb2c794.js +0 -1
  240. package/dist/verdocs-web-sdk/p-cd64b223.system.entry.js +0 -1
  241. package/dist/verdocs-web-sdk/p-d4d8858f.js +0 -1
  242. package/dist/verdocs-web-sdk/p-daebb9e6.system.js +0 -1
  243. package/dist/verdocs-web-sdk/p-f2deae25.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{d as t}from"./p-05788c2b.js";var e,n,r,o,i,s,u,c;!function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(e||(e={})),function(t){t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(n||(n={})),function(t){t.CREATOR="creator",t.ORGANIZATION_MEMBER="organization_member",t.ORGANIZATION_MEMBER_AS_CREATOR="organization_member_as_creator",t.EVERYONE="everyone",t.EVERYONE_AS_CREATOR="everyone_as_creator"}(r||(r={})),function(t){t.CREATE_PERSONAL="create_personal",t.CREATE_ORG="create_org",t.CREATE_PUBLIC="create_public",t.READ="read",t.WRITE="write",t.DELETE="delete",t.CHANGE_VISIBILITY_PERSONAL="change_visibility_personal",t.CHANGE_VISIBILITY_ORG="change_visibility_org",t.CHANGE_VISIBILITY_PUBLIC="change_visibility_public"}(o||(o={})),function(t){t.CREATED_AT="created_at",t.UPDATED_AT="updated_at",t.NAME="name",t.LAST_USED_AT="last_used_at",t.COUNTER="counter",t.STAR_COUNTER="star_counter"}(i||(i={})),function(t){t.RCOMMON="rcommon:access",t.RFORM_ACCESS="rform:access",t.ORG_CREATE="org:create",t.ORG_VIEW="org:view",t.ORG_UPDATE="org:update",t.ORG_DELETE="org:delete",t.ORG_TRANSFER="org:transfer",t.ORG_LIST="org:list",t.OWNER_ADD="owner:add",t.OWNER_REMOVE="owner:remove",t.ADMIN_ADD="admin:add",t.ADMIN_REMOVE="admin:remove",t.MEMBER_VIEW="member:view",t.MEMBER_ADD="member:add",t.MEMBER_REMOVE="member:remove",t.TEMPLATE_CREATOR_DELETE="template:creator:delete",t.TEMPLATE_CREATOR_VISIBILITY="template:creator:visibility",t.TEMPLATE_CREATOR_CREATE_ORG="template:creator:create:org",t.TEMPLATE_CREATOR_CREATE_PUBLIC="template:creator:create:public",t.TEMPLATE_CREATOR_CREATE_PERSONAL="template:creator:create:personal",t.TEMPLATE_MEMBER_READ="template:member:read",t.TEMPLATE_MEMBER_WRITE="template:member:write",t.TEMPLATE_MEMBER_DELETE="template:member:delete",t.TEMPLATE_MEMBER_VISIBILITY="template:member:visibility"}(s||(s={})),function(t){t.ENV_ESSENTIAL="env:essential",t.ORG_STANDARD="org:standard"}(u||(u={})),function(t){t.OWNER="owner",t.BASIC_USER="basic_user",t.MEMBER="member"}(c||(c={}));const a=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function l(t,e,n,r,o,i,s){try{var u=t[i](s),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function f(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){l(i,r,o,s,u,"next",t)}function u(t){l(i,r,o,s,u,"throw",t)}s(void 0)}))}}function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){return!t.response&&Boolean(t.code)&&"ECONNABORTED"!==t.code&&(t=>!a.has(t&&t.code))(t)}var b=["get","head","options"],E=b.concat(["put","delete"]);function w(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function _(t){return!!t.config&&w(t)&&-1!==E.indexOf(t.config.method)}function y(t){return p(t)||_(t)}function R(){return 0}function O(t){var e=t["axios-retry"]||{};return e.retryCount=e.retryCount||0,t["axios-retry"]=e,e}function g(){return(g=f((function*(t,e,n,r){var o=n.retryCount<t&&e(r);if("object"==typeof o)try{return!1!==(yield o)}catch(t){return!1}return o}))).apply(this,arguments)}function v(t,e){t.interceptors.request.use((t=>(O(t).lastRequestTime=Date.now(),t))),t.interceptors.response.use(null,function(){var n=f((function*(n){var{config:r}=n;if(!r)return Promise.reject(n);var{retries:o=3,retryCondition:i=y,retryDelay:s=R,shouldResetTimeout:u=!1,onRetry:c=(()=>{})}=function(t,e){return d(d({},e),t["axios-retry"])}(r,e),a=O(r);if(yield function(t,e,n,r){return g.apply(this,arguments)}(o,i,a,n)){a.retryCount+=1;var l=s(a.retryCount,n);if(function(t,e){t.defaults.agent===e.agent&&delete e.agent,t.defaults.httpAgent===e.httpAgent&&delete e.httpAgent,t.defaults.httpsAgent===e.httpsAgent&&delete e.httpsAgent}(t,r),!u&&r.timeout&&a.lastRequestTime){var f=Date.now()-a.lastRequestTime,h=r.timeout-f-l;if(h<=0)return Promise.reject(n);r.timeout=h}return r.transformRequest=[t=>t],c(a.retryCount,n,r),new Promise((e=>setTimeout((()=>e(t(r))),l)))}return Promise.reject(n)}));return function(t){return n.apply(this,arguments)}}())}function T(t,e){return function(){return t.apply(e,arguments)}}v.isNetworkError=p,v.isSafeRequestError=function(t){return!!t.config&&w(t)&&-1!==b.indexOf(t.config.method)},v.isIdempotentRequestError=_,v.isNetworkOrIdempotentRequestError=y,v.exponentialDelay=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=100*Math.pow(2,t),n=.2*e*Math.random();return e+n},v.isRetryableError=w;const{toString:S}=Object.prototype,{getPrototypeOf:A}=Object,N=(j=Object.create(null),t=>{const e=S.call(t);return j[e]||(j[e]=e.slice(8,-1).toLowerCase())});var j;const C=t=>(t=t.toLowerCase(),e=>N(e)===t),D=t=>e=>typeof e===t,{isArray:L}=Array,U=D("undefined"),P=C("ArrayBuffer"),I=D("string"),F=D("function"),B=D("number"),x=t=>null!==t&&"object"==typeof t,M=t=>{if("object"!==N(t))return!1;const e=A(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},H=C("Date"),q=C("File"),k=C("Blob"),z=C("FileList"),G=C("URLSearchParams");function J(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),L(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let s;for(r=0;r<i;r++)s=o[r],e.call(null,t[s],s,t)}}function K(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,X=t=>!U(t)&&t!==V,$=(Y="undefined"!=typeof Uint8Array&&A(Uint8Array),t=>Y&&t instanceof Y);var Y;const W=C("HTMLFormElement"),Z=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Q=C("RegExp"),tt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};J(n,((n,o)=>{!1!==e(n,o,t)&&(r[o]=n)})),Object.defineProperties(t,r)},et="abcdefghijklmnopqrstuvwxyz",nt={DIGIT:"0123456789",ALPHA:et,ALPHA_DIGIT:et+et.toUpperCase()+"0123456789"},rt=C("AsyncFunction"),ot={isArray:L,isArrayBuffer:P,isBuffer:function(t){return null!==t&&!U(t)&&null!==t.constructor&&!U(t.constructor)&&F(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||F(t.append)&&("formdata"===(e=N(t))||"object"===e&&F(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&P(t.buffer),e},isString:I,isNumber:B,isBoolean:t=>!0===t||!1===t,isObject:x,isPlainObject:M,isUndefined:U,isDate:H,isFile:q,isBlob:k,isRegExp:Q,isFunction:F,isStream:t=>x(t)&&F(t.pipe),isURLSearchParams:G,isTypedArray:$,isFileList:z,forEach:J,merge:function t(){const{caseless:e}=X(this)&&this||{},n={},r=(r,o)=>{const i=e&&K(n,o)||o;n[i]=M(n[i])&&M(r)?t(n[i],r):M(r)?t({},r):L(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&J(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(J(e,((e,r)=>{t[r]=n&&F(e)?T(e,n):e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,i,s;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],r&&!r(s,t,e)||u[s]||(e[s]=t[s],u[s]=!0);t=!1!==n&&A(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:N,kindOfTest:C,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length);const r=t.indexOf(e,n-=e.length);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(L(t))return t;let e=t.length;if(!B(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:W,hasOwnProperty:Z,hasOwnProp:Z,reduceDescriptors:tt,freezeMethods:t=>{tt(t,((e,n)=>{if(F(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;F(t[n])&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return L(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:K,global:V,isContextDefined:X,ALPHABET:nt,generateString:(t=16,e=nt.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&F(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(x(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=L(t)?[]:{};return J(t,((t,e)=>{const i=n(t,r+1);!U(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:rt,isThenable:t=>t&&(x(t)||F(t))&&F(t.then)&&F(t.catch)};function it(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}ot.inherits(it,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ot.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const st=it.prototype,ut={};function ct(t){return ot.isPlainObject(t)||ot.isArray(t)}function at(t){return ot.endsWith(t,"[]")?t.slice(0,-2):t}function lt(t,e,n){return t?t.concat(e).map((function(t,e){return t=at(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{ut[t]={value:t}})),Object.defineProperties(it,ut),Object.defineProperty(st,"isAxiosError",{value:!0}),it.from=(t,e,n,r,o,i)=>{const s=Object.create(st);return ot.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),it.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const ft=ot.toFlatObject(ot,{},null,(function(t){return/^is[A-Z]/.test(t)}));function ht(t,e,n){if(!ot.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=ot.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!ot.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ot.isSpecCompliantForm(e);if(!ot.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(ot.isDate(t))return t.toISOString();if(!u&&ot.isBlob(t))throw new it("Blob is not supported. Use a Buffer instead.");return ot.isArrayBuffer(t)||ot.isTypedArray(t)?u&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function a(t,n,o){let u=t;if(t&&!o&&"object"==typeof t)if(ot.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(ot.isArray(t)&&function(t){return ot.isArray(t)&&!t.some(ct)}(t)||(ot.isFileList(t)||ot.endsWith(n,"[]"))&&(u=ot.toArray(t)))return n=at(n),u.forEach((function(t,r){!ot.isUndefined(t)&&null!==t&&e.append(!0===s?lt([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!ct(t)||(e.append(lt(o,n,i),c(t)),!1)}const l=[],f=Object.assign(ft,{defaultVisitor:a,convertValue:c,isVisitable:ct});if(!ot.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!ot.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),ot.forEach(n,(function(n,i){!0===(!(ot.isUndefined(n)||null===n)&&o.call(e,n,ot.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function dt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function mt(t,e){this._pairs=[],t&&ht(t,this,e)}const pt=mt.prototype;function bt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Et(t,e,n){if(!e)return t;const r=n&&n.encode||bt,o=n&&n.serialize;let i;if(i=o?o(e,n):ot.isURLSearchParams(e)?e.toString():new mt(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}pt.append=function(t,e){this._pairs.push([t,e])},pt.toString=function(t){const e=t?function(e){return t.call(this,e,dt)}:dt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class wt{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ot.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const _t={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:mt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Rt(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&ot.isArray(r)?r.length:i,u?(r[i]=ot.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&ot.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&ot.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!s)}if(ot.isFormData(t)&&ot.isFunction(t.entries)){const n={};return ot.forEachEntry(t,((t,r)=>{e(function(t){return ot.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const Ot={"Content-Type":void 0},gt={transitional:_t,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=ot.isObject(t);if(o&&ot.isHTMLForm(t)&&(t=new FormData(t)),ot.isFormData(t))return r&&r?JSON.stringify(Rt(t)):t;if(ot.isArrayBuffer(t)||ot.isBuffer(t)||ot.isStream(t)||ot.isFile(t)||ot.isBlob(t))return t;if(ot.isArrayBufferView(t))return t.buffer;if(ot.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return ht(t,new yt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=ot.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return ht(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(ot.isString(t))try{return(0,JSON.parse)(t),ot.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||gt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&ot.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw it.from(t,it.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ot.forEach(["delete","get","head"],(function(t){gt.headers[t]={}})),ot.forEach(["post","put","patch"],(function(t){gt.headers[t]=ot.merge(Ot)}));const vt=ot.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Tt=Symbol("internals");function St(t){return t&&String(t).trim().toLowerCase()}function At(t){return!1===t||null==t?t:ot.isArray(t)?t.map(At):String(t)}function Nt(t,e,n,r,o){return ot.isFunction(r)?r.call(this,e,n):(o&&(e=n),ot.isString(e)?ot.isString(r)?-1!==e.indexOf(r):ot.isRegExp(r)?r.test(e):void 0:void 0)}class jt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=St(e);if(!o)throw new Error("header name must be a non-empty string");const i=ot.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=At(t))}const i=(t,e)=>ot.forEach(t,((t,n)=>o(t,n,e)));return ot.isPlainObject(t)||t instanceof this.constructor?i(t,e):ot.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&vt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=St(t)){const n=ot.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(ot.isFunction(e))return e.call(this,t,n);if(ot.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=St(t)){const n=ot.findKey(this,t);return!(!n||void 0===this[n]||e&&!Nt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=St(t)){const o=ot.findKey(n,t);!o||e&&!Nt(0,n[o],o,e)||(delete n[o],r=!0)}}return ot.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!Nt(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return ot.forEach(this,((r,o)=>{const i=ot.findKey(n,o);if(i)return e[i]=At(r),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete e[o],e[s]=At(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ot.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&ot.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Tt]=this[Tt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=St(t);e[r]||(function(t,e){const n=ot.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return ot.isArray(t)?t.forEach(r):r(t),this}}function Ct(t,e){const n=this||gt,r=e||n,o=jt.from(r.headers);let i=r.data;return ot.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Dt(t){return!(!t||!t.__CANCEL__)}function Lt(t,e,n){it.call(this,null==t?"canceled":t,it.ERR_CANCELED,e,n),this.name="CanceledError"}jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ot.freezeMethods(jt.prototype),ot.freezeMethods(jt),ot.inherits(Lt,it,{__CANCEL__:!0});const Ut=yt.isStandardBrowserEnv?{write:function(t,e,n,r,o,i){const s=[];s.push(t+"="+encodeURIComponent(e)),ot.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ot.isString(r)&&s.push("path="+r),ot.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Pt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const It=yt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=ot.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Ft(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(u){const c=Date.now(),a=r[s];o||(o=c),n[i]=u,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o<e)return;const h=a&&c-a;return h?Math.round(1e3*f/h):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,u=i-n,c=r(u);n=i;const a={loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};a[e?"download":"upload"]=!0,t(a)}}const Bt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=jt.from(t.headers).normalize(),i=t.responseType;let s;function u(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}ot.isFormData(r)&&(yt.isStandardBrowserEnv||yt.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const a=Pt(t.baseURL,t.url);function l(){if(!c)return;const r=jt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new it("Request failed with status code "+n.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),u()}),(function(t){n(t),u()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),Et(a,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new it("Request aborted",it.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new it("Network Error",it.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new it(e,(t.transitional||_t).clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,t,c)),c=null},yt.isStandardBrowserEnv){const e=(t.withCredentials||It(a))&&t.xsrfCookieName&&Ut.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&ot.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),ot.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&"json"!==i&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",Ft(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Ft(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{c&&(n(!e||e.type?new Lt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(a);f&&-1===yt.protocols.indexOf(f)?n(new it("Unsupported protocol "+f+":",it.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};ot.forEach(Bt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));function xt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Lt(null,t)}function Mt(t){return xt(t),t.headers=jt.from(t.headers),t.data=Ct.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),(t=>{t=ot.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;o<e&&(n=t[o],!(r=ot.isString(n)?Bt[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new it(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(ot.hasOwnProp(Bt,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!ot.isFunction(r))throw new TypeError("adapter is not a function");return r})(t.adapter||gt.adapter)(t).then((function(e){return xt(t),e.data=Ct.call(t,t.transformResponse,e),e.headers=jt.from(e.headers),e}),(function(e){return Dt(e)||(xt(t),e&&e.response&&(e.response.data=Ct.call(t,t.transformResponse,e.response),e.response.headers=jt.from(e.response.headers))),Promise.reject(e)}))}const Ht=t=>t instanceof jt?t.toJSON():t;function qt(t,e){e=e||{};const n={};function r(t,e,n){return ot.isPlainObject(t)&&ot.isPlainObject(e)?ot.merge.call({caseless:n},t,e):ot.isPlainObject(e)?ot.merge({},e):ot.isArray(e)?e.slice():e}function o(t,e,n){return ot.isUndefined(e)?ot.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!ot.isUndefined(e))return r(void 0,e)}function s(t,e){return ot.isUndefined(e)?ot.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function u(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(t,e)=>o(Ht(t),Ht(e),!0)};return ot.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);ot.isUndefined(s)&&i!==u||(n[r]=s)})),n}const kt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{kt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const zt={};kt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.4.0] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new it(r(o," has been removed"+(e?" in "+e:"")),it.ERR_DEPRECATED);return e&&!zt[o]&&(zt[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};const Gt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const e=t[i],n=void 0===e||s(e,i,t);if(!0!==n)throw new it("option "+i+" must be "+n,it.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new it("Unknown option "+i,it.ERR_BAD_OPTION)}},validators:kt},Jt=Gt.validators;class Kt{constructor(t){this.defaults=t,this.interceptors={request:new wt,response:new wt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=qt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;let i;void 0!==n&&Gt.assertOptions(n,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean)},!1),null!=r&&(ot.isFunction(r)?e.paramsSerializer={serialize:r}:Gt.assertOptions(r,{encode:Jt.function,serialize:Jt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&ot.merge(o.common,o[e.method]),i&&ot.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=jt.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(u=u&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const c=[];let a;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!u){const t=[Mt.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,c),l=t.length,a=Promise.resolve(e);f<l;)a=a.then(t[f++],t[f++]);return a}l=s.length;let h=e;for(f=0;f<l;){const t=s[f++],e=s[f++];try{h=t(h)}catch(t){e.call(this,t);break}}try{a=Mt.call(this,h)}catch(t){return Promise.reject(t)}for(f=0,l=c.length;f<l;)a=a.then(c[f++],c[f++]);return a}getUri(t){return Et(Pt((t=qt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}ot.forEach(["delete","get","head","options"],(function(t){Kt.prototype[t]=function(e,n){return this.request(qt(n||{},{method:t,url:e,data:(n||{}).data}))}})),ot.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(qt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Kt.prototype[t]=e(),Kt.prototype[t+"Form"]=e(!0)}));class Vt{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new Lt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Vt((function(e){t=e})),cancel:t}}}const Xt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xt).forEach((([t,e])=>{Xt[e]=t}));const $t=function t(e){const n=new Kt(e),r=T(Kt.prototype.request,n);return ot.extend(r,Kt.prototype,n,{allOwnKeys:!0}),ot.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(qt(e,n))},r}(gt);$t.Axios=Kt,$t.CanceledError=Lt,$t.CancelToken=Vt,$t.isCancel=Dt,$t.VERSION="1.4.0",$t.toFormData=ht,$t.AxiosError=it,$t.Cancel=$t.CanceledError,$t.all=function(t){return Promise.all(t)},$t.spread=function(t){return function(e){return t.apply(null,e)}},$t.isAxiosError=function(t){return ot.isObject(t)&&!0===t.isAxiosError},$t.mergeConfig=qt,$t.AxiosHeaders=jt,$t.formToJSON=t=>Rt(ot.isHTMLForm(t)?new FormData(t):t),$t.HttpStatusCode=Xt,$t.default=$t;var Yt=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},Wt=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return Yt()}try{return __global__||Yt()}finally{delete Object.prototype.__global__}}(),Zt=Symbol.for("verdocs-default-endpoint"),Qt=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},te=function(){function e(t){this.environment="verdocs",this.sessionType="user",this.baseURL="https://api.verdocs.com",this.baseURLv2="https://api-v2.verdocs.com",this.clientID="not-set",this.timeout=6e4,this.token=null,this.nextListenerId=0,this.sessionListeners=new Map,this.requestLoggerId=null,this.session=null,this.baseURL=(null==t?void 0:t.baseURL)||"https://api.verdocs.com",this.baseURLv2=(null==t?void 0:t.baseURLv2)||"https://api-v2.verdocs.com",this.timeout=(null==t?void 0:t.timeout)||6e4,this.environment=(null==t?void 0:t.environment)||"verdocs",this.sessionType=(null==t?void 0:t.sessionType)||"user",this.clientID=(null==t?void 0:t.clientID)||"not-set",this.api=$t.create({baseURL:this.baseURL,timeout:this.timeout}),v(this.api,{retries:0,retryDelay:v.exponentialDelay,onRetry:function(t,e,n){window.console.debug("[JS_SDK] Retrying request (".concat(t,")"),e.message,n.url)}})}return e.prototype.setDefault=function(){Wt[Zt]=this},e.getDefault=function(){return Wt[Zt]||(Wt[Zt]=new e,window.console.debug("[JS_SDK] Created default endpoint",Wt[Zt])),Wt[Zt]},e.prototype.getEnvironment=function(){return this.environment},e.prototype.getSessionType=function(){return this.sessionType},e.prototype.getBaseURL=function(){return this.baseURL},e.prototype.getBaseURLv2=function(){return this.baseURLv2},e.prototype.getClientID=function(){return this.clientID},e.prototype.getTimeout=function(){return this.timeout},e.prototype.getSession=function(){return this.session},e.prototype.setEnvironment=function(t){return this.environment=t,this},e.prototype.setSessionType=function(t){return this.sessionType=t,this},e.prototype.setBaseURL=function(t){return this.baseURL=t,this.api.defaults.baseURL=t,this},e.prototype.setBaseURLv2=function(t){return this.baseURLv2=t,this},e.prototype.setClientID=function(t){return this.clientID=t,this.api.defaults.headers.common["X-Client-ID"]=t,this},e.prototype.setTimeout=function(t){return this.timeout=t,this.api.defaults.timeout=t,this},e.prototype.logRequests=function(t){return t&&null===this.requestLoggerId?this.requestLoggerId=this.api.interceptors.request.use(Qt):t||null===this.requestLoggerId||this.api.interceptors.request.eject(this.requestLoggerId),this},e.prototype.setToken=function(e){if(!e)return this.clearSession();var n=t(e);return null===n||n.exp&&1e3*n.exp<(new Date).getTime()?(window.console.warn("[JS_SDK] Ignoring attempt to use expired session token"),this.clearSession()):(this.token=e,this.session=n,"user"===this.sessionType?this.api.defaults.headers.common.Authorization="Bearer ".concat(e):this.api.defaults.headers.common.signer="Bearer ".concat(e),localStorage.setItem(this.sessionStorageKey(),e),this.notifySessionListeners(),this)},e.prototype.getToken=function(){return this.token},e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())},e.prototype.clearSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,delete this.api.defaults.headers.common.signer,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.clearSignerSession=function(){return localStorage.removeItem(this.sessionStorageKey()),delete this.api.defaults.headers.common.Authorization,this.session=null,this.token=null,this.notifySessionListeners(),this},e.prototype.notifySessionListeners=function(){var t=this;this.sessionListeners.forEach((function(e){try{e(t,t.session)}catch(t){}}))},e.prototype.onSessionChanged=function(t){var e=this;this.nextListenerId++;var n=Symbol.for(""+this.nextListenerId);return this.sessionListeners.set(n,t),function(){e.sessionListeners.delete(n)}},e.prototype.loadSession=function(){var t=localStorage.getItem(this.sessionStorageKey());return t?this.setToken(t):this.clearSession()},e}();export{r as T,te as V,o as a}
@@ -1 +0,0 @@
1
- import{r as e,h as t,H as i,c as o,a as s}from"./p-14b44491.js";import{c as r}from"./p-7c0dcd00.js";import{a as l}from"./p-eab67c09.js";import"./p-05788c2b.js";import{V as n}from"./p-af048fad.js";import{u as d,d as a}from"./p-feb442b1.js";import{g as p}from"./p-d4d8858f.js";import{S as c}from"./p-7a1b2643.js";import"./p-7648c449.js";import"./p-976ec9e8.js";const h=class{constructor(t){e(this,t),this.showing=!1,this.icon=""}componentDidRender(){document.body.appendChild(this.panelEl),this.popperInstance&&this.popperInstance.destroy(),this.popperInstance=r(this.iconEl,this.panelEl,{})}disconnectedCallback(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null),this.panelEl&&this.panelEl.remove()}async showPanel(){var e,t;null===(e=this.panelEl)||void 0===e||e.setAttribute("data-show",""),null===(t=this.popperInstance)||void 0===t||t.update().catch((()=>{})),this.showing=!0,this.hiderEl=document.createElement("div"),this.hiderEl.id="verdocs-button-panel-hider",this.hiderEl.style.zIndex="100",this.hiderEl.style.position="absolute",this.hiderEl.style.top="0px",this.hiderEl.style.left="0px",this.hiderEl.style.right="0px",this.hiderEl.style.bottom="0px",this.hiderEl.onclick=e=>{e.stopPropagation(),this.toggle()},document.body.appendChild(this.hiderEl)}async hidePanel(){var e;Array.from(document.getElementsByClassName("verdocs-button-panel-content")).forEach((e=>{e.removeAttribute("data-show")})),null===(e=document.getElementById("verdocs-button-panel-hider"))||void 0===e||e.remove(),this.showing=!1}async toggle(){this.showing?await this.hidePanel():await this.showPanel()}render(){return t(i,null,t("div",{class:"icon",innerHTML:this.icon,onClick:e=>(e.stopPropagation(),this.toggle()),ref:e=>this.iconEl=e}),t("div",{role:"tooltip",class:"verdocs-button-panel-content","data-popper-placement":"bottom",ref:e=>this.panelEl=e},t("div",{"data-popper-arrow":"true",class:"arrow"}),t("slot",null)))}};var v;h.style='verdocs-button-panel{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-button-panel .icon{display:inline-block;cursor:pointer;opacity:0.6}verdocs-button-panel .icon svg{fill:#707ae5}verdocs-button-panel .icon:hover{opacity:1}.verdocs-button-panel-content{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;display:none;background:#ffffff;color:#33364b;width:320px;font-weight:bold;padding:15px;font-size:14px;position:relative;border-radius:4px;z-index:10000}.verdocs-button-panel-content .arrow,.verdocs-button-panel-content .arrow::before{position:absolute;width:8px;height:8px;background:inherit}.verdocs-button-panel-content .arrow{visibility:hidden;top:-4px}.verdocs-button-panel-content .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}.verdocs-button-panel-content[data-show]{display:block}.verdocs-button-panel-content[data-popper-placement^=top]>.arrow{bottom:-4px}.verdocs-button-panel-content[data-popper-placement^=bottom]>.arrow{top:-4px}.verdocs-button-panel-content[data-popper-placement^=left]>.arrow{right:-4px}.verdocs-button-panel-content[data-popper-placement^=right]>.arrow{left:-4px}.verdocs-button-panel-content h6{font-size:16px;font-weight:bold;margin:0 0 16px 0;color:#092c4c;border-bottom:1px solid #cccccc}';var u=void 0!==l&&(l.crypto||l.msCrypto);if(u&&u.getRandomValues){var f=new Uint8Array(16);v=function(){return u.getRandomValues(f),f}}if(!v){var m=new Array(16);v=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),m[t]=e>>>((3&t)<<3)&255;return m}}for(var x=v,b=[],g=0;g<256;++g)b[g]=(g+256).toString(16).substr(1);var w=function(e,t){var i=t||0;return b[e[i++]]+b[e[i++]]+b[e[i++]]+b[e[i++]]+"-"+b[e[i++]]+b[e[i++]]+"-"+b[e[i++]]+b[e[i++]]+"-"+b[e[i++]]+b[e[i++]]+"-"+b[e[i++]]+b[e[i++]]+b[e[i++]]+b[e[i++]]+b[e[i++]]+b[e[i++]]},y=x(),k=[1|y[0],y[1],y[2],y[3],y[4],y[5]],I=16383&(y[6]<<8|y[7]),q=0,E=0,T=function(e,t,i){var o=t&&i||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||x)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var r=0;r<16;++r)t[o+r]=s[r];return t||w(s)},R=T;R.v1=function(e,t,i){var o=t&&i||0,s=t||[],r=void 0!==(e=e||{}).clockseq?e.clockseq:I,l=void 0!==e.msecs?e.msecs:(new Date).getTime(),n=void 0!==e.nsecs?e.nsecs:E+1,d=l-q+(n-E)/1e4;if(d<0&&void 0===e.clockseq&&(r=r+1&16383),(d<0||l>q)&&void 0===e.nsecs&&(n=0),n>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");q=l,E=n,I=r;var a=(1e4*(268435455&(l+=122192928e5))+n)%4294967296;s[o++]=a>>>24&255,s[o++]=a>>>16&255,s[o++]=a>>>8&255,s[o++]=255&a;var p=l/4294967296*1e4&268435455;s[o++]=p>>>8&255,s[o++]=255&p,s[o++]=p>>>24&15|16,s[o++]=p>>>16&255,s[o++]=r>>>8|128,s[o++]=255&r;for(var c=e.node||k,h=0;h<6;++h)s[o+h]=c[h];return t||w(s)},R.v4=T;var C=R;const L=e=>e.charAt(0).toUpperCase()+e.slice(1),P='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>',j='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>',S=class{constructor(t){e(this,t),this.close=o(this,"close",7),this.delete=o(this,"delete",7),this.settingsChanged=o(this,"settingsChanged",7),this.sdkError=o(this,"sdkError",7),this.store=null,this.endpoint=n.getDefault(),this.templateId="",this.fieldName="",this.helpText="",this.dirty=!1,this.loading=!0,this.type="signature",this.setting=null,this.name="",this.roleName="",this.group="",this.fieldType="",this.required=!1,this.options=[],this.placeholder="",this.value="",this.leading=0,this.showingHelp=!1}async componentWillLoad(){var e,t,i,o,s,r,l,n,d;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELD PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.fieldName)return void console.error("[FIELD PROPERTIES] Missing required field name");if(!this.endpoint.session)return void console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");this.store=await p(this.endpoint,this.templateId,!1);const l=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.fields.find((e=>e.name===this.fieldName));l||console.log(`[FIELD PROPERTIES] Unable to find field "${this.fieldName}" in template`),this.type=l.type,this.name=l.name,this.group=l.name,this.roleName=l.role_name,this.required=l.required,this.fieldType=l.type,this.placeholder=(null===(i=l.setting)||void 0===i?void 0:i.placeholder)||"",this.value=(null===(o=l.setting)||void 0===o?void 0:o.result)||"",this.leading=(null===(s=l.setting)||void 0===s?void 0:s.leading)||0,this.setting=l.setting||{},this.options=(null===(r=l.setting)||void 0===r?void 0:r.options)||[],this.dirty=!1,this.loading=!1}catch(e){console.log("[FIELD PROPERTIES] Error loading template",e),this.loading=!1,null===(l=this.sdkError)||void 0===l||l.emit(new c(e.message,null===(n=e.response)||void 0===n?void 0:n.status,null===(d=e.response)||void 0===d?void 0:d.data))}}handleCancel(e){var t,i,o,s,r,l;e.stopPropagation();const n=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.fields.find((e=>e.name===this.fieldName));n&&(this.name=n.name,this.roleName=n.role_name,this.required=n.required,this.placeholder=(null===(o=n.setting)||void 0===o?void 0:o.placeholder)||"",this.value=(null===(s=n.setting)||void 0===s?void 0:s.result)||"",this.leading=(null===(r=n.setting)||void 0===r?void 0:r.leading)||0),this.dirty=!1,null===(l=this.close)||void 0===l||l.emit()}handleSave(e){e.stopPropagation();const t={name:this.name,required:this.required,role_name:this.roleName};"checkbox_group"===this.type||"radio_button_group"===this.type?(t.setting=this.setting,t.setting.options=this.options):"textarea"===this.type||"textbox"===this.type?(t.setting={...this.setting},t.setting.result=(this.value||"").trim()):"dropdown"===this.type&&(t.setting={x:this.setting.x,y:this.setting.y,options:this.options}),d(this.endpoint,this.templateId,this.fieldName,t).then((e=>{var i,o;this.dirty=!1,this.updateField(e),null===(i=this.settingsChanged)||void 0===i||i.emit({fieldName:this.fieldName,settings:t,field:e}),null===(o=this.close)||void 0===o||o.emit()})).catch((()=>{console.log("Field update failed",e)}))}handleAddOption(e){e.stopPropagation();const t={name:this.name,required:this.required,role_name:this.roleName};this.options.push("radio_button_group"===this.type?{id:C(),value:`Option ${this.options.length+1}`,selected:!1,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}:{id:C(),value:`Option ${this.options.length+1}`,checked:!1,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}),t.setting={...this.setting},delete t.setting.result,t.setting.options=[...this.options],d(this.endpoint,this.templateId,this.fieldName,t).then((e=>{var i,o;this.dirty=!1,this.updateField(e),null===(i=this.settingsChanged)||void 0===i||i.emit({fieldName:this.fieldName,settings:t,field:e}),null===(o=this.close)||void 0===o||o.emit()})).catch((()=>{console.log("Field update failed",e)}))}updateField(e){const t=[...this.store.state.fields];t.forEach((t=>{t.name===this.fieldName&&Object.assign(t,e)})),this.store.state.fields=t}async handleDelete(e){e.stopPropagation(),window.confirm("Are you sure you wish to remove this field? This action cannot be undone.")&&a(this.endpoint,this.templateId,this.fieldName).then((()=>{var e,t,i,o,s;this.store.state.fields=[...null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.fields.filter((e=>e.name!==this.fieldName))],null===(o=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===o||o.roles.forEach((e=>{e.fields=[...e.fields.filter((e=>e.name!==this.fieldName))]})),null===(s=this.delete)||void 0===s||s.emit({templateId:this.templateId,roleName:this.roleName})})).catch((e=>{console.log("[FIELD PROPERTIES] Deletion error",e)}))}render(){var e,o,s,r;return this.endpoint.session?this.endpoint.session&&(null===(o=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===o?void 0:o.isLoaded)?this.helpText&&this.showingHelp?t(i,null,t("h6",null,L(this.fieldType)," Settings ",t("div",{style:{flex:"1"}}),t("div",{class:"help-icon",innerHTML:j,onClick:()=>this.showingHelp=!1})),t("p",{class:"instructions",innerHTML:this.helpText})):t(i,null,t("h6",null,L(this.fieldType.replace(/_/g," "))," Settings ",t("div",{style:{flex:"1"}}),this.helpText&&t("div",{class:"help-icon",innerHTML:j,onClick:()=>this.showingHelp=!0})),t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:e=>{this.name=e.target.value,this.dirty=!0}})),t("div",{class:"row"},t("div",{class:"input-label"},"Role:"),t("verdocs-select-input",{value:this.roleName,options:null===(r=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===r?void 0:r.roles.map((e=>({label:e.name,value:e.name}))),onInput:e=>{this.roleName=e.target.value,this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-value",label:"Value",value:this.value,autocomplete:"off",placeholder:"Pre-defined value...",onInput:e=>{this.value=e.target.value,this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:e=>{this.placeholder=e.target.value,this.dirty=!0}})),t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},t("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),t("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:e=>{this.required=e.target.checked,this.dirty=!0}})),["checkbox_group","radio_button_group"].includes(this.type)&&t("verdocs-button",{size:"small",onClick:e=>this.handleAddOption(e),label:"Add Option"}),["dropdown"].includes(this.type)&&t("div",{class:"options"},t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px",textAlign:"center",fontWeight:"700",fontSize:"14px",justifyContent:"center",backgroundColor:"#333333",padding:"5px 8px",color:"#ffffff"}},"Options"),t("div",{class:"row-header"},t("h6",null,"ID"),t("h6",null,"Label"),t("div",{style:{width:"34px"}})),this.options.map(((e,i)=>t("div",{class:"row option-row",key:i},t("verdocs-text-input",{id:`verdocs-option-id-${e.id}`,value:e.id,placeholder:"Unique ID",onInput:e=>{this.options[i].id=e.target.value,this.dirty=!0}}),t("verdocs-text-input",{id:`verdocs-option-value-${e.id}`,value:e.value,placeholder:"Display value",onInput:e=>{this.options[i].value=e.target.value,this.dirty=!0}}),t("button",{innerHTML:P,class:"remove-button",onClick:()=>{this.options=this.options.filter((t=>t.id!==e.id)),this.dirty=!0}})))),t("div",{class:"row-header"},t("button",{class:"add-option-button",onClick:()=>{this.options=[...this.options,{id:`option-${this.options.length+1}`,value:`Option ${this.options.length+1}`}],this.dirty=!0}},"Add Option"))),t("div",{class:"buttons"},t("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:P}),t("div",{style:{flex:"1"}}),t("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),t("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):t(i,{class:"empty"}):t(i,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}get el(){return s(this)}};S.style='verdocs-template-field-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-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}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:#a50021}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 10px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';export{h as verdocs_button_panel,S as verdocs_template_field_properties}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as s}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as o}from"./p-af048fad.js";import{r as l,b as a}from"./p-402c3762.js";import{g as n,a as r}from"./p-d4d8858f.js";import{S as d}from"./p-7a1b2643.js";import{j as c}from"./p-ccb2c794.js";import{a as p,i as h}from"./p-e8ce0b6f.js";import{g as v}from"./p-6de76553.js";import{c as m,d as u}from"./p-567a6e7c.js";import{D as x,P as f,J as b,a as g,F as y,b as w,T as k}from"./p-637fee9b.js";import{c as S,u as E}from"./p-976ec9e8.js";import{V as z}from"./p-ed416acf.js";import"./p-eab67c09.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-c220af42.js";import"./p-7648c449.js";const C=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=o.getDefault(),this.templateId=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[PREVIEW] Unable to start builder session, must be authenticated");this.store=await n(this.endpoint,this.templateId,!0),console.log(`[PREVIEW] Loading template ${this.templateId}`,this.endpoint.session)}catch(s){console.log("[PREVIEW] Error with preview session",s),null===(e=this.sdkError)||void 0===e||e.emit(new d(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handlePageRendered(e){var t,i;const s=e.detail;(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.fields.filter((e=>e.page_sequence===s.pageNumber))).forEach((e=>l(e,s,a(r(this.store),e.role_name),{disabled:!0,editable:!1,draggable:!1})))}render(){var e,t,o,l;if(!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded))return i(s,null,i("verdocs-loader",null));const a=[...null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.pages];return a.sort(((e,t)=>e.sequence-t.sequence)),i(s,null,a.map((e=>i("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}};C.style='verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';const T='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>',I=class{constructor(i){e(this,i),this.send=t(this,"send",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.searchContacts=t(this,"searchContacts",7),this.levels=[],this.store=null,this.endpoint=o.getDefault(),this.templateId=null,this.environment="web",this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`,this.rolesAtLevel={},this.showPickerForId="",this.sessionContacts=[],this.sending=!1,this.rolesCompleted={}}async reset(){this.rolesCompleted={}}async componentWillLoad(){var e,t,i,s,o,l,a,r,c,p;try{const r=this.endpoint.loadSession();if(!this.templateId)return void console.log(`[SEND] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[SEND] Unable to start builder session, must be authenticated");if(this.store=await n(this.endpoint,this.templateId,!0),(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_sendable)||console.warn("[SEND] Template is not sendable",this.templateId),null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.roles){const e={};this.rolesCompleted={},null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l||l.roles.forEach((t=>{const i=t.sequence-1;e[i]||(e[i]=[]);const s=`r-${i}-${e[i].length}`;e[i].push({...t,id:s})})),this.rolesAtLevel=e,this.levels=Object.keys(e).map((e=>+e)),this.levels.sort(((e,t)=>e-t))}(null===(a=null==r?void 0:r.session)||void 0===a?void 0:a.profile)&&this.sessionContacts.push({id:r.session.profile.id,name:`${r.session.profile.first_name} ${r.session.profile.last_name}`,email:r.session.profile.email,phone:r.session.profile.phone})}catch(e){console.log("[SEND] Error with preview session",e),null===(r=this.sdkError)||void 0===r||r.emit(new d(e.message,null===(c=e.response)||void 0===c?void 0:c.status,null===(p=e.response)||void 0===p?void 0:p.data))}}getLevelIcon(e){return i("div",e<0?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}:e>=this.levels.length?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}:{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'})}handleSelectContact(e,t){e.preventDefault(),this.rolesCompleted[t.id]={...t,...e.detail},this.showPickerForId=""}handleClickRole(e,t){e.stopPropagation(),this.showPickerForId=t.id}handleSend(e){var t,i;console.log("Sending",e),e.preventDefault(),e.stopPropagation(),this.sending=!0;const s={template_id:this.templateId,name:null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,environment:this.environment,roles:Object.values(this.rolesCompleted),prepared_fields:[]};console.log("[SEND] Creating envelope",s),c(this.endpoint,s).then((e=>{var t;console.log("[SEND] Send envelope",e),this.reset().catch((e=>console.log("Unknown Error",e))),this.sending=!1,null===(t=this.send)||void 0===t||t.emit(s)})).catch((e=>{console.log("Send error",e),this.sending=!1}))}handleCancel(e){var t;e.stopPropagation(),null===(t=this.exit)||void 0===t||t.emit()}render(){var e,t,o,l;const n=((null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles)||[]).map((e=>e.name))||[],r=Object.values(this.rolesCompleted).filter((e=>p(e.email)||h(e.phone))).length>=n.length;return i(s,{class:{sendable:null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Envelope")),this.levels.map((e=>i("div",{class:`level level-${e}`},this.getLevelIcon(e),this.rolesAtLevel[e].map((e=>{var t,s,o,l,r,d;return e.email?i("div",{class:"recipient",style:{borderColor:v(a(n,e.name))},onClick:t=>this.handleClickRole(t,e)},null!==(r=null===(l=this.rolesCompleted[e.id])||void 0===l?void 0:l.full_name)&&void 0!==r?r:e.full_name,i("div",{class:"icon",innerHTML:T}),this.showPickerForId===e.id&&i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(d=this.rolesCompleted[e.id])&&void 0!==d?d:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}})):i("div",{class:"recipient",style:{backgroundColor:v(a(n,e.name))},onClick:t=>this.handleClickRole(t,e)},null!==(s=null===(t=this.rolesCompleted[e.id])||void 0===t?void 0:t.full_name)&&void 0!==s?s:e.name,i("div",{class:"icon",innerHTML:T}),this.showPickerForId===e.id&&i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(o=this.rolesCompleted[e.id])&&void 0!==o?o:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}}))}))))),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e)}),i("verdocs-button",{label:"Send",size:"small",disabled:!r,onClick:e=>this.handleSend(e)})))}};I.style='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';const L=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.templateUpdated=t(this,"templateUpdated",7),this.sdkError=t(this,"sdkError",7),this.endpoint=o.getDefault(),this.templateId="",this.uploading=!1,this.progressLabel="Uploading...",this.progressPercent=0,this.showDeleteError=!1,this.confirmDeleteDocument=null,this.store=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await n(this.endpoint,this.templateId,!1)}catch(s){console.log("[TEMPLATE ATTACHMENTS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new d(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handleCancel(e){e.stopPropagation(),this.exit.emit()}handleUploadProgress(e){e>=99?(this.progressPercent=100,this.progressLabel="Processing..."):this.progressPercent=e}async handleUpload(e){var t,i,s,o;e.stopPropagation();const l=e.detail.file;if(l){console.log("[ATTACHMENTS] Uploading...",l),this.uploading=!0,this.progressLabel="Uploading...";try{const e=await m(this.endpoint,this.templateId,l,this.handleUploadProgress.bind(this));console.log("[ATTACHMENTS] Created attachment",e),this.store=await n(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] Updated template",this.store.state),null===(t=this.templateUpdated)||void 0===t||t.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"}),this.uploading=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[ATTACHMENTS] Error creating template",e),null===(i=this.sdkError)||void 0===i||i.emit(new d(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data)),this.uploading=!1}}}handleNext(e){var t;e.stopPropagation(),this.uploading=!1,this.progressLabel="",this.progressPercent=0,null===(t=this.next)||void 0===t||t.emit({template:this.store.state})}async confirmDelete(){await u(this.endpoint,this.templateId,this.confirmDeleteDocument.id),this.store=await n(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] New template",this.store.state),this.confirmDeleteDocument=null}async handleDelete(e){var t;(null===(t=this.store.state)||void 0===t?void 0:t.template_documents.length)>1?this.confirmDeleteDocument=e:this.showDeleteError=!0}getFileIcon(e){switch(e.mime){case"application/pdf":return g;case"image/jpeg":return b;case"image/png":return f;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return x}return y}render(){var e,t,o;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));const l=null===(e=this.store)||void 0===e?void 0:e.state;return l.isLoaded?this.endpoint.session&&l.profile_id?i(s,null,i("h5",null,"Existing Attachments"),i("div",{class:"attachments"},null===(t=this.store)||void 0===t?void 0:t.state.template_documents.map((e=>i("div",{class:"attachment"},i("div",{class:"file-icon",innerHTML:this.getFileIcon(e)}),i("div",{class:"filename",title:e.name},e.name),i("div",{class:"pages"},i("div",{class:"count"},e.page_numbers),i("div",{class:"pages-icon",innerHTML:w})),i("div",{class:"trash-icon",innerHTML:k,onClick:()=>this.handleDelete(e)}))))),i("h5",null,"Attach a New Document"),this.uploading?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("verdocs-file-chooser",{onFileSelected:e=>this.handleUpload(e)}),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.uploading}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleNext(e),disabled:!(null===(o=this.store)||void 0===o?void 0:o.state.template_documents.length)||this.uploading})),this.showDeleteError&&i("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:()=>this.showDeleteError=!1}),this.confirmDeleteDocument&&i("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:()=>this.confirmDelete(),showCancel:!0,onExit:()=>{this.confirmDeleteDocument=null}})):i(s,{class:"empty"}):i(s,{class:"loading"},i("verdocs-loader",null))}};L.style='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';const U=["attachments","roles","settings","fields","preview"],M=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.stepChanged=t(this,"stepChanged",7),this.endpoint=o.getDefault(),this.templateId=null,this.step="preview",this.store=null}onStepChanged(){console.log("Step changed",this.step,this.templateId),this.loadTemplate().catch((e=>console.log("Unknown Error",e)))}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.endpoint.session)return void console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");if(!this.templateId)return void(this.step="preview");this.loadTemplate().catch((e=>console.log("[BUILD_TABS] Unable to load template",e)))}catch(s){console.log("[BUILD_TABS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new d(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}async loadTemplate(){this.templateId&&(this.store=await n(this.endpoint,this.templateId,!1))}setStep(e){var t;console.log("Selected step",e.detail.tab.id),e.stopPropagation(),e.preventDefault(),this.step=e.detail.tab.id,null===(t=this.stepChanged)||void 0===t||t.emit(e.detail.tab.id)}render(){var e,t,o,l,a,n,r,d,c,p,h,v;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));let m=!1,u=!1,x=!1;this.templateId&&this.store&&(console.log("lengths",null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.template_documents.length,null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.roles.length,null===(n=null===(a=this.store)||void 0===a?void 0:a.state)||void 0===n?void 0:n.fields.length),x=(null===(d=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===d?void 0:d.template_documents.length)>0,u=x&&(null===(p=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===p?void 0:p.roles.length)>0,m=u&&(null===(v=null===(h=this.store)||void 0===h?void 0:h.state)||void 0===v?void 0:v.fields.length)>0);let f=Math.max(U.indexOf(this.step),0);return!m&&f>=4&&(f=3),!u&&f>=3&&(f=1),!x&&f>=1&&(f=0),console.log({selectedStepIndex:f,canPreview:m,canEditFields:u,canEditRoles:x}),console.log("[BUILD_TABS] Rendering",this.step,f),i(s,null,i("verdocs-tabs",{onSelectTab:e=>this.setStep(e),selectedTab:f,tabs:[{id:"attachments",disabled:!1,label:this.templateId&&this.store?"Attachment(s)":"Upload Attachment(s)"},{id:"roles",disabled:!x,label:"Roles"},{id:"settings",disabled:!u,label:"Settings"},{id:"fields",disabled:!u,label:"Fields"},{id:"preview",disabled:!m,label:"Preview/Send"}]}))}static get watchers(){return{step:["onStepChanged"]}}};M.style='verdocs-template-build-tabs{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}';const N=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.templateCreated=t(this,"templateCreated",7),this.endpoint=o.getDefault(),this.file=void 0,this.creating=!1,this.progressLabel="Uploading...",this.progressPercent=0}componentWillLoad(){this.endpoint.setTimeout(3e4),this.endpoint.loadSession()}handleFileChanged(e){var t;this.file=(null===(t=e.target.files)||void 0===t?void 0:t[0])||null,console.log("[CREATE] Selected file",this.file)}handleUpload(e){e.stopPropagation(),document.getElementById("verdocs-template-create-file").click()}handleCancel(e){e.stopPropagation(),this.exit.emit()}async handleSubmit(e){var t,i,s,o,l;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0,this.progressLabel="Uploading...";try{const e=await S(this.endpoint,{name:this.file.name,documents:[this.file]},(e=>{e>=99?(this.progressLabel="Processing...",this.progressPercent=100):this.progressPercent=e}));console.log("[CREATE] Created template",e),null===(t=this.templateCreated)||void 0===t||t.emit({endpoint:this.endpoint,template:e,templateId:e.id}),null===(i=this.next)||void 0===i||i.emit(e),this.creating=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[CREATE] Error creating template",e),null===(s=this.sdkError)||void 0===s||s.emit(new d(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(l=e.response)||void 0===l?void 0:l.data)),this.creating=!1}}}render(){return i(s,null,this.endpoint.session?i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("input",{type:"file",id:"verdocs-template-create-file",multiple:!0,accept:"application/pdf",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),this.creating?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("div",{class:"upload-box",onDrop:e=>{e.preventDefault(),e.target.classList.remove("drag-over"),this.file=e.dataTransfer.files[0]},onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"},onDragEnter:e=>e.target.classList.add("drag-over"),onDragLeave:e=>e.target.classList.remove("drag-over")},i("div",null,i("span",{innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>'})),i("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),i("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?" ":"Or, if you prefer..."),i("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:e=>this.handleUpload(e)})),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.creating}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file||this.creating}))):i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};N.style='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';const R=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.name="",this.dirty=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await n(this.endpoint,this.templateId,!1),this.name=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.name,this.dirty=!1}catch(e){console.log("[TEMPLATE NAME] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new d(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.name=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,this.dirty=!1,console.log("Closing"),null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await E(this.endpoint,this.templateId,{name:this.name}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.name=this.name),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"name"}),null===(s=this.close)||void 0===s||s.emit()}render(){var e,t;return this.endpoint.session?(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoading)?i(s,{class:"loading"},i("verdocs-loader",null)):i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("label",{htmlFor:"verdocs-template-name"},"Template Name"),i("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:e=>{var t,i;this.name=e.target.value,this.dirty=this.name!==(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name)}}),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};R.style="";const A=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.showPlanBlocker=!1,this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1",this.dirty=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await n(this.endpoint,this.templateId,!0),this.sendReminders=!!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.reminder_id),this.dirty=!1}catch(e){console.log("[TEMPLATE REMINDERS] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new d(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.sendReminders=!!(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id),this.dirty=!1,null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s,o,l,a,r,c,p,h,v,m;e.stopPropagation();try{if(this.sendReminders){const e={setup_time:+this.firstReminderDays,interval_time:+this.reminderDays};(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id)?(await function(e,t,i,s){return e.api.put("/templates/".concat(t,"/reminder/").concat(i),s).then((function(e){return e.data}))}(this.endpoint,this.templateId,null===(s=this.store)||void 0===s?void 0:s.state.reminder_id,e),this.store=await n(this.endpoint,this.templateId,!0)):(await function(e,t,i){return e.api.post("/templates/".concat(t,"/reminder/"),i).then((function(e){return e.data}))}(this.endpoint,this.templateId,e),this.store=await n(this.endpoint,this.templateId,!0))}else await(h=this.endpoint,v=this.templateId,m=null===(o=this.store)||void 0===o?void 0:o.state.reminder_id,h.api.delete("/templates/".concat(v,"/reminder/").concat(m)).then((function(e){return e.data}))),this.store=await n(this.endpoint,this.templateId,!0);null===(l=this.templateUpdated)||void 0===l||l.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"})}catch(e){console.log("[TEMPLATE REMINDERS] Unable to update reminders",e),z(e.message),null===(a=this.sdkError)||void 0===a||a.emit(new d(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(c=e.response)||void 0===c?void 0:c.data))}this.dirty=!1,null===(p=this.close)||void 0===p||p.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Reminders"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),i("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>{this.sendReminders=e.target.checked,this.dirty=!0}})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),i("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:e=>{this.firstReminderDays=e.target.value,this.dirty=!0},disabled:!this.sendReminders})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),i("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:e=>{this.reminderDays=e.target.value,this.dirty=!0},disabled:!this.sendReminders})),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))),this.showPlanBlocker&&i("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:()=>this.showPlanBlocker=!1})):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};A.style='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';const D=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.dirty=!1,this.personal=!1,this.public=!1}async componentWillLoad(){var e,t,i,s,o,l,a;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[VISIBILITY] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[VISIBILITY] Unable to start builder session, must be authenticated");this.store=await n(this.endpoint,this.templateId,!1),this.personal=(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_personal)||!0,this.public=(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.is_public)||!1,this.dirty=!1}catch(e){console.log("[TEMPLATE VISIBILITY] Error loading template",e),null===(o=this.sdkError)||void 0===o||o.emit(new d(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(a=e.response)||void 0===a?void 0:a.data))}}handleCancel(e){var t,i,s,o,l;e.stopPropagation(),this.personal=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.is_personal,this.public=null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.is_public,this.dirty=!1,null===(l=this.close)||void 0===l||l.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await E(this.endpoint,this.templateId,{is_personal:this.personal,is_public:this.public}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.is_personal=this.personal,this.store.state.is_public=this.public),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"visibility"}),null===(s=this.close)||void 0===s||s.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Visibility"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-shared"},"Shared"),i("verdocs-checkbox",{id:"verdocs-is-shared",name:"is-shared",checked:!this.personal,value:"on",onInput:e=>{this.personal=!e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Shared templates are visible to other members of your Organization (if any)."),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-public"},"Public"),i("verdocs-checkbox",{id:"verdocs-is-public",name:"is-public",checked:this.public,value:"on",onInput:e=>{this.public=e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};D.style='verdocs-template-visibility{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}';export{C as verdocs_preview,I as verdocs_send,L as verdocs_template_attachments,M as verdocs_template_build_tabs,N as verdocs_template_create,R as verdocs_template_name,A as verdocs_template_reminders,D as verdocs_template_visibility}
@@ -1 +0,0 @@
1
- import{d as n}from"./p-05788c2b.js";var e=function(n,e,t,r){return new(t||(t=Promise))((function(o,i){function u(n){try{f(r.next(n))}catch(n){i(n)}}function c(n){try{f(r.throw(n))}catch(n){i(n)}}function f(n){var e;n.done?o(n.value):(e=n.value,e instanceof t?e:new t((function(n){n(e)}))).then(u,c)}f((r=r.apply(n,e||[])).next())}))},t=function(n,e){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(f){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(u=0)),u;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return u.label++,{value:c[1],done:!1};case 5:u.label++,r=c[1],c=[0];continue;case 7:c=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){u=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){u.label=c[1];break}if(6===c[0]&&u.label<o[1]){u.label=o[1],o=c;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(c);break}o[2]&&u.ops.pop(),u.trys.pop();continue}c=e.call(n,u)}catch(n){c=[6,n],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,f])}}},r=function(n,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.post("/envelopes",r).then((function(n){return n.data}))]}))}))},o=function(n,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.post("/envelopes/summary",{page:r}).then((function(n){return n.data}))]}))}))},i=function(r,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,r.api.get("/envelopes/".concat(o.envelopeId,"/recipients/").concat(encodeURIComponent(o.roleId),"/invitation/").concat(o.inviteCode)).then((function(e){var t,o=(null===(t=e.headers)||void 0===t?void 0:t.signer_token)||"",i=n(o);return r.setToken(o),{recipient:e.data,session:i,signerToken:o}}))]}))}))},u=function(n,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(r)).then((function(n){return n.data}))]}))}))},c=function(n,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(r),{action:"cancel"}).then((function(n){return n.data}))]}))}))},f=function(n,r,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(r,"/envelope_documents/").concat(o,"?file=true"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))},s=function(n,r,o,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(r,"/fields/").concat(o),i).then((function(n){return n.data}))]}))}))},v=function(n,r,o,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(r,"/fields/").concat(o,"/signature/").concat(i)).then((function(n){return n.data}))]}))}))},a=function(n,r,o,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(r,"/fields/").concat(o,"/initial/").concat(i)).then((function(n){return n.data}))]}))}))},d=function(n,r,o,i,u){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(){return(e=new FormData).append("document",i,i.name),[2,n.api.put("/envelopes/".concat(r,"/fields/").concat(o),e,{timeout:12e4,onUploadProgress:function(n){var e=n.total||1,t=n.loaded||0;null==u||u(Math.floor(100*t/(e||1)),t,e||1)}}).then((function(n){return n.data}))]}))}))},l=function(n,r,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(r,"/fields/").concat(o,"/document"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))},p=function(n,r,o,i,u){return void 0===u&&(u="original"),e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(r,"/envelope_documents/").concat(o,"/pages/").concat(i,"/image?type=").concat(u),{timeout:2e4,"axios-retry":{retries:5}}).then((function(n){return n.data}))]}))}))},h={},m=function(n,e){return h[e]&&h[e].loaded+2e3<(new Date).getTime()?h[e].envelope:u(n,e).then((function(n){return h[e]={loaded:(new Date).getTime(),envelope:n},n}))},y=function(n,e){return n.api.post("/envelopes/list",e,{baseURL:n.getBaseURLv2()}).then((function(n){return n.data}))};export{u as a,f as b,c,l as d,i as e,v as f,o as g,a as h,d as i,r as j,p as k,y as l,m as t,s as u}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-4422958b.system.js","./p-2fdb7348.system.js"],(function(e){"use strict";var t,n,r,i,o;return{setters:[function(e){t=e.r;n=e.c;r=e.h},function(){},function(e){i=e.V},function(e){o=e.a}],execute:function(){var s=undefined&&undefined.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};var a=undefined&&undefined.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var c=function(e){return s(void 0,void 0,void 0,(function(){return a(this,(function(t){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))}))};var l='verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", 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 h='<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 f='<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 u=e("verdocs_quick_functions",function(){function e(e){t(this,e);this.createTemplate=n(this,"createTemplate",7);this.createDocument=n(this,"createDocument",7);this.endpoint=i.getDefault()}e.prototype.handleCreateTemplate=function(){this.createTemplate.emit()};e.prototype.handleCreateDocument=function(){this.createDocument.emit()};e.prototype.render=function(){var e=this;return r("div",{class:"container"},r("p",{class:"title"},"Quick Create"),r("button",{onClick:function(){return e.handleCreateTemplate()},innerHTML:f},"Template"),r("button",{onClick:function(){return e.handleCreateDocument()},innerHTML:h},"Document"))};return e}());u.style=l;var p='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:#1e2031}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#cccccc}';var d='<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 x=e("verdocs_search_activity",function(){function e(e){t(this,e);this.entrySelected=n(this,"entrySelected",7);this.endpoint=i.getDefault();this.type="recent";this.options=undefined;this.emptyMessage="You do not have any starred searches.";this.authFailure=false;this.title="Recent Searches";this.recent=[];this.saved=[];this.starred=[]}e.prototype.componentWillLoad=function(){var e=this;this.endpoint.loadSession();var t=function(t){var n;console.warn("[Verdocs/search-activity] Error getting search data",t);if(((n=t===null||t===void 0?void 0:t.response)===null||n===void 0?void 0:n.status)===401){e.authFailure=true}};switch(this.type){case"recent":this.title="Recent Searches";this.emptyMessage="You do not have any recent searches.";c(this.endpoint).then((function(t){return e.recent=t.recent})).catch(t);break;case"saved":this.title="Saved Searches";this.emptyMessage="You do not have any saved searches.";c(this.endpoint).then((function(t){return e.saved=t.saved})).catch(t);break;case"starred":this.title="My Starred items";this.emptyMessage="You do not have any starred templates.";o(this.endpoint,{is_starred:true}).then((function(t){return e.starred=t})).catch(t);break}};e.prototype.handleSelectEntry=function(e){this.entrySelected.emit(e)};e.prototype.computePagesText=function(e){if(e<2){return"".concat(e," Page")}else{return"".concat(e," Pages")}};e.prototype.computeRecipientsText=function(e){if(typeof e==="object"){return e.join(", ")}else if(e>1){return"".concat(e," Recipients")}else{return"".concat(e," Recipient")}};e.prototype.render=function(){var e=this;var t=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return r("div",{class:"container"},r("p",{class:"title"},this.title),r("div",{class:"items"},this.recent.map((function(t){return r("button",{class:"item",onClick:function(){return e.handleSelectEntry(t)}},r("div",{class:"icon",innerHTML:d}),r("div",{class:"details"},r("div",{class:"item-title"},t.params.q),r("div",{class:"info"},"Test")))})),this.saved.map((function(t){return r("button",{class:"item",onClick:function(){return e.handleSelectEntry(t)}},r("div",{class:"icon",innerHTML:d}),r("div",{class:"details"},r("div",{class:"item-title"},t.params.q),r("div",{class:"info"})))})),t&&r("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))};return e}());x.style=p;var v='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", 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 y='<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 m='<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 b=e("verdocs_search_box",function(){function e(e){t(this,e);this.searchClicked=n(this,"searchClicked",7);this.typeChanged=n(this,"typeChanged",7);this.queryChanged=n(this,"queryChanged",7);this.endpoint=i.getDefault();this.placeholder="Search envelopes, templates, organizations...";this.type="all";this.query="";this.grabsFocus=false}e.prototype.focusField=function(){return s(this,void 0,void 0,(function(){return a(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 r("form",{onSubmit:function(t){return e.handleSearch(t)}},this.type!==undefined&&this.type!=="all"&&r("span",{class:"type"},this.type,"s ",r("button",{class:"remove",innerHTML:m,onClick:function(){return e.handleClearFilter()}})),r("input",{type:"text",value:this.query,placeholder:this.placeholder,onInput:function(t){return e.handleChange(t)},onKeyUp:function(t){return e.handleKeyUp(t)},ref:function(t){return e.inputEl=t}}),r("button",{onClick:function(t){return e.handleSearch(t)},class:"search"},r("span",{innerHTML:y}),"Search"))};return e}());b.style=v}}}));
@@ -1 +0,0 @@
1
- import{c as e}from"./p-7648c449.js";import{g as o}from"./p-976ec9e8.js";import{T as t}from"./p-af048fad.js";const r={},a=async(a,s,n=!1)=>{let i=!1;r[s]||(console.debug("[TEMPLATES] No template store found for ID, creating",s),r[s]=(o=>{const r=(new Date).toISOString();return e({isLoading:!0,isLoaded:!1,isError:!1,error:null,updateCount:0,roleNames:[],id:o,name:"",description:"",sender:t.CREATOR,profile_id:"",organization_id:"",counter:0,star_counter:0,is_sendable:!1,is_personal:!0,is_public:!1,created_at:r,updated_at:r,last_used_at:r,token:"",reminder_id:"",reminder:void 0,processed:!1,organization:void 0,roles:[],pages:[],template_document:void 0,template_documents:[]})})(s),i=!0);const d=r[s];if(d.use({reset:()=>console.debug("[TEMPLATES] Store got reset"),dispose:()=>console.debug("[TEMPLATES] Store got disposed")}),i||n){console.debug("[TEMPLATES] Reloading template",{templateId:s,created:i,forceReload:n}),d.state.isLoading=!0,d.state.isLoaded=!1,d.state.isError=!1,d.state.error=void 0;try{const e=await o(a,s);console.debug("[TEMPLATES] Got template",e),Object.assign(d.state,e),d.state.isLoaded=!0,d.state.isError=!1,d.state.error=void 0}catch(e){throw console.error("[TEMPLATES] Error loading template",e),d.state.isLoaded=!1,d.state.isError=!0,d.state.error=e,e}d.state.isLoading=!1,d.state.updateCount++}return d},s=e=>{var o;return((null===(o=null==e?void 0:e.state)||void 0===o?void 0:o.roles)||[]).map((e=>e.name))};export{s as a,a as g}
@@ -1 +0,0 @@
1
- System.register(["./p-54498887.system.js"],(function(n){"use strict";var t;return{setters:[function(n){t=n.d}],execute:function(){var e=undefined&&undefined.__awaiter||function(n,t,e,o){function r(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,i){function u(n){try{c(o.next(n))}catch(n){i(n)}}function a(n){try{c(o["throw"](n))}catch(n){i(n)}}function c(n){n.done?e(n.value):r(n.value).then(u,a)}c((o=o.apply(n,t||[])).next())}))};var o=undefined&&undefined.__generator||function(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(t){return c([n,t])}}function c(a){if(o)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(e=0)),e)try{if(o=1,r&&(i=a[0]&2?r["return"]:a[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;if(r=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;r=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){e.label=a[1];break}if(a[0]===6&&e.label<i[1]){e.label=i[1];i=a;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(a);break}if(i[2])e.ops.pop();e.trys.pop();continue}a=t.call(n,e)}catch(n){a=[6,n];r=0}finally{o=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var r=n("j",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.post("/envelopes",t).then((function(n){return n.data}))]}))}))}));var i=n("g",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.post("/envelopes/summary",{page:t}).then((function(n){return n.data}))]}))}))}));var u=n("e",(function(n,r){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(r.envelopeId,"/recipients/").concat(encodeURIComponent(r.roleId),"/invitation/").concat(r.inviteCode)).then((function(e){var o;var r=((o=e.headers)===null||o===void 0?void 0:o.signer_token)||"";var i=t(r);n.setToken(r);return{recipient:e.data,session:i,signerToken:r}}))]}))}))}));var a=n("a",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t)).then((function(n){return n.data}))]}))}))}));var c=n("c",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t),{action:"cancel"}).then((function(n){return n.data}))]}))}))}));var f=n("b",(function(n,t,r){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/envelope_documents/").concat(r,"?file=true"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))}));var d=n("u",(function(n,t,r,i){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r),i).then((function(n){return n.data}))]}))}))}));var v=n("f",(function(n,t,r,i){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r,"/signature/").concat(i)).then((function(n){return n.data}))]}))}))}));var s=n("h",(function(n,t,r,i){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r,"/initial/").concat(i)).then((function(n){return n.data}))]}))}))}));var l=n("i",(function(n,t,r,i,u){return e(void 0,void 0,void 0,(function(){var e;return o(this,(function(o){e=new FormData;e.append("document",i,i.name);return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r),e,{timeout:12e4,onUploadProgress:function(n){var t=n.total||1;var e=n.loaded||0;u===null||u===void 0?void 0:u(Math.floor(e*100/(t||1)),e,t||1)}}).then((function(n){return n.data}))]}))}))}));var p=n("d",(function(n,t,r){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/fields/").concat(r,"/document"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))}));var h=n("k",(function(n,t,r,i,u){if(u===void 0){u="original"}return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/envelope_documents/").concat(r,"/pages/").concat(i,"/image?type=").concat(u),{timeout:2e4,"axios-retry":{retries:5}}).then((function(n){return n.data}))]}))}))}));var g={};var y=n("t",(function(n,t){if(g[t]&&g[t].loaded+2e3<(new Date).getTime()){return g[t].envelope}return a(n,t).then((function(n){g[t]={loaded:(new Date).getTime(),envelope:n};return n}))}));var b=n("l",(function(n,t){return n.api.post("/envelopes/list",t,{baseURL:n.getBaseURLv2()}).then((function(n){return n.data}))}))}}}));
@@ -1 +0,0 @@
1
- import{r as t,h as s,H as e}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as i}from"./p-af048fad.js";import{g as l}from"./p-d4d8858f.js";import"./p-7648c449.js";import"./p-976ec9e8.js";const o=class{constructor(s){t(this,s),this.store=null,this.endpoint=i.getDefault(),this.templateId="e997b94c-9d1b-4c85-8552-dedd24e35550"}async componentWillLoad(){try{this.endpoint.loadSession(),this.store=await l(this.endpoint,this.templateId,!1)}catch(t){console.log("[TEMPLATE VISIBILITY] Error loading template",t)}}render(){return console.log("[IPC] Rendering"),s(e,null,s("div",null,s("pre",null,s("code",null,JSON.stringify(this.store.state,null,2)))),s("verdocs-template-roles",{templateId:this.templateId}),s("verdocs-template-fields",{templateId:this.templateId}))}};o.style="ipc-test{max-width:800px;display:block}";export{o as ipc_test}