@verdocs/web-sdk 1.13.5 → 1.13.6

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 (141) hide show
  1. package/README.md +12 -0
  2. package/dist/cjs/{TemplateStore-01ff3237.js → TemplateStore-df478971.js} +1 -1
  3. package/dist/cjs/{Templates-e258cbd5.js → Templates-24580a13.js} +36 -4
  4. package/dist/cjs/{popper-11d5f714.js → popper-9def2535.js} +3 -4
  5. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  6. package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +3 -3
  7. package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +4 -1
  10. package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
  11. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
  13. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-template-attachments.cjs.entry.js +2 -2
  15. package/dist/cjs/verdocs-template-create_3.cjs.entry.js +5 -9
  16. package/dist/cjs/verdocs-template-document-page.cjs.entry.js +52 -2
  17. package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
  18. package/dist/cjs/verdocs-template-properties.cjs.entry.js +2 -2
  19. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
  20. package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +2 -2
  21. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
  22. package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +1 -1
  23. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +4 -1
  24. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +4 -8
  25. package/dist/collection/utils/utils.js +9 -0
  26. package/dist/components/Templates.js +36 -4
  27. package/dist/components/popper.js +3 -4
  28. package/dist/components/verdocs-field-textbox.js +4 -1
  29. package/dist/components/verdocs-template-create2.js +4 -8
  30. package/dist/components/verdocs-template-document-page2.js +51 -1
  31. package/dist/docs.json +1 -1
  32. package/dist/esm/{TemplateStore-91a71f46.js → TemplateStore-373c72a8.js} +1 -1
  33. package/dist/esm/{Templates-ca52ef90.js → Templates-67172396.js} +36 -4
  34. package/dist/esm/{popper-f860750c.js → popper-bfa25c7f.js} +3 -4
  35. package/dist/esm/verdocs-build.entry.js +2 -2
  36. package/dist/esm/verdocs-button-panel_3.entry.js +3 -3
  37. package/dist/esm/verdocs-checkbox_4.entry.js +1 -1
  38. package/dist/esm/verdocs-dropdown_2.entry.js +1 -1
  39. package/dist/esm/verdocs-field-textbox.entry.js +4 -1
  40. package/dist/esm/verdocs-preview.entry.js +2 -2
  41. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  42. package/dist/esm/verdocs-send.entry.js +2 -2
  43. package/dist/esm/verdocs-status-indicator.entry.js +1 -1
  44. package/dist/esm/verdocs-template-attachments.entry.js +2 -2
  45. package/dist/esm/verdocs-template-create_3.entry.js +5 -9
  46. package/dist/esm/verdocs-template-document-page.entry.js +51 -1
  47. package/dist/esm/verdocs-template-name.entry.js +2 -2
  48. package/dist/esm/verdocs-template-properties.entry.js +2 -2
  49. package/dist/esm/verdocs-template-reminders.entry.js +2 -2
  50. package/dist/esm/verdocs-template-role-properties_2.entry.js +2 -2
  51. package/dist/esm/verdocs-template-visibility.entry.js +2 -2
  52. package/dist/esm/verdocs-toolbar-icon.entry.js +1 -1
  53. package/dist/esm-es5/{TemplateStore-91a71f46.js → TemplateStore-373c72a8.js} +1 -1
  54. package/dist/esm-es5/Templates-67172396.js +1 -0
  55. package/dist/esm-es5/popper-bfa25c7f.js +1 -0
  56. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  57. package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
  58. package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
  59. package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
  60. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  61. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  62. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  63. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  64. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  65. package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -1
  66. package/dist/esm-es5/verdocs-template-create_3.entry.js +1 -1
  67. package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -1
  68. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  69. package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
  70. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  71. package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -1
  72. package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
  73. package/dist/esm-es5/verdocs-toolbar-icon.entry.js +1 -1
  74. package/dist/types/components/embeds/verdocs-build/utils.d.ts +2 -2
  75. package/dist/types/components/embeds/verdocs-sign/utils.d.ts +2 -2
  76. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +3 -3
  77. package/dist/types/utils/utils.d.ts +11 -7
  78. package/dist/typings.d.ts +4 -0
  79. package/dist/verdocs-web-sdk/{p-de4c38a1.entry.js → p-068e6212.entry.js} +1 -1
  80. package/dist/verdocs-web-sdk/p-126c0301.system.entry.js +1 -0
  81. package/dist/verdocs-web-sdk/{p-650b9205.system.entry.js → p-1db79af9.system.entry.js} +1 -1
  82. package/dist/verdocs-web-sdk/{p-71adad1c.entry.js → p-1fc2dcb7.entry.js} +1 -1
  83. package/dist/verdocs-web-sdk/{p-3b1b11a8.system.entry.js → p-2287f1bc.system.entry.js} +1 -1
  84. package/dist/verdocs-web-sdk/{p-2d39a000.entry.js → p-27332125.entry.js} +1 -1
  85. package/dist/verdocs-web-sdk/{p-c25d965d.js → p-2fc46a8b.js} +1 -1
  86. package/dist/verdocs-web-sdk/p-4ac861c9.system.js +1 -0
  87. package/dist/verdocs-web-sdk/{p-fccb4fec.system.entry.js → p-527f15bb.system.entry.js} +1 -1
  88. package/dist/verdocs-web-sdk/p-5bb80e03.system.entry.js +1 -0
  89. package/dist/verdocs-web-sdk/p-5e0c6e7c.system.js +1 -0
  90. package/dist/verdocs-web-sdk/{p-1a34942f.system.entry.js → p-5e3893ec.system.entry.js} +1 -1
  91. package/dist/verdocs-web-sdk/{p-32fb9679.entry.js → p-658c3ab7.entry.js} +1 -1
  92. package/dist/verdocs-web-sdk/{p-f1edfd5a.system.js → p-66c74103.system.js} +1 -1
  93. package/dist/verdocs-web-sdk/p-6caf1137.system.js +1 -1
  94. package/dist/verdocs-web-sdk/{p-4eb829ca.system.entry.js → p-6ea848fe.system.entry.js} +1 -1
  95. package/dist/verdocs-web-sdk/{p-36f78b1f.system.entry.js → p-71a1576a.system.entry.js} +1 -1
  96. package/dist/verdocs-web-sdk/{p-39e906e0.entry.js → p-756d5c24.entry.js} +1 -1
  97. package/dist/verdocs-web-sdk/p-7e8fe43e.entry.js +1 -0
  98. package/dist/verdocs-web-sdk/p-822ba467.js +1 -0
  99. package/dist/verdocs-web-sdk/{p-62e12e8f.system.entry.js → p-82512045.system.entry.js} +1 -1
  100. package/dist/verdocs-web-sdk/{p-c9705b22.entry.js → p-82854066.entry.js} +1 -1
  101. package/dist/verdocs-web-sdk/{p-1886b178.entry.js → p-86e507c1.entry.js} +1 -1
  102. package/dist/verdocs-web-sdk/{p-cc396cda.entry.js → p-879e9572.entry.js} +1 -1
  103. package/dist/verdocs-web-sdk/{p-e4b56475.entry.js → p-87f428fb.entry.js} +1 -1
  104. package/dist/verdocs-web-sdk/{p-b3bca701.entry.js → p-91f062a8.entry.js} +1 -1
  105. package/dist/verdocs-web-sdk/{p-f7cfaa04.system.entry.js → p-920fd6d9.system.entry.js} +1 -1
  106. package/dist/verdocs-web-sdk/{p-38d0af92.entry.js → p-97be89cf.entry.js} +1 -1
  107. package/dist/verdocs-web-sdk/p-9d707f6e.js +1 -0
  108. package/dist/verdocs-web-sdk/{p-13f91d03.system.entry.js → p-a3282274.system.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/{p-c8901fde.entry.js → p-a5a530fa.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/p-a5f3f29c.entry.js +1 -0
  111. package/dist/verdocs-web-sdk/{p-5b4dd6a0.entry.js → p-ba591e02.entry.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-2216464c.system.entry.js → p-bd35fd77.system.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/{p-ec81b1f2.entry.js → p-bd8ff2a6.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/{p-34d3d150.system.entry.js → p-c9ff6acb.system.entry.js} +1 -1
  115. package/dist/verdocs-web-sdk/p-d28acca1.entry.js +1 -0
  116. package/dist/verdocs-web-sdk/{p-d63fe7e9.system.entry.js → p-d67b2a26.system.entry.js} +1 -1
  117. package/dist/verdocs-web-sdk/{p-1b21b08d.system.entry.js → p-d714a804.system.entry.js} +1 -1
  118. package/dist/verdocs-web-sdk/{p-a3747387.system.entry.js → p-d936d293.system.entry.js} +1 -1
  119. package/dist/verdocs-web-sdk/{p-a6096629.system.entry.js → p-e59061aa.system.entry.js} +1 -1
  120. package/dist/verdocs-web-sdk/{p-8c9caa8a.system.entry.js → p-f0d1c6bd.system.entry.js} +1 -1
  121. package/dist/verdocs-web-sdk/{p-40bb871d.entry.js → p-fc67ddc9.entry.js} +1 -1
  122. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  123. package/package.json +8 -5
  124. package/dist/cjs/TemplateDocuments-1c6620b0.js +0 -78
  125. package/dist/components/TemplateDocuments.js +0 -75
  126. package/dist/custom-elements.json +0 -1546
  127. package/dist/esm/TemplateDocuments-618934d0.js +0 -75
  128. package/dist/esm-es5/TemplateDocuments-618934d0.js +0 -1
  129. package/dist/esm-es5/Templates-ca52ef90.js +0 -1
  130. package/dist/esm-es5/popper-f860750c.js +0 -1
  131. package/dist/verdocs-web-sdk/p-194a8f9c.system.entry.js +0 -1
  132. package/dist/verdocs-web-sdk/p-3751d683.entry.js +0 -1
  133. package/dist/verdocs-web-sdk/p-47714747.system.js +0 -1
  134. package/dist/verdocs-web-sdk/p-4cd5eb1f.js +0 -1
  135. package/dist/verdocs-web-sdk/p-63398dca.system.js +0 -1
  136. package/dist/verdocs-web-sdk/p-77e616b7.system.entry.js +0 -1
  137. package/dist/verdocs-web-sdk/p-923f56f3.entry.js +0 -1
  138. package/dist/verdocs-web-sdk/p-b86b362a.js +0 -1
  139. package/dist/verdocs-web-sdk/p-e12b7fbc.system.js +0 -1
  140. package/dist/verdocs-web-sdk/p-ec26fc38.js +0 -1
  141. package/dist/verdocs-web-sdk/p-f44f5d73.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as e,h as t,H as o}from"./p-e035df4b.js";import{c as i}from"./p-ec26fc38.js";const s=class{constructor(t){e(this,t),this.checked=!1,this.name="",this.label="",this.value="",this.theme="light",this.disabled=!1}render(){return t(o,{class:{disabled:this.disabled,[this.theme]:!0}},t("label",null,t("input",{type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),t("span",null,this.label)))}};s.style='@charset "UTF-8";verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:1rem;height:1rem;-ms-flex-negative:0;flex-shrink:0;line-height:18px;border-radius:2px;border-style:solid;margin-right:0.5rem;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';const r=class{constructor(t){e(this,t),this.message=""}render(){return t(o,null,t("div",{class:"inner"},this.message))}};r.style='verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';const n=class{constructor(t){e(this,t),this.text="",this.containerId=`verdocs-help-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=i(this.icon,this.tooltip,{})}disconnectedCallback(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}show(){var e,t;null===(e=this.tooltip)||void 0===e||e.setAttribute("data-show",""),null===(t=this.popperInstance)||void 0===t||t.update().catch((()=>{}))}hide(){var e;null===(e=this.tooltip)||void 0===e||e.removeAttribute("data-show")}render(){return t(o,{class:{}},t("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>',onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:e=>this.icon=e}),t("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":"bottom",ref:e=>this.tooltip=e},this.text,t("div",{"data-popper-arrow":"true",class:"arrow"})))}};n.style='verdocs-help-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block;opacity:0.3;position:relative}verdocs-help-icon:hover{opacity:1}verdocs-help-icon .icon{display:inline-block}verdocs-help-icon .icon svg{fill:#5c6575}verdocs-help-icon .tooltip{display:none;min-width:200px;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;position:absolute;padding:5px 10px;font-size:13px;border-radius:4px;z-index:10000}verdocs-help-icon .tooltip .arrow,verdocs-help-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-help-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-help-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-help-icon .tooltip[data-show]{display:block}verdocs-help-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-help-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-help-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-help-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}';const c=class{constructor(t){e(this,t),this.value="",this.label="",this.placeholder="",this.autocomplete="",this.helpText="",this.type="text",this.disabled=!1}render(){return t(o,{class:"input-field"},t("label",null,this.label&&t("div",{class:"input-label"},this.label+":"),t("input",{type:this.type,value:this.value,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete}),this.helpText&&t("verdocs-help-icon",{text:this.helpText})))}};c.style='verdocs-text-input{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 12px;outline:none}verdocs-text-input .input-element:disabled{border:1px solid #aeb4bf;background:#f5f5fa}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input [data-lastpass-icon-root]{display:none !important}';export{s as verdocs_checkbox,r as verdocs_component_error,n as verdocs_help_icon,c as verdocs_text_input}
1
+ import{r as e,h as t,H as o}from"./p-e035df4b.js";import{c as i}from"./p-9d707f6e.js";const s=class{constructor(t){e(this,t),this.checked=!1,this.name="",this.label="",this.value="",this.theme="light",this.disabled=!1}render(){return t(o,{class:{disabled:this.disabled,[this.theme]:!0}},t("label",null,t("input",{type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),t("span",null,this.label)))}};s.style='@charset "UTF-8";verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:1rem;height:1rem;-ms-flex-negative:0;flex-shrink:0;line-height:18px;border-radius:2px;border-style:solid;margin-right:0.5rem;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';const r=class{constructor(t){e(this,t),this.message=""}render(){return t(o,null,t("div",{class:"inner"},this.message))}};r.style='verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';const n=class{constructor(t){e(this,t),this.text="",this.containerId=`verdocs-help-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=i(this.icon,this.tooltip,{})}disconnectedCallback(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}show(){var e,t;null===(e=this.tooltip)||void 0===e||e.setAttribute("data-show",""),null===(t=this.popperInstance)||void 0===t||t.update().catch((()=>{}))}hide(){var e;null===(e=this.tooltip)||void 0===e||e.removeAttribute("data-show")}render(){return t(o,{class:{}},t("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>',onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:e=>this.icon=e}),t("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":"bottom",ref:e=>this.tooltip=e},this.text,t("div",{"data-popper-arrow":"true",class:"arrow"})))}};n.style='verdocs-help-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block;opacity:0.3;position:relative}verdocs-help-icon:hover{opacity:1}verdocs-help-icon .icon{display:inline-block}verdocs-help-icon .icon svg{fill:#5c6575}verdocs-help-icon .tooltip{display:none;min-width:200px;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;position:absolute;padding:5px 10px;font-size:13px;border-radius:4px;z-index:10000}verdocs-help-icon .tooltip .arrow,verdocs-help-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-help-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-help-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-help-icon .tooltip[data-show]{display:block}verdocs-help-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-help-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-help-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-help-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}';const c=class{constructor(t){e(this,t),this.value="",this.label="",this.placeholder="",this.autocomplete="",this.helpText="",this.type="text",this.disabled=!1}render(){return t(o,{class:"input-field"},t("label",null,this.label&&t("div",{class:"input-label"},this.label+":"),t("input",{type:this.type,value:this.value,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete}),this.helpText&&t("verdocs-help-icon",{text:this.helpText})))}};c.style='verdocs-text-input{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 12px;outline:none}verdocs-text-input .input-element:disabled{border:1px solid #aeb4bf;background:#f5f5fa}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input [data-lastpass-icon-root]{display:none !important}';export{s as verdocs_checkbox,r as verdocs_component_error,n as verdocs_help_icon,c as verdocs_text_input}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as s,a as n}from"./p-e035df4b.js";import"./p-05788c2b.js";import{V as o}from"./p-c2c49441.js";import{t as a}from"./p-1abcf29d.js";import"./p-eab67c09.js";import"./p-b3ec6306.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const r=class{constructor(e){t(this,e),this.pageRendered=i(this,"pageRendered",7),this.endpoint=o.getDefault(),this.templateId="",this.documentId="",this.pageNumber=1,this.virtualWidth=612,this.virtualHeight=792,this.layers=[{name:"page",type:"canvas"}],this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`,this.renderedWidth=this.virtualWidth,this.renderedHeight=this.virtualHeight,this.naturalWidth=this.virtualWidth,this.naturalHeight=this.virtualHeight,this.aspectRatio=this.virtualWidth/this.virtualHeight,this.skipFirstNotification=!0,this.pageDisplayUri=""}async componentWillLoad(){var t,i,e,s,n,o,a,r;this.pageDisplayUri=await(t=this.endpoint,i=this.templateId,e=this.documentId,s=this.pageNumber,n=void 0,o=void 0,a=void 0,r=function(){return function(t,i){var e,s,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function r(r){return function(h){return function(r){if(e)throw new TypeError("Generator is already executing.");for(;o&&(o=0,r[0]&&(a=0)),a;)try{if(e=1,s&&(n=2&r[0]?s.return:r[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;switch(s=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,s=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){a.label=r[1];break}if(6===r[0]&&a.label<n[1]){a.label=n[1],n=r;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(r);break}n[2]&&a.ops.pop(),a.trys.pop();continue}r=i.call(t,a)}catch(t){r=[6,t],s=0}finally{e=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,h])}}}(this,(function(){return[2,t.api.get("/templates/".concat(i,"/documents/").concat(e,"/pages/").concat(s,"/image")).then((function(t){return t.data}))]}))},new(a||(a=Promise))((function(t,i){function e(t){try{h(r.next(t))}catch(t){i(t)}}function s(t){try{h(r.throw(t))}catch(t){i(t)}}function h(i){var n;i.done?t(i.value):(n=i.value,n instanceof a?n:new a((function(t){t(n)}))).then(e,s)}h((r=r.apply(n,o||[])).next())})))}componentDidLoad(){this.resizeObserver=new ResizeObserver(a((t=>{for(const i of t){const t=i.contentRect.width;this.renderedWidth=t,this.renderedHeight=this.virtualHeight*(t/this.virtualWidth)}this.notifyRenderedSize()}),100)),this.resizeObserver.observe(this.container)}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}notifyRenderedSize(){this.skipFirstNotification?this.skipFirstNotification=!1:this.pageRendered.emit({containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const t=`${this.renderedHeight}px`;return e(s,{id:`${this.containerId}`,style:{height:t,flex:`0 0 ${t}`}},this.layers.map((i=>"div"===i.type?e("div",{class:"verdocs-template-document-page-layer",id:`${this.containerId}-${i.name}`,style:{height:t}}):this.pageDisplayUri?e("img",{class:"verdocs-template-document-page-layer img",id:`${this.containerId}-${i.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":!0,loading:"lazy",onLoad:t=>{this.naturalWidth=t.target.naturalWidth,this.naturalHeight=t.target.naturalHeight,this.aspectRatio=this.naturalWidth/this.naturalHeight,this.virtualHeight=this.virtualWidth/this.aspectRatio,this.renderedHeight=t.target.offsetWidth/this.aspectRatio}}):e("div",null))))}get container(){return n(this)}};r.style="verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}";export{r as verdocs_template_document_page}
@@ -0,0 +1 @@
1
+ var t=function(t,n){return t.api.post("/templates",{params:n}).then((function(t){return t.data}))},n=function(t,n){return t.api.get("/templates/".concat(n)).then((function(t){return t.data}))},e=["name","is_personal","is_public","sender","description","roles","fields"],r=function(t,n,r){var a={timeout:12e4,onUploadProgress:function(t){var n=t.total||1,e=t.loaded||0;null==r||r(Math.floor(100*e/(n||1)),e,n||1)}};if(n.documents&&n.documents[0]instanceof File){if(n.documents.length>10)throw new Error("createTemplate() has a maximum of 10 documents that can be attached.");var u=new FormData;return e.forEach((function(t){void 0!==n[t]&&u.append(t,n[t])})),n.documents.forEach((function(t){u.append("documents",t,t.name)})),t.api.post("/templates",u,a).then((function(t){return t.data}))}return t.api.post("/templates",n,a).then((function(t){return t.data}))},a=function(t,n,e){return t.api.put("/templates/".concat(n),e).then((function(t){return t.data}))};export{t as a,r as c,n as g,a as u}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,s){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function i(e){try{a(s.next(e))}catch(e){o(e)}}function l(e){try{a(s["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):r(e.value).then(i,l)}a((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s,r,o,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(t){return a([e,t])}}function a(i){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;r=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=t.call(e,n)}catch(e){i=[6,e];r=0}finally{s=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-871407e9.system.js","./p-54498887.system.js","./p-c44fd897.system.js","./p-f1edfd5a.system.js","./p-187b20b7.system.js","./p-47714747.system.js"],(function(e){"use strict";var t,n,s,r,o,i,l;return{setters:[function(e){t=e.r;n=e.c;s=e.h;r=e.H},function(){},function(e){o=e.V},function(e){i=e.g},function(e){l=e.S},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 u=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.stepChanged=n(this,"stepChanged",7);this.fields=[];this.store=null;this.endpoint=o.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,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[BUILD] 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]}this.step="roles";s=this;return[4,i(this.endpoint,this.templateId,true)];case 1:s.store=o.sent();return[3,3];case 2:r=o.sent();console.log("[BUILD] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;console.log("Cancel",e.detail);this.step="";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("")};e.prototype.handleTemplateCreated=function(e){var t;console.log("Created",e.detail);this.step="roles";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("roles")};e.prototype.handleRolesDone=function(e){var t;console.log("Roles",e.detail);this.step="fields";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("fields")};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return s(r,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return s(r,null,this.step==="create"&&s("verdocs-template-create",{onExit:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleTemplateCreated(t)}}),this.step==="roles"&&s("verdocs-template-roles",{onExit:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleTemplateCreated(t)}}),this.step==="fields"&&s("verdocs-template-fields",null))};return e}());u.style=a}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,s){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function i(e){try{a(s.next(e))}catch(e){o(e)}}function l(e){try{a(s["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):r(e.value).then(i,l)}a((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s,r,o,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(t){return a([e,t])}}function a(i){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;r=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=t.call(e,n)}catch(e){i=[6,e];r=0}finally{s=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-871407e9.system.js","./p-54498887.system.js","./p-c44fd897.system.js","./p-66c74103.system.js","./p-187b20b7.system.js","./p-4ac861c9.system.js"],(function(e){"use strict";var t,n,s,r,o,i,l;return{setters:[function(e){t=e.r;n=e.c;s=e.h;r=e.H},function(){},function(e){o=e.V},function(e){i=e.g},function(e){l=e.S},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 u=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.stepChanged=n(this,"stepChanged",7);this.fields=[];this.store=null;this.endpoint=o.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,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[BUILD] 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]}this.step="roles";s=this;return[4,i(this.endpoint,this.templateId,true)];case 1:s.store=o.sent();return[3,3];case 2:r=o.sent();console.log("[BUILD] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;console.log("Cancel",e.detail);this.step="";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("")};e.prototype.handleTemplateCreated=function(e){var t;console.log("Created",e.detail);this.step="roles";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("roles")};e.prototype.handleRolesDone=function(e){var t;console.log("Roles",e.detail);this.step="fields";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("fields")};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return s(r,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return s(r,null,this.step==="create"&&s("verdocs-template-create",{onExit:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleTemplateCreated(t)}}),this.step==="roles"&&s("verdocs-template-roles",{onExit:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleTemplateCreated(t)}}),this.step==="fields"&&s("verdocs-template-fields",null))};return e}());u.style=a}}}));
@@ -1 +1 @@
1
- import{r as e,c as t,h as i}from"./p-e035df4b.js";import"./p-05788c2b.js";import{V as s}from"./p-c2c49441.js";import{a as o}from"./p-b86b362a.js";var r=function(e){return t=void 0,i=void 0,o=function(){return function(e,t){var i,s,o,r,n={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(c){return function(a){return function(c){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,c[0]&&(n=0)),n;)try{if(i=1,s&&(o=2&c[0]?s.return:c[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,c[1])).done)return o;switch(s=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,s=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!((o=(o=n.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){n=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(6===c[0]&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],s=0}finally{i=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))},new((s=void 0)||(s=Promise))((function(e,r){function n(e){try{a(o.next(e))}catch(e){r(e)}}function c(e){try{a(o.throw(e))}catch(e){r(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,c)}a((o=o.apply(t,i||[])).next())}));var t,i,s,o};const n=class{constructor(i){e(this,i),this.createTemplate=t(this,"createTemplate",7),this.createDocument=t(this,"createDocument",7),this.endpoint=s.getDefault()}handleCreateTemplate(){this.createTemplate.emit()}handleCreateDocument(){this.createDocument.emit()}render(){return i("div",{class:"container"},i("p",{class:"title"},"Quick Create"),i("button",{onClick:()=>this.handleCreateTemplate(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>'},"Template"),i("button",{onClick:()=>this.handleCreateDocument(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>'},"Document"))}};n.style='verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}';const c='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>',a=class{constructor(i){e(this,i),this.entrySelected=t(this,"entrySelected",7),this.endpoint=s.getDefault(),this.type="recent",this.options=void 0,this.emptyMessage="You do not have any starred searches.",this.authFailure=!1,this.title="Recent Searches",this.recent=[],this.saved=[],this.starred=[]}componentWillLoad(){this.endpoint.loadSession();const e=e=>{var t;console.warn("[Verdocs/search-activity] Error getting search data",e),401===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&(this.authFailure=!0)};switch(this.type){case"recent":this.title="Recent Searches",this.emptyMessage="You do not have any recent searches.",r(this.endpoint).then((e=>this.recent=e.recent)).catch(e);break;case"saved":this.title="Saved Searches",this.emptyMessage="You do not have any saved searches.",r(this.endpoint).then((e=>this.saved=e.saved)).catch(e);break;case"starred":this.title="My Starred items",this.emptyMessage="You do not have any starred templates.",o(this.endpoint,{is_starred:!0}).then((e=>this.starred=e)).catch(e)}}handleSelectEntry(e){this.entrySelected.emit(e)}computePagesText(e){return e<2?`${e} Page`:`${e} Pages`}computeRecipientsText(e){return"object"==typeof e?e.join(", "):e>1?`${e} Recipients`:`${e} Recipient`}render(){const e=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return i("div",{class:"container"},i("p",{class:"title"},this.title),i("div",{class:"items"},this.recent.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"},"Test"))))),this.saved.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"}))))),e&&i("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))}};a.style='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:#1e2031}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#cccccc}';const l=class{constructor(i){e(this,i),this.searchClicked=t(this,"searchClicked",7),this.typeChanged=t(this,"typeChanged",7),this.queryChanged=t(this,"queryChanged",7),this.endpoint=s.getDefault(),this.placeholder="Search envelopes, templates, organizations...",this.type="all",this.query="",this.grabsFocus=!1}async focusField(){this.inputEl.focus()}componentDidRender(){this.grabsFocus&&this.inputEl.focus()}handleSearch(e){return this.searchClicked.emit({type:this.type,query:this.query}),e.preventDefault(),!1}handleChange(e){this.queryChanged.emit(e.target.value)}handleClearFilter(){this.typeChanged.emit("all")}handleKeyUp(e){"Enter"===e.key&&this.searchClicked.emit({type:this.type,query:this.query})}render(){return i("form",{onSubmit:e=>this.handleSearch(e)},void 0!==this.type&&"all"!==this.type&&i("span",{class:"type"},this.type,"s ",i("button",{class:"remove",innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>',onClick:()=>this.handleClearFilter()})),i("input",{type:"text",value:this.query,placeholder:this.placeholder,onInput:e=>this.handleChange(e),onKeyUp:e=>this.handleKeyUp(e),ref:e=>this.inputEl=e}),i("button",{onClick:e=>this.handleSearch(e),class:"search"},i("span",{innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>'}),"Search"))}};l.style='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';export{n as verdocs_quick_functions,a as verdocs_search_activity,l as verdocs_search_box}
1
+ import{r as e,c as t,h as i}from"./p-e035df4b.js";import"./p-05788c2b.js";import{V as s}from"./p-c2c49441.js";import{a as o}from"./p-822ba467.js";var r=function(e){return t=void 0,i=void 0,o=function(){return function(e,t){var i,s,o,r,n={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(c){return function(a){return function(c){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,c[0]&&(n=0)),n;)try{if(i=1,s&&(o=2&c[0]?s.return:c[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,c[1])).done)return o;switch(s=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,s=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!((o=(o=n.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){n=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(6===c[0]&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],s=0}finally{i=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))},new((s=void 0)||(s=Promise))((function(e,r){function n(e){try{a(o.next(e))}catch(e){r(e)}}function c(e){try{a(o.throw(e))}catch(e){r(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,c)}a((o=o.apply(t,i||[])).next())}));var t,i,s,o};const n=class{constructor(i){e(this,i),this.createTemplate=t(this,"createTemplate",7),this.createDocument=t(this,"createDocument",7),this.endpoint=s.getDefault()}handleCreateTemplate(){this.createTemplate.emit()}handleCreateDocument(){this.createDocument.emit()}render(){return i("div",{class:"container"},i("p",{class:"title"},"Quick Create"),i("button",{onClick:()=>this.handleCreateTemplate(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>'},"Template"),i("button",{onClick:()=>this.handleCreateDocument(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>'},"Document"))}};n.style='verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}';const c='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>',a=class{constructor(i){e(this,i),this.entrySelected=t(this,"entrySelected",7),this.endpoint=s.getDefault(),this.type="recent",this.options=void 0,this.emptyMessage="You do not have any starred searches.",this.authFailure=!1,this.title="Recent Searches",this.recent=[],this.saved=[],this.starred=[]}componentWillLoad(){this.endpoint.loadSession();const e=e=>{var t;console.warn("[Verdocs/search-activity] Error getting search data",e),401===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&(this.authFailure=!0)};switch(this.type){case"recent":this.title="Recent Searches",this.emptyMessage="You do not have any recent searches.",r(this.endpoint).then((e=>this.recent=e.recent)).catch(e);break;case"saved":this.title="Saved Searches",this.emptyMessage="You do not have any saved searches.",r(this.endpoint).then((e=>this.saved=e.saved)).catch(e);break;case"starred":this.title="My Starred items",this.emptyMessage="You do not have any starred templates.",o(this.endpoint,{is_starred:!0}).then((e=>this.starred=e)).catch(e)}}handleSelectEntry(e){this.entrySelected.emit(e)}computePagesText(e){return e<2?`${e} Page`:`${e} Pages`}computeRecipientsText(e){return"object"==typeof e?e.join(", "):e>1?`${e} Recipients`:`${e} Recipient`}render(){const e=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return i("div",{class:"container"},i("p",{class:"title"},this.title),i("div",{class:"items"},this.recent.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"},"Test"))))),this.saved.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"}))))),e&&i("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))}};a.style='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:#1e2031}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#cccccc}';const l=class{constructor(i){e(this,i),this.searchClicked=t(this,"searchClicked",7),this.typeChanged=t(this,"typeChanged",7),this.queryChanged=t(this,"queryChanged",7),this.endpoint=s.getDefault(),this.placeholder="Search envelopes, templates, organizations...",this.type="all",this.query="",this.grabsFocus=!1}async focusField(){this.inputEl.focus()}componentDidRender(){this.grabsFocus&&this.inputEl.focus()}handleSearch(e){return this.searchClicked.emit({type:this.type,query:this.query}),e.preventDefault(),!1}handleChange(e){this.queryChanged.emit(e.target.value)}handleClearFilter(){this.typeChanged.emit("all")}handleKeyUp(e){"Enter"===e.key&&this.searchClicked.emit({type:this.type,query:this.query})}render(){return i("form",{onSubmit:e=>this.handleSearch(e)},void 0!==this.type&&"all"!==this.type&&i("span",{class:"type"},this.type,"s ",i("button",{class:"remove",innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>',onClick:()=>this.handleClearFilter()})),i("input",{type:"text",value:this.query,placeholder:this.placeholder,onInput:e=>this.handleChange(e),onKeyUp:e=>this.handleKeyUp(e),ref:e=>this.inputEl=e}),i("button",{onClick:e=>this.handleSearch(e),class:"search"},i("span",{innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>'}),"Search"))}};l.style='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';export{n as verdocs_quick_functions,a as verdocs_search_activity,l as verdocs_search_box}
@@ -1 +1 @@
1
- import{r as o,h as t,H as i}from"./p-e035df4b.js";import{c as r}from"./p-ec26fc38.js";const e=class{constructor(t){o(this,t),this.text="",this.icon="",this.placement="bottom",this.containerId=`verdocs-toolbar-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=r(this.iconEl,this.tooltip,{placement:this.placement,modifiers:"left"===this.placement?[{name:"offset",options:{offset:[0,20]}}]:[]})}disconnectedCallback(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}show(){var o,t;null===(o=this.tooltip)||void 0===o||o.setAttribute("data-show",""),null===(t=this.popperInstance)||void 0===t||t.update().catch((()=>{}))}hide(){var o;null===(o=this.tooltip)||void 0===o||o.removeAttribute("data-show")}render(){return t(i,{class:{}},t("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:o=>this.iconEl=o}),t("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:o=>this.tooltip=o},this.text,t("div",{"data-popper-arrow":"true",class:"arrow"})))}};e.style='verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';export{e as verdocs_toolbar_icon}
1
+ import{r as o,h as t,H as i}from"./p-e035df4b.js";import{c as r}from"./p-9d707f6e.js";const e=class{constructor(t){o(this,t),this.text="",this.icon="",this.placement="bottom",this.containerId=`verdocs-toolbar-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=r(this.iconEl,this.tooltip,{placement:this.placement,modifiers:"left"===this.placement?[{name:"offset",options:{offset:[0,20]}}]:[]})}disconnectedCallback(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}show(){var o,t;null===(o=this.tooltip)||void 0===o||o.setAttribute("data-show",""),null===(t=this.popperInstance)||void 0===t||t.update().catch((()=>{}))}hide(){var o;null===(o=this.tooltip)||void 0===o||o.removeAttribute("data-show")}render(){return t(i,{class:{}},t("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:o=>this.iconEl=o}),t("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:o=>this.tooltip=o},this.text,t("div",{"data-popper-arrow":"true",class:"arrow"})))}};e.style='verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';export{e as verdocs_toolbar_icon}
@@ -1 +1 @@
1
- import{r as e,c as s,h as t,H as i}from"./p-e035df4b.js";import"./p-05788c2b.js";import{V as o}from"./p-c2c49441.js";import{g as l}from"./p-c25d965d.js";import{S as r}from"./p-7a1b2643.js";import"./p-b86b362a.js";const n=class{constructor(t){e(this,t),this.sdkError=s(this,"sdkError",7),this.stepChanged=s(this,"stepChanged",7),this.fields=[],this.store=null,this.endpoint=o.getDefault(),this.templateId=null,this.step="create",this.pdfUrl=null,this.template=null}async componentWillLoad(){var e,s,t;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[BUILD] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[BUILD] Unable to start builder session, must be authenticated");this.step="roles",this.store=await l(this.endpoint,this.templateId,!0)}catch(i){console.log("[BUILD] Error loading template",i),null===(e=this.sdkError)||void 0===e||e.emit(new r(i.message,null===(s=i.response)||void 0===s?void 0:s.status,null===(t=i.response)||void 0===t?void 0:t.data))}}handleCancel(e){var s;console.log("Cancel",e.detail),this.step="",null===(s=this.stepChanged)||void 0===s||s.emit("")}handleTemplateCreated(e){var s;console.log("Created",e.detail),this.step="roles",null===(s=this.stepChanged)||void 0===s||s.emit("roles")}handleRolesDone(e){var s;console.log("Roles",e.detail),this.step="fields",null===(s=this.stepChanged)||void 0===s||s.emit("fields")}render(){return this.endpoint.session?t(i,null,"create"===this.step&&t("verdocs-template-create",{onExit:e=>this.handleCancel(e),onNext:e=>this.handleTemplateCreated(e)}),"roles"===this.step&&t("verdocs-template-roles",{onExit:e=>this.handleCancel(e),onNext:e=>this.handleTemplateCreated(e)}),"fields"===this.step&&t("verdocs-template-fields",null)):t(i,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};n.style='verdocs-build{display:-ms-flexbox;display:flex;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}';export{n as verdocs_build}
1
+ import{r as e,c as s,h as t,H as i}from"./p-e035df4b.js";import"./p-05788c2b.js";import{V as o}from"./p-c2c49441.js";import{g as l}from"./p-2fc46a8b.js";import{S as r}from"./p-7a1b2643.js";import"./p-822ba467.js";const n=class{constructor(t){e(this,t),this.sdkError=s(this,"sdkError",7),this.stepChanged=s(this,"stepChanged",7),this.fields=[],this.store=null,this.endpoint=o.getDefault(),this.templateId=null,this.step="create",this.pdfUrl=null,this.template=null}async componentWillLoad(){var e,s,t;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[BUILD] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[BUILD] Unable to start builder session, must be authenticated");this.step="roles",this.store=await l(this.endpoint,this.templateId,!0)}catch(i){console.log("[BUILD] Error loading template",i),null===(e=this.sdkError)||void 0===e||e.emit(new r(i.message,null===(s=i.response)||void 0===s?void 0:s.status,null===(t=i.response)||void 0===t?void 0:t.data))}}handleCancel(e){var s;console.log("Cancel",e.detail),this.step="",null===(s=this.stepChanged)||void 0===s||s.emit("")}handleTemplateCreated(e){var s;console.log("Created",e.detail),this.step="roles",null===(s=this.stepChanged)||void 0===s||s.emit("roles")}handleRolesDone(e){var s;console.log("Roles",e.detail),this.step="fields",null===(s=this.stepChanged)||void 0===s||s.emit("fields")}render(){return this.endpoint.session?t(i,null,"create"===this.step&&t("verdocs-template-create",{onExit:e=>this.handleCancel(e),onNext:e=>this.handleTemplateCreated(e)}),"roles"===this.step&&t("verdocs-template-roles",{onExit:e=>this.handleCancel(e),onNext:e=>this.handleTemplateCreated(e)}),"fields"===this.step&&t("verdocs-template-fields",null)):t(i,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};n.style='verdocs-build{display:-ms-flexbox;display:flex;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}';export{n as verdocs_build}
@@ -1 +1 @@
1
- import{r as e,c as i,h as s,H as o}from"./p-e035df4b.js";import"./p-05788c2b.js";import{V as t}from"./p-c2c49441.js";import{i as l,a as n}from"./p-e662f81b.js";import{g as d}from"./p-6de76553.js";import{g as a}from"./p-c25d965d.js";import{a as r}from"./p-1abcf29d.js";import{S as c}from"./p-7a1b2643.js";import"./p-b86b362a.js";import"./p-eab67c09.js";import"./p-b3ec6306.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const p='<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>',v=class{constructor(s){e(this,s),this.send=i(this,"send",7),this.exit=i(this,"exit",7),this.sdkError=i(this,"sdkError",7),this.searchContacts=i(this,"searchContacts",7),this.levels=[],this.store=null,this.endpoint=t.getDefault(),this.templateId=null,this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`,this.rolesAtLevel={},this.showPickerForId="",this.sessionContacts=[],this.rolesCompleted={}}async reset(){this.rolesCompleted={}}async componentWillLoad(){var e,i,s,o,t,l,n,d,r,p;try{const d=this.endpoint.loadSession();if(!this.templateId)return void console.log(`[SEND] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[SEND] Unable to start builder session, must be authenticated");if(this.store=await a(this.endpoint,this.templateId,!0),(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.is_sendable)||console.warn("[SEND] Template is not sendable",this.templateId),null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.roles){const e={};this.rolesCompleted={},null===(l=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===l||l.roles.forEach((i=>{const s=i.sequence-1;e[s]||(e[s]=[]);const o=`r-${s}-${e[s].length}`;e[s].push({...i,id:o})})),this.rolesAtLevel=e,this.levels=Object.keys(e).map((e=>+e)),this.levels.sort(((e,i)=>e-i))}(null===(n=null==d?void 0:d.session)||void 0===n?void 0:n.profile)&&this.sessionContacts.push({id:d.session.profile.id,name:`${d.session.profile.first_name} ${d.session.profile.last_name}`,email:d.session.profile.email,phone:d.session.profile.phone})}catch(e){console.log("[SEND] Error with preview session",e),null===(d=this.sdkError)||void 0===d||d.emit(new c(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(p=e.response)||void 0===p?void 0:p.data))}}getLevelIcon(e){return s("div",e<0?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}:e>=this.levels.length?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}:{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'})}handleSelectContact(e,i){e.preventDefault(),this.rolesCompleted[i.id]={...i,...e.detail},this.showPickerForId=""}handleClickRole(e,i){e.stopPropagation(),this.showPickerForId=i.id}handleSend(e){var i,s,o;e.stopPropagation(),null===(i=this.send)||void 0===i||i.emit({roles:Object.values(this.rolesCompleted),name:null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.name,template_id:this.templateId})}handleCancel(e){var i;e.stopPropagation(),null===(i=this.exit)||void 0===i||i.emit()}render(){var e,i,t,a;const c=((null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.roles)||[]).map((e=>e.name))||[],v=Object.values(this.rolesCompleted).filter((e=>l(e.email)||n(e.phone))).length>=c.length;return s(o,{class:{sendable:null===(a=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===a?void 0:a.is_sendable}},s("div",{class:"recipients"},s("div",{class:"left-line"}),s("div",{class:"level level-start"},this.getLevelIcon(-1),s("div",{class:"complete"},"Send Envelope")),this.levels.map((e=>s("div",{class:`level level-${e}`},this.getLevelIcon(e),this.rolesAtLevel[e].map((e=>{var i,o,t,l,n,a;return e.email?s("div",{class:"recipient",style:{borderColor:d(r(c,e.name))},onClick:i=>this.handleClickRole(i,e)},null!==(n=null===(l=this.rolesCompleted[e.id])||void 0===l?void 0:l.full_name)&&void 0!==n?n:e.full_name,s("div",{class:"icon",innerHTML:p}),this.showPickerForId===e.id&&s("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:i=>this.handleSelectContact(i,e),contactSuggestions:this.sessionContacts,templateRole:null!==(a=this.rolesCompleted[e.id])&&void 0!==a?a:e,onSearchContacts:e=>{var i;return null===(i=this.searchContacts)||void 0===i?void 0:i.emit(e.detail)}})):s("div",{class:"recipient",style:{backgroundColor:d(r(c,e.name))},onClick:i=>this.handleClickRole(i,e)},null!==(o=null===(i=this.rolesCompleted[e.id])||void 0===i?void 0:i.full_name)&&void 0!==o?o:e.name,s("div",{class:"icon",innerHTML:p}),this.showPickerForId===e.id&&s("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:i=>this.handleSelectContact(i,e),contactSuggestions:this.sessionContacts,templateRole:null!==(t=this.rolesCompleted[e.id])&&void 0!==t?t:e,onSearchContacts:e=>{var i;return null===(i=this.searchContacts)||void 0===i?void 0:i.emit(e.detail)}}))}))))),s("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),s("div",{class:"complete"},"Signing Complete"))),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e)}),s("verdocs-button",{label:"Send",size:"small",disabled:!v,onClick:e=>this.handleSend(e)})))}};v.style='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';export{v as verdocs_send}
1
+ import{r as e,c as i,h as s,H as o}from"./p-e035df4b.js";import"./p-05788c2b.js";import{V as t}from"./p-c2c49441.js";import{i as l,a as n}from"./p-e662f81b.js";import{g as d}from"./p-6de76553.js";import{g as a}from"./p-2fc46a8b.js";import{a as r}from"./p-1abcf29d.js";import{S as c}from"./p-7a1b2643.js";import"./p-822ba467.js";import"./p-eab67c09.js";import"./p-b3ec6306.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const p='<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>',v=class{constructor(s){e(this,s),this.send=i(this,"send",7),this.exit=i(this,"exit",7),this.sdkError=i(this,"sdkError",7),this.searchContacts=i(this,"searchContacts",7),this.levels=[],this.store=null,this.endpoint=t.getDefault(),this.templateId=null,this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`,this.rolesAtLevel={},this.showPickerForId="",this.sessionContacts=[],this.rolesCompleted={}}async reset(){this.rolesCompleted={}}async componentWillLoad(){var e,i,s,o,t,l,n,d,r,p;try{const d=this.endpoint.loadSession();if(!this.templateId)return void console.log(`[SEND] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[SEND] Unable to start builder session, must be authenticated");if(this.store=await a(this.endpoint,this.templateId,!0),(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.is_sendable)||console.warn("[SEND] Template is not sendable",this.templateId),null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.roles){const e={};this.rolesCompleted={},null===(l=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===l||l.roles.forEach((i=>{const s=i.sequence-1;e[s]||(e[s]=[]);const o=`r-${s}-${e[s].length}`;e[s].push({...i,id:o})})),this.rolesAtLevel=e,this.levels=Object.keys(e).map((e=>+e)),this.levels.sort(((e,i)=>e-i))}(null===(n=null==d?void 0:d.session)||void 0===n?void 0:n.profile)&&this.sessionContacts.push({id:d.session.profile.id,name:`${d.session.profile.first_name} ${d.session.profile.last_name}`,email:d.session.profile.email,phone:d.session.profile.phone})}catch(e){console.log("[SEND] Error with preview session",e),null===(d=this.sdkError)||void 0===d||d.emit(new c(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(p=e.response)||void 0===p?void 0:p.data))}}getLevelIcon(e){return s("div",e<0?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}:e>=this.levels.length?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}:{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'})}handleSelectContact(e,i){e.preventDefault(),this.rolesCompleted[i.id]={...i,...e.detail},this.showPickerForId=""}handleClickRole(e,i){e.stopPropagation(),this.showPickerForId=i.id}handleSend(e){var i,s,o;e.stopPropagation(),null===(i=this.send)||void 0===i||i.emit({roles:Object.values(this.rolesCompleted),name:null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.name,template_id:this.templateId})}handleCancel(e){var i;e.stopPropagation(),null===(i=this.exit)||void 0===i||i.emit()}render(){var e,i,t,a;const c=((null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.roles)||[]).map((e=>e.name))||[],v=Object.values(this.rolesCompleted).filter((e=>l(e.email)||n(e.phone))).length>=c.length;return s(o,{class:{sendable:null===(a=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===a?void 0:a.is_sendable}},s("div",{class:"recipients"},s("div",{class:"left-line"}),s("div",{class:"level level-start"},this.getLevelIcon(-1),s("div",{class:"complete"},"Send Envelope")),this.levels.map((e=>s("div",{class:`level level-${e}`},this.getLevelIcon(e),this.rolesAtLevel[e].map((e=>{var i,o,t,l,n,a;return e.email?s("div",{class:"recipient",style:{borderColor:d(r(c,e.name))},onClick:i=>this.handleClickRole(i,e)},null!==(n=null===(l=this.rolesCompleted[e.id])||void 0===l?void 0:l.full_name)&&void 0!==n?n:e.full_name,s("div",{class:"icon",innerHTML:p}),this.showPickerForId===e.id&&s("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:i=>this.handleSelectContact(i,e),contactSuggestions:this.sessionContacts,templateRole:null!==(a=this.rolesCompleted[e.id])&&void 0!==a?a:e,onSearchContacts:e=>{var i;return null===(i=this.searchContacts)||void 0===i?void 0:i.emit(e.detail)}})):s("div",{class:"recipient",style:{backgroundColor:d(r(c,e.name))},onClick:i=>this.handleClickRole(i,e)},null!==(o=null===(i=this.rolesCompleted[e.id])||void 0===i?void 0:i.full_name)&&void 0!==o?o:e.name,s("div",{class:"icon",innerHTML:p}),this.showPickerForId===e.id&&s("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:i=>this.handleSelectContact(i,e),contactSuggestions:this.sessionContacts,templateRole:null!==(t=this.rolesCompleted[e.id])&&void 0!==t?t:e,onSearchContacts:e=>{var i;return null===(i=this.searchContacts)||void 0===i?void 0:i.emit(e.detail)}}))}))))),s("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),s("div",{class:"complete"},"Signing Complete"))),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e)}),s("verdocs-button",{label:"Send",size:"small",disabled:!v,onClick:e=>this.handleSend(e)})))}};v.style='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';export{v as verdocs_send}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as s}from"./p-e035df4b.js";import"./p-05788c2b.js";import{u as o,d as l}from"./p-8027431e.js";import{V as n,T as r}from"./p-c2c49441.js";import{g as a}from"./p-c25d965d.js";import{S as d}from"./p-7a1b2643.js";import{u as p}from"./p-b86b362a.js";const c=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.delete=t(this,"delete",7),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=n.getDefault(),this.templateId="",this.roleName="",this.sender=r.EVERYONE,this.dirty=!1,this.saving=!1,this.name="",this.type="signer",this.fullName="",this.email="",this.phone="",this.allowDelegation=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLE_PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLE_PROPERTIES] Unable to start builder session, must be authenticated");this.store=await a(this.endpoint,this.templateId,!1);const i=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles.find((e=>e.name===this.roleName));i&&(this.name=i.name,this.type=i.type,this.fullName=i.full_name,this.email=i.email,this.phone=i.phone,this.allowDelegation=i.delegator,console.log("Got role",i))}catch(e){console.log("[TEMPLATE ROLE PROPERTIES] Error with preview session",e),null===(i=this.sdkError)||void 0===i||i.emit(new d(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.name=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,this.dirty=!1,null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){e.stopPropagation(),this.saving=!0,o(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,full_name:this.fullName,email:this.email,phone:this.phone,delegator:this.allowDelegation}).then((e=>{var t;console.log("Update result",e),this.saving=!1,this.dirty=!1;const i=[...this.store.state.roles];i.forEach((e=>{e.name===this.roleName&&(e.name=this.name,e.type=this.type,e.full_name=this.fullName,e.email=this.email,e.phone=this.phone,e.delegator=this.allowDelegation)})),this.store.state.roles=i,null===(t=this.close)||void 0===t||t.emit()})).catch((e=>{console.log("Update error",e),this.saving=!1}))}async handleDelete(e){e.stopPropagation(),window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")&&l(this.endpoint,this.templateId,this.roleName).then((e=>{var t;console.log("Role deleted",e),this.store.state.roles=[...this.store.state.roles.filter((e=>e.name!==this.roleName))],null===(t=this.delete)||void 0===t||t.emit({templateId:this.templateId,roleName:this.roleName})})).catch((e=>{console.log("Deletion error",e)}))}render(){return i(s,null,i("div",{class:"background-overlay",onClick:e=>this.handleCancel(e)},i("div",{class:"dialog"},i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("verdocs-text-input",{id:"verdocs-recipient-name",label:"Role Name",value:this.name,autocomplete:"off",helpText:"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Template Name...",onInput:e=>{this.name=e.target.value,this.dirty=!0}}),i("div",{class:"row"},i("div",{class:"input-label"},"Type:"),i("verdocs-select-input",{value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:e=>{this.type=e.target.value,this.dirty=!0}}),i("verdocs-help-icon",{text:"Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review."})),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Full Name",value:this.fullName,autocomplete:"off",helpText:"The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Full Name...",onInput:e=>{this.fullName=e.target.value,this.dirty=!0}}),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Email",value:this.email,autocomplete:"off",helpText:"The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Email Address...",onInput:e=>{this.email=e.target.value,this.dirty=!0}}),i("verdocs-text-input",{id:"verdocs-recipient-phone",label:"Phone",value:this.phone,autocomplete:"off",helpText:"The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Phone Number...",onInput:e=>{this.phone=e.target.value,this.dirty=!0}}),i("div",{class:"row"},i("div",{class:"input-label"},"May Delegate:"),i("div",{class:"checkbox-wrapper"},i("verdocs-checkbox",{checked:this.allowDelegation,onInput:e=>{this.allowDelegation=e.target.checked,this.dirty=!0}})),i("verdocs-help-icon",{text:"If enabled, this recipient may delegate their actions to another individual."})),i("div",{class:"buttons"},i("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>'}),i("div",{style:{flex:"1"}}),i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))))))}};c.style='verdocs-template-role-properties{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}';const h=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=n.getDefault(),this.templateId="",this.sender=r.EVERYONE,this.saving=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[SENDER] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[SENDER] Unable to start builder session, must be authenticated");this.store=await a(this.endpoint,this.templateId,!1),this.sender=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.sender}catch(e){console.log("[SENDER] Error with preview session",e),null===(i=this.sdkError)||void 0===i||i.emit(new d(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleClose(){this.close.emit()}handleDismiss(e){"background-overlay"===e.target.className&&(e.preventDefault(),this.handleClose())}async handleSelectSetting(e){this.saving=!0,p(this.endpoint,this.templateId,{sender:e}).then((t=>{var i;console.log("Update result",t),(null===(i=this.store)||void 0===i?void 0:i.state)&&(this.store.state.sender=e),this.saving=!1,this.sender=e})).catch((e=>{console.log("Error saving",e),this.saving=!1}))}render(){return i(s,null,i("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},i("div",{class:"dialog"},i("div",{class:"options"},i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:r.EVERYONE,checked:this.sender===r.EVERYONE,onInput:()=>this.handleSelectSetting(r.EVERYONE)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web"),i("verdocs-help-icon",{text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:r.EVERYONE_AS_CREATOR,checked:this.sender===r.EVERYONE_AS_CREATOR,onInput:()=>this.handleSelectSetting(r.EVERYONE_AS_CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web as me"),i("verdocs-help-icon",{text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:r.ORGANIZATION_MEMBER,checked:this.sender===r.ORGANIZATION_MEMBER,onInput:()=>this.handleSelectSetting(r.ORGANIZATION_MEMBER)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:r.ORGANIZATION_MEMBER_AS_CREATOR,checked:this.sender===r.ORGANIZATION_MEMBER_AS_CREATOR,onInput:()=>this.handleSelectSetting(r.ORGANIZATION_MEMBER_AS_CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization as me"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:r.CREATOR,checked:this.sender===r.CREATOR,onInput:()=>this.handleSelectSetting(r.CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Me"),i("verdocs-help-icon",{text:"Only I can use this template."})))),i("div",{class:"buttons"},i("verdocs-button",{label:"Close",onClick:()=>this.handleClose()})))))}};h.style='verdocs-template-sender{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';export{c as verdocs_template_role_properties,h as verdocs_template_sender}
1
+ import{r as e,c as t,h as i,H as s}from"./p-e035df4b.js";import"./p-05788c2b.js";import{u as o,d as l}from"./p-8027431e.js";import{V as n,T as r}from"./p-c2c49441.js";import{g as a}from"./p-2fc46a8b.js";import{S as d}from"./p-7a1b2643.js";import{u as p}from"./p-822ba467.js";const c=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.delete=t(this,"delete",7),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=n.getDefault(),this.templateId="",this.roleName="",this.sender=r.EVERYONE,this.dirty=!1,this.saving=!1,this.name="",this.type="signer",this.fullName="",this.email="",this.phone="",this.allowDelegation=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLE_PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLE_PROPERTIES] Unable to start builder session, must be authenticated");this.store=await a(this.endpoint,this.templateId,!1);const i=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles.find((e=>e.name===this.roleName));i&&(this.name=i.name,this.type=i.type,this.fullName=i.full_name,this.email=i.email,this.phone=i.phone,this.allowDelegation=i.delegator,console.log("Got role",i))}catch(e){console.log("[TEMPLATE ROLE PROPERTIES] Error with preview session",e),null===(i=this.sdkError)||void 0===i||i.emit(new d(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.name=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,this.dirty=!1,null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){e.stopPropagation(),this.saving=!0,o(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,full_name:this.fullName,email:this.email,phone:this.phone,delegator:this.allowDelegation}).then((e=>{var t;console.log("Update result",e),this.saving=!1,this.dirty=!1;const i=[...this.store.state.roles];i.forEach((e=>{e.name===this.roleName&&(e.name=this.name,e.type=this.type,e.full_name=this.fullName,e.email=this.email,e.phone=this.phone,e.delegator=this.allowDelegation)})),this.store.state.roles=i,null===(t=this.close)||void 0===t||t.emit()})).catch((e=>{console.log("Update error",e),this.saving=!1}))}async handleDelete(e){e.stopPropagation(),window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")&&l(this.endpoint,this.templateId,this.roleName).then((e=>{var t;console.log("Role deleted",e),this.store.state.roles=[...this.store.state.roles.filter((e=>e.name!==this.roleName))],null===(t=this.delete)||void 0===t||t.emit({templateId:this.templateId,roleName:this.roleName})})).catch((e=>{console.log("Deletion error",e)}))}render(){return i(s,null,i("div",{class:"background-overlay",onClick:e=>this.handleCancel(e)},i("div",{class:"dialog"},i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("verdocs-text-input",{id:"verdocs-recipient-name",label:"Role Name",value:this.name,autocomplete:"off",helpText:"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Template Name...",onInput:e=>{this.name=e.target.value,this.dirty=!0}}),i("div",{class:"row"},i("div",{class:"input-label"},"Type:"),i("verdocs-select-input",{value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:e=>{this.type=e.target.value,this.dirty=!0}}),i("verdocs-help-icon",{text:"Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review."})),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Full Name",value:this.fullName,autocomplete:"off",helpText:"The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Full Name...",onInput:e=>{this.fullName=e.target.value,this.dirty=!0}}),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Email",value:this.email,autocomplete:"off",helpText:"The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Email Address...",onInput:e=>{this.email=e.target.value,this.dirty=!0}}),i("verdocs-text-input",{id:"verdocs-recipient-phone",label:"Phone",value:this.phone,autocomplete:"off",helpText:"The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Phone Number...",onInput:e=>{this.phone=e.target.value,this.dirty=!0}}),i("div",{class:"row"},i("div",{class:"input-label"},"May Delegate:"),i("div",{class:"checkbox-wrapper"},i("verdocs-checkbox",{checked:this.allowDelegation,onInput:e=>{this.allowDelegation=e.target.checked,this.dirty=!0}})),i("verdocs-help-icon",{text:"If enabled, this recipient may delegate their actions to another individual."})),i("div",{class:"buttons"},i("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>'}),i("div",{style:{flex:"1"}}),i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))))))}};c.style='verdocs-template-role-properties{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}';const h=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=n.getDefault(),this.templateId="",this.sender=r.EVERYONE,this.saving=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[SENDER] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[SENDER] Unable to start builder session, must be authenticated");this.store=await a(this.endpoint,this.templateId,!1),this.sender=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.sender}catch(e){console.log("[SENDER] Error with preview session",e),null===(i=this.sdkError)||void 0===i||i.emit(new d(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleClose(){this.close.emit()}handleDismiss(e){"background-overlay"===e.target.className&&(e.preventDefault(),this.handleClose())}async handleSelectSetting(e){this.saving=!0,p(this.endpoint,this.templateId,{sender:e}).then((t=>{var i;console.log("Update result",t),(null===(i=this.store)||void 0===i?void 0:i.state)&&(this.store.state.sender=e),this.saving=!1,this.sender=e})).catch((e=>{console.log("Error saving",e),this.saving=!1}))}render(){return i(s,null,i("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},i("div",{class:"dialog"},i("div",{class:"options"},i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:r.EVERYONE,checked:this.sender===r.EVERYONE,onInput:()=>this.handleSelectSetting(r.EVERYONE)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web"),i("verdocs-help-icon",{text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:r.EVERYONE_AS_CREATOR,checked:this.sender===r.EVERYONE_AS_CREATOR,onInput:()=>this.handleSelectSetting(r.EVERYONE_AS_CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web as me"),i("verdocs-help-icon",{text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:r.ORGANIZATION_MEMBER,checked:this.sender===r.ORGANIZATION_MEMBER,onInput:()=>this.handleSelectSetting(r.ORGANIZATION_MEMBER)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:r.ORGANIZATION_MEMBER_AS_CREATOR,checked:this.sender===r.ORGANIZATION_MEMBER_AS_CREATOR,onInput:()=>this.handleSelectSetting(r.ORGANIZATION_MEMBER_AS_CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization as me"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:r.CREATOR,checked:this.sender===r.CREATOR,onInput:()=>this.handleSelectSetting(r.CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Me"),i("verdocs-help-icon",{text:"Only I can use this template."})))),i("div",{class:"buttons"},i("verdocs-button",{label:"Close",onClick:()=>this.handleClose()})))))}};h.style='verdocs-template-sender{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';export{c as verdocs_template_role_properties,h as verdocs_template_sender}
@@ -1 +1 @@
1
- System.register(["./p-871407e9.system.js","./p-e12b7fbc.system.js"],(function(o){"use strict";var t,e,i,r;return{setters:[function(o){t=o.r;e=o.h;i=o.H},function(o){r=o.c}],execute:function(){var n='verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var p=o("verdocs_toolbar_icon",function(){function o(o){t(this,o);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}o.prototype.componentDidLoad=function(){this.popperInstance=r(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};o.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};o.prototype.show=function(){var o,t;(o=this.tooltip)===null||o===void 0?void 0:o.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};o.prototype.hide=function(){var o;(o=this.tooltip)===null||o===void 0?void 0:o.removeAttribute("data-show")};o.prototype.render=function(){var o=this;return e(i,{class:{}},e("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return o.show()},onFocus:function(){return o.show()},onMouseLeave:function(){return o.hide()},onBlur:function(){return o.hide()},ref:function(t){return o.iconEl=t}}),e("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return o.tooltip=t}},this.text,e("div",{"data-popper-arrow":"true",class:"arrow"})))};return o}());p.style=n}}}));
1
+ System.register(["./p-871407e9.system.js","./p-5e0c6e7c.system.js"],(function(o){"use strict";var t,e,i,r;return{setters:[function(o){t=o.r;e=o.h;i=o.H},function(o){r=o.c}],execute:function(){var n='verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var p=o("verdocs_toolbar_icon",function(){function o(o){t(this,o);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}o.prototype.componentDidLoad=function(){this.popperInstance=r(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};o.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};o.prototype.show=function(){var o,t;(o=this.tooltip)===null||o===void 0?void 0:o.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};o.prototype.hide=function(){var o;(o=this.tooltip)===null||o===void 0?void 0:o.removeAttribute("data-show")};o.prototype.render=function(){var o=this;return e(i,{class:{}},e("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return o.show()},onFocus:function(){return o.show()},onMouseLeave:function(){return o.hide()},onBlur:function(){return o.hide()},ref:function(t){return o.iconEl=t}}),e("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return o.tooltip=t}},this.text,e("div",{"data-popper-arrow":"true",class:"arrow"})))};return o}());p.style=n}}}));
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as s}from"./p-e035df4b.js";import"./p-05788c2b.js";import{V as r}from"./p-c2c49441.js";import{g as o}from"./p-c25d965d.js";import{S as l}from"./p-7a1b2643.js";import"./p-b86b362a.js";const n=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=r.getDefault(),this.templateId="",this.showPlanBlocker=!1,this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1",this.dirty=!1}async componentWillLoad(){var e,t,i,s,r;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await o(this.endpoint,this.templateId,!0),this.sendReminders=!!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.reminder_id),this.dirty=!1}catch(e){console.log("[TEMPLATE REMINDERS] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new l(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(r=e.response)||void 0===r?void 0:r.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.sendReminders=!!(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id),this.dirty=!1,null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s,r,o,l,n,a;if(e.stopPropagation(),this.sendReminders){const e={setup_time:864e5*+this.firstReminderDays,interval_time:864e5*+this.reminderDays};(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id)?await function(e,t,i,s){return e.api.put("/templates/".concat(t,"/reminder/").concat(i),s).then((function(e){return e.data}))}(this.endpoint,this.templateId,null===(s=this.store)||void 0===s?void 0:s.state.reminder_id,e):await function(e,t,i){return e.api.post("/templates/".concat(t,"/reminder/"),i).then((function(e){return e.data}))}(this.endpoint,this.templateId,e)}else await(l=this.endpoint,n=this.templateId,a=null===(r=this.store)||void 0===r?void 0:r.state.reminder_id,l.api.delete("/templates/".concat(n,"/reminder/").concat(a)).then((function(e){return e.data})));this.dirty=!1,null===(o=this.close)||void 0===o||o.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Reminders"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),i("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>{this.showPlanBlocker=!0,e.target.checked=!1}})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),i("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:e=>this.firstReminderDays=e.target.value,disabled:!this.sendReminders})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),i("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:e=>this.reminderDays=e.target.value,disabled:!this.sendReminders})),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))),this.showPlanBlocker&&i("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:()=>this.showPlanBlocker=!1})):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};n.style='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';export{n as verdocs_template_reminders}
1
+ import{r as e,c as t,h as i,H as s}from"./p-e035df4b.js";import"./p-05788c2b.js";import{V as r}from"./p-c2c49441.js";import{g as o}from"./p-2fc46a8b.js";import{S as l}from"./p-7a1b2643.js";import"./p-822ba467.js";const n=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=r.getDefault(),this.templateId="",this.showPlanBlocker=!1,this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1",this.dirty=!1}async componentWillLoad(){var e,t,i,s,r;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await o(this.endpoint,this.templateId,!0),this.sendReminders=!!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.reminder_id),this.dirty=!1}catch(e){console.log("[TEMPLATE REMINDERS] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new l(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(r=e.response)||void 0===r?void 0:r.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.sendReminders=!!(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id),this.dirty=!1,null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s,r,o,l,n,a;if(e.stopPropagation(),this.sendReminders){const e={setup_time:864e5*+this.firstReminderDays,interval_time:864e5*+this.reminderDays};(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id)?await function(e,t,i,s){return e.api.put("/templates/".concat(t,"/reminder/").concat(i),s).then((function(e){return e.data}))}(this.endpoint,this.templateId,null===(s=this.store)||void 0===s?void 0:s.state.reminder_id,e):await function(e,t,i){return e.api.post("/templates/".concat(t,"/reminder/"),i).then((function(e){return e.data}))}(this.endpoint,this.templateId,e)}else await(l=this.endpoint,n=this.templateId,a=null===(r=this.store)||void 0===r?void 0:r.state.reminder_id,l.api.delete("/templates/".concat(n,"/reminder/").concat(a)).then((function(e){return e.data})));this.dirty=!1,null===(o=this.close)||void 0===o||o.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Reminders"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),i("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>{this.showPlanBlocker=!0,e.target.checked=!1}})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),i("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:e=>this.firstReminderDays=e.target.value,disabled:!this.sendReminders})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),i("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:e=>this.reminderDays=e.target.value,disabled:!this.sendReminders})),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))),this.showPlanBlocker&&i("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:()=>this.showPlanBlocker=!1})):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};n.style='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';export{n as verdocs_template_reminders}
@@ -0,0 +1 @@
1
+ var t="top",n="bottom",e="right",r="left",o=[t,n,e,r],i=o.reduce((function(t,n){return t.concat([n+"-start",n+"-end"])}),[]),u=[].concat(o,["auto"]).reduce((function(t,n){return t.concat([n,n+"-start",n+"-end"])}),[]),a=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function f(t){return t?(t.nodeName||"").toLowerCase():null}function c(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function d(t){return t instanceof c(t).Element||t instanceof Element}function p(t){return t instanceof c(t).HTMLElement||t instanceof HTMLElement}function s(t){return"undefined"!=typeof ShadowRoot&&(t instanceof c(t).ShadowRoot||t instanceof ShadowRoot)}function l(t){return t.split("-")[0]}var v=Math.max,b=Math.min,h=Math.round;function y(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function m(){return!/^((?!chrome|android).)*safari/i.test(y())}function x(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t.getBoundingClientRect(),o=1,i=1;n&&p(t)&&(o=t.offsetWidth>0&&h(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&h(r.height)/t.offsetHeight||1);var u=(d(t)?c(t):window).visualViewport,a=!m()&&e,f=(r.left+(a&&u?u.offsetLeft:0))/o,s=(r.top+(a&&u?u.offsetTop:0))/i,l=r.width/o,v=r.height/i;return{width:l,height:v,top:s,right:f+l,bottom:s+v,left:f,x:f,y:s}}function w(t){var n=x(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function O(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&s(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function g(t){return c(t).getComputedStyle(t)}function j(t){return["table","td","th"].indexOf(f(t))>=0}function M(t){return((d(t)?t.ownerDocument:t.document)||window.document).documentElement}function k(t){return"html"===f(t)?t:t.assignedSlot||t.parentNode||(s(t)?t.host:null)||M(t)}function A(t){return p(t)&&"fixed"!==g(t).position?t.offsetParent:null}function E(t){for(var n=c(t),e=A(t);e&&j(e)&&"static"===g(e).position;)e=A(e);return e&&("html"===f(e)||"body"===f(e)&&"static"===g(e).position)?n:e||function(t){var n=/firefox/i.test(y());if(/Trident/i.test(y())&&p(t)&&"fixed"===g(t).position)return null;var e=k(t);for(s(e)&&(e=e.host);p(e)&&["html","body"].indexOf(f(e))<0;){var r=g(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function q(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function B(t,n,e){return v(t,b(n,e))}function P(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function R(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function S(t){return t.split("-")[1]}var W={top:"auto",right:"auto",bottom:"auto",left:"auto"};function L(o){var i,u=o.popper,a=o.popperRect,f=o.placement,d=o.variation,p=o.offsets,s=o.position,l=o.gpuAcceleration,v=o.adaptive,b=o.roundOffsets,y=o.isFixed,m=p.x,x=void 0===m?0:m,w=p.y,O=void 0===w?0:w,j="function"==typeof b?b({x,y:O}):{x,y:O};x=j.x,O=j.y;var k=p.hasOwnProperty("x"),A=p.hasOwnProperty("y"),q=r,B=t,P=window;if(v){var R=E(u),S="clientHeight",L="clientWidth";R===c(u)&&"static"!==g(R=M(u)).position&&"absolute"===s&&(S="scrollHeight",L="scrollWidth"),R=R,(f===t||(f===r||f===e)&&"end"===d)&&(B=n,O-=(y&&R===P&&P.visualViewport?P.visualViewport.height:R[S])-a.height,O*=l?1:-1),f!==r&&(f!==t&&f!==n||"end"!==d)||(q=e,x-=(y&&R===P&&P.visualViewport?P.visualViewport.width:R[L])-a.width,x*=l?1:-1)}var T,H=Object.assign({position:s},v&&W),I=!0===b?function(t,n){var e=t.y,r=n.devicePixelRatio||1;return{x:h(t.x*r)/r||0,y:h(e*r)/r||0}}({x,y:O},c(u)):{x,y:O};return x=I.x,O=I.y,Object.assign({},H,l?((T={})[B]=A?"0":"",T[q]=k?"0":"",T.transform=(P.devicePixelRatio||1)<=1?"translate("+x+"px, "+O+"px)":"translate3d("+x+"px, "+O+"px, 0)",T):((i={})[B]=A?O+"px":"",i[q]=k?x+"px":"",i.transform="",i))}var T={passive:!0},H={left:"right",right:"left",bottom:"top",top:"bottom"};function I(t){return t.replace(/left|right|bottom|top/g,(function(t){return H[t]}))}var z={start:"end",end:"start"};function C(t){return t.replace(/start|end/g,(function(t){return z[t]}))}function D(t){var n=c(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function F(t){return x(M(t)).left+D(t).scrollLeft}function U(t){var n=g(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function V(t){return["html","body","#document"].indexOf(f(t))>=0?t.ownerDocument.body:p(t)&&U(t)?t:V(k(t))}function _(t,n){var e;void 0===n&&(n=[]);var r=V(t),o=r===(null==(e=t.ownerDocument)?void 0:e.body),i=c(r),u=o?[i].concat(i.visualViewport||[],U(r)?r:[]):r,a=n.concat(u);return o?a:a.concat(_(k(u)))}function G(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function J(t,n,e){return"viewport"===n?G(function(t,n){var e=c(t),r=M(t),o=e.visualViewport,i=r.clientWidth,u=r.clientHeight,a=0,f=0;if(o){i=o.width,u=o.height;var d=m();(d||!d&&"fixed"===n)&&(a=o.offsetLeft,f=o.offsetTop)}return{width:i,height:u,x:a+F(t),y:f}}(t,e)):d(n)?function(t,n){var e=x(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):G(function(t){var n,e=M(t),r=D(t),o=null==(n=t.ownerDocument)?void 0:n.body,i=v(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),u=v(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+F(t),f=-r.scrollTop;return"rtl"===g(o||e).direction&&(a+=v(e.clientWidth,o?o.clientWidth:0)-i),{width:i,height:u,x:a,y:f}}(M(t)))}function K(o){var i,u=o.reference,a=o.element,f=o.placement,c=f?l(f):null,d=f?S(f):null,p=u.x+u.width/2-a.width/2,s=u.y+u.height/2-a.height/2;switch(c){case t:i={x:p,y:u.y-a.height};break;case n:i={x:p,y:u.y+u.height};break;case e:i={x:u.x+u.width,y:s};break;case r:i={x:u.x-a.width,y:s};break;default:i={x:u.x,y:u.y}}var v=c?q(c):null;if(null!=v){var b="y"===v?"height":"width";switch(d){case"start":i[v]=i[v]-(u[b]/2-a[b]/2);break;case"end":i[v]=i[v]+(u[b]/2-a[b]/2)}}return i}function N(r,i){void 0===i&&(i={});var u=i.placement,a=void 0===u?r.placement:u,c=i.strategy,s=void 0===c?r.strategy:c,l=i.boundary,h=void 0===l?"clippingParents":l,y=i.rootBoundary,m=void 0===y?"viewport":y,w=i.elementContext,j=void 0===w?"popper":w,A=i.altBoundary,q=void 0!==A&&A,B=i.padding,S=void 0===B?0:B,W=P("number"!=typeof S?S:R(S,o)),L=r.rects.popper,T=r.elements[q?"popper"===j?"reference":"popper":j],H=function(t,n,e,r){var o="clippingParents"===n?function(t){var n=_(k(t)),e=["absolute","fixed"].indexOf(g(t).position)>=0&&p(t)?E(t):t;return d(e)?n.filter((function(t){return d(t)&&O(t,e)&&"body"!==f(t)})):[]}(t):[].concat(n),i=[].concat(o,[e]),u=i.reduce((function(n,e){var o=J(t,e,r);return n.top=v(o.top,n.top),n.right=b(o.right,n.right),n.bottom=b(o.bottom,n.bottom),n.left=v(o.left,n.left),n}),J(t,i[0],r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}(d(T)?T:T.contextElement||M(r.elements.popper),h,m,s),I=x(r.elements.reference),z=K({reference:I,element:L,strategy:"absolute",placement:a}),C=G(Object.assign({},L,z)),D="popper"===j?C:I,F={top:H.top-D.top+W.top,bottom:D.bottom-H.bottom+W.bottom,left:H.left-D.left+W.left,right:D.right-H.right+W.right},U=r.modifiersData.offset;if("popper"===j&&U){var V=U[a];Object.keys(F).forEach((function(r){var o=[e,n].indexOf(r)>=0?1:-1,i=[t,n].indexOf(r)>=0?"y":"x";F[r]+=V[i]*o}))}return F}function Q(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,a=n.padding,f=n.flipVariations,c=n.allowedAutoPlacements,d=void 0===c?u:c,p=S(n.placement),s=p?f?i:i.filter((function(t){return S(t)===p})):o,v=s.filter((function(t){return d.indexOf(t)>=0}));0===v.length&&(v=s);var b=v.reduce((function(n,o){return n[o]=N(t,{placement:o,boundary:e,rootBoundary:r,padding:a})[l(o)],n}),{});return Object.keys(b).sort((function(t,n){return b[t]-b[n]}))}function X(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function Y(o){return[t,e,n,r].some((function(t){return o[t]>=0}))}function Z(t,n,e){void 0===e&&(e=!1);var r,o,i=p(n),u=p(n)&&function(t){var n=t.getBoundingClientRect(),e=h(n.width)/t.offsetWidth||1,r=h(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),a=M(n),d=x(t,u,e),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==f(n)||U(a))&&(s=(r=n)!==c(r)&&p(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:D(r)),p(n)?((l=x(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):a&&(l.x=F(a))),{x:d.left+s.scrollLeft-l.x,y:d.top+s.scrollTop-l.y,width:d.width,height:d.height}}function $(t){var n=new Map,e=new Set,r=[];function o(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||o(t)})),r}var tt={placement:"bottom",modifiers:[],strategy:"absolute"};function nt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function et(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?tt:r;return function(t,n,r){void 0===r&&(r=o);var i,u,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},tt,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},c=[],p=!1,s={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},o,f.options,i),f.scrollParents={reference:d(t)?_(t):t.contextElement?_(t.contextElement):[],popper:_(n)};var u,p,v=function(t){var n=$(t);return a.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((u=[].concat(e,f.options.modifiers),p=u.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(p).map((function(t){return p[t]}))));return f.orderedModifiers=v.filter((function(t){return t.enabled})),f.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:f,name:t.name,instance:s,options:void 0===n?{}:n});c.push(r||function(){})}})),s.update()},forceUpdate:function(){if(!p){var t=f.elements,n=t.reference,e=t.popper;if(nt(n,e)){f.rects={reference:Z(n,E(e),"fixed"===f.options.strategy),popper:w(e)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(t){return f.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,u=o.options;"function"==typeof i&&(f=i({state:f,options:void 0===u?{}:u,name:o.name,instance:s})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(t){s.forceUpdate(),t(f)}))},function(){return u||(u=new Promise((function(t){Promise.resolve().then((function(){u=void 0,t(i())}))}))),u}),destroy:function(){l(),p=!0}};if(!nt(t,n))return s;function l(){c.forEach((function(t){return t()})),c=[]}return s.setOptions(r).then((function(t){!p&&r.onFirstUpdate&&r.onFirstUpdate(t)})),s}}var rt=et({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,o=r.scroll,i=void 0===o||o,u=r.resize,a=void 0===u||u,f=c(n.elements.popper),d=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&d.forEach((function(t){t.addEventListener("scroll",e.update,T)})),a&&f.addEventListener("resize",e.update,T),function(){i&&d.forEach((function(t){t.removeEventListener("scroll",e.update,T)})),a&&f.removeEventListener("resize",e.update,T)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=K({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,o=void 0===r||r,i=e.adaptive,u=void 0===i||i,a=e.roundOffsets,f=void 0===a||a,c={placement:l(n.placement),variation:S(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:o,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,L(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:u,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,L(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},o=n.elements[t];p(o)&&f(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?o.removeAttribute(t):o.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],o=n.attributes[t]||{},i=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});p(r)&&f(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(n){var o=n.state,i=n.name,a=n.options.offset,f=void 0===a?[0,0]:a,c=u.reduce((function(n,i){return n[i]=function(n,o,i){var u=l(n),a=[r,t].indexOf(u)>=0?-1:1,f="function"==typeof i?i(Object.assign({},o,{placement:n})):i,c=f[0],d=f[1];return c=c||0,d=(d||0)*a,[r,e].indexOf(u)>=0?{x:d,y:c}:{x:c,y:d}}(i,o.rects,f),n}),{}),d=c[o.placement],p=d.y;null!=o.modifiersData.popperOffsets&&(o.modifiersData.popperOffsets.x+=d.x,o.modifiersData.popperOffsets.y+=p),o.modifiersData[i]=c}},{name:"flip",enabled:!0,phase:"main",fn:function(o){var i=o.state,u=o.options,a=o.name;if(!i.modifiersData[a]._skip){for(var f=u.mainAxis,c=void 0===f||f,d=u.altAxis,p=void 0===d||d,s=u.fallbackPlacements,v=u.padding,b=u.boundary,h=u.rootBoundary,y=u.altBoundary,m=u.flipVariations,x=void 0===m||m,w=u.allowedAutoPlacements,O=i.options.placement,g=l(O),j=s||(g!==O&&x?function(t){if("auto"===l(t))return[];var n=I(t);return[C(t),n,C(n)]}(O):[I(O)]),M=[O].concat(j).reduce((function(t,n){return t.concat("auto"===l(n)?Q(i,{placement:n,boundary:b,rootBoundary:h,padding:v,flipVariations:x,allowedAutoPlacements:w}):n)}),[]),k=i.rects.reference,A=i.rects.popper,E=new Map,q=!0,B=M[0],P=0;P<M.length;P++){var R=M[P],W=l(R),L="start"===S(R),T=[t,n].indexOf(W)>=0,H=T?"width":"height",z=N(i,{placement:R,boundary:b,rootBoundary:h,altBoundary:y,padding:v}),D=T?L?e:r:L?n:t;k[H]>A[H]&&(D=I(D));var F=I(D),U=[];if(c&&U.push(z[W]<=0),p&&U.push(z[D]<=0,z[F]<=0),U.every((function(t){return t}))){B=R,q=!1;break}E.set(R,U)}if(q)for(var V=function(t){var n=M.find((function(n){var e=E.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return B=n,"break"},_=x?3:1;_>0&&"break"!==V(_);_--);i.placement!==B&&(i.modifiersData[a]._skip=!0,i.placement=B,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(o){var i=o.state,u=o.options,a=o.name,f=u.mainAxis,c=void 0===f||f,d=u.altAxis,p=void 0!==d&&d,s=u.tether,h=void 0===s||s,y=u.tetherOffset,m=void 0===y?0:y,x=N(i,{boundary:u.boundary,rootBoundary:u.rootBoundary,padding:u.padding,altBoundary:u.altBoundary}),O=l(i.placement),g=S(i.placement),j=!g,M=q(O),k="x"===M?"y":"x",A=i.modifiersData.popperOffsets,P=i.rects.reference,R=i.rects.popper,W="function"==typeof m?m(Object.assign({},i.rects,{placement:i.placement})):m,L="number"==typeof W?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),T=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,H={x:0,y:0};if(A){if(c){var I,z="y"===M?t:r,C="y"===M?n:e,D="y"===M?"height":"width",F=A[M],U=F+x[z],V=F-x[C],_=h?-R[D]/2:0,G="start"===g?P[D]:R[D],J="start"===g?-R[D]:-P[D],K=i.elements.arrow,Q=h&&K?w(K):{width:0,height:0},X=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=X[z],Z=X[C],$=B(0,P[D],Q[D]),tt=j?P[D]/2-_-$-Y-L.mainAxis:G-$-Y-L.mainAxis,nt=j?-P[D]/2+_+$+Z+L.mainAxis:J+$+Z+L.mainAxis,et=i.elements.arrow&&E(i.elements.arrow),rt=null!=(I=null==T?void 0:T[M])?I:0,ot=F+nt-rt,it=B(h?b(U,F+tt-rt-(et?"y"===M?et.clientTop||0:et.clientLeft||0:0)):U,F,h?v(V,ot):V);A[M]=it,H[M]=it-F}if(p){var ut,at=A[k],ft="y"===k?"height":"width",ct=at+x["x"===M?t:r],dt=at-x["x"===M?n:e],pt=-1!==[t,r].indexOf(O),st=null!=(ut=null==T?void 0:T[k])?ut:0,lt=pt?ct:at-P[ft]-R[ft]-st+L.altAxis,vt=pt?at+P[ft]+R[ft]-st-L.altAxis:dt,bt=h&&pt?function(t,n,e){var r=B(t,n,e);return r>e?e:r}(lt,at,vt):B(h?lt:ct,at,h?vt:dt);A[k]=bt,H[k]=bt-at}i.modifiersData[a]=H}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(i){var u,a=i.state,f=i.name,c=i.options,d=a.elements.arrow,p=a.modifiersData.popperOffsets,s=l(a.placement),v=q(s),b=[r,e].indexOf(s)>=0?"height":"width";if(d&&p){var h=function(t,n){return P("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:R(t,o))}(c.padding,a),y=w(d),m="y"===v?t:r,x="y"===v?n:e,O=a.rects.reference[b]+a.rects.reference[v]-p[v]-a.rects.popper[b],g=p[v]-a.rects.reference[v],j=E(d),M=j?"y"===v?j.clientHeight||0:j.clientWidth||0:0,k=M/2-y[b]/2+(O/2-g/2),A=B(h[m],k,M-y[b]-h[x]);a.modifiersData[f]=((u={})[v]=A,u.centerOffset=A-k,u)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&O(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,o=n.rects.popper,i=n.modifiersData.preventOverflow,u=N(n,{elementContext:"reference"}),a=N(n,{altBoundary:!0}),f=X(u,r),c=X(a,o,i),d=Y(f),p=Y(c);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}}]});export{rt as c}
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++){t=arguments[o];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function s(e){try{a(i.next(e))}catch(e){r(e)}}function l(e){try{a(i["throw"](e))}catch(e){r(e)}}function a(e){e.done?o(e.value):n(e.value).then(s,l)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(t){return a([e,t])}}function a(s){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var i=0,n=t.length,r;i<n;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-871407e9.system.js","./p-e12b7fbc.system.js","./p-bbee73c8.system.js","./p-54498887.system.js","./p-b1288daf.system.js","./p-c44fd897.system.js","./p-f1edfd5a.system.js","./p-187b20b7.system.js","./p-47714747.system.js"],(function(e){"use strict";var t,o,i,n,r,s,l,a,p,d,c,u;return{setters:[function(e){t=e.r;o=e.h;i=e.H;n=e.c;r=e.a},function(e){s=e.c},function(e){l=e.a},function(){},function(e){a=e.u;p=e.d},function(e){d=e.V},function(e){c=e.g},function(e){u=e.S},function(){}],execute:function(){var f='verdocs-button-panel{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-button-panel .icon{display:inline-block;cursor:pointer;opacity:0.6}verdocs-button-panel .icon svg{fill:#707ae5}verdocs-button-panel .icon:hover{opacity:1}.verdocs-button-panel-content{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;display:none;background:#ffffff;color:#33364b;width:320px;font-weight:bold;padding:15px;font-size:14px;position:relative;border-radius:4px;z-index:10000}.verdocs-button-panel-content .arrow,.verdocs-button-panel-content .arrow::before{position:absolute;width:8px;height:8px;background:inherit}.verdocs-button-panel-content .arrow{visibility:hidden;top:-4px}.verdocs-button-panel-content .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}.verdocs-button-panel-content[data-show]{display:block}.verdocs-button-panel-content[data-popper-placement^=top]>.arrow{bottom:-4px}.verdocs-button-panel-content[data-popper-placement^=bottom]>.arrow{top:-4px}.verdocs-button-panel-content[data-popper-placement^=left]>.arrow{right:-4px}.verdocs-button-panel-content[data-popper-placement^=right]>.arrow{left:-4px}.verdocs-button-panel-content h6{font-size:16px;font-weight:bold;margin:0 0 16px 0;color:#092c4c;border-bottom:1px solid #cccccc}';var h=e("verdocs_button_panel",function(){function e(e){t(this,e);this.showing=false;this.icon=""}e.prototype.componentDidRender=function(){document.body.appendChild(this.panelEl);if(this.popperInstance){this.popperInstance.destroy()}this.popperInstance=s(this.iconEl,this.panelEl,{})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}if(this.panelEl){this.panelEl.remove()}};e.prototype.showPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;var o=this;return __generator(this,(function(i){(e=this.panelEl)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}));this.showing=true;this.hiderEl=document.createElement("div");this.hiderEl.id="verdocs-button-panel-hider";this.hiderEl.style.zIndex="100";this.hiderEl.style.position="absolute";this.hiderEl.style.top="0px";this.hiderEl.style.left="0px";this.hiderEl.style.right="0px";this.hiderEl.style.bottom="0px";this.hiderEl.onclick=function(e){e.stopPropagation();o.toggle()};document.body.appendChild(this.hiderEl);return[2]}))}))};e.prototype.hidePanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){Array.from(document.getElementsByClassName("verdocs-button-panel-content")).forEach((function(e){e.removeAttribute("data-show")}));(e=document.getElementById("verdocs-button-panel-hider"))===null||e===void 0?void 0:e.remove();this.showing=false;return[2]}))}))};e.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!this.showing)return[3,2];return[4,this.hidePanel()];case 1:e.sent();return[3,4];case 2:return[4,this.showPanel()];case 3:e.sent();e.label=4;case 4:return[2]}}))}))};e.prototype.render=function(){var e=this;return o(i,null,o("div",{class:"icon",innerHTML:this.icon,onClick:function(t){t.stopPropagation();return e.toggle()},ref:function(t){return e.iconEl=t}}),o("div",{role:"tooltip",class:"verdocs-button-panel-content","data-popper-placement":"bottom",ref:function(t){return e.panelEl=t}},o("div",{"data-popper-arrow":"true",class:"arrow"}),o("slot",null)))};return e}());h.style=f;var v='verdocs-select-input{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:focus{border:1px solid #7d88ff}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';var m=e("verdocs_select_input",function(){function e(e){t(this,e);this.value="";this.label="";this.options=undefined;this.disabled=false}e.prototype.render=function(){var e=this;return o(i,{class:"input-field"},o("label",null,this.label?o("div",{class:"input-label"},this.label+":"):o("div",null),o("select",{class:"input-element",disabled:this.disabled},this.options.map((function(t){return o("option",{value:t.value,selected:t.value===e.value},t.label)})))))};return e}());m.style=v;var g;var b=typeof l!=="undefined"&&(l.crypto||l.msCrypto);if(b&&b.getRandomValues){var x=new Uint8Array(16);g=function e(){b.getRandomValues(x);return x}}if(!g){var y=new Array(16);g=function(){for(var e=0,t;e<16;e++){if((e&3)===0)t=Math.random()*4294967296;y[e]=t>>>((e&3)<<3)&255}return y}}var w=g;var _=[];for(var k=0;k<256;++k){_[k]=(k+256).toString(16).substr(1)}function E(e,t){var o=t||0;var i=_;return i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]}var I=E;var q=w();var N=[q[0]|1,q[1],q[2],q[3],q[4],q[5]];var C=(q[6]<<8|q[7])&16383;var T=0,A=0;function P(e,t,o){var i=t&&o||0;var n=t||[];e=e||{};var r=e.clockseq!==undefined?e.clockseq:C;var s=e.msecs!==undefined?e.msecs:(new Date).getTime();var l=e.nsecs!==undefined?e.nsecs:A+1;var a=s-T+(l-A)/1e4;if(a<0&&e.clockseq===undefined){r=r+1&16383}if((a<0||s>T)&&e.nsecs===undefined){l=0}if(l>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}T=s;A=l;C=r;s+=122192928e5;var p=((s&268435455)*1e4+l)%4294967296;n[i++]=p>>>24&255;n[i++]=p>>>16&255;n[i++]=p>>>8&255;n[i++]=p&255;var d=s/4294967296*1e4&268435455;n[i++]=d>>>8&255;n[i++]=d&255;n[i++]=d>>>24&15|16;n[i++]=d>>>16&255;n[i++]=r>>>8|128;n[i++]=r&255;var c=e.node||N;for(var u=0;u<6;++u){n[i+u]=c[u]}return t?t:I(n)}var S=P;function z(e,t,o){var i=t&&o||0;if(typeof e=="string"){t=e=="binary"?new Array(16):null;e=null}e=e||{};var n=e.random||(e.rng||w)();n[6]=n[6]&15|64;n[8]=n[8]&63|128;if(t){for(var r=0;r<16;++r){t[i+r]=n[r]}}return t||I(n)}var j=z;var L=j;L.v1=S;L.v4=j;var O=L;var R='verdocs-template-field-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:#a50021}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 10px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';var H=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};var D='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var M='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';var F=e("verdocs_template_field_properties",function(){function e(e){t(this,e);this.close=n(this,"close",7);this.delete=n(this,"delete",7);this.settingsChanged=n(this,"settingsChanged",7);this.sdkError=n(this,"sdkError",7);this.store=null;this.endpoint=d.getDefault();this.templateId="";this.fieldName="";this.helpText="";this.dirty=false;this.loading=true;this.type="signature";this.setting=null;this.name="";this.roleName="";this.group="";this.fieldType="";this.required=false;this.options=[];this.placeholder="";this.defaultValue="";this.showingHelp=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s,l,a,p;var d=this;return __generator(this,(function(f){switch(f.label){case 0:f.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.fieldName){console.error("[FIELD PROPERTIES] Missing required field name");return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,c(this.endpoint,this.templateId,false)];case 1:l.store=f.sent();a=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.fields.find((function(e){return e.name===d.fieldName}));if(!a){console.log('[FIELD PROPERTIES] Unable to find field "'.concat(this.fieldName,'" in template'))}this.type=a.type;this.name=a.name;this.group=a.name;this.roleName=a.role_name;this.required=a.required;this.fieldType=a.type;this.placeholder=a.label;this.defaultValue=((o=a.setting)===null||o===void 0?void 0:o.value)||"";this.setting=a.setting||{};this.options=((i=a.setting)===null||i===void 0?void 0:i.options)||[];this.dirty=false;this.loading=false;return[3,3];case 2:p=f.sent();console.log("[FIELD PROPERTIES] Error loading template",p);this.loading=false;(n=this.sdkError)===null||n===void 0?void 0:n.emit(new u(p.message,(r=p.response)===null||r===void 0?void 0:r.status,(s=p.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t=this;var o,i,n,r;e.stopPropagation();var s=(i=(o=this.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.fields.find((function(e){return e.name===t.fieldName}));if(s){this.name=s.name;this.roleName=s.role_name;this.required=s.required;this.placeholder=s.label;this.defaultValue=((n=s.setting)===null||n===void 0?void 0:n.result)||""}this.dirty=false;(r=this.close)===null||r===void 0?void 0:r.emit()};e.prototype.handleSave=function(e){var t=this;e.stopPropagation();var o={name:this.name,required:this.required,role_name:this.roleName};if(this.type==="checkbox_group"||this.type==="radio_button_group"){o.setting=this.setting;o.setting.options=this.options}else if(this.type==="dropdown"){o.setting={x:this.setting.x,y:this.setting.y,options:this.options}}a(this.endpoint,this.templateId,this.fieldName,o).then((function(){var e,o;t.dirty=false;t.updateField();(e=t.settingsChanged)===null||e===void 0?void 0:e.emit({fieldName:t.fieldName});(o=t.close)===null||o===void 0?void 0:o.emit()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.handleAddOption=function(e){var t=this;e.stopPropagation();var o={name:this.name,required:this.required,role_name:this.roleName};this.options.push(this.type==="radio_button_group"?{id:O(),value:"Option ".concat(this.options.length+1),selected:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}:{id:O(),value:"Option ".concat(this.options.length+1),checked:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20});o.setting=__assign({},this.setting);delete o.setting.result;o.setting.options=__spreadArray([],this.options,true);a(this.endpoint,this.templateId,this.fieldName,o).then((function(){var e,o;t.dirty=false;t.updateField();(e=t.settingsChanged)===null||e===void 0?void 0:e.emit({fieldName:t.fieldName});(o=t.close)===null||o===void 0?void 0:o.emit()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.updateField=function(){var e=this;var t=__spreadArray([],this.store.state.fields,true);t.forEach((function(t){if(t.name===e.fieldName){t.name=e.name;t.role_name=e.roleName;t.required=e.required;t.label=e.placeholder;if(t.setting.options){t.setting.options=e.options}}}));this.store.state.fields=t};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this field? This action cannot be undone.")){p(this.endpoint,this.templateId,this.fieldName).then((function(e){var o,i,n,r,s;console.log("Field deleted",e);t.store.state.fields=__spreadArray([],(i=(o=t.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.fields.filter((function(e){return e.name!==t.fieldName})),true);(r=(n=t.store)===null||n===void 0?void 0:n.state)===null||r===void 0?void 0:r.roles.forEach((function(e){e.fields=__spreadArray([],e.fields.filter((function(e){return e.name!==t.fieldName})),true)}));(s=t.delete)===null||s===void 0?void 0:s.emit({templateId:t.templateId,roleName:t.roleName})})).catch((function(e){console.log("Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t,n,r,s;if(!this.endpoint.session){return o(i,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((n=(t=this.store)===null||t===void 0?void 0:t.state)===null||n===void 0?void 0:n.isLoaded)){return o(i,{class:"empty"})}if(this.helpText&&this.showingHelp){return o(i,null,o("h6",null,H(this.fieldType)," Settings ",o("div",{style:{flex:"1"}}),o("div",{class:"help-icon",innerHTML:M,onClick:function(){return e.showingHelp=false}})),o("p",{class:"instructions",innerHTML:this.helpText}))}return o(i,null,o("h6",null,H(this.fieldType.replace(/_/g," "))," Settings ",o("div",{style:{flex:"1"}}),this.helpText&&o("div",{class:"help-icon",innerHTML:M,onClick:function(){return e.showingHelp=true}})),o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("div",{class:"row"},o("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}})),o("div",{class:"row"},o("div",{class:"input-label"},"Role:"),o("verdocs-select-input",{value:this.roleName,options:(s=(r=this.store)===null||r===void 0?void 0:r.state)===null||s===void 0?void 0:s.roles.map((function(e){return{label:e.name,value:e.name}})),onInput:function(t){e.roleName=t.target.value;e.dirty=true}})),["textbox","textarea"].includes(this.type)&&o("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.name,autocomplete:"off",placeholder:"Placeholder...",onInput:function(t){e.placeholder=t.target.value;e.dirty=true}}),o("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},o("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),o("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:function(t){e.required=t.target.checked;e.dirty=true}})),["checkbox_group","radio_button_group"].includes(this.type)&&o("verdocs-button",{size:"small",onClick:function(t){return e.handleAddOption(t)},label:"Add Option"}),["dropdown"].includes(this.type)&&o("div",{class:"options"},o("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px",textAlign:"center",fontWeight:"700",fontSize:"14px",justifyContent:"center",backgroundColor:"#333333",padding:"5px 8px",color:"#ffffff"}},"Options"),o("div",{class:"row-header"},o("h6",null,"ID"),o("h6",null,"Label"),o("div",{style:{width:"34px"}})),this.options.map((function(t,i){return o("div",{class:"row option-row",key:i},o("verdocs-text-input",{id:"verdocs-option-id-".concat(t.id),value:t.id,placeholder:"Unique ID",onInput:function(t){e.options[i].id=t.target.value;e.dirty=true}}),o("verdocs-text-input",{id:"verdocs-option-value-".concat(t.id),value:t.value,placeholder:"Display value",onInput:function(t){e.options[i].value=t.target.value;e.dirty=true}}),o("button",{innerHTML:D,class:"remove-button",onClick:function(){e.options=e.options.filter((function(e){return e.id!==t.id}));e.dirty=true}}))})),o("div",{class:"row-header"},o("button",{class:"add-option-button",onClick:function(){e.options=__spreadArray(__spreadArray([],e.options,true),[{id:"option-".concat(e.options.length+1),value:"Option ".concat(e.options.length+1)}],false);e.dirty=true}},"Add Option"))),o("div",{class:"buttons"},o("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:D}),o("div",{style:{flex:"1"}}),o("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());F.style=R}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++){t=arguments[o];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function s(e){try{a(i.next(e))}catch(e){r(e)}}function l(e){try{a(i["throw"](e))}catch(e){r(e)}}function a(e){e.done?o(e.value):n(e.value).then(s,l)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(t){return a([e,t])}}function a(s){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var i=0,n=t.length,r;i<n;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-871407e9.system.js","./p-5e0c6e7c.system.js","./p-bbee73c8.system.js","./p-54498887.system.js","./p-b1288daf.system.js","./p-c44fd897.system.js","./p-66c74103.system.js","./p-187b20b7.system.js","./p-4ac861c9.system.js"],(function(e){"use strict";var t,o,i,n,r,s,l,a,p,d,c,u;return{setters:[function(e){t=e.r;o=e.h;i=e.H;n=e.c;r=e.a},function(e){s=e.c},function(e){l=e.a},function(){},function(e){a=e.u;p=e.d},function(e){d=e.V},function(e){c=e.g},function(e){u=e.S},function(){}],execute:function(){var f='verdocs-button-panel{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-button-panel .icon{display:inline-block;cursor:pointer;opacity:0.6}verdocs-button-panel .icon svg{fill:#707ae5}verdocs-button-panel .icon:hover{opacity:1}.verdocs-button-panel-content{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;display:none;background:#ffffff;color:#33364b;width:320px;font-weight:bold;padding:15px;font-size:14px;position:relative;border-radius:4px;z-index:10000}.verdocs-button-panel-content .arrow,.verdocs-button-panel-content .arrow::before{position:absolute;width:8px;height:8px;background:inherit}.verdocs-button-panel-content .arrow{visibility:hidden;top:-4px}.verdocs-button-panel-content .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}.verdocs-button-panel-content[data-show]{display:block}.verdocs-button-panel-content[data-popper-placement^=top]>.arrow{bottom:-4px}.verdocs-button-panel-content[data-popper-placement^=bottom]>.arrow{top:-4px}.verdocs-button-panel-content[data-popper-placement^=left]>.arrow{right:-4px}.verdocs-button-panel-content[data-popper-placement^=right]>.arrow{left:-4px}.verdocs-button-panel-content h6{font-size:16px;font-weight:bold;margin:0 0 16px 0;color:#092c4c;border-bottom:1px solid #cccccc}';var h=e("verdocs_button_panel",function(){function e(e){t(this,e);this.showing=false;this.icon=""}e.prototype.componentDidRender=function(){document.body.appendChild(this.panelEl);if(this.popperInstance){this.popperInstance.destroy()}this.popperInstance=s(this.iconEl,this.panelEl,{})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}if(this.panelEl){this.panelEl.remove()}};e.prototype.showPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;var o=this;return __generator(this,(function(i){(e=this.panelEl)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}));this.showing=true;this.hiderEl=document.createElement("div");this.hiderEl.id="verdocs-button-panel-hider";this.hiderEl.style.zIndex="100";this.hiderEl.style.position="absolute";this.hiderEl.style.top="0px";this.hiderEl.style.left="0px";this.hiderEl.style.right="0px";this.hiderEl.style.bottom="0px";this.hiderEl.onclick=function(e){e.stopPropagation();o.toggle()};document.body.appendChild(this.hiderEl);return[2]}))}))};e.prototype.hidePanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){Array.from(document.getElementsByClassName("verdocs-button-panel-content")).forEach((function(e){e.removeAttribute("data-show")}));(e=document.getElementById("verdocs-button-panel-hider"))===null||e===void 0?void 0:e.remove();this.showing=false;return[2]}))}))};e.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!this.showing)return[3,2];return[4,this.hidePanel()];case 1:e.sent();return[3,4];case 2:return[4,this.showPanel()];case 3:e.sent();e.label=4;case 4:return[2]}}))}))};e.prototype.render=function(){var e=this;return o(i,null,o("div",{class:"icon",innerHTML:this.icon,onClick:function(t){t.stopPropagation();return e.toggle()},ref:function(t){return e.iconEl=t}}),o("div",{role:"tooltip",class:"verdocs-button-panel-content","data-popper-placement":"bottom",ref:function(t){return e.panelEl=t}},o("div",{"data-popper-arrow":"true",class:"arrow"}),o("slot",null)))};return e}());h.style=f;var v='verdocs-select-input{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:focus{border:1px solid #7d88ff}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';var m=e("verdocs_select_input",function(){function e(e){t(this,e);this.value="";this.label="";this.options=undefined;this.disabled=false}e.prototype.render=function(){var e=this;return o(i,{class:"input-field"},o("label",null,this.label?o("div",{class:"input-label"},this.label+":"):o("div",null),o("select",{class:"input-element",disabled:this.disabled},this.options.map((function(t){return o("option",{value:t.value,selected:t.value===e.value},t.label)})))))};return e}());m.style=v;var g;var b=typeof l!=="undefined"&&(l.crypto||l.msCrypto);if(b&&b.getRandomValues){var x=new Uint8Array(16);g=function e(){b.getRandomValues(x);return x}}if(!g){var y=new Array(16);g=function(){for(var e=0,t;e<16;e++){if((e&3)===0)t=Math.random()*4294967296;y[e]=t>>>((e&3)<<3)&255}return y}}var w=g;var _=[];for(var k=0;k<256;++k){_[k]=(k+256).toString(16).substr(1)}function E(e,t){var o=t||0;var i=_;return i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+"-"+i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]+i[e[o++]]}var I=E;var q=w();var N=[q[0]|1,q[1],q[2],q[3],q[4],q[5]];var C=(q[6]<<8|q[7])&16383;var T=0,A=0;function P(e,t,o){var i=t&&o||0;var n=t||[];e=e||{};var r=e.clockseq!==undefined?e.clockseq:C;var s=e.msecs!==undefined?e.msecs:(new Date).getTime();var l=e.nsecs!==undefined?e.nsecs:A+1;var a=s-T+(l-A)/1e4;if(a<0&&e.clockseq===undefined){r=r+1&16383}if((a<0||s>T)&&e.nsecs===undefined){l=0}if(l>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}T=s;A=l;C=r;s+=122192928e5;var p=((s&268435455)*1e4+l)%4294967296;n[i++]=p>>>24&255;n[i++]=p>>>16&255;n[i++]=p>>>8&255;n[i++]=p&255;var d=s/4294967296*1e4&268435455;n[i++]=d>>>8&255;n[i++]=d&255;n[i++]=d>>>24&15|16;n[i++]=d>>>16&255;n[i++]=r>>>8|128;n[i++]=r&255;var c=e.node||N;for(var u=0;u<6;++u){n[i+u]=c[u]}return t?t:I(n)}var S=P;function z(e,t,o){var i=t&&o||0;if(typeof e=="string"){t=e=="binary"?new Array(16):null;e=null}e=e||{};var n=e.random||(e.rng||w)();n[6]=n[6]&15|64;n[8]=n[8]&63|128;if(t){for(var r=0;r<16;++r){t[i+r]=n[r]}}return t||I(n)}var j=z;var L=j;L.v1=S;L.v4=j;var O=L;var R='verdocs-template-field-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:#a50021}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 10px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';var H=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};var D='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var M='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';var F=e("verdocs_template_field_properties",function(){function e(e){t(this,e);this.close=n(this,"close",7);this.delete=n(this,"delete",7);this.settingsChanged=n(this,"settingsChanged",7);this.sdkError=n(this,"sdkError",7);this.store=null;this.endpoint=d.getDefault();this.templateId="";this.fieldName="";this.helpText="";this.dirty=false;this.loading=true;this.type="signature";this.setting=null;this.name="";this.roleName="";this.group="";this.fieldType="";this.required=false;this.options=[];this.placeholder="";this.defaultValue="";this.showingHelp=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s,l,a,p;var d=this;return __generator(this,(function(f){switch(f.label){case 0:f.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.fieldName){console.error("[FIELD PROPERTIES] Missing required field name");return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,c(this.endpoint,this.templateId,false)];case 1:l.store=f.sent();a=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.fields.find((function(e){return e.name===d.fieldName}));if(!a){console.log('[FIELD PROPERTIES] Unable to find field "'.concat(this.fieldName,'" in template'))}this.type=a.type;this.name=a.name;this.group=a.name;this.roleName=a.role_name;this.required=a.required;this.fieldType=a.type;this.placeholder=a.label;this.defaultValue=((o=a.setting)===null||o===void 0?void 0:o.value)||"";this.setting=a.setting||{};this.options=((i=a.setting)===null||i===void 0?void 0:i.options)||[];this.dirty=false;this.loading=false;return[3,3];case 2:p=f.sent();console.log("[FIELD PROPERTIES] Error loading template",p);this.loading=false;(n=this.sdkError)===null||n===void 0?void 0:n.emit(new u(p.message,(r=p.response)===null||r===void 0?void 0:r.status,(s=p.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t=this;var o,i,n,r;e.stopPropagation();var s=(i=(o=this.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.fields.find((function(e){return e.name===t.fieldName}));if(s){this.name=s.name;this.roleName=s.role_name;this.required=s.required;this.placeholder=s.label;this.defaultValue=((n=s.setting)===null||n===void 0?void 0:n.result)||""}this.dirty=false;(r=this.close)===null||r===void 0?void 0:r.emit()};e.prototype.handleSave=function(e){var t=this;e.stopPropagation();var o={name:this.name,required:this.required,role_name:this.roleName};if(this.type==="checkbox_group"||this.type==="radio_button_group"){o.setting=this.setting;o.setting.options=this.options}else if(this.type==="dropdown"){o.setting={x:this.setting.x,y:this.setting.y,options:this.options}}a(this.endpoint,this.templateId,this.fieldName,o).then((function(){var e,o;t.dirty=false;t.updateField();(e=t.settingsChanged)===null||e===void 0?void 0:e.emit({fieldName:t.fieldName});(o=t.close)===null||o===void 0?void 0:o.emit()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.handleAddOption=function(e){var t=this;e.stopPropagation();var o={name:this.name,required:this.required,role_name:this.roleName};this.options.push(this.type==="radio_button_group"?{id:O(),value:"Option ".concat(this.options.length+1),selected:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}:{id:O(),value:"Option ".concat(this.options.length+1),checked:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20});o.setting=__assign({},this.setting);delete o.setting.result;o.setting.options=__spreadArray([],this.options,true);a(this.endpoint,this.templateId,this.fieldName,o).then((function(){var e,o;t.dirty=false;t.updateField();(e=t.settingsChanged)===null||e===void 0?void 0:e.emit({fieldName:t.fieldName});(o=t.close)===null||o===void 0?void 0:o.emit()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.updateField=function(){var e=this;var t=__spreadArray([],this.store.state.fields,true);t.forEach((function(t){if(t.name===e.fieldName){t.name=e.name;t.role_name=e.roleName;t.required=e.required;t.label=e.placeholder;if(t.setting.options){t.setting.options=e.options}}}));this.store.state.fields=t};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this field? This action cannot be undone.")){p(this.endpoint,this.templateId,this.fieldName).then((function(e){var o,i,n,r,s;console.log("Field deleted",e);t.store.state.fields=__spreadArray([],(i=(o=t.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.fields.filter((function(e){return e.name!==t.fieldName})),true);(r=(n=t.store)===null||n===void 0?void 0:n.state)===null||r===void 0?void 0:r.roles.forEach((function(e){e.fields=__spreadArray([],e.fields.filter((function(e){return e.name!==t.fieldName})),true)}));(s=t.delete)===null||s===void 0?void 0:s.emit({templateId:t.templateId,roleName:t.roleName})})).catch((function(e){console.log("Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t,n,r,s;if(!this.endpoint.session){return o(i,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((n=(t=this.store)===null||t===void 0?void 0:t.state)===null||n===void 0?void 0:n.isLoaded)){return o(i,{class:"empty"})}if(this.helpText&&this.showingHelp){return o(i,null,o("h6",null,H(this.fieldType)," Settings ",o("div",{style:{flex:"1"}}),o("div",{class:"help-icon",innerHTML:M,onClick:function(){return e.showingHelp=false}})),o("p",{class:"instructions",innerHTML:this.helpText}))}return o(i,null,o("h6",null,H(this.fieldType.replace(/_/g," "))," Settings ",o("div",{style:{flex:"1"}}),this.helpText&&o("div",{class:"help-icon",innerHTML:M,onClick:function(){return e.showingHelp=true}})),o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("div",{class:"row"},o("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}})),o("div",{class:"row"},o("div",{class:"input-label"},"Role:"),o("verdocs-select-input",{value:this.roleName,options:(s=(r=this.store)===null||r===void 0?void 0:r.state)===null||s===void 0?void 0:s.roles.map((function(e){return{label:e.name,value:e.name}})),onInput:function(t){e.roleName=t.target.value;e.dirty=true}})),["textbox","textarea"].includes(this.type)&&o("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.name,autocomplete:"off",placeholder:"Placeholder...",onInput:function(t){e.placeholder=t.target.value;e.dirty=true}}),o("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},o("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),o("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:function(t){e.required=t.target.checked;e.dirty=true}})),["checkbox_group","radio_button_group"].includes(this.type)&&o("verdocs-button",{size:"small",onClick:function(t){return e.handleAddOption(t)},label:"Add Option"}),["dropdown"].includes(this.type)&&o("div",{class:"options"},o("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px",textAlign:"center",fontWeight:"700",fontSize:"14px",justifyContent:"center",backgroundColor:"#333333",padding:"5px 8px",color:"#ffffff"}},"Options"),o("div",{class:"row-header"},o("h6",null,"ID"),o("h6",null,"Label"),o("div",{style:{width:"34px"}})),this.options.map((function(t,i){return o("div",{class:"row option-row",key:i},o("verdocs-text-input",{id:"verdocs-option-id-".concat(t.id),value:t.id,placeholder:"Unique ID",onInput:function(t){e.options[i].id=t.target.value;e.dirty=true}}),o("verdocs-text-input",{id:"verdocs-option-value-".concat(t.id),value:t.value,placeholder:"Display value",onInput:function(t){e.options[i].value=t.target.value;e.dirty=true}}),o("button",{innerHTML:D,class:"remove-button",onClick:function(){e.options=e.options.filter((function(e){return e.id!==t.id}));e.dirty=true}}))})),o("div",{class:"row-header"},o("button",{class:"add-option-button",onClick:function(){e.options=__spreadArray(__spreadArray([],e.options,true),[{id:"option-".concat(e.options.length+1),value:"Option ".concat(e.options.length+1)}],false);e.dirty=true}},"Add Option"))),o("div",{class:"buttons"},o("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:D}),o("div",{style:{flex:"1"}}),o("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());F.style=R}}}));