@verdocs/web-sdk 1.13.22 → 1.13.23

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 (219) hide show
  1. package/dist/cjs/Roles-9b593b95.js +28 -0
  2. package/dist/cjs/{TemplateStore-e8039c08.js → TemplateStore-b298da9c.js} +1 -1
  3. package/dist/cjs/{VerdocsEndpoint-1b1836af.js → VerdocsEndpoint-e6517a50.js} +67 -48
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  7. package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +2 -2
  8. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +2 -1
  10. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
  13. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
  16. package/dist/cjs/verdocs-sign.cjs.entry.js +6 -3
  17. package/dist/cjs/{verdocs-template-fields_4.cjs.entry.js → verdocs-template-attachments_4.cjs.entry.js} +230 -235
  18. package/dist/cjs/{verdocs-template-document-page_2.cjs.entry.js → verdocs-template-document-page.cjs.entry.js} +2 -46
  19. package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
  20. package/dist/cjs/verdocs-template-properties.cjs.entry.js +2 -2
  21. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
  22. package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +220 -0
  23. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
  24. package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +51 -0
  25. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  27. package/dist/collection/collection-manifest.json +0 -1
  28. package/dist/collection/components/elements/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -0
  29. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +5 -1
  30. package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.js +1 -0
  31. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +1 -0
  32. package/dist/components/VerdocsEndpoint.js +67 -48
  33. package/dist/components/index.d.ts +0 -1
  34. package/dist/components/index.js +0 -1
  35. package/dist/components/verdocs-envelope-document-page2.js +1 -0
  36. package/dist/components/verdocs-sign.js +5 -1
  37. package/dist/components/verdocs-template-document-page2.js +1 -0
  38. package/dist/components/verdocs-template-fields2.js +1 -0
  39. package/dist/custom-elements.json +1578 -0
  40. package/dist/docs.json +1 -102
  41. package/dist/esm/Roles-6eb459df.js +24 -0
  42. package/dist/esm/{TemplateStore-5082a055.js → TemplateStore-e10b2d6a.js} +1 -1
  43. package/dist/esm/{VerdocsEndpoint-ca592138.js → VerdocsEndpoint-6d7a17ce.js} +67 -48
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/esm/{utils-3c5246f9.js → utils-666d38e6.js} +1 -1
  46. package/dist/esm/verdocs-auth.entry.js +1 -1
  47. package/dist/esm/verdocs-build.entry.js +2 -2
  48. package/dist/esm/verdocs-button-panel_3.entry.js +2 -2
  49. package/dist/esm/verdocs-contact-picker.entry.js +1 -1
  50. package/dist/esm/verdocs-dropdown_2.entry.js +3 -2
  51. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  52. package/dist/esm/verdocs-field-checkbox.entry.js +1 -1
  53. package/dist/esm/verdocs-field-date.entry.js +1 -1
  54. package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
  55. package/dist/esm/verdocs-field-initial.entry.js +1 -1
  56. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  57. package/dist/esm/verdocs-field-radio-button.entry.js +1 -1
  58. package/dist/esm/verdocs-field-signature.entry.js +1 -1
  59. package/dist/esm/verdocs-field-textarea.entry.js +1 -1
  60. package/dist/esm/verdocs-field-textbox.entry.js +1 -1
  61. package/dist/esm/verdocs-field-timestamp.entry.js +1 -1
  62. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  63. package/dist/esm/verdocs-preview.entry.js +3 -3
  64. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  65. package/dist/esm/verdocs-search.entry.js +1 -1
  66. package/dist/esm/verdocs-send.entry.js +3 -3
  67. package/dist/esm/verdocs-sign.entry.js +7 -4
  68. package/dist/esm/{verdocs-template-fields_4.entry.js → verdocs-template-attachments_4.entry.js} +228 -233
  69. package/dist/esm/{verdocs-template-document-page_2.entry.js → verdocs-template-document-page.entry.js} +4 -47
  70. package/dist/esm/verdocs-template-name.entry.js +2 -2
  71. package/dist/esm/verdocs-template-properties.entry.js +2 -2
  72. package/dist/esm/verdocs-template-reminders.entry.js +2 -2
  73. package/dist/esm/verdocs-template-role-properties_2.entry.js +215 -0
  74. package/dist/esm/verdocs-template-visibility.entry.js +2 -2
  75. package/dist/esm/verdocs-toolbar-icon.entry.js +47 -0
  76. package/dist/esm/verdocs-view.entry.js +2 -2
  77. package/dist/esm/verdocs-web-sdk.js +1 -1
  78. package/dist/esm-es5/Roles-6eb459df.js +1 -0
  79. package/dist/esm-es5/{TemplateStore-5082a055.js → TemplateStore-e10b2d6a.js} +1 -1
  80. package/dist/esm-es5/VerdocsEndpoint-6d7a17ce.js +1 -0
  81. package/dist/esm-es5/loader.js +1 -1
  82. package/dist/esm-es5/{utils-3c5246f9.js → utils-666d38e6.js} +1 -1
  83. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  84. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  85. package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
  86. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  87. package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
  88. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  89. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  90. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  91. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  92. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  93. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  94. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  95. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  96. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  97. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  98. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  99. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  100. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  101. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  102. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  103. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  104. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  105. package/dist/esm-es5/verdocs-template-attachments_4.entry.js +1 -0
  106. package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -0
  107. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  108. package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -0
  111. package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-toolbar-icon.entry.js +1 -0
  113. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  115. package/dist/types/components.d.ts +0 -29
  116. package/dist/types/utils/Types.d.ts +1 -0
  117. package/dist/verdocs-web-sdk/{p-780f3883.system.entry.js → p-020e4628.system.entry.js} +1 -1
  118. package/dist/verdocs-web-sdk/p-020f3b2e.entry.js +1 -0
  119. package/dist/verdocs-web-sdk/{p-3d28a80d.entry.js → p-0251b5d9.entry.js} +1 -1
  120. package/dist/verdocs-web-sdk/{p-b32a5b66.entry.js → p-04ed4943.entry.js} +1 -1
  121. package/dist/verdocs-web-sdk/{p-0462638f.entry.js → p-05f9d3db.entry.js} +1 -1
  122. package/dist/verdocs-web-sdk/{p-fc36ec2f.system.entry.js → p-0803ccbb.system.entry.js} +1 -1
  123. package/dist/verdocs-web-sdk/{p-8dcd14e6.system.entry.js → p-097248a9.system.entry.js} +1 -1
  124. package/dist/verdocs-web-sdk/{p-400ec020.entry.js → p-0e7b3b3e.entry.js} +1 -1
  125. package/dist/verdocs-web-sdk/p-10d370b9.entry.js +1 -0
  126. package/dist/verdocs-web-sdk/{p-14d385d9.system.entry.js → p-120f29bd.system.entry.js} +1 -1
  127. package/dist/verdocs-web-sdk/{p-44645ef9.entry.js → p-14aebbbf.entry.js} +1 -1
  128. package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
  129. package/dist/verdocs-web-sdk/{p-2d51380b.entry.js → p-26cfd4f0.entry.js} +1 -1
  130. package/dist/verdocs-web-sdk/{p-c4e25135.system.entry.js → p-28ed5eb8.system.entry.js} +1 -1
  131. package/dist/verdocs-web-sdk/p-2d9420df.system.entry.js +1 -0
  132. package/dist/verdocs-web-sdk/{p-06b1a51c.system.entry.js → p-3050ac80.system.entry.js} +1 -1
  133. package/dist/verdocs-web-sdk/p-32006e06.entry.js +1 -0
  134. package/dist/verdocs-web-sdk/{p-e7433a1c.system.entry.js → p-34ea6a57.system.entry.js} +1 -1
  135. package/dist/verdocs-web-sdk/p-365a0216.system.js +1 -0
  136. package/dist/verdocs-web-sdk/{p-bbd6349d.js → p-3d743079.js} +1 -1
  137. package/dist/verdocs-web-sdk/p-42aa31a9.entry.js +1 -0
  138. package/dist/verdocs-web-sdk/{p-8d37ae2c.entry.js → p-508faaf0.entry.js} +1 -1
  139. package/dist/verdocs-web-sdk/{p-44dd4071.system.entry.js → p-571e7b9f.system.entry.js} +1 -1
  140. package/dist/verdocs-web-sdk/p-5e535535.system.entry.js +1 -0
  141. package/dist/verdocs-web-sdk/{p-0952e9a9.entry.js → p-5ee8cd47.entry.js} +1 -1
  142. package/dist/verdocs-web-sdk/{p-86d3f0ab.entry.js → p-5efae6e5.entry.js} +1 -1
  143. package/dist/verdocs-web-sdk/{p-511ec90a.system.entry.js → p-62421ca6.system.entry.js} +1 -1
  144. package/dist/verdocs-web-sdk/{p-72af0126.entry.js → p-670b93df.entry.js} +1 -1
  145. package/dist/verdocs-web-sdk/p-671bb1f3.entry.js +1 -0
  146. package/dist/verdocs-web-sdk/{p-86f77809.system.entry.js → p-69f112cd.system.entry.js} +1 -1
  147. package/dist/verdocs-web-sdk/{p-f9d3d6c1.system.entry.js → p-69f2485d.system.entry.js} +1 -1
  148. package/dist/verdocs-web-sdk/{p-bb88c8b6.entry.js → p-6cfa1d78.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-ac986d8a.system.entry.js → p-6fb72d5d.system.entry.js} +1 -1
  150. package/dist/verdocs-web-sdk/{p-294c3f82.system.entry.js → p-7399931a.system.entry.js} +1 -1
  151. package/dist/verdocs-web-sdk/{p-33e03e33.entry.js → p-7a1a44ca.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-06f5b2f6.system.entry.js → p-7d45c1e8.system.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/{p-e200aa9b.system.entry.js → p-7e69f7d0.system.entry.js} +1 -1
  154. package/dist/verdocs-web-sdk/p-8027431e.js +1 -0
  155. package/dist/verdocs-web-sdk/p-8229e6df.system.js +1 -0
  156. package/dist/verdocs-web-sdk/{p-96333437.entry.js → p-86e2eeed.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/{p-ec6911d8.entry.js → p-86eda4dc.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-5efea322.system.entry.js → p-91fbe6aa.system.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/{p-9ec4e0f2.system.entry.js → p-92dfbbfc.system.entry.js} +1 -1
  160. package/dist/verdocs-web-sdk/{p-1401c1a5.entry.js → p-9829a091.entry.js} +1 -1
  161. package/dist/verdocs-web-sdk/{p-455892c6.entry.js → p-988be3bf.entry.js} +1 -1
  162. package/dist/verdocs-web-sdk/{p-c436e9f3.entry.js → p-99b4096d.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/{p-a25d989e.system.js → p-99c6e729.system.js} +1 -1
  164. package/dist/verdocs-web-sdk/{p-12d84e33.system.entry.js → p-9c73497e.system.entry.js} +1 -1
  165. package/dist/verdocs-web-sdk/{p-2cb54b47.system.entry.js → p-9d90ed3d.system.entry.js} +1 -1
  166. package/dist/verdocs-web-sdk/p-a3931094.system.entry.js +1 -0
  167. package/dist/verdocs-web-sdk/{p-5b0a31cf.system.entry.js → p-a4f4ab22.system.entry.js} +1 -1
  168. package/dist/verdocs-web-sdk/{p-38733cab.entry.js → p-ac858763.entry.js} +1 -1
  169. package/dist/verdocs-web-sdk/{p-7b53400e.system.entry.js → p-ad0c0136.system.entry.js} +1 -1
  170. package/dist/verdocs-web-sdk/{p-b4f150d6.entry.js → p-b5ea612a.entry.js} +1 -1
  171. package/dist/verdocs-web-sdk/{p-48f6291b.system.js → p-b85beb7d.system.js} +1 -1
  172. package/dist/verdocs-web-sdk/{p-ee6f8e1f.system.entry.js → p-c3f9589d.system.entry.js} +1 -1
  173. package/dist/verdocs-web-sdk/{p-3906caae.js → p-c80f119a.js} +1 -1
  174. package/dist/verdocs-web-sdk/p-c908ce71.system.entry.js +1 -0
  175. package/dist/verdocs-web-sdk/{p-df9b1424.entry.js → p-ca3e8884.entry.js} +1 -1
  176. package/dist/verdocs-web-sdk/p-d8afc5d2.entry.js +1 -0
  177. package/dist/verdocs-web-sdk/{p-8b2d75bd.system.entry.js → p-e01505dd.system.entry.js} +1 -1
  178. package/dist/verdocs-web-sdk/{p-cbde29f8.entry.js → p-e27e0d11.entry.js} +1 -1
  179. package/dist/verdocs-web-sdk/{p-eca60cd7.system.entry.js → p-e4a79e4e.system.entry.js} +1 -1
  180. package/dist/verdocs-web-sdk/{p-0d20b306.system.entry.js → p-e616c947.system.entry.js} +1 -1
  181. package/dist/verdocs-web-sdk/p-e7298e7a.system.entry.js +1 -0
  182. package/dist/verdocs-web-sdk/{p-ccc374e8.entry.js → p-e9f96f72.entry.js} +1 -1
  183. package/dist/verdocs-web-sdk/{p-10859415.entry.js → p-ededd783.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/p-f5075faa.entry.js +1 -0
  185. package/dist/verdocs-web-sdk/{p-c4fd8b65.entry.js → p-f61f02a7.entry.js} +1 -1
  186. package/dist/verdocs-web-sdk/{p-763f9ef3.system.entry.js → p-faf68b59.system.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/p-ff662b13.js +1 -0
  188. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  189. package/package.json +2 -2
  190. package/dist/cjs/ipc-test.cjs.entry.js +0 -36
  191. package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +0 -235
  192. package/dist/collection/components/other/ipctest/ipc-test.css +0 -4
  193. package/dist/collection/components/other/ipctest/ipc-test.js +0 -79
  194. package/dist/collection/components/other/ipctest/ipc-test.stories.js +0 -8
  195. package/dist/components/ipc-test.d.ts +0 -11
  196. package/dist/components/ipc-test.js +0 -142
  197. package/dist/esm/ipc-test.entry.js +0 -32
  198. package/dist/esm/verdocs-template-attachments_2.entry.js +0 -230
  199. package/dist/esm-es5/VerdocsEndpoint-ca592138.js +0 -1
  200. package/dist/esm-es5/ipc-test.entry.js +0 -1
  201. package/dist/esm-es5/verdocs-template-attachments_2.entry.js +0 -1
  202. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +0 -1
  203. package/dist/esm-es5/verdocs-template-fields_4.entry.js +0 -1
  204. package/dist/types/components/other/ipctest/ipc-test.d.ts +0 -17
  205. package/dist/types/components/other/ipctest/ipc-test.stories.d.ts +0 -4
  206. package/dist/verdocs-web-sdk/p-05b9acc2.entry.js +0 -1
  207. package/dist/verdocs-web-sdk/p-168785eb.entry.js +0 -1
  208. package/dist/verdocs-web-sdk/p-2fdacaae.system.entry.js +0 -1
  209. package/dist/verdocs-web-sdk/p-38384461.entry.js +0 -1
  210. package/dist/verdocs-web-sdk/p-49fb6d62.js +0 -1
  211. package/dist/verdocs-web-sdk/p-67a2f754.system.entry.js +0 -1
  212. package/dist/verdocs-web-sdk/p-6d8058f1.entry.js +0 -1
  213. package/dist/verdocs-web-sdk/p-82ac0970.system.entry.js +0 -1
  214. package/dist/verdocs-web-sdk/p-882cf708.system.js +0 -1
  215. package/dist/verdocs-web-sdk/p-ab6547d3.system.entry.js +0 -1
  216. package/dist/verdocs-web-sdk/p-eac4fe5f.system.entry.js +0 -1
  217. package/dist/verdocs-web-sdk/p-f3950596.entry.js +0 -1
  218. package/dist/verdocs-web-sdk/p-f8941719.entry.js +0 -1
  219. package/dist/verdocs-web-sdk/p-fb5469b9.entry.js +0 -1
@@ -1,17 +0,0 @@
1
- import { VerdocsEndpoint } from '@verdocs/js-sdk';
2
- import { TTemplateStore } from '../../../utils/TemplateStore';
3
- /**
4
- */
5
- export declare class IpcTest {
6
- /**
7
- * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
8
- */
9
- endpoint: VerdocsEndpoint;
10
- /**
11
- * The template ID to edit.
12
- */
13
- templateId: string;
14
- store: TTemplateStore | null;
15
- componentWillLoad(): Promise<void>;
16
- render(): any;
17
- }
@@ -1,4 +0,0 @@
1
- import { Meta } from '@storybook/web-components';
2
- declare const _default: Meta<import("@storybook/web-components").Args>;
3
- export default _default;
4
- export declare const IPCTest: () => import("lit-html").TemplateResult<1>;
@@ -1 +0,0 @@
1
- import{r as t,c as o,h as i,H as s,a as e}from"./p-9cf1a627.js";import"./p-05788c2b.js";import{g as a}from"./p-567a6e7c.js";import{V as r}from"./p-49fb6d62.js";import{t as h}from"./p-bbd6349d.js";import{c as p}from"./p-9d707f6e.js";import"./p-eab67c09.js";import"./p-b3ec6306.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const d=class{constructor(i){t(this,i),this.pageRendered=o(this,"pageRendered",7),this.endpoint=r.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-${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=!0,this.pageDisplayUri=""}async componentWillLoad(){this.pageDisplayUri=await a(this.endpoint,this.templateId,this.documentId,this.pageNumber)}componentDidLoad(){this.resizeObserver=new ResizeObserver(h((t=>{for(const o of t){const t=o.contentRect.width;this.renderedWidth=t,this.renderedHeight=this.virtualHeight*(t/this.virtualWidth)}this.notifyRenderedSize()}),100)),this.resizeObserver.observe(this.container)}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}notifyRenderedSize(){this.skipFirstNotification?this.skipFirstNotification=!1:this.pageRendered.emit({containerId:this.containerId,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})}render(){const t=`${this.renderedHeight}px`;return i(s,{id:`${this.containerId}`,style:{height:t,flex:`0 0 ${t}`}},this.layers.map((o=>"div"===o.type?i("div",{class:"verdocs-template-document-page-layer",id:`${this.containerId}-${o.name}`,style:{height:t}}):this.pageDisplayUri?i("img",{class:"verdocs-template-document-page-layer img",id:`${this.containerId}-${o.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":!0,loading:"lazy",onLoad:t=>{this.naturalWidth=t.target.naturalWidth,this.naturalHeight=t.target.naturalHeight,this.aspectRatio=this.naturalWidth/this.naturalHeight,this.virtualHeight=this.virtualWidth/this.aspectRatio,this.renderedHeight=t.target.offsetWidth/this.aspectRatio}}):i("div",null))))}get container(){return e(this)}};d.style="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%}";const l=class{constructor(o){t(this,o),this.text="",this.icon="",this.placement="bottom",this.containerId=`verdocs-toolbar-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=p(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 t,o;null===(t=this.tooltip)||void 0===t||t.setAttribute("data-show",""),null===(o=this.popperInstance)||void 0===o||o.update().catch((()=>{}))}hide(){var t;null===(t=this.tooltip)||void 0===t||t.removeAttribute("data-show")}render(){return i(s,{class:{}},i("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:t=>this.iconEl=t}),i("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:t=>this.tooltip=t},this.text,i("div",{"data-popper-arrow":"true",class:"arrow"})))}};l.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{d as verdocs_template_document_page,l as verdocs_toolbar_icon}
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as t,H as s,F as n}from"./p-9cf1a627.js";import{b as o,t as a,u as l,c as r,d}from"./p-b3ec6306.js";import{R as c}from"./p-05788c2b.js";import{V as h}from"./p-49fb6d62.js";import{a as u,i as p}from"./p-e662f81b.js";import{f as v,i as g}from"./p-7291906c.js";import{s as f,u as x,a as m,r as b,b as w}from"./p-bbd6349d.js";import{S as y}from"./p-7a1b2643.js";import"./p-eab67c09.js";import"./p-aa124212.js";import"./p-ab01f71e.js";var k=function(e,i,t,s){return n=void 0,o=void 0,l=function(){return function(e,i){var t,s,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(r){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(a=0)),a;)try{if(t=1,s&&(n=2&l[0]?s.return:l[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,l[1])).done)return n;switch(s=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,s=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){a.label=l[1];break}if(6===l[0]&&a.label<n[1]){a.label=n[1],n=l;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(l);break}n[2]&&a.ops.pop(),a.trys.pop();continue}l=i.call(e,a)}catch(e){l=[6,e],s=0}finally{t=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,r])}}}(this,(function(){return[2,e.api.put("/envelopes/".concat(i,"/recipients/").concat(t),s).then((function(e){return e.data}))]}))},new((a=void 0)||(a=Promise))((function(e,i){function t(e){try{r(l.next(e))}catch(e){i(e)}}function s(e){try{r(l.throw(e))}catch(e){i(e)}}function r(i){var n;i.done?e(i.value):(n=i.value,n instanceof a?n:new a((function(e){e(n)}))).then(t,s)}r((l=l.apply(n,o||[])).next())}));var n,o,a,l};const S=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}],I=[{id:"print",label:"Print"},{id:"download",label:"Download"}],N=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeLoaded=i(this,"envelopeLoaded",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.endpoint=null,this.recipientIndex=-1,this.envelopeId=null,this.roleId=null,this.inviteCode=null,this.headerTargetId=null,this.envelope=null,this.roleNames=[],this.recipient=null,this.signerToken=null,this.hasSignature=!1,this.nextButtonLabel="Start",this.nextSubmits=!1,this.errorMessage="",this.focusedField="",this.submitting=!1,this.isDone=!1,this.showDone=!1,this.finishLater=!1,this.showFinishLater=!1,this.agreed=!1,this.documentsSingularPlural="document"}componentWillLoad(){this.endpoint=new h({sessionType:"signing"})}async componentWillRender(){var e,i,t,s,n,l,r;if(this.envelopeId)if(this.roleId)if(this.inviteCode)try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{session:e,recipient:i,signerToken:t}=await o(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode});console.log(`[SIGN] Loaded signing session ${e.email} / ${e.profile_id}`),this.recipient=i,console.log("[SIGN] We are recipient",this.recipient),this.signerToken=t,this.endpoint.setToken(t),this.agreed&&(this.nextButtonLabel="Next"),this.envelope=await a(this.endpoint,this.envelopeId),this.roleNames=this.envelope.recipients.map((e=>e.role_name)),this.envelope.documents.length>0&&(this.documentsSingularPlural="document(s)"),this.recipientIndex=this.envelope.recipients.findIndex((e=>e.role_name==this.roleId)),this.recipientIndex>-1?(this.recipient=this.envelope.recipients[this.recipientIndex],this.agreed=this.recipient.agreed,console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)):console.log("[SIGN] Could not find our recipient record",this.roleId,this.envelope.recipients),this.isDone=["submitted","canceled","declined"].includes(this.recipient.status),this.checkRecipientFields(),null===(s=this.envelopeLoaded)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope})}catch(e){console.log("Error with signing session",e),null===(n=this.sdkError)||void 0===n||n.emit(new y(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(r=e.response)||void 0===r?void 0:r.data))}else null===(t=this.sdkError)||void 0===t||t.emit(new y("[SIGN] Missing required inviteCode",500,""));else null===(i=this.sdkError)||void 0===i||i.emit(new y("[SIGN] Missing required roleId",500,""));else null===(e=this.sdkError)||void 0===e||e.emit(new y("[SIGN] Missing required envelopId",500,""))}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null,i=document.getElementById("verdocs-sign-header");e&&i&&(console.log("[SIGN] Moving header"),i.remove(),e.append(i))}handleClickAgree(){var e,i,t;this.submitting=!0,(e=this.endpoint,i=this.envelopeId,t=this.roleId,!0,k(e,i,t,{action:"update",agreed:true})).then((()=>{var e;this.nextButtonLabel="Next",this.recipient.agreed=!0,this.submitting=!1,this.agreed=!0,null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("Update failure",e),this.submitting=!1,null===(i=this.sdkError)||void 0===i||i.emit(new y(e.message,null===(t=e.response)||void 0===t?void 0:t.status,null===(s=e.response)||void 0===s?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,n,o,a,l,r;switch(e.detail.id){case"later":this.finishLater=!0,this.showFinishLater=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"claim":window.alert("This feature will be available in an upcoming release."),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});break;case"decline":{this.submitting=!0;const e=await(a=this.endpoint,l=this.envelopeId,r=this.roleId,k(a,l,r,{action:"decline"}));console.log("Decline result",e),null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"}),this.submitting=!1,this.isDone=!0}break;case"print":window.print(),null===(n=this.envelopeUpdated)||void 0===n||n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":f(this.endpoint,this.envelope,this.envelope.envelope_document_id).catch((e=>{console.log("Error downloading PDF",e)})),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}updateRecipientFieldValue(e,i){console.log("[SIGN] updateRecipientFieldValue",e),this.recipient.fields.forEach((t=>{t.name===e&&(t.settings=i.settings,x(t),this.checkRecipientFields())}))}saveFieldChange(e,i){console.log("[SIGN] updateRecipientFieldValue",e),l(this.endpoint,this.envelopeId,e,i).then((i=>this.updateRecipientFieldValue(e,i))).catch((e=>{var i,t,s,n,o,a;401===(null===(i=e.response)||void 0===i?void 0:i.status)&&"jwt expired"===(null===(s=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===s?void 0:s.error)?(console.log("[SIGN] Signing session expired"),this.errorMessage="Signing session expired. Please reload your browser to continue."):console.log("[SIGN] Server error",e),null===(n=this.sdkError)||void 0===n||n.emit(new y(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(a=e.response)||void 0===a?void 0:a.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textbox":return this.saveFieldChange(e.name,{prepared:!1,value:t});case"checkbox_group":{const t=e.settings.options.map((e=>({id:e.id,checked:i.target.checked})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"radio_button_group":{const t=e.settings.options.map((e=>({id:e.id,selected:i.target.value===e.id})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"dropdown":return this.saveFieldChange(e.name,{prepared:!1,value:i.detail});case"initial":const l=await(await fetch(i.detail)).blob();return(n=this.endpoint,"initial",o=l,a=new FormData,a.append("initial",o,"initial"),n.api.post("/initials",a).then((function(e){return e.data}))).then((async i=>{const t=await d(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"signature":const c=await(await fetch(i.detail)).blob();return function(e,i,t){var s=new FormData;return s.append("signature",t,"signature"),e.api.post("/signatures",s).then((function(e){return e.data}))}(this.endpoint,0,c).then((async i=>{const t=await r(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"date":const h=i.target.getAttribute("iso");return this.saveFieldChange(e.name,{prepared:!1,value:h});case"timestamp":console.log("Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("Unhandled field update",{value:t,checked:s},e)}var n,o,a}isFieldValid(e){var i,t,s,n,o,a,l;const{required:r=!1}=e,{result:d="",value:c="",base64:h=""}=e.settings||{};switch(e.type){case"textbox":switch((null===(i=e.settings)||void 0===i?void 0:i.validator)||""){case"email":return p(d);case"phone":return u(d);default:return!r||""!==d}case"signature":case"initial":return!r||""!==h;case"timestamp":return!0;case"textarea":case"date":case"attachment":return!r||""!==d;case"dropdown":return!r||""!==c;case"checkbox_group":const v=((null===(s=null===(t=e.settings)||void 0===t?void 0:t.options)||void 0===s?void 0:s.filter((e=>e.checked)))||[]).length;return!r||v>=((null===(n=e.settings)||void 0===n?void 0:n.minimum_checked)||0)&&v<=((null===(o=e.settings)||void 0===o?void 0:o.maximum_checked)||999);case"radio_button_group":return!r||((null===(l=null===(a=e.settings)||void 0===a?void 0:a.options)||void 0===l?void 0:l.filter((e=>e.selected)))||[]).length>0;default:return!1}}async handleNext(){var e,i,t,s;if(this.nextSubmits){try{this.submitting=!0;const e=await(i=this.endpoint,t=this.envelopeId,s=this.roleId,k(i,t,s,{action:"submit"}));console.log("[SIGN] Submitted successfully",e),this.recipient.status="submitted",this.showDone=!0,this.isDone=!0}catch(e){console.log("[SIGN] Error submitting",e)}return void(this.submitting=!1)}const n=this.recipient.fields.filter((e=>e.required));let o=n.findIndex((e=>e.name===this.focusedField))+1;o>=n.length&&(o=0);let a=n[o],l=0;if(l<n.length&&["signature","initial"].includes(a.type)&&"signed"===(null===(e=a.settings)||void 0===e?void 0:e.result)&&(l++,o++,o>=n.length&&(o=0),a=n[o]),l>=n.length&&(a=null),a){const e=w(a),i=document.getElementById(e);null==i||i.focusField(),this.focusedField=a.name}}checkRecipientFields(){const e=this.recipient.fields.filter((e=>!this.isFieldValid(e)));e.length<1?(this.nextButtonLabel="Finish",this.nextSubmits=!0):(console.log("[SIGN] Remaining invalid fields",e),this.nextButtonLabel="Next",this.nextSubmits=!1)}attachFieldAttributes(e,i,t,s){var n;s.addEventListener("input",(e=>{console.log("[SIGN] onfieldInput",e.detail,e.target.value),e.target.name.includes("checkbox_group")||e.target.name.includes("radio_button_group")?(console.log("CB",e.target),this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))):this.checkRecipientFields()})),s.addEventListener("focusout",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.addEventListener("fieldChange",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.setAttribute("roleindex",t),s.setAttribute("xScale",e.xScale),s.setAttribute("yScale",e.yScale),s.setAttribute("initials",this.recipient?v(this.recipient.full_name):""),s.setAttribute("name",(null===(n=this.recipient)||void 0===n?void 0:n.full_name)||"")}handlePageRendered(e){const i=e.detail,t=m(this.roleNames,this.recipient.role_name),s=this.recipient.fields.filter((e=>e.page===i.pageNumber));console.log("[SIGN] Page rendered, updating fields",{pageInfo:i,roleIndex:t,recipientFields:s}),s.forEach((e=>{const s=b(e,i,t,{disabled:!1,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))})),this.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status===c.SUBMITTED||e.status===c.CANCELED||e.status===c.DECLINED))).forEach((e=>{e.fields.forEach((e=>{const s=b(e,i,t,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))}))})),this.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name)).forEach((e=>{const t=m(this.roleNames,e.role_name);e.fields.filter((e=>e.page===i.pageNumber)).forEach((e=>{const s=b(e,i,t,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});s&&s.setAttribute&&(s.setAttribute("roleindex",t),s.setAttribute("xScale",i.xScale),s.setAttribute("yScale",i.yScale))}))})),this.checkRecipientFields()}render(){return this.envelope?this.isDone?t(s,{class:{agreed:this.agreed}},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return null===(i=this.sdkError)||void 0===i?void 0:i.emit(e.detail)}}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=!1,this.isDone=!0}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null))):t(s,{class:{agreed:this.agreed}},!this.finishLater&&t("div",{class:"intro"},t("div",{class:"inner"},"Please review and act on these documents.")),t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},this.agreed?t(n,null,t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name),t("div",{style:{flex:"1"}})):t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:()=>this.handleClickAgree()})),!this.finishLater&&t("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:this.isDone||this.finishLater?I:S,onOptionSelected:e=>this.handleOptionSelected(e)}))),t("div",this.agreed?{style:{display:"none"}}:{class:"cover"}),t("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(this.envelope.documents||[]).map((e=>{const i=g(1,e.page_numbers);return t(n,null,i.map((i=>t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=!1}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=!1,this.isDone=!0}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null))):t(s,null,t("verdocs-loader",null))}};N.style='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff}verdocs-sign .intro .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}';export{N as verdocs_sign}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var i=0,n=t.length,r;i<n;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-934a39b4.system.js","./p-3305a941.system.js","./p-54498887.system.js","./p-b1288daf.system.js","./p-882cf708.system.js","./p-d50523fd.system.js","./p-a25d989e.system.js","./p-48f6291b.system.js","./p-187b20b7.system.js","./p-05eb4fed.system.js","./p-4ac861c9.system.js","./p-bbee73c8.system.js","./p-d1c37175.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,o,i,n,r,s,a,l,d,c,p,u,h,v,m,f,g,x,b,w,y,E;return{setters:[function(e){t=e.r;o=e.c;i=e.h;n=e.H;r=e.F;s=e.a},function(e){a=e.i},function(){},function(e){l=e.u;d=e.c},function(e){c=e.V;p=e.T},function(e){u=e.i},function(e){h=e.a;v=e.r;m=e.e;f=e.f;g=e.h},function(e){x=e.g;b=e.a},function(e){w=e.S},function(e){y=e.g},function(e){E=e.u},function(){},function(){},function(){},function(){}],execute:function(){var q;var k=function(e,t,o){return e.api.post("/templates/".concat(t,"/roles"),o).then((function(e){return e.data}))};var R=function(e,t,o,i){return e.api.put("/templates/".concat(t,"/roles/").concat(o),i).then((function(e){return e.data}))};var _=function(e,t,o){return e.api.delete("/templates/".concat(t,"/roles/").concat(o)).then((function(e){return e.data}))};var C="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}";var M='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var I='<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>';var S='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';var A='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';var L='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';var Z='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var N='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var z='<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>';var T='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';var H='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';var V=[{id:"signature",tooltip:"Signature",icon:Z},{id:"initial",tooltip:"Initials",icon:N},{id:"sep1",tooltip:"",icon:H},{id:"textbox",tooltip:"Text Box",icon:M},{id:"textarea",tooltip:"Text Area",icon:I},{id:"checkbox_group",tooltip:"Check Box",icon:S},{id:"radio_button_group",tooltip:"Radio Button",icon:A},{id:"dropdown",tooltip:"Dropdown",icon:T},{id:"sep2",tooltip:"",icon:H},{id:"date",tooltip:"Date",icon:L},{id:"timestamp",tooltip:"Timestamp",icon:z}];var O=e("verdocs_template_fields",function(){function e(e){t(this,e);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.pageHeights={};this.store=null;this.cachedPageInfo={};this.endpoint=c.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.showMustSelectRole=false;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s,a,l;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[FIELDS] Unable to start builder session, must be authenticated");return[2]}a=this;return[4,x(this.endpoint,this.templateId,true)];case 1:a.store=d.sent();console.log("[FIELDS] Loaded template ".concat(this.templateId),this.store.state);this.selectedRoleName=((i=(o=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles)===null||o===void 0?void 0:o[0])===null||i===void 0?void 0:i.name)||"";console.log("[FIELDS] Starting with role",this.selectedRoleName);return[3,3];case 2:l=d.sent();console.log("[FIELDS] Error with preview session",l);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new w(l.message,(r=l.response)===null||r===void 0?void 0:r.status,(s=l.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.componentDidRender=function(){a.dynamicDrop(true);var e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){console.log("[FIELDS] Moving toolbar");t.remove();e.append(t)}};e.prototype.componentWillUpdate=function(){var e=this;var t,o,i,n,r,s;if(!this.selectedRoleName||!(((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.roles)||[]).find((function(t){return t.name===e.selectedRoleName}))){this.selectedRoleName=((s=(r=(n=(i=this.store)===null||i===void 0?void 0:i.state)===null||n===void 0?void 0:n.roles)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.name)||"";console.log("[FIELDS] Selected new role",this.selectedRoleName)}};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){console.log("[FIELDS] handleFieldChange",e,t,o);this.rerender++;return[2]}))}))};e.prototype.attachFieldAttributes=function(e,t,o,i){var n=this;i.addEventListener("input",(function(e){return n.handleFieldChange(t,e)}));i.addEventListener("settingsChanged",(function(){var r,s,a,l;n.selectedRoleName=t.role_name;console.log("settings changed",n.selectedRoleName,t);i.setAttribute("roleindex",h(b(n.store),t.role_name));i.field=(s=(r=n.store)===null||r===void 0?void 0:r.state)===null||s===void 0?void 0:s.fields.find((function(e){return e.name===t.name}));n.rerender++;i.setAttribute("rerender",n.rerender);(a=n.templateUpdated)===null||a===void 0?void 0:a.emit({endpoint:n.endpoint,template:(l=n.store)===null||l===void 0?void 0:l.state,event:"updated-field"});console.log("Re-rendering field",t.name,e.pageNumber);n.reRenderField(t,e.pageNumber);var d=v(t,e,o,{disabled:true,editable:true,draggable:true});if(!d){return}}));i.addEventListener("deleted",(function(){var e,o;console.log("deleted",n,t);i.remove();n.rerender++;(e=n.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:n.endpoint,template:(o=n.store)===null||o===void 0?void 0:o.state,event:"updated-field"})}));i.setAttribute("templateid",this.templateId);i.setAttribute("roleindex",o);i.setAttribute("pageNumber",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);i.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var o;var i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i);this.cachedPageInfo[i.pageNumber]=i;this.pageHeights[i.pageNumber]=i.naturalHeight;var n=(o=this.store)===null||o===void 0?void 0:o.state.fields.filter((function(e){return e.page_sequence===i.pageNumber}));n.forEach((function(e){return t.reRenderField(e,i.pageNumber)}))};e.prototype.reRenderField=function(e,t){var o=this;var i=this.cachedPageInfo[t];var n=h(b(this.store),e.role_name);var r=v(e,i,n,{disabled:true,editable:true,draggable:true});if(!r){return}if(Array.isArray(r)){r.forEach((function(t){o.attachFieldAttributes(i,e,n,t);a(t).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var o=+(e.target.getAttribute("posY")||0);var i=+(e.target.getAttribute("xScale")||1);var n=+(e.target.getAttribute("yScale")||1);var r=e.dx/i+t;var s=e.dy/n+o;e.target.setAttribute("posX",r);e.target.setAttribute("posy",s);m(e.target,"translate","".concat(r,"px, ").concat(s,"px"))},end:o.handleMoveField.bind(o)}})}))}else{this.attachFieldAttributes(i,e,n,r);a(r).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var o=+(e.target.getAttribute("posY")||0);var i=+(e.target.getAttribute("xScale")||1);var n=+(e.target.getAttribute("yScale")||1);var r=e.dx/i+t;var s=e.dy/n+o;e.target.setAttribute("posX",r);e.target.setAttribute("posy",s);m(e.target,"translate","".concat(r,"px, ").concat(s,"px"))},end:this.handleMoveField.bind(this)}})}};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,n,r,s,a,d,c,p,u,h,v,m,f,g,x,b,w,y,E;return __generator(this,(function(q){switch(q.label){case 0:o=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[o],n=i.naturalWidth,r=n===void 0?612:n,s=i.naturalHeight,a=s===void 0?792:s,d=i.renderedHeight,c=d===void 0?792:d;console.log("[FIELDS] Drag ended",o,e.target);p=e.target.getBoundingClientRect();u=e.target.parentElement;h=u.getBoundingClientRect();v=Math.max(p.left-h.left,0);m=Math.max(c-(h.bottom-p.bottom),0);f=this.viewCoordinatesToPageCoordinates(v,m,o,r-e.rect.width,a-e.rect.height),g=f.x,x=f.y;b=e.target.getAttribute("name");w=+(e.target.getAttribute("option")||"0");y=(t=this.store)===null||t===void 0?void 0:t.state.fields.find((function(e){return e.name===b}));console.log("Will update",b,w,y);if(!y)return[3,2];switch(y.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":y.setting.x=g;y.setting.y=x;break;case"checkbox_group":case"radio_button_group":{E=y.setting.options[w];if(E){E.x=g;E.y=x}}break}return[4,l(this.endpoint,this.templateId,b,y)];case 1:q.sent();this.handlePageRendered({detail:this.cachedPageInfo[o]});q.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var o,i;var n=1;var r;do{r="".concat(e,"P").concat(t,"-").concat(n);console.log("testing field",r);n++}while((o=this.store)===null||o===void 0?void 0:o.state.fields.some((function(e){return e.name===r})));console.log("Will use field name",this,r,(i=this.store)===null||i===void 0?void 0:i.state.fields);return r};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,o,i,n){var r=this.cachedPageInfo[o],s=r.xScale,a=s===void 0?1:s,l=r.yScale,d=l===void 0?1:l,c=r.renderedHeight,p=c===void 0?792:c;var u=Math.floor(Math.min(e/a,i));var h=Math.floor(Math.min(Math.max(p-t,0)/d,n));return{x:u,y:h}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var o,i,n,r,s,a,l,c,p,u,h,v,m,x,b,w,y;return __generator(this,(function(E){switch(E.label){case 0:if(!this.placing)return[3,2];console.log("Placing field",this,this.selectedRoleName,this.placing,t,e.offsetX,e.offsetY);r=e.offsetX;s=e.offsetY;a=f(this.placing);l=g(this.placing);c=this.cachedPageInfo[t];p=c.naturalWidth,u=p===void 0?612:p,h=c.naturalHeight,v=h===void 0?792:h;m=this.viewCoordinatesToPageCoordinates(r,s,t,u-a,v-l);x=Math.floor(m.x);b=Math.floor(m.y);w={name:this.generateFieldName(this.placing,t),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:true,page_sequence:t,validator:null,setting:{x:x,y:b},x:x,y:b,tabindex:0,width:a,height:l};switch(w.type){case"attachment":case"payment":w.setting={x:x,y:b};break;case"initial":case"signature":w.setting={x:x,y:b,result:""};break;case"checkbox_group":w.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:"".concat(w.name,"-1"),value:"Option 1",checked:false,x:x,y:b}]};break;case"date":w.setting={x:x,y:b,width:a,height:l,result:""};break;case"dropdown":w.required=false;w.setting={x:x,y:b,width:a,height:l,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":w.setting={options:[{id:"".concat(w.name,"-1"),value:"Option 1",selected:false,x:x,y:b}]};break;case"textarea":case"textbox":w.setting={x:x,y:b,width:a,height:l,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":w.setting={x:x,y:b,width:a,height:l};break}if(w.type==="textarea"){w.setting.leading=16;w.type="textbox"}return[4,d(this.endpoint,this.templateId,w)];case 1:y=E.sent();console.log("Saved field",y);if(this.store.state){this.store.state.fields=__spreadArray(__spreadArray([],(o=this.store)===null||o===void 0?void 0:o.state.fields,true),[y],false)}this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:(n=this.store)===null||n===void 0?void 0:n.state,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[t]});E.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;var o,r,s,a,l,d,c,p;console.log("[FIELDS] Rendering",this.selectedRoleName);if(!this.endpoint.session){return i(n,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!((o=this.store)===null||o===void 0?void 0:o.state.isLoaded)){return i(n,null,i("verdocs-loader",null))}var h=(s=(r=this.store)===null||r===void 0?void 0:r.state)===null||s===void 0?void 0:s.roles.map((function(e){return{value:e.name,label:e.name}}));return i(n,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){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:h,onInput:function(e){return t.selectedRoleName=e.target.value}}),V.map((function(e){return i("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){if(e.tooltip){if(t.selectedRoleName){t.placing=e.id}else{t.showMustSelectRole=true}}}})}))),i("div",{class:"pages"},(((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.template_documents)||[]).map((function(e){var o=u(1,e.page_numbers);return o.map((function(o){return i("verdocs-template-document-page",{templateId:t.templateId,documentId:e.id,pageNumber:o,virtualWidth:612,virtualHeight:792,onClick:function(e){return t.handleClickPage(e,o)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))}))),this.showMustSelectRole&&i("verdocs-ok-dialog",{heading:"Unable to add field",message:((p=(c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.roles)===null||p===void 0?void 0:p.length)>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:function(){return t.showMustSelectRole=false}}))};return e}());O.style=C;var D='verdocs-template-role-properties{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-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-role-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-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-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-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-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-role-properties .delete-button:active{background:#f3f3f3}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}';var P='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var F=e("verdocs_template_role_properties",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.delete=o(this,"delete",7);this.sdkError=o(this,"sdkError",7);this.store=null;this.endpoint=c.getDefault();this.templateId="";this.roleName="";this.sender=p.EVERYONE;this.dirty=false;this.saving=false;this.name="";this.type="signer";this.fullName="";this.email="";this.phone="";this.allowDelegation=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s,a;var l=this;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLE_PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLE_PROPERTIES] Unable to start builder session, must be authenticated");return[2]}r=this;return[4,x(this.endpoint,this.templateId,false)];case 1:r.store=d.sent();s=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.find((function(e){return e.name===l.roleName}));if(s){this.name=s.name;this.type=s.type;this.fullName=s.full_name;this.email=s.email;this.phone=s.phone;this.allowDelegation=s.delegator;console.log("[ROLES] Editing role",s)}return[3,3];case 2:a=d.sent();console.log("[TEMPLATE ROLE PROPERTIES] Error with preview session",a);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new w(a.message,(i=a.response)===null||i===void 0?void 0:i.status,(n=a.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,o,i;e.stopPropagation();this.name=(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.name;this.dirty=false;(i=this.close)===null||i===void 0?void 0:i.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();this.saving=true;R(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,full_name:this.fullName,email:this.email,phone:this.phone,delegator:this.allowDelegation}).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t,o;return __generator(this,(function(i){switch(i.label){case 0:console.log("[ROLE_PROPERTIES] Update result",e);this.saving=false;this.dirty=false;o=this;return[4,x(this.endpoint,this.templateId,true)];case 1:o.store=i.sent();(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}}))}))})).catch((function(e){console.log("Update error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){_(this.endpoint,this.templateId,this.roleName).then((function(e){var o;console.log("Role deleted",e);t.store.state.roles=__spreadArray([],t.store.state.roles.filter((function(e){return e.name!==t.roleName})),true);(o=t.delete)===null||o===void 0?void 0:o.emit({templateId:t.templateId,roleName:t.roleName})})).catch((function(e){console.log("Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;return i(n,null,i("div",{class:"background-overlay",onClick:function(t){return e.handleCancel(t)}},i("div",{class:"dialog"},i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("verdocs-text-input",{id:"verdocs-recipient-name",label:"Role Name",value:this.name,autocomplete:"off",helpText:"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Template Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),i("div",{class:"row"},i("div",{class:"input-label"},"Type:"),i("verdocs-select-input",{value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}}),i("verdocs-help-icon",{text:"Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review."})),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Full Name",value:this.fullName,autocomplete:"off",helpText:"The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Full Name...",onInput:function(t){e.fullName=t.target.value;e.dirty=true}}),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Email",value:this.email,autocomplete:"off",helpText:"The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),i("verdocs-text-input",{id:"verdocs-recipient-phone",label:"Phone",value:this.phone,autocomplete:"off",helpText:"The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}),i("div",{class:"row"},i("div",{class:"input-label"},"May Delegate:"),i("div",{class:"checkbox-wrapper"},i("verdocs-checkbox",{checked:this.allowDelegation,onInput:function(t){e.allowDelegation=t.target.checked;e.dirty=true}})),i("verdocs-help-icon",{text:"If enabled, this recipient may delegate their actions to another individual."})),i("div",{class:"buttons"},i("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:P}),i("div",{style:{flex:"1"}}),i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))))};return e}());F.style=D;var B='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;display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-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}';var j=(q={},q[p.EVERYONE]="Everyone",q[p.EVERYONE_AS_CREATOR]="Everyone as Me",q[p.ORGANIZATION_MEMBER]="Organization member",q[p.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",q[p.CREATOR]="Me",q);var Q='<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>';var U='<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>';var Y='<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>';var W='<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>';var G='<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>';var X='<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>';var K='<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>';var J='<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>';var $=e("verdocs_template_roles",function(){function e(e){t(this,e);this.next=o(this,"next",7);this.exit=o(this,"exit",7);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.sequences=[];this.store=null;this.endpoint=c.getDefault();this.templateId="";this.showingRoleDialog=null;this.showingSenderDialog=false;this.sender=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}i=this;return[4,x(this.endpoint,this.templateId,true)];case 1:i.store=r.sent();this.sortTemplateRoles();this.renumberTemplateRoles();return[3,3];case 2:n=r.sent();console.log("[FIELDS] Error with preview session",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(o=n.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.componentDidRender=function(){a.dynamicDrop(true);a(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var o=+(t.target.getAttribute("posX")||0);var i=+(t.target.getAttribute("posY")||0);var n=t.dx+o;var r=t.dy+i;t.target.setAttribute("posX",n);t.target.setAttribute("posy",r);t.target.style.transform="translate(".concat(n+100,"px, ").concat(r-40,"px)")}.bind(this),end:function e(t){t.target.classList.remove("dragging");this.el.classList.remove("dragging");t.target.setAttribute("posX",0);t.target.setAttribute("posy",0);t.target.style.transform="translate(0px, 0px)"}.bind(this)}});a(".dropzone").dropzone({overlap:.05,ondrop:function e(t){var o=this;var i,n,r,s,a;t.target.classList.remove("active");var l=t.relatedTarget.dataset.rolename;var d=+t.target.dataset.sequence;var c=+t.target.dataset.order;var p=(r=(n=(i=this.store)===null||i===void 0?void 0:i.state)===null||n===void 0?void 0:n.roles)===null||r===void 0?void 0:r.find((function(e){return e.name===l}));if(p){p.sequence=d;p.order=c;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all((a=(s=this.store)===null||s===void 0?void 0:s.state)===null||a===void 0?void 0:a.roles.map((function(e){return R(o.endpoint,o.templateId,e.name,{sequence:e.sequence,order:e.order})}))).then((function(){var e,t;console.log("[ROLES] Updated roles");(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({event:"updated-role",endpoint:o.endpoint,template:(t=o.store)===null||t===void 0?void 0:t.state})})).catch((function(e){return console.log("[ROLES] Role updates failed",e)}))}}.bind(this),ondropactivate:function(e){e.target.classList.add("visible")},ondropdeactivate:function(e){e.target.classList.remove("visible")},ondragenter:function(e){e.target.classList.add("active")},ondragleave:function(e){e.target.classList.remove("active")}})};e.prototype.handleCancel=function(){var e;(e=this.exit)===null||e===void 0?void 0:e.emit()};e.prototype.handleSubmit=function(){var e;(e=this.next)===null||e===void 0?void 0:e.emit()};e.prototype.sortTemplateRoles=function(){var e,t;(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.extractSequenceNumbers=function(){var e=this;var t,o;this.sequences=[];(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.roles.forEach((function(t){if(!e.sequences.includes(t.sequence)){e.sequences.push(t.sequence)}}))};e.prototype.renumberTemplateRoles=function(){var e=this;this.extractSequenceNumbers();var t=[];this.sequences.sort((function(e,t){return e-t}));this.sequences.forEach((function(o,i){var n,r;(r=(n=e.store)===null||n===void 0?void 0:n.state)===null||r===void 0?void 0:r.roles.filter((function(e){return e.sequence===o})).forEach((function(e,o){if(!t.includes(e.name)){e.sequence=i+1;e.order=o+1;t.push(e.name)}}))}));this.extractSequenceNumbers()};e.prototype.getNextRoleName=function(){var e,t,o,i;var n="";var r=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.length;do{r++;n="Recipient ".concat(r)}while(!n||((i=(o=this.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.roles.some((function(e){return e.name===n}))));return n};e.prototype.callCreateRole=function(e,t,o){var i=this;console.log("[ROLES] Will create role",{name:e,sequence:t,order:o});k(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,order:o,full_name:"",email:"",phone:"",type:"signer",delegator:false}).then((function(e){return __awaiter(i,void 0,void 0,(function(){var t,o,i;return __generator(this,(function(n){switch(n.label){case 0:console.log("[ROLES] Created role",e);i=this;return[4,x(this.endpoint,this.templateId,true)];case 1:i.store=n.sent();this.sortTemplateRoles();this.renumberTemplateRoles();(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({event:"created-role",endpoint:this.endpoint,template:(o=this.store)===null||o===void 0?void 0:o.state});return[2]}}))}))})).catch((function(e){console.log("[ROLES] Error creating role",e)}))};e.prototype.handleAddRole=function(e,t){var o;e.stopPropagation();var i=((o=this.store)===null||o===void 0?void 0:o.state.roles.filter((function(e){return e.sequence===t})).length)+1;var n=this.getNextRoleName();this.callCreateRole(n,t,i)};e.prototype.handleAddStep=function(e,t){e.stopPropagation();var o=1;var i=this.getNextRoleName();this.callCreateRole(i,t,o)};e.prototype.render=function(){var e=this;var t,o,s,a,l,d;console.log("[ROLES] Rendering");if(!this.endpoint.session){return i(n,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!((t=this.store)===null||t===void 0?void 0:t.state.isLoaded)){return i(n,{class:"loading"},i("verdocs-loader",null))}var c=(((s=(o=this.store)===null||o===void 0?void 0:o.state)===null||s===void 0?void 0:s.roles)||[]).map((function(e){return e.name}));return i(n,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off","data-r":(a=this.store.state)===null||a===void 0?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:U}),i("div",{class:"row-roles"},i("div",{class:"sender"},i("span",{class:"label"},"Sender:")," ",j[(d=(l=this.store)===null||l===void 0?void 0:l.state)===null||d===void 0?void 0:d.sender]," ",i("div",{class:"settings-button",innerHTML:Q,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),i("div",{class:"row add-sequence","data-sequence":0},i("div",{class:"icon",innerHTML:G}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(t){var o,n;return i(r,null,i("div",{class:"row"},i("div",{class:"icon",innerHTML:Y}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-order":.5,"data-sequence":t}),(n=(o=e.store)===null||o===void 0?void 0:o.state)===null||n===void 0?void 0:n.roles.filter((function(e){return e.sequence===t})).map((function(o){var n=!o.email;return n?i(r,null,i("div",{class:"recipient",style:{backgroundColor:y(h(c,o.name))},"data-rolename":o.name},i("span",{class:"type-icon",innerHTML:o.type==="signer"?X:o.type==="cc"?J:K}),o.name," ",i("div",{class:"settings-button",innerHTML:Q,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),i("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":t})):i(r,null,i("div",{class:"recipient",style:{borderColor:y(h(c,o.name))},"data-rolename":o.name},i("span",{class:"type-icon",innerHTML:o.type==="signer"?X:o.type==="cc"?J:K}),o.full_name," ",i("div",{class:"settings-button",innerHTML:Q,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),i("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":t}))})),i("button",{class:"add-role",innerHTML:G,onClick:function(o){return e.handleAddRole(o,t)}}))),e.sequences.length>0&&i("div",{class:"row add-sequence","data-sequence":t},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:G}),i("div",{class:"dropzone","data-sequence":t+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:G}),i("button",{class:"add-step",innerHTML:G,onClick:function(t){return e.handleAddStep(t,e.sequences.length+1)}}))),i("div",{class:"row"},i("div",{class:"icon",innerHTML:W}),i("div",{class:"row-roles"},i("div",{class:"complete"},"Document Complete")))),c.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:G})," 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:function(){return e.handleCancel()}}),i("verdocs-button",{label:"OK",size:"small",onClick:function(){return e.handleSubmit()},disabled:c.length<1}))),this.showingRoleDialog&&i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:function(){e.showingRoleDialog=null},onDelete:function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(o){switch(o.label){case 0:return[4,x(this.endpoint,this.templateId,true)];case 1:o.sent();this.renumberTemplateRoles();this.showingRoleDialog=null;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({event:"deleted-role",endpoint:this.endpoint,template:(t=this.store)===null||t===void 0?void 0:t.state});return[2]}}))}))}}),this.showingSenderDialog&&i("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:function(){return e.showingSenderDialog=false}}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());$.style=B;var ee='verdocs-template-sender{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';var te=e("verdocs_template_sender",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.sdkError=o(this,"sdkError",7);this.store=null;this.endpoint=c.getDefault();this.templateId="";this.sender=p.EVERYONE;this.saving=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[SENDER] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SENDER] Unable to start builder session, must be authenticated");return[2]}r=this;return[4,x(this.endpoint,this.templateId,false)];case 1:r.store=a.sent();this.sender=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.sender;return[3,3];case 2:s=a.sent();console.log("[SENDER] Error with preview session",s);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new w(s.message,(i=s.response)===null||i===void 0?void 0:i.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleClose=function(){this.close.emit()};e.prototype.handleDismiss=function(e){if(e.target.className==="background-overlay"){e.preventDefault();this.handleClose()}};e.prototype.handleSelectSetting=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){this.saving=true;E(this.endpoint,this.templateId,{sender:e}).then((function(o){var i;console.log("Update result",o);if((i=t.store)===null||i===void 0?void 0:i.state){t.store.state.sender=e}t.saving=false;t.sender=e})).catch((function(e){console.log("Error saving",e);t.saving=false}));return[2]}))}))};e.prototype.render=function(){var e=this;return i(n,null,i("div",{class:"background-overlay",onClick:function(t){return e.handleDismiss(t)}},i("div",{class:"dialog"},i("div",{class:"options"},i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:p.EVERYONE,checked:this.sender===p.EVERYONE,onInput:function(){return e.handleSelectSetting(p.EVERYONE)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web"),i("verdocs-help-icon",{text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:p.EVERYONE_AS_CREATOR,checked:this.sender===p.EVERYONE_AS_CREATOR,onInput:function(){return e.handleSelectSetting(p.EVERYONE_AS_CREATOR)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web as me"),i("verdocs-help-icon",{text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:p.ORGANIZATION_MEMBER,checked:this.sender===p.ORGANIZATION_MEMBER,onInput:function(){return e.handleSelectSetting(p.ORGANIZATION_MEMBER)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:p.ORGANIZATION_MEMBER_AS_CREATOR,checked:this.sender===p.ORGANIZATION_MEMBER_AS_CREATOR,onInput:function(){return e.handleSelectSetting(p.ORGANIZATION_MEMBER_AS_CREATOR)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization as me"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:p.CREATOR,checked:this.sender===p.CREATOR,onInput:function(){return e.handleSelectSetting(p.CREATOR)}}),i("div",{class:"description"},i("div",{class:"name"},"Me"),i("verdocs-help-icon",{text:"Only I can use this template."})))),i("div",{class:"buttons"},i("verdocs-button",{label:"Close",onClick:function(){return e.handleClose()}})))))};return e}());te.style=ee}}}));
@@ -1 +0,0 @@
1
- import{r as t,h as s,H as e}from"./p-9cf1a627.js";import"./p-05788c2b.js";import{V as l}from"./p-49fb6d62.js";import{g as i}from"./p-3906caae.js";import"./p-822ba467.js";const o=class{constructor(s){t(this,s),this.store=null,this.endpoint=l.getDefault(),this.templateId="e997b94c-9d1b-4c85-8552-dedd24e35550"}async componentWillLoad(){try{this.endpoint.loadSession(),this.store=await i(this.endpoint,this.templateId,!1)}catch(t){console.log("[TEMPLATE VISIBILITY] Error loading template",t)}}render(){return console.log("[IPC] Rendering"),s(e,null,s("div",null,s("pre",null,s("code",null,JSON.stringify(this.store.state,null,2)))),s("verdocs-template-roles",{templateId:this.templateId}),s("verdocs-template-fields",{templateId:this.templateId}))}};o.style="ipc-test{max-width:800px;display:block}";export{o as ipc_test}
@@ -1 +0,0 @@
1
- import{d as t}from"./p-05788c2b.js";var e,n,r,o,i,s;!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.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"}(n||(n={})),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"}(r||(r={})),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"}(o||(o={})),function(t){t.ENV_ESSENTIAL="env:essential",t.ORG_STANDARD="org:standard"}(i||(i={})),function(t){t.OWNER="owner",t.BASIC_USER="basic_user",t.MEMBER="member"}(s||(s={}));const u=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 c(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 a(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){c(i,r,o,s,u,"next",t)}function u(t){c(i,r,o,s,u,"throw",t)}s(void 0)}))}}function f(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 l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t){return!t.response&&Boolean(t.code)&&"ECONNABORTED"!==t.code&&(t=>!u.has(t&&t.code))(t)}var m=["get","head","options"],p=m.concat(["put","delete"]);function b(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function E(t){return!!t.config&&b(t)&&-1!==p.indexOf(t.config.method)}function w(t){return d(t)||E(t)}function _(){return 0}function R(t){var e=t["axios-retry"]||{};return e.retryCount=e.retryCount||0,t["axios-retry"]=e,e}function y(){return(y=a((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 O(t,e){t.interceptors.request.use((t=>(R(t).lastRequestTime=Date.now(),t))),t.interceptors.response.use(null,function(){var n=a((function*(n){var{config:r}=n;if(!r)return Promise.reject(n);var{retries:o=3,retryCondition:i=w,retryDelay:s=_,shouldResetTimeout:u=!1,onRetry:c=(()=>{})}=function(t,e){return l(l({},e),t["axios-retry"])}(r,e),a=R(r);if(yield function(t,e,n,r){return y.apply(this,arguments)}(o,i,a,n)){a.retryCount+=1;var f=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 h=Date.now()-a.lastRequestTime,d=r.timeout-h-f;if(d<=0)return Promise.reject(n);r.timeout=d}return r.transformRequest=[t=>t],c(a.retryCount,n,r),new Promise((e=>setTimeout((()=>e(t(r))),f)))}return Promise.reject(n)}));return function(t){return n.apply(this,arguments)}}())}function g(t,e){return function(){return t.apply(e,arguments)}}O.isNetworkError=d,O.isSafeRequestError=function(t){return!!t.config&&b(t)&&-1!==m.indexOf(t.config.method)},O.isIdempotentRequestError=E,O.isNetworkOrIdempotentRequestError=w,O.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},O.isRetryableError=b;const{toString:v}=Object.prototype,{getPrototypeOf:T}=Object,S=(A=Object.create(null),t=>{const e=v.call(t);return A[e]||(A[e]=e.slice(8,-1).toLowerCase())});var A;const N=t=>(t=t.toLowerCase(),e=>S(e)===t),j=t=>e=>typeof e===t,{isArray:C}=Array,D=j("undefined"),L=N("ArrayBuffer"),U=j("string"),P=j("function"),I=j("number"),F=t=>null!==t&&"object"==typeof t,B=t=>{if("object"!==S(t))return!1;const e=T(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},x=N("Date"),M=N("File"),H=N("Blob"),q=N("FileList"),k=N("URLSearchParams");function G(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),C(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 J(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 z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,K=t=>!D(t)&&t!==z,V=(X="undefined"!=typeof Uint8Array&&T(Uint8Array),t=>X&&t instanceof X);var X;const Y=N("HTMLFormElement"),$=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),W=N("RegExp"),Z=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};G(n,((n,o)=>{!1!==e(n,o,t)&&(r[o]=n)})),Object.defineProperties(t,r)},Q="abcdefghijklmnopqrstuvwxyz",tt={DIGIT:"0123456789",ALPHA:Q,ALPHA_DIGIT:Q+Q.toUpperCase()+"0123456789"},et={isArray:C,isArrayBuffer:L,isBuffer:function(t){return null!==t&&!D(t)&&null!==t.constructor&&!D(t.constructor)&&P(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||v.call(t)===e||P(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&L(t.buffer),e},isString:U,isNumber:I,isBoolean:t=>!0===t||!1===t,isObject:F,isPlainObject:B,isUndefined:D,isDate:x,isFile:M,isBlob:H,isRegExp:W,isFunction:P,isStream:t=>F(t)&&P(t.pipe),isURLSearchParams:k,isTypedArray:V,isFileList:q,forEach:G,merge:function t(){const{caseless:e}=K(this)&&this||{},n={},r=(r,o)=>{const i=e&&J(n,o)||o;n[i]=B(n[i])&&B(r)?t(n[i],r):B(r)?t({},r):C(r)?r.slice():r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&G(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(G(e,((e,r)=>{t[r]=n&&P(e)?g(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&&T(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:S,kindOfTest:N,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(C(t))return t;let e=t.length;if(!I(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:Y,hasOwnProperty:$,hasOwnProp:$,reduceDescriptors:Z,freezeMethods:t=>{Z(t,((e,n)=>{if(P(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;P(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 C(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:J,global:z,isContextDefined:K,ALPHABET:tt,generateString:(t=16,e=tt.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&P(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(F(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=C(t)?[]:{};return G(t,((t,e)=>{const i=n(t,r+1);!D(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)}};function nt(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)}et.inherits(nt,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:et.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const rt=nt.prototype,ot={};function it(t){return et.isPlainObject(t)||et.isArray(t)}function st(t){return et.endsWith(t,"[]")?t.slice(0,-2):t}function ut(t,e,n){return t?t.concat(e).map((function(t,e){return t=st(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=>{ot[t]={value:t}})),Object.defineProperties(nt,ot),Object.defineProperty(rt,"isAxiosError",{value:!0}),nt.from=(t,e,n,r,o,i)=>{const s=Object.create(rt);return et.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),nt.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const ct=et.toFlatObject(et,{},null,(function(t){return/^is[A-Z]/.test(t)}));function at(t,e,n){if(!et.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=et.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!et.isUndefined(e[t])}))).metaTokens,o=n.visitor||a,i=n.dots,s=n.indexes,u=(n.Blob||"undefined"!=typeof Blob&&Blob)&&et.isSpecCompliantForm(e);if(!et.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(et.isDate(t))return t.toISOString();if(!u&&et.isBlob(t))throw new nt("Blob is not supported. Use a Buffer instead.");return et.isArrayBuffer(t)||et.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(et.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(et.isArray(t)&&function(t){return et.isArray(t)&&!t.some(it)}(t)||(et.isFileList(t)||et.endsWith(n,"[]"))&&(u=et.toArray(t)))return n=st(n),u.forEach((function(t,r){!et.isUndefined(t)&&null!==t&&e.append(!0===s?ut([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!it(t)||(e.append(ut(o,n,i),c(t)),!1)}const f=[],l=Object.assign(ct,{defaultVisitor:a,convertValue:c,isVisitable:it});if(!et.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!et.isUndefined(n)){if(-1!==f.indexOf(n))throw Error("Circular reference detected in "+r.join("."));f.push(n),et.forEach(n,(function(n,i){!0===(!(et.isUndefined(n)||null===n)&&o.call(e,n,et.isString(i)?i.trim():i,r,l))&&t(n,r?r.concat(i):[i])})),f.pop()}}(t),e}function ft(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function lt(t,e){this._pairs=[],t&&at(t,this,e)}const ht=lt.prototype;function dt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function mt(t,e,n){if(!e)return t;const r=n&&n.encode||dt,o=n&&n.serialize;let i;if(i=o?o(e,n):et.isURLSearchParams(e)?e.toString():new lt(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}ht.append=function(t,e){this._pairs.push([t,e])},ht.toString=function(t){const e=t?function(e){return t.call(this,e,ft)}:ft;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class pt{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){et.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const bt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Et={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:lt,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 wt(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),u=o>=t.length;return i=!i&&et.isArray(r)?r.length:i,u?(r[i]=et.hasOwnProp(r,i)?[r[i],n]:n,!s):(r[i]&&et.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&et.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(et.isFormData(t)&&et.isFunction(t.entries)){const n={};return et.forEachEntry(t,((t,r)=>{e(function(t){return et.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const _t={"Content-Type":void 0},Rt={transitional:bt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=et.isObject(t);if(o&&et.isHTMLForm(t)&&(t=new FormData(t)),et.isFormData(t))return r&&r?JSON.stringify(wt(t)):t;if(et.isArrayBuffer(t)||et.isBuffer(t)||et.isStream(t)||et.isFile(t)||et.isBlob(t))return t;if(et.isArrayBufferView(t))return t.buffer;if(et.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 at(t,new Et.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=et.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return at(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t){if(et.isString(t))try{return(0,JSON.parse)(t),et.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Rt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&et.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 nt.from(t,nt.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:Et.classes.FormData,Blob:Et.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};et.forEach(["delete","get","head"],(function(t){Rt.headers[t]={}})),et.forEach(["post","put","patch"],(function(t){Rt.headers[t]=et.merge(_t)}));const yt=et.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"]),Ot=Symbol("internals");function gt(t){return t&&String(t).trim().toLowerCase()}function vt(t){return!1===t||null==t?t:et.isArray(t)?t.map(vt):String(t)}function Tt(t,e,n,r,o){return et.isFunction(r)?r.call(this,e,n):(o&&(e=n),et.isString(e)?et.isString(r)?-1!==e.indexOf(r):et.isRegExp(r)?r.test(e):void 0:void 0)}class St{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=gt(e);if(!o)throw new Error("header name must be a non-empty string");const i=et.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=vt(t))}const i=(t,e)=>et.forEach(t,((t,n)=>o(t,n,e)));return et.isPlainObject(t)||t instanceof this.constructor?i(t,e):et.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z]+$/.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]&&yt[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=gt(t)){const n=et.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(et.isFunction(e))return e.call(this,t,n);if(et.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=gt(t)){const n=et.findKey(this,t);return!(!n||void 0===this[n]||e&&!Tt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=gt(t)){const o=et.findKey(n,t);!o||e&&!Tt(0,n[o],o,e)||(delete n[o],r=!0)}}return et.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&&!Tt(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return et.forEach(this,((r,o)=>{const i=et.findKey(n,o);if(i)return e[i]=vt(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]=vt(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return et.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&et.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[Ot]=this[Ot]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=gt(t);e[r]||(function(t,e){const n=et.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 et.isArray(t)?t.forEach(r):r(t),this}}function At(t,e){const n=this||Rt,r=e||n,o=St.from(r.headers);let i=r.data;return et.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Nt(t){return!(!t||!t.__CANCEL__)}function jt(t,e,n){nt.call(this,null==t?"canceled":t,nt.ERR_CANCELED,e,n),this.name="CanceledError"}St.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),et.freezeMethods(St.prototype),et.freezeMethods(St),et.inherits(jt,nt,{__CANCEL__:!0});const Ct=Et.isStandardBrowserEnv?{write:function(t,e,n,r,o,i){const s=[];s.push(t+"="+encodeURIComponent(e)),et.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),et.isString(r)&&s.push("path="+r),et.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 Dt(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 Lt=Et.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=et.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Ut(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 f=s,l=0;for(;f!==i;)l+=n[f++],f%=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*l/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 Pt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=St.from(t.headers).normalize(),i=t.responseType;let s;function u(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}et.isFormData(r)&&(Et.isStandardBrowserEnv||Et.isStandardBrowserWebWorkerEnv)&&o.setContentType(!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=Dt(t.baseURL,t.url);function f(){if(!c)return;const r=St.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new nt("Request failed with status code "+n.status,[nt.ERR_BAD_REQUEST,nt.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(),mt(a,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(f)},c.onabort=function(){c&&(n(new nt("Request aborted",nt.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new nt("Network Error",nt.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 nt(e,(t.transitional||bt).clarifyTimeoutError?nt.ETIMEDOUT:nt.ECONNABORTED,t,c)),c=null},Et.isStandardBrowserEnv){const e=(t.withCredentials||Lt(a))&&t.xsrfCookieName&&Ct.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&et.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),et.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&"json"!==i&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",Ut(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Ut(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{c&&(n(!e||e.type?new jt(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 l=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(a);l&&-1===Et.protocols.indexOf(l)?n(new nt("Unsupported protocol "+l+":",nt.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};et.forEach(Pt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));function It(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new jt(null,t)}function Ft(t){return It(t),t.headers=St.from(t.headers),t.data=At.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),(t=>{t=et.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;o<e&&(n=t[o],!(r=et.isString(n)?Pt[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new nt(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(et.hasOwnProp(Pt,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!et.isFunction(r))throw new TypeError("adapter is not a function");return r})(t.adapter||Rt.adapter)(t).then((function(e){return It(t),e.data=At.call(t,t.transformResponse,e),e.headers=St.from(e.headers),e}),(function(e){return Nt(e)||(It(t),e&&e.response&&(e.response.data=At.call(t,t.transformResponse,e.response),e.response.headers=St.from(e.response.headers))),Promise.reject(e)}))}const Bt=t=>t instanceof St?t.toJSON():t;function xt(t,e){e=e||{};const n={};function r(t,e,n){return et.isPlainObject(t)&&et.isPlainObject(e)?et.merge.call({caseless:n},t,e):et.isPlainObject(e)?et.merge({},e):et.isArray(e)?e.slice():e}function o(t,e,n){return et.isUndefined(e)?et.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!et.isUndefined(e))return r(void 0,e)}function s(t,e){return et.isUndefined(e)?et.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(Bt(t),Bt(e),!0)};return et.forEach(Object.keys(t).concat(Object.keys(e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);et.isUndefined(s)&&i!==u||(n[r]=s)})),n}const Mt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Mt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Ht={};Mt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.3.4] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new nt(r(o," has been removed"+(e?" in "+e:"")),nt.ERR_DEPRECATED);return e&&!Ht[o]&&(Ht[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 qt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new nt("options must be an object",nt.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 nt("option "+i+" must be "+n,nt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new nt("Unknown option "+i,nt.ERR_BAD_OPTION)}},validators:Mt},kt=qt.validators;class Gt{constructor(t){this.defaults=t,this.interceptors={request:new pt,response:new pt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=xt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;let i;void 0!==n&&qt.assertOptions(n,{silentJSONParsing:kt.transitional(kt.boolean),forcedJSONParsing:kt.transitional(kt.boolean),clarifyTimeoutError:kt.transitional(kt.boolean)},!1),void 0!==r&&qt.assertOptions(r,{encode:kt.function,serialize:kt.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&et.merge(o.common,o[e.method]),i&&et.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=St.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 f,l=0;if(!u){const t=[Ft.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,c),f=t.length,a=Promise.resolve(e);l<f;)a=a.then(t[l++],t[l++]);return a}f=s.length;let h=e;for(l=0;l<f;){const t=s[l++],e=s[l++];try{h=t(h)}catch(t){e.call(this,t);break}}try{a=Ft.call(this,h)}catch(t){return Promise.reject(t)}for(l=0,f=c.length;l<f;)a=a.then(c[l++],c[l++]);return a}getUri(t){return mt(Dt((t=xt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}et.forEach(["delete","get","head","options"],(function(t){Gt.prototype[t]=function(e,n){return this.request(xt(n||{},{method:t,url:e,data:(n||{}).data}))}})),et.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(xt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Gt.prototype[t]=e(),Gt.prototype[t+"Form"]=e(!0)}));class Jt{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 jt(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 Jt((function(e){t=e})),cancel:t}}}const zt={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(zt).forEach((([t,e])=>{zt[e]=t}));const Kt=function t(e){const n=new Gt(e),r=g(Gt.prototype.request,n);return et.extend(r,Gt.prototype,n,{allOwnKeys:!0}),et.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(xt(e,n))},r}(Rt);Kt.Axios=Gt,Kt.CanceledError=jt,Kt.CancelToken=Jt,Kt.isCancel=Nt,Kt.VERSION="1.3.4",Kt.toFormData=at,Kt.AxiosError=nt,Kt.Cancel=Kt.CanceledError,Kt.all=function(t){return Promise.all(t)},Kt.spread=function(t){return function(e){return t.apply(null,e)}},Kt.isAxiosError=function(t){return et.isObject(t)&&!0===t.isAxiosError},Kt.mergeConfig=xt,Kt.AxiosHeaders=St,Kt.formToJSON=t=>wt(et.isHTMLForm(t)?new FormData(t):t),Kt.HttpStatusCode=zt,Kt.default=Kt;var Vt=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},Xt=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 Vt()}try{return __global__||Vt()}finally{delete Object.prototype.__global__}}(),Yt=Symbol.for("verdocs-default-endpoint"),$t=function(t){return console.debug("[JS-SDK] ".concat(t.method.toUpperCase()," ").concat(t.baseURL).concat(t.url),t.data?JSON.stringify(t.data):""),t},Wt=function(){function e(t){this.environment="verdocs",this.sessionType="user",this.baseURL="https://api.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.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=Kt.create({baseURL:this.baseURL,timeout:this.timeout}),O(this.api,{retries:0,retryDelay:O.exponentialDelay,onRetry:function(t,e,n){window.console.debug("[JS_SDK] Retrying request (".concat(t,")"),e.message,n.url)}})}return e.prototype.setDefault=function(){Xt[Yt]=this},e.getDefault=function(){return Xt[Yt]||(Xt[Yt]=new e,window.console.debug("[JS_SDK] Created default endpoint",Xt[Yt])),Xt[Yt]},e.prototype.getEnvironment=function(){return this.environment},e.prototype.getSessionType=function(){return this.sessionType},e.prototype.getBaseURL=function(){return this.baseURL},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.api.defaults.baseURL=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($t):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{e as T,Wt as V}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,o){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,n){function a(t){try{c(o.next(t))}catch(t){n(t)}}function s(t){try{c(o["throw"](t))}catch(t){n(t)}}function c(t){t.done?i(t.value):r(t.value).then(a,s)}c((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,r,n,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(a){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,r&&(n=a[0]&2?r["return"]:a[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;if(r=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(a[0]===6&&i.label<n[1]){i.label=n[1];n=a;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(a);break}if(n[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];r=0}finally{o=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-934a39b4.system.js","./p-54498887.system.js","./p-6e9af353.system.js","./p-882cf708.system.js","./p-a25d989e.system.js","./p-5e0c6e7c.system.js","./p-bbee73c8.system.js","./p-d1c37175.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(t){"use strict";var e,i,o,r,n,a,s,c,p;return{setters:[function(t){e=t.r;i=t.c;o=t.h;r=t.H;n=t.a},function(){},function(t){a=t.g},function(t){s=t.V},function(t){c=t.t},function(t){p=t.c},function(){},function(){},function(){},function(){}],execute:function(){var l="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 d=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,a(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,o=e;i<o.length;i++){var r=o[i];var n=r.contentRect.width;t.renderedWidth=n;t.renderedHeight=t.virtualHeight*(n/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,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 o(r,{id:"".concat(this.containerId),style:{height:e,flex:"0 0 ".concat(e)}},this.layers.map((function(i){return i.type==="div"?o("div",{class:"verdocs-template-document-page-layer",id:"".concat(t.containerId,"-").concat(i.name),style:{height:e}}):t.pageDisplayUri?o("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}}):o("div",null)})))};Object.defineProperty(t.prototype,"container",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());d.style=l;var h='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 u=t("verdocs_toolbar_icon",function(){function t(t){e(this,t);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}t.prototype.componentDidLoad=function(){this.popperInstance=p(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};t.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};t.prototype.show=function(){var t,e;(t=this.tooltip)===null||t===void 0?void 0:t.setAttribute("data-show","");(e=this.popperInstance)===null||e===void 0?void 0:e.update().catch((function(){}))};t.prototype.hide=function(){var t;(t=this.tooltip)===null||t===void 0?void 0:t.removeAttribute("data-show")};t.prototype.render=function(){var t=this;return o(r,{class:{}},o("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return t.show()},onFocus:function(){return t.show()},onMouseLeave:function(){return t.hide()},onBlur:function(){return t.hide()},ref:function(e){return t.iconEl=e}}),o("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(e){return t.tooltip=e}},this.text,o("div",{"data-popper-arrow":"true",class:"arrow"})))};return t}());u.style=h}}}));
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as s,H as i}from"./p-9cf1a627.js";import"./p-05788c2b.js";import{V as l}from"./p-49fb6d62.js";import{g as o}from"./p-3906caae.js";import{S as r}from"./p-7a1b2643.js";import"./p-822ba467.js";const a=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.stepChanged=t(this,"stepChanged",7),this.store=null,this.endpoint=l.getDefault(),this.templateId=null,this.step=null,this.template=null}async componentWillLoad(){var e,t,s;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[BUILD] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[BUILD] Unable to start builder session, must be authenticated");this.step="roles",this.store=await o(this.endpoint,this.templateId,!0)}catch(i){console.log("[BUILD] Error loading template",i),null===(e=this.sdkError)||void 0===e||e.emit(new r(i.message,null===(t=i.response)||void 0===t?void 0:t.status,null===(s=i.response)||void 0===s?void 0:s.data))}}handleCancel(e){var t;console.log("Cancel",e.detail),this.step="preview",null===(t=this.stepChanged)||void 0===t||t.emit("")}handleTemplateCreated(e){var t;console.log("Created",e.detail),this.step="roles",null===(t=this.stepChanged)||void 0===t||t.emit("roles")}handleRolesDone(e){var t;console.log("Roles",e.detail),this.step="fields",null===(t=this.stepChanged)||void 0===t||t.emit("fields")}render(){return this.endpoint.session?s(i,null,"create"===this.step&&s("verdocs-template-create",{onExit:e=>this.handleCancel(e),onNext:e=>this.handleTemplateCreated(e)}),"attachments"===this.step&&s("verdocs-template-attachments",{templateId:this.templateId,onExit:e=>this.handleCancel(e),onNext:e=>this.handleTemplateCreated(e)}),"roles"===this.step&&s("verdocs-template-roles",{onExit:e=>this.handleCancel(e),onNext:e=>this.handleTemplateCreated(e)}),"settings"===this.step&&s("verdocs-template-settings",{templateId:this.templateId}),"fields"===this.step&&s("verdocs-template-fields",{templateId:this.templateId}),"preview"===this.step&&s("verdocs-template-preview",null)):s(i,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};a.style='verdocs-build{display:-ms-flexbox;display:flex;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}';export{a as verdocs_build}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function a(t){try{l(r["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):i(t.value).then(s,a)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return l([t,e])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-934a39b4.system.js","./p-54498887.system.js","./p-882cf708.system.js","./p-48f6291b.system.js","./p-4ac861c9.system.js"],(function(t){"use strict";var e,n,r,i,o;return{setters:[function(t){e=t.r;n=t.h;r=t.H},function(){},function(t){i=t.V},function(t){o=t.g},function(){}],execute:function(){var s="ipc-test{max-width:800px;display:block}";var a=t("ipc_test",function(){function t(t){e(this,t);this.store=null;this.endpoint=i.getDefault();this.templateId="e997b94c-9d1b-4c85-8552-dedd24e35550"}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this.endpoint.loadSession();t=this;return[4,o(this.endpoint,this.templateId,false)];case 1:t.store=n.sent();return[3,3];case 2:e=n.sent();console.log("[TEMPLATE VISIBILITY] Error loading template",e);return[3,3];case 3:return[2]}}))}))};t.prototype.render=function(){console.log("[IPC] Rendering");return n(r,null,n("div",null,n("pre",null,n("code",null,JSON.stringify(this.store.state,null,2)))),n("verdocs-template-roles",{templateId:this.templateId}),n("verdocs-template-fields",{templateId:this.templateId}))};return t}());a.style=s}}}));
@@ -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=e("T",{})));var n;(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"})(n||(n={}));var i;(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"})(i||(i={}));var o;(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"})(o||(o={}));var a;(function(e){e["ENV_ESSENTIAL"]="env:essential";e["ORG_STANDARD"]="org:standard"})(a||(a={}));var s;(function(e){e["OWNER"]="owner";e["BASIC_USER"]="basic_user";e["MEMBER"]="member"})(s||(s={}));var u=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 f=function(e){return!u.has(e&&e.code)};function c(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 l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(undefined)}))}}function p(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 d(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){p(Object(r),true).forEach((function(t){h(e,t,r[t])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}}return e}function h(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 v="axios-retry";function E(e){return!e.response&&Boolean(e.code)&&e.code!=="ECONNABORTED"&&f(e)}var m=["get","head","options"];var y=m.concat(["put","delete"]);function g(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function R(e){if(!e.config){return false}return g(e)&&m.indexOf(e.config.method)!==-1}function b(e){if(!e.config){return false}return g(e)&&y.indexOf(e.config.method)!==-1}function _(e){return E(e)||b(e)}function O(){return 0}function T(){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 w(e){var t=e[v]||{};t.retryCount=t.retryCount||0;e[v]=t;return t}function A(e,t){return d(d({},t),e[v])}function S(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 C(e,t,r,n){return N.apply(this,arguments)}function N(){N=l((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 N.apply(this,arguments)}function L(e,t){e.interceptors.request.use((function(e){var t=w(e);t.lastRequestTime=Date.now();return e}));e.interceptors.response.use(null,function(){var r=l((function(r){var n,i,o,a,s,u,f,c,l,p,d,h,v,E,m,y;return __generator(this,(function(g){switch(g.label){case 0:n=r.config;if(!n){return[2,Promise.reject(r)]}i=A(n,t),o=i.retries,a=o===void 0?3:o,s=i.retryCondition,u=s===void 0?_:s,f=i.retryDelay,c=f===void 0?O:f,l=i.shouldResetTimeout,p=l===void 0?false:l,d=i.onRetry,h=d===void 0?function(){}:d;v=w(n);return[4,C(a,u,v,r)];case 1:if(g.sent()){v.retryCount+=1;E=c(v.retryCount,r);S(e,n);if(!p&&n.timeout&&v.lastRequestTime){m=Date.now()-v.lastRequestTime;y=n.timeout-m-E;if(y<=0){return[2,Promise.reject(r)]}n.timeout=y}n.transformRequest=[function(e){return e}];h(v.retryCount,r,n);return[2,new Promise((function(t){return setTimeout((function(){return t(e(n))}),E)}))]}return[2,Promise.reject(r)]}}))}));return function(e){return r.apply(this,arguments)}}())}L.isNetworkError=E;L.isSafeRequestError=R;L.isIdempotentRequestError=b;L.isNetworkOrIdempotentRequestError=_;L.exponentialDelay=T;L.isRetryableError=g;function D(e,t){return function r(){return e.apply(t,arguments)}}var P=Object.prototype.toString;var I=Object.getPrototypeOf;var U=function(e){return function(t){var r=P.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));var j=function(e){e=e.toLowerCase();return function(t){return U(t)===e}};var B=function(e){return function(t){return typeof t===e}};var x=Array.isArray;var F=B("undefined");function M(e){return e!==null&&!F(e)&&e.constructor!==null&&!F(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var k=j("ArrayBuffer");function q(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&k(e.buffer)}return t}var G=B("string");var H=B("function");var V=B("number");var z=function(e){return e!==null&&typeof e==="object"};var J=function(e){return e===true||e===false};var K=function(e){if(U(e)!=="object"){return false}var t=I(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var W=j("Date");var Y=j("File");var X=j("Blob");var Z=j("FileList");var $=function(e){return z(e)&&H(e.pipe)};var Q=function(e){var t="[object FormData]";return e&&(typeof FormData==="function"&&e instanceof FormData||P.call(e)===t||H(e.toString)&&e.toString()===t)};var ee=j("URLSearchParams");var te=function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function re(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(x(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 f=u.length;var c=void 0;for(a=0;a<f;a++){c=u[a];t.call(null,e[c],c,e)}}}function ne(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 ie=function(){if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global}();var oe=function(e){return!F(e)&&e!==ie};function ae(){var e=(oe(this)&&this||{}).caseless;var t={};var r=function(r,n){var i=e&&ne(t,n)||n;if(K(t[i])&&K(r)){t[i]=ae(t[i],r)}else if(K(r)){t[i]=ae({},r)}else if(x(r)){t[i]=r.slice()}else{t[i]=r}};for(var n=0,i=arguments.length;n<i;n++){arguments[n]&&re(arguments[n],r)}return t}var se=function(e,t,r,n){var i=n===void 0?{}:n,o=i.allOwnKeys;re(t,(function(t,n){if(r&&H(t)){e[n]=D(t,r)}else{e[n]=t}}),{allOwnKeys:o});return e};var ue=function(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};var fe=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 ce=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&&I(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t};var le=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 pe=function(e){if(!e)return null;if(x(e))return e;var t=e.length;if(!V(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r};var de=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&I(Uint8Array));var he=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 ve=function(e,t){var r;var n=[];while((r=e.exec(t))!==null){n.push(r)}return n};var Ee=j("HTMLFormElement");var me=function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,r,n){return r.toUpperCase()+n}))};var ye=function(e){var t=e.hasOwnProperty;return function(e,r){return t.call(e,r)}}(Object.prototype);var ge=j("RegExp");var Re=function(e,t){var r=Object.getOwnPropertyDescriptors(e);var n={};re(r,(function(r,i){if(t(r,i,e)!==false){n[i]=r}}));Object.defineProperties(e,n)};var be=function(e){Re(e,(function(t,r){if(H(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}var n=e[r];if(!H(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 _e=function(e,t){var r={};var n=function(e){e.forEach((function(e){r[e]=true}))};x(e)?n(e):n(String(e).split(t));return r};var Oe=function(){};var Te=function(e,t){e=+e;return Number.isFinite(e)?e:t};var we="abcdefghijklmnopqrstuvwxyz";var Ae="0123456789";var Se={DIGIT:Ae,ALPHA:we,ALPHA_DIGIT:we+we.toUpperCase()+Ae};var Ce=function(e,t){if(e===void 0){e=16}if(t===void 0){t=Se.ALPHA_DIGIT}var r="";var n=t.length;while(e--){r+=t[Math.random()*n|0]}return r};function Ne(e){return!!(e&&H(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Le=function(e){var t=new Array(10);var r=function(e,n){if(z(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[n]=e;var i=x(e)?[]:{};re(e,(function(e,t){var o=r(e,n+1);!F(o)&&(i[t]=o)}));t[n]=undefined;return i}}return e};return r(e,0)};var De={isArray:x,isArrayBuffer:k,isBuffer:M,isFormData:Q,isArrayBufferView:q,isString:G,isNumber:V,isBoolean:J,isObject:z,isPlainObject:K,isUndefined:F,isDate:W,isFile:Y,isBlob:X,isRegExp:ge,isFunction:H,isStream:$,isURLSearchParams:ee,isTypedArray:de,isFileList:Z,forEach:re,merge:ae,extend:se,trim:te,stripBOM:ue,inherits:fe,toFlatObject:ce,kindOf:U,kindOfTest:j,endsWith:le,toArray:pe,forEachEntry:he,matchAll:ve,isHTMLForm:Ee,hasOwnProperty:ye,hasOwnProp:ye,reduceDescriptors:Re,freezeMethods:be,toObjectSet:_e,toCamelCase:me,noop:Oe,toFiniteNumber:Te,findKey:ne,global:ie,isContextDefined:oe,ALPHABET:Se,generateString:Ce,isSpecCompliantForm:Ne,toJSONObject:Le};function Pe(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)}De.inherits(Pe,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:De.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Ie=Pe.prototype;var Ue={};["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){Ue[e]={value:e}}));Object.defineProperties(Pe,Ue);Object.defineProperty(Ie,"isAxiosError",{value:true});Pe.from=function(e,t,r,n,i,o){var a=Object.create(Ie);De.toFlatObject(e,a,(function e(t){return t!==Error.prototype}),(function(e){return e!=="isAxiosError"}));Pe.call(a,e.message,t,r,n,i);a.cause=e;a.name=e.name;o&&Object.assign(a,o);return a};var je=null;function Be(e){return De.isPlainObject(e)||De.isArray(e)}function xe(e){return De.endsWith(e,"[]")?e.slice(0,-2):e}function Fe(e,t,r){if(!e)return t;return e.concat(t).map((function e(t,n){t=xe(t);return!r&&n?"["+t+"]":t})).join(r?".":"")}function Me(e){return De.isArray(e)&&!e.some(Be)}var ke=De.toFlatObject(De,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function qe(e,t,r){if(!De.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;r=De.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,(function e(t,r){return!De.isUndefined(r[t])}));var n=r.metaTokens;var i=r.visitor||c;var o=r.dots;var a=r.indexes;var s=r.Blob||typeof Blob!=="undefined"&&Blob;var u=s&&De.isSpecCompliantForm(t);if(!De.isFunction(i)){throw new TypeError("visitor must be a function")}function f(e){if(e===null)return"";if(De.isDate(e)){return e.toISOString()}if(!u&&De.isBlob(e)){throw new Pe("Blob is not supported. Use a Buffer instead.")}if(De.isArrayBuffer(e)||De.isTypedArray(e)){return u&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function c(e,r,i){var s=e;if(e&&!i&&typeof e==="object"){if(De.endsWith(r,"{}")){r=n?r:r.slice(0,-2);e=JSON.stringify(e)}else if(De.isArray(e)&&Me(e)||(De.isFileList(e)||De.endsWith(r,"[]"))&&(s=De.toArray(e))){r=xe(r);s.forEach((function e(n,i){!(De.isUndefined(n)||n===null)&&t.append(a===true?Fe([r],i,o):a===null?r:r+"[]",f(n))}));return false}}if(Be(e)){return true}t.append(Fe(i,r,o),f(e));return false}var l=[];var p=Object.assign(ke,{defaultVisitor:c,convertValue:f,isVisitable:Be});function d(e,r){if(De.isUndefined(e))return;if(l.indexOf(e)!==-1){throw Error("Circular reference detected in "+r.join("."))}l.push(e);De.forEach(e,(function e(n,o){var a=!(De.isUndefined(n)||n===null)&&i.call(t,n,De.isString(o)?o.trim():o,r,p);if(a===true){d(n,r?r.concat(o):[o])}}));l.pop()}if(!De.isObject(e)){throw new TypeError("data must be an object")}d(e);return t}function Ge(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 He(e,t){this._pairs=[];e&&qe(e,this,t)}var Ve=He.prototype;Ve.append=function e(t,r){this._pairs.push([t,r])};Ve.toString=function e(t){var r=t?function(e){return t.call(this,e,Ge)}:Ge;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 Je(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=De.isURLSearchParams(t)?t.toString():new He(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 Ke=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){De.forEach(this.handlers,(function t(r){if(r!==null){e(r)}}))};return e}();var We={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Ye=typeof URLSearchParams!=="undefined"?URLSearchParams:He;var Xe=typeof FormData!=="undefined"?FormData:null;var Ze=typeof Blob!=="undefined"?Blob:null;var $e=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 Qe=function(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"}();var et={isBrowser:true,classes:{URLSearchParams:Ye,FormData:Xe,Blob:Ze},isStandardBrowserEnv:$e,isStandardBrowserWebWorkerEnv:Qe,protocols:["http","https","file","blob","url","data"]};function tt(e,t){return qe(e,new et.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return n.defaultVisitor.apply(this,arguments)}},t))}function rt(e){return De.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return e[0]==="[]"?"":e[1]||e[0]}))}function nt(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 it(e){function t(e,r,n,i){var o=e[i++];var a=Number.isFinite(+o);var s=i>=e.length;o=!o&&De.isArray(n)?n.length:o;if(s){if(De.hasOwnProp(n,o)){n[o]=[n[o],r]}else{n[o]=r}return!a}if(!n[o]||!De.isObject(n[o])){n[o]=[]}var u=t(e,r,n[o],i);if(u&&De.isArray(n[o])){n[o]=nt(n[o])}return!a}if(De.isFormData(e)&&De.isFunction(e.entries)){var r={};De.forEachEntry(e,(function(e,n){t(rt(e),n,r,0)}));return r}return null}var ot={"Content-Type":undefined};function at(e,t,r){if(De.isString(e)){try{(t||JSON.parse)(e);return De.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var st={transitional:We,adapter:["xhr","http"],transformRequest:[function e(t,r){var n=r.getContentType()||"";var i=n.indexOf("application/json")>-1;var o=De.isObject(t);if(o&&De.isHTMLForm(t)){t=new FormData(t)}var a=De.isFormData(t);if(a){if(!i){return t}return i?JSON.stringify(it(t)):t}if(De.isArrayBuffer(t)||De.isBuffer(t)||De.isStream(t)||De.isFile(t)||De.isBlob(t)){return t}if(De.isArrayBufferView(t)){return t.buffer}if(De.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 tt(t,this.formSerializer).toString()}if((s=De.isFileList(t))||n.indexOf("multipart/form-data")>-1){var u=this.env&&this.env.FormData;return qe(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}if(o||i){r.setContentType("application/json",false);return at(t)}return t}],transformResponse:[function e(t){var r=this.transitional||st.transitional;var n=r&&r.forcedJSONParsing;var i=this.responseType==="json";if(t&&De.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 Pe.from(e,Pe.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:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};De.forEach(["delete","get","head"],(function e(t){st.headers[t]={}}));De.forEach(["post","put","patch"],(function e(t){st.headers[t]=De.merge(ot)}));var ut=De.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 ft=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]&&ut[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 ct=Symbol("internals");function lt(e){return e&&String(e).trim().toLowerCase()}function pt(e){if(e===false||e==null){return e}return De.isArray(e)?e.map(pt):String(e)}function dt(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}function ht(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function vt(e,t,r,n,i){if(De.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!De.isString(t))return;if(De.isString(n)){return t.indexOf(n)!==-1}if(De.isRegExp(n)){return n.test(t)}}function Et(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}function mt(e,t){var r=De.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 yt=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=lt(t);if(!i){throw new Error("header name must be a non-empty string")}var o=De.findKey(n,i);if(!o||n[o]===undefined||r===true||r===undefined&&n[o]!==false){n[o||t]=pt(e)}}var o=function(e,t){return De.forEach(e,(function(e,r){return i(e,r,t)}))};if(De.isPlainObject(e)||e instanceof this.constructor){o(e,t)}else if(De.isString(e)&&(e=e.trim())&&!ht(e)){o(ft(e),t)}else{e!=null&&i(t,e,r)}return this};e.prototype.get=function(e,t){e=lt(e);if(e){var r=De.findKey(this,e);if(r){var n=this[r];if(!t){return n}if(t===true){return dt(n)}if(De.isFunction(t)){return t.call(this,n,r)}if(De.isRegExp(t)){return t.exec(n)}throw new TypeError("parser must be boolean|regexp|function")}}};e.prototype.has=function(e,t){e=lt(e);if(e){var r=De.findKey(this,e);return!!(r&&this[r]!==undefined&&(!t||vt(this,this[r],r,t)))}return false};e.prototype.delete=function(e,t){var r=this;var n=false;function i(e){e=lt(e);if(e){var i=De.findKey(r,e);if(i&&(!t||vt(r,r[i],i,t))){delete r[i];n=true}}}if(De.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||vt(this,this[i],i,e,true)){delete this[i];n=true}}return n};e.prototype.normalize=function(e){var t=this;var r={};De.forEach(this,(function(n,i){var o=De.findKey(r,i);if(o){t[o]=pt(n);delete t[i];return}var a=e?Et(i):String(i).trim();if(a!==i){delete t[i]}t[a]=pt(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);De.forEach(this,(function(r,n){r!=null&&r!==false&&(t[n]=e&&De.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[ct]=this[ct]={accessors:{}};var r=t.accessors;var n=this.prototype;function i(e){var t=lt(e);if(!r[t]){mt(n,e);r[t]=true}}De.isArray(e)?e.forEach(i):i(e);return this};return e}();yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);De.freezeMethods(yt.prototype);De.freezeMethods(yt);function gt(e,t){var r=this||st;var n=t||r;var i=yt.from(n.headers);var o=n.data;De.forEach(e,(function e(n){o=n.call(r,o,i.normalize(),t?t.status:undefined)}));i.normalize();return o}function Rt(e){return!!(e&&e.__CANCEL__)}function bt(e,t,r){Pe.call(this,e==null?"canceled":e,Pe.ERR_CANCELED,t,r);this.name="CanceledError"}De.inherits(bt,Pe,{__CANCEL__:true});function _t(e,t,r){var n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new Pe("Request failed with status code "+r.status,[Pe.ERR_BAD_REQUEST,Pe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}var Ot=et.isStandardBrowserEnv?function e(){return{write:function e(t,r,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(r));if(De.isNumber(n)){s.push("expires="+new Date(n).toGMTString())}if(De.isString(i)){s.push("path="+i)}if(De.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 Tt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wt(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function At(e,t){if(e&&!Tt(t)){return wt(e,t)}return t}var St=et.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=De.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Ct(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Nt(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 f=Date.now();var c=n[o];if(!a){a=f}r[i]=u;n[i]=f;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(f-a<t){return}var d=c&&f-c;return d?Math.round(p*1e3/d):undefined}}function Lt(e,t){var r=0;var n=Nt(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 f=o<=a;r=o;var c={loaded:o,total:a,progress:a?o/a:undefined,bytes:s,rate:u?u:undefined,estimated:u&&a&&f?(a-o)/u:undefined,event:i};c[t?"download":"upload"]=true;e(c)}}var Dt=typeof XMLHttpRequest!=="undefined";var Pt=Dt&&function(e){return new Promise((function t(r,n){var i=e.data;var o=yt.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(De.isFormData(i)&&(et.isStandardBrowserEnv||et.isStandardBrowserWebWorkerEnv)){o.setContentType(false)}var f=new XMLHttpRequest;if(e.auth){var c=e.auth.username||"";var l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(c+":"+l))}var p=At(e.baseURL,e.url);f.open(e.method.toUpperCase(),Je(p,e.params,e.paramsSerializer),true);f.timeout=e.timeout;function d(){if(!f){return}var t=yt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());var i=!a||a==="text"||a==="json"?f.responseText:f.response;var o={data:i,status:f.status,statusText:f.statusText,headers:t,config:e,request:f};_t((function e(t){r(t);u()}),(function e(t){n(t);u()}),o);f=null}if("onloadend"in f){f.onloadend=d}else{f.onreadystatechange=function e(){if(!f||f.readyState!==4){return}if(f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)){return}setTimeout(d)}}f.onabort=function t(){if(!f){return}n(new Pe("Request aborted",Pe.ECONNABORTED,e,f));f=null};f.onerror=function t(){n(new Pe("Network Error",Pe.ERR_NETWORK,e,f));f=null};f.ontimeout=function t(){var r=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var i=e.transitional||We;if(e.timeoutErrorMessage){r=e.timeoutErrorMessage}n(new Pe(r,i.clarifyTimeoutError?Pe.ETIMEDOUT:Pe.ECONNABORTED,e,f));f=null};if(et.isStandardBrowserEnv){var h=(e.withCredentials||St(p))&&e.xsrfCookieName&&Ot.read(e.xsrfCookieName);if(h){o.set(e.xsrfHeaderName,h)}}i===undefined&&o.setContentType(null);if("setRequestHeader"in f){De.forEach(o.toJSON(),(function e(t,r){f.setRequestHeader(r,t)}))}if(!De.isUndefined(e.withCredentials)){f.withCredentials=!!e.withCredentials}if(a&&a!=="json"){f.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){f.addEventListener("progress",Lt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&f.upload){f.upload.addEventListener("progress",Lt(e.onUploadProgress))}if(e.cancelToken||e.signal){s=function(t){if(!f){return}n(!t||t.type?new bt(null,e,f):t);f.abort();f=null};e.cancelToken&&e.cancelToken.subscribe(s);if(e.signal){e.signal.aborted?s():e.signal.addEventListener("abort",s)}}var v=Ct(p);if(v&&et.protocols.indexOf(v)===-1){n(new Pe("Unsupported protocol "+v+":",Pe.ERR_BAD_REQUEST,e));return}f.send(i||null)}))};var It={http:je,xhr:Pt};De.forEach(It,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Ut={getAdapter:function(e){e=De.isArray(e)?e:[e];var t=e.length;var r;var n;for(var i=0;i<t;i++){r=e[i];if(n=De.isString(r)?It[r.toLowerCase()]:r){break}}if(!n){if(n===false){throw new Pe("Adapter ".concat(r," is not supported by the environment"),"ERR_NOT_SUPPORT")}throw new Error(De.hasOwnProp(It,r)?"Adapter '".concat(r,"' is not available in the build"):"Unknown adapter '".concat(r,"'"))}if(!De.isFunction(n)){throw new TypeError("adapter is not a function")}return n},adapters:It};function jt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new bt(null,e)}}function Bt(e){jt(e);e.headers=yt.from(e.headers);e.data=gt.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}var t=Ut.getAdapter(e.adapter||st.adapter);return t(e).then((function t(r){jt(e);r.data=gt.call(e,e.transformResponse,r);r.headers=yt.from(r.headers);return r}),(function t(r){if(!Rt(r)){jt(e);if(r&&r.response){r.response.data=gt.call(e,e.transformResponse,r.response);r.response.headers=yt.from(r.response.headers)}}return Promise.reject(r)}))}var xt=function(e){return e instanceof yt?e.toJSON():e};function Ft(e,t){t=t||{};var r={};function n(e,t,r){if(De.isPlainObject(e)&&De.isPlainObject(t)){return De.merge.call({caseless:r},e,t)}else if(De.isPlainObject(t)){return De.merge({},t)}else if(De.isArray(t)){return t.slice()}return t}function i(e,t,r){if(!De.isUndefined(t)){return n(e,t,r)}else if(!De.isUndefined(e)){return n(undefined,e,r)}}function o(e,t){if(!De.isUndefined(t)){return n(undefined,t)}}function a(e,t){if(!De.isUndefined(t)){return n(undefined,t)}else if(!De.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(xt(e),xt(t),true)}};De.forEach(Object.keys(e).concat(Object.keys(t)),(function n(o){var a=u[o]||i;var f=a(e[o],t[o],o);De.isUndefined(f)&&a!==s||(r[o]=f)}));return r}var Mt="1.3.4";var kt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){kt[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var qt={};kt.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+Mt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Pe(i(n," has been removed"+(r?" in "+r:"")),Pe.ERR_DEPRECATED)}if(r&&!qt[n]){qt[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 Gt(e,t,r){if(typeof e!=="object"){throw new Pe("options must be an object",Pe.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 Pe("option "+o+" must be "+u,Pe.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Pe("Unknown option "+o,Pe.ERR_BAD_OPTION)}}}var Ht={assertOptions:Gt,validators:kt};var Vt=Ht.validators;var zt=function(){function e(e){this.defaults=e;this.interceptors={request:new Ke,response:new Ke}}e.prototype.request=function(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Ft(this.defaults,t);var r=t.transitional,n=t.paramsSerializer,i=t.headers;if(r!==undefined){Ht.assertOptions(r,{silentJSONParsing:Vt.transitional(Vt.boolean),forcedJSONParsing:Vt.transitional(Vt.boolean),clarifyTimeoutError:Vt.transitional(Vt.boolean)},false)}if(n!==undefined){Ht.assertOptions(n,{encode:Vt.function,serialize:Vt.function},true)}t.method=(t.method||this.defaults.method||"get").toLowerCase();var o;o=i&&De.merge(i.common,i[t.method]);o&&De.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]}));t.headers=yt.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 f;var c=0;var l;if(!s){var p=[Bt.bind(this),undefined];p.unshift.apply(p,a);p.push.apply(p,u);l=p.length;f=Promise.resolve(t);while(c<l){f=f.then(p[c++],p[c++])}return f}l=a.length;var d=t;c=0;while(c<l){var h=a[c++];var v=a[c++];try{d=h(d)}catch(e){v.call(this,e);break}}try{f=Bt.call(this,d)}catch(e){return Promise.reject(e)}c=0;l=u.length;while(c<l){f=f.then(u[c++],u[c++])}return f};e.prototype.getUri=function(e){e=Ft(this.defaults,e);var t=At(e.baseURL,e.url);return Je(t,e.params,e.paramsSerializer)};return e}();De.forEach(["delete","get","head","options"],(function e(t){zt.prototype[t]=function(e,r){return this.request(Ft(r||{},{method:t,url:e,data:(r||{}).data}))}}));De.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(Ft(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 Jt=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 bt(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 Kt(e){return function t(r){return e.apply(null,r)}}function Wt(e){return De.isObject(e)&&e.isAxiosError===true}var 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((function(e){var t=e[0],r=e[1];Yt[r]=t}));function Xt(e){var t=new zt(e);var r=D(zt.prototype.request,t);De.extend(r,zt.prototype,t,{allOwnKeys:true});De.extend(r,t,null,{allOwnKeys:true});r.create=function t(r){return Xt(Ft(e,r))};return r}var Zt=Xt(st);Zt.Axios=zt;Zt.CanceledError=bt;Zt.CancelToken=Jt;Zt.isCancel=Rt;Zt.VERSION=Mt;Zt.toFormData=qe;Zt.AxiosError=Pe;Zt.Cancel=Zt.CanceledError;Zt.all=function e(t){return Promise.all(t)};Zt.spread=Kt;Zt.isAxiosError=Wt;Zt.mergeConfig=Ft;Zt.AxiosHeaders=yt;Zt.formToJSON=function(e){return it(De.isHTMLForm(e)?new FormData(e):e)};Zt.HttpStatusCode=Yt;Zt.default=Zt;var $t=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var Qt=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 $t()}try{if(!__global__)return $t();return __global__}finally{delete Object.prototype.__global__}}();var er=Symbol.for("verdocs-default-endpoint");var tr=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 rr=e("V",function(){function e(e){this.environment="verdocs";this.sessionType="user";this.baseURL="https://api.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.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=Zt.create({baseURL:this.baseURL,timeout:this.timeout});L(this.api,{retries:0,retryDelay:L.exponentialDelay,onRetry:function(e,t,r){window.console.debug("[JS_SDK] Retrying request (".concat(e,")"),t.message,r.url)}})}e.prototype.setDefault=function(){Qt[er]=this};e.getDefault=function(){if(!Qt[er]){Qt[er]=new e;window.console.debug("[JS_SDK] Created default endpoint",Qt[er])}return Qt[er]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};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.api.defaults.baseURL=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(tr)}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
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-934a39b4.system.js","./p-d1c37175.system.js","./p-54498887.system.js","./p-882cf708.system.js","./p-7efdefa3.system.js","./p-d50523fd.system.js","./p-a25d989e.system.js","./p-187b20b7.system.js","./p-bbee73c8.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,n,i,r,o,s,a,l,d,c,u,h,p,f,v,g,m,b,x,w,y,I;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H;o=e.F},function(e){s=e.b;a=e.t;l=e.u;d=e.c;c=e.d},function(e){u=e.R},function(e){h=e.V},function(e){p=e.a;f=e.i},function(e){v=e.f;g=e.i},function(e){m=e.s;b=e.u;x=e.a;w=e.r;y=e.b},function(e){I=e.S},function(){},function(){},function(){}],execute:function(){var k=undefined&&undefined.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var S=undefined&&undefined.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var F=function(e,t,n,i){return k(void 0,void 0,void 0,(function(){return S(this,(function(r){return[2,e.api.put("/envelopes/".concat(t,"/recipients/").concat(n),i).then((function(e){return e.data}))]}))}))};var N=function(e,t,n){return F(e,t,n,{action:"submit"})};var _=function(e,t,n){return F(e,t,n,{action:"decline"})};var E=function(e,t,n,i){return F(e,t,n,{action:"update",agreed:i})};var D=function(e,t,n){var i=new FormData;i.append("signature",n,t);return e.api.post("/signatures",i).then((function(e){return e.data}))};var L=function(e,t,n){var i=new FormData;i.append("initial",n,t);return e.api.post("/initials",i).then((function(e){return e.data}))};var A='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff}verdocs-sign .intro .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}';var C=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var R=[{id:"print",label:"Print"},{id:"download",label:"Download"}];var G=e("verdocs_sign",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.envelopeLoaded=n(this,"envelopeLoaded",7);this.envelopeUpdated=n(this,"envelopeUpdated",7);this.endpoint=null;this.recipientIndex=-1;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.envelope=null;this.roleNames=[];this.recipient=null;this.signerToken=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.errorMessage="";this.focusedField="";this.submitting=false;this.isDone=false;this.showDone=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document"}e.prototype.componentWillLoad=function(){this.endpoint=new h({sessionType:"signing"})};e.prototype.componentWillRender=function(){return k(this,void 0,void 0,(function(){var e,t,n,i,r,o,l,d,c,u,h,p,f;var v=this;return S(this,(function(g){switch(g.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new I("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new I("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(n=this.sdkError)===null||n===void 0?void 0:n.emit(new I("[SIGN] Missing required inviteCode",500,""));return[2]}g.label=1;case 1:g.trys.push([1,4,,5]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,s(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode})];case 2:d=g.sent(),c=d.session,u=d.recipient,h=d.signerToken;console.log("[SIGN] Loaded signing session ".concat(c.email," / ").concat(c.profile_id));this.recipient=u;console.log("[SIGN] We are recipient",this.recipient);this.signerToken=h;this.endpoint.setToken(h);if(this.agreed){this.nextButtonLabel="Next"}p=this;return[4,a(this.endpoint,this.envelopeId)];case 3:p.envelope=g.sent();this.roleNames=this.envelope.recipients.map((function(e){return e.role_name}));if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.recipientIndex=this.envelope.recipients.findIndex((function(e){return e.role_name==v.roleId}));if(this.recipientIndex>-1){this.recipient=this.envelope.recipients[this.recipientIndex];this.agreed=this.recipient.agreed;console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)}else{console.log("[SIGN] Could not find our recipient record",this.roleId,this.envelope.recipients)}this.isDone=["submitted","canceled","declined"].includes(this.recipient.status);this.checkRecipientFields();(i=this.envelopeLoaded)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope});return[3,5];case 4:f=g.sent();console.log("Error with signing session",f);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new I(f.message,(o=f.response)===null||o===void 0?void 0:o.status,(l=f.response)===null||l===void 0?void 0:l.data));return[3,5];case 5:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;E(this.endpoint,this.envelopeId,this.roleId,true).then((function(){var t;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(t){var n,i,r;console.log("Update failure",t);e.submitting=false;(n=e.sdkError)===null||n===void 0?void 0:n.emit(new I(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(r=t.response)===null||r===void 0?void 0:r.data))}))};e.prototype.handleOptionSelected=function(e){return k(this,void 0,void 0,(function(){var t,n,i,r,o,s,a;return S(this,(function(l){switch(l.label){case 0:s=e.detail.id;switch(s){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});return[3,7];case 2:window.alert("This feature will be available in an upcoming release.");(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});return[3,7];case 3:this.submitting=true;return[4,_(this.endpoint,this.envelopeId,this.roleId)];case 4:a=l.sent();console.log("Decline result",a);(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.isDone=true;return[3,7];case 5:window.print();(r=this.envelopeUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,7];case 6:m(this.endpoint,this.envelope,this.envelope.envelope_document_id).catch((function(e){console.log("Error downloading PDF",e)}));(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"});return[3,7];case 7:return[2]}}))}))};e.prototype.updateRecipientFieldValue=function(e,t){var n=this;console.log("[SIGN] updateRecipientFieldValue",e);this.recipient.fields.forEach((function(i){if(i.name===e){i.settings=t.settings;b(i);n.checkRecipientFields()}}))};e.prototype.saveFieldChange=function(e,t){var n=this;console.log("[SIGN] updateRecipientFieldValue",e);l(this.endpoint,this.envelopeId,e,t).then((function(t){return n.updateRecipientFieldValue(e,t)})).catch((function(e){var t,i,r,o,s,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((r=(i=e.response)===null||i===void 0?void 0:i.data)===null||r===void 0?void 0:r.error)==="jwt expired"){console.log("[SIGN] Signing session expired");n.errorMessage="Signing session expired. Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(o=n.sdkError)===null||o===void 0?void 0:o.emit(new I(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return k(this,void 0,void 0,(function(){var n,i,r,o,s,s,a,l,u;var h=this;return S(this,(function(p){switch(p.label){case 0:n=t.target,i=n.value,r=n.checked;o=e.type;switch(o){case"textbox":return[3,1];case"checkbox_group":return[3,2];case"radio_button_group":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:i})];case 2:{s=e.settings.options.map((function(e){return{id:e.id,checked:t.target.checked}}));return[2,this.saveFieldChange(e.name,{prepared:false,value:{options:s}})]}p.label=3;case 3:{s=e.settings.options.map((function(e){return{id:e.id,selected:t.target.value===e.id}}));return[2,this.saveFieldChange(e.name,{prepared:false,value:{options:s}})]}p.label=4;case 4:return[2,this.saveFieldChange(e.name,{prepared:false,value:t.detail})];case 5:return[4,fetch(t.detail)];case 6:return[4,p.sent().blob()];case 7:a=p.sent();return[2,L(this.endpoint,"initial",a).then((function(t){return k(h,void 0,void 0,(function(){var n;return S(this,(function(i){switch(i.label){case 0:return[4,c(this.endpoint,this.envelopeId,e.name,t.id)];case 1:n=i.sent();this.updateRecipientFieldValue(e.name,n);return[2]}}))}))}))];case 8:return[4,fetch(t.detail)];case 9:return[4,p.sent().blob()];case 10:l=p.sent();return[2,D(this.endpoint,"signature",l).then((function(t){return k(h,void 0,void 0,(function(){var n;return S(this,(function(i){switch(i.label){case 0:return[4,d(this.endpoint,this.envelopeId,e.name,t.id)];case 1:n=i.sent();this.updateRecipientFieldValue(e.name,n);return[2]}}))}))}))];case 11:u=t.target.getAttribute("iso");return[2,this.saveFieldChange(e.name,{prepared:false,value:u})];case 12:console.log("Updating timestamp",{value:i,ts:t.target.getAttribute("timestamp")});return[3,14];case 13:console.log("Unhandled field update",{value:i,checked:r},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldValid=function(e){var t,n,i,r,o,s,a;var l=e.required,d=l===void 0?false:l;var c=e.settings||{},u=c.result,h=u===void 0?"":u,v=c.value,g=v===void 0?"":v,m=c.base64,b=m===void 0?"":m;switch(e.type){case"textbox":switch(((t=e.settings)===null||t===void 0?void 0:t.validator)||""){case"email":return f(h);case"phone":return p(h);default:return!d||h!==""}case"signature":case"initial":return!d||b!=="";case"timestamp":return true;case"textarea":case"date":case"attachment":return!d||h!=="";case"dropdown":return!d||g!=="";case"checkbox_group":var x=(((i=(n=e.settings)===null||n===void 0?void 0:n.options)===null||i===void 0?void 0:i.filter((function(e){return e.checked})))||[]).length;return!d||x>=(((r=e.settings)===null||r===void 0?void 0:r.minimum_checked)||0)&&x<=(((o=e.settings)===null||o===void 0?void 0:o.maximum_checked)||999);case"radio_button_group":return!d||(((a=(s=e.settings)===null||s===void 0?void 0:s.options)===null||a===void 0?void 0:a.filter((function(e){return e.selected})))||[]).length>0;default:return false}};e.prototype.handleNext=function(){return k(this,void 0,void 0,(function(){var e,t,n,i,r,o,s,a,l,d;var c=this;return S(this,(function(u){switch(u.label){case 0:if(!this.nextSubmits)return[3,5];u.label=1;case 1:u.trys.push([1,3,,4]);this.submitting=true;return[4,N(this.endpoint,this.envelopeId,this.roleId)];case 2:t=u.sent();console.log("[SIGN] Submitted successfully",t);this.recipient.status="submitted";this.showDone=true;this.isDone=true;return[3,4];case 3:n=u.sent();console.log("[SIGN] Error submitting",n);return[3,4];case 4:this.submitting=false;return[2];case 5:i=this.recipient.fields.filter((function(e){return e.required}));r=i.findIndex((function(e){return e.name===c.focusedField}));o=r+1;if(o>=i.length){o=0}s=i[o];a=0;if(a<i.length&&["signature","initial"].includes(s.type)&&((e=s.settings)===null||e===void 0?void 0:e.result)==="signed"){a++;o++;if(o>=i.length){o=0}s=i[o]}if(a>=i.length){s=null}if(s){l=y(s);d=document.getElementById(l);d===null||d===void 0?void 0:d.focusField();this.focusedField=s.name}return[2]}}))}))};e.prototype.checkRecipientFields=function(){var e=this;var t=this.recipient.fields.filter((function(t){return!e.isFieldValid(t)}));if(t.length<1){this.nextButtonLabel="Finish";this.nextSubmits=true}else{console.log("[SIGN] Remaining invalid fields",t);this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,t,n,i){var r=this;var o;i.addEventListener("input",(function(e){console.log("[SIGN] onfieldInput",e.detail,e.target.value);if(e.target.name.includes("checkbox_group")||e.target.name.includes("radio_button_group")){console.log("CB",e.target);r.handleFieldChange(t,e).finally((function(){return r.checkRecipientFields()}))}else{r.checkRecipientFields()}}));i.addEventListener("focusout",(function(e){return r.handleFieldChange(t,e).finally((function(){return r.checkRecipientFields()}))}));i.addEventListener("fieldChange",(function(e){return r.handleFieldChange(t,e).finally((function(){return r.checkRecipientFields()}))}));i.setAttribute("roleindex",n);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);i.setAttribute("initials",this.recipient?v(this.recipient.full_name):"");i.setAttribute("name",((o=this.recipient)===null||o===void 0?void 0:o.full_name)||"")};e.prototype.handlePageRendered=function(e){var t=this;var n=e.detail;var i=x(this.roleNames,this.recipient.role_name);var r=this.recipient.fields.filter((function(e){return e.page===n.pageNumber}));console.log("[SIGN] Page rendered, updating fields",{pageInfo:n,roleIndex:i,recipientFields:r});r.forEach((function(e){var r=w(e,n,i,{disabled:false,editable:false,draggable:false,done:t.isDone});if(!r){return}if(Array.isArray(r)){r.map((function(r){return t.attachFieldAttributes(n,e,i,r)}))}else{t.attachFieldAttributes(n,e,i,r)}}));this.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name&&(e.status===u.SUBMITTED||e.status===u.CANCELED||e.status===u.DECLINED)})).forEach((function(e){e.fields.forEach((function(e){var r=w(e,n,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!r){return}if(Array.isArray(r)){r.map((function(r){return t.attachFieldAttributes(n,e,i,r)}))}else{t.attachFieldAttributes(n,e,i,r)}}))}));this.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name})).forEach((function(e){var i=x(t.roleNames,e.role_name);var r=e.fields.filter((function(e){return e.page===n.pageNumber}));r.forEach((function(e){var r=w(e,n,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!r){return}if(r.setAttribute){r.setAttribute("roleindex",i);r.setAttribute("xScale",n.xScale);r.setAttribute("yScale",n.yScale)}}))}));this.checkRecipientFields()};e.prototype.render=function(){var e=this;if(!this.envelope){return i(r,null,i("verdocs-loader",null))}if(this.isDone){return i(r,{class:{agreed:this.agreed}},i("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)}}),this.errorMessage&&i("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:function(){return e.errorMessage=""}}),this.showDone&&i("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.submitting&&i("div",{class:"loading-indicator"},i("verdocs-loader",null)))}return i(r,{class:{agreed:this.agreed}},!this.finishLater&&i("div",{class:"intro"},i("div",{class:"inner"},"Please review and act on these documents.")),i("div",{id:"verdocs-sign-header"},i("div",{class:"inner"},!this.agreed?i("div",{class:"agree"},i("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:function(){return e.handleClickAgree()}})):i(o,null,i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},this.envelope.name),i("div",{style:{flex:"1"}})),!this.finishLater&&i("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:function(){return e.handleNext()}}),i("div",{style:{marginLeft:"10px"}}),i("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?C:R,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),!this.agreed?i("div",{class:"cover"}):i("div",{style:{display:"none"}}),i("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(this.envelope.documents||[]).map((function(t){var n=g(1,t.page_numbers);return i(o,null,n.map((function(n){return i("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:n,onPageRendered:function(t){return e.handlePageRendered(t)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&i("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.errorMessage&&i("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:function(){return e.errorMessage=""}}),this.showDone&&i("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.submitting&&i("div",{class:"loading-indicator"},i("verdocs-loader",null)))};return e}());G.style=A}}}));