@verdocs/web-sdk 1.12.35 → 1.12.37

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 (216) hide show
  1. package/dist/cjs/{Envelopes-f81d02b1.js → Envelopes-4d03f708.js} +4 -4
  2. package/dist/cjs/{Templates-ed812768.js → Templates-e258cbd5.js} +2 -2
  3. package/dist/cjs/{Templates-6705a1ce.js → Templates-f310df2f.js} +1 -1
  4. package/dist/cjs/{Types-35abf4e8.js → Types-f89f9116.js} +2 -2
  5. package/dist/cjs/{VerdocsEndpoint-e0d39762.js → VerdocsEndpoint-3e95f87f.js} +1 -1
  6. package/dist/cjs/{interact.min-29d23a9c.js → interact.min-531805f2.js} +1 -1
  7. package/dist/cjs/{utils-aa7160e9.js → utils-3a88b566.js} +2 -2
  8. package/dist/cjs/verdocs-auth.cjs.entry.js +2 -2
  9. package/dist/cjs/verdocs-build.cjs.entry.js +4 -4
  10. package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +4 -4
  11. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +2 -2
  12. package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +4 -4
  13. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +3 -3
  14. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -3
  15. package/dist/cjs/verdocs-field-date.cjs.entry.js +3 -3
  16. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -3
  17. package/dist/cjs/verdocs-field-initial.cjs.entry.js +3 -3
  18. package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -3
  19. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -3
  20. package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -3
  21. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +3 -3
  22. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +4 -4
  23. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +3 -3
  24. package/dist/cjs/verdocs-preview.cjs.entry.js +6 -6
  25. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +3 -3
  26. package/dist/cjs/verdocs-search.cjs.entry.js +2 -2
  27. package/dist/cjs/verdocs-send.cjs.entry.js +15 -11
  28. package/dist/cjs/verdocs-sign.cjs.entry.js +20 -4
  29. package/dist/cjs/verdocs-template-attachments.cjs.entry.js +4 -4
  30. package/dist/cjs/verdocs-template-create_3.cjs.entry.js +17 -16
  31. package/dist/cjs/verdocs-template-document-page.cjs.entry.js +4 -4
  32. package/dist/cjs/verdocs-template-name.cjs.entry.js +4 -4
  33. package/dist/cjs/verdocs-template-properties.cjs.entry.js +3 -3
  34. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +4 -4
  35. package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +4 -4
  36. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +4 -4
  37. package/dist/cjs/verdocs-view.cjs.entry.js +4 -4
  38. package/dist/collection/components/embeds/verdocs-send/verdocs-send.css +4 -1
  39. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +30 -4
  40. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +17 -0
  41. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +7 -4
  42. package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +3 -5
  43. package/dist/components/Envelopes.js +3 -3
  44. package/dist/components/Templates2.js +2 -2
  45. package/dist/components/Types.js +1 -1
  46. package/dist/components/verdocs-send.js +9 -5
  47. package/dist/components/verdocs-sign.js +17 -1
  48. package/dist/components/verdocs-template-create2.js +7 -4
  49. package/dist/components/verdocs-template-roles2.js +3 -5
  50. package/dist/docs.json +11 -2
  51. package/dist/esm/{Envelopes-19a6e456.js → Envelopes-223b2797.js} +4 -4
  52. package/dist/esm/{Templates-8e4ab976.js → Templates-ca52ef90.js} +2 -2
  53. package/dist/esm/{Templates-deedf4bd.js → Templates-d94fb9d5.js} +1 -1
  54. package/dist/esm/{Types-6dc82c14.js → Types-5f31149e.js} +1 -1
  55. package/dist/esm/{VerdocsEndpoint-d0a126c0.js → VerdocsEndpoint-4367eb13.js} +1 -1
  56. package/dist/esm/{interact.min-ad5c452f.js → interact.min-e441821e.js} +1 -1
  57. package/dist/esm/{utils-9628af35.js → utils-c0c6df0c.js} +2 -2
  58. package/dist/esm/verdocs-auth.entry.js +2 -2
  59. package/dist/esm/verdocs-build.entry.js +4 -4
  60. package/dist/esm/verdocs-button-panel_3.entry.js +4 -4
  61. package/dist/esm/verdocs-contact-picker.entry.js +2 -2
  62. package/dist/esm/verdocs-dropdown_2.entry.js +4 -4
  63. package/dist/esm/verdocs-envelope-sidebar.entry.js +3 -3
  64. package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
  65. package/dist/esm/verdocs-field-date.entry.js +3 -3
  66. package/dist/esm/verdocs-field-dropdown.entry.js +3 -3
  67. package/dist/esm/verdocs-field-initial.entry.js +3 -3
  68. package/dist/esm/verdocs-field-payment.entry.js +3 -3
  69. package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
  70. package/dist/esm/verdocs-field-signature.entry.js +3 -3
  71. package/dist/esm/verdocs-field-textarea.entry.js +3 -3
  72. package/dist/esm/verdocs-field-textbox.entry.js +4 -4
  73. package/dist/esm/verdocs-field-timestamp.entry.js +3 -3
  74. package/dist/esm/verdocs-preview.entry.js +6 -6
  75. package/dist/esm/verdocs-quick-functions_3.entry.js +3 -3
  76. package/dist/esm/verdocs-search.entry.js +2 -2
  77. package/dist/esm/verdocs-send.entry.js +15 -11
  78. package/dist/esm/verdocs-sign.entry.js +20 -4
  79. package/dist/esm/verdocs-template-attachments.entry.js +4 -4
  80. package/dist/esm/verdocs-template-create_3.entry.js +17 -16
  81. package/dist/esm/verdocs-template-document-page.entry.js +4 -4
  82. package/dist/esm/verdocs-template-name.entry.js +4 -4
  83. package/dist/esm/verdocs-template-properties.entry.js +3 -3
  84. package/dist/esm/verdocs-template-reminders.entry.js +4 -4
  85. package/dist/esm/verdocs-template-role-properties_2.entry.js +4 -4
  86. package/dist/esm/verdocs-template-visibility.entry.js +4 -4
  87. package/dist/esm/verdocs-view.entry.js +4 -4
  88. package/dist/esm-es5/Envelopes-223b2797.js +1 -0
  89. package/dist/esm-es5/Templates-ca52ef90.js +1 -0
  90. package/dist/esm-es5/{Templates-deedf4bd.js → Templates-d94fb9d5.js} +1 -1
  91. package/dist/esm-es5/{Types-6dc82c14.js → Types-5f31149e.js} +1 -1
  92. package/dist/esm-es5/{VerdocsEndpoint-d0a126c0.js → VerdocsEndpoint-4367eb13.js} +1 -1
  93. package/dist/esm-es5/{interact.min-ad5c452f.js → interact.min-e441821e.js} +1 -1
  94. package/dist/esm-es5/{utils-9628af35.js → utils-c0c6df0c.js} +1 -1
  95. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  96. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  97. package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
  98. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  99. package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
  100. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  101. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  102. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  103. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  104. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  105. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  106. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  107. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  108. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-template-create_3.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  125. package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +9 -0
  126. package/dist/types/components/templates/verdocs-template-roles/verdocs-template-roles.d.ts +2 -2
  127. package/dist/types/components.d.ts +5 -0
  128. package/dist/verdocs-web-sdk/{p-8ac64953.system.js → p-02316241.system.js} +1 -1
  129. package/dist/verdocs-web-sdk/{p-fd73ee30.entry.js → p-038e9dfc.entry.js} +1 -1
  130. package/dist/verdocs-web-sdk/{p-2bc0d9be.js → p-05788c2b.js} +1 -1
  131. package/dist/verdocs-web-sdk/{p-2fda790b.entry.js → p-07dac8d8.entry.js} +1 -1
  132. package/dist/verdocs-web-sdk/{p-693c98c5.entry.js → p-08653421.entry.js} +1 -1
  133. package/dist/verdocs-web-sdk/{p-fdbafc1f.system.entry.js → p-0a40faee.system.entry.js} +1 -1
  134. package/dist/verdocs-web-sdk/{p-a4051110.system.entry.js → p-124b98e3.system.entry.js} +1 -1
  135. package/dist/verdocs-web-sdk/{p-992ae721.entry.js → p-14d7da8a.entry.js} +1 -1
  136. package/dist/verdocs-web-sdk/{p-7448182b.js → p-15205501.js} +1 -1
  137. package/dist/verdocs-web-sdk/p-1c7478f8.system.entry.js +1 -0
  138. package/dist/verdocs-web-sdk/{p-563d545d.entry.js → p-1e35f143.entry.js} +1 -1
  139. package/dist/verdocs-web-sdk/p-1ec52273.system.entry.js +1 -0
  140. package/dist/verdocs-web-sdk/{p-a9f19c58.system.entry.js → p-2e0980f3.system.entry.js} +1 -1
  141. package/dist/verdocs-web-sdk/{p-ae6303f9.entry.js → p-30c2dfbc.entry.js} +1 -1
  142. package/dist/verdocs-web-sdk/{p-9a20f533.system.js → p-330a4c7d.system.js} +1 -1
  143. package/dist/verdocs-web-sdk/p-373cb7c4.entry.js +1 -0
  144. package/dist/verdocs-web-sdk/{p-6316a549.system.entry.js → p-41d9b35b.system.entry.js} +1 -1
  145. package/dist/verdocs-web-sdk/{p-3f9bea4d.system.entry.js → p-468eee0c.system.entry.js} +1 -1
  146. package/dist/verdocs-web-sdk/p-47714747.system.js +1 -0
  147. package/dist/verdocs-web-sdk/{p-3867c364.system.entry.js → p-48eb46ed.system.entry.js} +1 -1
  148. package/dist/verdocs-web-sdk/p-492f465d.system.js +1 -0
  149. package/dist/verdocs-web-sdk/{p-0d81757b.system.js → p-4aa6b512.system.js} +1 -1
  150. package/dist/verdocs-web-sdk/{p-c43c8a31.system.entry.js → p-4c06e243.system.entry.js} +1 -1
  151. package/dist/verdocs-web-sdk/{p-b9fc620d.entry.js → p-50b9e7a6.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/p-54498887.system.js +1 -0
  153. package/dist/verdocs-web-sdk/{p-b8c14498.system.entry.js → p-56ca1b0f.system.entry.js} +1 -1
  154. package/dist/verdocs-web-sdk/{p-456969a5.entry.js → p-58176d9d.entry.js} +1 -1
  155. package/dist/verdocs-web-sdk/{p-f6e5de8f.system.entry.js → p-6034f271.system.entry.js} +1 -1
  156. package/dist/verdocs-web-sdk/{p-aeb488e3.system.entry.js → p-614368ee.system.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/p-62c7d0c3.entry.js +1 -0
  158. package/dist/verdocs-web-sdk/{p-789d66cd.system.entry.js → p-636602ff.system.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/{p-58a9048a.system.entry.js → p-645e4723.system.entry.js} +1 -1
  160. package/dist/verdocs-web-sdk/{p-423b6ddf.entry.js → p-67ba3a16.entry.js} +1 -1
  161. package/dist/verdocs-web-sdk/{p-ed095623.entry.js → p-6870cbcb.entry.js} +1 -1
  162. package/dist/verdocs-web-sdk/{p-4e46db5b.entry.js → p-6c921148.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/p-6caf1137.system.js +1 -1
  164. package/dist/verdocs-web-sdk/{p-06866a49.system.entry.js → p-71d5e053.system.entry.js} +1 -1
  165. package/dist/verdocs-web-sdk/{p-1aecc86f.entry.js → p-72b936b3.entry.js} +1 -1
  166. package/dist/verdocs-web-sdk/{p-6e38f3c4.system.entry.js → p-73452912.system.entry.js} +1 -1
  167. package/dist/verdocs-web-sdk/p-74350c7c.entry.js +1 -0
  168. package/dist/verdocs-web-sdk/{p-c753d960.system.entry.js → p-7a5b9428.system.entry.js} +1 -1
  169. package/dist/verdocs-web-sdk/{p-6b3102b2.system.entry.js → p-7ba0c530.system.entry.js} +1 -1
  170. package/dist/verdocs-web-sdk/{p-e120905e.entry.js → p-7f13e92e.entry.js} +1 -1
  171. package/dist/verdocs-web-sdk/{p-76c4d3dd.entry.js → p-808f6a46.entry.js} +1 -1
  172. package/dist/verdocs-web-sdk/{p-e7e3af7e.system.entry.js → p-88720222.system.entry.js} +1 -1
  173. package/dist/verdocs-web-sdk/{p-0739d739.entry.js → p-8b8ad34e.entry.js} +1 -1
  174. package/dist/verdocs-web-sdk/{p-9b2db78f.js → p-8e0b06f0.js} +1 -1
  175. package/dist/verdocs-web-sdk/{p-1e44ea9c.system.entry.js → p-8ef81ec0.system.entry.js} +1 -1
  176. package/dist/verdocs-web-sdk/{p-2abbbad7.entry.js → p-90c71302.entry.js} +1 -1
  177. package/dist/verdocs-web-sdk/{p-74f6ca70.system.entry.js → p-93780e22.system.entry.js} +1 -1
  178. package/dist/verdocs-web-sdk/{p-e62c3c9c.system.entry.js → p-9c0dfec9.system.entry.js} +1 -1
  179. package/dist/verdocs-web-sdk/{p-f15e84fb.entry.js → p-9c36aaaa.entry.js} +1 -1
  180. package/dist/verdocs-web-sdk/{p-98098fad.system.entry.js → p-9cbe4bc7.system.entry.js} +1 -1
  181. package/dist/verdocs-web-sdk/{p-a2cd33fd.system.entry.js → p-9e9de6e3.system.entry.js} +1 -1
  182. package/dist/verdocs-web-sdk/{p-85281871.system.entry.js → p-a4b7c9e5.system.entry.js} +1 -1
  183. package/dist/verdocs-web-sdk/{p-f4cb1692.entry.js → p-a59ae37d.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/{p-e2275465.system.entry.js → p-a612d29b.system.entry.js} +1 -1
  185. package/dist/verdocs-web-sdk/{p-e4b18c52.entry.js → p-b24324f6.entry.js} +1 -1
  186. package/dist/verdocs-web-sdk/{p-d1fbad63.entry.js → p-b2c96afc.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/p-b86b362a.js +1 -0
  188. package/dist/verdocs-web-sdk/{p-6685a532.js → p-be25b61f.js} +1 -1
  189. package/dist/verdocs-web-sdk/{p-2441a163.system.entry.js → p-becc9197.system.entry.js} +1 -1
  190. package/dist/verdocs-web-sdk/{p-c58fd28c.js → p-c2c49441.js} +1 -1
  191. package/dist/verdocs-web-sdk/p-c344f0fd.system.entry.js +1 -0
  192. package/dist/verdocs-web-sdk/{p-5c043400.system.js → p-c44fd897.system.js} +1 -1
  193. package/dist/verdocs-web-sdk/{p-61338680.entry.js → p-c60c9371.entry.js} +1 -1
  194. package/dist/verdocs-web-sdk/{p-b87ca18d.entry.js → p-c9705b22.entry.js} +1 -1
  195. package/dist/verdocs-web-sdk/{p-6cf864e3.entry.js → p-ca7d441a.entry.js} +1 -1
  196. package/dist/verdocs-web-sdk/{p-f92ff2d2.entry.js → p-dc257e34.entry.js} +1 -1
  197. package/dist/verdocs-web-sdk/{p-cb583a98.system.entry.js → p-e7a1baaf.system.entry.js} +1 -1
  198. package/dist/verdocs-web-sdk/{p-b97237fa.entry.js → p-f19adeb1.entry.js} +1 -1
  199. package/dist/verdocs-web-sdk/{p-fb86b102.js → p-f3e81f0b.js} +1 -1
  200. package/dist/verdocs-web-sdk/{p-1ec06377.entry.js → p-fbb50212.entry.js} +1 -1
  201. package/dist/verdocs-web-sdk/{p-5e3bccd0.system.entry.js → p-fccb4fec.system.entry.js} +1 -1
  202. package/dist/verdocs-web-sdk/{p-f3bcd729.entry.js → p-ff784558.entry.js} +1 -1
  203. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  204. package/package.json +4 -4
  205. package/dist/esm-es5/Envelopes-19a6e456.js +0 -1
  206. package/dist/esm-es5/Templates-8e4ab976.js +0 -1
  207. package/dist/verdocs-web-sdk/p-5cf14e4c.entry.js +0 -1
  208. package/dist/verdocs-web-sdk/p-69912cbf.system.js +0 -1
  209. package/dist/verdocs-web-sdk/p-6e1e787a.system.entry.js +0 -1
  210. package/dist/verdocs-web-sdk/p-94a2f261.system.entry.js +0 -1
  211. package/dist/verdocs-web-sdk/p-b28ef4bb.js +0 -1
  212. package/dist/verdocs-web-sdk/p-b8bb5a01.entry.js +0 -1
  213. package/dist/verdocs-web-sdk/p-c4229602.system.entry.js +0 -1
  214. package/dist/verdocs-web-sdk/p-d46a428b.system.js +0 -1
  215. package/dist/verdocs-web-sdk/p-db003554.system.js +0 -1
  216. package/dist/verdocs-web-sdk/p-fe2ab7b9.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as o,H as s,F as i,a as l}from"./p-e035df4b.js";import"./p-05788c2b.js";import{c as a,g as r}from"./p-b86b362a.js";import{c as n}from"./p-4cd5eb1f.js";import{V as d,T as p}from"./p-c2c49441.js";import{S as c}from"./p-7a1b2643.js";import{i as h}from"./p-8e0b06f0.js";import{u as m,c as v}from"./p-feb442b1.js";import{b as g,r as f,e as x,f as u,h as w}from"./p-f3e81f0b.js";import{s as b}from"./p-c903c4a7.js";import{l as q}from"./p-be25b61f.js";import{u as y,c as C}from"./p-8027431e.js";import{g as k}from"./p-6de76553.js";import"./p-15205501.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-7291906c.js";const Z=class{constructor(o){e(this,o),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.endpoint=d.getDefault(),this.file=void 0,this.creating=!1,this.progressLabel="Uploading...",this.progressPercent=0}componentWillLoad(){this.endpoint.setTimeout(3e4),this.endpoint.loadSession()}handleFileChanged(e){var t;this.file=(null===(t=e.target.files)||void 0===t?void 0:t[0])||null,console.log("[CREATE] Selected file",this.file)}handleUpload(e){e.stopPropagation(),document.getElementById("verdocs-template-create-file").click()}handleCancel(e){e.stopPropagation(),this.exit.emit()}async handleSubmit(e){var t,o,s,i;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0,this.progressLabel="Uploading...";try{const e=await a(this.endpoint,{name:this.file.name});console.log("[CREATE] Created template",e);const o=await n(this.endpoint,e.id,this.file,(e=>{e>=99?(this.progressLabel="Processing...",this.progressPercent=100):this.progressPercent=e}));console.log("[CREATE] Created document",o);const s=await r(this.endpoint,e.id);null===(t=this.next)||void 0===t||t.emit(s),this.creating=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[CREATE] Error creating template",e),null===(o=this.sdkError)||void 0===o||o.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),this.creating=!1}}}render(){return this.endpoint.session?o("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},o("input",{type:"file",id:"verdocs-template-create-file",multiple:!0,accept:"application/pdf",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),this.creating?o("div",{class:"loader-wrapper"},o("verdocs-loader",null),this.progressLabel&&o("div",{class:"progress-wrapper"},o("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):o("div",{class:"upload-box"},o("div",null,o("span",{innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>'})),o("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),o("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?" ":"Or, if you prefer..."),o("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:e=>this.handleUpload(e)})),o("div",{class:"buttons"},o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.creating}),o("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file||this.creating}))):o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};Z.style='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';const E='<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>',M=[{id:"signature",tooltip:"Signature",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>'},{id:"initial",tooltip:"Initials",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>'},{id:"sep1",tooltip:"",icon:E},{id:"textbox",tooltip:"Text Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>'},{id:"textarea",tooltip:"Text Area",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>'},{id:"checkbox_group",tooltip:"Check Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>'},{id:"radio_button_group",tooltip:"Radio Button",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>'},{id:"dropdown",tooltip:"Dropdown",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>'},{id:"sep2",tooltip:"",icon:E},{id:"date",tooltip:"Date",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>'},{id:"timestamp",tooltip:"Timestamp",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z"></path></svg>'}],z=class{constructor(o){e(this,o),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.pageHeights={},this.cachedPageInfo={},this.endpoint=d.getDefault(),this.templateId=null,this.toolbarTargetId=null,this.placing=null,this.selectedRoleName="",this.rerender=1}async componentWillLoad(){var e,t,o,s,i,l;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELDS] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[BUILD] Unable to start builder session, must be authenticated");try{console.log(`[FIELDS] Loading template ${this.templateId}`,this.endpoint.session),await q(this.endpoint,this.templateId,!0),this.selectedRoleName=b.roleNames[0],console.log("Starting with role",this.selectedRoleName)}catch(s){console.log("[FIELDS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new c(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(o=s.response)||void 0===o?void 0:o.data))}}catch(e){console.log("[FIELDS] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new c(e.message,null===(i=e.response)||void 0===i?void 0:i.status,null===(l=e.response)||void 0===l?void 0:l.data))}}componentDidRender(){h.dynamicDrop(!0);const e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null,t=document.getElementById("verdocs-template-fields-toolbar");e&&t&&(console.log("[FIELDS] Moving toolbar"),t.remove(),e.append(t))}handleKeyDown(e){"Escape"===e.key&&(this.placing=null)}async handleFieldChange(e,t,o){console.log("[FIELDS] handleFieldChange",e,t,o),this.rerender++}attachFieldAttributes(e,t,o,s){s.addEventListener("input",(e=>this.handleFieldChange(t,e))),s.addEventListener("settingsChanged",(()=>{var e;console.log("Settings",b.fields),this.selectedRoleName=t.role_name,console.log("settings changed",this.selectedRoleName,t),s.setAttribute("roleindex",g(b.roleNames,t.role_name)),this.rerender++,s.setAttribute("rerender",this.rerender),null===(e=this.templateUpdated)||void 0===e||e.emit({endpoint:this.endpoint,template:b.template,event:"updated-field"})})),s.addEventListener("deleted",(()=>{var e;console.log("deleted",this,t),s.remove(),this.rerender++,null===(e=this.templateUpdated)||void 0===e||e.emit({endpoint:this.endpoint,template:b.template,event:"updated-field"})})),s.setAttribute("roleindex",o),s.setAttribute("pageNumber",e.pageNumber),s.setAttribute("xScale",e.xScale),s.setAttribute("yScale",e.yScale),s.setAttribute("name",t.name)}handlePageRendered(e){const t=e.detail;console.log("[FIELDS] Page rendered",t.pageNumber,t),this.cachedPageInfo[t.pageNumber]=t,this.pageHeights[t.pageNumber]=t.naturalHeight,b.fields.filter((e=>e.page_sequence===t.pageNumber)).forEach((e=>{const o=g(b.roleNames,e.role_name),s=f(e,t,o,{disabled:!0,editable:!0,draggable:!0});s&&(Array.isArray(s)?s.forEach((s=>{this.attachFieldAttributes(t,e,o,s),h(s).draggable({listeners:{start(e){console.log("[FIELDS] Drag started",e.type,e.target)},move(e){const t=+(e.target.getAttribute("posX")||0),o=+(e.target.getAttribute("posY")||0),s=+(e.target.getAttribute("xScale")||1),i=+(e.target.getAttribute("yScale")||1),l=e.dx/s+t,a=e.dy/i+o;e.target.setAttribute("posX",l),e.target.setAttribute("posy",a),x(e.target,"translate",`${l}px, ${a}px`)},end:this.handleMoveField.bind(this)}})})):(this.attachFieldAttributes(t,e,o,s),h(s).draggable({listeners:{start(e){console.log("[FIELDS] Drag started",e.type,e.target)},move(e){const t=+(e.target.getAttribute("posX")||0),o=+(e.target.getAttribute("posY")||0),s=+(e.target.getAttribute("xScale")||1),i=+(e.target.getAttribute("yScale")||1),l=e.dx/s+t,a=e.dy/i+o;e.target.setAttribute("posX",l),e.target.setAttribute("posy",a),x(e.target,"translate",`${l}px, ${a}px`)},end:this.handleMoveField.bind(this)}})))}))}async handleMoveField(e){const t=e.target.getAttribute("pageNumber"),{naturalWidth:o=612,naturalHeight:s=792,renderedHeight:i=792}=this.cachedPageInfo[t];console.log("[FIELDS] Drag ended",t,e.target);const l=e.target.getBoundingClientRect(),a=e.target.parentElement.getBoundingClientRect(),r=Math.max(l.left-a.left,0),n=Math.max(i-(a.bottom-l.bottom),0),{x:d,y:p}=this.viewCoordinatesToPageCoordinates(r,n,t,o-e.rect.width,s-e.rect.height),c=e.target.getAttribute("name"),h=+(e.target.getAttribute("option")||"0"),v=b.fields.find((e=>e.name===c));if(console.log("Will update",c,h,v),v){switch(v.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":v.setting.x=d,v.setting.y=p;break;case"checkbox_group":case"radio_button_group":{const e=v.setting.options[h];e&&(e.x=d,e.y=p)}}await m(this.endpoint,this.templateId,c,v),this.handlePageRendered({detail:this.cachedPageInfo[t]})}}generateFieldName(e,t){let o,s=1;do{o=`${e}P${t}-${s}`,console.log("testing field",o),s++}while(b.fields.some((e=>e.name===o)));return console.log("Will use field name",o,b.fields),o}viewCoordinatesToPageCoordinates(e,t,o,s,i){const{xScale:l=1,yScale:a=1,renderedHeight:r=792}=this.cachedPageInfo[o];return{x:Math.floor(Math.min(e/l,s)),y:Math.floor(Math.min(Math.max(r-t,0)/a,i))}}async handleClickPage(e,t){var o;if(this.placing){console.log("Placing field",this.placing,t.sequence,e.offsetX,e.offsetY);const s=t.sequence,i=e.offsetX,l=e.offsetY,a=u(this.placing),r=w(this.placing),n=this.cachedPageInfo[s];console.log("Cached page",n);const{naturalWidth:d=612,naturalHeight:p=792}=n,c=this.viewCoordinatesToPageCoordinates(i,l,s,d-a,p-r),h=Math.floor(c.x),m=Math.floor(c.y),g={name:this.generateFieldName(this.placing,s),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:!0,page_sequence:s,validator:null,setting:{x:h,y:m}};switch(g.type){case"attachment":case"payment":g.setting={x:h,y:m};break;case"initial":case"signature":g.setting={x:h,y:m,result:""};break;case"checkbox_group":g.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:`${g.name}-1`,value:"Option 1",checked:!1,x:h,y:m}]};break;case"date":g.setting={x:h,y:m,width:a,height:r,result:""};break;case"dropdown":g.required=!1,g.setting={x:h,y:m,width:a,height:r,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":g.setting={options:[{id:`${g.name}-1`,value:"Option 1",selected:!1,x:h,y:m}]};break;case"textarea":case"textbox":g.setting={x:h,y:m,width:a,height:r,result:"",leading:0,alignment:0,upperCase:!1};break;case"timestamp":g.setting={x:h,y:m,width:a,height:r}}"textarea"===g.type&&(g.type="textbox");const f=await v(this.endpoint,this.templateId,g);console.log("Saved field",f),b.fields.push(f),this.placing=null,null===(o=this.templateUpdated)||void 0===o||o.emit({endpoint:this.endpoint,template:b.template,event:"added-field"}),this.handlePageRendered({detail:this.cachedPageInfo[s]})}}render(){if(!this.endpoint.session)return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(b.loading||!b.template)return o(s,null,o("verdocs-loader",null));const e=[...b.template.pages];return e.sort(((e,t)=>e.sequence-t.sequence)),o(s,{class:this.placing?{[`placing-${this.placing}`]:!0}:{},"data-r":this.rerender,onSubmit:()=>{console.log("onSubmit")}},o("div",{id:"verdocs-template-fields-toolbar"},M.map((e=>o("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:()=>{e.tooltip&&(this.placing=e.id)}})))),o("div",{class:"pages"},e.map((e=>o("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onClick:t=>this.handleClickPage(t,e),onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})))))}};z.style="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio_button_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";const H={[p.EVERYONE]:"Everyone",[p.EVERYONE_AS_CREATOR]:"Everyone as Me",[p.ORGANIZATION_MEMBER]:"Organization member",[p.ORGANIZATION_MEMBER_AS_CREATOR]:"Organization Member as Me",[p.CREATOR]:"Me"},L='<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>',V='<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>',S='<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>',T='<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>',_='<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>',R=class{constructor(o){e(this,o),this.next=t(this,"next",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.sequences=[],this.endpoint=d.getDefault(),this.templateId="",this.showingRoleDialog=null,this.showingSenderDialog=!1,this.sender=null,this.forceRerender=1}async componentWillLoad(){var e,t,o,s,i,l;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");try{console.log(`[ROLES] Loading template ${this.templateId}`,this.endpoint.session),await q(this.endpoint,this.templateId,!0)}catch(s){console.log("[ROLES] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new c(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(o=s.response)||void 0===o?void 0:o.data))}this.sortTemplateRoles(),this.renumberTemplateRoles()}catch(e){console.log("[FIELDS] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new c(e.message,null===(i=e.response)||void 0===i?void 0:i.status,null===(l=e.response)||void 0===l?void 0:l.data))}}componentDidRender(){h.dynamicDrop(!0),h(".recipient").draggable({listeners:{start:function(e){e.target.classList.add("dragging"),this.el.classList.add("dragging")}.bind(this),move:function(e){const t=+(e.target.getAttribute("posX")||0),o=+(e.target.getAttribute("posY")||0),s=e.dx+t,i=e.dy+o;e.target.setAttribute("posX",s),e.target.setAttribute("posy",i),e.target.style.transform=`translate(${s+100}px, ${i-40}px)`}.bind(this),end:function(e){e.target.classList.remove("dragging"),this.el.classList.remove("dragging"),e.target.setAttribute("posX",0),e.target.setAttribute("posy",0),e.target.style.transform="translate(0px, 0px)"}.bind(this)}}),h(".dropzone").dropzone({overlap:.05,ondrop:function(e){var t,o;e.target.classList.remove("active");const s=e.relatedTarget.dataset.rolename,i=+e.target.dataset.sequence,l=+e.target.dataset.order,a=null===(t=b.template)||void 0===t?void 0:t.roles.find((e=>e.name===s));a&&(a.sequence=i,a.order=l,this.sortTemplateRoles(),this.renumberTemplateRoles(),this.forceRerender++,Promise.all(null===(o=b.template)||void 0===o?void 0:o.roles.map((e=>y(this.endpoint,this.templateId,e.name,{sequence:e.sequence,order:e.order})))).then((()=>{var e;console.log("[ROLES] Updated roles"),null===(e=this.templateUpdated)||void 0===e||e.emit({event:"updated-role",endpoint:this.endpoint,template:b.template})})).catch((e=>console.log("[ROLES] Role updates failed",e))))}.bind(this),ondropactivate:e=>{e.target.classList.add("visible")},ondropdeactivate:e=>{e.target.classList.remove("visible")},ondragenter:e=>{e.target.classList.add("active")},ondragleave:e=>{e.target.classList.remove("active")}})}handleCancel(){var e;null===(e=this.exit)||void 0===e||e.emit()}handleSubmit(){var e;null===(e=this.next)||void 0===e||e.emit()}sortTemplateRoles(){var e;null===(e=b.template)||void 0===e||e.roles.sort(((e,t)=>e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence))}extractSequenceNumbers(){var e;this.sequences=[],null===(e=b.template)||void 0===e||e.roles.forEach((e=>{this.sequences.includes(e.sequence)||this.sequences.push(e.sequence)}))}renumberTemplateRoles(){this.extractSequenceNumbers();const e=[];this.sequences.sort(((e,t)=>e-t)),this.sequences.forEach(((t,o)=>{var s;null===(s=b.template)||void 0===s||s.roles.filter((e=>e.sequence===t)).forEach(((t,s)=>{e.includes(t.name)||(t.sequence=o+1,t.order=s+1,e.push(t.name))}))})),this.extractSequenceNumbers()}getNextRoleName(){var e,t;let o="",s=null===(e=b.template)||void 0===e?void 0:e.roles.length;do{s++,o=`Recipient ${s}`}while(!o||(null===(t=b.template)||void 0===t?void 0:t.roles.some((e=>e.name===o))));return o}handleAddRole(e,t){e.stopPropagation();const o=b.template.roles.filter((e=>e.sequence===t)).length+1,s=this.getNextRoleName();console.log("Will create",s,t,o),C(this.endpoint,this.templateId,{template_id:this.templateId,name:s,full_name:"",email:"",phone:"",sequence:t,order:o,type:"signer",delegator:!1}).then((e=>{var t;console.log("Created role",e),b.template.roles.push(e),this.renumberTemplateRoles(),this.forceRerender++,null===(t=this.templateUpdated)||void 0===t||t.emit({event:"created-role",endpoint:this.endpoint,template:b.template})})).catch((e=>{console.log("Error creating role",e)}))}handleAddStep(e,t){e.stopPropagation();const o=this.getNextRoleName();console.log("Will create",o,t,1),C(this.endpoint,this.templateId,{template_id:this.templateId,name:o,full_name:"",email:"",phone:"",sequence:t,order:1,type:"signer",delegator:!1}).then((e=>{var t;console.log("Created role",e),b.template.roles.push(e),this.renumberTemplateRoles(),this.forceRerender++,null===(t=this.templateUpdated)||void 0===t||t.emit({event:"created-role",endpoint:this.endpoint,template:b.template})})).catch((e=>{console.log("Error creating role",e)}))}render(){var e;if(!this.endpoint.session)return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(b.loading||!b.template)return o(s,null,o("verdocs-loader",null));const t=((null===(e=b.template)||void 0===e?void 0:e.roles)||[]).map((e=>e.name));return o(s,null,o("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off","data-r":this.forceRerender},o("h5",null,"Roles and Workflow"),o("div",{class:"participants"},o("div",{class:"left-line"}),o("div",{class:"row"},o("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}),o("div",{class:"row-roles"},o("div",{class:"sender"},o("span",{class:"label"},"Sender:")," ",H[b.template.sender]," ",o("div",{class:"settings-button",innerHTML:L,onClick:()=>this.showingSenderDialog=!0,"aria-role":"button"})))),o("div",{class:"row add-sequence","data-sequence":0},o("div",{class:"icon",innerHTML:V}),o("div",{class:"row-roles"},o("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((e=>o(i,null,o("div",{class:"row"},o("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'}),o("div",{class:"row-roles"},o("div",{class:"dropzone","data-order":.5,"data-sequence":e}),b.template.roles.filter((t=>t.sequence===e)).map((s=>o(i,null,s.email?o("div",{class:"recipient",style:{borderColor:k(g(t,s.name))},"data-rolename":s.name},o("span",{class:"type-icon",innerHTML:"signer"===s.type?S:"cc"===s.type?_:T}),s.full_name," ",o("div",{class:"settings-button",innerHTML:L,onClick:()=>this.showingRoleDialog=s.name,"aria-role":"button"})):o("div",{class:"recipient",style:{backgroundColor:k(g(t,s.name))},"data-rolename":s.name},o("span",{class:"type-icon",innerHTML:"signer"===s.type?S:"cc"===s.type?_:T}),s.name," ",o("div",{class:"settings-button",innerHTML:L,onClick:()=>this.showingRoleDialog=s.name,"aria-role":"button"})),o("div",{class:"dropzone","data-order":s.order+.5,"data-sequence":e})))),o("button",{class:"add-role",innerHTML:V,onClick:t=>this.handleAddRole(t,e)}))),this.sequences.length>0&&o("div",{class:"row add-sequence","data-sequence":e},o("div",{class:"row-roles"},o("div",{class:"icon",innerHTML:V}),o("div",{class:"dropzone","data-sequence":e+1,"data-order":1},"Add Step")))))),o("div",{class:"row","data-sequence":this.sequences.length+1},o("div",{class:"row-roles"},o("div",{class:"icon",innerHTML:V}),o("button",{class:"add-step",innerHTML:V,onClick:e=>this.handleAddStep(e,this.sequences.length+1)}))),o("div",{class:"row"},o("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}),o("div",{class:"row-roles"},o("div",{class:"complete"},"Document Complete")))),t.length<1&&o("div",{class:"empty"},"You must add at least one Role before proceeding.",o("br",null)," Click the ",o("span",{innerHTML:V})," Add button above to get started."),o("div",{class:"buttons"},o("div",{class:"flex-fill"}),o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:()=>this.handleCancel()}),o("verdocs-button",{label:"OK",size:"small",onClick:()=>this.handleSubmit(),disabled:t.length<1}))),this.showingRoleDialog&&o("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{this.showingRoleDialog=null,this.forceRerender++},onDelete:e=>{var t;console.log("deleted",e.detail),this.renumberTemplateRoles(),this.showingRoleDialog=null,this.forceRerender++,null===(t=this.templateUpdated)||void 0===t||t.emit({event:"deleted-role",endpoint:this.endpoint,template:b.template})}}),this.showingSenderDialog&&o("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:()=>this.showingSenderDialog=!1}))}get el(){return l(this)}};R.style='verdocs-template-roles{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;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}';export{Z as verdocs_template_create,z as verdocs_template_fields,R as verdocs_template_roles}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,n,s){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{l(s.next(t))}catch(t){o(t)}}function a(t){try{l(s["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):r(t.value).then(i,a)}l((s=s.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:[]},s,r,o,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(t){return function(e){return l([t,e])}}function l(i){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;r=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=e.call(t,n)}catch(t){i=[6,t];r=0}finally{s=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-871407e9.system.js","./p-d46a428b.system.js","./p-5c043400.system.js","./p-71b8bb54.system.js","./p-8ac64953.system.js","./p-187b20b7.system.js","./p-d50523fd.system.js","./p-69912cbf.system.js"],(function(t){"use strict";var e,n,s,r,o,i,a,l;return{setters:[function(t){e=t.r;n=t.c;s=t.h;r=t.H},function(){},function(t){o=t.V},function(t){i=t.s},function(t){a=t.l},function(t){l=t.S},function(){},function(){}],execute:function(){var c='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#4c56cb}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b;border:1px solid #cccccc}verdocs-template-attachments svg{width:24px;height:24px;fill:#5c6575;margin:2px 10px 0 0}';var u='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var p=t("verdocs_template_attachments",function(){function t(t){e(this,t);this.close=n(this,"close",7);this.sdkError=n(this,"sdkError",7);this.endpoint=o.getDefault();this.templateId="";this.loading=true}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,s;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.endpoint.loadSession();return[4,a(this.endpoint,this.templateId)];case 1:r.sent();this.loading=false;return[3,3];case 2:s=r.sent();console.log("[TEMPLATE NAME] Error loading template",s);this.loading=false;(t=this.sdkError)===null||t===void 0?void 0:t.emit(new l(s.message,(e=s.response)===null||e===void 0?void 0:e.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};t.prototype.render=function(){if(!this.endpoint.session){return s(r,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(this.loading){return s(r,{class:"loading"},s("verdocs-loader",null))}if(!this.endpoint.session||!i.template){return s(r,{class:"empty"})}return s(r,null,s("h5",null,"Attachments"),i.template.template_documents.map((function(t){return s("div",{class:"attachment"},s("span",{innerHTML:u}),t.name," (",t.page_numbers," page",t.page_numbers>1?"s":"",")")})))};return t}());p.style=c}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,e,n,s){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{l(s.next(t))}catch(t){o(t)}}function a(t){try{l(s["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):r(t.value).then(i,a)}l((s=s.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:[]},s,r,o,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(t){return function(e){return l([t,e])}}function l(i){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;r=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=e.call(t,n)}catch(t){i=[6,t];r=0}finally{s=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-871407e9.system.js","./p-54498887.system.js","./p-c44fd897.system.js","./p-71b8bb54.system.js","./p-02316241.system.js","./p-187b20b7.system.js","./p-d50523fd.system.js","./p-47714747.system.js"],(function(t){"use strict";var e,n,s,r,o,i,a,l;return{setters:[function(t){e=t.r;n=t.c;s=t.h;r=t.H},function(){},function(t){o=t.V},function(t){i=t.s},function(t){a=t.l},function(t){l=t.S},function(){},function(){}],execute:function(){var c='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#4c56cb}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b;border:1px solid #cccccc}verdocs-template-attachments svg{width:24px;height:24px;fill:#5c6575;margin:2px 10px 0 0}';var u='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var p=t("verdocs_template_attachments",function(){function t(t){e(this,t);this.close=n(this,"close",7);this.sdkError=n(this,"sdkError",7);this.endpoint=o.getDefault();this.templateId="";this.loading=true}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,s;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.endpoint.loadSession();return[4,a(this.endpoint,this.templateId)];case 1:r.sent();this.loading=false;return[3,3];case 2:s=r.sent();console.log("[TEMPLATE NAME] Error loading template",s);this.loading=false;(t=this.sdkError)===null||t===void 0?void 0:t.emit(new l(s.message,(e=s.response)===null||e===void 0?void 0:e.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};t.prototype.render=function(){if(!this.endpoint.session){return s(r,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(this.loading){return s(r,{class:"loading"},s("verdocs-loader",null))}if(!this.endpoint.session||!i.template){return s(r,{class:"empty"})}return s(r,null,s("h5",null,"Attachments"),i.template.template_documents.map((function(t){return s("div",{class:"attachment"},s("span",{innerHTML:u}),t.name," (",t.page_numbers," page",t.page_numbers>1?"s":"",")")})))};return t}());p.style=c}}}));