@verdocs/web-sdk 2.3.76 → 2.3.79
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.
- package/dist/cjs/{TemplateStore-ae59084b.js → TemplateStore-9a87282d.js} +1 -1
- package/dist/cjs/{VerdocsEndpoint-f4ef9333.js → VerdocsEndpoint-38bcb409.js} +1 -1
- package/dist/cjs/ipc-test.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_15.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +3 -3
- package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +1 -1
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +0 -1
- package/dist/components/VerdocsEndpoint.js +1 -1
- package/dist/components/verdocs-auth.js +3 -3
- package/dist/components/verdocs-preview2.js +1 -1
- package/dist/components/verdocs-template-fields2.js +0 -1
- package/dist/custom-elements.json +2147 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{TemplateStore-99bf97f0.js → TemplateStore-6a7d7297.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-eab308f6.js → VerdocsEndpoint-9a11e843.js} +1 -1
- package/dist/esm/ipc-test.entry.js +2 -2
- package/dist/esm/verdocs-activity-box.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +4 -4
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-checkbox_5.entry.js +2 -2
- package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_15.entry.js +1 -1
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_8.entry.js +3 -3
- package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm/verdocs-settings.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +2 -3
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/{TemplateStore-99bf97f0.js → TemplateStore-6a7d7297.js} +1 -1
- package/dist/esm-es5/{VerdocsEndpoint-eab308f6.js → VerdocsEndpoint-9a11e843.js} +1 -1
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_15.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-f246348c.system.js → p-034bd59e.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b0e0084b.system.entry.js → p-05026d67.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bbf52926.entry.js → p-07cf78e3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e7d7bcae.system.entry.js → p-094ea4ba.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-15c88a05.system.entry.js → p-0d1f4272.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1978c7bd.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-58e85310.system.entry.js → p-1a29b57f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a12b2c26.system.entry.js → p-24742737.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6a93295c.entry.js → p-283d935e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ef99042b.entry.js → p-2bcd953d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8f36c42a.system.entry.js → p-337466c7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ea2211d7.system.entry.js → p-340d2daa.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d61bf72b.system.entry.js → p-4618665e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7e5a1766.system.entry.js → p-48c14014.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d0d9ac6d.system.js → p-49139f23.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8a7324b6.entry.js → p-5059ff08.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-159aeaf2.entry.js → p-55403539.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a7907ccf.entry.js → p-6dad60bb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a9da16c6.entry.js → p-6ec51b4b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1d5f10f4.entry.js → p-70137c9e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e3623a0c.system.entry.js → p-786725d0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-91e94910.entry.js → p-812d7568.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-06618569.entry.js → p-8b46dcc3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-baf16d17.system.entry.js → p-8b78ee37.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7b3dfc4b.system.entry.js → p-90734d54.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-92a6f625.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9b306355.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-40f5b1c5.entry.js → p-a15e1a57.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9d748d04.entry.js → p-a87f2e56.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bf8e6ba1.system.entry.js → p-b1e92d11.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-77c145b3.system.entry.js → p-b293e7d0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c73e78c8.system.entry.js → p-b9376079.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-bc6ce10f.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9a816526.system.entry.js → p-bf2fd0eb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a9b80271.system.entry.js → p-cb48d6b9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-ccac4998.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-45ecd6eb.js → p-cda8b816.js} +1 -1
- package/dist/verdocs-web-sdk/{p-84679597.entry.js → p-d075b6e8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c179b3e4.entry.js → p-d522f008.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-28c93a3a.system.entry.js → p-d524266d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e04d8f5d.js → p-d77962af.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ac042888.entry.js → p-daebba0a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-de5b9b23.system.entry.js → p-e3bfe2de.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d1c52218.entry.js → p-e93796e2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b8063124.entry.js → p-ed319550.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ac07d476.entry.js → p-ee9336c4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-5e8e5761.system.entry.js → p-f15263ff.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d11ffc76.entry.js → p-f6b75e4c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/verdocs-web-sdk/p-30492f83.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-332141f2.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7519fe6e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-755b5223.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b2d3ac44.entry.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as i,h as o,H as t,F as s,a as n}from"./p-14b44491.js";import{t as l,k as a,c as d}from"./p-dc2ad047.js";import{b as r}from"./p-29f64c27.js";import"./p-05788c2b.js";import{V as c}from"./p-
|
1
|
+
import{r as e,c as i,h as o,H as t,F as s,a as n}from"./p-14b44491.js";import{t as l,k as a,c as d}from"./p-dc2ad047.js";import{b as r}from"./p-29f64c27.js";import"./p-05788c2b.js";import{V as c}from"./p-d77962af.js";import{i as p}from"./p-5e808a0b.js";import{s as h}from"./p-b72328af.js";import{S as v}from"./p-7a1b2643.js";import"./p-eab67c09.js";import"./p-1b4e7078.js";import"./p-c220af42.js";const x=class{constructor(o){e(this,o),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.another=i(this,"another",7),this.view=i(this,"view",7),this.next=i(this,"next",7),this.endpoint=c.getDefault(),this.envelopeId="",this.headerTargetId=null,this.canceling=!1,this.envelope=null,this.roleNames=[],this.showCancelDone=!1}componentWillLoad(){this.endpoint.loadSession()}async componentWillRender(){if(this.envelopeId)return this.reloadEnvelope();console.error("[VIEW] Missing required envelopeId")}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null,i=document.getElementById("verdocs-view-header");e&&i&&(console.log("[VIEW] Moving header"),i.remove(),e.append(i))}async reloadEnvelope(){var e,i,o;console.log("[VIEW] Loading envelope...");try{this.envelope=await l(this.endpoint,this.envelopeId),console.log("[VIEW] Loaded envelope",this.envelope),this.roleNames=this.envelope.recipients.map((e=>e.role_name)),setTimeout((async()=>{console.log("[VIEW] Reloading envelope..."),this.envelope=await l(this.endpoint,this.envelopeId),console.log("[VIEW] Reloaded envelope",this.envelope)}),2e3)}catch(t){null===(e=this.sdkError)||void 0===e||e.emit(new v(t.message,null===(i=t.response)||void 0===i?void 0:i.status,null===(o=t.response)||void 0===o?void 0:o.data))}}handlePageRendered(e){console.log("[VIEW] Page rendered",e.detail)}async handleOptionSelected(e){var i,o;switch(e.detail.id){case"cancel":confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")&&(this.canceling=!0,d(this.endpoint,this.envelopeId).then((e=>(this.canceling=!1,console.log("[VIEW] Envelope canceled",e),l(this.endpoint,this.envelopeId)))).then((e=>{console.log("[VIEW] Loaded new envelope details",e),this.envelope=e})).catch((e=>{var i,o,t;this.canceling=!1,console.log("[VIEW] Error canceling envelope",e),null===(i=this.sdkError)||void 0===i||i.emit(new v(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(t=e.response)||void 0===t?void 0:t.data))})),this.showCancelDone=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"}));break;case"print":window.print(),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download-attachments":{const e=await a(this.endpoint,this.envelopeId,this.envelope.envelope_document_id);window.open(e,"_blank")}break;case"download-certificate":{const e=await a(this.endpoint,this.envelopeId,this.envelope.certificate_document_id);window.open(e,"_blank")}break;case"download-all":h(this.endpoint,[this.envelope]).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading Zip",e)}))}}render(){var e;if(!this.envelope)return o(t,null,o("img",{src:"https://verdocs-public-assets.s3.amazonaws.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}));const i=[{id:"print",label:"Print"}];r(this.endpoint.session,this.envelope)&&i.push({id:"cancel",label:"Cancel"});const n=this.envelope.documents.length>0,l=this.envelope.documents.filter((e=>"attachment"===e.type)).length,a=void 0!==this.envelope.documents.find((e=>"certificate"===e.type));return(n||a)&&(i.push({label:""}),n&&i.push({id:"download-attachments",label:l>1?"Download Documents":"Download Document"}),a&&i.push({id:"download-certificate",label:"Download Certificate"}),n&&a&&i.push({id:"download-all",label:"Download All Files"})),o(t,null,o("div",{id:"verdocs-view-header"},o("div",{class:"inner"},o("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),o("div",{class:"title"},this.envelope.name),o("div",{style:{flex:"1"}}),o("div",{style:{marginLeft:"10px"}}),o("verdocs-dropdown",{options:i,onOptionSelected:e=>this.handleOptionSelected(e)}))),o("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},((null===(e=this.envelope)||void 0===e?void 0:e.documents)||[]).filter((e=>"certificate"!==e.type)).map((e=>{const i=p(1,e.page_numbers);return o(s,null,i.map((i=>o("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,type:"filled",virtualWidth:612,virtualHeight:792,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showCancelDone&&o("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:()=>{this.showCancelDone=!1}}),this.canceling&&o("div",{class:"loading-indicator"},o("verdocs-loader",null)))}get component(){return n(this)}};x.style='verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';export{x as verdocs_view}
|
@@ -1 +1 @@
|
|
1
|
-
import{p as e,b as t}from"./p-14b44491.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t(JSON.parse('[["p-40f5b1c5",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"store":[32]}]]],["p-84679597",[[0,"ipc-test",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["p-a7907ccf",[[0,"verdocs-settings",{"endpoint":[16],"tab":[32]}]]],["p-ef99042b",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]}]]],["p-ac042888",[[0,"verdocs-templates-list",{"endpoint":[16],"sharing":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]}]]],["p-d1c52218",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"headerTargetId":[1,"header-target-id"],"envelope":[32],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"submitting":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["p-1d5f10f4",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showManageDialog":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"loading":[32]}]]],["p-332141f2",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"orgname":[32],"first":[32],"last":[32],"username":[32],"phone":[32],"password":[32],"submitting":[32],"activeSession":[32],"accountType":[32],"howHear":[32],"industry":[32],"companySize":[32],"reason":[32],"signupStep":[32],"resendDisabled":[32],"checkingOrg":[32]}]]],["p-ac07d476",[[0,"verdocs-search",{"endpoint":[16]}]]],["p-b8063124",[[0,"verdocs-activity-box",{"endpoint":[16],"items":[2],"view":[1],"header":[1],"title":[32],"count":[32],"loading":[32],"entries":[32]}]]],["p-f520ee27",[[0,"verdocs-floating-menu",{"options":[16]}]]],["p-cb9f22d7",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["p-55180d12",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}]]],["p-d0140be2",[[0,"verdocs-field-payment",{"templateid":[1],"fieldname":[1],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-b68d2dba",[[0,"verdocs-organization-card",{"organization":[16]}]]],["p-3c798272",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["p-7d5e91f5",[[0,"verdocs-template-card",{"template":[16]}]]],["p-c41a65a9",[[0,"verdocs-template-tags",{"tags":[16]}]]],["p-f0f27520",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["p-71eefe0e",[[0,"verdocs-loader"]]],["p-450a3908",[[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4]}],[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["p-d11ffc76",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"envelope":[32],"roleNames":[32],"showCancelDone":[32]}]]],["p-6ff8759f",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["p-06618569",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["p-9d748d04",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"loading":[32],"gettingLink":[32],"link":[32]}],[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"loading":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32]}]]],["p-8a7324b6",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["p-91e94910",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["p-a9da16c6",[[0,"verdocs-settings-members",{"endpoint":[16],"members":[32],"invited":[32],"roles":[32],"selectedTab":[32],"invitingMember":[32],"newEmailAddress":[32],"newRoleId":[32],"submitting":[32],"deletingInvitation":[32],"resendingInvitation":[32],"deletingMember":[32]}],[0,"verdocs-settings-api-keys",{"endpoint":[16],"keys":[32],"creatingKey":[32],"createdKey":[32],"deletingKey":[32],"rotatingKey":[32],"newApiKeyName":[32],"newApiKeyProfileId":[32],"members":[32]}],[0,"verdocs-settings-organization",{"endpoint":[16],"valid":[32],"dirty":[32],"submitting":[32],"name":[32],"business_name":[32],"contact_email":[32],"phone":[32],"address":[32],"address2":[32],"timezone":[32],"url":[32]}],[0,"verdocs-settings-profile",{"endpoint":[16],"valid":[32],"dirty":[32],"submitting":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32]}]]],["p-6ca72beb",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["p-7bab7252",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["p-b7d1e999",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["p-70685224",[[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["p-b2d3ac44",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"nameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["p-6a93295c",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["p-c230e3d1",[[0,"verdocs-dropdown",{"options":[16]},[[9,"resize","handleResize"]]]]],["p-2a0ed0ab",[[4,"verdocs-dialog"],[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["p-e2ae3679",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["p-159aeaf2",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"loading":[32],"setting":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"value":[32],"leading":[32],"showingHelp":[32]}],[4,"verdocs-portal",{"anchor":[1],"voffset":[2],"align":[1]},[[11,"scroll","handleScroll"],[11,"resize","handleResize"],[10,"click","handleClick"]]],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]],["p-bbf52926",[[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32]}],[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-field-attachment",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"templateid":[1],"fieldname":[1],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"templateid":[1],"fieldname":[1],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"templateid":[1],"fieldname":[1],"option":[2],"disabled":[4],"done":[4],"editable":[4],"moveable":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"field":[16],"containerId":[32],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio-button",{"templateid":[1],"fieldname":[1],"option":[2],"disabled":[4],"done":[4],"editable":[4],"moveable":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"endpoint":[16],"templateid":[1],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["p-755b5223",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"store":[32]}],[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"environment":[1],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"reset":[64]}],[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32]}],[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"personal":[32],"public":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"store":[32]}]]],["p-c179b3e4",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"loading":[32]}],[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"full_name":[32],"email":[32],"phone":[32],"delegator":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]]]'),e)));
|
1
|
+
import{p as e,b as t}from"./p-14b44491.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t(JSON.parse('[["p-a15e1a57",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"store":[32]}]]],["p-d075b6e8",[[0,"ipc-test",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["p-6dad60bb",[[0,"verdocs-settings",{"endpoint":[16],"tab":[32]}]]],["p-2bcd953d",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]}]]],["p-daebba0a",[[0,"verdocs-templates-list",{"endpoint":[16],"sharing":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]}]]],["p-e93796e2",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"headerTargetId":[1,"header-target-id"],"envelope":[32],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"submitting":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["p-70137c9e",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showManageDialog":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"loading":[32]}]]],["p-92a6f625",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"orgname":[32],"first":[32],"last":[32],"username":[32],"phone":[32],"password":[32],"submitting":[32],"activeSession":[32],"accountType":[32],"howHear":[32],"industry":[32],"companySize":[32],"reason":[32],"signupStep":[32],"resendDisabled":[32],"checkingOrg":[32]}]]],["p-ee9336c4",[[0,"verdocs-search",{"endpoint":[16]}]]],["p-ed319550",[[0,"verdocs-activity-box",{"endpoint":[16],"items":[2],"view":[1],"header":[1],"title":[32],"count":[32],"loading":[32],"entries":[32]}]]],["p-f520ee27",[[0,"verdocs-floating-menu",{"options":[16]}]]],["p-cb9f22d7",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["p-55180d12",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}]]],["p-d0140be2",[[0,"verdocs-field-payment",{"templateid":[1],"fieldname":[1],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-b68d2dba",[[0,"verdocs-organization-card",{"organization":[16]}]]],["p-3c798272",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["p-7d5e91f5",[[0,"verdocs-template-card",{"template":[16]}]]],["p-c41a65a9",[[0,"verdocs-template-tags",{"tags":[16]}]]],["p-f0f27520",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["p-71eefe0e",[[0,"verdocs-loader"]]],["p-450a3908",[[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4]}],[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["p-f6b75e4c",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"envelope":[32],"roleNames":[32],"showCancelDone":[32]}]]],["p-6ff8759f",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["p-8b46dcc3",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["p-a87f2e56",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"loading":[32],"gettingLink":[32],"link":[32]}],[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"loading":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32]}]]],["p-5059ff08",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["p-812d7568",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["p-6ec51b4b",[[0,"verdocs-settings-members",{"endpoint":[16],"members":[32],"invited":[32],"roles":[32],"selectedTab":[32],"invitingMember":[32],"newEmailAddress":[32],"newRoleId":[32],"submitting":[32],"deletingInvitation":[32],"resendingInvitation":[32],"deletingMember":[32]}],[0,"verdocs-settings-api-keys",{"endpoint":[16],"keys":[32],"creatingKey":[32],"createdKey":[32],"deletingKey":[32],"rotatingKey":[32],"newApiKeyName":[32],"newApiKeyProfileId":[32],"members":[32]}],[0,"verdocs-settings-organization",{"endpoint":[16],"valid":[32],"dirty":[32],"submitting":[32],"name":[32],"business_name":[32],"contact_email":[32],"phone":[32],"address":[32],"address2":[32],"timezone":[32],"url":[32]}],[0,"verdocs-settings-profile",{"endpoint":[16],"valid":[32],"dirty":[32],"submitting":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32]}]]],["p-6ca72beb",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["p-7bab7252",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["p-b7d1e999",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["p-70685224",[[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["p-bc6ce10f",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"nameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["p-283d935e",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["p-c230e3d1",[[0,"verdocs-dropdown",{"options":[16]},[[9,"resize","handleResize"]]]]],["p-2a0ed0ab",[[4,"verdocs-dialog"],[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["p-e2ae3679",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["p-55403539",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"loading":[32],"setting":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"value":[32],"leading":[32],"showingHelp":[32]}],[4,"verdocs-portal",{"anchor":[1],"voffset":[2],"align":[1]},[[11,"scroll","handleScroll"],[11,"resize","handleResize"],[10,"click","handleClick"]]],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]],["p-07cf78e3",[[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32]}],[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-field-attachment",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"templateid":[1],"fieldname":[1],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"templateid":[1],"fieldname":[1],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"templateid":[1],"fieldname":[1],"option":[2],"disabled":[4],"done":[4],"editable":[4],"moveable":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"field":[16],"containerId":[32],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio-button",{"templateid":[1],"fieldname":[1],"option":[2],"disabled":[4],"done":[4],"editable":[4],"moveable":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"endpoint":[16],"templateid":[1],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"templateid":[1],"fieldname":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["p-ccac4998",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"store":[32]}],[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"environment":[1],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"reset":[64]}],[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32]}],[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"personal":[32],"public":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"store":[32]}]]],["p-d522f008",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"loading":[32]}],[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"full_name":[32],"email":[32],"phone":[32],"delegator":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]]]'),e)));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@verdocs/web-sdk",
|
3
|
-
"version": "2.3.
|
3
|
+
"version": "2.3.79",
|
4
4
|
"private": false,
|
5
5
|
"description": "Verdocs Web SDK",
|
6
6
|
"license": "MIT",
|
@@ -33,7 +33,7 @@
|
|
33
33
|
"@stencil/core": "2.20.0",
|
34
34
|
"@stencil/store": "^2.0.12",
|
35
35
|
"@svgdotjs/svg.js": "^3.2.0",
|
36
|
-
"@verdocs/js-sdk": "^3.10.
|
36
|
+
"@verdocs/js-sdk": "^3.10.29",
|
37
37
|
"choices.js": "^10.2.0",
|
38
38
|
"date-fns": "^2.30.0",
|
39
39
|
"flatpickr": "^4.6.13",
|
@@ -1 +0,0 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++){t=arguments[i];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,o){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function r(e){try{a(o.next(e))}catch(e){n(e)}}function l(e){try{a(o["throw"](e))}catch(e){n(e)}}function a(e){e.done?i(e.value):s(e.value).then(r,l)}a((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,s,n,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return a([e,t])}}function a(r){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,s&&(n=r[0]&2?s["return"]:r[0]?s["throw"]||((n=s["return"])&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;if(s=0,n)r=[r[0]&2,n.value];switch(r[0]){case 0:case 1:n=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;s=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!n||r[1]>n[0]&&r[1]<n[3])){i.label=r[1];break}if(r[0]===6&&i.label<n[1]){i.label=n[1];n=r;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(r);break}if(n[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];s=0}finally{o=n=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var o=0,s=t.length,n;o<s;o++){if(n||!(o in t)){if(!n)n=Array.prototype.slice.call(t,0,o);n[o]=t[o]}}return e.concat(n||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-f246348c.system.js","./p-95080569.system.js","./p-8324a7a3.system.js","./p-d0d9ac6d.system.js","./p-0cafdb16.system.js","./p-187b20b7.system.js","./p-8aae8d16.system.js","./p-877c2b06.system.js","./p-05eb4fed.system.js","./p-6e9af353.system.js","./p-3f628837.system.js","./p-ca13070e.system.js","./p-3af6b910.system.js","./p-bbee73c8.system.js","./p-173e86c3.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,i,o,s,n,r,l,a,d,c,p,u,h,m,v,f,g,b,x,y,w,_,k,S,I,E,C,P;return{setters:[function(e){t=e.r;i=e.c;o=e.h;s=e.H},function(){},function(e){n=e.V;r=e.b;l=e.u},function(e){a=e.g},function(e){d=e.g;c=e.b;p=e.a},function(e){u=e.g},function(e){h=e.r},function(e){m=e.S},function(e){v=e.j},function(e){f=e.a;g=e.i},function(e){b=e.g},function(e){x=e.c;y=e.d},function(e){w=e.D;_=e.P;k=e.J;S=e.a;I=e.F;E=e.b;C=e.T},function(e){P=e.V},function(){},function(){},function(){},function(){}],execute:function(){var D=function(e,t,i){return e.api.post("/templates/".concat(t,"/reminder/"),i).then((function(e){return e.data}))};var L=function(e,t,i,o){return e.api.put("/templates/".concat(t,"/reminder/").concat(i),o).then((function(e){return e.data}))};var T=function(e,t,i){return e.api.delete("/templates/".concat(t,"/reminder/").concat(i)).then((function(e){return e.data}))};var z='verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';var R=e("verdocs_preview",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.templateStore=null;this.fieldStore=null;this.roleStore=null;this.endpoint=n.getDefault();this.templateId=null;this.loading=true}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;var o=this;return __generator(this,(function(s){try{this.endpoint.loadSession();if(!this.templateId){console.log("[PREVIEW] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[PREVIEW] Unable to start builder session, must be authenticated");return[2]}u(this.endpoint,this.templateId,true).then((function(e){var t,i;o.templateStore=e;console.log("[PREVIEW] Loaded Template Store",e.state);o.fieldStore=a(o.templateId);o.roleStore=d(o.templateId);console.log("RS",(t=o.roleStore)===null||t===void 0?void 0:t.state);console.log("FS",(i=o.fieldStore)===null||i===void 0?void 0:i.state);console.log("[PREVIEW] Loaded template",o.templateStore.state,o.roleStore.get("roles"),o.fieldStore.get("fields"));o.loading=false})).catch((function(e){console.log(e)}))}catch(o){console.log("[PREVIEW] Error with preview session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new m(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.handlePageRendered=function(e){var t,i;var o=e.detail;var s=(i=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.fields.filter((function(e){return e.page_sequence===o.pageNumber}));console.log("[PREVIEW] Page rendered",o,s);s.forEach((function(e){return h(e,o,{disabled:true,editable:false,draggable:false})}))};e.prototype.render=function(){var e=this;var t,i;if(this.loading){return o(s,null,o("verdocs-loader",null))}var n=__spreadArray([],(i=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.pages,true);n.sort((function(e,t){return e.sequence-t.sequence}));return o(s,null,n.map((function(t){return o("verdocs-template-document-page",{templateId:t.template_id,documentId:t.document_id,pageNumber:t.sequence,virtualWidth:612,virtualHeight:792,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))};return e}());R.style=z;var U='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)}';var A='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';var N='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var M='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var j='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var H=e("verdocs_send",function(){function e(e){t(this,e);this.sendingEnvelope=i(this,"sendingEnvelope",7);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.templateStore=null;this.roleStore=null;this.endpoint=n.getDefault();this.templateId=null;this.environment="web";this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.sending=false;this.rolesCompleted={}}e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rolesCompleted={};return[2]}))}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,s,n,r,l,a,c;var p=this;return __generator(this,(function(h){switch(h.label){case 0:h.trys.push([0,2,,3]);r=this.endpoint.loadSession();if(!this.templateId){console.log("[SEND] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SEND] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,u(this.endpoint,this.templateId,false)];case 1:l.templateStore=h.sent();this.roleStore=d(this.templateId);if(!((t=(e=this.templateStore)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_sendable)){console.warn("[SEND] Template is not sendable",this.templateId)}if(this.roleStore.get("roles")){a={};this.rolesCompleted={};this.roleStore.get("roles").forEach((function(e){var t=e.sequence-1;a[t]||(a[t]=[]);var i="r-".concat(t,"-").concat(a[t].length);a[t].push(__assign(__assign({},e),{id:i}));if(e.full_name&&(e.email||e.phone)){p.rolesCompleted[i]=__assign(__assign({},e),{id:i})}}));this.rolesAtLevel=a;this.levels=Object.keys(a).map((function(e){return+e}));this.levels.sort((function(e,t){return e-t}))}if((i=r===null||r===void 0?void 0:r.session)===null||i===void 0?void 0:i.profile){this.sessionContacts.push({id:r.session.profile.id,name:"".concat(r.session.profile.first_name," ").concat(r.session.profile.last_name),email:r.session.profile.email,phone:r.session.profile.phone})}return[3,3];case 2:c=h.sent();console.log("[SEND] Error with preview session",c);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new m(c.message,(s=c.response)===null||s===void 0?void 0:s.status,(n=c.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.getLevelIcon=function(e){if(e<0){return o("div",{class:"level-icon",innerHTML:N})}else if(e>=this.levels.length){return o("div",{class:"level-icon",innerHTML:j})}else{return o("div",{class:"level-icon",innerHTML:M})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.rolesCompleted[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t=this;var i,o,s;if(this.sending){console.log("Skipping duplicate send",e);return}console.log("Sending",e);e.preventDefault();e.stopPropagation();this.sending=true;(i=this.sendingEnvelope)===null||i===void 0?void 0:i.emit({sending:true});var n={template_id:this.templateId,name:(s=(o=this.templateStore)===null||o===void 0?void 0:o.state)===null||s===void 0?void 0:s.name,environment:this.environment,roles:Object.values(this.rolesCompleted),prepared_fields:[]};console.log("[SEND] Creating envelope",n);v(this.endpoint,n).then((function(e){var i,o;console.log("[SEND] Send envelope",e);t.reset().catch((function(e){return console.log("Unknown Error",e)}));t.sending=false;(i=t.sendingEnvelope)===null||i===void 0?void 0:i.emit({sending:false});(o=t.send)===null||o===void 0?void 0:o.emit(__assign(__assign({},n),{envelope_id:e.id,envelope:e}))})).catch((function(e){var i;console.log("Send error",e);t.sending=false;(i=t.sendingEnvelope)===null||i===void 0?void 0:i.emit({sending:false})}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t,i;var n=c(this.roleStore);var r=Object.values(this.rolesCompleted).filter((function(e){return f(e.email)||g(e.phone)}));var l=r.length>=n.length;return o(s,{class:{sendable:(i=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.is_sendable}},o("div",{class:"recipients"},o("div",{class:"left-line"}),o("div",{class:"level level-start"},this.getLevelIcon(-1),o("div",{class:"complete"},"Send Envelope")),this.levels.map((function(t){return o("div",{class:"level level-".concat(t)},e.getLevelIcon(t),e.rolesAtLevel[t].map((function(t){var i,s,n,r,l,a;var d=!t.email;var c="verdocs-send-recipient-".concat(t.name);return d?o("div",{class:"recipient",style:{backgroundColor:b(p(e.roleStore,t.name))},onClick:function(i){return e.handleClickRole(i,t)},id:c},(s=(i=e.rolesCompleted[t.id])===null||i===void 0?void 0:i.full_name)!==null&&s!==void 0?s:t.name,o("div",{class:"icon",innerHTML:A}),e.showPickerForId===t.id&&o("verdocs-portal",{anchor:c,onClickAway:function(){return e.showPickerForId=""}},o("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(i){return e.handleSelectContact(i,t)},contactSuggestions:e.sessionContacts,templateRole:(n=e.rolesCompleted[t.id])!==null&&n!==void 0?n:t,onSearchContacts:function(t){var i;return(i=e.searchContacts)===null||i===void 0?void 0:i.emit(t.detail)}}))):o("div",{class:"recipient",style:{borderColor:b(p(e.roleStore,t.name))},onClick:function(i){return e.handleClickRole(i,t)},id:c},(l=(r=e.rolesCompleted[t.id])===null||r===void 0?void 0:r.full_name)!==null&&l!==void 0?l:t.full_name,o("div",{class:"icon",innerHTML:A}),e.showPickerForId===t.id&&o("verdocs-portal",{anchor:c,onClickAway:function(){return e.showPickerForId=""}},o("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(i){return e.handleSelectContact(i,t)},contactSuggestions:e.sessionContacts,templateRole:(a=e.rolesCompleted[t.id])!==null&&a!==void 0?a:t,onSearchContacts:function(t){var i;return(i=e.searchContacts)===null||i===void 0?void 0:i.emit(t.detail)}})))})))})),o("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),o("div",{class:"complete"},"Signing Complete"))),o("div",{class:"buttons"},o("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)},disabled:this.sending}),o("verdocs-button",{label:"Send",size:"small",disabled:!l||this.sending,onClick:function(t){return e.handleSend(t)}}),this.sending&&o("verdocs-spinner",null)))};return e}());H.style=U;var F='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';var B=e("verdocs_template_attachments",function(){function e(e){t(this,e);this.exit=i(this,"exit",7);this.next=i(this,"next",7);this.templateUpdated=i(this,"templateUpdated",7);this.sdkError=i(this,"sdkError",7);this.endpoint=n.getDefault();this.templateId="";this.uploading=false;this.progressLabel="Uploading...";this.progressPercent=0;this.showDeleteError=false;this.confirmDeleteDocument=null;this.store=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,s;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}o=this;return[4,u(this.endpoint,this.templateId,false)];case 1:o.store=n.sent();return[3,3];case 2:s=n.sent();console.log("[TEMPLATE ATTACHMENTS] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new m(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(i=s.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleUploadProgress=function(e){if(e>=99){this.progressPercent=100;this.progressLabel="Processing..."}else{this.progressPercent=e}};e.prototype.handleUpload=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,s,n,r,l,a;return __generator(this,(function(d){switch(d.label){case 0:e.stopPropagation();n=e.detail.file;if(!n){return[2]}console.log("[ATTACHMENTS] Uploading...",n);this.uploading=true;this.progressLabel="Uploading...";d.label=1;case 1:d.trys.push([1,4,,5]);return[4,x(this.endpoint,this.templateId,n,this.handleUploadProgress.bind(this))];case 2:r=d.sent();console.log("[ATTACHMENTS] Created attachment",r);l=this;return[4,u(this.endpoint,this.templateId,false)];case 3:l.store=d.sent();console.log("[ATTACHMENTS] Updated template",this.store.state);(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"});this.uploading=false;this.progressLabel="";this.progressPercent=0;return[3,5];case 4:a=d.sent();console.log("[ATTACHMENTS] Error creating template",a);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new m(a.message,(o=a.response)===null||o===void 0?void 0:o.status,(s=a.response)===null||s===void 0?void 0:s.data));this.uploading=false;return[3,5];case 5:return[2]}}))}))};e.prototype.handleNext=function(e){var t;e.stopPropagation();this.uploading=false;this.progressLabel="";this.progressPercent=0;(t=this.next)===null||t===void 0?void 0:t.emit({template:this.store.state})};e.prototype.confirmDelete=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,y(this.endpoint,this.templateId,this.confirmDeleteDocument.id)];case 1:t.sent();e=this;return[4,u(this.endpoint,this.templateId,false)];case 2:e.store=t.sent();console.log("[ATTACHMENTS] New template",this.store.state);this.confirmDeleteDocument=null;return[2]}}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){if(((t=this.store.state)===null||t===void 0?void 0:t.template_documents.length)>1){this.confirmDeleteDocument=e}else{this.showDeleteError=true}return[2]}))}))};e.prototype.getFileIcon=function(e){switch(e.mime){case"application/pdf":return S;case"image/jpeg":return k;case"image/png":return _;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return w}return I};e.prototype.render=function(){var e=this;var t,i,n;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var r=(t=this.store)===null||t===void 0?void 0:t.state;if(!r.isLoaded){return o(s,{class:"loading"},o("verdocs-loader",null))}if(!this.endpoint.session||!r.profile_id){return o(s,{class:"empty"})}return o(s,null,o("h5",null,"Existing Attachments"),o("div",{class:"attachments"},(i=this.store)===null||i===void 0?void 0:i.state.template_documents.map((function(t){return o("div",{class:"attachment"},o("div",{class:"file-icon",innerHTML:e.getFileIcon(t)}),o("div",{class:"filename",title:t.name},t.name),o("div",{class:"pages"},o("div",{class:"count"},t.page_numbers),o("div",{class:"pages-icon",innerHTML:E})),o("div",{class:"trash-icon",innerHTML:C,onClick:function(){return e.handleDelete(t)}}))}))),o("h5",null,"Attach a New Document"),this.uploading?o("div",{class:"loader-wrapper"},o("verdocs-loader",null),this.progressLabel&&o("div",{class:"progress-wrapper"},o("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):o("verdocs-file-chooser",{onFileSelected:function(t){return e.handleUpload(t)}}),o("div",{class:"buttons"},o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.uploading}),o("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleNext(t)},disabled:!((n=this.store)===null||n===void 0?void 0:n.state.template_documents.length)||this.uploading})),this.showDeleteError&&o("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:function(){return e.showDeleteError=false}}),this.confirmDeleteDocument&&o("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:function(){return e.confirmDelete()},showCancel:true,onExit:function(){e.confirmDeleteDocument=null}}))};return e}());B.style=F;var O='verdocs-template-build-tabs{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}';var W=["attachments","roles","settings","fields","preview"];var V=e("verdocs_template_build_tabs",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.stepChanged=i(this,"stepChanged",7);this.endpoint=n.getDefault();this.templateId=null;this.step="preview";this.store=null}e.prototype.onStepChanged=function(){console.log("Step changed",this.step,this.templateId);this.loadTemplate().catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(o){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){this.step="preview";return[2]}this.loadTemplate().catch((function(e){return console.log("[BUILD_TABS] Unable to load template",e)}))}catch(o){console.log("[BUILD_TABS] Error loading template",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new m(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.loadTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!this.templateId)return[3,2];e=this;return[4,u(this.endpoint,this.templateId,false)];case 1:e.store=t.sent();t.label=2;case 2:return[2]}}))}))};e.prototype.setStep=function(e){var t;console.log("Selected step",e.detail.tab.id);e.stopPropagation();e.preventDefault();this.step=e.detail.tab.id;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e.detail.tab.id)};e.prototype.render=function(){var e=this;var t,i,n,r,l,a,d,c,p;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var u=false;var h=false;var m=false;console.log("[BUILD_TABS] Rendering tabs",this.templateId,this.step);if(this.templateId&&this.store&&this.store.state){m=((n=(i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.template_documents)===null||n===void 0?void 0:n.length)>0;h=m&&((a=(l=(r=this.store)===null||r===void 0?void 0:r.state)===null||l===void 0?void 0:l.roles)===null||a===void 0?void 0:a.length)>0;u=h&&((p=(c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.fields)===null||p===void 0?void 0:p.length)>0}var v=Math.max(W.indexOf(this.step),0);if(!u&&v>=4){v=3}if(!h&&v>=3){v=1}if(!m&&v>=1){v=0}console.log({selectedStepIndex:v,canPreview:u,canEditFields:h,canEditRoles:m});return o(s,null,o("verdocs-tabs",{onSelectTab:function(t){return e.setStep(t)},selectedTab:v,tabs:[{id:"attachments",disabled:false,label:this.templateId&&this.store?"Attachment(s)":"Upload Attachment(s)"},{id:"roles",disabled:!m,label:"Roles"},{id:"settings",disabled:!h,label:"Settings"},{id:"fields",disabled:!h,label:"Fields"},{id:"preview",disabled:!u,label:"Preview/Send"}]}))};Object.defineProperty(e,"watchers",{get:function(){return{step:["onStepChanged"]}},enumerable:false,configurable:true});return e}());V.style=O;var q='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var Y=" ";var G='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var J=e("verdocs_template_create",function(){function e(e){t(this,e);this.exit=i(this,"exit",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.templateCreated=i(this,"templateCreated",7);this.endpoint=n.getDefault();this.file=undefined;this.creating=false;this.progressLabel="Uploading...";this.progressPercent=0}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,s,n;var l=this;return __generator(this,(function(a){switch(a.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;this.progressLabel="Uploading...";a.label=1;case 1:a.trys.push([1,3,,4]);return[4,r(this.endpoint,{name:this.file.name,documents:[this.file]},(function(e){if(e>=99){l.progressLabel="Processing...";l.progressPercent=100}else{l.progressPercent=e}}))];case 2:s=a.sent();console.log("[CREATE] Created template",s);u(this.endpoint,s.id,true).then((function(){var e,t;(e=l.templateCreated)===null||e===void 0?void 0:e.emit({endpoint:l.endpoint,template:s,templateId:s.id});(t=l.next)===null||t===void 0?void 0:t.emit(s);l.creating=false;l.progressLabel="";l.progressPercent=0})).catch((function(e){console.log(e)}));return[3,4];case 3:n=a.sent();console.log("[CREATE] Error creating template",n);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new m(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(o=n.response)===null||o===void 0?void 0:o.data));this.creating=false;return[3,4];case 4:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return o(s,null,o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?o("div",{class:"loader-wrapper"},o("verdocs-loader",null),this.progressLabel&&o("div",{class:"progress-wrapper"},o("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):o("div",{class:"upload-box",onDrop:function(t){t.preventDefault();t.target.classList.remove("drag-over");e.file=t.dataTransfer.files[0]},onDragOver:function(e){e.preventDefault();e.dataTransfer.dropEffect="copy"},onDragEnter:function(e){return e.target.classList.add("drag-over")},onDragLeave:function(e){return e.target.classList.remove("drag-over")}},o("div",null,o("span",{innerHTML:G})),o("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),o("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?Y:"Or, if you prefer..."),o("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),o("div",{class:"buttons"},o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),o("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating}))))};return e}());J.style=q;var K="";var Q=e("verdocs_template_name",function(){function e(e){t(this,e);this.close=i(this,"close",7);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.name="";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,s,n,r;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}n=this;return[4,u(this.endpoint,this.templateId,false)];case 1:n.store=l.sent();this.name=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.name;this.dirty=false;return[3,3];case 2:r=l.sent();console.log("[TEMPLATE NAME] Error loading template",r);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new m(r.message,(o=r.response)===null||o===void 0?void 0:o.status,(s=r.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,i,o;e.stopPropagation();this.name=(i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.name;this.dirty=false;console.log("Closing");(o=this.close)===null||o===void 0?void 0:o.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o;return __generator(this,(function(s){switch(s.label){case 0:e.stopPropagation();return[4,l(this.endpoint,this.templateId,{name:this.name})];case 1:s.sent();if((t=this.store)===null||t===void 0?void 0:t.state){this.store.state.name=this.name}this.dirty=false;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:this.store.state,event:"name"});(o=this.close)===null||o===void 0?void 0:o.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,i;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.isLoading){return o(s,{class:"loading"},o("verdocs-loader",null))}return o(s,null,o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("label",{htmlFor:"verdocs-template-name"},"Template Name"),o("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:function(t){var i,o;e.name=t.target.value;e.dirty=e.name!==((o=(i=e.store)===null||i===void 0?void 0:i.state)===null||o===void 0?void 0:o.name)}}),o("div",{class:"buttons"},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)}}))))};return e}());Q.style=K;var X='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}';var Z=e("verdocs_template_reminders",function(){function e(e){t(this,e);this.close=i(this,"close",7);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.showPlanBlocker=false;this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,s,n,r;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}n=this;return[4,u(this.endpoint,this.templateId,false)];case 1:n.store=l.sent();this.sendReminders=!!((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.reminder_id);this.dirty=false;return[3,3];case 2:r=l.sent();console.log("[TEMPLATE REMINDERS] Error loading template",r);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new m(r.message,(o=r.response)===null||o===void 0?void 0:o.status,(s=r.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,i,o;e.stopPropagation();this.sendReminders=!!((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.reminder_id);this.dirty=false;(o=this.close)===null||o===void 0?void 0:o.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,s,n,r,l,a,d,c,p,h,v,f;return __generator(this,(function(g){switch(g.label){case 0:e.stopPropagation();g.label=1;case 1:g.trys.push([1,12,,13]);if(!this.sendReminders)return[3,8];c={setup_time:+this.firstReminderDays,interval_time:+this.reminderDays};if(!!((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.reminder_id))return[3,4];return[4,D(this.endpoint,this.templateId,c)];case 2:g.sent();p=this;return[4,u(this.endpoint,this.templateId,false)];case 3:p.store=g.sent();return[3,7];case 4:return[4,L(this.endpoint,this.templateId,(o=this.store)===null||o===void 0?void 0:o.state.reminder_id,c)];case 5:g.sent();h=this;return[4,u(this.endpoint,this.templateId,false)];case 6:h.store=g.sent();g.label=7;case 7:return[3,11];case 8:return[4,T(this.endpoint,this.templateId,(s=this.store)===null||s===void 0?void 0:s.state.reminder_id)];case 9:g.sent();v=this;return[4,u(this.endpoint,this.templateId,false)];case 10:v.store=g.sent();g.label=11;case 11:(n=this.templateUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"});return[3,13];case 12:f=g.sent();console.log("[TEMPLATE REMINDERS] Unable to update reminders",f);P(f.message);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new m(f.message,(l=f.response)===null||l===void 0?void 0:l.status,(a=f.response)===null||a===void 0?void 0:a.data));return[3,13];case 13:this.dirty=false;(d=this.close)===null||d===void 0?void 0:d.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,i;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.isLoaded)){return o(s,{class:"empty"})}return o(s,null,o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("h5",null,"Reminders"),o("div",{class:"input-row"},o("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),o("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){e.sendReminders=t.target.checked;e.dirty=true}})),o("p",null,o("strong",null,"NOTE:")," Reminders will only be sent for up to 14 days."),o("div",{class:"input-row"},o("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),o("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:function(t){e.firstReminderDays=t.target.value;e.dirty=true},disabled:!this.sendReminders})),o("div",{class:"input-row"},o("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),o("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:function(t){e.reminderDays=t.target.value;e.dirty=true},disabled:!this.sendReminders})),o("div",{class:"buttons"},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)}}))),this.showPlanBlocker&&o("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:function(){return e.showPlanBlocker=false}}))};return e}());Z.style=X;var $='verdocs-template-visibility{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}';var ee=e("verdocs_template_visibility",function(){function e(e){t(this,e);this.close=i(this,"close",7);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.dirty=false;this.personal=false;this.public=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,s,n,r,l,a;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[VISIBILITY] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[VISIBILITY] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,u(this.endpoint,this.templateId,false)];case 1:l.store=d.sent();this.personal=((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_personal)||true;this.public=((o=(i=this.store)===null||i===void 0?void 0:i.state)===null||o===void 0?void 0:o.is_public)||false;this.dirty=false;return[3,3];case 2:a=d.sent();console.log("[TEMPLATE VISIBILITY] Error loading template",a);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new m(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(r=a.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,i,o,s,n;e.stopPropagation();this.personal=(i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.is_personal;this.public=(s=(o=this.store)===null||o===void 0?void 0:o.state)===null||s===void 0?void 0:s.is_public;this.dirty=false;(n=this.close)===null||n===void 0?void 0:n.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o;return __generator(this,(function(s){switch(s.label){case 0:e.stopPropagation();return[4,l(this.endpoint,this.templateId,{is_personal:this.personal,is_public:this.public})];case 1:s.sent();if((t=this.store)===null||t===void 0?void 0:t.state){this.store.state.is_personal=this.personal;this.store.state.is_public=this.public}this.dirty=false;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:this.store.state,event:"visibility"});(o=this.close)===null||o===void 0?void 0:o.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,i;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.isLoaded)){return o(s,{class:"empty"})}return o(s,null,o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("h5",null,"Visibility"),o("div",{class:"input-row"},o("label",{htmlFor:"verdocs-is-shared"},"Shared"),o("verdocs-checkbox",{id:"verdocs-is-shared",name:"is-shared",checked:!this.personal,value:"on",onInput:function(t){e.personal=!t.target.checked;e.dirty=true}})),o("div",{class:"description"},"Shared templates are visible to other members of your Organization (if any)."),o("div",{class:"input-row"},o("label",{htmlFor:"verdocs-is-public"},"Public"),o("verdocs-checkbox",{id:"verdocs-is-public",name:"is-public",checked:this.public,value:"on",onInput:function(t){e.public=t.target.checked;e.dirty=true}})),o("div",{class:"description"},"Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."),o("div",{class:"buttons"},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)}}))))};return e}());ee.style=$}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as e,c as t,h as i}from"./p-14b44491.js";import{d as s}from"./p-05788c2b.js";import{V as l}from"./p-e04d8f5d.js";import{c as o}from"./p-3e607686.js";import{V as a}from"./p-ed416acf.js";import{S as n}from"./p-7a1b2643.js";const r=[{value:"",label:""},{value:"Accounting & Tax",label:"Accounting & Tax"},{value:"Business Services / Consulting",label:"Business Services / Consulting"},{value:"Construction",label:"Construction"},{value:"Education",label:"Education"},{value:"Financial Services",label:"Financial Services"},{value:"Government",label:"Government"},{value:"Healthcare - Health Plans & Payers",label:"Healthcare - Health Plans & Payers"},{value:"Healthcare - Providers",label:"Healthcare - Providers"},{value:"Insurance",label:"Insurance"},{value:"Legal",label:"Legal"},{value:"Life Sciences",label:"Life Sciences"},{value:"Manufacturing",label:"Manufacturing"},{value:"Mortgage",label:"Mortgage"},{value:"Not For Profit",label:"Not For Profit"},{value:"Real Estate - Commercial",label:"Real Estate - Commercial"},{value:"Real Estate - Residential",label:"Real Estate - Residential"},{value:"Retail",label:"Retail"},{value:"Technology",label:"Technology"},{value:"Other",label:"Other"}],u=[{value:"",label:""},{value:"I want to send a document for signature.",label:"I want to send a document for signature."},{value:"I just need to sign a document today.",label:"I just need to sign a document today."},{value:"I'm evaluating it for my business.",label:"I'm evaluating it for my business."},{value:"I'm evaluating it for my personal use.",label:"I'm evaluating it for my personal use."},{value:"I'm a developer building an integration.",label:"I'm a developer building an integration."}],d=[{value:"",label:""},{value:"Solo",label:"Solo"},{value:"2-10",label:"2-10"},{value:"11-50",label:"11-50"},{value:"51-200",label:"51-200"},{value:"201-500",label:"201-500"},{value:"501-1000",label:"501-1000"},{value:"1000+",label:"1000+"}],h=class{constructor(i){e(this,i),this.authenticated=t(this,"authenticated",7),this.sdkError=t(this,"sdkError",7),this.recheckTimer=null,this.resendDisabledTimer=null,this.accessTokenForVerification=null,this.endpoint=l.getDefault(),this.visible=!0,this.logo="https://app.verdocs.com/assets/blue-logo.svg",this.isAuthenticated=!1,this.displayMode="login",this.orgname="",this.first="",this.last="",this.username="",this.phone="",this.password="",this.submitting=!1,this.activeSession=null,this.accountType="org",this.howHear="",this.industry="",this.companySize="",this.reason="",this.signupStep=1,this.resendDisabled=!1,this.checkingOrg=!1}componentWillLoad(){var e,t;this.endpoint.loadSession(),this.endpoint.session?(console.log("[AUTH] Authenticated"),this.isAuthenticated=!0,this.activeSession=this.endpoint.session,null===(e=this.authenticated)||void 0===e||e.emit({authenticated:!0,session:this.endpoint.session})):(console.log("[AUTH] Anonymous"),null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null}))}disconnectedCallback(){this.cancelRecheckTimer()}cancelRecheckTimer(){if(this.recheckTimer){try{clearTimeout(this.recheckTimer)}catch(e){}this.recheckTimer=null}if(this.resendDisabledTimer){try{clearTimeout(this.resendDisabledTimer)}catch(e){}this.resendDisabledTimer=null}}handleSignup(){this.submitting=!0,this.accessTokenForVerification=null,o(this.endpoint,{email:this.username,password:this.password,firstName:this.first,lastName:this.last,orgName:this.orgname}).then((e=>{console.log("Result",e),console.log("[AUTH] Created profile",e.profile),console.log("[AUTH] Created organization",e.organization),this.loginAndCheckVerification()})).catch((e=>{var t,i,s,l,o;console.log("[AUTH] Signup error",e.response,JSON.stringify(e)),this.submitting=!1,this.activeSession=null,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null}),null===(i=this.sdkError)||void 0===i||i.emit(new n(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(l=e.response)||void 0===l?void 0:l.data)),a("Signup failed: "+(null===(o=e.response)||void 0===o?void 0:o.data),{style:"error"})}))}loginAndCheckVerification(){var e,t;this.submitting=!0,this.accessTokenForVerification=null,(e=this.endpoint,t={username:this.username,password:this.password},e.api.post("/authentication/login",t).then((function(e){return e.data}))).then((e=>{var t;this.cancelRecheckTimer(),this.submitting=!1;const i=s(e.accessToken);console.log("[AUTH] Got access token body",i),(null==i?void 0:i.email_verified)?(console.log("[AUTH] Email address is verified, completing login"),this.displayMode="login",this.accessTokenForVerification=null,this.endpoint.setToken(e.accessToken),this.activeSession=this.endpoint.session,this.isAuthenticated=!0,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!0,session:this.endpoint.session})):(console.log("[AUTH] Logged in, pending email address verification"),this.displayMode="verify",this.accessTokenForVerification=e.accessToken,this.recheckTimer=setTimeout((()=>this.loginAndCheckVerification()),5e3))})).catch((e=>{var t,i,s,l;this.cancelRecheckTimer(),console.log("[AUTH] Authentication error",e.response,JSON.stringify(e)),this.displayMode="login",this.submitting=!1,this.activeSession=null,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null}),null===(i=this.sdkError)||void 0===i||i.emit(new n(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(l=e.response)||void 0===l?void 0:l.data)),a("Login failed. Please check your username and password and try again.",{style:"error"})}))}handleLogout(){var e;this.endpoint.clearSession(),this.isAuthenticated=!1,this.accessTokenForVerification=null,null===(e=this.authenticated)||void 0===e||e.emit({authenticated:!1,session:null})}handleResend(){var e,t;this.resendDisabled=!0,this.resendDisabledTimer=setTimeout((()=>{this.resendDisabled=!1,this.resendDisabledTimer=null}),3e4),(e=this.endpoint,t=this.accessTokenForVerification,e.api.post("/user/email_verification",{},t?{headers:{Authorization:"Bearer ".concat(t)}}:{}).then((function(e){return e.data}))).then((e=>{console.log("[AUTH] Verification request resent",e),a("Please check your email for a message with verification instructions.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to resend verification",e)}))}handleReset(){var e,t;this.submitting=!0,(e=this.endpoint,t={email:this.username},e.api.post("/user/reset_password",t).then((function(e){return e.data}))).then((e=>{console.log("[AUTH] Reset sent",e),this.submitting=!1,this.displayMode="login",a("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to reset password",e),this.submitting=!1}))}render(){if(!this.visible)return i("div",{style:{display:"none"}},"Authenticated");if(this.isAuthenticated)return i("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:()=>this.handleLogout(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}});if("signup"===this.displayMode){const e=this.submitting||!this.first||!this.last||!this.username||!this.password||!this.orgname;return i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Sign up for a trial account"),i("h4",null,"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.submitting})),1===this.signupStep&&i("form",{onSubmit:()=>this.handleSignup()},i("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},i("verdocs-text-input",{label:"First Name",autocomplete:"first",required:!0,value:this.first,onInput:e=>this.first=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:!0,value:this.last,onInput:e=>this.last=e.target.value,disabled:this.submitting})),i("verdocs-text-input",{label:"Email",autocomplete:"email",required:!0,value:this.username,onInput:e=>this.username=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Phone #",autocomplete:"phone",value:this.phone,onInput:e=>this.phone=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",required:!0,autocomplete:"current-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:!0,value:this.orgname,onInput:e=>this.orgname=e.target.value,disabled:this.submitting,style:{flex:"1"}}),i("div",{style:{marginTop:"30px"}}),i("verdocs-button",{label:"Next",disabled:e,onClick:()=>this.signupStep=2,style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),2===this.signupStep&&i("form",{onSubmit:()=>this.handleSignup()},i("verdocs-text-input",{label:"How did you hear about Verdocs?",value:this.howHear,onInput:e=>this.howHear=e.target.value,disabled:this.submitting}),i("verdocs-select-input",{label:"Your Industry",options:r,value:this.industry,onInput:e=>this.industry=e.target.value,disabled:this.submitting}),i("verdocs-select-input",{label:"Company Size",options:d,value:this.companySize,onInput:e=>this.companySize=e.target.value,disabled:this.submitting}),i("verdocs-select-input",{label:"Purpose",options:u,value:this.reason,onInput:e=>this.reason=e.target.value,disabled:this.submitting}),i("div",{style:{marginTop:"30px"}}),i("verdocs-button",{label:"Create Account",disabled:this.submitting,onClick:()=>this.handleSignup(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),3===this.signupStep&&i("form",{onSubmit:()=>this.handleSignup()},i("p",null,"Please check your e-mail inbox for a verification code and follow the instructions provided."),i("p",null,i("em",null,"Verification messages may take up to 1 hour to arrive. If you do not receive the invitation, ",i("a",{href:"#"},"Click Here")," to resend it. Be sure to check your spam folder.")),i("div",{style:{display:"flex",flexDirection:"row",gap:"20px"}},i("verdocs-button",{label:"Back",disabled:this.submitting,onClick:()=>{this.signupStep=2},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}),i("verdocs-button",{label:"Go to Dashboard",disabled:!0,onClick:()=>this.handleSignup(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}))))}return"forgot"===this.displayMode?i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Forgot your password?"),i("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox."),i("p",null,i("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),i("form",{onSubmit:()=>this.handleSignup()},i("verdocs-text-input",{label:"Email",autocomplete:"email",required:!0,value:this.username,onInput:e=>this.username=e.target.value,disabled:this.submitting}),i("div",{style:{marginTop:"30px"}}),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:()=>this.displayMode="login"}),i("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:()=>this.handleReset()})))):"verify"===this.displayMode?i("div",{class:"form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Please Verify your Email Address"),i("p",null,"Check your e-mail inbox for a verification email, and follow the instructions provided."),i("p",null,i("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),i("div",{class:"buttons"},i("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:()=>{this.username="",this.password="",this.cancelRecheckTimer(),this.displayMode="login"}}),i("verdocs-button",{label:"Resend Email",disabled:this.resendDisabled,onClick:()=>this.handleResend()}))):i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Log in to your account"),i("h4",null,"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>{this.displayMode="signup",this.signupStep=1},disabled:this.submitting})),i("form",{onSubmit:()=>this.loginAndCheckVerification()},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:e=>this.username=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="forgot",disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.submitting,onClick:()=>this.loginAndCheckVerification(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))}};h.style='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth h4 verdocs-button button.normal .button-label{padding:0}verdocs-auth .buttons{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}';export{h as verdocs_auth}
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-f246348c.system.js","./p-cd20fb77.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js"],(function(e){"use strict";var t,i,n,s,o,a,l,r;return{setters:[function(e){t=e.r;i=e.c;n=e.h},function(e){s=e.d},function(e){o=e.V},function(e){a=e.c},function(e){l=e.V},function(e){r=e.S}],execute:function(){var u=function(e,t){return e.api.post("/authentication/login",t).then((function(e){return e.data}))};var c=function(e,t){return e.api.post("/user/reset_password",t).then((function(e){return e.data}))};var d=function(e,t){return e.api.post("/user/email_verification",{},t?{headers:{Authorization:"Bearer ".concat(t)}}:{}).then((function(e){return e.data}))};var h='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth h4 verdocs-button button.normal .button-label{padding:0}verdocs-auth .buttons{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}';var p=5e3;var f=[{value:"",label:""},{value:"Accounting & Tax",label:"Accounting & Tax"},{value:"Business Services / Consulting",label:"Business Services / Consulting"},{value:"Construction",label:"Construction"},{value:"Education",label:"Education"},{value:"Financial Services",label:"Financial Services"},{value:"Government",label:"Government"},{value:"Healthcare - Health Plans & Payers",label:"Healthcare - Health Plans & Payers"},{value:"Healthcare - Providers",label:"Healthcare - Providers"},{value:"Insurance",label:"Insurance"},{value:"Legal",label:"Legal"},{value:"Life Sciences",label:"Life Sciences"},{value:"Manufacturing",label:"Manufacturing"},{value:"Mortgage",label:"Mortgage"},{value:"Not For Profit",label:"Not For Profit"},{value:"Real Estate - Commercial",label:"Real Estate - Commercial"},{value:"Real Estate - Residential",label:"Real Estate - Residential"},{value:"Retail",label:"Retail"},{value:"Technology",label:"Technology"},{value:"Other",label:"Other"}];var m=[{value:"",label:""},{value:"I want to send a document for signature.",label:"I want to send a document for signature."},{value:"I just need to sign a document today.",label:"I just need to sign a document today."},{value:"I'm evaluating it for my business.",label:"I'm evaluating it for my business."},{value:"I'm evaluating it for my personal use.",label:"I'm evaluating it for my personal use."},{value:"I'm a developer building an integration.",label:"I'm a developer building an integration."}];var g=[{value:"",label:""},{value:"Solo",label:"Solo"},{value:"2-10",label:"2-10"},{value:"11-50",label:"11-50"},{value:"51-200",label:"51-200"},{value:"201-500",label:"201-500"},{value:"501-1000",label:"501-1000"},{value:"1000+",label:"1000+"}];var v=e("verdocs_auth",function(){function e(e){t(this,e);this.authenticated=i(this,"authenticated",7);this.sdkError=i(this,"sdkError",7);this.recheckTimer=null;this.resendDisabledTimer=null;this.accessTokenForVerification=null;this.endpoint=o.getDefault();this.visible=true;this.logo="https://app.verdocs.com/assets/blue-logo.svg";this.isAuthenticated=false;this.displayMode="login";this.orgname="";this.first="";this.last="";this.username="";this.phone="";this.password="";this.submitting=false;this.activeSession=null;this.accountType="org";this.howHear="";this.industry="";this.companySize="";this.reason="";this.signupStep=1;this.resendDisabled=false;this.checkingOrg=false}e.prototype.componentWillLoad=function(){var e,t;this.endpoint.loadSession();if(this.endpoint.session){console.log("[AUTH] Authenticated");this.isAuthenticated=true;this.activeSession=this.endpoint.session;(e=this.authenticated)===null||e===void 0?void 0:e.emit({authenticated:true,session:this.endpoint.session})}else{console.log("[AUTH] Anonymous");(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:false,session:null})}};e.prototype.disconnectedCallback=function(){this.cancelRecheckTimer()};e.prototype.cancelRecheckTimer=function(){if(this.recheckTimer){try{clearTimeout(this.recheckTimer)}catch(e){}this.recheckTimer=null}if(this.resendDisabledTimer){try{clearTimeout(this.resendDisabledTimer)}catch(e){}this.resendDisabledTimer=null}};e.prototype.handleSignup=function(){var e=this;this.submitting=true;this.accessTokenForVerification=null;a(this.endpoint,{email:this.username,password:this.password,firstName:this.first,lastName:this.last,orgName:this.orgname}).then((function(t){console.log("Result",t);console.log("[AUTH] Created profile",t.profile);console.log("[AUTH] Created organization",t.organization);e.loginAndCheckVerification()})).catch((function(t){var i,n,s,o,a;console.log("[AUTH] Signup error",t.response,JSON.stringify(t));e.submitting=false;e.activeSession=null;(i=e.authenticated)===null||i===void 0?void 0:i.emit({authenticated:false,session:null});(n=e.sdkError)===null||n===void 0?void 0:n.emit(new r(t.message,(s=t.response)===null||s===void 0?void 0:s.status,(o=t.response)===null||o===void 0?void 0:o.data));l("Signup failed: "+((a=t.response)===null||a===void 0?void 0:a.data),{style:"error"})}))};e.prototype.loginAndCheckVerification=function(){var e=this;this.submitting=true;this.accessTokenForVerification=null;u(this.endpoint,{username:this.username,password:this.password}).then((function(t){var i;e.cancelRecheckTimer();e.submitting=false;var n=s(t.accessToken);console.log("[AUTH] Got access token body",n);if(n===null||n===void 0?void 0:n.email_verified){console.log("[AUTH] Email address is verified, completing login");e.displayMode="login";e.accessTokenForVerification=null;e.endpoint.setToken(t.accessToken);e.activeSession=e.endpoint.session;e.isAuthenticated=true;(i=e.authenticated)===null||i===void 0?void 0:i.emit({authenticated:true,session:e.endpoint.session})}else{console.log("[AUTH] Logged in, pending email address verification");e.displayMode="verify";e.accessTokenForVerification=t.accessToken;e.recheckTimer=setTimeout((function(){return e.loginAndCheckVerification()}),p)}})).catch((function(t){var i,n,s,o;e.cancelRecheckTimer();console.log("[AUTH] Authentication error",t.response,JSON.stringify(t));e.displayMode="login";e.submitting=false;e.activeSession=null;(i=e.authenticated)===null||i===void 0?void 0:i.emit({authenticated:false,session:null});(n=e.sdkError)===null||n===void 0?void 0:n.emit(new r(t.message,(s=t.response)===null||s===void 0?void 0:s.status,(o=t.response)===null||o===void 0?void 0:o.data));l("Login failed. Please check your username and password and try again.",{style:"error"})}))};e.prototype.handleLogout=function(){var e;this.endpoint.clearSession();this.isAuthenticated=false;this.accessTokenForVerification=null;(e=this.authenticated)===null||e===void 0?void 0:e.emit({authenticated:false,session:null})};e.prototype.handleResend=function(){var e=this;this.resendDisabled=true;this.resendDisabledTimer=setTimeout((function(){e.resendDisabled=false;e.resendDisabledTimer=null}),3e4);d(this.endpoint,this.accessTokenForVerification).then((function(e){console.log("[AUTH] Verification request resent",e);l("Please check your email for a message with verification instructions.",{style:"info"})})).catch((function(e){console.log("[AUTH] Unable to resend verification",e)}))};e.prototype.handleReset=function(){var e=this;this.submitting=true;c(this.endpoint,{email:this.username}).then((function(t){console.log("[AUTH] Reset sent",t);e.submitting=false;e.displayMode="login";l("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"})})).catch((function(t){console.log("[AUTH] Unable to reset password",t);e.submitting=false}))};e.prototype.render=function(){var e=this;if(!this.visible){return n("div",{style:{display:"none"}},"Authenticated")}if(this.isAuthenticated){return n("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:function(){return e.handleLogout()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})}if(this.displayMode==="signup"){var t=this.submitting||!this.first||!this.last||!this.username||!this.password||!this.orgname;return n("div",{class:"form"},n("a",{href:"https://verdocs.com/en/"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),n("h3",null,"Sign up for a trial account"),n("h4",null,"Already have an account?",n("verdocs-button",{label:"Log In",variant:"text",onClick:function(){return e.displayMode="login"},disabled:this.submitting})),this.signupStep===1&&n("form",{onSubmit:function(){return e.handleSignup()}},n("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},n("verdocs-text-input",{label:"First Name",autocomplete:"first",required:true,value:this.first,onInput:function(t){return e.first=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:true,value:this.last,onInput:function(t){return e.last=t.target.value},disabled:this.submitting})),n("verdocs-text-input",{label:"Email",autocomplete:"email",required:true,value:this.username,onInput:function(t){return e.username=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Phone #",autocomplete:"phone",value:this.phone,onInput:function(t){return e.phone=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Password",type:"password",required:true,autocomplete:"current-password",value:this.password,onInput:function(t){return e.password=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:true,value:this.orgname,onInput:function(t){return e.orgname=t.target.value},disabled:this.submitting,style:{flex:"1"}}),n("div",{style:{marginTop:"30px"}}),n("verdocs-button",{label:"Next",disabled:t,onClick:function(){return e.signupStep=2},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),this.signupStep===2&&n("form",{onSubmit:function(){return e.handleSignup()}},n("verdocs-text-input",{label:"How did you hear about Verdocs?",value:this.howHear,onInput:function(t){return e.howHear=t.target.value},disabled:this.submitting}),n("verdocs-select-input",{label:"Your Industry",options:f,value:this.industry,onInput:function(t){return e.industry=t.target.value},disabled:this.submitting}),n("verdocs-select-input",{label:"Company Size",options:g,value:this.companySize,onInput:function(t){return e.companySize=t.target.value},disabled:this.submitting}),n("verdocs-select-input",{label:"Purpose",options:m,value:this.reason,onInput:function(t){return e.reason=t.target.value},disabled:this.submitting}),n("div",{style:{marginTop:"30px"}}),n("verdocs-button",{label:"Create Account",disabled:this.submitting,onClick:function(){return e.handleSignup()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),this.signupStep===3&&n("form",{onSubmit:function(){return e.handleSignup()}},n("p",null,"Please check your e-mail inbox for a verification code and follow the instructions provided."),n("p",null,n("em",null,"Verification messages may take up to 1 hour to arrive. If you do not receive the invitation, ",n("a",{href:"#"},"Click Here")," to resend it. Be sure to check your spam folder.")),n("div",{style:{display:"flex",flexDirection:"row",gap:"20px"}},n("verdocs-button",{label:"Back",disabled:this.submitting,onClick:function(){e.signupStep=2},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}),n("verdocs-button",{label:"Go to Dashboard",disabled:true,onClick:function(){return e.handleSignup()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}))))}if(this.displayMode==="forgot"){return n("div",{class:"form"},n("a",{href:"https://verdocs.com/en/"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),n("h3",null,"Forgot your password?"),n("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox."),n("p",null,n("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),n("form",{onSubmit:function(){return e.handleSignup()}},n("verdocs-text-input",{label:"Email",autocomplete:"email",required:true,value:this.username,onInput:function(t){return e.username=t.target.value},disabled:this.submitting}),n("div",{style:{marginTop:"30px"}}),n("div",{class:"buttons"},n("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:function(){return e.displayMode="login"}}),n("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:function(){return e.handleReset()}}))))}if(this.displayMode==="verify"){return n("div",{class:"form"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),n("h3",null,"Please Verify your Email Address"),n("p",null,"Check your e-mail inbox for a verification email, and follow the instructions provided."),n("p",null,n("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),n("div",{class:"buttons"},n("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:function(){e.username="";e.password="";e.cancelRecheckTimer();e.displayMode="login"}}),n("verdocs-button",{label:"Resend Email",disabled:this.resendDisabled,onClick:function(){return e.handleResend()}})))}return n("div",{class:"form"},n("a",{href:"https://verdocs.com/en/"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),n("h3",null,"Log in to your account"),n("h4",null,"Don't have an account?",n("verdocs-button",{label:"Sign Up",variant:"text",onClick:function(){e.displayMode="signup";e.signupStep=1},disabled:this.submitting})),n("form",{onSubmit:function(){return e.loginAndCheckVerification()}},n("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:function(t){return e.username=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:function(t){return e.password=t.target.value},disabled:this.submitting}),n("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:function(){return e.displayMode="forgot"},disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),n("verdocs-button",{label:"Login",disabled:this.submitting,onClick:function(){return e.loginAndCheckVerification()},style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))};return e}());v.style=h}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as e,c as t,h as i,H as s}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as o,b as l,u as a}from"./p-e04d8f5d.js";import{g as n}from"./p-ef20cb50.js";import{g as r,b as d,a as c}from"./p-b086f9be.js";import{g as h}from"./p-45ecd6eb.js";import{r as p}from"./p-b72328af.js";import{S as m}from"./p-7a1b2643.js";import{j as v}from"./p-dc2ad047.js";import{a as u,i as x}from"./p-e8ce0b6f.js";import{g as f}from"./p-6de76553.js";import{c as b,d as g}from"./p-567a6e7c.js";import{D as y,P as w,J as k,a as S,F as E,b as z,T as C}from"./p-029ae656.js";import{V as T}from"./p-ed416acf.js";import"./p-7648c449.js";import"./p-eab67c09.js";import"./p-1b4e7078.js";import"./p-c220af42.js";const I=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.templateStore=null,this.fieldStore=null,this.roleStore=null,this.endpoint=o.getDefault(),this.templateId=null,this.loading=!0}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[PREVIEW] Unable to start builder session, must be authenticated");h(this.endpoint,this.templateId,!0).then((e=>{var t,i;this.templateStore=e,console.log("[PREVIEW] Loaded Template Store",e.state),this.fieldStore=n(this.templateId),this.roleStore=r(this.templateId),console.log("RS",null===(t=this.roleStore)||void 0===t?void 0:t.state),console.log("FS",null===(i=this.fieldStore)||void 0===i?void 0:i.state),console.log("[PREVIEW] Loaded template",this.templateStore.state,this.roleStore.get("roles"),this.fieldStore.get("fields")),this.loading=!1})).catch((e=>{console.log(e)}))}catch(s){console.log("[PREVIEW] Error with preview session",s),null===(e=this.sdkError)||void 0===e||e.emit(new m(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handlePageRendered(e){var t,i;const s=e.detail,o=null===(i=null===(t=this.templateStore)||void 0===t?void 0:t.state)||void 0===i?void 0:i.fields.filter((e=>e.page_sequence===s.pageNumber));console.log("[PREVIEW] Page rendered",s,o),o.forEach((e=>p(e,s,{disabled:!0,editable:!1,draggable:!1})))}render(){var e,t;if(this.loading)return i(s,null,i("verdocs-loader",null));const o=[...null===(t=null===(e=this.templateStore)||void 0===e?void 0:e.state)||void 0===t?void 0:t.pages];return o.sort(((e,t)=>e.sequence-t.sequence)),i(s,null,o.map((e=>i("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}};I.style='verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';const L='<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>',R=class{constructor(i){e(this,i),this.sendingEnvelope=t(this,"sendingEnvelope",7),this.send=t(this,"send",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.searchContacts=t(this,"searchContacts",7),this.levels=[],this.templateStore=null,this.roleStore=null,this.endpoint=o.getDefault(),this.templateId=null,this.environment="web",this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`,this.rolesAtLevel={},this.showPickerForId="",this.sessionContacts=[],this.sending=!1,this.rolesCompleted={}}async reset(){this.rolesCompleted={}}async componentWillLoad(){var e,t,i,s,o,l;try{const s=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.templateStore=await h(this.endpoint,this.templateId,!1),this.roleStore=r(this.templateId),(null===(t=null===(e=this.templateStore)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_sendable)||console.warn("[SEND] Template is not sendable",this.templateId),this.roleStore.get("roles")){const e={};this.rolesCompleted={},this.roleStore.get("roles").forEach((t=>{const i=t.sequence-1;e[i]||(e[i]=[]);const s=`r-${i}-${e[i].length}`;e[i].push({...t,id:s}),t.full_name&&(t.email||t.phone)&&(this.rolesCompleted[s]={...t,id:s})})),this.rolesAtLevel=e,this.levels=Object.keys(e).map((e=>+e)),this.levels.sort(((e,t)=>e-t))}(null===(i=null==s?void 0:s.session)||void 0===i?void 0:i.profile)&&this.sessionContacts.push({id:s.session.profile.id,name:`${s.session.profile.first_name} ${s.session.profile.last_name}`,email:s.session.profile.email,phone:s.session.profile.phone})}catch(e){console.log("[SEND] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new m(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(l=e.response)||void 0===l?void 0:l.data))}}getLevelIcon(e){return i("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,t){e.preventDefault(),this.rolesCompleted[t.id]={...t,...e.detail},this.showPickerForId=""}handleClickRole(e,t){e.stopPropagation(),this.showPickerForId=t.id}handleSend(e){var t,i,s;if(this.sending)return void console.log("Skipping duplicate send",e);console.log("Sending",e),e.preventDefault(),e.stopPropagation(),this.sending=!0,null===(t=this.sendingEnvelope)||void 0===t||t.emit({sending:!0});const o={template_id:this.templateId,name:null===(s=null===(i=this.templateStore)||void 0===i?void 0:i.state)||void 0===s?void 0:s.name,environment:this.environment,roles:Object.values(this.rolesCompleted),prepared_fields:[]};console.log("[SEND] Creating envelope",o),v(this.endpoint,o).then((e=>{var t,i;console.log("[SEND] Send envelope",e),this.reset().catch((e=>console.log("Unknown Error",e))),this.sending=!1,null===(t=this.sendingEnvelope)||void 0===t||t.emit({sending:!1}),null===(i=this.send)||void 0===i||i.emit({...o,envelope_id:e.id,envelope:e})})).catch((e=>{var t;console.log("Send error",e),this.sending=!1,null===(t=this.sendingEnvelope)||void 0===t||t.emit({sending:!1})}))}handleCancel(e){var t;e.stopPropagation(),null===(t=this.exit)||void 0===t||t.emit()}render(){var e,t;const o=d(this.roleStore),l=Object.values(this.rolesCompleted).filter((e=>u(e.email)||x(e.phone))).length>=o.length;return i(s,{class:{sendable:null===(t=null===(e=this.templateStore)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Envelope")),this.levels.map((e=>i("div",{class:`level level-${e}`},this.getLevelIcon(e),this.rolesAtLevel[e].map((e=>{var t,s,o,l,a,n;const r=`verdocs-send-recipient-${e.name}`;return e.email?i("div",{class:"recipient",style:{borderColor:f(c(this.roleStore,e.name))},onClick:t=>this.handleClickRole(t,e),id:r},null!==(a=null===(l=this.rolesCompleted[e.id])||void 0===l?void 0:l.full_name)&&void 0!==a?a:e.full_name,i("div",{class:"icon",innerHTML:L}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:r,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(n=this.rolesCompleted[e.id])&&void 0!==n?n:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}}))):i("div",{class:"recipient",style:{backgroundColor:f(c(this.roleStore,e.name))},onClick:t=>this.handleClickRole(t,e),id:r},null!==(s=null===(t=this.rolesCompleted[e.id])||void 0===t?void 0:t.full_name)&&void 0!==s?s:e.name,i("div",{class:"icon",innerHTML:L}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:r,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(o=this.rolesCompleted[e.id])&&void 0!==o?o:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}})))}))))),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e),disabled:this.sending}),i("verdocs-button",{label:"Send",size:"small",disabled:!l||this.sending,onClick:e=>this.handleSend(e)}),this.sending&&i("verdocs-spinner",null)))}};R.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)}';const U=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.templateUpdated=t(this,"templateUpdated",7),this.sdkError=t(this,"sdkError",7),this.endpoint=o.getDefault(),this.templateId="",this.uploading=!1,this.progressLabel="Uploading...",this.progressPercent=0,this.showDeleteError=!1,this.confirmDeleteDocument=null,this.store=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await h(this.endpoint,this.templateId,!1)}catch(s){console.log("[TEMPLATE ATTACHMENTS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new m(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handleCancel(e){e.stopPropagation(),this.exit.emit()}handleUploadProgress(e){e>=99?(this.progressPercent=100,this.progressLabel="Processing..."):this.progressPercent=e}async handleUpload(e){var t,i,s,o;e.stopPropagation();const l=e.detail.file;if(l){console.log("[ATTACHMENTS] Uploading...",l),this.uploading=!0,this.progressLabel="Uploading...";try{const e=await b(this.endpoint,this.templateId,l,this.handleUploadProgress.bind(this));console.log("[ATTACHMENTS] Created attachment",e),this.store=await h(this.endpoint,this.templateId,!1),console.log("[ATTACHMENTS] Updated template",this.store.state),null===(t=this.templateUpdated)||void 0===t||t.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"}),this.uploading=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[ATTACHMENTS] Error creating template",e),null===(i=this.sdkError)||void 0===i||i.emit(new m(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data)),this.uploading=!1}}}handleNext(e){var t;e.stopPropagation(),this.uploading=!1,this.progressLabel="",this.progressPercent=0,null===(t=this.next)||void 0===t||t.emit({template:this.store.state})}async confirmDelete(){await g(this.endpoint,this.templateId,this.confirmDeleteDocument.id),this.store=await h(this.endpoint,this.templateId,!1),console.log("[ATTACHMENTS] New template",this.store.state),this.confirmDeleteDocument=null}async handleDelete(e){var t;(null===(t=this.store.state)||void 0===t?void 0:t.template_documents.length)>1?this.confirmDeleteDocument=e:this.showDeleteError=!0}getFileIcon(e){switch(e.mime){case"application/pdf":return S;case"image/jpeg":return k;case"image/png":return w;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return y}return E}render(){var e,t,o;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));const l=null===(e=this.store)||void 0===e?void 0:e.state;return l.isLoaded?this.endpoint.session&&l.profile_id?i(s,null,i("h5",null,"Existing Attachments"),i("div",{class:"attachments"},null===(t=this.store)||void 0===t?void 0:t.state.template_documents.map((e=>i("div",{class:"attachment"},i("div",{class:"file-icon",innerHTML:this.getFileIcon(e)}),i("div",{class:"filename",title:e.name},e.name),i("div",{class:"pages"},i("div",{class:"count"},e.page_numbers),i("div",{class:"pages-icon",innerHTML:z})),i("div",{class:"trash-icon",innerHTML:C,onClick:()=>this.handleDelete(e)}))))),i("h5",null,"Attach a New Document"),this.uploading?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("verdocs-file-chooser",{onFileSelected:e=>this.handleUpload(e)}),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.uploading}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleNext(e),disabled:!(null===(o=this.store)||void 0===o?void 0:o.state.template_documents.length)||this.uploading})),this.showDeleteError&&i("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:()=>this.showDeleteError=!1}),this.confirmDeleteDocument&&i("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:()=>this.confirmDelete(),showCancel:!0,onExit:()=>{this.confirmDeleteDocument=null}})):i(s,{class:"empty"}):i(s,{class:"loading"},i("verdocs-loader",null))}};U.style='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';const M=["attachments","roles","settings","fields","preview"],N=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.stepChanged=t(this,"stepChanged",7),this.endpoint=o.getDefault(),this.templateId=null,this.step="preview",this.store=null}onStepChanged(){console.log("Step changed",this.step,this.templateId),this.loadTemplate().catch((e=>console.log("Unknown Error",e)))}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.endpoint.session)return void console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");if(!this.templateId)return void(this.step="preview");this.loadTemplate().catch((e=>console.log("[BUILD_TABS] Unable to load template",e)))}catch(s){console.log("[BUILD_TABS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new m(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}async loadTemplate(){this.templateId&&(this.store=await h(this.endpoint,this.templateId,!1))}setStep(e){var t;console.log("Selected step",e.detail.tab.id),e.stopPropagation(),e.preventDefault(),this.step=e.detail.tab.id,null===(t=this.stepChanged)||void 0===t||t.emit(e.detail.tab.id)}render(){var e,t,o,l,a,n,r,d,c;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));let h=!1,p=!1,m=!1;console.log("[BUILD_TABS] Rendering tabs",this.templateId,this.step),this.templateId&&this.store&&this.store.state&&(m=(null===(o=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.template_documents)||void 0===o?void 0:o.length)>0,p=m&&(null===(n=null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.roles)||void 0===n?void 0:n.length)>0,h=p&&(null===(c=null===(d=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===d?void 0:d.fields)||void 0===c?void 0:c.length)>0);let v=Math.max(M.indexOf(this.step),0);return!h&&v>=4&&(v=3),!p&&v>=3&&(v=1),!m&&v>=1&&(v=0),console.log({selectedStepIndex:v,canPreview:h,canEditFields:p,canEditRoles:m}),i(s,null,i("verdocs-tabs",{onSelectTab:e=>this.setStep(e),selectedTab:v,tabs:[{id:"attachments",disabled:!1,label:this.templateId&&this.store?"Attachment(s)":"Upload Attachment(s)"},{id:"roles",disabled:!m,label:"Roles"},{id:"settings",disabled:!p,label:"Settings"},{id:"fields",disabled:!p,label:"Fields"},{id:"preview",disabled:!h,label:"Preview/Send"}]}))}static get watchers(){return{step:["onStepChanged"]}}};N.style='verdocs-template-build-tabs{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}';const A=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.templateCreated=t(this,"templateCreated",7),this.endpoint=o.getDefault(),this.file=void 0,this.creating=!1,this.progressLabel="Uploading...",this.progressPercent=0}componentWillLoad(){this.endpoint.setTimeout(3e4),this.endpoint.loadSession()}handleFileChanged(e){var t;this.file=(null===(t=e.target.files)||void 0===t?void 0:t[0])||null,console.log("[CREATE] Selected file",this.file)}handleUpload(e){e.stopPropagation(),document.getElementById("verdocs-template-create-file").click()}handleCancel(e){e.stopPropagation(),this.exit.emit()}async handleSubmit(e){var t,i,s;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0,this.progressLabel="Uploading...";try{const e=await l(this.endpoint,{name:this.file.name,documents:[this.file]},(e=>{e>=99?(this.progressLabel="Processing...",this.progressPercent=100):this.progressPercent=e}));console.log("[CREATE] Created template",e),h(this.endpoint,e.id,!0).then((()=>{var t,i;null===(t=this.templateCreated)||void 0===t||t.emit({endpoint:this.endpoint,template:e,templateId:e.id}),null===(i=this.next)||void 0===i||i.emit(e),this.creating=!1,this.progressLabel="",this.progressPercent=0})).catch((e=>{console.log(e)}))}catch(e){console.log("[CREATE] Error creating template",e),null===(t=this.sdkError)||void 0===t||t.emit(new m(e.message,null===(i=e.response)||void 0===i?void 0:i.status,null===(s=e.response)||void 0===s?void 0:s.data)),this.creating=!1}}}render(){return i(s,null,this.endpoint.session?i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("input",{type:"file",id:"verdocs-template-create-file",multiple:!0,accept:"application/pdf",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),this.creating?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("div",{class:"upload-box",onDrop:e=>{e.preventDefault(),e.target.classList.remove("drag-over"),this.file=e.dataTransfer.files[0]},onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"},onDragEnter:e=>e.target.classList.add("drag-over"),onDragLeave:e=>e.target.classList.remove("drag-over")},i("div",null,i("span",{innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>'})),i("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),i("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?" ":"Or, if you prefer..."),i("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:e=>this.handleUpload(e)})),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.creating}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file||this.creating}))):i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};A.style='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';const D=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.name="",this.dirty=!1}async componentWillLoad(){var e,t,i,s,o;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 h(this.endpoint,this.templateId,!1),this.name=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.name,this.dirty=!1}catch(e){console.log("[TEMPLATE NAME] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new m(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,console.log("Closing"),null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await a(this.endpoint,this.templateId,{name:this.name}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.name=this.name),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"name"}),null===(s=this.close)||void 0===s||s.emit()}render(){var e,t;return this.endpoint.session?(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoading)?i(s,{class:"loading"},i("verdocs-loader",null)):i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("label",{htmlFor:"verdocs-template-name"},"Template Name"),i("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:e=>{var t,i;this.name=e.target.value,this.dirty=this.name!==(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name)}}),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)})))):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};D.style="";const j=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.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,o;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 h(this.endpoint,this.templateId,!1),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 m(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.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,o,l,a,n,r,d,c,p,v;e.stopPropagation();try{if(this.sendReminders){const e={setup_time:+this.firstReminderDays,interval_time:+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),this.store=await h(this.endpoint,this.templateId,!1)):(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),this.store=await h(this.endpoint,this.templateId,!1))}else await(c=this.endpoint,p=this.templateId,v=null===(o=this.store)||void 0===o?void 0:o.state.reminder_id,c.api.delete("/templates/".concat(p,"/reminder/").concat(v)).then((function(e){return e.data}))),this.store=await h(this.endpoint,this.templateId,!1);null===(l=this.templateUpdated)||void 0===l||l.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"})}catch(e){console.log("[TEMPLATE REMINDERS] Unable to update reminders",e),T(e.message),null===(a=this.sdkError)||void 0===a||a.emit(new m(e.message,null===(n=e.response)||void 0===n?void 0:n.status,null===(r=e.response)||void 0===r?void 0:r.data))}this.dirty=!1,null===(d=this.close)||void 0===d||d.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.sendReminders=e.target.checked,this.dirty=!0}})),i("p",null,i("strong",null,"NOTE:")," Reminders will only be sent for up to 14 days."),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,this.dirty=!0},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,this.dirty=!0},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."}))}};j.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}';const H=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.dirty=!1,this.personal=!1,this.public=!1}async componentWillLoad(){var e,t,i,s,o,l,a;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[VISIBILITY] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[VISIBILITY] Unable to start builder session, must be authenticated");this.store=await h(this.endpoint,this.templateId,!1),this.personal=(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_personal)||!0,this.public=(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.is_public)||!1,this.dirty=!1}catch(e){console.log("[TEMPLATE VISIBILITY] Error loading template",e),null===(o=this.sdkError)||void 0===o||o.emit(new m(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(a=e.response)||void 0===a?void 0:a.data))}}handleCancel(e){var t,i,s,o,l;e.stopPropagation(),this.personal=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.is_personal,this.public=null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.is_public,this.dirty=!1,null===(l=this.close)||void 0===l||l.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await a(this.endpoint,this.templateId,{is_personal:this.personal,is_public:this.public}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.is_personal=this.personal,this.store.state.is_public=this.public),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"visibility"}),null===(s=this.close)||void 0===s||s.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,"Visibility"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-shared"},"Shared"),i("verdocs-checkbox",{id:"verdocs-is-shared",name:"is-shared",checked:!this.personal,value:"on",onInput:e=>{this.personal=!e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Shared templates are visible to other members of your Organization (if any)."),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-public"},"Public"),i("verdocs-checkbox",{id:"verdocs-is-public",name:"is-public",checked:this.public,value:"on",onInput:e=>{this.public=e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."),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)})))):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};H.style='verdocs-template-visibility{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}';export{I as verdocs_preview,R as verdocs_send,U as verdocs_template_attachments,N as verdocs_template_build_tabs,A as verdocs_template_create,D as verdocs_template_name,j as verdocs_template_reminders,H as verdocs_template_visibility}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as t,c as o,h as e,H as i}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as s}from"./p-e04d8f5d.js";import{c}from"./p-b72328af.js";import"./p-eab67c09.js";import"./p-dc2ad047.js";import"./p-1b4e7078.js";import"./p-c220af42.js";const a=class{constructor(e){t(this,e),this.searchContacts=o(this,"searchContacts",7),this.exit=o(this,"exit",7),this.next=o(this,"next",7),this.endpoint=s.getDefault(),this.templateRole=null,this.contactSuggestions=[],this.name=void 0,this.email=void 0,this.phone=void 0,this.message=void 0,this.showSuggestions=!1,this.showMessage=!1,this.delegator=!1,this.nameFieldId=`verdocs-contact-picker-name-${Math.random().toString(36).substring(2,11)}`,this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`,this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`}componentWillLoad(){this.templateRole&&(this.name=this.templateRole.full_name||"",this.email=this.templateRole.email||"",this.phone=this.templateRole.phone||"",this.delegator=this.templateRole.delegator||!1,this.message=this.templateRole.message||"",this.showMessage=""!==this.message)}handleNameChange(t){var o;this.name=t.target.value,null===(o=this.searchContacts)||void 0===o||o.emit({query:this.name})}handleEmailChange(t){this.email=t.target.value}handlePhoneChange(t){this.phone=c(t.target.value)}handleMessageChange(t){this.message=t.target.value}handleCancel(t){var o;t.stopPropagation(),this.showSuggestions=!1,null===(o=this.exit)||void 0===o||o.emit()}handleSubmit(t){var o;t.stopPropagation(),this.showSuggestions=!1,null===(o=this.next)||void 0===o||o.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})}handleSelectSuggestion(t,o){t.stopPropagation(),this.name=o.name,this.email=o.email,this.phone=o.phone,this.showSuggestions=!1}render(){return e("form",{onSubmit:t=>t.preventDefault(),onClick:t=>t.stopPropagation(),autocomplete:"off"},e("div",{class:"row"},e("label",{htmlFor:this.nameFieldId},"Name:"),e("input",{id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:()=>{var t;return this.showSuggestions=(null===(t=this.contactSuggestions)||void 0===t?void 0:t.length)>0},onInput:t=>this.handleNameChange(t)}),this.showSuggestions&&e("div",{class:"dropdown"},this.contactSuggestions.map((t=>{var o;return e("div",{key:null!==(o=t.id)&&void 0!==o?o:t.name,class:"suggestion",onClick:o=>this.handleSelectSuggestion(o,t)},t.avatar?e("img",{alt:"Avatar",class:"avatar",src:t.avatar}):e("div",{class:"avatar",innerHTML:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>'}),e("div",{class:"details"},e("div",{class:"name"},t.name),t.email&&e("div",{class:"destination"},t.email),t.phone&&e("div",{class:"destination"},t.phone)))})))),e("div",{class:"row"},e("label",{htmlFor:this.emailFieldId},"Email:"),e("input",{id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email Address...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handleEmailChange(t)})),e("div",{class:"row"},e("label",{htmlFor:this.phoneFieldId},"Phone:"),e("input",{id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handlePhoneChange(t)})),this.showMessage&&e("div",{class:"row"},e("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),e("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handleMessageChange(t)})),e("div",{class:"buttons"},e("verdocs-toggle-button",{icon:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>',size:"small",active:this.showMessage,onToggle:t=>{this.showMessage=t.detail.active,this.showSuggestions=!1}}),e("verdocs-toggle-button",{icon:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>',size:"small",active:this.delegator,onToggle:t=>{this.delegator=t.detail.active,this.showSuggestions=!1}}),e("div",{class:"flex-fill"}),e("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:t=>this.handleCancel(t)}),e("verdocs-button",{label:"OK",size:"small",onClick:t=>this.handleSubmit(t)})))}};a.style='verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .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-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';const n=class{constructor(e){t(this,e),this.toggle=o(this,"toggle",7),this.active=!1,this.icon=null,this.label=null,this.size="normal",this._active=!1}componentWillLoad(){this._active=this.active}handleToggle(t){var o;t.stopPropagation();const e=!this._active;this._active=e,null===(o=this.toggle)||void 0===o||o.emit({active:e})}render(){return e(i,{class:`size-${this.size}`},this.icon?e("button",{innerHTML:this.icon,class:{active:this._active},onClick:t=>this.handleToggle(t)}):e("button",{class:{active:this._active},onClick:t=>this.handleToggle(t)},this.label))}};n.style='verdocs-toggle-button{font-family:"Inter", "Barlow", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}';export{a as verdocs_contact_picker,n as verdocs_toggle_button}
|