@verdocs/web-sdk 2.0.14 → 2.0.15

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 (260) hide show
  1. package/dist/cjs/{TemplateStore-07e274ab.js → TemplateStore-4041d8af.js} +1 -1
  2. package/dist/cjs/{VerdocsEndpoint-2ff96f90.js → VerdocsEndpoint-45deeb6a.js} +2 -87
  3. package/dist/cjs/ipc-test.cjs.entry.js +37 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  8. package/dist/cjs/{verdocs-button-panel_3.cjs.entry.js → verdocs-button-panel_2.cjs.entry.js} +2 -19
  9. package/dist/cjs/{verdocs-checkbox_4.cjs.entry.js → verdocs-checkbox_5.cjs.entry.js} +17 -0
  10. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
  19. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  20. package/dist/cjs/verdocs-radio-button.cjs.entry.js +23 -0
  21. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
  23. package/dist/cjs/verdocs-sign.cjs.entry.js +4 -2
  24. package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +236 -0
  25. package/dist/cjs/{verdocs-template-document-page.cjs.entry.js → verdocs-template-document-page_2.cjs.entry.js} +46 -1
  26. package/dist/cjs/{verdocs-template-attachments_4.cjs.entry.js → verdocs-template-fields_4.cjs.entry.js} +239 -230
  27. package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
  28. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
  29. package/dist/cjs/verdocs-template-star.cjs.entry.js +2 -2
  30. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
  31. package/dist/cjs/verdocs-templates-list.cjs.entry.js +42 -50
  32. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  33. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  34. package/dist/collection/collection-manifest.json +1 -0
  35. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +3 -1
  36. package/dist/collection/components/other/ipctest/ipc-test.css +4 -0
  37. package/dist/collection/components/other/ipctest/ipc-test.js +79 -0
  38. package/dist/collection/components/other/ipctest/ipc-test.stories.js +8 -0
  39. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
  40. package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.css +7 -1
  41. package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +128 -53
  42. package/dist/components/TemplateStore.js +1 -1
  43. package/dist/components/VerdocsEndpoint.js +1 -85
  44. package/dist/components/index.d.ts +1 -0
  45. package/dist/components/index.js +1 -0
  46. package/dist/components/ipc-test.d.ts +11 -0
  47. package/dist/components/ipc-test.js +142 -0
  48. package/dist/components/verdocs-sign.js +3 -1
  49. package/dist/components/verdocs-template-role-properties2.js +1 -1
  50. package/dist/components/verdocs-template-roles2.js +1 -1
  51. package/dist/components/verdocs-template-sender2.js +1 -1
  52. package/dist/components/verdocs-template-star2.js +1 -1
  53. package/dist/components/verdocs-templates-list.js +46 -51
  54. package/dist/docs.json +157 -4
  55. package/dist/esm/{TemplateStore-17700116.js → TemplateStore-01a9d18f.js} +1 -1
  56. package/dist/esm/{VerdocsEndpoint-e447b318.js → VerdocsEndpoint-d58d5544.js} +1 -85
  57. package/dist/esm/ipc-test.entry.js +33 -0
  58. package/dist/esm/loader.js +1 -1
  59. package/dist/esm/{utils-28ea5af7.js → utils-6412577d.js} +1 -1
  60. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  61. package/dist/esm/verdocs-auth.entry.js +1 -1
  62. package/dist/esm/verdocs-build.entry.js +2 -2
  63. package/dist/esm/{verdocs-button-panel_3.entry.js → verdocs-button-panel_2.entry.js} +3 -19
  64. package/dist/esm/{verdocs-checkbox_4.entry.js → verdocs-checkbox_5.entry.js} +17 -1
  65. package/dist/esm/verdocs-contact-picker.entry.js +2 -2
  66. package/dist/esm/verdocs-envelope-document-page.entry.js +2 -2
  67. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  68. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  69. package/dist/esm/verdocs-envelopes-list.entry.js +2 -2
  70. package/dist/esm/verdocs-field-checkbox.entry.js +1 -1
  71. package/dist/esm/verdocs-field-date.entry.js +1 -1
  72. package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
  73. package/dist/esm/verdocs-field-initial.entry.js +1 -1
  74. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  75. package/dist/esm/verdocs-field-radio-button.entry.js +1 -1
  76. package/dist/esm/verdocs-field-signature.entry.js +1 -1
  77. package/dist/esm/verdocs-field-textarea.entry.js +2 -2
  78. package/dist/esm/verdocs-field-textbox.entry.js +2 -2
  79. package/dist/esm/verdocs-field-timestamp.entry.js +1 -1
  80. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  81. package/dist/esm/verdocs-pagination_3.entry.js +1 -1
  82. package/dist/esm/verdocs-preview.entry.js +3 -3
  83. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  84. package/dist/esm/verdocs-radio-button.entry.js +19 -0
  85. package/dist/esm/verdocs-search.entry.js +1 -1
  86. package/dist/esm/verdocs-send.entry.js +3 -3
  87. package/dist/esm/verdocs-sign.entry.js +5 -3
  88. package/dist/esm/verdocs-template-attachments_2.entry.js +231 -0
  89. package/dist/esm/{verdocs-template-document-page.entry.js → verdocs-template-document-page_2.entry.js} +47 -3
  90. package/dist/esm/{verdocs-template-attachments_4.entry.js → verdocs-template-fields_4.entry.js} +237 -228
  91. package/dist/esm/verdocs-template-name.entry.js +2 -2
  92. package/dist/esm/verdocs-template-reminders.entry.js +2 -2
  93. package/dist/esm/verdocs-template-star.entry.js +2 -2
  94. package/dist/esm/verdocs-template-visibility.entry.js +2 -2
  95. package/dist/esm/verdocs-templates-list.entry.js +42 -50
  96. package/dist/esm/verdocs-view.entry.js +2 -2
  97. package/dist/esm/verdocs-web-sdk.js +1 -1
  98. package/dist/esm-es5/{TemplateStore-17700116.js → TemplateStore-01a9d18f.js} +1 -1
  99. package/dist/esm-es5/VerdocsEndpoint-d58d5544.js +1 -0
  100. package/dist/esm-es5/ipc-test.entry.js +1 -0
  101. package/dist/esm-es5/loader.js +1 -1
  102. package/dist/esm-es5/{utils-28ea5af7.js → utils-6412577d.js} +1 -1
  103. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  104. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  105. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  106. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -0
  107. package/dist/esm-es5/{verdocs-checkbox_4.entry.js → verdocs-checkbox_5.entry.js} +1 -1
  108. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  127. package/dist/esm-es5/verdocs-radio-button.entry.js +1 -0
  128. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  129. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-template-attachments_2.entry.js +1 -0
  132. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -0
  133. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -0
  134. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  135. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  136. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  137. package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
  138. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  139. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  140. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  141. package/dist/types/components/other/ipctest/ipc-test.d.ts +17 -0
  142. package/dist/types/components/other/ipctest/ipc-test.stories.d.ts +4 -0
  143. package/dist/types/components/templates/verdocs-templates-list/verdocs-templates-list.d.ts +32 -17
  144. package/dist/types/components.d.ts +53 -0
  145. package/dist/verdocs-web-sdk/{p-4ea9eedc.entry.js → p-07dac402.entry.js} +1 -1
  146. package/dist/verdocs-web-sdk/{p-6c181a99.system.entry.js → p-07ec8b75.system.entry.js} +1 -1
  147. package/dist/verdocs-web-sdk/{p-153b3888.entry.js → p-088f106d.entry.js} +1 -1
  148. package/dist/verdocs-web-sdk/{p-f0f8c91a.entry.js → p-10b88811.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-4e335343.system.js → p-13b3dd46.system.js} +1 -1
  150. package/dist/verdocs-web-sdk/{p-b7764fbf.entry.js → p-17d27ba8.entry.js} +1 -1
  151. package/dist/verdocs-web-sdk/{p-db748ddf.entry.js → p-1fea7a7e.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-6b37e85a.system.entry.js → p-25332568.system.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/{p-41a34c27.system.entry.js → p-27c654c5.system.entry.js} +1 -1
  154. package/dist/verdocs-web-sdk/{p-57e55966.system.entry.js → p-2a969dc8.system.entry.js} +1 -1
  155. package/dist/verdocs-web-sdk/{p-05b23b9a.system.entry.js → p-2dc36f82.system.entry.js} +1 -1
  156. package/dist/verdocs-web-sdk/{p-6ef5c42f.system.entry.js → p-31aea61d.system.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/{p-d5eea358.entry.js → p-3a0ba0b8.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-669b845b.system.entry.js → p-3aac3218.system.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/p-3b1bef0f.system.entry.js +1 -0
  160. package/dist/verdocs-web-sdk/{p-55cd3b39.entry.js → p-3c3664ab.entry.js} +1 -1
  161. package/dist/verdocs-web-sdk/p-3dcf8e41.entry.js +1 -0
  162. package/dist/verdocs-web-sdk/{p-ff71a7ed.system.entry.js → p-400a996a.system.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/p-4422958b.system.js +1 -0
  164. package/dist/verdocs-web-sdk/{p-59e55e05.entry.js → p-453bb85d.entry.js} +1 -1
  165. package/dist/verdocs-web-sdk/{p-9d097bc8.system.entry.js → p-460d2320.system.entry.js} +1 -1
  166. package/dist/verdocs-web-sdk/{p-316e6f16.entry.js → p-47dd8143.entry.js} +1 -1
  167. package/dist/verdocs-web-sdk/{p-977dceb3.system.entry.js → p-4a4b097e.system.entry.js} +1 -1
  168. package/dist/verdocs-web-sdk/p-4dc8cc71.system.entry.js +1 -0
  169. package/dist/verdocs-web-sdk/{p-51f09ff0.system.entry.js → p-4edec688.system.entry.js} +1 -1
  170. package/dist/verdocs-web-sdk/p-5080cdfc.entry.js +1 -0
  171. package/dist/verdocs-web-sdk/p-54849116.entry.js +1 -0
  172. package/dist/verdocs-web-sdk/{p-0bda34c0.js → p-55af2ceb.js} +1 -1
  173. package/dist/verdocs-web-sdk/{p-b6c642af.system.entry.js → p-5cae759a.system.entry.js} +1 -1
  174. package/dist/verdocs-web-sdk/p-647cdb84.system.js +1 -1
  175. package/dist/verdocs-web-sdk/{p-ef3df424.system.entry.js → p-657dacc4.system.entry.js} +1 -1
  176. package/dist/verdocs-web-sdk/{p-c97a7232.system.js → p-6d2082b7.system.js} +1 -1
  177. package/dist/verdocs-web-sdk/{p-fa7332f2.system.entry.js → p-7297edd7.system.entry.js} +1 -1
  178. package/dist/verdocs-web-sdk/{p-2ca89535.entry.js → p-755e75c1.entry.js} +1 -1
  179. package/dist/verdocs-web-sdk/{p-66c250cd.entry.js → p-75da0854.entry.js} +1 -1
  180. package/dist/verdocs-web-sdk/p-766f8b54.system.entry.js +1 -0
  181. package/dist/verdocs-web-sdk/{p-75559986.entry.js → p-7bc548bf.entry.js} +1 -1
  182. package/dist/verdocs-web-sdk/{p-2a5678aa.entry.js → p-8638bd27.entry.js} +1 -1
  183. package/dist/verdocs-web-sdk/{p-d4550712.system.entry.js → p-87cf940c.system.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/{p-cd4d7848.entry.js → p-887d13dd.entry.js} +1 -1
  185. package/dist/verdocs-web-sdk/p-8c4fa7fc.entry.js +1 -0
  186. package/dist/verdocs-web-sdk/{p-a6626ecf.system.entry.js → p-8f370d3a.system.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/{p-065babe0.system.entry.js → p-8fc9f797.system.entry.js} +1 -1
  188. package/dist/verdocs-web-sdk/{p-54654ee0.system.entry.js → p-8fdcf4a9.system.entry.js} +1 -1
  189. package/dist/verdocs-web-sdk/{p-53cec4e6.entry.js → p-9176b478.entry.js} +1 -1
  190. package/dist/verdocs-web-sdk/p-a5ce9047.system.entry.js +1 -0
  191. package/dist/verdocs-web-sdk/{p-13135b13.system.entry.js → p-a7013467.system.entry.js} +1 -1
  192. package/dist/verdocs-web-sdk/{p-36995020.entry.js → p-ac1e8dfe.entry.js} +1 -1
  193. package/dist/verdocs-web-sdk/p-af048fad.js +1 -0
  194. package/dist/verdocs-web-sdk/{p-a3e2f68f.system.entry.js → p-b394b580.system.entry.js} +1 -1
  195. package/dist/verdocs-web-sdk/{p-e0379271.entry.js → p-b3bb3dbd.entry.js} +1 -1
  196. package/dist/verdocs-web-sdk/{p-789424cb.system.entry.js → p-b41338e5.system.entry.js} +1 -1
  197. package/dist/verdocs-web-sdk/p-b49e1610.entry.js +1 -0
  198. package/dist/verdocs-web-sdk/{p-3495a410.entry.js → p-b4dee4ca.entry.js} +1 -1
  199. package/dist/verdocs-web-sdk/{p-0e5108f1.system.entry.js → p-b6c70f34.system.entry.js} +1 -1
  200. package/dist/verdocs-web-sdk/p-b987bad4.system.entry.js +1 -0
  201. package/dist/verdocs-web-sdk/{p-520faa8e.entry.js → p-ba5565d4.entry.js} +1 -1
  202. package/dist/verdocs-web-sdk/p-bc943a21.entry.js +1 -0
  203. package/dist/verdocs-web-sdk/p-c23359af.system.entry.js +1 -0
  204. package/dist/verdocs-web-sdk/{p-f6b176b1.system.entry.js → p-c68cec17.system.entry.js} +1 -1
  205. package/dist/verdocs-web-sdk/p-c8d0324d.system.entry.js +1 -0
  206. package/dist/verdocs-web-sdk/{p-bdea2ff9.entry.js → p-c98bb9f4.entry.js} +1 -1
  207. package/dist/verdocs-web-sdk/{p-8d0d4e0c.system.entry.js → p-c9a691bf.system.entry.js} +1 -1
  208. package/dist/verdocs-web-sdk/{p-66d71204.entry.js → p-ccc162ab.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/{p-2db70c48.system.entry.js → p-cfb617a2.system.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/{p-0d5757a8.entry.js → p-cfdd1d5b.entry.js} +1 -1
  211. package/dist/verdocs-web-sdk/{p-b9535c18.entry.js → p-d145cb63.entry.js} +1 -1
  212. package/dist/verdocs-web-sdk/{p-72127c91.entry.js → p-d20e83c7.entry.js} +1 -1
  213. package/dist/verdocs-web-sdk/p-d6941876.entry.js +1 -0
  214. package/dist/verdocs-web-sdk/{p-0c85ee4f.system.entry.js → p-d7e29ce9.system.entry.js} +1 -1
  215. package/dist/verdocs-web-sdk/{p-546de38b.entry.js → p-dca1d739.entry.js} +1 -1
  216. package/dist/verdocs-web-sdk/{p-d5c9930b.entry.js → p-e01dd4e1.entry.js} +1 -1
  217. package/dist/verdocs-web-sdk/{p-672ed964.system.entry.js → p-e9200468.system.entry.js} +1 -1
  218. package/dist/verdocs-web-sdk/{p-23414209.system.entry.js → p-ea87070d.system.entry.js} +1 -1
  219. package/dist/verdocs-web-sdk/{p-9606946c.entry.js → p-ebe13a66.entry.js} +1 -1
  220. package/dist/verdocs-web-sdk/{p-90a11750.entry.js → p-ecf9aa75.entry.js} +1 -1
  221. package/dist/verdocs-web-sdk/{p-febca9d8.entry.js → p-f164307e.entry.js} +1 -1
  222. package/dist/verdocs-web-sdk/{p-74f5031e.entry.js → p-f2057d6b.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/{p-316909a7.system.entry.js → p-f57124fd.system.entry.js} +1 -1
  224. package/dist/verdocs-web-sdk/{p-7254de25.system.entry.js → p-f8940081.system.entry.js} +1 -1
  225. package/dist/verdocs-web-sdk/{p-80ead6ca.system.entry.js → p-fac26def.system.entry.js} +1 -1
  226. package/dist/verdocs-web-sdk/{p-09546ab7.js → p-fc6ce0d8.js} +1 -1
  227. package/dist/verdocs-web-sdk/p-fea16530.entry.js +1 -0
  228. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  229. package/package.json +1 -1
  230. package/dist/cjs/Roles-9b593b95.js +0 -28
  231. package/dist/cjs/verdocs-radio-button_3.cjs.entry.js +0 -241
  232. package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +0 -51
  233. package/dist/custom-elements.json +0 -1898
  234. package/dist/esm/Roles-6eb459df.js +0 -24
  235. package/dist/esm/verdocs-radio-button_3.entry.js +0 -235
  236. package/dist/esm/verdocs-toolbar-icon.entry.js +0 -47
  237. package/dist/esm-es5/Roles-6eb459df.js +0 -1
  238. package/dist/esm-es5/VerdocsEndpoint-e447b318.js +0 -1
  239. package/dist/esm-es5/verdocs-button-panel_3.entry.js +0 -1
  240. package/dist/esm-es5/verdocs-radio-button_3.entry.js +0 -1
  241. package/dist/esm-es5/verdocs-template-attachments_4.entry.js +0 -1
  242. package/dist/esm-es5/verdocs-template-document-page.entry.js +0 -1
  243. package/dist/esm-es5/verdocs-toolbar-icon.entry.js +0 -1
  244. package/dist/verdocs-web-sdk/p-0a86db90.system.entry.js +0 -1
  245. package/dist/verdocs-web-sdk/p-2960c946.entry.js +0 -1
  246. package/dist/verdocs-web-sdk/p-363b3a93.system.entry.js +0 -1
  247. package/dist/verdocs-web-sdk/p-56c6e677.entry.js +0 -1
  248. package/dist/verdocs-web-sdk/p-5a06c069.entry.js +0 -1
  249. package/dist/verdocs-web-sdk/p-633926d8.entry.js +0 -1
  250. package/dist/verdocs-web-sdk/p-8027431e.js +0 -1
  251. package/dist/verdocs-web-sdk/p-8229e6df.system.js +0 -1
  252. package/dist/verdocs-web-sdk/p-9f6d6545.system.entry.js +0 -1
  253. package/dist/verdocs-web-sdk/p-a3820b2c.entry.js +0 -1
  254. package/dist/verdocs-web-sdk/p-a9f25162.entry.js +0 -1
  255. package/dist/verdocs-web-sdk/p-aadfc04d.system.entry.js +0 -1
  256. package/dist/verdocs-web-sdk/p-b2d8c147.system.entry.js +0 -1
  257. package/dist/verdocs-web-sdk/p-d808a494.system.js +0 -1
  258. package/dist/verdocs-web-sdk/p-e06d9588.js +0 -1
  259. package/dist/verdocs-web-sdk/p-f3ac446d.system.entry.js +0 -1
  260. package/dist/verdocs-web-sdk/p-fdf8bc45.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as o,F as s,a as l}from"./p-6d3e0994.js";import"./p-05788c2b.js";import{V as a,T as r}from"./p-e06d9588.js";import{c as n,d}from"./p-567a6e7c.js";import{D as c,P as p,J as h,a as m,F as v,b as g,T as f}from"./p-637fee9b.js";import{g as u,a as x}from"./p-0bda34c0.js";import{S as w}from"./p-7a1b2643.js";import{c as b}from"./p-976ec9e8.js";import{i as y}from"./p-0d28cf05.js";import{u as q,c as C}from"./p-feb442b1.js";import{i as k}from"./p-7291906c.js";import{a as E,r as M,e as Z,f as H,h as z}from"./p-09546ab7.js";import{u as L,c as S}from"./p-8027431e.js";import{g as V}from"./p-6de76553.js";import"./p-21615f18.js";import"./p-eab67c09.js";import"./p-72c63106.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-c220af42.js";const T=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.templateUpdate=t(this,"templateUpdate",7),this.sdkError=t(this,"sdkError",7),this.endpoint=a.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 u(this.endpoint,this.templateId,!1)}catch(o){console.log("[TEMPLATE ATTACHMENTS] Error loading template",o),null===(e=this.sdkError)||void 0===e||e.emit(new w(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.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,o;e.stopPropagation();const s=e.detail.file;if(s){console.log("[ATTACHMENTS] Uploading...",s),this.uploading=!0,this.progressLabel="Uploading...";try{const e=await n(this.endpoint,this.templateId,s,this.handleUploadProgress.bind(this));console.log("[ATTACHMENTS] Created attachment",e),this.store=await u(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] New template",this.store.state),this.uploading=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[ATTACHMENTS] Error creating template",e),null===(t=this.sdkError)||void 0===t||t.emit(new w(e.message,null===(i=e.response)||void 0===i?void 0:i.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 d(this.endpoint,this.templateId,this.confirmDeleteDocument.id),this.store=await u(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 m;case"image/jpeg":return h;case"image/png":return p;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return c}return v}render(){var e,t,s;if(!this.endpoint.session)return i(o,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(o,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:g})),i("div",{class:"trash-icon",innerHTML:f,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===(s=this.store)||void 0===s?void 0:s.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(o,{class:"empty"}):i(o,{class:"loading"},i("verdocs-loader",null))}};T.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 D=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.endpoint=a.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,o,s;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0,this.progressLabel="Uploading...";try{const e=await b(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.next)||void 0===t||t.emit(e),this.creating=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[CREATE] Error creating template",e),null===(i=this.sdkError)||void 0===i||i.emit(new w(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(s=e.response)||void 0===s?void 0:s.data)),this.creating=!1}}}render(){return i(o,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."}))}};D.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='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>',I=[{id:"signature",tooltip:"Signature",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>'},{id:"initial",tooltip:"Initials",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>'},{id:"sep1",tooltip:"",icon:R},{id:"textbox",tooltip:"Text Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>'},{id:"textarea",tooltip:"Text Area",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>'},{id:"checkbox_group",tooltip:"Check Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>'},{id:"radio_button_group",tooltip:"Radio Button",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>'},{id:"dropdown",tooltip:"Dropdown",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>'},{id:"sep2",tooltip:"",icon:R},{id:"date",tooltip:"Date",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>'},{id:"timestamp",tooltip:"Timestamp",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z"></path></svg>'}],_=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.pageHeights={},this.store=null,this.cachedPageInfo={},this.endpoint=a.getDefault(),this.templateId=null,this.toolbarTargetId=null,this.placing=null,this.showMustSelectRole=!1,this.selectedRoleName="",this.rerender=1}async componentWillLoad(){var e,t,i,o,s,l,a;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELDS] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[FIELDS] Unable to start builder session, must be authenticated");this.store=await u(this.endpoint,this.templateId,!0),console.log(`[FIELDS] Loaded template ${this.templateId}`,this.store.state),this.selectedRoleName=(null===(o=null===(i=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles)||void 0===i?void 0:i[0])||void 0===o?void 0:o.name)||"",console.log("[FIELDS] Starting with role",this.selectedRoleName)}catch(e){console.log("[FIELDS] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new w(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(a=e.response)||void 0===a?void 0:a.data))}}componentDidRender(){y.dynamicDrop(!0);const e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null,t=document.getElementById("verdocs-template-fields-toolbar");e&&t&&(console.log("[FIELDS] Moving toolbar"),t.remove(),e.append(t))}componentWillUpdate(){var e,t,i,o,s,l;this.selectedRoleName&&((null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles)||[]).find((e=>e.name===this.selectedRoleName))||(this.selectedRoleName=(null===(l=null===(s=null===(o=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===o?void 0:o.roles)||void 0===s?void 0:s[0])||void 0===l?void 0:l.name)||"",console.log("[FIELDS] Selected new role",this.selectedRoleName))}handleKeyDown(e){"Escape"===e.key&&(this.placing=null)}async handleFieldChange(e,t,i){console.log("[FIELDS] handleFieldChange",e,t,i),this.rerender++}handleFieldSettingsChange(e,t,i,o,s){var l,a,r,n;console.log("[FIELDS] Field settings changed",t.name,s),Object.assign(t,s),o.field=s,this.selectedRoleName=t.role_name,o.setAttribute("roleindex",E(x(this.store),t.role_name)),o.field=null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.fields.find((e=>e.name===t.name)),this.rerender++,o.setAttribute("rerender",this.rerender),null===(r=this.templateUpdated)||void 0===r||r.emit({endpoint:this.endpoint,template:null===(n=this.store)||void 0===n?void 0:n.state,event:"updated-field"}),console.log("[FIELDS] Re-rendering field",t.name,e.pageNumber),this.reRenderField(t,e.pageNumber),M(t,e,i,{disabled:!0,editable:!0,draggable:!0})}attachFieldAttributes(e,t,i,o){o.addEventListener("input",(e=>this.handleFieldChange(t,e))),o.addEventListener("settingsChanged",(s=>this.handleFieldSettingsChange(e,t,i,o,s.detail.field))),o.addEventListener("deleted",(()=>{var e,i;console.log("[FIELDS] Deleted",this,t),o.remove(),this.rerender++,null===(e=this.templateUpdated)||void 0===e||e.emit({endpoint:this.endpoint,template:null===(i=this.store)||void 0===i?void 0:i.state,event:"updated-field"})})),o.setAttribute("templateid",this.templateId),o.setAttribute("roleindex",i),o.setAttribute("pageNumber",e.pageNumber),o.setAttribute("xScale",e.xScale),o.setAttribute("yScale",e.yScale),o.setAttribute("name",t.name)}handlePageRendered(e){var t;const i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i),this.cachedPageInfo[i.pageNumber]=i,this.pageHeights[i.pageNumber]=i.naturalHeight,(null===(t=this.store)||void 0===t?void 0:t.state.fields.filter((e=>e.page_sequence===i.pageNumber))).forEach((e=>this.reRenderField(e,i.pageNumber)))}reRenderField(e,t){const i=this.cachedPageInfo[t],o=E(x(this.store),e.role_name),s=M(e,i,o,{disabled:!0,editable:!0,draggable:!0});s&&(Array.isArray(s)?s.forEach((t=>{this.attachFieldAttributes(i,e,o,t),this.makeDraggable(t)})):(this.attachFieldAttributes(i,e,o,s),this.makeDraggable(s)))}makeDraggable(e){y(e).draggable({listeners:{move:this.handleMoveField.bind(this),end:this.handleMoveEnd.bind(this)}})}async handleMoveField(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),o=+(e.target.getAttribute("xScale")||1),s=+(e.target.getAttribute("yScale")||1),l=e.dx/o+t,a=e.dy/s+i;e.target.setAttribute("posX",l),e.target.setAttribute("posy",a),Z(e.target,"translate",`${l}px, ${a}px`)}async handleMoveEnd(e){var t;const i=e.target.getAttribute("pageNumber"),{naturalWidth:o=612,naturalHeight:s=792,renderedHeight:l=792}=this.cachedPageInfo[i],a=e.target.getBoundingClientRect(),r=e.target.parentElement.getBoundingClientRect(),n=Math.max(a.left-r.left,0),d=Math.max(l-(r.bottom-a.bottom),0),{x:c,y:p}=this.viewCoordinatesToPageCoordinates(n,d,i,o-e.rect.width,s-e.rect.height),h=e.target.getAttribute("name"),m=+(e.target.getAttribute("option")||"0"),v=null===(t=this.store)||void 0===t?void 0:t.state.fields.find((e=>e.name===h));if(v){switch(v.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":v.setting.x=c,v.setting.y=p;break;case"checkbox_group":case"radio_button_group":{const e=v.setting.options[m];e&&(e.x=c,e.y=p)}}console.log("[FIELDS] Will update",h,m,v);const t=await q(this.endpoint,this.templateId,h,v),o=this.cachedPageInfo[i],s=E(x(this.store),v.role_name);this.handleFieldSettingsChange(o,v,s,e.target,t),e.target.removeAttribute("posX"),e.target.removeAttribute("posY")}}generateFieldName(e,t){var i;let o,s=1;do{o=`${e}P${t}-${s}`,s++}while(null===(i=this.store)||void 0===i?void 0:i.state.fields.some((e=>e.name===o)));return o}viewCoordinatesToPageCoordinates(e,t,i,o,s){const{xScale:l=1,yScale:a=1,renderedHeight:r=792}=this.cachedPageInfo[i];return{x:Math.floor(Math.min(e/l,o)),y:Math.floor(Math.min(Math.max(r-t,0)/a,s))}}async handleClickPage(e,t){var i,o,s;if(this.placing){const l=e.offsetX,a=e.offsetY,r=H(this.placing),n=z(this.placing),d=this.cachedPageInfo[t],{naturalWidth:c=612,naturalHeight:p=792}=d,h=this.viewCoordinatesToPageCoordinates(l,a,t,c-r,p-n),m=Math.floor(h.x),v=Math.floor(h.y),g={name:this.generateFieldName(this.placing,t),role_name:this.selectedRoleName,template_id:this.templateId,document_id:d.documentId,type:this.placing,required:!0,page_sequence:t,validator:null,setting:{x:m,y:v},x:m,y:v,tabindex:0,width:r,height:n};switch(g.type){case"attachment":case"payment":g.setting={x:m,y:v};break;case"initial":case"signature":g.setting={x:m,y:v,result:""};break;case"checkbox_group":g.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:`${g.name}-1`,value:"Option 1",checked:!1,x:m,y:v}]};break;case"date":g.setting={x:m,y:v,width:r,height:n,result:""};break;case"dropdown":g.required=!1,g.setting={x:m,y:v,width:r,height:n,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":g.setting={options:[{id:`${g.name}-1`,value:"Option 1",selected:!1,x:m,y:v}]};break;case"textarea":case"textbox":g.setting={x:m,y:v,width:r,height:n,result:"",leading:0,alignment:0,upperCase:!1};break;case"timestamp":g.setting={x:m,y:v,width:r,height:n}}"textarea"===g.type&&(g.setting.leading=16,g.type="textbox");const f=await C(this.endpoint,this.templateId,g);console.log("Saved field",f),this.store.state&&(this.store.state.fields=[...null===(i=this.store)||void 0===i?void 0:i.state.fields,f]),this.placing=null,null===(o=this.templateUpdated)||void 0===o||o.emit({endpoint:this.endpoint,template:null===(s=this.store)||void 0===s?void 0:s.state,event:"added-field"}),this.handlePageRendered({detail:this.cachedPageInfo[t]})}}render(){var e,t,s,l,a,r,n,d;if(console.log("[FIELDS] Rendering",this.selectedRoleName),!this.endpoint.session)return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(!(null===(e=this.store)||void 0===e?void 0:e.state.isLoaded))return i(o,null,i("verdocs-loader",null));const c=null===(s=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===s?void 0:s.roles.map((e=>({value:e.name,label:e.name})));return i(o,{class:this.placing?{[`placing-${this.placing}`]:!0}:{},"data-r":this.rerender,onSubmit:()=>{console.log("onSubmit")}},i("div",{id:"verdocs-template-fields-toolbar"},i("div",{class:"add-for"},"Add field:"),i("verdocs-select-input",{value:this.selectedRoleName,options:c,onInput:e=>this.selectedRoleName=e.target.value}),I.map((e=>i("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:()=>{e.tooltip&&(this.selectedRoleName?this.placing=e.id:this.showMustSelectRole=!0)}})))),i("div",{class:"pages"},((null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.template_documents)||[]).map((e=>k(1,e.page_numbers).map((t=>i("verdocs-template-document-page",{templateId:this.templateId,documentId:e.id,pageNumber:t,virtualWidth:612,virtualHeight:792,onClick:e=>this.handleClickPage(e,t),onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})))))),this.showMustSelectRole&&i("verdocs-ok-dialog",{heading:"Unable to add field",message:(null===(d=null===(n=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===n?void 0:n.roles)||void 0===d?void 0:d.length)>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:()=>this.showMustSelectRole=!1}))}};_.style="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio_button_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";const j={[r.EVERYONE]:"Everyone",[r.EVERYONE_AS_CREATOR]:"Everyone as Me",[r.ORGANIZATION_MEMBER]:"Organization member",[r.ORGANIZATION_MEMBER_AS_CREATOR]:"Organization Member as Me",[r.CREATOR]:"Me"},A='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>',F='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>',N='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>',Q='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',U='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>',O=class{constructor(i){e(this,i),this.next=t(this,"next",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.sequences=[],this.store=null,this.endpoint=a.getDefault(),this.templateId="",this.showingRoleDialog=null,this.showingSenderDialog=!1,this.sender=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 u(this.endpoint,this.templateId,!0),this.sortTemplateRoles(),this.renumberTemplateRoles()}catch(o){console.log("[FIELDS] Error with preview session",o),null===(e=this.sdkError)||void 0===e||e.emit(new w(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}}componentDidRender(){y.dynamicDrop(!0),y(".recipient").draggable({listeners:{start:function(e){e.target.classList.add("dragging"),this.el.classList.add("dragging")}.bind(this),move:function(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),o=e.dx+t,s=e.dy+i;e.target.setAttribute("posX",o),e.target.setAttribute("posy",s),e.target.style.transform=`translate(${o+100}px, ${s-40}px)`}.bind(this),end:function(e){e.target.classList.remove("dragging"),this.el.classList.remove("dragging"),e.target.setAttribute("posX",0),e.target.setAttribute("posy",0),e.target.style.transform="translate(0px, 0px)"}.bind(this)}}),y(".dropzone").dropzone({overlap:.05,ondrop:function(e){var t,i,o,s,l;e.target.classList.remove("active");const a=e.relatedTarget.dataset.rolename,r=+e.target.dataset.sequence,n=+e.target.dataset.order,d=null===(o=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.roles)||void 0===o?void 0:o.find((e=>e.name===a));d&&(d.sequence=r,d.order=n,this.sortTemplateRoles(),this.renumberTemplateRoles(),this.forceRerender++,Promise.all(null===(l=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===l?void 0:l.roles.map((e=>L(this.endpoint,this.templateId,e.name,{sequence:e.sequence,order:e.order})))).then((()=>{var e,t;console.log("[ROLES] Updated roles"),null===(e=this.templateUpdated)||void 0===e||e.emit({event:"updated-role",endpoint:this.endpoint,template:null===(t=this.store)||void 0===t?void 0:t.state})})).catch((e=>console.log("[ROLES] Role updates failed",e))))}.bind(this),ondropactivate:e=>{e.target.classList.add("visible")},ondropdeactivate:e=>{e.target.classList.remove("visible")},ondragenter:e=>{e.target.classList.add("active")},ondragleave:e=>{e.target.classList.remove("active")}})}handleCancel(){var e;null===(e=this.exit)||void 0===e||e.emit()}handleSubmit(){var e;null===(e=this.next)||void 0===e||e.emit()}sortTemplateRoles(){var e,t;null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t||t.roles.sort(((e,t)=>e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence))}extractSequenceNumbers(){var e,t;this.sequences=[],null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t||t.roles.forEach((e=>{this.sequences.includes(e.sequence)||this.sequences.push(e.sequence)}))}renumberTemplateRoles(){this.extractSequenceNumbers();const e=[];this.sequences.sort(((e,t)=>e-t)),this.sequences.forEach(((t,i)=>{var o,s;null===(s=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===s||s.roles.filter((e=>e.sequence===t)).forEach(((t,o)=>{e.includes(t.name)||(t.sequence=i+1,t.order=o+1,e.push(t.name))}))})),this.extractSequenceNumbers()}getNextRoleName(){var e,t,i,o;let s="",l=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles.length;do{l++,s=`Recipient ${l}`}while(!s||(null===(o=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===o?void 0:o.roles.some((e=>e.name===s))));return s}callCreateRole(e,t,i){console.log("[ROLES] Will create role",{name:e,sequence:t,order:i}),S(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,order:i,full_name:"",email:"",phone:"",type:"signer",delegator:!1}).then((async e=>{var t,i;console.log("[ROLES] Created role",e),this.store=await u(this.endpoint,this.templateId,!0),this.sortTemplateRoles(),this.renumberTemplateRoles(),null===(t=this.templateUpdated)||void 0===t||t.emit({event:"created-role",endpoint:this.endpoint,template:null===(i=this.store)||void 0===i?void 0:i.state})})).catch((e=>{console.log("[ROLES] Error creating role",e)}))}handleAddRole(e,t){var i;e.stopPropagation();const o=(null===(i=this.store)||void 0===i?void 0:i.state.roles.filter((e=>e.sequence===t)).length)+1,s=this.getNextRoleName();this.callCreateRole(s,t,o)}handleAddStep(e,t){e.stopPropagation();const i=this.getNextRoleName();this.callCreateRole(i,t,1)}render(){var e,t,l,a,r,n;if(console.log("[ROLES] Rendering"),!this.endpoint.session)return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(!(null===(e=this.store)||void 0===e?void 0:e.state.isLoaded))return i(o,{class:"loading"},i("verdocs-loader",null));const d=((null===(l=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===l?void 0:l.roles)||[]).map((e=>e.name));return i(o,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off","data-r":null===(a=this.store.state)||void 0===a?void 0:a.updateCount},i("h5",null,"Roles and Workflow"),i("div",{class:"participants"},i("div",{class:"left-line"}),i("div",{class:"row"},i("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>'}),i("div",{class:"row-roles"},i("div",{class:"sender"},i("span",{class:"label"},"Sender:")," ",j[null===(n=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===n?void 0:n.sender]," ",i("div",{class:"settings-button",innerHTML:A,onClick:()=>this.showingSenderDialog=!0,"aria-role":"button"})))),i("div",{class:"row add-sequence","data-sequence":0},i("div",{class:"icon",innerHTML:F}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((e=>{var t,o;return i(s,null,i("div",{class:"row"},i("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>'}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-order":.5,"data-sequence":e}),null===(o=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===o?void 0:o.roles.filter((t=>t.sequence===e)).map((t=>i(s,null,t.email?i("div",{class:"recipient",style:{borderColor:V(E(d,t.name))},"data-rolename":t.name},i("span",{class:"type-icon",innerHTML:"signer"===t.type?N:"cc"===t.type?U:Q}),t.full_name," ",i("div",{class:"settings-button",innerHTML:A,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"})):i("div",{class:"recipient",style:{backgroundColor:V(E(d,t.name))},"data-rolename":t.name},i("span",{class:"type-icon",innerHTML:"signer"===t.type?N:"cc"===t.type?U:Q}),t.name," ",i("div",{class:"settings-button",innerHTML:A,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"})),i("div",{class:"dropzone","data-order":t.order+.5,"data-sequence":e})))),i("button",{class:"add-role",innerHTML:F,onClick:t=>this.handleAddRole(t,e)}))),this.sequences.length>0&&i("div",{class:"row add-sequence","data-sequence":e},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:F}),i("div",{class:"dropzone","data-sequence":e+1,"data-order":1},"Add Step"))))})),i("div",{class:"row","data-sequence":this.sequences.length+1},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:F}),i("button",{class:"add-step",innerHTML:F,onClick:e=>this.handleAddStep(e,this.sequences.length+1)}))),i("div",{class:"row"},i("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>'}),i("div",{class:"row-roles"},i("div",{class:"complete"},"Document Complete")))),d.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:F})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:"OK",size:"small",onClick:()=>this.handleSubmit(),disabled:d.length<1}))),this.showingRoleDialog&&i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{this.showingRoleDialog=null},onDelete:async()=>{var e,t;await u(this.endpoint,this.templateId,!0),this.renumberTemplateRoles(),this.showingRoleDialog=null,null===(e=this.templateUpdated)||void 0===e||e.emit({event:"deleted-role",endpoint:this.endpoint,template:null===(t=this.store)||void 0===t?void 0:t.state})}}),this.showingSenderDialog&&i("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:()=>this.showingSenderDialog=!1}))}get el(){return l(this)}};O.style='verdocs-template-roles{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 15px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{display:-ms-flexbox;display:flex;cursor:pointer;margin:0 0 0 9px}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:2px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-role svg{width:32px;height:32px}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-roles .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-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}';export{T as verdocs_template_attachments,D as verdocs_template_create,_ as verdocs_template_fields,O as verdocs_template_roles}
@@ -1 +0,0 @@
1
- import{r as o,h as t,H as i}from"./p-6d3e0994.js";import{c as r}from"./p-7c0dcd00.js";const e=class{constructor(t){o(this,t),this.text="",this.icon="",this.placement="bottom",this.containerId=`verdocs-toolbar-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=r(this.iconEl,this.tooltip,{placement:this.placement,modifiers:"left"===this.placement?[{name:"offset",options:{offset:[0,20]}}]:[]})}disconnectedCallback(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}show(){var o,t;null===(o=this.tooltip)||void 0===o||o.setAttribute("data-show",""),null===(t=this.popperInstance)||void 0===t||t.update().catch((()=>{}))}hide(){var o;null===(o=this.tooltip)||void 0===o||o.removeAttribute("data-show")}render(){return t(i,{class:{}},t("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:o=>this.iconEl=o}),t("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:o=>this.tooltip=o},this.text,t("div",{"data-popper-arrow":"true",class:"arrow"})))}};e.style='verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';export{e as verdocs_toolbar_icon}
@@ -1 +0,0 @@
1
- var t=function(t,n,r){return t.api.post("/templates/".concat(n,"/roles"),r).then((function(t){return t.data}))},n=function(t,n,r,e){return t.api.put("/templates/".concat(n,"/roles/").concat(r),e).then((function(t){return t.data}))},r=function(t,n,r){return t.api.delete("/templates/".concat(n,"/roles/").concat(r)).then((function(t){return t.data}))};export{t as c,r as d,n as u}
@@ -1 +0,0 @@
1
- System.register([],(function(t){"use strict";return{execute:function(){var n=t("c",(function(t,n,e){return t.api.post("/templates/".concat(n,"/roles"),e).then((function(t){return t.data}))}));var e=t("u",(function(t,n,e,r){return t.api.put("/templates/".concat(n,"/roles/").concat(e),r).then((function(t){return t.data}))}));var r=t("d",(function(t,n,e){return t.api.delete("/templates/".concat(n,"/roles/").concat(e)).then((function(t){return t.data}))}))}}}));
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,a){function s(t){try{c(n.next(t))}catch(t){a(t)}}function o(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?i(t.value):r(t.value).then(s,o)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,r,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(s[0]===6&&i.label<a[1]){i.label=a[1];a=s;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(s);break}if(a[2])i.ops.pop();i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t];r=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-2dbc05c6.system.js","./p-54498887.system.js","./p-d808a494.system.js","./p-6e9af353.system.js","./p-4e335343.system.js","./p-bbee73c8.system.js","./p-4cb3fa5f.system.js","./p-327858f0.system.js","./p-7fd7152d.system.js","./p-dc9c4361.system.js"],(function(t){"use strict";var e,i,n,r,a,s,o,c;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;a=t.a},function(){},function(t){s=t.V},function(t){o=t.g},function(t){c=t.t},function(){},function(){},function(){},function(){},function(){}],execute:function(){var h="verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}";var u=t("verdocs_template_document_page",function(){function t(t){e(this,t);this.pageRendered=i(this,"pageRendered",7);this.endpoint=s.getDefault();this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri=""}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,o(this.endpoint,this.templateId,this.documentId,this.pageNumber)];case 1:t.pageDisplayUri=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.resizeObserver=new ResizeObserver(c((function(e){for(var i=0,n=e;i<n.length;i++){var r=n[i];var a=r.contentRect.width;t.renderedWidth=a;t.renderedHeight=t.virtualHeight*(a/t.virtualWidth)}t.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};t.prototype.disconnectedCallback=function(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};t.prototype.render=function(){var t=this;var e="".concat(this.renderedHeight,"px");return n(r,{id:"".concat(this.containerId),style:{height:e,flex:"0 0 ".concat(e)}},this.layers.map((function(i){return i.type==="div"?n("div",{class:"verdocs-template-document-page-layer",id:"".concat(t.containerId,"-").concat(i.name),style:{height:e}}):t.pageDisplayUri?n("img",{class:"verdocs-template-document-page-layer img",id:"".concat(t.containerId,"-").concat(i.name),src:t.pageDisplayUri,alt:"Page ".concat(t.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(e){t.naturalWidth=e.target.naturalWidth;t.naturalHeight=e.target.naturalHeight;t.aspectRatio=t.naturalWidth/t.naturalHeight;t.virtualHeight=t.virtualWidth/t.aspectRatio;t.renderedHeight=e.target.offsetWidth/t.aspectRatio}}):n("div",null)})))};Object.defineProperty(t.prototype,"container",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());u.style=h}}}));
@@ -1 +0,0 @@
1
- import{r as e,h as t,H as i,c as o,a as s}from"./p-6d3e0994.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-e06d9588.js";import{u as a,d}from"./p-feb442b1.js";import{g as p}from"./p-0bda34c0.js";import{S as c}from"./p-7a1b2643.js";import"./p-21615f18.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)))}};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}';const u=class{constructor(t){e(this,t),this.value="",this.label="",this.options=void 0,this.disabled=!1}render(){return t(i,{class:"input-field"},t("label",null,this.label?t("div",{class:"input-label"},this.label+":"):t("div",null),t("select",{class:"input-element",disabled:this.disabled},this.options.map((e=>t("option",{value:e.value,selected:e.value===this.value},e.label))))))}};var v;u.style='verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #cccccc;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:28px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';var f=void 0!==l&&(l.crypto||l.msCrypto);if(f&&f.getRandomValues){var m=new Uint8Array(16);v=function(){return f.getRandomValues(m),m}}if(!v){var x=new Array(16);v=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),x[t]=e>>>((3&t)<<3)&255;return x}}for(var b=v,g=[],w=0;w<256;++w)g[w]=(w+256).toString(16).substr(1);var y=function(e,t){var i=t||0;return g[e[i++]]+g[e[i++]]+g[e[i++]]+g[e[i++]]+"-"+g[e[i++]]+g[e[i++]]+"-"+g[e[i++]]+g[e[i++]]+"-"+g[e[i++]]+g[e[i++]]+"-"+g[e[i++]]+g[e[i++]]+g[e[i++]]+g[e[i++]]+g[e[i++]]+g[e[i++]]},k=b(),I=[1|k[0],k[1],k[2],k[3],k[4],k[5]],q=16383&(k[6]<<8|k[7]),E=0,z=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||b)();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||y(s)},R=T;R.v1=function(e,t,i){var o=t&&i||0,s=t||[],r=void 0!==(e=e||{}).clockseq?e.clockseq:q,l=void 0!==e.msecs?e.msecs:(new Date).getTime(),n=void 0!==e.nsecs?e.nsecs:z+1,a=l-E+(n-z)/1e4;if(a<0&&void 0===e.clockseq&&(r=r+1&16383),(a<0||l>E)&&void 0===e.nsecs&&(n=0),n>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");E=l,z=n,q=r;var d=(1e4*(268435455&(l+=122192928e5))+n)%4294967296;s[o++]=d>>>24&255,s[o++]=d>>>16&255,s[o++]=d>>>8&255,s[o++]=255&d;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||I,h=0;h<6;++h)s[o+h]=c[h];return t||y(s)},R.v4=T;var _=R;const C=e=>e.charAt(0).toUpperCase()+e.slice(1),L='<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>',P='<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>',j=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,a;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===(a=e.response)||void 0===a?void 0:a.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}),a(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:_(),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:_(),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],a(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.")&&d(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,C(this.fieldType)," Settings ",t("div",{style:{flex:"1"}}),t("div",{class:"help-icon",innerHTML:P,onClick:()=>this.showingHelp=!1})),t("p",{class:"instructions",innerHTML:this.helpText})):t(i,null,t("h6",null,C(this.fieldType.replace(/_/g," "))," Settings ",t("div",{style:{flex:"1"}}),this.helpText&&t("div",{class:"help-icon",innerHTML:P,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:L,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:L}),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)}};j.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,u as verdocs_select_input,j as verdocs_template_field_properties}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as r,H as s}from"./p-6d3e0994.js";import{V as i}from"./p-e06d9588.js";import"./p-05788c2b.js";const a=class{constructor(r){t(this,r),this.starChange=e(this,"starChange",7),this.sdkError=e(this,"sdkError",7),this.endpoint=i.getDefault(),this.template=void 0,this.updating=!1}async componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[TEMPLATES] Must be authenticated")}toggle(t){var e,r;t.stopPropagation(),this.updating=!0,(e=i.getDefault(),r=this.template.id,e.api.post("/templates/".concat(r,"/stars/toggle")).then((function(t){return t.data}))).then((t=>{this.updating=!1,this.template.star_counter=t.star_counter,this.starChange.emit({templateId:this.template.id,starred:t.is_starred,count:t.star_counter})})).catch((t=>{this.updating=!1,console.log("[STAR] Error toggling template star",t.message),this.sdkError.emit(t)}))}render(){return r(s,null,r("div",{class:"star "+(this.updating?"updating":""),innerHTML:this.template.star_counter?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z" clip-rule="evenodd" /></svg>':'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /></svg>',onClick:t=>this.toggle(t)}),r("div",{class:"count"},this.template.star_counter||"--"))}};a.style='verdocs-template-star{display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-template-star .star{line-height:10px}verdocs-template-star .star.updating{-webkit-animation:spinningStar 2s infinite linear;animation:spinningStar 2s infinite linear}verdocs-template-star .star svg{width:24px;height:24px}verdocs-template-star .count{color:#595c5d;font-size:14px;margin-left:10px}@-webkit-keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}';export{a as verdocs_template_star}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,s,i){function l(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,n){function a(e){try{o(i.next(e))}catch(e){n(e)}}function r(e){try{o(i["throw"](e))}catch(e){n(e)}}function o(e){e.done?s(e.value):l(e.value).then(a,r)}o((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var s={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,l,n,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(e){return function(t){return o([e,t])}}function o(a){if(i)throw new TypeError("Generator is already executing.");while(s)try{if(i=1,l&&(n=a[0]&2?l["return"]:a[0]?l["throw"]||((n=l["return"])&&n.call(l),0):l.next)&&!(n=n.call(l,a[1])).done)return n;if(l=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:s.label++;return{value:a[1],done:false};case 5:s.label++;l=a[1];a=[0];continue;case 7:a=s.ops.pop();s.trys.pop();continue;default:if(!(n=s.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){s=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){s.label=a[1];break}if(a[0]===6&&s.label<n[1]){s.label=n[1];n=a;break}if(n&&s.label<n[2]){s.label=n[2];s.ops.push(a);break}if(n[2])s.ops.pop();s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e];l=0}finally{i=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-2dbc05c6.system.js","./p-54498887.system.js","./p-d808a494.system.js","./p-2fdb7348.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,s,i,l,n,a,r,o,c,d,p;return{setters:[function(e){t=e.r;s=e.c;i=e.h;l=e.H},function(){},function(e){n=e.V;a=e.c},function(e){r=e.l;o=e.d},function(e){c=e.V},function(e){d=e.S},function(e){p=e.f}],execute:function(){var h='verdocs-templates-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-templates-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .header .filter{width:150px}verdocs-templates-list .header verdocs-text-input{margin:0}verdocs-templates-list .header verdocs-text-input input{height:32px}verdocs-templates-list .filter{-ms-flex-align:center;align-items:center}verdocs-templates-list .template{width:100%;margin:3px 0;border:1px solid #ffffff;background:#ffffff}verdocs-templates-list .template:hover{cursor:pointer;background:#ededff;border:1px solid #a7a7f5}verdocs-templates-list .template .inner{gap:10px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-templates-list .template .inner svg{width:24px;height:24px}verdocs-templates-list .name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:black;font-size:16px;margin-left:10px}@media screen and (max-width: 1300px){verdocs-templates-list .name{font-size:16px}}verdocs-templates-list .spacer{margin:0;height:30px;-ms-flex:0 0 1px;flex:0 0 1px;display:-ms-flexbox;display:flex;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-templates-list .spacer{margin:12px 0;border-top:1px solid #dad8dd;border-right:none}}verdocs-templates-list .empty-text{font-size:20px;text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-templates-list .usage,verdocs-templates-list .ownership,verdocs-templates-list .last-used{gap:10px;color:#444;display:-ms-flexbox;display:flex;font-size:16px;margin:0 0 0 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .usage span,verdocs-templates-list .usage svg,verdocs-templates-list .ownership span,verdocs-templates-list .ownership svg,verdocs-templates-list .last-used span,verdocs-templates-list .last-used svg{width:24px;height:24px}verdocs-templates-list .usage span,verdocs-templates-list .ownership span,verdocs-templates-list .last-used span{display:block}verdocs-templates-list .ownership{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-templates-list .last-used{-ms-flex:0 0 130px;flex:0 0 130px}verdocs-templates-list .usage{-ms-flex:0 0 60px;flex:0 0 60px}';var u='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>';var v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>';var m='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>';var g='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>';var w='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>';var x='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>';var b=[{value:"all",label:"All"},{value:"personal",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];var y=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];var z=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];var k=e("verdocs_templates_list",function(){function e(e){var i=this;t(this,e);this.sdkError=s(this,"sdkError",7);this.viewTemplate=s(this,"viewTemplate",7);this.editTemplate=s(this,"editTemplate",7);this.templateDeleted=s(this,"templateDeleted",7);this.changeSort=s(this,"changeSort",7);this.changeSharing=s(this,"changeSharing",7);this.changeStarred=s(this,"changeStarred",7);this.changeName=s(this,"changeName",7);this.handleOptionSelected=function(e,t){var s,l;if(e==="send"){(s=i.viewTemplate)===null||s===void 0?void 0:s.emit({endpoint:i.endpoint,template:t})}else if(e==="createlink"){c("This feature is coming soon!")}else if(e==="signnow"){c("This feature is coming soon!")}else if(e==="submitted"){c("This feature is coming soon!")}else if(e==="link"){c("This feature is coming soon!")}else if(e==="edit"){(l=i.editTemplate)===null||l===void 0?void 0:l.emit({endpoint:i.endpoint,template:t})}else if(e==="delete"){i.confirmDelete=t}};this.endpoint=n.getDefault();this.sharing="all";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","createlink","signnow","submitted","link","edit","delete"];this.selectedPage=0;this.count=0;this.loading=true;this.confirmDelete=null;this.templates=[]}e.prototype.handleSharingUpdated=function(){return this.queryTemplates()};e.prototype.handleStarredUpdated=function(){return this.queryTemplates()};e.prototype.handleSortUpdated=function(){return this.queryTemplates()};e.prototype.handleNameUpdated=function(){return this.queryTemplates()};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return[2]}return[2,this.queryTemplates()]}))}))};e.prototype.queryTemplates=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,s,i,l,n;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);i={sharing:this.sharing,starred:this.starred,page:this.selectedPage,sort:this.sort};if(this.name.trim()!==""){i.name=this.name.trim()}return[4,r(this.endpoint,i)];case 1:l=a.sent();this.templates=l.records;this.count=l.total;this.loading=false;return[3,3];case 2:n=a.sent();console.log("[TEMPLATES] Error with preview session",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(s=n.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.canDelete=function(e){return a(this.endpoint.session,"delete",e)};e.prototype.canEdit=function(e){return a(this.endpoint.session,"write",e)};e.prototype.canPreview=function(e){var t=a(this.endpoint.session,"read",e);return t};e.prototype.deleteTemplate=function(e){var t=this;this.confirmDelete=null;o(this.endpoint,e.id).then((function(){var s;console.log("[TEMPLATES] Deleted template",e);(s=t.templateDeleted)===null||s===void 0?void 0:s.emit({endpoint:t.endpoint,template:e});return t.queryTemplates()})).catch((function(s){var i,l,n;console.log("[TEMPLATES] Error deleting template",e);(i=t.sdkError)===null||i===void 0?void 0:i.emit(new d(s.message,(l=s.response)===null||l===void 0?void 0:l.status,(n=s.response)===null||n===void 0?void 0:n.data))}))};e.prototype.render=function(){var e=this;return i(l,null,i("div",{class:"header"},i("div",{class:"filter"},i("verdocs-text-input",{id:"verdocs-filter-name",value:this.name,autocomplete:"off",placeholder:"Filter by Name...",onFocusout:function(t){var s;e.name=t.target.value;(s=e.changeName)===null||s===void 0?void 0:s.emit(e.name)}})),i("verdocs-quick-filter",{label:"Sharing",value:this.sharing,options:b,onOptionSelected:function(t){var s;e.sharing=t.detail.value;(s=e.changeSharing)===null||s===void 0?void 0:s.emit(e.sharing)}}),i("verdocs-quick-filter",{label:"Starred",value:this.starred,options:y,onOptionSelected:function(t){var s;e.starred=t.detail.value;(s=e.changeStarred)===null||s===void 0?void 0:s.emit(e.starred)}}),i("verdocs-quick-filter",{label:"Sort By",value:this.sort,options:z,onOptionSelected:function(t){var s;e.sort=t.detail.value;(s=e.changeSort)===null||s===void 0?void 0:s.emit(e.sort)}}),this.loading&&i("verdocs-spinner",{mode:"dark",size:24}),i("div",{style:{display:"flex",flex:"1"}})),this.templates.map((function(t){var s=e.sort==="created_at"?"created_at":e.sort==="updated_at"?"updated_at":"last_used_at";var l=t[s];var n=[];if(e.allowedActions.includes("send")){n.push({label:"Send",id:"send",disabled:!e.canPreview(t)})}if(e.allowedActions.includes("createlink")){n.push({label:"Create Link",id:"createlink",disabled:true})}if(e.allowedActions.includes("createlink")){n.push({label:"Sign Now",id:"signnow",disabled:true})}if(e.allowedActions.includes("submitted")){n.push({label:""});n.push({label:"Submissions",id:"submitted"})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){n.push({label:""});if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){n.push({label:"Get Preview Link",id:"link",disabled:!e.canPreview(t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){n.push({label:"Edit",id:"edit",disabled:!e.canEdit(t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){n.push({label:"Delete",id:"delete",disabled:!e.canDelete(t)})}}return i("div",{class:"template",onClick:function(){var s;(s=e.viewTemplate)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,template:t})}},i("div",{class:"inner"},i("verdocs-template-star",{template:t,endpoint:e.endpoint}),i("div",{class:"spacer icon-spacer"}),i("div",{class:"name"},t.name),i("div",{class:"spacer usage-spacer"}),i("div",{class:"usage"},i("span",{innerHTML:f,title:"Usage Counter"}),t.counter||"--"),i("div",{class:"spacer last-used-spacer"}),i("div",{class:"last-used"},s==="created_at"&&i("span",{innerHTML:g,title:"Created"}),s==="updated_at"&&i("span",{innerHTML:x,title:"Last Updated"}),s==="last_used_at"&&i("span",{innerHTML:w,title:"Last Used"}),l?p(new Date(l),"P"):"Never"),i("div",{class:"spacer ownership-spacer"}),t.is_public&&i("div",{class:"ownership"},i("span",{innerHTML:u})," Public"),!t.is_public&&!t.is_personal&&i("div",{class:"ownership"},i("span",{innerHTML:v})," Private"),!t.is_public&&t.is_personal&&i("div",{class:"ownership"},i("span",{innerHTML:m})," Shared"),i("verdocs-dropdown",{options:n,onOptionSelected:function(s){return e.handleOptionSelected(s.detail.id,t)}})))})),!this.templates.length?i("div",{class:"empty-text"},"No matching templates found. Please adjust your filters and try again."):i("div",{style:{marginTop:"10px"}},i("verdocs-pagination",{selectedPage:this.selectedPage,perPage:10,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage;return e.queryTemplates()}})),this.confirmDelete&&i("verdocs-ok-dialog",{heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:function(){return e.deleteTemplate(e.confirmDelete)},onExit:function(){return e.confirmDelete=null},showCancel:true}))};Object.defineProperty(e,"watchers",{get:function(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"]}},enumerable:false,configurable:true});return e}());k.style=h}}}));
@@ -1 +0,0 @@
1
- System.register(["./p-2dbc05c6.system.js","./p-9a5ff58c.system.js"],(function(o){"use strict";var t,e,i,r;return{setters:[function(o){t=o.r;e=o.h;i=o.H},function(o){r=o.c}],execute:function(){var n='verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var p=o("verdocs_toolbar_icon",function(){function o(o){t(this,o);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}o.prototype.componentDidLoad=function(){this.popperInstance=r(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};o.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};o.prototype.show=function(){var o,t;(o=this.tooltip)===null||o===void 0?void 0:o.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};o.prototype.hide=function(){var o;(o=this.tooltip)===null||o===void 0?void 0:o.removeAttribute("data-show")};o.prototype.render=function(){var o=this;return e(i,{class:{}},e("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return o.show()},onFocus:function(){return o.show()},onMouseLeave:function(){return o.hide()},onBlur:function(){return o.hide()},ref:function(t){return o.iconEl=t}}),e("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return o.tooltip=t}},this.text,e("div",{"data-popper-arrow":"true",class:"arrow"})))};return o}());p.style=n}}}));
@@ -1 +0,0 @@
1
- var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=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:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-54498887.system.js"],(function(e){"use strict";var t;return{setters:[function(e){t=e.d}],execute:function(){e("T",void 0);var r;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(r||(r={}));var n;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(n||(n={}));var i=e("c",(function(e,t,r){var i,a;if(!r&&!t.includes("create")){return{canPerform:false,message:"Missing required template object"}}var s=(e===null||e===void 0?void 0:e.profile_id)||"BOGUS";var u=(e===null||e===void 0?void 0:e.organization_id)||"BOGUS";if(!s){return{canPerform:false,message:"Active session required"}}var c=(r===null||r===void 0?void 0:r.profile_id)===s;var f=(r===null||r===void 0?void 0:r.organization_id)===u;var l=(i=r===null||r===void 0?void 0:r.is_personal)!==null&&i!==void 0?i:false;var p=(a=r===null||r===void 0?void 0:r.is_public)!==null&&a!==void 0?a:false;var d=[];switch(t){case"create_personal":d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":d.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":if(!c){if(!l&&f||!p){d.push(n.TEMPLATE_MEMBER_READ)}}break;case"write":if(!c){d.push(n.TEMPLATE_MEMBER_READ);d.push(n.TEMPLATE_MEMBER_WRITE)}break;case"change_visibility_personal":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_org":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_ORG)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"change_visibility_public":if(c){d.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);d.push(n.TEMPLATE_CREATOR_VISIBILITY)}else{d.push(n.TEMPLATE_MEMBER_VISIBILITY)}break;case"delete":if(c){d.push(n.TEMPLATE_CREATOR_DELETE)}else{d.push(n.TEMPLATE_MEMBER_DELETE)}break;default:return{canPerform:false,message:"Action is not defined"}}if(o(e,d)){return{canPerform:true,message:""}}return{canPerform:false,message:"Insufficient access to perform '".concat(t,"'. Needed permissions: ").concat(d.toString())}}));var o=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var a;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(a||(a=e("T",{})));var s;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(s||(s={}));var u;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(u||(u={}));var c;(function(e){e["RCOMMON"]="rcommon:access";e["RFORM_ACCESS"]="rform:access";e["ORG_CREATE"]="org:create";e["ORG_VIEW"]="org:view";e["ORG_UPDATE"]="org:update";e["ORG_DELETE"]="org:delete";e["ORG_TRANSFER"]="org:transfer";e["ORG_LIST"]="org:list";e["OWNER_ADD"]="owner:add";e["OWNER_REMOVE"]="owner:remove";e["ADMIN_ADD"]="admin:add";e["ADMIN_REMOVE"]="admin:remove";e["MEMBER_VIEW"]="member:view";e["MEMBER_ADD"]="member:add";e["MEMBER_REMOVE"]="member:remove";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(c||(c={}));var f;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(f||(f={}));var l;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(l||(l={}));var p=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"]);var d=function(e){return!p.has(e&&e.code)};function h(e,t,r,n,i,o,a){try{var s=e[o](a);var u=s.value}catch(e){r(e);return}if(s.done){t(u)}else{Promise.resolve(u).then(n,i)}}function E(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){h(o,n,i,a,s,"next",e)}function s(e){h(o,n,i,a,s,"throw",e)}a(undefined)}))}}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){v(Object(r),true).forEach((function(t){R(e,t,r[t])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}}return e}function R(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var _="axios-retry";function y(e){return!e.response&&Boolean(e.code)&&e.code!=="ECONNABORTED"&&d(e)}var T=["get","head","options"];var g=T.concat(["put","delete"]);function b(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function A(e){if(!e.config){return false}return b(e)&&T.indexOf(e.config.method)!==-1}function O(e){if(!e.config){return false}return b(e)&&g.indexOf(e.config.method)!==-1}function S(e){return y(e)||O(e)}function w(){return 0}function L(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var t=Math.pow(2,e)*100;var r=t*.2*Math.random();return t+r}function C(e){var t=e[_]||{};t.retryCount=t.retryCount||0;e[_]=t;return t}function N(e,t){return m(m({},t),e[_])}function P(e,t){if(e.defaults.agent===t.agent){delete t.agent}if(e.defaults.httpAgent===t.httpAgent){delete t.httpAgent}if(e.defaults.httpsAgent===t.httpsAgent){delete t.httpsAgent}}function I(e,t,r,n){return D.apply(this,arguments)}function D(){D=E((function(e,t,r,n){var i,o,a;return __generator(this,(function(s){switch(s.label){case 0:i=r.retryCount<e&&t(n);if(!(typeof i==="object"))return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);return[4,i];case 2:o=s.sent();return[2,o!==false];case 3:a=s.sent();return[2,false];case 4:return[2,i]}}))}));return D.apply(this,arguments)}function U(e,t){e.interceptors.request.use((function(e){var t=C(e);t.lastRequestTime=Date.now();return e}));e.interceptors.response.use(null,function(){var r=E((function(r){var n,i,o,a,s,u,c,f,l,p,d,h,E,v,m,R;return __generator(this,(function(_){switch(_.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=N(n,t),o=i.retries,a=o===void 0?3:o,s=i.retryCondition,u=s===void 0?S:s,c=i.retryDelay,f=c===void 0?w:c,l=i.shouldResetTimeout,p=l===void 0?false:l,d=i.onRetry,h=d===void 0?function(){}:d;E=C(n);return[4,I(a,u,E,r)];case 1:if(_.sent()){E.retryCount+=1;v=f(E.retryCount,r);P(e,n);if(!p&&n.timeout&&E.lastRequestTime){m=Date.now()-E.lastRequestTime;R=n.timeout-m-v;if(R<=0){return[2,Promise.reject(r)]}n.timeout=R}n.transformRequest=[function(e){return e}];h(E.retryCount,r,n);return[2,new Promise((function(t){return setTimeout((function(){return t(e(n))}),v)}))]}return[2,Promise.reject(r)]}}))}));return function(e){return r.apply(this,arguments)}}())}U.isNetworkError=y;U.isSafeRequestError=A;U.isIdempotentRequestError=O;U.isNetworkOrIdempotentRequestError=S;U.exponentialDelay=L;U.isRetryableError=b;function M(e,t){return function r(){return e.apply(t,arguments)}}var B=Object.prototype.toString;var j=Object.getPrototypeOf;var x=function(e){return function(t){var r=B.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var F=function(e){e=e.toLowerCase();return function(t){return x(t)===e}};var k=function(e){return function(t){return typeof t===e}};var q=Array.isArray;var G=k("undefined");function V(e){return e!==null&&!G(e)&&e.constructor!==null&&!G(e.constructor)&&K(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var z=F("ArrayBuffer");function H(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&z(e.buffer)}return t}var J=k("string");var K=k("function");var W=k("number");var Y=function(e){return e!==null&&typeof e==="object"};var X=function(e){return e===true||e===false};var Z=function(e){if(x(e)!=="object"){return false}var t=j(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var $=F("Date");var Q=F("File");var ee=F("Blob");var te=F("FileList");var re=function(e){return Y(e)&&K(e.pipe)};var ne=function(e){var t;return e&&(typeof FormData==="function"&&e instanceof FormData||K(e.append)&&((t=x(e))==="formdata"||t==="object"&&K(e.toString)&&e.toString()==="[object FormData]"))};var ie=F("URLSearchParams");var oe=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function ae(e,t,r){var n=r===void 0?{}:r,i=n.allOwnKeys,o=i===void 0?false:i;if(e===null||typeof e==="undefined"){return}var a;var s;if(typeof e!=="object"){e=[e]}if(q(e)){for(a=0,s=e.length;a<s;a++){t.call(null,e[a],a,e)}}else{var u=o?Object.getOwnPropertyNames(e):Object.keys(e);var c=u.length;var f=void 0;for(a=0;a<c;a++){f=u[a];t.call(null,e[f],f,e)}}}function se(e,t){t=t.toLowerCase();var r=Object.keys(e);var n=r.length;var i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}var ue=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var ce=function(e){return!G(e)&&e!==ue};function fe(){var e=(ce(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&se(t,n)||n;if(Z(t[i])&&Z(r)){t[i]=fe(t[i],r)}else if(Z(r)){t[i]=fe({},r)}else if(q(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&ae(arguments[n],r)}return t}var le=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;ae(t,(function(t,n){if(r&&K(t)){e[n]=M(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var pe=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var de=function(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)};var he=function(e,t,r,n){var i;var o;var a;var s={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);o=i.length;while(o-- >0){a=i[o];if((!n||n(a,e,t))&&!s[a]){t[a]=e[a];s[a]=true}}e=r!==false&&j(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var Ee=function(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r};var ve=function(e){if(!e)return null;if(q(e))return e;var t=e.length;if(!W(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var me=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&j(Uint8Array));var Re=function(e,t){var r=e&&e[Symbol.iterator];var n=r.call(e);var i;while((i=n.next())&&!i.done){var o=i.value;t.call(e,o[0],o[1])}};var _e=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var ye=F("HTMLFormElement");var Te=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var ge=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var be=F("RegExp");var Ae=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};ae(r,(function(r,i){if(t(r,i,e)!==false){n[i]=r}}));Object.defineProperties(e,n)};var Oe=function(e){Ae(e,(function(t,r){if(K(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!K(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}}}))};var Se=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};q(e)?n(e):n(String(e).split(t));return r};var we=function(){};var Le=function(e,t){e=+e;return Number.isFinite(e)?e:t};var Ce="abcdefghijklmnopqrstuvwxyz";var Ne="0123456789";var Pe={DIGIT:Ne,ALPHA:Ce,ALPHA_DIGIT:Ce+Ce.toUpperCase()+Ne};var Ie=function(e,t){if(e===void 0){e=16}if(t===void 0){t=Pe.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function De(e){return!!(e&&K(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Ue=function(e){var t=new Array(10);var r=function(e,n){if(Y(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=q(e)?[]:{};ae(e,(function(e,t){var o=r(e,n+1);!G(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var Me=F("AsyncFunction");var Be=function(e){return e&&(Y(e)||K(e))&&K(e.then)&&K(e.catch)};var je={isArray:q,isArrayBuffer:z,isBuffer:V,isFormData:ne,isArrayBufferView:H,isString:J,isNumber:W,isBoolean:X,isObject:Y,isPlainObject:Z,isUndefined:G,isDate:$,isFile:Q,isBlob:ee,isRegExp:be,isFunction:K,isStream:re,isURLSearchParams:ie,isTypedArray:me,isFileList:te,forEach:ae,merge:fe,extend:le,trim:oe,stripBOM:pe,inherits:de,toFlatObject:he,kindOf:x,kindOfTest:F,endsWith:Ee,toArray:ve,forEachEntry:Re,matchAll:_e,isHTMLForm:ye,hasOwnProperty:ge,hasOwnProp:ge,reduceDescriptors:Ae,freezeMethods:Oe,toObjectSet:Se,toCamelCase:Te,noop:we,toFiniteNumber:Le,findKey:se,global:ue,isContextDefined:ce,ALPHABET:Pe,generateString:Ie,isSpecCompliantForm:De,toJSONObject:Ue,isAsyncFn:Me,isThenable:Be};function xe(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}je.inherits(xe,Error,{toJSON:function e(){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:je.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Fe=xe.prototype;var ke={};["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((function(e){ke[e]={value:e}}));Object.defineProperties(xe,ke);Object.defineProperty(Fe,"isAxiosError",{value:true});xe.from=function(e,t,r,n,i,o){var a=Object.create(Fe);je.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));xe.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var qe=null;function Ge(e){return je.isPlainObject(e)||je.isArray(e)}function Ve(e){return je.endsWith(e,"[]")?e.slice(0,-2):e}function ze(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=Ve(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function He(e){return je.isArray(e)&&!e.some(Ge)}var Je=je.toFlatObject(je,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function Ke(e,t,r){if(!je.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=je.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!je.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||f;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&je.isSpecCompliantForm(t);if(!je.isFunction(i)){throw new TypeError("visitor must be a function")}function c(e){if(e===null)return"";if(je.isDate(e)){return e.toISOString()}if(!u&&je.isBlob(e)){throw new xe("Blob is not supported. Use a Buffer instead.")}if(je.isArrayBuffer(e)||je.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function f(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(je.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(je.isArray(e)&&He(e)||(je.isFileList(e)||je.endsWith(r,"[]"))&&(s=je.toArray(e))){r=Ve(r);s.forEach((function e(n,i){!(je.isUndefined(n)||n===null)&&t.append(a===true?ze([r],i,o):a===null?r:r+"[]",c(n))}));return false}}if(Ge(e)){return true}t.append(ze(i,r,o),c(e));return false}var l=[];var p=Object.assign(Je,{defaultVisitor:f,convertValue:c,isVisitable:Ge});function d(e,r){if(je.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);je.forEach(e,(function e(n,o){var a=!(je.isUndefined(n)||n===null)&&i.call(t,n,je.isString(o)?o.trim():o,r,p);if(a===true){d(n,r?r.concat(o):[o])}}));l.pop()}if(!je.isObject(e)){throw new TypeError("data must be an object")}d(e);return t}function We(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(r){return t[r]}))}function Ye(e,t){this._pairs=[];e&&Ke(e,this,t)}var Xe=Ye.prototype;Xe.append=function e(t,r){this._pairs.push([t,r])};Xe.toString=function e(t){var r=t?function(e){return t.call(this,e,We)}:We;return this._pairs.map((function e(t){return r(t[0])+"="+r(t[1])}),"").join("&")};function Ze(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $e(e,t,r){if(!t){return e}var n=r&&r.encode||Ze;var i=r&&r.serialize;var o;if(i){o=i(t,r)}else{o=je.isURLSearchParams(t)?t.toString():new Ye(t,r).toString(n)}if(o){var a=e.indexOf("#");if(a!==-1){e=e.slice(0,a)}e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Qe=function(){function e(){this.handlers=[]}e.prototype.use=function(e,t,r){this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:false,runWhen:r?r.runWhen:null});return this.handlers.length-1};e.prototype.eject=function(e){if(this.handlers[e]){this.handlers[e]=null}};e.prototype.clear=function(){if(this.handlers){this.handlers=[]}};e.prototype.forEach=function(e){je.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var et={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var tt=typeof URLSearchParams!=="undefined"?URLSearchParams:Ye;var rt=typeof FormData!=="undefined"?FormData:null;var nt=typeof Blob!=="undefined"?Blob:null;var it=function(){var e;if(typeof navigator!=="undefined"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}();var ot=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var at={isBrowser:true,classes:{URLSearchParams:tt,FormData:rt,Blob:nt},isStandardBrowserEnv:it,isStandardBrowserWebWorkerEnv:ot,protocols:["http","https","file","blob","url","data"]};function st(e,t){return Ke(e,new at.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return n.defaultVisitor.apply(this,arguments)}},t))}function ut(e){return je.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function ct(e){var t={};var r=Object.keys(e);var n;var i=r.length;var o;for(n=0;n<i;n++){o=r[n];t[o]=e[o]}return t}function ft(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&je.isArray(n)?n.length:o;if(s){if(je.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!je.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&je.isArray(n[o])){n[o]=ct(n[o])}return!a}if(je.isFormData(e)&&je.isFunction(e.entries)){var r={};je.forEachEntry(e,(function(e,n){t(ut(e),n,r,0)}));return r}return null}var lt={"Content-Type":undefined};function pt(e,t,r){if(je.isString(e)){try{(t||JSON.parse)(e);return je.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var dt={transitional:et,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=je.isObject(t);if(o&&je.isHTMLForm(t)){t=new FormData(t)}var a=je.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(ft(t)):t}if(je.isArrayBuffer(t)||je.isBuffer(t)||je.isStream(t)||je.isFile(t)||je.isBlob(t)){return t}if(je.isArrayBufferView(t)){return t.buffer}if(je.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}var s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){return st(t,this.formSerializer).toString()}if((s=je.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return Ke(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return pt(t)}return t}],transformResponse:[function e(t){var r=this.transitional||dt.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&je.isString(t)&&(n&&!this.responseType||i)){var o=r&&r.silentJSONParsing;var a=!o&&i;try{return JSON.parse(t)}catch(e){if(a){if(e.name==="SyntaxError"){throw xe.from(e,xe.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:at.classes.FormData,Blob:at.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};je.forEach(["delete","get","head"],(function e(t){dt.headers[t]={}}));je.forEach(["post","put","patch"],(function e(t){dt.headers[t]=je.merge(lt)}));var ht=je.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"]);var Et=function(e){var t={};var r;var n;var i;e&&e.split("\n").forEach((function e(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&ht[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}}));return t};var vt=Symbol("internals");function mt(e){return e&&String(e).trim().toLowerCase()}function Rt(e){if(e===false||e==null){return e}return je.isArray(e)?e.map(Rt):String(e)}function _t(e){var t=Object.create(null);var r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;var n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}var yt=function(e){return/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())};function Tt(e,t,r,n,i){if(je.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!je.isString(t))return;if(je.isString(n)){return t.indexOf(n)!==-1}if(je.isRegExp(n)){return n.test(t)}}function gt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function bt(e,t){var r=je.toCamelCase(" "+t);["get","set","has"].forEach((function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:true})}))}var At=function(){function e(e){e&&this.set(e)}e.prototype.set=function(e,t,r){var n=this;function i(e,t,r){var i=mt(t);if(!i){throw new Error("header name must be a non-empty string")}var o=je.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=Rt(e)}}var o=function(e,t){return je.forEach(e,(function(e,r){return i(e,r,t)}))};if(je.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(je.isString(e)&&(e=e.trim())&&!yt(e)){o(Et(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=mt(e);if(e){var r=je.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return _t(n)}if(je.isFunction(t)){return t.call(this,n,r)}if(je.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=mt(e);if(e){var r=je.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||Tt(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=mt(e);if(e){var i=je.findKey(r,e);if(i&&(!t||Tt(r,r[i],i,t))){delete r[i];n=true}}}if(je.isArray(e)){e.forEach(i)}else{i(e)}return n};e.prototype.clear=function(e){var t=Object.keys(this);var r=t.length;var n=false;while(r--){var i=t[r];if(!e||Tt(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};je.forEach(this,(function(n,i){var o=je.findKey(r,i);if(o){t[o]=Rt(n);delete t[i];return}var a=e?gt(i):String(i).trim();if(a!==i){delete t[i]}t[a]=Rt(n);r[a]=true}));return this};e.prototype.concat=function(){var e;var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}return(e=this.constructor).concat.apply(e,__spreadArray([this],t,false))};e.prototype.toJSON=function(e){var t=Object.create(null);je.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&je.isArray(r)?r.join(", "):r)}));return t};e.prototype[Symbol.iterator]=function(){return Object.entries(this.toJSON())[Symbol.iterator]()};e.prototype.toString=function(){return Object.entries(this.toJSON()).map((function(e){var t=e[0],r=e[1];return t+": "+r})).join("\n")};Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"AxiosHeaders"},enumerable:false,configurable:true});e.from=function(e){return e instanceof this?e:new this(e)};e.concat=function(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var n=new this(e);t.forEach((function(e){return n.set(e)}));return n};e.accessor=function(e){var t=this[vt]=this[vt]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=mt(e);if(!r[t]){bt(n,e);r[t]=true}}je.isArray(e)?e.forEach(i):i(e);return this};return e}();At.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);je.freezeMethods(At.prototype);je.freezeMethods(At);function Ot(e,t){var r=this||dt;var n=t||r;var i=At.from(n.headers);var o=n.data;je.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function St(e){return!!(e&&e.__CANCEL__)}function wt(e,t,r){xe.call(this,e==null?"canceled":e,xe.ERR_CANCELED,t,r);this.name="CanceledError"}je.inherits(wt,xe,{__CANCEL__:true});function Lt(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new xe("Request failed with status code "+r.status,[xe.ERR_BAD_REQUEST,xe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var Ct=at.isStandardBrowserEnv?function e(){return{write:function e(t,r,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(r));if(je.isNumber(n)){s.push("expires="+new Date(n).toGMTString())}if(je.isString(i)){s.push("path="+i)}if(je.isString(o)){s.push("domain="+o)}if(a===true){s.push("secure")}document.cookie=s.join("; ")},read:function e(t){var r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function e(t){this.write(t,"",Date.now()-864e5)}}}():function e(){return{write:function e(){},read:function e(){return null},remove:function e(){}}}();function Nt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Pt(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function It(e,t){if(e&&!Nt(t)){return Pt(e,t)}return t}var Dt=at.isStandardBrowserEnv?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}n=i(window.location.href);return function e(t){var r=je.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Ut(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Mt(e,t){e=e||10;var r=new Array(e);var n=new Array(e);var i=0;var o=0;var a;t=t!==undefined?t:1e3;return function s(u){var c=Date.now();var f=n[o];if(!a){a=c}r[i]=u;n[i]=c;var l=o;var p=0;while(l!==i){p+=r[l++];l=l%e}i=(i+1)%e;if(i===o){o=(o+1)%e}if(c-a<t){return}var d=f&&c-f;return d?Math.round(p*1e3/d):undefined}}function Bt(e,t){var r=0;var n=Mt(50,250);return function(i){var o=i.loaded;var a=i.lengthComputable?i.total:undefined;var s=o-r;var u=n(s);var c=o<=a;r=o;var f={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&c?(a-o)/u:undefined,event:i};f[t?"download":"upload"]=true;e(f)}}var jt=typeof XMLHttpRequest!=="undefined";var xt=jt&&function(e){return new Promise((function t(r,n){var i=e.data;var o=At.from(e.headers).normalize();var a=e.responseType;var s;function u(){if(e.cancelToken){e.cancelToken.unsubscribe(s)}if(e.signal){e.signal.removeEventListener("abort",s)}}if(je.isFormData(i)){if(at.isStandardBrowserEnv||at.isStandardBrowserWebWorkerEnv){o.setContentType(false)}else{o.setContentType("multipart/form-data;",false)}}var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"";var l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+l))}var p=It(e.baseURL,e.url);c.open(e.method.toUpperCase(),$e(p,e.params,e.paramsSerializer),true);c.timeout=e.timeout;function d(){if(!c){return}var t=At.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?c.responseText:c.response;var o={data:i,status:c.status,statusText:c.statusText,headers:t,config:e,request:c};Lt((function e(t){r(t);u()}),(function e(t){n(t);u()}),o);c=null}if("onloadend"in c){c.onloadend=d}else{c.onreadystatechange=function e(){if(!c||c.readyState!==4){return}if(c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)){return}setTimeout(d)}}c.onabort=function t(){if(!c){return}n(new xe("Request aborted",xe.ECONNABORTED,e,c));c=null};c.onerror=function t(){n(new xe("Network Error",xe.ERR_NETWORK,e,c));c=null};c.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||et;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new xe(r,i.clarifyTimeoutError?xe.ETIMEDOUT:xe.ECONNABORTED,e,c));c=null};if(at.isStandardBrowserEnv){var h=(e.withCredentials||Dt(p))&&e.xsrfCookieName&&Ct.read(e.xsrfCookieName);if(h){o.set(e.xsrfHeaderName,h)}}i===undefined&&o.setContentType(null);if("setRequestHeader"in c){je.forEach(o.toJSON(),(function e(t,r){c.setRequestHeader(r,t)}))}if(!je.isUndefined(e.withCredentials)){c.withCredentials=!!e.withCredentials}if(a&&a!=="json"){c.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){c.addEventListener("progress",Bt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&c.upload){c.upload.addEventListener("progress",Bt(e.onUploadProgress))}if(e.cancelToken||e.signal){s=function(t){if(!c){return}n(!t||t.type?new wt(null,e,c):t);c.abort();c=null};e.cancelToken&&e.cancelToken.subscribe(s);if(e.signal){e.signal.aborted?s():e.signal.addEventListener("abort",s)}}var E=Ut(p);if(E&&at.protocols.indexOf(E)===-1){n(new xe("Unsupported protocol "+E+":",xe.ERR_BAD_REQUEST,e));return}c.send(i||null)}))};var Ft={http:qe,xhr:xt};je.forEach(Ft,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var kt={getAdapter:function(e){e=je.isArray(e)?e:[e];var t=e.length;var r;var n;for(var i=0;i<t;i++){r=e[i];if(n=je.isString(r)?Ft[r.toLowerCase()]:r){break}}if(!n){if(n===false){throw new xe("Adapter ".concat(r," is not supported by the environment"),"ERR_NOT_SUPPORT")}throw new Error(je.hasOwnProp(Ft,r)?"Adapter '".concat(r,"' is not available in the build"):"Unknown adapter '".concat(r,"'"))}if(!je.isFunction(n)){throw new TypeError("adapter is not a function")}return n},adapters:Ft};function qt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new wt(null,e)}}function Gt(e){qt(e);e.headers=At.from(e.headers);e.data=Ot.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=kt.getAdapter(e.adapter||dt.adapter);return t(e).then((function t(r){qt(e);r.data=Ot.call(e,e.transformResponse,r);r.headers=At.from(r.headers);return r}),(function t(r){if(!St(r)){qt(e);if(r&&r.response){r.response.data=Ot.call(e,e.transformResponse,r.response);r.response.headers=At.from(r.response.headers)}}return Promise.reject(r)}))}var Vt=function(e){return e instanceof At?e.toJSON():e};function zt(e,t){t=t||{};var r={};function n(e,t,r){if(je.isPlainObject(e)&&je.isPlainObject(t)){return je.merge.call({caseless:r},e,t)}else if(je.isPlainObject(t)){return je.merge({},t)}else if(je.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!je.isUndefined(t)){return n(e,t,r)}else if(!je.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!je.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!je.isUndefined(t)){return n(undefined,t)}else if(!je.isUndefined(e)){return n(undefined,e)}}function s(r,i,o){if(o in t){return n(r,i)}else if(o in e){return n(undefined,r)}}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return i(Vt(e),Vt(t),true)}};je.forEach(Object.keys(Object.assign({},e,t)),(function n(o){var a=u[o]||i;var c=a(e[o],t[o],o);je.isUndefined(c)&&a!==s||(r[o]=c)}));return r}var Ht="1.4.0";var Jt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Jt[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var Kt={};Jt.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Ht+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new xe(i(n," has been removed"+(r?" in "+r:"")),xe.ERR_DEPRECATED)}if(r&&!Kt[n]){Kt[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function Wt(e,t,r){if(typeof e!=="object"){throw new xe("options must be an object",xe.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var a=t[o];if(a){var s=e[o];var u=s===undefined||a(s,o,e);if(u!==true){throw new xe("option "+o+" must be "+u,xe.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new xe("Unknown option "+o,xe.ERR_BAD_OPTION)}}}var Yt={assertOptions:Wt,validators:Jt};var Xt=Yt.validators;var Zt=function(){function e(e){this.defaults=e;this.interceptors={request:new Qe,response:new Qe}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=zt(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){Yt.assertOptions(r,{silentJSONParsing:Xt.transitional(Xt.boolean),forcedJSONParsing:Xt.transitional(Xt.boolean),clarifyTimeoutError:Xt.transitional(Xt.boolean)},false)}if(n!=null){if(je.isFunction(n)){t.paramsSerializer={serialize:n}}else{Yt.assertOptions(n,{encode:Xt.function,serialize:Xt.function},true)}}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o;o=i&&je.merge(i.common,i[t.method]);o&&je.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=At.concat(o,i);var a=[];var s=true;this.interceptors.request.forEach((function e(r){if(typeof r.runWhen==="function"&&r.runWhen(t)===false){return}s=s&&r.synchronous;a.unshift(r.fulfilled,r.rejected)}));var u=[];this.interceptors.response.forEach((function e(t){u.push(t.fulfilled,t.rejected)}));var c;var f=0;var l;if(!s){var p=[Gt.bind(this),undefined];p.unshift.apply(p,a);p.push.apply(p,u);l=p.length;c=Promise.resolve(t);while(f<l){c=c.then(p[f++],p[f++])}return c}l=a.length;var d=t;f=0;while(f<l){var h=a[f++];var E=a[f++];try{d=h(d)}catch(e){E.call(this,e);break}}try{c=Gt.call(this,d)}catch(e){return Promise.reject(e)}f=0;l=u.length;while(f<l){c=c.then(u[f++],u[f++])}return c};e.prototype.getUri=function(e){e=zt(this.defaults,e);var t=It(e.baseURL,e.url);return $e(t,e.params,e.paramsSerializer)};return e}();je.forEach(["delete","get","head","options"],(function e(t){Zt.prototype[t]=function(e,r){return this.request(zt(r||{},{method:t,url:e,data:(r||{}).data}))}}));je.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(zt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Zt.prototype[t]=r();Zt.prototype[t+"Form"]=r(true)}));var $t=function(){function e(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t=r._listeners.length;while(t-- >0){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n,i,o){if(r.reason){return}r.reason=new wt(n,i,o);t(r.reason)}))}e.prototype.throwIfRequested=function(){if(this.reason){throw this.reason}};e.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}};e.prototype.unsubscribe=function(e){if(!this._listeners){return}var t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}};e.source=function(){var t;var r=new e((function e(r){t=r}));return{token:r,cancel:t}};return e}();function Qt(e){return function t(r){return e.apply(null,r)}}function er(e){return je.isObject(e)&&e.isAxiosError===true}var tr={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(tr).forEach((function(e){var t=e[0],r=e[1];tr[r]=t}));function rr(e){var t=new Zt(e);var r=M(Zt.prototype.request,t);je.extend(r,Zt.prototype,t,{allOwnKeys:true});je.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return rr(zt(e,r))};return r}var nr=rr(dt);nr.Axios=Zt;nr.CanceledError=wt;nr.CancelToken=$t;nr.isCancel=St;nr.VERSION=Ht;nr.toFormData=Ke;nr.AxiosError=xe;nr.Cancel=nr.CanceledError;nr.all=function e(t){return Promise.all(t)};nr.spread=Qt;nr.isAxiosError=er;nr.mergeConfig=zt;nr.AxiosHeaders=At;nr.formToJSON=function(e){return ft(je.isHTMLForm(e)?new FormData(e):e)};nr.HttpStatusCode=tr;nr.default=nr;var ir=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var or=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(e){return ir()}try{if(!__global__)return ir();return __global__}finally{delete Object.prototype.__global__}}();var ar=Symbol.for("verdocs-default-endpoint");var sr=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var ur=e("V",function(){function e(e){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=(e===null||e===void 0?void 0:e.baseURL)||"https://api.verdocs.com";this.baseURLv2=(e===null||e===void 0?void 0:e.baseURLv2)||"https://api-v2.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||6e4;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=nr.create({baseURL:this.baseURL,timeout:this.timeout});U(this.api,{retries:0,retryDelay:U.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){or[ar]=this};e.getDefault=function(){if(!or[ar]){or[ar]=new e;window.console.debug("[JS_SDK] Created default endpoint",or[ar])}return or[ar]};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(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.baseURL=e;this.api.defaults.baseURL=e;return this};e.prototype.setBaseURLv2=function(e){this.baseURLv2=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(sr)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var r=t(e);if(r===null||r.exp&&r.exp*1e3<(new Date).getTime()){window.console.warn("[JS_SDK] Ignoring attempt to use expired session token");return this.clearSession()}this.token=e;this.session=r;if(this.sessionType==="user"){this.api.defaults.headers.common.Authorization="Bearer ".concat(e)}else{this.api.defaults.headers.common.signer="Bearer ".concat(e)}localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return 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(){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();return this};e.prototype.clearSignerSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}())}}}));
@@ -1 +0,0 @@
1
- import{d as t}from"./p-05788c2b.js";var e,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"}(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={}));var r,o,i,s,u,c,a=function(t,e,r){var o,i;if(!r&&!e.includes("create"))return{canPerform:!1,message:"Missing required template object"};var s=(null==t?void 0:t.profile_id)||"BOGUS";if(!s)return{canPerform:!1,message:"Active session required"};var u=(null==r?void 0:r.profile_id)===s,c=(null==r?void 0:r.organization_id)===((null==t?void 0:t.organization_id)||"BOGUS"),a=null!==(o=null==r?void 0:r.is_personal)&&void 0!==o&&o,f=null!==(i=null==r?void 0:r.is_public)&&void 0!==i&&i,h=[];switch(e){case"create_personal":h.push(n.TEMPLATE_CREATOR_CREATE_PERSONAL);break;case"create_org":h.push(n.TEMPLATE_CREATOR_CREATE_ORG);break;case"create_public":h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC);break;case"read":u||(!a&&c||!f)&&h.push(n.TEMPLATE_MEMBER_READ);break;case"write":u||(h.push(n.TEMPLATE_MEMBER_READ),h.push(n.TEMPLATE_MEMBER_WRITE));break;case"change_visibility_personal":h.push(u?n.TEMPLATE_CREATOR_CREATE_PERSONAL:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_org":h.push(u?n.TEMPLATE_CREATOR_CREATE_ORG:n.TEMPLATE_MEMBER_VISIBILITY);break;case"change_visibility_public":u?(h.push(n.TEMPLATE_CREATOR_CREATE_PUBLIC),h.push(n.TEMPLATE_CREATOR_VISIBILITY)):h.push(n.TEMPLATE_MEMBER_VISIBILITY);break;case"delete":h.push(u?n.TEMPLATE_CREATOR_DELETE:n.TEMPLATE_MEMBER_DELETE);break;default:return{canPerform:!1,message:"Action is not defined"}}return l(t,h)?{canPerform:!0,message:""}:{canPerform:!1,message:"Insufficient access to perform '".concat(e,"'. Needed permissions: ").concat(h.toString())}},l=function(t,e){return e.every((function(e){return((null==t?void 0:t.permissions)||[]).includes(e)}))};!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 f=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 h(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 d(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){h(i,r,o,s,u,"next",t)}function u(t){h(i,r,o,s,u,"throw",t)}s(void 0)}))}}function m(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 p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){b(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){return!t.response&&Boolean(t.code)&&"ECONNABORTED"!==t.code&&(t=>!f.has(t&&t.code))(t)}var _=["get","head","options"],w=_.concat(["put","delete"]);function y(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function v(t){return!!t.config&&y(t)&&-1!==w.indexOf(t.config.method)}function R(t){return E(t)||v(t)}function g(){return 0}function O(t){var e=t["axios-retry"]||{};return e.retryCount=e.retryCount||0,t["axios-retry"]=e,e}function T(){return(T=d((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 S(t,e){t.interceptors.request.use((t=>(O(t).lastRequestTime=Date.now(),t))),t.interceptors.response.use(null,function(){var n=d((function*(n){var{config:r}=n;if(!r)return Promise.reject(n);var{retries:o=3,retryCondition:i=R,retryDelay:s=g,shouldResetTimeout:u=!1,onRetry:c=(()=>{})}=function(t,e){return p(p({},e),t["axios-retry"])}(r,e),a=O(r);if(yield function(t,e,n,r){return T.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 A(t,e){return function(){return t.apply(e,arguments)}}S.isNetworkError=E,S.isSafeRequestError=function(t){return!!t.config&&y(t)&&-1!==_.indexOf(t.config.method)},S.isIdempotentRequestError=v,S.isNetworkOrIdempotentRequestError=R,S.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},S.isRetryableError=y;const{toString:N}=Object.prototype,{getPrototypeOf:j}=Object,C=(D=Object.create(null),t=>{const e=N.call(t);return D[e]||(D[e]=e.slice(8,-1).toLowerCase())});var D;const P=t=>(t=t.toLowerCase(),e=>C(e)===t),L=t=>e=>typeof e===t,{isArray:U}=Array,I=L("undefined"),F=P("ArrayBuffer"),B=L("string"),x=L("function"),k=L("number"),M=t=>null!==t&&"object"==typeof t,q=t=>{if("object"!==C(t))return!1;const e=j(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},H=P("Date"),z=P("File"),G=P("Blob"),J=P("FileList"),K=P("URLSearchParams");function V(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),U(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 X(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 $="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Y=t=>!I(t)&&t!==$,W=(Z="undefined"!=typeof Uint8Array&&j(Uint8Array),t=>Z&&t instanceof Z);var Z;const Q=P("HTMLFormElement"),tt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),et=P("RegExp"),nt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};V(n,((n,o)=>{!1!==e(n,o,t)&&(r[o]=n)})),Object.defineProperties(t,r)},rt="abcdefghijklmnopqrstuvwxyz",ot={DIGIT:"0123456789",ALPHA:rt,ALPHA_DIGIT:rt+rt.toUpperCase()+"0123456789"},it=P("AsyncFunction"),st={isArray:U,isArrayBuffer:F,isBuffer:function(t){return null!==t&&!I(t)&&null!==t.constructor&&!I(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||x(t.append)&&("formdata"===(e=C(t))||"object"===e&&x(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&F(t.buffer),e},isString:B,isNumber:k,isBoolean:t=>!0===t||!1===t,isObject:M,isPlainObject:q,isUndefined:I,isDate:H,isFile:z,isBlob:G,isRegExp:et,isFunction:x,isStream:t=>M(t)&&x(t.pipe),isURLSearchParams:K,isTypedArray:W,isFileList:J,forEach:V,merge:function t(){const{caseless:e}=Y(this)&&this||{},n={},r=(r,o)=>{const i=e&&X(n,o)||o;n[i]=q(n[i])&&q(r)?t(n[i],r):q(r)?t({},r):U(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&V(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(V(e,((e,r)=>{t[r]=n&&x(e)?A(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&&j(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:C,kindOfTest:P,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(U(t))return t;let e=t.length;if(!k(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:Q,hasOwnProperty:tt,hasOwnProp:tt,reduceDescriptors:nt,freezeMethods:t=>{nt(t,((e,n)=>{if(x(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;x(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 U(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:X,global:$,isContextDefined:Y,ALPHABET:ot,generateString:(t=16,e=ot.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&x(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(M(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=U(t)?[]:{};return V(t,((t,e)=>{const i=n(t,r+1);!I(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:it,isThenable:t=>t&&(M(t)||x(t))&&x(t.then)&&x(t.catch)};function ut(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)}st.inherits(ut,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:st.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ct=ut.prototype,at={};function lt(t){return st.isPlainObject(t)||st.isArray(t)}function ft(t){return st.endsWith(t,"[]")?t.slice(0,-2):t}function ht(t,e,n){return t?t.concat(e).map((function(t,e){return t=ft(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=>{at[t]={value:t}})),Object.defineProperties(ut,at),Object.defineProperty(ct,"isAxiosError",{value:!0}),ut.from=(t,e,n,r,o,i)=>{const s=Object.create(ct);return st.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ut.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const dt=st.toFlatObject(st,{},null,(function(t){return/^is[A-Z]/.test(t)}));function mt(t,e,n){if(!st.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=st.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!st.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&st.isSpecCompliantForm(e);if(!st.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(st.isDate(t))return t.toISOString();if(!u&&st.isBlob(t))throw new ut("Blob is not supported. Use a Buffer instead.");return st.isArrayBuffer(t)||st.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(st.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(st.isArray(t)&&function(t){return st.isArray(t)&&!t.some(lt)}(t)||(st.isFileList(t)||st.endsWith(n,"[]"))&&(u=st.toArray(t)))return n=ft(n),u.forEach((function(t,r){!st.isUndefined(t)&&null!==t&&e.append(!0===s?ht([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!lt(t)||(e.append(ht(o,n,i),c(t)),!1)}const l=[],f=Object.assign(dt,{defaultVisitor:a,convertValue:c,isVisitable:lt});if(!st.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!st.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),st.forEach(n,(function(n,i){!0===(!(st.isUndefined(n)||null===n)&&o.call(e,n,st.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function pt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function bt(t,e){this._pairs=[],t&&mt(t,this,e)}const Et=bt.prototype;function _t(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wt(t,e,n){if(!e)return t;const r=n&&n.encode||_t,o=n&&n.serialize;let i;if(i=o?o(e,n):st.isURLSearchParams(e)?e.toString():new bt(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}Et.append=function(t,e){this._pairs.push([t,e])},Et.toString=function(t){const e=t?function(e){return t.call(this,e,pt)}:pt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class yt{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){st.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const vt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:bt,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 gt(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&st.isArray(r)?r.length:i,u?(r[i]=st.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&st.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&st.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(st.isFormData(t)&&st.isFunction(t.entries)){const n={};return st.forEachEntry(t,((t,r)=>{e(function(t){return st.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},Tt={transitional:vt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=st.isObject(t);if(o&&st.isHTMLForm(t)&&(t=new FormData(t)),st.isFormData(t))return r&&r?JSON.stringify(gt(t)):t;if(st.isArrayBuffer(t)||st.isBuffer(t)||st.isStream(t)||st.isFile(t)||st.isBlob(t))return t;if(st.isArrayBufferView(t))return t.buffer;if(st.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 mt(t,new Rt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=st.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return mt(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(st.isString(t))try{return(0,JSON.parse)(t),st.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Tt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&st.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 ut.from(t,ut.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:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};st.forEach(["delete","get","head"],(function(t){Tt.headers[t]={}})),st.forEach(["post","put","patch"],(function(t){Tt.headers[t]=st.merge(Ot)}));const St=st.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"]),At=Symbol("internals");function Nt(t){return t&&String(t).trim().toLowerCase()}function jt(t){return!1===t||null==t?t:st.isArray(t)?t.map(jt):String(t)}function Ct(t,e,n,r,o){return st.isFunction(r)?r.call(this,e,n):(o&&(e=n),st.isString(e)?st.isString(r)?-1!==e.indexOf(r):st.isRegExp(r)?r.test(e):void 0:void 0)}class Dt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Nt(e);if(!o)throw new Error("header name must be a non-empty string");const i=st.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=jt(t))}const i=(t,e)=>st.forEach(t,((t,n)=>o(t,n,e)));return st.isPlainObject(t)||t instanceof this.constructor?i(t,e):st.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]&&St[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=Nt(t)){const n=st.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(st.isFunction(e))return e.call(this,t,n);if(st.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Nt(t)){const n=st.findKey(this,t);return!(!n||void 0===this[n]||e&&!Ct(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Nt(t)){const o=st.findKey(n,t);!o||e&&!Ct(0,n[o],o,e)||(delete n[o],r=!0)}}return st.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&&!Ct(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return st.forEach(this,((r,o)=>{const i=st.findKey(n,o);if(i)return e[i]=jt(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]=jt(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return st.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&st.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[At]=this[At]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Nt(t);e[r]||(function(t,e){const n=st.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 st.isArray(t)?t.forEach(r):r(t),this}}function Pt(t,e){const n=this||Tt,r=e||n,o=Dt.from(r.headers);let i=r.data;return st.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Lt(t){return!(!t||!t.__CANCEL__)}function Ut(t,e,n){ut.call(this,null==t?"canceled":t,ut.ERR_CANCELED,e,n),this.name="CanceledError"}Dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),st.freezeMethods(Dt.prototype),st.freezeMethods(Dt),st.inherits(Ut,ut,{__CANCEL__:!0});const It=Rt.isStandardBrowserEnv?{write:function(t,e,n,r,o,i){const s=[];s.push(t+"="+encodeURIComponent(e)),st.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),st.isString(r)&&s.push("path="+r),st.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 Ft(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 Bt=Rt.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=st.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function xt(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 kt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=Dt.from(t.headers).normalize(),i=t.responseType;let s;function u(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}st.isFormData(r)&&(Rt.isStandardBrowserEnv||Rt.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=Ft(t.baseURL,t.url);function l(){if(!c)return;const r=Dt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new ut("Request failed with status code "+n.status,[ut.ERR_BAD_REQUEST,ut.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(),wt(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 ut("Request aborted",ut.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new ut("Network Error",ut.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 ut(e,(t.transitional||vt).clarifyTimeoutError?ut.ETIMEDOUT:ut.ECONNABORTED,t,c)),c=null},Rt.isStandardBrowserEnv){const e=(t.withCredentials||Bt(a))&&t.xsrfCookieName&&It.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&st.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),st.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&"json"!==i&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",xt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",xt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{c&&(n(!e||e.type?new Ut(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===Rt.protocols.indexOf(f)?n(new ut("Unsupported protocol "+f+":",ut.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};st.forEach(kt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));function Mt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ut(null,t)}function qt(t){return Mt(t),t.headers=Dt.from(t.headers),t.data=Pt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),(t=>{t=st.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;o<e&&(n=t[o],!(r=st.isString(n)?kt[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new ut(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(st.hasOwnProp(kt,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!st.isFunction(r))throw new TypeError("adapter is not a function");return r})(t.adapter||Tt.adapter)(t).then((function(e){return Mt(t),e.data=Pt.call(t,t.transformResponse,e),e.headers=Dt.from(e.headers),e}),(function(e){return Lt(e)||(Mt(t),e&&e.response&&(e.response.data=Pt.call(t,t.transformResponse,e.response),e.response.headers=Dt.from(e.response.headers))),Promise.reject(e)}))}const Ht=t=>t instanceof Dt?t.toJSON():t;function zt(t,e){e=e||{};const n={};function r(t,e,n){return st.isPlainObject(t)&&st.isPlainObject(e)?st.merge.call({caseless:n},t,e):st.isPlainObject(e)?st.merge({},e):st.isArray(e)?e.slice():e}function o(t,e,n){return st.isUndefined(e)?st.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!st.isUndefined(e))return r(void 0,e)}function s(t,e){return st.isUndefined(e)?st.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 st.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);st.isUndefined(s)&&i!==u||(n[r]=s)})),n}const Gt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Gt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Jt={};Gt.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 ut(r(o," has been removed"+(e?" in "+e:"")),ut.ERR_DEPRECATED);return e&&!Jt[o]&&(Jt[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 Kt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ut("options must be an object",ut.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 ut("option "+i+" must be "+n,ut.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ut("Unknown option "+i,ut.ERR_BAD_OPTION)}},validators:Gt},Vt=Kt.validators;class Xt{constructor(t){this.defaults=t,this.interceptors={request:new yt,response:new yt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=zt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;let i;void 0!==n&&Kt.assertOptions(n,{silentJSONParsing:Vt.transitional(Vt.boolean),forcedJSONParsing:Vt.transitional(Vt.boolean),clarifyTimeoutError:Vt.transitional(Vt.boolean)},!1),null!=r&&(st.isFunction(r)?e.paramsSerializer={serialize:r}:Kt.assertOptions(r,{encode:Vt.function,serialize:Vt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&st.merge(o.common,o[e.method]),i&&st.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Dt.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=[qt.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=qt.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 wt(Ft((t=zt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}st.forEach(["delete","get","head","options"],(function(t){Xt.prototype[t]=function(e,n){return this.request(zt(n||{},{method:t,url:e,data:(n||{}).data}))}})),st.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(zt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Xt.prototype[t]=e(),Xt.prototype[t+"Form"]=e(!0)}));class $t{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 Ut(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 $t((function(e){t=e})),cancel:t}}}const Yt={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(Yt).forEach((([t,e])=>{Yt[e]=t}));const Wt=function t(e){const n=new Xt(e),r=A(Xt.prototype.request,n);return st.extend(r,Xt.prototype,n,{allOwnKeys:!0}),st.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(zt(e,n))},r}(Tt);Wt.Axios=Xt,Wt.CanceledError=Ut,Wt.CancelToken=$t,Wt.isCancel=Lt,Wt.VERSION="1.4.0",Wt.toFormData=mt,Wt.AxiosError=ut,Wt.Cancel=Wt.CanceledError,Wt.all=function(t){return Promise.all(t)},Wt.spread=function(t){return function(e){return t.apply(null,e)}},Wt.isAxiosError=function(t){return st.isObject(t)&&!0===t.isAxiosError},Wt.mergeConfig=zt,Wt.AxiosHeaders=Dt,Wt.formToJSON=t=>gt(st.isHTMLForm(t)?new FormData(t):t),Wt.HttpStatusCode=Yt,Wt.default=Wt;var Zt=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},Qt=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 Zt()}try{return __global__||Zt()}finally{delete Object.prototype.__global__}}(),te=Symbol.for("verdocs-default-endpoint"),ee=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},ne=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=Wt.create({baseURL:this.baseURL,timeout:this.timeout}),S(this.api,{retries:0,retryDelay:S.exponentialDelay,onRetry:function(t,e,n){window.console.debug("[JS_SDK] Retrying request (".concat(t,")"),e.message,n.url)}})}return e.prototype.setDefault=function(){Qt[te]=this},e.getDefault=function(){return Qt[te]||(Qt[te]=new e,window.console.debug("[JS_SDK] Created default endpoint",Qt[te])),Qt[te]},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(ee):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,ne as V,a as c}