@verdocs/web-sdk 1.11.11 → 1.12.1

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 (161) hide show
  1. package/dist/cjs/verdocs-build.cjs.entry.js +1 -9
  2. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +2 -2
  3. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -2
  5. package/dist/cjs/verdocs-field-signature.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +2 -2
  7. package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +2 -2
  8. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +3 -3
  9. package/dist/cjs/verdocs-send.cjs.entry.js +3 -3
  10. package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +2 -2
  11. package/dist/cjs/verdocs-template-create_2.cjs.entry.js +21 -17
  12. package/dist/cjs/verdocs-template-properties.cjs.entry.js +2 -2
  13. package/dist/cjs/verdocs-template-roles.cjs.entry.js +2 -2
  14. package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +2 -2
  15. package/dist/collection/collection-manifest.json +1 -1
  16. package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +4 -4
  17. package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.stories.js +3 -3
  18. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.js +4 -4
  19. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.stories.js +4 -4
  20. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +5 -5
  21. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.stories.js +3 -3
  22. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +4 -4
  23. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.stories.js +3 -3
  24. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +4 -4
  25. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.stories.js +4 -6
  26. package/dist/collection/components/elements/verdocs-contact-picker/verdocs-contact-picker.js +4 -4
  27. package/dist/collection/components/elements/verdocs-contact-picker/verdocs-contact-picker.stories.js +2 -2
  28. package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +1 -9
  29. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +5 -5
  30. package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +1 -1
  31. package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +4 -4
  32. package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +1 -1
  33. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +4 -21
  34. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.stories.js +2 -2
  35. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +19 -45
  36. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +5 -8
  37. package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.js +4 -4
  38. package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.stories.js +2 -2
  39. package/dist/collection/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.js +4 -4
  40. package/dist/collection/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.stories.js +2 -2
  41. package/dist/components/index.d.ts +1 -1
  42. package/dist/components/verdocs-build.js +1 -9
  43. package/dist/components/verdocs-contact-picker2.js +2 -2
  44. package/dist/components/verdocs-field-attachment.js +1 -1
  45. package/dist/components/verdocs-field-initial.js +2 -2
  46. package/dist/components/verdocs-field-signature.js +1 -1
  47. package/dist/components/verdocs-initial-dialog2.js +2 -2
  48. package/dist/components/verdocs-kba-dialog.js +2 -2
  49. package/dist/components/verdocs-ok-dialog2.js +3 -3
  50. package/dist/components/verdocs-send.js +3 -3
  51. package/dist/components/verdocs-signature-dialog2.js +2 -2
  52. package/dist/components/verdocs-template-create2.js +2 -5
  53. package/dist/components/verdocs-template-fields2.js +19 -12
  54. package/dist/components/verdocs-template-properties.js +2 -2
  55. package/dist/components/verdocs-template-roles.js +2 -2
  56. package/dist/components/verdocs-upload-dialog2.js +2 -2
  57. package/dist/docs.json +28 -55
  58. package/dist/esm/verdocs-build.entry.js +1 -9
  59. package/dist/esm/verdocs-contact-picker.entry.js +2 -2
  60. package/dist/esm/verdocs-field-attachment.entry.js +1 -1
  61. package/dist/esm/verdocs-field-initial.entry.js +2 -2
  62. package/dist/esm/verdocs-field-signature.entry.js +1 -1
  63. package/dist/esm/verdocs-initial-dialog.entry.js +2 -2
  64. package/dist/esm/verdocs-kba-dialog.entry.js +2 -2
  65. package/dist/esm/verdocs-ok-dialog.entry.js +3 -3
  66. package/dist/esm/verdocs-send.entry.js +3 -3
  67. package/dist/esm/verdocs-signature-dialog.entry.js +2 -2
  68. package/dist/esm/verdocs-template-create_2.entry.js +21 -17
  69. package/dist/esm/verdocs-template-properties.entry.js +2 -2
  70. package/dist/esm/verdocs-template-roles.entry.js +2 -2
  71. package/dist/esm/verdocs-upload-dialog.entry.js +2 -2
  72. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  73. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  74. package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
  75. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  76. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
  78. package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  81. package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
  83. package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
  84. package/dist/esm-es5/verdocs-template-roles.entry.js +1 -1
  85. package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
  86. package/dist/types/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.d.ts +2 -2
  87. package/dist/types/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.stories.d.ts +2 -2
  88. package/dist/types/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.d.ts +2 -2
  89. package/dist/types/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.stories.d.ts +2 -2
  90. package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +2 -2
  91. package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.stories.d.ts +2 -2
  92. package/dist/types/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.d.ts +2 -2
  93. package/dist/types/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.stories.d.ts +2 -2
  94. package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.d.ts +2 -2
  95. package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.stories.d.ts +2 -2
  96. package/dist/types/components/elements/verdocs-contact-picker/verdocs-contact-picker.d.ts +2 -2
  97. package/dist/types/components/elements/verdocs-contact-picker/verdocs-contact-picker.stories.d.ts +2 -2
  98. package/dist/types/components/embeds/verdocs-build/verdocs-build.d.ts +0 -2
  99. package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +2 -2
  100. package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +2 -2
  101. package/dist/types/components/templates/verdocs-template-create/verdocs-template-create.d.ts +2 -6
  102. package/dist/types/components/templates/verdocs-template-create/verdocs-template-create.stories.d.ts +2 -2
  103. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +0 -8
  104. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.stories.d.ts +1 -3
  105. package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.d.ts +2 -2
  106. package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.stories.d.ts +2 -2
  107. package/dist/types/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.d.ts +2 -2
  108. package/dist/types/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.stories.d.ts +2 -2
  109. package/dist/types/components.d.ts +24 -36
  110. package/dist/typings.d.ts +4 -0
  111. package/dist/verdocs-web-sdk/p-04ca7746.entry.js +1 -0
  112. package/dist/verdocs-web-sdk/p-062bd1d6.entry.js +1 -0
  113. package/dist/verdocs-web-sdk/p-07d519e8.entry.js +1 -0
  114. package/dist/verdocs-web-sdk/p-0bb87b59.entry.js +1 -0
  115. package/dist/verdocs-web-sdk/p-24266b55.entry.js +1 -0
  116. package/dist/verdocs-web-sdk/p-257d232d.system.entry.js +1 -0
  117. package/dist/verdocs-web-sdk/p-25c56686.entry.js +1 -0
  118. package/dist/verdocs-web-sdk/p-2ac6b090.entry.js +1 -0
  119. package/dist/verdocs-web-sdk/p-30f1611a.system.entry.js +1 -0
  120. package/dist/verdocs-web-sdk/p-3bc39719.entry.js +1 -0
  121. package/dist/verdocs-web-sdk/{p-7b82f0f2.system.entry.js → p-504d51c9.system.entry.js} +1 -1
  122. package/dist/verdocs-web-sdk/{p-a72e49c5.system.entry.js → p-55610f09.system.entry.js} +1 -1
  123. package/dist/verdocs-web-sdk/{p-7b4d7756.system.entry.js → p-5659c4bb.system.entry.js} +1 -1
  124. package/dist/verdocs-web-sdk/p-607b66bb.entry.js +1 -0
  125. package/dist/verdocs-web-sdk/p-619f9cc7.system.entry.js +1 -0
  126. package/dist/verdocs-web-sdk/p-79b5b76f.entry.js +1 -0
  127. package/dist/verdocs-web-sdk/p-7e6d7c07.system.js +1 -1
  128. package/dist/verdocs-web-sdk/{p-2a5c1eb7.entry.js → p-95171474.entry.js} +1 -1
  129. package/dist/verdocs-web-sdk/{p-a62755ba.system.entry.js → p-a0fd3c9b.system.entry.js} +1 -1
  130. package/dist/verdocs-web-sdk/p-a2c3458c.system.entry.js +1 -0
  131. package/dist/verdocs-web-sdk/{p-4faa7ff3.system.entry.js → p-a8ff2439.system.entry.js} +1 -1
  132. package/dist/verdocs-web-sdk/p-d0fc924d.entry.js +1 -0
  133. package/dist/verdocs-web-sdk/{p-5fa9dd45.system.entry.js → p-da81a310.system.entry.js} +1 -1
  134. package/dist/verdocs-web-sdk/p-dfe6f5d9.entry.js +1 -0
  135. package/dist/verdocs-web-sdk/p-e897e87a.system.entry.js +1 -0
  136. package/dist/verdocs-web-sdk/{p-7be5af5d.system.entry.js → p-e9f06aab.system.entry.js} +1 -1
  137. package/dist/verdocs-web-sdk/{p-457d3af9.system.entry.js → p-f1863a57.system.entry.js} +1 -1
  138. package/dist/verdocs-web-sdk/p-f75b2973.entry.js +1 -0
  139. package/dist/verdocs-web-sdk/p-fc57a027.system.entry.js +1 -0
  140. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  141. package/package.json +1 -1
  142. package/dist/verdocs-web-sdk/p-0048af58.system.entry.js +0 -1
  143. package/dist/verdocs-web-sdk/p-0e58db22.entry.js +0 -1
  144. package/dist/verdocs-web-sdk/p-1178d7a5.entry.js +0 -1
  145. package/dist/verdocs-web-sdk/p-5342a0bb.entry.js +0 -1
  146. package/dist/verdocs-web-sdk/p-5659eb9b.entry.js +0 -1
  147. package/dist/verdocs-web-sdk/p-5737eeb5.entry.js +0 -1
  148. package/dist/verdocs-web-sdk/p-5e932394.entry.js +0 -1
  149. package/dist/verdocs-web-sdk/p-75c744e0.entry.js +0 -1
  150. package/dist/verdocs-web-sdk/p-772ca02c.entry.js +0 -1
  151. package/dist/verdocs-web-sdk/p-99f4242f.system.entry.js +0 -1
  152. package/dist/verdocs-web-sdk/p-a275f3b8.system.entry.js +0 -1
  153. package/dist/verdocs-web-sdk/p-a38a4e2d.entry.js +0 -1
  154. package/dist/verdocs-web-sdk/p-a8a3bcb0.entry.js +0 -1
  155. package/dist/verdocs-web-sdk/p-a8b3e594.system.entry.js +0 -1
  156. package/dist/verdocs-web-sdk/p-b154b9b9.entry.js +0 -1
  157. package/dist/verdocs-web-sdk/p-b71f26f2.entry.js +0 -1
  158. package/dist/verdocs-web-sdk/p-c5be2c0f.entry.js +0 -1
  159. package/dist/verdocs-web-sdk/p-ecd33c4e.system.entry.js +0 -1
  160. package/dist/verdocs-web-sdk/p-f2ff8d0e.system.entry.js +0 -1
  161. /package/dist/collection/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.css +0 -0
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as s,H as e}from"./p-7239d28d.js";import{g as o}from"./p-6de76553.js";import{g as n}from"./p-44930c58.js";import{s as r}from"./p-a8b01bb9.js";import"./p-388b771c.js";import"./p-21603661.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-8b2040be.js";import"./p-7291906c.js";const l=class{constructor(s){t(this,s),this.fieldChange=i(this,"fieldChange",7),this.settingsPress=i(this,"settingsPress",7),this.settingsChanged=i(this,"settingsChanged",7),this.deleted=i(this,"deleted",7),this.field=null,this.name="",this.disabled=!1,this.editable=!1,this.moveable=!1,this.done=!1,this.roleindex=0,this.tempSignature=""}async focusField(){this.handleShow(),console.log("focused",this)}hideDialog(){var t;null===(t=this.dialog)||void 0===t||t.remove(),this.dialog=null}handleAdopt(t){var i;console.log("[SIGNATURE] Adopted signature"),this.tempSignature=t.detail,null===(i=this.fieldChange)||void 0===i||i.emit(this.tempSignature),this.hideDialog()}handleShow(){this.dialog=document.createElement("verdocs-signature-dialog"),this.dialog.setAttribute("name",this.name),this.dialog.setAttribute("roleindex",this.roleindex),this.dialog.addEventListener("cancel",(()=>this.hideDialog())),this.dialog.addEventListener("next",(t=>this.handleAdopt(t))),document.body.append(this.dialog)}async showSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.showPanel&&t.showPanel()}async hideSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.hidePanel&&t.hidePanel(),r.updateCount++}render(){var t,i,l;const d=n(this.field),a=d.base64||this.tempSignature,h=null!==(i=null!==(t=this.disabled)&&void 0!==t?t:d.disabled)&&void 0!==i&&i,c=this.field.rgba||o(this.roleindex);return this.done?s(e,{class:{done:this.done}},a&&s("img",{src:a,alt:"Signature"})):s(e,{class:{required:null===(l=this.field)||void 0===l?void 0:l.required,disabled:h},style:{backgroundColor:c}},a?s("img",{src:a,alt:"Signature"}):s("button",{onClick:()=>!h&&this.handleShow()},"Signature"),this.editable&&s("verdocs-button-panel",{icon:'<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>',id:`verdocs-settings-panel-${this.field.name}`},s("h6",null,"Field Settings"),s("verdocs-template-field-properties",{templateId:r.templateId,fieldName:this.field.name,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var t;return null===(t=this.deleted)||void 0===t||t.emit({fieldName:this.field.name}),this.hideSettingsPanel()},onSettingsChanged:t=>{var i;return null===(i=this.settingsChanged)||void 0===i||i.emit(t.detail),this.hideSettingsPanel()}})))}};l.style='verdocs-field-signature{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;position:relative;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-signature.disabled{opacity:0.5}verdocs-field-signature.done{border:none;opacity:1}verdocs-field-signature img{display:block;max-width:100%;max-height:100%}verdocs-field-signature button{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-signature button.hide{display:none}verdocs-field-signature.required{border:1px solid #cc0000}verdocs-field-signature.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-signature verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-signature verdocs-button-panel[data-active],verdocs-field-signature verdocs-button-panel:hover{opacity:1}verdocs-field-signature verdocs-button-panel .icon svg{fill:#333333}verdocs-field-signature verdocs-button-panel .icon:hover svg{fill:#000000}';export{l as verdocs_field_signature}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as s}from"./p-7239d28d.js";import{c as o,g as a}from"./p-b28ef4bb.js";import{c as l}from"./p-1c02faba.js";import{V as r}from"./p-4e49fb12.js";import{S as n}from"./p-7a1b2643.js";import{i as d}from"./p-642b2f86.js";import{u as h,c as p}from"./p-feb442b1.js";import{a as c,r as m,e as g,f as v,h as f}from"./p-44930c58.js";import{s as x}from"./p-a8b01bb9.js";import{l as u}from"./p-35c46590.js";import"./p-21603661.js";import"./p-388b771c.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-8b2040be.js";import"./p-7291906c.js";const w=class{constructor(i){e(this,i),this.cancel=t(this,"cancel",7),this.testev=t(this,"testev",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.endpoint=r.getDefault(),this.file=void 0,this.creating=!1}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(),console.log("Canceling"),this.testev.emit(),this.cancel.emit()}async handleSubmit(e){var t,i,s;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0;try{const e=await o(this.endpoint,{name:this.file.name});console.log("[CREATE] Created template",e);const t=await l(this.endpoint,e.id,this.file);console.log("[CREATE] Created document",t);let i=null;const s=setInterval((async()=>{var o;console.log("[CREATE] Waiting for template to be processed...",t),i=await a(this.endpoint,e.id),(null==i?void 0:i.processed)&&(console.log("[CREATE] Retrieved new template",i),s&&clearInterval(s),null===(o=this.next)||void 0===o||o.emit(i),this.creating=!1)}),3e3)}catch(e){console.log("[CREATE] Error creating template",e),null===(t=this.sdkError)||void 0===t||t.emit(new n(e.message,null===(i=e.response)||void 0===i?void 0:i.status,null===(s=e.response)||void 0===s?void 0:s.data)),this.creating=!1}}}render(){return this.endpoint.session?i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("input",{type:"file",id:"verdocs-template-create-file",multiple:!0,accept:"application/pdf",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),this.creating?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),i("div",{class:"loading-text"},"Processing, please wait...")):i("div",{class:"upload-box"},i("div",null,i("span",{innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>'})),i("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),i("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?" ":"Or, if you prefer..."),i("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:e=>this.handleUpload(e)})),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.creating}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file||this.creating}))):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};w.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;padding:0 0 30px 0}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 b=[{id:"checkbox",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:"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:"dropdown",tooltip:"Dropdown",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 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:"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:"radio",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:"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:"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:"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:"timestamp",tooltip:"Timestamp",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path fill="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>'}],q=class{constructor(i){e(this,i),this.next=t(this,"next",7),this.cancel=t(this,"cancel",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.pageHeights={},this.cachedPageInfo={},this.endpoint=r.getDefault(),this.templateId=null,this.toolbarTargetId=null,this.placing=null,this.selectedRoleName="",this.rerender=1}async componentWillLoad(){var e,t,i,s,o,a;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELDS] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[BUILD] Unable to start builder session, must be authenticated");try{console.log(`[FIELDS] Loading template ${this.templateId}`,this.endpoint.session),await u(this.endpoint,this.templateId,!0),this.selectedRoleName=x.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 n(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}catch(e){console.log("[FIELDS] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new n(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(a=e.response)||void 0===a?void 0:a.data))}}componentDidRender(){d.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,i){console.log("[FIELDS] handleFieldChange",e,t,i),this.rerender++}attachFieldAttributes(e,t,i,s){s.addEventListener("input",(e=>this.handleFieldChange(t,e))),s.addEventListener("settingsChanged",(()=>{var e;console.log("settings changed",this,t),s.setAttribute("roleindex",c(x.roleNames,t.role_name)),this.rerender++,null===(e=this.templateUpdated)||void 0===e||e.emit({endpoint:this.endpoint,template:x.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:x.template,event:"updated-field"})})),s.setAttribute("roleindex",i),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,x.fields.filter((e=>e.page_sequence===t.pageNumber)).forEach((e=>{const i=c(x.roleNames,e.role_name),s=m(e,t,i,{disabled:!0,editable:!0,draggable:!0});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(t,e,i,s))):this.attachFieldAttributes(t,e,i,s),d(s).draggable({listeners:{start(e){console.log("[FIELDS] Drag started",e.type,e.target)},move(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),s=+(e.target.getAttribute("xScale")||1),o=+(e.target.getAttribute("yScale")||1),a=e.dx/s+t,l=e.dy/o+i;e.target.setAttribute("posX",a),e.target.setAttribute("posy",l),g(e.target,"translate",`${a}px, ${l}px`)},end:this.handleMoveField.bind(this)}}))}))}async handleMoveField(e){const t=e.target.getAttribute("pageNumber"),{naturalWidth:i=612,naturalHeight:s=792,renderedHeight:o=792}=this.cachedPageInfo[t];console.log("[FIELDS] Drag ended",t,e.target);const a=e.target.getBoundingClientRect(),l=e.target.parentElement.getBoundingClientRect(),r=Math.max(a.left-l.left,0),n=Math.max(o-(l.bottom-a.bottom),0),{x:d,y:p}=this.viewCoordinatesToPageCoordinates(r,n,t,i-e.rect.width,s-e.rect.height),c=e.target.getAttribute("name"),m=x.fields.find((e=>e.name===c));m&&(m.setting.x=d,m.setting.y=p,await h(this.endpoint,this.templateId,c,m),this.handlePageRendered({detail:this.cachedPageInfo[t]}))}generateFieldName(e,t){let i,s=1;do{i=`${e}P${t}-${s}`,s++}while(x.fields.some((e=>e.name===i)));return console.log("Field name",i),i}viewCoordinatesToPageCoordinates(e,t,i,s,o){const{xScale:a=1,yScale:l=1,renderedHeight:r=792}=this.cachedPageInfo[i];return{x:Math.floor(Math.min(e/a,s)),y:Math.floor(Math.min(Math.max(r-t,0)/l,o))}}async handleClickPage(e,t){var i;if(this.placing){console.log("Placing field",this.placing,t.sequence,e.offsetX,e.offsetY);const s=t.sequence,o=e.offsetX,a=e.offsetY,l=v(this.placing),r=f(this.placing),n=this.cachedPageInfo[s];console.log("Cached page",n);const{naturalWidth:d=612,naturalHeight:h=792}=n,{x:c,y:m}=this.viewCoordinatesToPageCoordinates(o,a,s,d-l,h-r),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:c,y:m}};switch(g.type){case"attachment":case"payment":g.setting={x:c,y:m};break;case"initial":case"signature":g.setting={x:c,y:m,result:""};break;case"checkbox_group":g.setting={x:c,y:m,minimum_checked:0,maximum_checked:1e3};break;case"date":g.setting={x:c,y:m,width:l,height:r,result:""};break;case"dropdown":g.setting={x:c,y:m,width:l,height:r,value:"",placeholder:"Select a value"};break;case"radio_button_group":g.setting={x:c,y:m};break;case"textbox":g.setting={x:c,y:m,width:l,height:r,result:"",leading:0,alignment:0,upperCase:!1};break;case"timestamp":g.setting={x:c,y:m,width:l,height:r}}const u=await p(this.endpoint,this.templateId,g);console.log("Saved field",u),x.fields.push(u),this.placing=null,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:x.template,event:"added-field"}),this.handlePageRendered({detail:this.cachedPageInfo[s]})}}render(){if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(x.loading||!x.template)return i(s,null,i("verdocs-loader",null));const e=[...x.template.pages];return e.sort(((e,t)=>e.sequence-t.sequence)),i(s,{class:this.placing?{[`placing-${this.placing}`]:!0}:{},"data-r":this.rerender,onSubmit:()=>{console.log("onSubmit")}},i("div",{id:"verdocs-template-fields-toolbar"},b.map((e=>i("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:()=>this.placing=e.id})))),i("div",{class:"pages"},e.map((e=>i("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"}]})))))}};q.style="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative}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{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 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-dropdown{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-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath 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\") 0 14, pointer}";export{w as verdocs_template_create,q as verdocs_template_fields}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function r(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,s)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return l([e,t])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;o=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(r[0]===6&&i.label<a[1]){i.label=a[1];a=r;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(r);break}if(a[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];o=0}finally{n=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++){if(a||!(n in t)){if(!a)a=Array.prototype.slice.call(t,0,n);a[n]=t[n]}}return e.concat(a||Array.prototype.slice.call(t))};System.register(["./p-9422b807.system.js","./p-69912cbf.system.js","./p-0522edd2.system.js","./p-4f63fae0.system.js","./p-187b20b7.system.js","./p-c739f90a.system.js","./p-b1288daf.system.js","./p-dc2efab7.system.js","./p-03aeaebe.system.js","./p-f0f99234.system.js","./p-af2c2f79.system.js","./p-e764098e.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,i,n,o,a,r,s,l,d,c,p,h,u,g,f,m,v,x,w;return{setters:[function(e){t=e.r;i=e.c;n=e.h;o=e.H},function(e){a=e.c;r=e.g},function(e){s=e.c},function(e){l=e.V},function(e){d=e.S},function(e){c=e.i},function(e){p=e.u;h=e.c},function(e){u=e.a;g=e.r;f=e.e;m=e.f;v=e.h},function(e){x=e.s},function(e){w=e.l},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var b='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;padding:0 0 30px 0}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}';var y=" ";var C='<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 q=e("verdocs_template_create",function(){function e(e){t(this,e);this.cancel=i(this,"cancel",7);this.testev=i(this,"testev",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.endpoint=l.getDefault();this.file=undefined;this.creating=false}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();console.log("Canceling");this.testev.emit();this.cancel.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,o,l,c,p,h;var u=this;return __generator(this,(function(g){switch(g.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;g.label=1;case 1:g.trys.push([1,4,,5]);return[4,a(this.endpoint,{name:this.file.name})];case 2:o=g.sent();console.log("[CREATE] Created template",o);return[4,s(this.endpoint,o.id,this.file)];case 3:l=g.sent();console.log("[CREATE] Created document",l);c=null;p=setInterval((function(){return __awaiter(u,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:console.log("[CREATE] Waiting for template to be processed...",l);return[4,r(this.endpoint,o.id)];case 1:c=t.sent();if(c===null||c===void 0?void 0:c.processed){console.log("[CREATE] Retrieved new template",c);if(p){clearInterval(p)}(e=this.next)===null||e===void 0?void 0:e.emit(c);this.creating=false}return[2]}}))}))}),3e3);return[3,5];case 4:h=g.sent();console.log("[CREATE] Error creating template",h);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new d(h.message,(i=h.response)===null||i===void 0?void 0:i.status,(n=h.response)===null||n===void 0?void 0:n.data));this.creating=false;return[3,5];case 5:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return n(o,null,n("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?n("div",{class:"loader-wrapper"},n("verdocs-loader",null),n("div",{class:"loading-text"},"Processing, please wait...")):n("div",{class:"upload-box"},n("div",null,n("span",{innerHTML:C})),n("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),n("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?y:"Or, if you prefer..."),n("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),n("div",{class:"buttons"},n("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),n("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating})))};return e}());q.style=b;var E="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative}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{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 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-dropdown{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-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath 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\") 0 14, pointer}";var Z='<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 k='<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 _='<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 V='<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 H='<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 I='<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 S='<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 M='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path fill="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';var L='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 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 A=[{id:"checkbox",tooltip:"Check Box",icon:_},{id:"date",tooltip:"Date",icon:H},{id:"dropdown",tooltip:"Dropdown",icon:L},{id:"initial",tooltip:"Initials",icon:S},{id:"radio",tooltip:"Radio Button",icon:V},{id:"signature",tooltip:"Signature",icon:I},{id:"textarea",tooltip:"Text Area",icon:k},{id:"textbox",tooltip:"Text Box",icon:Z},{id:"timestamp",tooltip:"Timestamp",icon:M}];var P=e("verdocs_template_fields",function(){function e(e){t(this,e);this.next=i(this,"next",7);this.cancel=i(this,"cancel",7);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.pageHeights={};this.cachedPageInfo={};this.endpoint=l.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,a,r,s;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[FIELDS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,w(this.endpoint,this.templateId,true)];case 2:l.sent();this.selectedRoleName=x.roleNames[0];console.log("Starting with role",this.selectedRoleName);return[3,4];case 3:r=l.sent();console.log("[FIELDS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[3,6];case 5:s=l.sent();console.log("[FIELDS] Error with preview session",s);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new d(s.message,(o=s.response)===null||o===void 0?void 0:o.status,(a=s.response)===null||a===void 0?void 0:a.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){c.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.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){console.log("[FIELDS] handleFieldChange",e,t,i);this.rerender++;return[2]}))}))};e.prototype.attachFieldAttributes=function(e,t,i,n){var o=this;n.addEventListener("input",(function(e){return o.handleFieldChange(t,e)}));n.addEventListener("settingsChanged",(function(){var e;console.log("settings changed",o,t);n.setAttribute("roleindex",u(x.roleNames,t.role_name));o.rerender++;(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:o.endpoint,template:x.template,event:"updated-field"})}));n.addEventListener("deleted",(function(){var e;console.log("deleted",o,t);n.remove();o.rerender++;(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:o.endpoint,template:x.template,event:"updated-field"})}));n.setAttribute("roleindex",i);n.setAttribute("pageNumber",e.pageNumber);n.setAttribute("xScale",e.xScale);n.setAttribute("yScale",e.yScale);n.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;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=x.fields.filter((function(e){return e.page_sequence===i.pageNumber}));n.forEach((function(e){var n=u(x.roleNames,e.role_name);var o=g(e,i,n,{disabled:true,editable:true,draggable:true});if(!o){return}if(Array.isArray(o)){o.map((function(o){return t.attachFieldAttributes(i,e,n,o)}))}else{t.attachFieldAttributes(i,e,n,o)}c(o).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 i=+(e.target.getAttribute("posY")||0);var n=+(e.target.getAttribute("xScale")||1);var o=+(e.target.getAttribute("yScale")||1);var a=e.dx/n+t;var r=e.dy/o+i;e.target.setAttribute("posX",a);e.target.setAttribute("posy",r);f(e.target,"translate","".concat(a,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}))};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,o,a,r,s,l,d,c,h,u,g,f,m,v,w,b;return __generator(this,(function(y){switch(y.label){case 0:t=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[t],n=i.naturalWidth,o=n===void 0?612:n,a=i.naturalHeight,r=a===void 0?792:a,s=i.renderedHeight,l=s===void 0?792:s;console.log("[FIELDS] Drag ended",t,e.target);d=e.target.getBoundingClientRect();c=e.target.parentElement;h=c.getBoundingClientRect();u=Math.max(d.left-h.left,0);g=Math.max(l-(h.bottom-d.bottom),0);f=this.viewCoordinatesToPageCoordinates(u,g,t,o-e.rect.width,r-e.rect.height),m=f.x,v=f.y;w=e.target.getAttribute("name");b=x.fields.find((function(e){return e.name===w}));if(!b)return[3,2];b.setting.x=m;b.setting.y=v;return[4,p(this.endpoint,this.templateId,w,b)];case 1:y.sent();this.handlePageRendered({detail:this.cachedPageInfo[t]});y.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var i=1;var n;do{n="".concat(e,"P").concat(t,"-").concat(i);i++}while(x.fields.some((function(e){return e.name===n})));console.log("Field name",n);return n};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,i,n,o){var a=this.cachedPageInfo[i],r=a.xScale,s=r===void 0?1:r,l=a.yScale,d=l===void 0?1:l,c=a.renderedHeight,p=c===void 0?792:c;var h=Math.floor(Math.min(e/s,n));var u=Math.floor(Math.min(Math.max(p-t,0)/d,o));return{x:h,y:u}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,n,o,a,r,s,l,d,c,p,u,g,f,w,b,y;return __generator(this,(function(C){switch(C.label){case 0:if(!this.placing)return[3,2];console.log("Placing field",this.placing,t.sequence,e.offsetX,e.offsetY);n=t.sequence;o=e.offsetX;a=e.offsetY;r=m(this.placing);s=v(this.placing);l=this.cachedPageInfo[n];console.log("Cached page",l);d=l.naturalWidth,c=d===void 0?612:d,p=l.naturalHeight,u=p===void 0?792:p;g=this.viewCoordinatesToPageCoordinates(o,a,n,c-r,u-s),f=g.x,w=g.y;b={name:this.generateFieldName(this.placing,n),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:true,page_sequence:n,validator:null,setting:{x:f,y:w}};switch(b.type){case"attachment":case"payment":b.setting={x:f,y:w};break;case"initial":case"signature":b.setting={x:f,y:w,result:""};break;case"checkbox_group":b.setting={x:f,y:w,minimum_checked:0,maximum_checked:1e3};break;case"date":b.setting={x:f,y:w,width:r,height:s,result:""};break;case"dropdown":b.setting={x:f,y:w,width:r,height:s,value:"",placeholder:"Select a value"};break;case"radio_button_group":b.setting={x:f,y:w};break;case"textbox":b.setting={x:f,y:w,width:r,height:s,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":b.setting={x:f,y:w,width:r,height:s};break}return[4,h(this.endpoint,this.templateId,b)];case 1:y=C.sent();console.log("Saved field",y);x.fields.push(y);this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:x.template,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[n]});C.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;if(!this.endpoint.session){return n(o,null,n("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(x.loading||!x.template){return n(o,null,n("verdocs-loader",null))}var i=__spreadArray([],x.template.pages,true);i.sort((function(e,t){return e.sequence-t.sequence}));return n(o,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){console.log("onSubmit")}},n("div",{id:"verdocs-template-fields-toolbar"},A.map((function(e){return n("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){return t.placing=e.id}})}))),n("div",{class:"pages"},i.map((function(e){return n("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onClick:function(i){return t.handleClickPage(i,e)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))))};return e}());P.style=E}}}));
@@ -1 +0,0 @@
1
- System.register(["./p-9422b807.system.js"],(function(t){"use strict";var i,e,n,a;return{setters:[function(t){i=t.r;e=t.c;n=t.h;a=t.H}],execute:function(){var o='verdocs-initial-dialog{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;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-initial-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-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);background:#f9f9f9}verdocs-initial-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-initial-dialog .content{font-size:14px;padding:20px}verdocs-initial-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-initial-dialog .buttons verdocs-button{margin-left:16px}verdocs-initial-dialog canvas{background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 #0000001f;box-shadow:0 0 6px 0 #0000001f}verdocs-initial-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-initial-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-initial-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-initial-dialog .tabs .tab:hover{color:#55bc81}';var s=t("verdocs_initial_dialog",function(){function t(t){i(this,t);this.next=e(this,"next",7);this.cancel=e(this,"cancel",7);this.initials="";this.fontLoaded=false;this.enteredInitials="";this.mode="type"}t.prototype.componentWillLoad=function(){var t=this;this.enteredInitials=this.initials.toUpperCase();var i=new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)");i.load().then((function(i){document.fonts.add(i);t.fontLoaded=true}))};t.prototype.componentDidLoad=function(){this.redrawSignature()};t.prototype.componentDidUpdate=function(){this.redrawSignature()};t.prototype.redrawSignature=function(){if(!this.canvasElement){return}var t=this.canvasElement.width;var i=this.canvasElement.getContext("2d");i.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);var e=100;do{e-=2;i.font="".concat(e,"px Dancing Script")}while(i.measureText(this.enteredInitials).width>t-32);i.textAlign="center";i.textBaseline="middle";i.font="".concat(e,"px Dancing Script");i.fillText(this.enteredInitials,this.canvasElement.width/2,this.canvasElement.height/2)};t.prototype.handleNameChange=function(t){this.enteredInitials=t.target.value};t.prototype.handleCancel=function(t){t.stopPropagation();t.preventDefault();this.cancel.emit()};t.prototype.handleAdopt=function(t){t.stopPropagation();t.preventDefault();var i=this.canvasElement.toDataURL("image/png");this.next.emit(i)};t.prototype.render=function(){var t=this;return n(a,{onClick:function(i){return t.handleCancel(i)}},n("div",{class:"dialog"},n("div",{class:"heading"},"Create Your Initial"),n("div",{class:"content"},n("verdocs-text-input",{placeholder:"Initials...",label:"Initials",value:this.enteredInitials,onInput:function(i){return t.handleNameChange(i)}}),n("div",{class:"as-shown"},"As shown on driver's license or govt. ID card."),this.fontLoaded?n("canvas",{ref:function(i){return t.canvasElement=i}}):n("div",{style:{display:"none"}}),n("div",{class:"disclaimer"},"By clicking Adopt, I agree that the signature will be the electronic representation of my signature for all purposes when I (or my agent) use them on documents, including legally binding contracts — just the same as a pen-and-paper signature or initial."),n("div",{class:"buttons"},n("verdocs-button",{label:"CANCEL",variant:"outline",onClick:function(i){return t.handleCancel(i)}}),n("verdocs-button",{label:"Adopt & Sign",onClick:function(i){return t.handleAdopt(i)}})))))};return t}());s.style=o}}}));
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as o,H as i}from"./p-7239d28d.js";import{g as s}from"./p-b28ef4bb.js";import{V as r}from"./p-4e49fb12.js";import{S as l}from"./p-7a1b2643.js";import{s as a}from"./p-a8b01bb9.js";import"./p-21603661.js";import"./p-8b2040be.js";import"./p-7291906c.js";const p=class{constructor(o){e(this,o),this.cancel=t(this,"cancel",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.endpoint=r.getDefault(),this.templateId="",this.template=null,this.name="",this.visibility="",this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1"}async componentWillLoad(){var e,t,o;try{this.endpoint.loadSession(),console.log(`[PROPERTIES] Loading template ${this.templateId}`);const e=await s(this.endpoint,this.templateId);if(!e)return void console.log("[PREVIEW] Unable to load template");console.log("[PROPERTIES] Got template",e),this.template=e,a.template=e,this.name=e.name,this.sendReminders=null!==e.reminder_id}catch(i){console.log("[PROPERTIES] Error loading template",i),null===(e=this.sdkError)||void 0===e||e.emit(new l(i.message,null===(t=i.response)||void 0===t?void 0:t.status,null===(o=i.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t;e.stopPropagation(),null===(t=this.cancel)||void 0===t||t.emit()}handleSubmit(e){var t;e.stopPropagation(),null===(t=this.next)||void 0===t||t.emit({name:this.name,firstReminderDays:+this.firstReminderDays,reminderDays:+this.reminderDays,sendReminders:this.sendReminders})}render(){return this.endpoint.session?o("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},o("h5",null,"Template Name"),o("fieldset",null,o("verdocs-text-input",{value:this.name,autocomplete:"off",onInput:e=>this.name=e.target.value})),o("h5",null,"Reminders"),o("fieldset",null,o("div",{class:"input-row"},o("label",null,"Send Automatic Reminders"),o("verdocs-checkbox",{name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>this.sendReminders=e.target.checked})),o("div",{class:"input-row"},o("label",null,"Days Before First Reminder"),o("verdocs-text-input",{value:this.firstReminderDays,onInput:e=>this.firstReminderDays=e.target.value})),o("div",{class:"input-row"},o("label",null,"Days Between Reminders"),o("verdocs-text-input",{value:this.reminderDays,onInput:e=>this.reminderDays=e.target.value}))),o("h5",null,"Template Visibility"),o("fieldset",null,o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:!0,value:"private",onChange:()=>this.visibility="private"}),o("label",{htmlFor:"verdocs-radio-button-visibility-private"},o("div",{class:"title"},"Private"),o("div",{class:"description"},"Only you can share and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:!0,value:"shared",onChange:()=>this.visibility="shared"}),o("label",{htmlFor:"verdocs-radio-button-visibility-shared"},o("div",{class:"title"},"Shared to your organization"),o("div",{class:"description"},"Give access to your organization to share and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:!0,value:"shared_public",onChange:()=>this.visibility="shared_public"}),o("label",{htmlFor:"verdocs-radio-button-visibility-shared_public"},o("div",{class:"title"},"Shared to your organization and Public"),o("div",{class:"description"},"Give access to your organization to share this template, and anyone on the Web can find and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:"public"===this.visibility,value:"public",onChange:()=>this.visibility="public"}),o("label",{htmlFor:"verdocs-radio-button-visibility-public"},o("div",{class:"title"},"Public"),o("div",{class:"description"},"Anyone on the Web can find and use this template")))),o("div",{class:"buttons"},o("div",{class:"flex-fill"}),o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),o("verdocs-button",{label:"OK",size:"small",onClick:e=>this.handleSubmit(e)}))):o(i,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};p.style='verdocs-template-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .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-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}';export{p as verdocs_template_properties}
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as e,H as o}from"./p-7239d28d.js";const s=class{constructor(e){i(this,e),this.next=t(this,"next",7),this.cancel=t(this,"cancel",7),this.initials="",this.fontLoaded=!1,this.enteredInitials="",this.mode="type"}componentWillLoad(){this.enteredInitials=this.initials.toUpperCase(),new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)").load().then((i=>{document.fonts.add(i),this.fontLoaded=!0}))}componentDidLoad(){this.redrawSignature()}componentDidUpdate(){this.redrawSignature()}redrawSignature(){if(!this.canvasElement)return;const i=this.canvasElement.width,t=this.canvasElement.getContext("2d");t.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);let e=100;do{e-=2,t.font=`${e}px Dancing Script`}while(t.measureText(this.enteredInitials).width>i-32);t.textAlign="center",t.textBaseline="middle",t.font=`${e}px Dancing Script`,t.fillText(this.enteredInitials,this.canvasElement.width/2,this.canvasElement.height/2)}handleNameChange(i){this.enteredInitials=i.target.value}handleCancel(i){i.stopPropagation(),i.preventDefault(),this.cancel.emit()}handleAdopt(i){i.stopPropagation(),i.preventDefault();const t=this.canvasElement.toDataURL("image/png");this.next.emit(t)}render(){return e(o,{onClick:i=>this.handleCancel(i)},e("div",{class:"dialog"},e("div",{class:"heading"},"Create Your Initial"),e("div",{class:"content"},e("verdocs-text-input",{placeholder:"Initials...",label:"Initials",value:this.enteredInitials,onInput:i=>this.handleNameChange(i)}),e("div",{class:"as-shown"},"As shown on driver's license or govt. ID card."),this.fontLoaded?e("canvas",{ref:i=>this.canvasElement=i}):e("div",{style:{display:"none"}}),e("div",{class:"disclaimer"},"By clicking Adopt, I agree that the signature will be the electronic representation of my signature for all purposes when I (or my agent) use them on documents, including legally binding contracts — just the same as a pen-and-paper signature or initial."),e("div",{class:"buttons"},e("verdocs-button",{label:"CANCEL",variant:"outline",onClick:i=>this.handleCancel(i)}),e("verdocs-button",{label:"Adopt & Sign",onClick:i=>this.handleAdopt(i)})))))}};s.style='verdocs-initial-dialog{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;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-initial-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-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);background:#f9f9f9}verdocs-initial-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-initial-dialog .content{font-size:14px;padding:20px}verdocs-initial-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-initial-dialog .buttons verdocs-button{margin-left:16px}verdocs-initial-dialog canvas{background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 #0000001f;box-shadow:0 0 6px 0 #0000001f}verdocs-initial-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-initial-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-initial-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-initial-dialog .tabs .tab:hover{color:#55bc81}';export{s as verdocs_initial_dialog}
@@ -1 +0,0 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,o){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function l(e){try{a(o.next(e))}catch(e){i(e)}}function r(e){try{a(o["throw"](e))}catch(e){i(e)}}function a(e){e.done?n(e.value):s(e.value).then(l,r)}a((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,s,i,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(e){return function(t){return a([e,t])}}function a(l){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,s&&(i=l[0]&2?s["return"]:l[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,l[1])).done)return i;if(s=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;s=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1];i=l;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(l);break}if(i[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];s=0}finally{o=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-4f63fae0.system.js","./p-7efdefa3.system.js","./p-05eb4fed.system.js","./p-03aeaebe.system.js","./p-f0f99234.system.js","./p-dc2efab7.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js","./p-69912cbf.system.js","./p-e764098e.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,n,o,s,i,l,r,a,c,d,p,f;return{setters:[function(e){t=e.r;n=e.c;o=e.h;s=e.H},function(e){i=e.V},function(e){l=e.i;r=e.a},function(e){a=e.g},function(e){c=e.s},function(e){d=e.l},function(e){p=e.a},function(e){f=e.S},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var u='verdocs-send{display:-ms-flexbox;display:flex;padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';var v='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';var h='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var m='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var x='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var g=e("verdocs_send",function(){function e(e){t(this,e);this.send=n(this,"send",7);this.cancel=n(this,"cancel",7);this.sdkError=n(this,"sdkError",7);this.levels=[];this.endpoint=i.getDefault();this.templateId=null;this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.rolesCompleted={}}e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rolesCompleted={};return[2]}))}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,o,s,i,l,r;return __generator(this,(function(a){switch(a.label){case 0:i=this.endpoint.loadSession();if(!this.templateId){console.log("[SEND] Missing required template ID ".concat(this.templateId));return[2]}a.label=1;case 1:a.trys.push([1,3,,4]);console.log("[SEND] Loading template ".concat(this.templateId));return[4,d(this.endpoint,this.templateId)];case 2:a.sent();if((e=c.template)===null||e===void 0?void 0:e.roles){l={};this.rolesCompleted={};c.template.roles.forEach((function(e){var t=e.sequence-1;l[t]||(l[t]=[]);var n="r-".concat(t,"-").concat(l[t].length);l[t].push(__assign(__assign({},e),{id:n}))}));this.rolesAtLevel=l;this.levels=Object.keys(l).map((function(e){return+e}));this.levels.sort((function(e,t){return e-t}))}return[3,4];case 3:r=a.sent();console.log("[SEND] Error loading template",r);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new f(r.message,(n=r.response)===null||n===void 0?void 0:n.status,(o=r.response)===null||o===void 0?void 0:o.data));return[3,4];case 4:if((s=i.session)===null||s===void 0?void 0:s.profile){this.sessionContacts.push({id:i.session.profile.id,name:"".concat(i.session.profile.first_name," ").concat(i.session.profile.last_name),email:i.session.profile.email,phone:i.session.profile.phone})}return[2]}}))}))};e.prototype.getLevelIcon=function(e){if(e<0){return o("div",{class:"level-icon",innerHTML:h})}else if(e>=this.levels.length){return o("div",{class:"level-icon",innerHTML:x})}else{return o("div",{class:"level-icon",innerHTML:m})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.rolesCompleted[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t;e.stopPropagation();(t=this.send)===null||t===void 0?void 0:t.emit({roles:Object.values(this.rolesCompleted),name:c.template.name,template_id:this.templateId})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t=c.template.roles.map((function(e){return e.name}))||[];var n=Object.values(this.rolesCompleted).filter((function(e){return l(e.email)||r(e.phone)}));var i=n.length>=t.length;return o(s,{class:{}},o("div",{class:"recipients"},o("div",{class:"left-line"}),o("div",{class:"level level-start"},this.getLevelIcon(-1),o("div",{class:"complete"},"Send Envelope")),this.levels.map((function(n){return o("div",{class:"level level-".concat(n)},e.getLevelIcon(n),e.rolesAtLevel[n].map((function(n){var s,i,l;return o("div",{class:"recipient",style:{backgroundColor:a(p(t,n.name))},onClick:function(t){return e.handleClickRole(t,n)}},(i=(s=e.rolesCompleted[n.id])===null||s===void 0?void 0:s.full_name)!==null&&i!==void 0?i:n.name,o("div",{class:"icon",innerHTML:v}),e.showPickerForId===n.id&&o("verdocs-contact-picker",{onCancel:function(){return e.showPickerForId=""},onNext:function(t){return e.handleSelectContact(t,n)},contactSuggestions:e.sessionContacts,templateRole:(l=e.rolesCompleted[n.id])!==null&&l!==void 0?l:n,onSearchContacts:function(e){return console.log("Search",e.detail)}}))})))})),o("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),o("div",{class:"complete"},"Signing Complete"))),o("div",{class:"buttons"},o("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{label:"Send",size:"small",disabled:!i,onClick:function(t){return e.handleSend(t)}})))};return e}());g.style=u}}}));
@@ -1 +0,0 @@
1
- import{r as o,c as i,h as e,H as s}from"./p-7239d28d.js";const t=class{constructor(e){o(this,e),this.next=i(this,"next",7),this.cancel=i(this,"cancel",7),this.heading="",this.message="",this.showCancel=!1}handleOk(){this.next.emit()}handleCancel(){this.cancel.emit()}handleDismiss(o){"background-overlay"===o.target.className&&(o.preventDefault(),this.cancel.emit())}render(){return e(s,null,e("div",{class:"background-overlay",onClick:o=>this.handleDismiss(o)},e("div",{class:"dialog"},e("div",{class:"heading"},this.heading),e("div",{class:"content"},e("div",{class:"message",innerHTML:this.message}),e("div",{class:"buttons"},this.showCancel?e("verdocs-button",{label:"CANCEL",variant:"outline",onClick:()=>this.handleCancel()}):e("div",{style:{display:"none"}}),e("verdocs-button",{label:"OK",onClick:()=>this.handleOk()}))))))}};t.style='verdocs-ok-dialog{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-ok-dialog .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-ok-dialog .dialog{max-width:50%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;-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-ok-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;-ms-flex-direction:row;flex-direction:row;padding:8px 16px;font-weight:bold;color:#ffffff;background:#46497d}verdocs-ok-dialog .content{font-size:16px;background:#ffffff;padding:20px}verdocs-ok-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}verdocs-ok-dialog .buttons verdocs-button{margin-left:16px}';export{t as verdocs_ok_dialog}
@@ -1 +0,0 @@
1
- import{r as i,c as e,h as t,H as s}from"./p-7239d28d.js";const o=class{constructor(t){i(this,t),this.next=e(this,"next",7),this.cancel=e(this,"cancel",7),this.name="",this.fontLoaded=!1,this.enteredName="",this.mode="type"}componentWillLoad(){this.enteredName=this.name,new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)").load().then((i=>{document.fonts.add(i),this.fontLoaded=!0}))}componentDidLoad(){this.redrawSignature()}componentDidUpdate(){this.redrawSignature()}redrawSignature(){if(!this.canvasElement)return;const i=this.canvasElement.width,e=this.canvasElement.getContext("2d");e.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);let t=100;do{t-=2,e.font=`${t}px Dancing Script`}while(e.measureText(this.enteredName).width>i-32);e.textAlign="center",e.textBaseline="middle",e.font=`${t}px Dancing Script`,e.fillText(this.enteredName,this.canvasElement.width/2,this.canvasElement.height/2)}handleNameChange(i){this.enteredName=i.target.value}handleCancel(i){i.stopPropagation(),i.preventDefault(),this.cancel.emit()}handleAdopt(i){i.stopPropagation(),i.preventDefault();const e=this.canvasElement.toDataURL("image/png");this.next.emit(e)}render(){return t(s,{onClick:i=>this.handleCancel(i)},t("div",{class:"dialog"},t("div",{class:"heading"},"Create Your Signature"),t("div",{class:"content"},t("verdocs-text-input",{placeholder:"Full Name...",label:"Full Name",value:this.enteredName,onInput:i=>this.handleNameChange(i),onClick:i=>i.stopPropagation()}),t("div",{class:"as-shown"},"As shown on driver's license or govt. ID card."),this.fontLoaded?t("canvas",{ref:i=>this.canvasElement=i}):t("div",{style:{display:"none"}}),t("div",{class:"disclaimer"},"By clicking Adopt, I agree that the signature will be the electronic representation of my signature for all purposes when I (or my agent) use them on documents, including legally binding contracts — just the same as a pen-and-paper signature or initial."),t("div",{class:"buttons"},t("verdocs-button",{label:"CANCEL",size:"normal",variant:"outline",onClick:i=>this.handleCancel(i)}),t("verdocs-button",{label:"Adopt & Sign",size:"normal",onClick:i=>this.handleAdopt(i)})))))}};o.style='verdocs-signature-dialog{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;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-signature-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-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);background:#f9f9f9}verdocs-signature-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-signature-dialog .content{font-size:14px;padding:20px}verdocs-signature-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-signature-dialog .buttons verdocs-button{margin-left:16px}verdocs-signature-dialog canvas{background:#ffffff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 #0000001f;box-shadow:0 0 6px 0 #0000001f}verdocs-signature-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-signature-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-signature-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-signature-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-signature-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-signature-dialog .tabs .tab:hover{color:#55bc81}';export{o as verdocs_signature_dialog}
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as s,H as e}from"./p-7239d28d.js";import{g as o}from"./p-6de76553.js";import{g as l}from"./p-44930c58.js";import{s as n}from"./p-a8b01bb9.js";import"./p-388b771c.js";import"./p-21603661.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-8b2040be.js";import"./p-7291906c.js";const r=class{constructor(s){i(this,s),this.adopt=t(this,"adopt",7),this.cancel=t(this,"cancel",7),this.fieldChange=t(this,"fieldChange",7),this.settingsChanged=t(this,"settingsChanged",7),this.settingsPress=t(this,"settingsPress",7),this.deleted=t(this,"deleted",7),this.field=null,this.disabled=!1,this.initials="",this.editable=!1,this.moveable=!1,this.done=!1,this.roleindex=0,this.tempInitials=""}async focusField(){this.handleShow()}hideDialog(){var i;null===(i=this.dialog)||void 0===i||i.remove(),this.dialog=null}handleAdopt(i){var t;console.log("[INITIAL] Adopted initials"),this.tempInitials=i.detail,null===(t=this.fieldChange)||void 0===t||t.emit(this.tempInitials),this.hideDialog()}handleShow(){this.dialog=document.createElement("verdocs-initial-dialog"),this.dialog.setAttribute("initials",this.initials),this.dialog.setAttribute("roleindex",this.roleindex),this.dialog.addEventListener("cancel",(()=>this.hideDialog())),this.dialog.addEventListener("next",(i=>this.handleAdopt(i))),document.body.append(this.dialog)}async showSettingsPanel(){const i=document.getElementById(`verdocs-settings-panel-${this.field.name}`);i&&i.showPanel&&i.showPanel()}async hideSettingsPanel(){const i=document.getElementById(`verdocs-settings-panel-${this.field.name}`);i&&i.hidePanel&&i.hidePanel(),n.updateCount++}render(){var i,t;const r=l(this.field),a=r.base64||this.tempInitials,d=null!==(t=null!==(i=this.disabled)&&void 0!==i?i:r.disabled)&&void 0!==t&&t,h=this.field.rgba||o(this.roleindex);return this.done?s(e,{class:{done:this.done}},a&&s("img",{src:a,alt:"Initials"})):s(e,{class:{required:r.required,disabled:d},style:{backgroundColor:h}},a?s("img",{src:a,alt:"Initials"}):s("button",{class:{},onClick:()=>!d&&this.handleShow()},"Initials"),this.editable&&s("verdocs-button-panel",{icon:'<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>',id:`verdocs-settings-panel-${this.field.name}`},s("h6",null,"Field Settings"),s("verdocs-template-field-properties",{templateId:n.templateId,fieldName:this.field.name,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var i;return null===(i=this.deleted)||void 0===i||i.emit({fieldName:this.field.name}),this.hideSettingsPanel()},onSettingsChanged:i=>{var t;return null===(t=this.settingsChanged)||void 0===t||t.emit(i.detail),this.hideSettingsPanel()}})))}};r.style='verdocs-field-initial{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-initial.disabled{opacity:0.5}verdocs-field-initial.done{border:none;opacity:1}verdocs-field-initial img{display:block;max-width:100%;max-height:100%}verdocs-field-initial button{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-initial button.hide{display:none}verdocs-field-initial.required{border:1px solid #cc0000}verdocs-field-initial.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-initial verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-initial verdocs-button-panel[data-active],verdocs-field-initial verdocs-button-panel:hover{opacity:1}verdocs-field-initial verdocs-button-panel .icon svg{fill:#333333}verdocs-field-initial verdocs-button-panel .icon:hover svg{fill:#000000}';export{r as verdocs_field_initial}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,s){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function l(e){try{a(s["throw"](e))}catch(e){i(e)}}function a(e){e.done?n(e.value):o(e.value).then(r,l)}a((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,o,i,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return a([e,t])}}function a(r){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,o&&(i=r[0]&2?o["return"]:r[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;if(o=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){n.label=r[1];break}if(r[0]===6&&n.label<i[1]){n.label=i[1];i=r;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(r);break}if(i[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{s=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-4f63fae0.system.js","./p-f0f99234.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-69912cbf.system.js","./p-03aeaebe.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,n,s,o,i,r,l;return{setters:[function(e){t=e.r;n=e.c;s=e.h;o=e.H},function(e){i=e.V},function(e){r=e.l},function(e){l=e.S},function(){},function(){},function(){},function(){},function(){}],execute:function(){var a='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}';var c=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.fields=[];this.endpoint=i.getDefault();this.templateId=null;this.step="create";this.pdfUrl=null;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s;return __generator(this,(function(o){switch(o.label){case 0:this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[BUILD] No template ID specified, showing upload option");this.step="create";return[2]}o.label=1;case 1:o.trys.push([1,3,,4]);console.log("[BUILD] Loading template ".concat(this.templateId));return[4,r(this.endpoint,this.templateId)];case 2:o.sent();this.step="fields";return[3,4];case 3:s=o.sent();console.log("[BUILD] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handleCancel=function(e){console.log("Cancel",e.detail);this.step=""};e.prototype.handleTemplateCreated=function(e){console.log("Created",e.detail);this.step="fields"};e.prototype.handlePropertiesUpdated=function(e){console.log("updated",e.detail);this.step="recipients"};e.prototype.handleRecipientsUpdated=function(e){console.log("updated",e.detail);this.step="fields"};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return s(o,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return s(o,null,this.step==="create"&&s("verdocs-template-create",{onCancel:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleTemplateCreated(t)}}),this.step==="fields"&&s("verdocs-template-fields",{onCancel:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleCancel(t)}}))};return e}());c.style=a}}}));
@@ -1 +0,0 @@
1
- System.register(["./p-9422b807.system.js"],(function(e){"use strict";var t,n,i,o;return{setters:[function(e){t=e.r;n=e.c;i=e.h;o=e.H}],execute:function(){var a='verdocs-signature-dialog{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;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-signature-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-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);background:#f9f9f9}verdocs-signature-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-signature-dialog .content{font-size:14px;padding:20px}verdocs-signature-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-signature-dialog .buttons verdocs-button{margin-left:16px}verdocs-signature-dialog canvas{background:#ffffff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 #0000001f;box-shadow:0 0 6px 0 #0000001f}verdocs-signature-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-signature-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-signature-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-signature-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-signature-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-signature-dialog .tabs .tab:hover{color:#55bc81}';var r=e("verdocs_signature_dialog",function(){function e(e){t(this,e);this.next=n(this,"next",7);this.cancel=n(this,"cancel",7);this.name="";this.fontLoaded=false;this.enteredName="";this.mode="type"}e.prototype.componentWillLoad=function(){var e=this;this.enteredName=this.name;var t=new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)");t.load().then((function(t){document.fonts.add(t);e.fontLoaded=true}))};e.prototype.componentDidLoad=function(){this.redrawSignature()};e.prototype.componentDidUpdate=function(){this.redrawSignature()};e.prototype.redrawSignature=function(){if(!this.canvasElement){return}var e=this.canvasElement.width;var t=this.canvasElement.getContext("2d");t.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);var n=100;do{n-=2;t.font="".concat(n,"px Dancing Script")}while(t.measureText(this.enteredName).width>e-32);t.textAlign="center";t.textBaseline="middle";t.font="".concat(n,"px Dancing Script");t.fillText(this.enteredName,this.canvasElement.width/2,this.canvasElement.height/2)};e.prototype.handleNameChange=function(e){this.enteredName=e.target.value};e.prototype.handleCancel=function(e){e.stopPropagation();e.preventDefault();this.cancel.emit()};e.prototype.handleAdopt=function(e){e.stopPropagation();e.preventDefault();var t=this.canvasElement.toDataURL("image/png");this.next.emit(t)};e.prototype.render=function(){var e=this;return i(o,{onClick:function(t){return e.handleCancel(t)}},i("div",{class:"dialog"},i("div",{class:"heading"},"Create Your Signature"),i("div",{class:"content"},i("verdocs-text-input",{placeholder:"Full Name...",label:"Full Name",value:this.enteredName,onInput:function(t){return e.handleNameChange(t)},onClick:function(e){return e.stopPropagation()}}),i("div",{class:"as-shown"},"As shown on driver's license or govt. ID card."),this.fontLoaded?i("canvas",{ref:function(t){return e.canvasElement=t}}):i("div",{style:{display:"none"}}),i("div",{class:"disclaimer"},"By clicking Adopt, I agree that the signature will be the electronic representation of my signature for all purposes when I (or my agent) use them on documents, including legally binding contracts — just the same as a pen-and-paper signature or initial."),i("div",{class:"buttons"},i("verdocs-button",{label:"CANCEL",size:"normal",variant:"outline",onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{label:"Adopt & Sign",size:"normal",onClick:function(t){return e.handleAdopt(t)}})))))};return e}());r.style=a}}}));